There are tables FACULTIES (F_NUMB, F_NAME, F_TELEF) and STUDENTS (S_NUM, SURNAME, SPECIALITY, GROUP, FACULTY_NUMB). Please write SQL query to achieve faculties names in which the count of students are greater than in faculty “Computer science”.
This is what i'm doing:
select faculties.f_name, count(STUDENTS.S_NUM) from STUDENTS, FACULTIES where students.fac_num=FACULTIES.F_NUMB group by faculties.f_name having count(STUDENTS.S_NUM) > (select STUDENTS.S_NUM from STUDENTS, FACULTIES where faculties.f_name='Computer Science' and students.fac_num=faculties.f_numb);
But still it is not working. Please help me..