1sf/bird-sql-train-with-schema huggingface dataset:
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: On 11/3/2013, which stations are often empty? Indicate the names of the stations.
Evidence: time = '11/3/2013'; which stations are empty refers to bikes_available = '0';
SQL: SELECT DISTINCT T1.name FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.bikes_available = 0 AND T2.time LIKE '2013/11/03%'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: What is the average duration of bike trips in the city of Palo Alto?
Evidence: DIVIDE(SUM(duration where city = 'Palo Alto'), COUNT(start_station_id));
SQL: SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Palo Alto'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: What is the route that has the longest duration? Indicate the city of where the stations are located.
Evidence: route implies a course taken in getting from start_station_name to end_station_name; the longest duration refers to MAX(duration);
SQL: SELECT T1.start_station_name, T1.end_station_name, T2.city FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration = ( SELECT MAX(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name )
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: List the name of stations that were installed from 8/5/2013 to 12/31/2013. Indicate their installation date and city name.
Evidence: from 8/5/2013 to 12/31/2013 refers to installation_date between '8/5/2013' and '12/31/2013';
SQL: SELECT name, installation_date, city FROM station WHERE (SUBSTR(CAST(installation_date AS TEXT), 1, INSTR(installation_date, '/') - 1) = '5' AND SUBSTR(CAST(installation_date AS TEXT), INSTR(installation_date, '/') + 1, -6) >= '8' AND SUBSTR(CAST(installation_date AS TEXT), -4) = '2013') OR (SUBSTR(CAST(installation_date AS TEXT), 1, INSTR(installation_date, '/') - 1) IN ( '6', '7', '8', '9', '10', '11', '12' ) AND SUBSTR(CAST(installation_date AS TEXT), -4) = '2013')
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: What is the average duration of trips which are started at Adobe on Almaden station to Ryland Park?
Evidence: trips refer to id; DIVIDE(SUM(duration where start_station_name = 'Adobe on Almaden', end_station_name = 'Ryland Park'), COUNT(id));
SQL: SELECT AVG(duration) FROM trip WHERE start_station_name = 'Adobe on Almaden' AND end_station_name = 'Ryland Park'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: Write down the times when there is no available bike to borrow in a station. List down the stations name and location coordinate.
Evidence: no available bike to borrow refers to bikes_available = 0; latitude and longitude coordinates can be used to indicate a location;
SQL: SELECT T2.time, T1.name, T1.lat, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.bikes_available = 0
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: List down the trips in which their start and end station are similar. Give me their trip IDs and location coordinates.
Evidence: start and end station are similar refers to start_station_name = end_station_name; latitude and longitude coordinates can be used to indicate a location;
SQL: SELECT T1.id, T2.lat, T2.long FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_station_name = T1.end_station_name
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: On 8/29/2013 at 6:14:01 PM, how many bikes were borrowed from San Jose Diridon Caltrain Station?
Evidence: How many bikes borrowed can be computed as SUBTRACT(SUM(dock_count), bikes_available where name = 'San Jose Diridon Caltrain Station' and time = '2013/08/29 06:14:01');
SQL: SELECT SUM(T1.dock_count - T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.time = '2013/08/29 06:14:01'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: List down the trip IDs when bike no. 10 was used by subscribers and the weather's mean temperature is no less than 62 degress Fahrenheit.
Evidence: bike no. 10 refers to bike_id = '10'; subscription_type = 'Subscriber'; the weather's mean temperature is no less than 62 degress Fahrenheit refers to mean_temperature_f>62;
SQL: SELECT T1.id FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.bike_id = 10 AND T2.mean_temperature_f > 62 AND T1.subscription_type = 'Subscriber'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: What were the max gust speed and cloud clover when the customer using bike no. 10 recorded the 386 seconds duration of the trip from MLK Library to San Salvador at 1st?
Evidence: subscription_type = 'Customer'; duration = '364'; bike no. 10 refers to bike_id = 10; start_station_name = 'San Jose Civic Center'; end_station_name = 'San Jose City Hall';
SQL: SELECT T2.max_gust_speed_mph, T2.cloud_cover FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T1.bike_id = 10 AND T2.mean_temperature_f > 62 AND T1.subscription_type = 'Customer' AND T1.start_station_name = 'MLK Library' AND T1.end_station_name = 'San Salvador at 1st' AND T1.duration = 386
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: Among the subscriber, how many of them finished the 2nd at Folsom and Civic Center BART (7th at Market) as their start and end stations respectively for no more than 490 seconds under minimum visibility of 4 miles.
Evidence: subscription_type = 'Subscriber'; no more than 490 seconds refers to duration<490; start_station_name = '2nd at Folsom'; end_station_name = 'Civic Center BART (7th at Market)'; min_visibility_miles = 4;
SQL: SELECT COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.subscription_type = 'Subscriber' AND T2.min_visibility_miles = 4 AND T1.duration < 490 AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = 'Civic Center BART (7th at Market)'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: How many docks were available at the starting station of trip ID 912900?
SQL: SELECT SUM(T2.docks_available) FROM trip AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.start_station_id WHERE T1.zip_code = 912900
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: Please write down the trip IDs which ended on the days when the minimum temperature is less than 45 degrees Fahrenheit.
Evidence: the minimum temperature is less than 45 degrees Fahrenheit refers to min_temperature_f<45;
SQL: SELECT T1.id FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.min_temperature_f < 45
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: In 2014, what is the shortest duration of trips by subscribers which started at 2nd at Folsom and ended in the 5th at Howard stations, and by how much shorter than the average? Give me the minimum temperature, maximum gust speed and weather event on that trip.
Evidence: the shortest duration refers to MIN(duration); subscription_type = 'Subscriber', start_station_name = '2nd at Folsom', end_station_name = '5th at Howard'; in 2014 refers to time period between start_date = '1/1/2014 0:00' and end_date = '12/31/2014 11:59; Average duration = DIVIDE(SUM(duration), COUNT(id));
SQL: SELECT MIN(T1.duration) , MIN(T1.duration) - AVG(T1.duration), T2.min_temperature_f FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.start_date = '1/1/2014 0:00' AND T1.end_date = '12/31/2014 11:59' AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = '5th at Howard' AND T1.subscription_type = 'Subscriber'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: Find the average ride time of the bikes that started at Steuart at Market station and ended at Embarcadero at Sansome station in July 2014.
Evidence: started at refers to start_station_name; start_station_name = 'Steuart at Market'; ended at refers to end_station_name; end_station_name = 'Embarcadero at Sansome'; rides in July 2004 refers to start_date = '7/1/2014 0:00'AND end_date = '7/31/2014 12:59';average ride time = DIVIDE(SUM(duration), COUNT(id))
SQL: SELECT AVG(duration) FROM trip WHERE start_date = '7/1/2014%' AND end_date = '7/31/2014%' AND start_station_name = 'Steuart at Market' AND end_station_name = 'Embarcadero at Sansome'
Database: bike_share_1
Tables: station, status, trip, weather
Columns (table index, column name): -1, *, 0, id, 0, name, 0, lat, 0, long, 0, dock_count, 0, city, 0, installation_date, 1, station_id, 1, bikes_available, 1, docks_available, 1, time, 2, id, 2, duration, 2, start_date, 2, start_station_name, 2, start_station_id, 2, end_date, 2, end_station_name, 2, end_station_id, 2, bike_id, 2, subscription_type, 2, zip_code, 3, date, 3, max_temperature_f, 3, mean_temperature_f, 3, min_temperature_f, 3, max_dew_point_f, 3, mean_dew_point_f, 3, min_dew_point_f, 3, max_humidity, 3, mean_humidity, 3, min_humidity, 3, max_sea_level_pressure_inches, 3, mean_sea_level_pressure_inches, 3, min_sea_level_pressure_inches, 3, max_visibility_miles, 3, mean_visibility_miles, 3, min_visibility_miles, 3, max_wind_Speed_mph, 3, mean_wind_speed_mph, 3, max_gust_speed_mph, 3, precipitation_inches, 3, cloud_cover, 3, events, 3, wind_dir_degrees, 3, zip_code
Question: What are the average maximum and minimum temperatures in May 2015 when the mean humidity is between 65 and 75?
Evidence: average maximum temperature = DIVIDE(SUM(max_temperature_f), COUNT(date)); average minimum temperature = DIVIDE(SUM(min_temperature_f), COUNT(date)); May 2015 refers to date BETWEEN '5/1/2015'AND '5/31/2015';
SQL: SELECT AVG(max_temperature_f), AVG(min_temperature_f) FROM weather WHERE date LIKE '5/%/2015' AND mean_humidity BETWEEN 65 AND 75