Consider the following relations concerning a driving
school. The primary key of each relation is in
S_Name – student name, Th-Mark – Theory mark, Dr_Mark –
Dr_T_Name – driving teachers name
Th_T_Name – theory teachers name
A student takes one theory class as well as driving
lessons and at the end of the session receives marks
for theory and driving. A teacher may teach theory,
driving or both. Write the following queries in SQL.
a)Find the list of teachers who teach theory and give
driving lessons on all the vehicles.
b)Find the pairs of students satisfying the following
They have the same theory mark and
They have different theory teachers and
They have the same driving mark and
They have different driving teachers.
c)Find the list of students who are taught neither
theory nor driving lessons by Rakesh (teacher).
d)Find the list of students who have better marks
than Aman in both theory and driving.
e)Find the list of students who have who have more
marks than average theory mark of class 8.
f)Find the list of teachers who can drive all the