i have created a database and populated it with information but i have to run queries on it without using a query builder and am quite rusty on SQL.
Below are the tables for the database!
Staff : Man no, SName,LName, Address, Tel Mobile.
Students: Driver No, Group, Exp Date, SName, LName, DOB, Adress, Post code, Tel Home, Tel Mobile, Tel Work
Instructor: Instructor ID, Man no~
Examiners: Examiner ID, Man no~
Lessons: Lesson ID, Student ID~, Instructor ID~, date, Amount Due, Date Canceled
Tests: Test ID, Examiner ID~, Test Type ID~, date
Test Type: Test TypeID, Description
Student Attendance:Stu Att Test ID, Test ID~, Student ID~
Student Payments: Stu Les PayID, Payment Amount, Payment Date, Lesson ID~,
The queries that i need to run on this data are
1.produce the total number of tests and lesson sessions for a particular month e.g January
2.find the id and full name of the instructor with the most bookings. note: there can be more than 1 instructor
3.produce a list of all staff who are both instructors and examiners
4. for a given student id, and for all lession sessions that were not taken by the student, list the allocated staff, reason why it wasnt taken and the method of payment. the student id hould be passed as the parameter at run time.
Any Thoughts on this????????????????????