QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    On February 8, 2014, what is the minimum temperature in the station where store 29 belongs? On February 8, 2014 refers to date = '2014-02-08'; store 29 refers to store_nbr = 29; minimum temperature refers to tmin; station refers to station_nbr

    【Evidence】
    On February 8, 2014 refers to date = '2014-02-08'; store 29 refers to store_nbr = 29; minimum temperature refers to tmin; station refers to station_nbr

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT tmin FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.store_nbr = 29 AND T2.`date` = '2014-02-08'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    Among the stations with 3 stores, how many stations have a station pressure of no more than 30 on February 18, 2014? station with 3 stores refers to station_nbr where Count(store_nbr) = 3; station pressure of no more than 30 refers to stnpressure < 30; On February 18, 2014 refers to date = '2014-02-18'

    【Evidence】
    station with 3 stores refers to station_nbr where Count(store_nbr) = 3; station pressure of no more than 30 refers to stnpressure < 30; On February 18, 2014 refers to date = '2014-02-18'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(station_nbr) FROM weather WHERE `date` = '2014-02-18' AND stnpressure < 30 AND station_nbr IN ( SELECT station_nbr FROM relation GROUP BY station_nbr HAVING COUNT(store_nbr) = 3 )
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    Which station has the highest number of stores? Calculate the said station's average maximum temperature in February 2012. station with highest number of stores refers to station_nbr where Max(Count(store_nbr)); station refers to station_nbr; in February 2012 refers to substring (date, 1, 7) = '2012-02'; average maximum temperature = Divide(Sum(tmax), 29)

    【Evidence】
    station with highest number of stores refers to station_nbr where Max(Count(store_nbr)); station refers to station_nbr; in February 2012 refers to substring (date, 1, 7) = '2012-02'; average maximum temperature = Divide(Sum(tmax), 29)

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(T2.tmax) AS REAL) / 29 FROM ( SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1 ) AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE SUBSTR(T2.`date`, 1, 7) = '2012-02'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    Between the stores under weather station 12, what is the percentage of item 5 sold in store 10 in 2014? weather station 12 refers to station_nbr = 12; item 5 refers to item_nbr = 5; 10 store refers to store_nbr = 10; in 2014 refers to SUBSTR(date, 1, 4) = '2014'; percentage = Divide (Sum(units where store_nbr = 10), Sum(units)) * 100

    【Evidence】
    weather station 12 refers to station_nbr = 12; item 5 refers to item_nbr = 5; 10 store refers to store_nbr = 10; in 2014 refers to SUBSTR(date, 1, 4) = '2014'; percentage = Divide (Sum(units where store_nbr = 10), Sum(units)) * 100

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT CAST(SUM(CASE WHEN T2.store_nbr = 10 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr WHERE station_nbr = 12 AND item_nbr = 5 AND T2.`date` LIKE '%2014%'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    What is the maximum average speed? maximum average speed refers to Max(avgspeed)

    【Evidence】
    maximum average speed refers to Max(avgspeed)

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT MAX(avgspeed) FROM weather
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    How many days did the show fell more than 5 inches? snow fell more than 5 inches refers to snowfall > 5

    【Evidence】
    snow fell more than 5 inches refers to snowfall > 5

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(DISTINCT `date`) FROM weather WHERE snowfall > 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    How many days did the sun rise before 5 AM? sunrise before 5 Am refers to sunrise < time ('5:00:00')

    【Evidence】
    sunrise before 5 Am refers to sunrise < time ('5:00:00')

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(DISTINCT `date`) AS days FROM weather WHERE sunrise < time('05:00:00')
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    What is the minimum dew point? minimum dew point refers to Min(dewpoint)

    【Evidence】
    minimum dew point refers to Min(dewpoint)

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT MIN(dewpoint) FROM weather
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    What is the maximum and minimum temperature for station number 1 on 15 January 2012? station number 1 refers to station_nbr = 1 ; minimum temperature = tmin; maximum temperature = tmax; on 15 January 2012 refers to date = '2012-01-15'

    【Evidence】
    station number 1 refers to station_nbr = 1 ; minimum temperature = tmin; maximum temperature = tmax; on 15 January 2012 refers to date = '2012-01-15'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT tmax, tmin FROM weather WHERE station_nbr = 1 AND `date` = '2012-01-15'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    How many stations were able to sell item 5 on January 2014? item 5 refers to item_nbr = 5; on January 2014 refers to Substring (date, 1, 7) = '2014-01'

    【Evidence】
    item 5 refers to item_nbr = 5; on January 2014 refers to Substring (date, 1, 7) = '2014-01'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT COUNT(DISTINCT T2.station_nbr) AS number FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE SUBSTR(`date`, 1, 7) = '2014-01' AND item_nbr = 5
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales_in_weather
【Schema】
# Table: sales_in_weather
[
(date:DATE, Primary Key, Examples: [2012-01-01]),
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(item_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(units:INTEGER, Examples: [0, 29, 2])
]
# Table: relation
[
(store_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(station_nbr:INTEGER, Examples: [1, 14, 7])
]
# Table: weather
[
(station_nbr:INTEGER, Primary Key, Examples: [1, 2, 3]),
(date:DATE, Primary Key, Examples: [2012-01-01]),
(tmax:INTEGER, Examples: [52, 50, 32]),
(tmin:INTEGER, Examples: [31, 11, 9]),
(tavg:INTEGER, Examples: [42, 41, 22]),
(depart:INTEGER, Examples: [16, 12, -6]),
(dewpoint:INTEGER, Examples: [36, 26, 4]),
(wetbulb:INTEGER, Examples: [40, 35, 18]),
(heat:INTEGER, Examples: [23, 24, 43]),
(cool:INTEGER, Examples: [0, 5, 6]),
(sunrise:TEXT, Examples: [07:16:00, 07:15:00, 07:14:00]),
(sunset:TEXT, Examples: [16:26:00, 16:27:00, 16:28:00]),
(codesum:TEXT, Examples: [RA FZFG BR,  , SN]),
(snowfall:REAL, Examples: [0.0, 0.05, 0.2]),
(preciptotal:REAL, Examples: [0.05, 0.01, 0.0]),
(stnpressure:REAL, Examples: [29.78, 29.44, 29.67]),
(sealevel:REAL, Examples: [29.92, 29.62, 29.87]),
(resultspeed:REAL, Examples: [3.6, 9.8, 10.8]),
(resultdir:INTEGER, Examples: [20, 24, 31]),
(avgspeed:REAL, Examples: [4.6, 10.3, 11.6])
]
【Foreign keys】
relation.store_nbr=sales_in_weather.store_nbr
relation.station_nbr=weather.station_nbr

    【Question】
    What is the lowest minimum temperature recorded in store 16 on January 2012? lowest minimum temperature refers to Min(tmin); store 16 refers to store_nbr = 16; on January 2012 refers to Substring (date, 1, 7) = '2012-01'

    【Evidence】
    lowest minimum temperature refers to Min(tmin); store 16 refers to store_nbr = 16; on January 2012 refers to Substring (date, 1, 7) = '2012-01'

    Please read and understand the database schema carefully, and generate an executable SQL based on the user's question and evidence. 

SQL: SELECT MIN(tmin) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 16 AND T1.`date` LIKE '%2012-01%'