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 origin in the train table
assistant
SELECT COUNT( distinct origin ) FROM train;
human
what highest time in the train table
assistant
SELECT time FROM train ORDER by time desc LIMIT 1;
human
how many train number in the train table
assistant
SELECT COUNT( train_number ) FROM train;
human
how many interval in the trail table
assistant
SELECT COUNT( interval ) FROM train ;