1sf/bird-sql-train-with-schema huggingface dataset:
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: List the full name and social security number of the account representative with average performance.
Evidence: full name = firstname, lastname; social security number refers to ssn; account representative is a position title; average performance refers to performance = 'Average'
SQL: SELECT T1.firstname, T1.lastname, T1.ssn FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.performance = 'Average'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: When was Emily Wood hired? Mention her position and salary.
Evidence: Emily Wood is the full name of an employee; full name = firstname, lastname; when was she hired refers to hiredate
SQL: SELECT T1.hiredate, T2.positiontitle, T1.salary FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'Emily' AND T1.lastname = 'Wood'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What are the maximum and minimum salary range and position title of Bill Marlin?
Evidence: Bill Marlin is the full name of an employee; full name = firstname, lastname; maximum salary refers to maxsalary; minimum salary refers to minsalary
SQL: SELECT T2.maxsalary, T2.minsalary, T2.positiontitle FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'Bill' AND T1.lastname = 'Marlin'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: List the full names, gender and positions who's location is in New York city.
Evidence: full name = firstname, lastname; New York city refers to locationcity = 'New York City'
SQL: SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T2.locationcity = 'New York City'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Mention the full name, hired date and performance status of the employee whose location is in Utah state.
Evidence: full name = firstname, lastname; Utah refers to state = 'UT'
SQL: SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'UT'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Among the employees with poor performance, provide the managers' full names, location city, address and its zip code.
Evidence: poor performance refers to performance = 'Poor'; full name = firstname, lastname; managers is a position title
SQL: SELECT T1.firstname, T1.lastname, T2.locationcity, T2.address, T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Manager' AND T1.performance = 'Poor'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: What is the education required to be account representative? Mention account representative full name and salary who got poor in performance status.
Evidence: account representative is a position title; full name = firstname, lastname; poor performance refers to performance = 'Poor'
SQL: SELECT T2.educationrequired, T1.firstname, T1.lastname, T1.salary FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' AND T2.positiontitle = 'Account Representative'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Write down the full name, performance status and located city of the employee who's social security number is "767-74-7373".
Evidence: full name = firstname, lastname; ssn = '767-74-7373'
SQL: SELECT T1.firstname, T1.lastname, T2.state, T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.ssn = '767-74-7373'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Describe the employees' full name, positions, located city and office phone number within Colorado state.
Evidence: full name = firstname, lastname; Colorado state refers to state = 'CO'; positions refers to positiontitle; located city refers to locationcity; office phone number refers to officephone;
SQL: SELECT T1.firstname, T1.lastname, T3.positiontitle, T2.locationcity, T2.officephone FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T2.state = 'CO'
Database: human_resources
Tables: location, position, employee
Columns (table index, column name): -1, *, 0, locationID, 0, locationcity, 0, address, 0, state, 0, zipcode, 0, officephone, 1, positionID, 1, positiontitle, 1, educationrequired, 1, minsalary, 1, maxsalary, 2, ssn, 2, lastname, 2, firstname, 2, hiredate, 2, salary, 2, gender, 2, performance, 2, positionID, 2, locationID
Question: Calculate the monthly average salary of the employee with highest salary. Mention his name, position title and location city.
Evidence: highest salary refers to MAX(salary); name = firstname, lastname; calculation = DIVIDE(MAX(salary), 12)
SQL: SELECT SUM(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) / 12 AS avg, T1.firstname, T1.lastname , T2.positiontitle, T3.locationcity FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID INNER JOIN location AS T3  ON T1.locationID = T3.locationID WHERE CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID INNER JOIN location AS T3  ON T1.locationID = T3.locationID )
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: Which trip had the longest duration? State the start and end station.
Evidence: start station refers to start_station_name; end station refers to end_station_name;
SQL: SELECT start_station_name, end_station_name FROM trip WHERE duration = ( SELECT MAX(duration) FROM trip )
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 percentage of the trip were done by a subscriber?
Evidence: subscription_type = 'Subscriber'; DIVIDE(COUNT(id where subscription_type = 'Subscriber'), COUNT(id)) as percentage;
SQL: SELECT CAST(COUNT(subscription_type) AS REAL) * 100 / ( SELECT COUNT(subscription_type) FROM trip ) FROM trip WHERE 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: State the final station of bike id 13. Which city was it at?
Evidence: final station refers to end_station_name where MAX(end_date);
SQL: SELECT T2.end_station_id, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T1.name = T2.end_station_name WHERE T2.bike_id = 13 ORDER BY T2.end_date DESC LIMIT 1
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: Name all the trips where the bike was borrowed and returned on a different day. State the city where the bike was returned.
Evidence: the bike was borrowed and returned on a different day implies that start_date and end_date are not equal to each other; where the bike was returned refers to end_station_name;
SQL: SELECT DISTINCT T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, '/') + 1) - SUBSTR(CAST(T2.start_date AS TEXT), INSTR(T2.start_date, ' ') - 5) <> SUBSTR(CAST(T2.end_date AS TEXT), INSTR(T2.end_date, '/') + 1) - SUBSTR(CAST(T2.end_date AS TEXT), INSTR(T2.end_date, ' ') - 5)
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: Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01? State the location of the station.
Evidence: Latitude and longitude coordinates can be used to indicate a location, where latitude refers to lat longtitude refer to long; bikes_available = 0 means no bike can be borrowed; 3/11/2013 02:01:01 refers to time;
SQL: SELECT T1.name, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/11/03 02:01:01' AND 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: Name the station and city with the most borrowed bike.
Evidence: the station with the most borrowed bikes refers to MAX(start_station);
SQL: SELECT T2.start_station_name, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name GROUP BY T2.start_station_name ORDER BY COUNT(T2.start_station_name) DESC LIMIT 1
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 was the hottest temperature on the day of trip ID 4080?
Evidence: the hottest temperature refers to max_temperature_f;
SQL: SELECT MAX(T2.max_temperature_f) 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.id = 4080
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: At what date and time did San Jose Diridon Caltrain Station have most bikes available.
Evidence: San Jose Diridon Caltrain Station is the name of the station; most bikes available refers to MAX(bikes_available);
SQL: SELECT T2.time FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.bikes_available = ( SELECT MAX(T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' )
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: Name all the trip on the days when it rained. State the duration of the trip
Evidence: events = 'Rain';
SQL: SELECT T1.id, T1.duration 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.events LIKE '%Rain%' OR T2.events LIKE '%rain%'
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 all trips where bikes were returned at location 37.331415, -121.8932. State the date the bike was borrowed.
Evidence: 37.331415 and -121.8932 are latitude (lat) and longitude (long) coordinates indicating location; returned at refers to end_station_name; the date the bike was borrowed refers to start_date;
SQL: SELECT T2.end_station_name, T2.start_date FROM station AS T1 INNER JOIN trip AS T2 ON T2.end_station_name = T1.name WHERE T1.lat = 37.331415 AND T1.long = -121.8932
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 trips in August 2013, how many bikes were borrowed from Redwood City.
Evidence: Redwood City is the name of the city; trips in August 2013 refers to start_date like '8%2013%';
SQL: 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'