vendredi 13 mars 2015

Get the courses a student doesn't attend - SQL using SQLite

Hi i'm new to SQL and wood like to get some help on this query I need. Lets say i have 3 tables: "Students", "Courses", "Attendance":



"Students" has these columns:
s_ID (primary key), name

"Courses" has these columns:
c_ID (primary key), courseName

"Attendance" has these columns:
s_ID (foreign key), c_ID ()


I'm working with SQLite A student can attend a number of courses. What i want is a query that will retrieve the id s of all of the courses in which a student with a given id does not attend.


Thanks for any help :D


Aucun commentaire:

Enregistrer un commentaire