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
What's the high temperature of each station?
assistant
SELECT t1.high_temperature FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id ;
human
What's the id of the station with highest average high temperature?
assistant
SELECT t2.id FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id = t2.id GROUP BY t1.station_id ORDER BY AVG ( high_temperature ) DESC LIMIT 1 ;