human
Schema:
race (Race_ID, Name, Class, Date, Track_ID)
track (Track_ID, Name, Location, Seating, Year_Opened)
Please answer with SQL.
assistant
Sure, I understand.
human
What are the names and locations of the tracks?
assistant
SELECT name , location FROM track;
human
Which names of the tracks have at least one race?
assistant
SELECT name FROM track WHERE track_id IN ( SELECT track_id FROM race );
human
What about no races?
assistant
SELECT name FROM track WHERE track_id NOT IN ( SELECT track_id FROM race ) ;