richardr1126/spider-context-instruct huggingface dataset:
### Instruction:

Convert text to sql: What are all the different zip codes that have a maximum dew point that was always below 70? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select distinct zip_code from weather except select distinct zip_code from weather where max_dew_point_f >= 70

### Instruction:

Convert text to sql: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103. | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select id from trip where duration >= ( select avg ( duration ) from trip where zip_code = 94103 )
### Instruction:

Convert text to sql: What are the ids of all trips that had a duration as long as the average trip duration in the zip code 94103? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select id from trip where duration >= ( select avg ( duration ) from trip where zip_code = 94103 )

### Instruction:

Convert text to sql: What are the dates in which the mean sea level pressure was between 30.3 and 31? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select date from weather where mean_sea_level_pressure_inches between 30.3 and 31

### Instruction:

Convert text to sql: What are the dates that have an average sea level pressure between 30.3 and 31? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select date from weather where mean_sea_level_pressure_inches between 30.3 and 31
### Instruction:

Convert text to sql: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference. | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1

### Instruction:

Convert text to sql: What are the days that had the smallest temperature range, and what was that range? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select date , max_temperature_f - min_temperature_f from weather order by max_temperature_f - min_temperature_f asc limit 1
### Instruction:

Convert text to sql: What are the id and name of the stations that have ever had more than 12 bikes available? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12

### Instruction:

Convert text to sql: What are the different ids and names of the stations that have had more than 12 bikes available? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select distinct station.id , station.name from station join status on station.id = status.station_id where status.bikes_available > 12
### Instruction:

Convert text to sql: Give me the zip code where the average mean humidity is below 70 and at least 100 trips took place. | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100

### Instruction:

Convert text to sql: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select zip_code from weather group by zip_code having avg ( mean_humidity ) < 70 intersect select zip_code from trip group by zip_code having count ( * ) >= 100
### Instruction:

Convert text to sql: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100

### Instruction:

Convert text to sql: What are the names of the stations that are located in Palo Alto but have never been the ending point of the trips | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select name from station where city = 'Palo Alto' except select end_station_name from trip group by end_station_name having count ( * ) > 100
### Instruction:

Convert text to sql: How many trips started from Mountain View city and ended at Palo Alto city? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'

### Instruction:

Convert text to sql: How many trips stated from  a station in Mountain View and ended at one in Palo Alto? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select count ( * ) from station join trip join station join trip on station.id = trip.start_station_id and trip.id = trip.id and station.id = trip.end_station_id where station.city = 'Mountain View' and station.city = 'Palo Alto'
### Instruction:

Convert text to sql: What is the average latitude and longitude of the starting points of all trips? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id

### Instruction:

Convert text to sql: What is the average latitude and longitude of all starting stations for the trips? | 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 , subscription_type , zip_code | weather : date , max_temperature_f , mean_temperature_f , min_temperature_f , max_dew_point_f , mean_dew_point_f , min_dew_point_f , max_humidity , mean_humidity , min_humidity , max_sea_level_pressure_inches , mean_sea_level_pressure_inches , min_sea_level_pressure_inches , max_visibility_miles , mean_visibility_miles , min_visibility_miles , max_wind_speed_mph , mean_wind_speed_mph , max_gust_speed_mph , precipitation_inches , cloud_cover , events , wind_dir_degrees , zip_code | status.station_id = station.id | 

### Response:

select avg ( station.lat ) , avg ( station.long ) from station join trip on station.id = trip.start_station_id
### Instruction:

Convert text to sql: How many books are there? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select count ( * ) from book

### Instruction:

Convert text to sql: List the writers of the books in ascending alphabetical order. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select writer from book order by writer asc

### Instruction:

Convert text to sql: List the titles of the books in ascending order of issues. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select title from book order by issues asc

### Instruction:

Convert text to sql: What are the titles of the books whose writer is not "Elaine Lee"? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select title from book where writer != 'Elaine Lee'

### Instruction:

Convert text to sql: What are the title and issues of the books? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select title , issues from book

### Instruction:

Convert text to sql: What are the dates of publications in descending order of price? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publication_date from publication order by price desc

### Instruction:

Convert text to sql: What are the distinct publishers of publications with price higher than 5000000? | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select distinct publisher from publication where price > 5000000

### Instruction:

Convert text to sql: List the publisher of the publication with the highest price. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publisher from publication order by price desc limit 1

### Instruction:

Convert text to sql: List the publication dates of publications with 3 lowest prices. | publication : publication_id , book_id , publisher , publication_date , price | book : book_id , title , issues , writer | publication.book_id = book.book_id | 

### Response:

select publication_date from publication order by price asc limit 3