db_id
stringlengths
4
31
SQL
stringlengths
18
1.45k
input_sequence
stringlengths
148
11k
question
stringlengths
16
325
bike_share_1
select count(t2.start_date) from station as t1 inner join trip as t2 on t2.start_station_name = t1.name where t2.start_date like '8/%/2013%' and t1.city = 'redwood city'
Question: among the trips in august 2013, how many bikes were borrowed from redwood city. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_sta...
among the trips in august 2013, how many bikes were borrowed from redwood city.
bike_share_1
select t1.start_station_name, t1.end_station_name, t2.mean_temperature_f from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t1.duration < 300
Question: for all trips which took less 5 minutes, state the station name where the bike were borrowed and returned. indicate mean temperature of the day. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, st...
for all trips which took less 5 minutes, state the station name where the bike were borrowed and returned. indicate mean temperature of the day.
bike_share_1
select t2.date, avg(t2.min_temperature_f) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code group by t2.date order by count(t1.start_date) desc limit 1
Question: among all the trips, which day had the most bikes borrowed? what was the average coldest temperature on that day? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, s...
among all the trips, which day had the most bikes borrowed? what was the average coldest temperature on that day?
bike_share_1
select avg(t1.duration), avg(t2.wind_dir_degrees) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where substr(cast(t2.date as text), 1, instr(t2.date, '/') - 1) in ('7', '8', '9') and substr(cast(t2.date as text), -4) = '2013'
Question: calculate the average usage of each bike in the third quarter of year 2013. find the average wind direction within the same period. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, sta...
calculate the average usage of each bike in the third quarter of year 2013. find the average wind direction within the same period.
bike_share_1
select sum(case when city = 'san jose' and substr(installation_date, -4) = '2014' then 1 else 0 end) from station union select name from station where city = 'san jose' and substr(installation_date, -4) = '2014'
Question: how many bike stations were installed in san jose in 2014? indicate the names of the stations. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, en...
how many bike stations were installed in san jose in 2014? indicate the names of the stations.
bike_share_1
select max(duration) from trip where start_date like '8/29/2013%' and end_date like '8/29/2013%'
Question: what is the longest trip duration that started and ended august 29, 2013? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_n...
what is the longest trip duration that started and ended august 29, 2013?
bike_share_1
select cast(duration as real) / 60 from trip where bike_id = 426 and end_station_name = '2nd at south park' and start_station_name = 'market at 4th' and start_date like '8/29/2013%' and end_date like '8/29/2013%'
Question: how long did it take for bike id 426 to reach 2nd at south park from market at 4th on 8/29/2013? indicate the duration in minutes. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, star...
how long did it take for bike id 426 to reach 2nd at south park from market at 4th on 8/29/2013? indicate the duration in minutes.
bike_share_1
select bike_id from trip where start_date like '8/29/2013%' and end_date like '8/29/2013%' and end_station_name = 'california ave caltrain station' and start_station_name = 'university and emerson' and duration = ( select max(duration) from trip where start_date like '8/29/2013%' and end_date like '8/29/2013%' and end_...
Question: on 8/29/2013, who took the longest to arrive in california ave caltrain station from university and emerson? indicate the bike id. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, star...
on 8/29/2013, who took the longest to arrive in california ave caltrain station from university and emerson? indicate the bike id.
bike_share_1
select sum(case when city = 'san francisco' and dock_count > 20 then 1 else 0 end) from station
Question: how many stations in san francico can hold more than 20 bikes? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_st...
how many stations in san francico can hold more than 20 bikes?
bike_share_1
select max_temperature_f, date from weather where max_temperature_f = ( select max(max_temperature_f) from weather where max_temperature_f is not null and max_temperature_f is not '' )
Question: when was the hottest temperature recorded? if there are multiple dates with the hottest temperature, indicate all of the dates. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_s...
when was the hottest temperature recorded? if there are multiple dates with the hottest temperature, indicate all of the dates.
bike_share_1
select distinct case when date = '7/15/2014' and zip_code = 94301 then max_dew_point_f end from weather
Question: what is the maximum dew point in fahrenheit degree on 7/15/2014 in the area with a zip code of 94301? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station...
what is the maximum dew point in fahrenheit degree on 7/15/2014 in the area with a zip code of 94301?
bike_share_1
select substr(cast(date as text), -4) from weather group by substr(cast(date as text), -4) order by sum(case when events like '%rain%' or events like '%rain%' then 1 else 0 end) desc limit 1
Question: which year experienced the most rain? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike_id, subscr...
which year experienced the most rain?
bike_share_1
select min(t2.duration), t2.bike_id from station as t1 inner join trip as t2 on t2.start_station_name = t1.name where t2.start_date like '10/20/2014%' and t1.lat = 37.789625 and t1.long = -122.400811
Question: on 10/20/2014, what is the duration of the fastest trip which started from the station with latitude and longitudes of 37.789625 and -122.400811, respectively? indicate the bike id. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_avai...
on 10/20/2014, what is the duration of the fastest trip which started from the station with latitude and longitudes of 37.789625 and -122.400811, respectively? indicate the bike id.
bike_share_1
select min(t2.duration), t2.end_station_name, count(t2.start_station_name) from station as t1 inner join trip as t2 on t2.start_station_name = t1.name where t2.start_date like '12/1/2013%' and t2.start_station_name = 'south van ness at market' and t2.subscription_type = 'subscriber'
Question: among the subscribers who rented a bike from south van ness at market on 12/1/2013, whose duration was the shortest and to which station was the bike returned to? indicate south van ness's dock count. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_av...
among the subscribers who rented a bike from south van ness at market on 12/1/2013, whose duration was the shortest and to which station was the bike returned to? indicate south van ness's dock count.
bike_share_1
select t2.max_humidity from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t1.start_date like '8/29/2013%' and t1.bike_id = 496 and t1.start_station_name = 'powell street bart'
Question: what is the maximum humidity in powell street bart when bike 496 was borrowed from the station on 8/29/2013? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_...
what is the maximum humidity in powell street bart when bike 496 was borrowed from the station on 8/29/2013?
bike_share_1
select t2.date, count(t1.start_station_name) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '11/%/2014%' and t2.zip_code = 94301 and t2.events = 'fog' and t1.subscription_type = 'subscriber'
Question: which day in the month of november, 2014 have a foggy weather in the zip code 94301 and in total, how many bikes were borrowed by subscribers from all of the stations in the said day? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_av...
which day in the month of november, 2014 have a foggy weather in the zip code 94301 and in total, how many bikes were borrowed by subscribers from all of the stations in the said day?
bike_share_1
select t1.start_station_name, t2.installation_date from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.subscription_type = 'customer' group by t1.start_station_name order by count(t1.subscription_type) limit 1
Question: what is the name of the station that is less used by customers who borrow bikes from? indicate when was the station installed. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_st...
what is the name of the station that is less used by customers who borrow bikes from? indicate when was the station installed.
bike_share_1
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%'
Question: on 11/3/2013, which stations are often empty? indicate the names of the stations. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_s...
on 11/3/2013, which stations are often empty? indicate the names of the stations.
bike_share_1
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'
Question: what is the average duration of bike trips in the city of palo alto? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, ...
what is the average duration of bike trips in the city of palo alto?
bike_share_1
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 )
Question: what is the route that has the longest duration? indicate the city of where the stations are located. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station...
what is the route that has the longest duration? indicate the city of where the stations are located.
bike_share_1
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_da...
Question: list the name of stations that were installed from 8/5/2013 to 12/31/2013. indicate their installation date and city name. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_statio...
list the name of stations that were installed from 8/5/2013 to 12/31/2013. indicate their installation date and city name.
bike_share_1
select avg(duration) from trip where start_station_name = 'adobe on almaden' and end_station_name = 'ryland park'
Question: what is the average duration of trips which are started at adobe on almaden station to ryland park? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_i...
what is the average duration of trips which are started at adobe on almaden station to ryland park?
bike_share_1
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
Question: write down the times when there is no available bike to borrow in a station. list down the stations name and location coordinate. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start...
write down the times when there is no available bike to borrow in a station. list down the stations name and location coordinate.
bike_share_1
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
Question: list down the trips in which their start and end station are similar. give me their trip ids and location coordinates. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_na...
list down the trips in which their start and end station are similar. give me their trip ids and location coordinates.
bike_share_1
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'
Question: on 8/29/2013 at 6:14:01 pm, how many bikes were borrowed from san jose diridon caltrain station? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, ...
on 8/29/2013 at 6:14:01 pm, how many bikes were borrowed from san jose diridon caltrain station?
bike_share_1
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'
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. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_dat...
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.
bike_share_1
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 = 'm...
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? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. ...
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?
bike_share_1
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)'
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. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> statio...
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.
bike_share_1
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
Question: how many docks were available at the starting station of trip id 912900? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_na...
how many docks were available at the starting station of trip id 912900?
bike_share_1
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
Question: please write down the trip ids which ended on the days when the minimum temperature is less than 45 degrees fahrenheit. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_n...
please write down the trip ids which ended on the days when the minimum temperature is less than 45 degrees fahrenheit.
bike_share_1
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 t...
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. | Tables: station -> id, name, lat, long, dock_co...
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.
bike_share_1
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'
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. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_d...
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.
bike_share_1
select avg(max_temperature_f), avg(min_temperature_f) from weather where date like '5/%/2015' and mean_humidity between 65 and 75
Question: what are the average maximum and minimum temperatures in may 2015 when the mean humidity is between 65 and 75? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, star...
what are the average maximum and minimum temperatures in may 2015 when the mean humidity is between 65 and 75?
bike_share_1
select sum(iif(subscription_type = 'subscriber', 1, 0)) - sum(iif(subscription_type = 'customer', 1, 0)) from trip where start_date like '6/%/2013%'
Question: calculate the difference between the number of customers and the number of subscribers who did the trip in june 2013. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_nam...
calculate the difference between the number of customers and the number of subscribers who did the trip in june 2013.
bike_share_1
select t2.date, t1.bike_id from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where substr(cast(t2.date as text), -4) = '2013' and t2.events = 'fog-rain'
Question: list the days in 2013 when rain and fog occurred together and find the id of bikes borrowed on these days. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_st...
list the days in 2013 when rain and fog occurred together and find the id of bikes borrowed on these days.
bike_share_1
select t3.mean_visibility_miles, t3.mean_wind_speed_mph, t3.events, t1.lat, t1.long , t2.start_station_name, t2.end_station_name from station as t1 inner join trip as t2 on t2.start_station_name = t1.name inner join weather as t3 on t3.zip_code = t2.zip_code where t3.events = 'fog' order by t2.duration desc limit 1
Question: find the longest ride on foggy day. what were the mean visibility, mean wind speed, and weather event during that ride? also, list the coordinates and names of the start and end stations. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, dock...
find the longest ride on foggy day. what were the mean visibility, mean wind speed, and weather event during that ride? also, list the coordinates and names of the start and end stations.
bike_share_1
select t1.start_date 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 t2.date like '8/%/2013' and t1.start_station_name = 'market at 10th' and t1.end_station_name = 'south van ness at market' and t2.min_temper...
Question: for the rides that started at market at 10th station and ended at south van ness at market station in august of 2013, which day had the coldest temperature? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, ...
for the rides that started at market at 10th station and ended at south van ness at market station in august of 2013, which day had the coldest temperature?
bike_share_1
select t1.start_station_name, t1.end_station_name, t1.duration from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.events = 'rain' or t2.events = 'rain' order by t1.duration desc limit 1
Question: among the rides during the rainy days, which ride was the longest? list the start station, end station, and duration of this ride. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, star...
among the rides during the rainy days, which ride was the longest? list the start station, end station, and duration of this ride.
bike_share_1
select avg(t1.duration) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where (t2.events = 'rain' and t2.precipitation_inches > 0.8) or (t2.events = 'rain' and t2.precipitation_inches > 0.8)
Question: find the average ride duration during the rain of more than 0.8 inches. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_nam...
find the average ride duration during the rain of more than 0.8 inches.
bike_share_1
select distinct t1.start_station_name, t2.city from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.duration > ( select avg(t1.duration) from trip as t1 left join station as t2 on t2.name = t1.start_station_name )
Question: list the name and city of starting stations which has an above-average duration trips. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, ...
list the name and city of starting stations which has an above-average duration trips.
bike_share_1
select sum(case when city = 'san francisco' and substr(installation_date, -4) = '2014' then 1 else 0 end) from station
Question: how many stations in san francisco are installed in 2014? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station...
how many stations in san francisco are installed in 2014?
bike_share_1
select count(t2.city) from trip as t1 inner join station as t2 on t2.name = t1.end_station_name where t2.city = 'mountain view' and t1.start_date like '%2006%'
Question: in 2006, how many trips ended at stations in mountain view? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_stati...
in 2006, how many trips ended at stations in mountain view?
bike_share_1
select t1.id from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.city = 'redwood city' and t1.duration = ( select max(t1.duration) from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.city = 'redwood city' )
Question: which trip id had the longest duration and the start station is in redwood city? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_st...
which trip id had the longest duration and the start station is in redwood city?
bike_share_1
select distinct t1.bike_id from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t2.installation_date like '%2013'
Question: please list bikes id were used in trips which start station were installed in 2013. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end...
please list bikes id were used in trips which start station were installed in 2013.
bike_share_1
select count(t1.subscription_type) from trip as t1 inner join station as t2 on t2.name = t1.end_station_name where t1.subscription_type = 'subscriber' and t2.city = 'san jose'
Question: how many trips which subscription types were subscriber and ended in san jose city? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end...
how many trips which subscription types were subscriber and ended in san jose city?
bike_share_1
select t1.id from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t2.dock_count = 15 and t1.duration = ( select min(t1.duration) from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.dock_count = 15 )
Question: which trip had the shortest duration and started at the station that can hold 15 bikes? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date,...
which trip had the shortest duration and started at the station that can hold 15 bikes?
bike_share_1
select substr(cast(t1.start_date as text), instr(t1.start_date, ' '), -4) from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t2.city = 'san francisco' group by t1.start_station_name order by count(t1.id) desc limit 1
Question: which year had the most number of trips that started at stations in san francisco? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_...
which year had the most number of trips that started at stations in san francisco?
bike_share_1
select cast(sum(case when t1.duration > 800 then 1 else 0 end) as real) * 100 / count(t1.id) from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t2.city = 'san jose'
Question: what is the percentage of trips that started in san jose and durations were longer than 800 seconds? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_...
what is the percentage of trips that started in san jose and durations were longer than 800 seconds?
bike_share_1
select count(duration) from trip where start_date like '%/%/2013%' and duration > 1000
Question: how many trips in 2013 had durations longer than 1000 seconds? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_st...
how many trips in 2013 had durations longer than 1000 seconds?
bike_share_1
select avg(duration) from trip where start_date like '%2015%' and start_station_name = 'south van ness at market'
Question: please calculate the average duration of trips started at south van ness at market in 2015. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_d...
please calculate the average duration of trips started at south van ness at market in 2015.
bike_share_1
select sum(iif(start_station_id = end_station_id, 1, 0)) from trip
Question: how many trips which start station and end station are the same? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_...
how many trips which start station and end station are the same?
bike_share_1
select t1.id from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code order by t2.max_temperature_f desc limit 1
Question: please list trips id started on the hottest day. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bike...
please list trips id started on the hottest day.
bike_share_1
select t1.id from trip as t1 inner join weather as t2 where t2.events = 'rain' and t1.start_station_name = 'mountain view city hall'
Question: which were the trips that started at mountain view city hall and ended on a rainy day? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, ...
which were the trips that started at mountain view city hall and ended on a rainy day?
bike_share_1
select avg(t1.duration) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.events = 'fog'
Question: what is the average duration of trips that ended on a foggy day? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_...
what is the average duration of trips that ended on a foggy day?
bike_share_1
select t1.duration from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.max_wind_speed_mph = 30 order by t1.duration desc limit 1
Question: what was duration of the longest trip started on the day that has a maximum wind speed of 30 mph? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id,...
what was duration of the longest trip started on the day that has a maximum wind speed of 30 mph?
bike_share_1
select avg(t2.mean_temperature_f) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where substr(cast(t2.date as text), -4) = '2013' and t1.start_station_name = 'market at 4th'
Question: please calculate the average temperature of those trips that started at market at 4th in 2013. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, en...
please calculate the average temperature of those trips that started at market at 4th in 2013.
bike_share_1
select t2.mean_humidity from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t1.id = 4275
Question: what was the mean humidity of a trip with id 4275? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, bi...
what was the mean humidity of a trip with id 4275?
bike_share_1
select cast(sum(case when t2.events = 'rain' then 1 else 0 end) as real) * 100 / count(t1.id) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where substr(cast(t2.date as text), -4) = '2015' and t1.subscription_type = 'customer'
Question: in 2015, what percentage of trips that had the subscription type was customer and ended on a rainy day? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_stati...
in 2015, what percentage of trips that had the subscription type was customer and ended on a rainy day?
bike_share_1
select count(installation_date) from station where city = 'san jose' and (substr(cast(installation_date as text), 1, instr(installation_date, '/') - 1) in ('8', '9', '10', '11', '12') and substr(cast(installation_date as text), -4) = '2013') or substr(cast(installation_date as text), -4) > '2013'
Question: how many bike stations are installed after august, 2013 in san jose? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, ...
how many bike stations are installed after august, 2013 in san jose?
bike_share_1
select sum(iif(zip_code = 94107 and date = '8/29/2013', mean_temperature_f, 0)) from weather
Question: what is the mean temperature in fahrenheit on 8/29/2013 for the area where the zip code is 94107? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id,...
what is the mean temperature in fahrenheit on 8/29/2013 for the area where the zip code is 94107?
bike_share_1
select sum(iif(zip_code = 94107 and date = '8/29/2013', max_temperature_f - min_temperature_f, 0)) from weather
Question: what is the difference between the hottest temperature and the coldest temperature in in fahrenheit on 8/29/2013 for the area where the zip code is 94107? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, du...
what is the difference between the hottest temperature and the coldest temperature in in fahrenheit on 8/29/2013 for the area where the zip code is 94107?
bike_share_1
select 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 12:06:01'
Question: how many bikes can be borrowed in san jose diridon caltrain station at 12:06:01 on 2013/8/29? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end...
how many bikes can be borrowed in san jose diridon caltrain station at 12:06:01 on 2013/8/29?
bike_share_1
select t2.city from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.id = 4069
Question: in which city's station is a bike borrowed on trip id4069? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_statio...
in which city's station is a bike borrowed on trip id4069?
bike_share_1
select count(t1.id) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '9/%/2013' and t2.zip_code = 94107 and t2.max_temperature_f > 70
Question: how many bike trips started on the days in september, 2013 with the hottest temperature over 70 degrees fahrenheit in the area where the zip code is 94107? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, d...
how many bike trips started on the days in september, 2013 with the hottest temperature over 70 degrees fahrenheit in the area where the zip code is 94107?
bike_share_1
select distinct t1.start_station_name from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where substr(cast(t2.date as text), -4) = '2013' and t2.zip_code = 94107 and t2.max_temperature_f > 80
Question: please list the starting stations of the bike trips made on a day with a max humidity over 80 in 2013 in the area where the zip code is 94107. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, star...
please list the starting stations of the bike trips made on a day with a max humidity over 80 in 2013 in the area where the zip code is 94107.
bike_share_1
select count(t2.id) from station as t1 inner join trip as t2 on t1.id = t2.start_station_id where t2.subscription_type = 'subscriber' and t2.start_date like '8/%/2013%' and t1.dock_count > 20
Question: how many trips made by a subscriber started in august, 2013 from a station that can hold more than 20 bikes? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_...
how many trips made by a subscriber started in august, 2013 from a station that can hold more than 20 bikes?
bike_share_1
select t2.lat, t2.long from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.duration = ( select max(t1.duration) from trip as t1 inner join station as t2 on t2.name = t1.start_station_name )
Question: what is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station...
what is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed?
bike_share_1
select sum(t2.docks_available) from trip as t1 inner join status as t2 on t2.station_id = t1.end_station_id where t1.id = 4069
Question: how many docks were left at the end station for trip id4069? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_stat...
how many docks were left at the end station for trip id4069?
bike_share_1
select count(t1.start_station_name) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '%2013%' and t2.events = 'fog' and t1.start_station_name = '2nd at townsend' and t2.zip_code = 94107
Question: among the bike trips started on the days with a fog in 2013, how many of those trips started from the station '2nd at townsend'? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_...
among the bike trips started on the days with a fog in 2013, how many of those trips started from the station '2nd at townsend'?
bike_share_1
select max(t1.duration) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '%2013%' and t2.events = 'fog' and t2.zip_code = 94107
Question: what is the longest duration for a bike trip starting on a day with a fog in 2013? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_...
what is the longest duration for a bike trip starting on a day with a fog in 2013?
bike_share_1
select t2.installation_date from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.id = 4069
Question: when was the bike station from which the bike was borrowed on trip id4069 installed? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, en...
when was the bike station from which the bike was borrowed on trip id4069 installed?
bike_share_1
select count(t1.id) from trip as t1 inner join station as t2 on t2.id = t1.start_station_id where t2.city = 'san francisco' and t1.subscription_type = 'subscriber'
Question: how many trips with a bike borrowed from the stations in san francisco were made by a subscriber? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id,...
how many trips with a bike borrowed from the stations in san francisco were made by a subscriber?
bike_share_1
select count(t1.start_station_name) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '%2014%' and t2.zip_code = 94107 and t1.start_station_name = '2nd at folsom' order by t2.max_temperature_f desc limit 1
Question: on the day with the hottest temperature ever in 2014, how many bike trips started from the station 2nd at folsom? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, s...
on the day with the hottest temperature ever in 2014, how many bike trips started from the station 2nd at folsom?
bike_share_1
select avg(t1.duration) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t2.date like '%2014%' and t1.start_station_name = '2nd at folsom' and t2.max_temperature_f = ( select max_temperature_f from weather order by max_temperature_f desc limit 1 )
Question: what is the average duration of a bike trip made on the day with the hottest temperature ever in 2014? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_statio...
what is the average duration of a bike trip made on the day with the hottest temperature ever in 2014?
bike_share_1
select distinct end_station_name from trip where start_station_name = '2nd at south park'
Question: list out all end stations for a bicycle that were making a trip starting from 2nd at south park station? only retain the unique value. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, ...
list out all end stations for a bicycle that were making a trip starting from 2nd at south park station? only retain the unique value.
bike_share_1
select sum(iif(zip_code = 94041 and events = 'rain', 1, 0)) from weather
Question: how many rainy days were recorded in mountain view? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, end_station_id, b...
how many rainy days were recorded in mountain view?
bike_share_1
select sum(case when city = 'redwood city' and substr(installation_date, -4) < '2014' then dock_count else 0 end) num from station
Question: what is the total number of bikes that can be hold in redwood city before 2014. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_sta...
what is the total number of bikes that can be hold in redwood city before 2014.
bike_share_1
select max(duration), cast(max(duration) as real) / 86400 from trip
Question: what is the longest trip duration according? convert the it to number of days. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_stat...
what is the longest trip duration according? convert the it to number of days.
bike_share_1
select (max_temperature_f - 32) / 1.8000 , (mean_temperature_f - 32) / 1.8000 , (min_temperature_f - 32) / 1.8000 from weather where substr(cast(date as text), 1, instr(date, '/') - 1) = '8' and substr(cast(date as text), -4) = '2013' and zip_code = 94107
Question: convert all temperature recorded at san francisco city during august 2013 into degree celsius. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, en...
convert all temperature recorded at san francisco city during august 2013 into degree celsius.
bike_share_1
select cast(sum(iif(subscription_type = 'subscriber', 1, 0)) as real) / sum(iif(subscription_type = 'customer', 1, 0)) from trip where start_station_name = '2nd at south park' and end_station_name = '2nd at south park'
Question: what is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at south park? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, ...
what is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at south park?
bike_share_1
select distinct t2.city from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.zip_code = 94107
Question: are all stations with zip code 94107 located in san francisco city? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_name, e...
are all stations with zip code 94107 located in san francisco city?
bike_share_1
select distinct t2.start_station_name, t2.end_station_name from weather as t1 inner join trip as t2 on t1.zip_code = t2.zip_code where t1.date like '%2014' and t1.mean_temperature_f = 20 * 1.8 + 32
Question: list out all stations name that having a mean temperature 20 degree celsius in year 2014. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_dat...
list out all stations name that having a mean temperature 20 degree celsius in year 2014.
bike_share_1
select count(t2.id) from station as t1 inner join trip as t2 on t2.start_station_name = t1.name where t1.city = 'san jose' and t2.start_date like '8/%/2013%' and t2.start_station_name like 'san jose%' and t2.end_station_name like 'san jose%'
Question: how many bicycle trip were made within san jose city during august 2013? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_na...
how many bicycle trip were made within san jose city during august 2013?
bike_share_1
select t1.start_station_name, t1.end_station_name from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t1.start_date like '%/%/2014%' and t1.start_station_name != t1.end_station_name
Question: is there any intercity trip were made during 2014? if yes, list out the city name for the start and end station. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, st...
is there any intercity trip were made during 2014? if yes, list out the city name for the start and end station.
bike_share_1
select t1.end_station_name, t2.city, cast(sum(t1.duration) as real) / 3600 from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.bike_id = 16 and t1.start_station_name != t1.end_station_name
Question: does the bike with id number 16 making any intercity trip? if yes, calculate the total travel duration during all the intercity trip. convert the duration to hour. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip ...
does the bike with id number 16 making any intercity trip? if yes, calculate the total travel duration during all the intercity trip. convert the duration to hour.
bike_share_1
select cast(sum(case when t1.subscription_type = 'customer' then 1 else 0 end) as real) * 100 / sum(case when t1.subscription_type = 'subscriber' then 1 else 0 end) from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.city = 'mountain view'
Question: what is the ratio of customer to subscriber that making a trip inside mountain view city? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_dat...
what is the ratio of customer to subscriber that making a trip inside mountain view city?
bike_share_1
select cast(sum(t1.duration) as real) / 3600 from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.city = 'palo alto'
Question: what is the total trip duration made within palo alto city? convert the duration to hour. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_dat...
what is the total trip duration made within palo alto city? convert the duration to hour.
bike_share_1
select t2.bike_id, t2.start_station_name, t2.end_station_name, t1.city , cast(t2.duration as real) / 3600 from station as t1 inner join trip as t2 on t1.name = t2.start_station_name group by t2.bike_id order by count(t2.id) desc limit 1
Question: which bicycle is the least used bike. check if the start and end station are from the same city and calculate the total duration travelled by the bicycle in hours for a trip made within the same city. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_av...
which bicycle is the least used bike. check if the start and end station are from the same city and calculate the total duration travelled by the bicycle in hours for a trip made within the same city.
bike_share_1
select count(case when subscription_type = 'subscriber' and start_station_name = 'market at 4th' then id end) from trip
Question: count the number of subscribers who started their trips in market at 4th. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_station_n...
count the number of subscribers who started their trips in market at 4th.
bike_share_1
select name from station where installation_date = '12/31/2013' and city = 'mountain view'
Question: list the names of the stations within mountain view that were installed on 12/31/2013. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, ...
list the names of the stations within mountain view that were installed on 12/31/2013.
bike_share_1
select city, sum(dock_count) from station where name = 'townsend at 7th'
Question: which city is townsend at 7th station located and how many bikes could it hold? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, start_station_id, end_date, end_sta...
which city is townsend at 7th station located and how many bikes could it hold?
bike_share_1
select sum(t2.dock_count), count(t1.subscription_type) from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t2.name = 'evelyn park and ride' and t1.start_station_name = t2.name and t1.subscription_type = 'subscriber'
Question: how many bikes could evelyn park and ride hold and how many users who started on that station are subscribers? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, star...
how many bikes could evelyn park and ride hold and how many users who started on that station are subscribers?
bike_share_1
select count(t3.zip_code), t3.max_temperature_f from trip as t2 inner join weather as t3 on t3.zip_code = t2.zip_code where t3.zip_code = 94301 and t2.subscription_type = 'subscriber' order by t3.max_temperature_f desc limit 1
Question: how many subscribers are in the zip code of 94301 and what is the hottest temperature recorded on that zip code? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, st...
how many subscribers are in the zip code of 94301 and what is the hottest temperature recorded on that zip code?
bike_share_1
select cast(sum(case when t1.subscription_type = 'customer' then 1 else 0 end) as real) * 100 / sum(case when t1.subscription_type = 'subscriber' then 1 else 0 end) from trip as t1 left join station as t2 on t2.name = t1.start_station_name where t2.city = 'san francisco'
Question: what is the percentage ration of customers to subscribers that started their trips within the city of san francisco? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name...
what is the percentage ration of customers to subscribers that started their trips within the city of san francisco?
bike_share_1
select avg(t1.duration), t2.lat, t2.long from trip as t1 left join station as t2 on t2.name = t1.start_station_name left join station as t3 on t3.name = t1.end_station_name where t1.start_station_name = 'santa clara at almaden'
Question: what is the average duration of trips for the starting station of santa clara at almaden and what is the latitude and longitude of this station? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, st...
what is the average duration of trips for the starting station of santa clara at almaden and what is the latitude and longitude of this station?
bike_share_1
select min(t1.duration), max(t2.max_wind_speed_mph) from trip as t1 inner join weather as t2 on t2.zip_code = t1.zip_code where t1.start_station_name = 'franklin at maple' and t2.date = '9/4/2013'
Question: what is the shortest trip made starting from franklin at maple and what is the maximum wind speed at that date? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name, sta...
what is the shortest trip made starting from franklin at maple and what is the maximum wind speed at that date?
bike_share_1
select sum(t2.bikes_available), t1.long, t1.lat from station as t1 inner join status as t2 on t2.station_id = t1.id where t2.time = '2013/10/20 8:11:01' and t1.name = 'san jose diridon caltrain station'
Question: how many bikes have been borrowed at san jose diridon caltrain station on the date and time of 10/20/2013 8:11:01 am and indicate the station's coordinates. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, ...
how many bikes have been borrowed at san jose diridon caltrain station on the date and time of 10/20/2013 8:11:01 am and indicate the station's coordinates.
bike_share_1
select t2.city, t2.installation_date from trip as t1 inner join station as t2 on t2.name = t1.start_station_name where t1.id = 585842
Question: name the city of the station that trip id 585842 borrowed a bike and indicate when that station was first installed. | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_station_name...
name the city of the station that trip id 585842 borrowed a bike and indicate when that station was first installed.
bike_share_1
select count(t1.name) , sum(case when t2.subscription_type = 'customer' then 1 else 0 end) from station as t1 inner join trip as t2 on t2.start_station_name = t1.name where t1.installation_date = '8/16/2013' and t2.subscription_type = 'customer'
Question: how many stations were installed on the date of 8/16/2013 and how many users on those stations are classified as a customer? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available, docks_available, time. trip -> id, duration, start_date, start_stat...
how many stations were installed on the date of 8/16/2013 and how many users on those stations are classified as a customer?
bike_share_1
select t1.name, t1.lat, t1.long from station as t1 inner join trip as t2 on t2.end_station_name = t1.name where t2.start_station_name = 'market at 4th' and t2.end_date = '8/29/2013 12:45'
Question: which station did the user who started at market at 4th station ended their trip at the time of 12:45:00 pm and the date of 8/29/2013 and what is the location coordinates of the ending station? | Tables: station -> id, name, lat, long, dock_count, city, installation_date. status -> station_id, bikes_available...
which station did the user who started at market at 4th station ended their trip at the time of 12:45:00 pm and the date of 8/29/2013 and what is the location coordinates of the ending station?