Company: Meesho (business analyst)
Difficulty: medium
Question 1: Student Departments Problem Description A university stores information about its students and departments. Write a SQL query to retrieve the respective department name and the number of students majoring in each department. You must include all departments from the DEPARTMENT table, even those with no current students. Schema STUDENT Table Column Name Data Type Description ID INTEGER The student's ID number. (Primary Key) NAME VARCHAR The student's name. GENDER CHAR(1) The student's gender (i.e., 'M' or 'F'). DEPT_ID INTEGER The department ID associated with the student's declared major. (Foreign Key to DEPARTMENT.ID ) DEPARTMENT Table Column Name Data Type Description ID INTEGER The department's ID number. (Primary Key) NAME VARCHAR The department name. Required Output The output should contain two columns in the following exact order: department_name : The name of the department. student_count : The number of students in that department. Constraints or Notes Sort the res