Question: Write a SELECT statement that returns all class data, and the number of students taking the class. Attached is the databases I am working with.

Write a SELECT statement that returns all class data, and the number of students taking the class.

Write a SELECT statement that returns all class data, and the number

Attached is the databases I am working with.

SELECT FROM * registered_students;

of students taking the class. Attached is the databases I am working

SELECT * FROM students;

with. SELECT FROM * registered_students; SELECT * FROM students; SELECT * FROM

SELECT * FROM classes;

classes; Step 3: Write a SELECT statement that returns all class data,

Step 3: Write a SELECT statement that returns all class data, and the number of students taking the class. Use a Correlated Subquery in the SELECT clause.(Do not use a JOIN statement.) Give the subquery a column alias in the output. Question: Can you reference the new column in the WHERE clause? Why/Why not? class_id name 1 Computer Science 310 SQL 3 Communication Activities Writing and Rhetoric 5 ELEMENTARY ALGEBRA Example: code maximum_students number_of_students CS-HU310 10 11 COMM113 5 ENG 101 4 6 MA030 5 4 4 NULL Deliverable 3: send your code & screenshot Deliverable 4: Answer question (assignment continues next page) id 1 2 3 4 5 6 class_id 1 1 1 1 1 student_id 2 3 4 5 7 8 9 10 1 7 1 1 2 2 1 8 16 17 18 19 23 24 25 26 2 3 7 2 4 signup_timestamp 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:51:35 2021-03-07 18:52:09 2021-03-07 18:52:09 2021-03-07 18:52:09 2021-03-07 18:52:09 2021-03-07 18:52:19 2021-03-07 18:52:19 2021-03-07 18:52:19 2021-03-07 18:52:19 2021-03-07 18:52:19 2021-03-07 18:52:19 2021-03-07 18:59:55 2021-03-07 18:59:55 2021-03-07 18:59:55 3 3 3 3 3 3 1 27 28 30 31 32 NULL 5 7 8 9 2 3 4 NULL 1 1 NULL NULL student_id first_name_last_name last_name birthdate 1 Ross Johnson 2000-06-15 2 Phoebe Bridge 1999-05-14 3 Hope Neibaur 1998-04-16 4 Perry Newman 2001-03-11 5 Hermann Ball 1997-02-27 6 Lily President 1992-11-01 7 Endora Explorer 1990-07-19 8 Darwin Stewart 2002-09-20 9 Thatcher Robinson 2003-01-25 10 Sage Roman 2004-10-07 NULL NULL NULL NULL name description NULL dass_id 1 2 3 4 Computer Science 310 SQL COMM 113 Communication Skills English 101 Writing Skills MA030 Basic Skills Learn how to communicate like a pro Basic writing techniques Basic skills to learn code CS-HU310 COMM113 ENG 101 MA030 NULL maximum_students 10 5 4 5 NULL NULL NULL NULL

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!