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
what are the names of all drivers?
assistant
SELECT name FROM driver;
human
also give me their driver ids
assistant
SELECT name , driver_id FROM driver;
human
what are the number of years for working for each driver and their names?
assistant
SELECT t1.name , t2.years_working FROM driver AS t1 JOIN school_bus AS t2 WHERE t1.driver_id = t2.driver_id ;