You are on page 1of 1

Select *FROM subjects where sub_name like $_search$% ESCAPE $ ;

Select sub_no,sub_name,avg(mark) from exams group by sub_no having sub_no=(select sub_no from subjects where pass=60);

Select distinct a.dept_no from lectures a where a.dept_no in (select dept_no from lectures b where b.surname<>a.surname);

Select distinct a.student_no ,b.surname from exams a ,students b Where exists (select *from exams c where c.student_no=a.student_no And c.student_no=b.student_no And c.sub_no<>a.sub_no);

You might also like