Question: Write a query to show only the classes that have no students signed up. - Include the classes.class_id, classes.code, number_of_students and the maximum_students - Do

 Write a query to show only the classes that have no

students signed up. - Include the classes.class_id, classes.code, number_of_students and the maximum_students

Write a query to show only the classes that have no students signed up. - Include the classes.class_id, classes.code, number_of_students and the maximum_students - Do not use a subquery - Do not hardcode a specific class (i.e. WHERE classes.code = 'MA030') This query should work for new classes that get added. CREATE TABLE Classes( class_Id INT AUTO_INCREMENT, name VARCHAR(50) NOT NULL, description VARCHAR(200), code VARCHAR(10) UNIQUE, maximum_students INT DEFAULT 10, PRIMARY KEY(class_1d) ); CREATE TABLE students( student_Id INT AUTO_INCREMENT, firstname VARCHAR(30) NOT NULL, lastname VARCHAR(50) NOT NULL, birthdate DATE, PRIMARY KEY(student_id) ); CREATE TABLE registered_students ( id INT AUTO_INCREMENT, class_id INT NOT NULL, student_Id INT NOT NULL, PRIMARY KEY(id)

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!