Question: Write a SQL query to find the number of students in each major when we have the following tables: CREATE TABLE students ( id
Write a SQL query to find the number of students in each major when we have the following tables: CREATE TABLE students ( id" int (11) NOT NULL AUTO_INCREMENT, `name` varchar (255) NOT NULL DEFAULT major_id int (11) NOT NULL DEFAULT PRIMARY KEY (`id`), KEY "major` (`major_id`). ) CREATE TABLE majors ( id int (11) NOT NULL AUTO_INCREMENT, `title varchar (255) NOT NULL DEFAULT PRIMARY KEY (`id`) )
Step by Step Solution
There are 3 Steps involved in it
Certainly Heres the SQL query to find the number of student... View full answer
Get step-by-step solutions from verified subject matter experts
