sert121/SpiderSQL huggingface dataset:
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



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
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What are the 3 most common cloud covers in the zip code of 94107?
SQL: SELECT cloud_cover FROM weather WHERE zip_code  =  94107 GROUP BY cloud_cover ORDER BY COUNT (*) DESC LIMIT 3
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



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
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the zip code that has the lowest average mean sea level pressure?
SQL: SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



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")
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the average bike availablility for stations not in Palo Alto?
SQL: SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city  =  "Palo Alto")
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the average longitude of stations that never had bike availability more than 10?
SQL: SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available)  >  10)
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the mean longitude for all stations that have never had more than 10 bikes available?
SQL: SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available)  >  10)
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: When and in what zip code did max temperature reach 80?
SQL: SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?
SQL: SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Give me ids for all the trip that took place in a zip code area with average mean temperature above 60.
SQL: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code  =  T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f)  >  60
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: For each zip code, find the ids of all trips that have a higher average mean temperature above 60?
SQL: SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code  =  T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f)  >  60
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: For each zip code, return how many times max wind speed reached 25?
SQL: SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: For each zip code, how many times has the maximum wind speed reached 25 mph?
SQL: SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: On which day and in which zip code was the min dew point lower than any day in zip code 94107?
SQL: SELECT date ,  zip_code FROM weather WHERE min_dew_point_f  <  (SELECT min(min_dew_point_f) FROM weather WHERE zip_code  =  94107)
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?
SQL: SELECT date ,  zip_code FROM weather WHERE min_dew_point_f  <  (SELECT min(min_dew_point_f) FROM weather WHERE zip_code  =  94107)
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: For each trip, return its ending station's installation date.
SQL: SELECT T1.id ,  T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the installation date for each ending station on all the trips?
SQL: SELECT T1.id ,  T2.installation_date FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Which trip started from the station with the largest dock count? Give me the trip id.
SQL: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: What is the id of the trip that started from the station with the highest dock count?
SQL: SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: Count the number of trips that did not end in San Francisco city.
SQL: SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id WHERE T2.city !=  "San Francisco"
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: How many trips did not end in San Francisco?
SQL: SELECT count(*) FROM trip AS T1 JOIN station AS T2 ON T1.end_station_id  =  T2.id WHERE T2.city != "San Francisco"
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: In zip code 94107, on which day neither Fog nor Rain was not observed?
SQL: SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "Fog" AND EVENTS != "Rain"
-- Language PostgreSQL
        -- Tables: 
             -- Table: station 
columns : [['id', 'number'], ['name', 'text'], ['latitude', 'number'], ['longitude', 'number'], ['dock count', 'number'], ['city', 'text'], ['installation date', 'text']]

 -- Table: status 
columns : [['station id', 'number'], ['bikes available', 'number'], ['docks available', 'number'], ['time', 'text']]

 -- Table: trip 
columns : [['id', 'number'], ['duration', 'number'], ['start date', 'text'], ['start station name', 'text'], ['start station id', 'number'], ['end date', 'text'], ['end station name', 'text'], ['end station id', 'number'], ['bike id', 'number'], ['subscription type', 'text'], ['zip code', 'number']]

 -- Table: weather 
columns : [['date', 'text'], ['max temperature f', 'number'], ['mean temperature f', 'number'], ['min temperature f', 'number'], ['max dew point f', 'number'], ['mean dew point f', 'number'], ['min dew point f', 'number'], ['max humidity', 'number'], ['mean humidity', 'number'], ['min humidity', 'number'], ['max sea level pressure inches', 'number'], ['mean sea level pressure inches', 'number'], ['min sea level pressure inches', 'number'], ['max visibility miles', 'number'], ['mean visibility miles', 'number'], ['min visibility miles', 'number'], ['max wind speed mph', 'number'], ['mean wind speed mph', 'number'], ['max gust speed mph', 'number'], ['precipitation inches', 'number'], ['cloud cover', 'number'], ['events', 'text'], ['wind dir degrees', 'number'], ['zip code', 'number']]

You are a SQL code translator. You have been given the Table data above. Your role is to translate natural language to PostgreSQL. 
You should not select columns that are not part of the tables provided to you. Think step by step.
Your only output should be SQL code. Do not include any other text. Only SQL code.



Question: On which day has it neither been foggy nor rained in the zip code of 94107?
SQL: SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "Fog" AND EVENTS != "Rain"