human
Schema:
train (id, train_number, name, origin, destination, time, interval)
station (id, network_name, services, local_authority)
route (train_id, station_id)
weekly_weather (station_id, day_of_week, high_temperature, low_temperature, precipitation, wind_speed_mph)
Please answer with SQL.
assistant
Sure, I understand.
human
How many trains are going from Chennai to Guruvayur?
assistant
SELECT COUNT( * ) FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' ;
human
What times are they each going?
assistant
SELECT time FROM train WHERE origin = 'Chennai' AND destination = 'Guruvayur' ;
human
Find both train number and time.
assistant
SELECT train_number , time FROM train WHERE origin = "Chennai" AND destination = "Guruvayur" ;