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 top 3 number of years spent working on a school bus?
assistant
SELECT years_working FROM school_bus ORDER BY years_working DESC LIMIT 3;
human
What is the maximum years spent working on a school bus?
assistant
SELECT MAX( years_working ) FROM school_bus;
human
Please also show the minimum and average years.
assistant
SELECT MAX( years_working ) , MIN( years_working ) , AVG ( years_working ) FROM school_bus ;