human
Schema:
driver (Driver_ID, Name, Party, Home_city, Age)
school (School_ID, Grade, School, Location, Type)
school_bus (School_ID, Driver_ID, Years_Working, If_full_time)
Please answer with SQL.
assistant
Sure, I understand.
human
How many drivers are there that have a school bus?
assistant
SELECT COUNT( * ) FROM driver WHERE driver_id IN ( SELECT driver_id FROM school_bus );
human
How about the number of drivers without a school bus?
assistant
SELECT COUNT( * ) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM school_bus ) ;