For each station, return its longitude and the average duration of trips that started from the station.
CREATE TABLE station (name VARCHAR, long VARCHAR, id VARCHAR); CREATE TABLE trip (duration INTEGER, start_station_id VARCHAR)
SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id
<s>[INST] Write mssql query to answer the following question given the database schema. Schema: CREATE TABLE station (name VARCHAR, long VARCHAR, id VARCHAR); CREATE TABLE trip (duration INTEGER, start_station_id VARCHAR) Question: For each station, return its longitude and the average duration of trips that started from the station. [/INST] SELECT T1.name, T1.long, AVG(T2.duration) FROM station AS T1 JOIN trip AS T2 ON T1.id = T2.start_station_id GROUP BY T2.start_station_id </s>