Using the solution to Activity 1.5, found in the previous section, develop a command file to create the student table and insert records into that table. Use SQL to display the entered rows.
Produce the following reports:
Report 1: a list of students (i.e. student numbers and their full names) who have a student number in the range 'L0002000' and 'L0004000'
Report 2: a list of all students (i.e. student numbers and attendance dates) who attended college between 3 and 4 May 2004 - sort the results by student number within attendance date
SELECT student_number, title, forename, surname
WHERE student_number BETWEEN 'L0002000' AND 'L0004000';
SELECT student_number, attendance_date
WHERE attended = 'P'
AND attendance_date BETWEEN '03-MAY-2004' AND '04-MAY-2004'
ORDER BY attendance_date, student_number;
Next: Activity 2.3B
(c) SQA 2009