I'm having these schema STUDENT (Sid, Name, City, Adm_date, Paper1, Paper2)
And I want to find the maximum number of students were admitted in which date and the city where maximum number of students lives.
I'm using these queries in ORACLE 11g Express Edition: For City:
SELECT COUNT(Sid) AS No_of_students, City
FROM STUDENT
GROUP BY City
ORDER BY No_of_students DESC
LIMIT 1;
And For Date:
SELECT COUNT(Sid) AS No_of_students, Adm_date
FROM STUDENT
GROUP BY Adm_date
ORDER BY No_of_students DESC
LIMIT 1;
But here I'm getting error for both these tables: ORA-00933: SQL command not properly ended