Database: bike_1

Question: Give me the start station and end station for the trips with the three oldest ids.
SQL: SELECT start_station_name ,  end_station_name FROM trip ORDER BY id LIMIT 3

Question: What is the average latitude and longitude of stations located in San Jose city?
SQL: SELECT avg(lat) ,  avg(long) FROM station WHERE city  =  "San Jose"

Question: What is the id of the trip that has the shortest duration?
SQL: SELECT id FROM trip ORDER BY duration LIMIT 1

Question: What is the total and maximum duration of trips with bike id 636?
SQL: SELECT sum(duration) ,  max(duration) FROM trip WHERE bike_id  =  636

Question: For each zip code, return the average mean temperature of August there.
SQL: SELECT zip_code  ,  avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code

Question: Return the unique name for stations that have ever had 7 bikes available.
SQL: SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  =  7

Question: Which start station had the most trips starting from August? Give me the name and id of the station.
SQL: SELECT start_station_name ,  start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1

Question: Which bike traveled the most often in zip code 94002?
SQL: SELECT bike_id FROM trip WHERE zip_code  =  94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1

Question: How many days had both mean humidity above 50 and mean visibility above 8?
SQL: SELECT COUNT(*) FROM weather WHERE mean_humidity  >  50 AND mean_visibility_miles  >  8

Question: What is the latitude, longitude, city of the station from which the shortest trip started?
SQL: SELECT T1.lat ,  T1.long ,  T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id ORDER BY T2.duration LIMIT 1

Question: What are the ids of stations that are located in San Francisco and have average bike availability above 10.
SQL: SELECT id FROM station WHERE city  =  "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available)  >  10

Question: What are the names and ids of stations that had more than 14 bikes available on average or were installed in December?
SQL: SELECT T1.name ,  T1.id FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(T2.bikes_available)  >  14 UNION SELECT name ,  id FROM station WHERE installation_date LIKE "12/%"

Question: What is the 3 most common cloud cover rates in the region of zip code 94107?
SQL: SELECT cloud_cover FROM weather WHERE zip_code  =  94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3

Question: What is the zip code in which the average mean sea level pressure is the lowest?
SQL: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1

Question: What is the average bike availability in stations that are not located in Palo Alto?
SQL: SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city  =  "Palo Alto")