Chinastark/bird_dataset huggingface dataset:
Database: sales_in_weather
Question: What is the total number of units of item no.5 sold in store no.3 in 2012 on days when the temperature was below the 30-year normal?
Evidence: item no.5 refers to item_nbr = 5; store no. 3 refers to store_nbr = 3; when the temperature was below the 30-year normal refers to depart < 0; in 2012 refers to SUBSTR(date, 1, 4) = '2012'; total number of units refers to Sum(units)
SQL: SELECT SUM(CASE WHEN T3.depart < 0 THEN units ELSE 0 END) AS sum FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5
Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on the day in 2012 when the max temperature was the highest?
Evidence: item no.5 refers to item_nbr = 5; store no. 3 refers to store_nbr = 3; when the max temperature was highest refers to Max(tmax); in 2012 refers to SUBSTR(date, 1, 4) = '2012'
SQL: SELECT T1.units FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 ORDER BY tmax DESC LIMIT 1
Database: sales_in_weather
Question: What was the dew point on the day the most units of item no.5 were sold in store no.3 in 2012?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; in 2012 refers to SUBSTR(date, 1, 4) = '2012': most units sold refers to Max(units)
SQL: SELECT dewpoint FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 ORDER BY units DESC LIMIT 1
Database: sales_in_weather
Question: On how many days with the max temperature over 90 did the sale of item no.5 in store no.3 exceed 100?
Evidence: max temperature over 90 refers to tmax > 90; item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; sale exceed 100 refers to units > 100; number of days refers to count (date)
SQL: SELECT SUM(CASE WHEN units > 100 THEN 1 ELSE 0 END) AS count FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.item_nbr = 5 AND tmax > 90
Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on the day the temperature range was the biggest?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; when the temperature range was the biggest refers to Max(Subtract(tmax, tmin))
SQL: SELECT t2.units FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 ORDER BY t3.tmax - t3.tmin DESC LIMIT 1
Database: sales_in_weather
Question: Among the days on which over 100 units of item no.5 were sold in store no.3, on which date was the temperature range the biggest?
Evidence: over 100 units refers to units > 100; item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; the temperature range was the biggest refers to Max(Subtract(tmax, tmin))
SQL: SELECT T2.`date` FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 AND T2.units > 100 ORDER BY tmax - tmin DESC LIMIT 1
Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 in total on days with a total precipitation of over 0.05?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; with a total precipitation of over 0.05 refers to preciptotal > 0.05
SQL: SELECT SUM(CASE WHEN T3.preciptotal > 0.05 THEN units ELSE 0 END) AS sum FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5
Database: sales_in_weather
Question: Please list the dates on which the sale of item no.5 in store no.3 exceeded 100 and the average wind speed exceeded 10.
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; exceed 100 refers to units > 100; average wind speed exceeded 10 refers to avgspeed > 10
SQL: SELECT T1.`date` FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5 AND T1.units > 100 AND T3.avgspeed > 10
Database: sales_in_weather
Question: What is the total units of products sold on the day with the highest max temperature in store no.3 in 2012?
Evidence: highest max temperature refers to Max(tmax); store no.3 refers to store_nbr = 3; in 2012 refers to substring (date, 1, 4) = '2012'; total units refers to sum(units)
SQL: SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.`date` LIKE '%2012%' GROUP BY T3.tmax ORDER BY T3.tmax DESC LIMIT 1
Database: sales_in_weather
Question: How many more units of item no.16 were sold on the day with the highest max temperature in 2012 in store no.5 than in store no.10?
Evidence: store no. 5 refers to store_nbr = 5; store no. 10 refers to store_nbr = 10; item no.16 refers to item_nbr = 16; in 2012 refers to SUBSTR(date, 1, 4) = '2012'; highest max temperature refers to Max(tmax); more units sold refers to Subtract ( Sum(units where store_nbr = 5), Sum(units where store_nbr = 10))
SQL: SELECT ( SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.item_nbr = 16 AND T1.`date` LIKE '%2012%' AND T1.store_nbr = 5 GROUP BY tmax ORDER BY T3.tmax DESC LIMIT 1 ) - ( SELECT SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.item_nbr = 16 AND T1.`date` LIKE '%2012%' AND T1.store_nbr = 6 GROUP BY tmax ORDER BY T3.tmax DESC LIMIT 1 )
Database: sales_in_weather
Question: What is the ID of the item that sold the best on the day with the highest max temperature in store no.3 in 2012?
Evidence: highest max temperature refers to Max(tmax); store no.3 refers to store_nbr = 3; in 2012 refers to substring (date, 1, 4) = '2012'; sold the best refers to Max(units); ID of the item refers to item_nbr
SQL: SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' AND tmax = ( SELECT MAX(tmax) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' ) GROUP BY T1.item_nbr ORDER BY SUM(units) DESC LIMIT 1
Database: sales_in_weather
Question: On the day with the highest max temperature in 2012, how many items in store no.3 had no sales?
Evidence: highest max temperature refers to Max(tmax); in 2012 refers to SUBSTR(date, 1, 4) = '2012'; store no.3 refers to store_nbr = 3; had no sale refers to units = 0
SQL: SELECT COUNT(DISTINCT T1.item_nbr) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr AND T1.store_nbr = 3 AND SUBSTR(T1.`date`, 1, 4) = '2012' AND T1.units = 0 GROUP BY T3.tmax ORDER BY T3.tmax DESC LIMIT 1
Database: sales_in_weather
Question: How many units of item no.5 were sold in store no.3 on average on the days when the max temperature exceeded 90?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3;  when the maximum temperature exceed 90 refers to tmax > 90; average = Divide (Sum(units), Count(date))
SQL: SELECT CAST(SUM(T1.units) AS REAL) / COUNT(T1.`date`) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.item_nbr = 5 AND T3.tmax > 90
Database: sales_in_weather
Question: What is the percentage of the units of item no.5 sold among all units of items sold in store no.3 on the day with the highest max temperature in 2012?
Evidence: item no. 5 refers to item_nbr = 5; store no.3 refers to store_nbr = 3; highest max temperature refers to Max(tmax); in 2012 refers to SUBSTR(date, 1, 4) = '2012';  Percentage = Divide (Sum(units where item_nbr = 5), Sum(units)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T1.item_nbr = 5 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' AND T3.tmax = ( SELECT MAX(T3.tmax) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.`date` LIKE '%2012%' )
Database: sales_in_weather
Question: Give the id of the bestsellers of store no.1 on 2012/1/1.
Evidence: store no. 1 refers to store_nbr = 1; on 2012/1/1 refers to date = '2012-01-01'; best seller refers to Max(units); ID refers to item_nbr
SQL: SELECT item_nbr FROM sales_in_weather WHERE `date` = '2012-01-01' AND store_nbr = 1 ORDER BY units DESC LIMIT 1
Database: sales_in_weather
Question: How many no.9 items from store no.11 were sold on 2012/12/7?
Evidence: no. 9 item refers to item_nbr = 9; store no.11 refers to store_nbr = 11; sold on 2012/12/7 refers to date = '2012-12-07'
SQL: SELECT units FROM sales_in_weather WHERE `date` = '2012-12-07' AND store_nbr = 11 AND item_nbr = 9
Database: sales_in_weather
Question: Give the average temperature of station no.20 on 2014/10/17.
Evidence: station no.20 refers to station_nbr = 20; on 2014/10/17 refers to date = '2014-10-17'; average temperature refers to tavg
SQL: SELECT tavg FROM weather WHERE `date` = '2014-10-17' AND station_nbr = 20
Database: sales_in_weather
Question: Tell the resultant wind speed of station no.9 on 2014/1/15.
Evidence: station no.9 refers to station_nbr = 9; on 2014/1/15 refers to date = '2014/01/15'; result wind speed refers to resultspeed
SQL: SELECT resultspeed FROM weather WHERE `date` = '2014-01-15' AND station_nbr = 9
Database: sales_in_weather
Question: Give the id of the weather station with most stores.
Evidence: station with more stores refers to Max(Count(store_nbr)); ID of weather station refers to station_nbr
SQL: SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(station_nbr) DESC LIMIT 1
Database: sales_in_weather
Question: Which weather station does store no.20 belong to?
Evidence: store no.20 refers to store_nbr = 20; weather station refers to station_nbr
SQL: SELECT station_nbr FROM relation WHERE store_nbr = 20
Database: sales_in_weather
Question: Tell the temperature range of the home weather station of store no.7 on 2014/4/28.
Evidence: store no.7 refers to tore_nbr = 7; on 2014/4/28 refers to date = '2014-04-28'; temperature range refers to Subtract (tmax, tmin)
SQL: SELECT T1.tmax - T1.tmin AS temprange FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 7 AND T1.`date` = '2014-04-28'
Database: sales_in_weather
Question: For the weather station which recorded the highest temperature above the 30-year normal, how many stores does it have?
Evidence: highest temperature above the 30-year normal refers to Max(depart)
SQL: SELECT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY depart DESC LIMIT 1 )
Database: sales_in_weather
Question: For the home weather station of store no.15, what was the dew point on 2012/2/18?
Evidence: store no. 15 refers to store_nbr = 15; on 2012/2/18 refers to date = '2012-02-18'
SQL: SELECT T1.dewpoint FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 15 AND T1.`date` = '2012-02-18'
Database: sales_in_weather
Question: Tell the wet-bulb temperature of the weather station which contained store no.6 on 2012/2/15.
Evidence: store no.6 refers to store_nbr = 6; on 2012/2/15 refers to date = '2012-02-15'; wet-bulb temperature refers to wetbulb
SQL: SELECT T1.wetbulb FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 14 AND T1.`date` = '2012-02-15'
Database: sales_in_weather
Question: Give the number of stores which opened on the weather station that recorded the fastest average wind speed.
Evidence: fastest average wind speed refers to Max(avgspeed); number of store refers to count(store_nbr)
SQL: SELECT COUNT(T.store_nbr) FROM ( SELECT DISTINCT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 ) ) T
Database: sales_in_weather
Question: State the max temperature of the weather station which has the no.21 store on 2012/11/9.
Evidence: no.21 store refers to store_nbr = 21; on 2012/11/9 refers to date = '2012-11-09'; max temperature refers to tmax
SQL: SELECT tmax FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 21 AND T1.`date` = '2012-11-09'
Database: sales_in_weather
Question: Provide the sunrise time recorded by the home weather station of store no.30 on 2014/2/21.
Evidence: store no. 30 refers to store_nbr = 30; on 2014/2/21 refers to date = '2014-02-21'
SQL: SELECT T1.sunrise FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2014-02-21' AND store_nbr = 30
Database: sales_in_weather
Question: State the number of stores that belongs to the weather station which recorded the deepest snowfall.
Evidence: deepest snowfall refers to Max(snowfall); number of stores refers to store_nbr
SQL: SELECT T2.store_nbr FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr ORDER BY snowfall DESC LIMIT 1
Database: sales_in_weather
Question: Provide the code summarization for the weather recorded by the weather station which contained the no.2 store on 2013/2/12.
Evidence: no.2 store refers to store_nbr = 2; on 2013/2/12 refers to date = '2013-02-12'; code summarization refers to codesum
SQL: SELECT T1.codesum FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2013-02-12' AND T2.store_nbr = 2
Database: sales_in_weather
Question: Show the sea level status recorded by the weather station of store no.19 on 2013/2/24.
Evidence: store no.19 refers to store_nbr = 19; on 2013/2/24 refers to date = '2013-02-24'; sea level status refers to sealevel
SQL: SELECT T1.sealevel FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2013-02-24' AND T2.store_nbr = 19
Database: sales_in_weather
Question: How many inches of total precipitation was recorded by the weather station of store no.2 on 2012/12/25?
Evidence: store no.2 refers to store_nbr = 2; on 2012/12/25 refers to date = '2012-12-25'; total precipitation refers to preciptotal
SQL: SELECT T1.preciptotal FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2012-12-25' AND T2.store_nbr = 2
Database: sales_in_weather
Question: Give the station pressure status recorded by the weather station which contained no.12 store on 2012/5/15.
Evidence: no.12 store refers to store_nbr = 12; on 2012/5/15 refers to date = '2012-05-15'; station pressure status refers to stnpressure
SQL: SELECT T1.stnpressure FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2012-05-15' AND T2.store_nbr = 12
Database: sales_in_weather
Question: What percentage was the total unit sales of store no.10 to the total sales of its weather station on 2014/10/31?
Evidence: store no.10 refers to store_nbr = 10; on 2014/10/31 refers to date = '2014-10-31'; percentage = Divide (Sum(units where store_nbr = 10), Sum(units)) * 100
SQL: SELECT CAST(SUM(CASE WHEN T2.store_nbr = 10 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.`date` = '2014-10-31'
Database: sales_in_weather
Question: For the weather station has store no.9, what was the increased percentage of the average temperature from 2012/2/2 to 2012/2/3?
Evidence: store no.9 refers to store_nbr = 9; 2012/2/2 refers to date = '2012-02-02'; 2012/2/3 refers to date = '2012-02-03'; average temperature refers to tavg; increase percentage = Divide (Subtract (tavg where date = '2012-02-03', tavg where date = '2012-02-02'), tavg where date = '2012-02-02') * 100
SQL: SELECT CAST((SUM(CASE WHEN T1.`date` = '2012-02-03' THEN T1.tavg * 1 ELSE 0 END) - SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.`date` = '2012-02-02' THEN T1.tavg * 1 ELSE 0 END) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 9
Database: sales_in_weather
Question: What is the item number of the product with the highest number of units sold in store number 1 on 1/1/2012?
Evidence: item number refers to item_nbr; highest number of units sold refers to Max(units); store no.1 refers to store_nbr = 1; on 1/1/2012 refers to date = '2012-01-01'
SQL: SELECT item_nbr FROM sales_in_weather WHERE `date` = '2012-01-01' AND store_nbr = 1 ORDER BY units DESC LIMIT 1
Database: sales_in_weather
Question: How many stores are in weather station 12?
Evidence: weather station 12 refers to station_nbr = 12; number of stores refers to Count(store_nbr)
SQL: SELECT SUM(store_nbr) FROM relation WHERE station_nbr = 12
Database: sales_in_weather
Question: How many items weren't sold in store 2 on 1/1/2012?
Evidence: store no.2 refers to store_nbr = 2; item weren't sold refers to units = 0; on 1/1/2012 refers to date = '2012-01-01'
SQL: SELECT COUNT(item_nbr) FROM sales_in_weather WHERE store_nbr = 2 AND units = 0 AND `date` = '2012-01-01'
Database: sales_in_weather
Question: Between 1/1/2012 to 12/31/2014, which date recorded the hottest temperature in weather station 1?
Evidence: weather station 1 refers to station_nbr = 1; hottest temperature refers to Max(tmax); between 1/1/2012 to 12/31/2014 refers to SUBSTR(date, 1, 4) between 2012 and 2014
SQL: SELECT `date` FROM weather WHERE station_nbr = 1 AND CAST(SUBSTR(`date`, 1, 4) AS int) BETWEEN 2012 AND 2014 ORDER BY tmax DESC LIMIT 1
Database: sales_in_weather
Question: Which weather station has the highest number of stores?
Evidence: number of store refers to store_nbr; highest number of store refers to Max(Count(store_nbr)); weather station refers to station_nbr
SQL: SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1
Database: sales_in_weather
Question: In March 2014, which weather stations recorded the highest number of days whose temperature is below the 30-year normal?
Evidence: in March 2014 refers to substring (date, 1, 4) = '2014' and substring (date, 6, 2) = '03'; temperature is below the 30-year normal refers to depart < 0; highest number of days refers to Max(Count(date))
SQL: SELECT station_nbr FROM weather WHERE SUBSTR(`date`, 1, 4) = '2014' AND SUBSTR(`date`, 6, 2) = '03' AND depart < 0 GROUP BY station_nbr HAVING COUNT(DISTINCT `date`) = ( SELECT COUNT(DISTINCT `date`) FROM weather WHERE SUBSTR(`date`, 1, 4) = '2014' AND SUBSTR(`date`, 6, 2) = '03' AND depart < 0 GROUP BY station_nbr ORDER BY COUNT(`date`) DESC LIMIT 1 )
Database: sales_in_weather
Question: Which weather station does the store that sold the highest quantity of item 9 belongs to?
Evidence: item 9 refers to item_nbr = 9; sold the highest quantity refers to Max(Sum(units)); weather station refers to station_nbr
SQL: SELECT station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 9 GROUP BY T2.station_nbr ORDER BY SUM(T1.units) DESC LIMIT 1
Database: sales_in_weather
Question: How many stores belong to the most windy station?
Evidence: most windy station refers to Max(avgspeed)
SQL: SELECT COUNT(store_nbr) FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 )
Database: sales_in_weather
Question: Among the stores in weather station 14 in February 2014, which store had sold no less than 300 quantities for item number 44 in a single day?
Evidence: weather station 14 refers to station_nbr = 14; February 2014 refers to substring (date, 1, 7) = '2014-02' ; sold no less than 300 quantities refers to units > = 300; item no.44 refers to item_nbr = 44; store refers to store_nbr
SQL: SELECT T1.store_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T2.station_nbr = 14 AND T1.`date` LIKE '%2014-02%' AND T1.item_nbr = 44 AND units >= 300
Database: sales_in_weather
Question: What is the most purchased products during the rainy days in June 2013 in weather station 9?
Evidence: most purchased product refers to Max(units); during the rainy day refers to codesum = RA; in June 2013 refers to SUBSTR(date, 1, 7) = '2013-06'; weather station 9 refers to station_nbr = 9; product refers to item_nbr
SQL: SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T3.station_nbr = 9 AND T1.`date` LIKE '%2013-06%' AND codesum = 'RA' ORDER BY T1.units DESC LIMIT 1
Database: sales_in_weather
Question: Which station sold the highest quantity of item number 5 overall?
Evidence: item number 5 refers to item_nbr = 5; sold highest quantity refers to Max(Sum(units)); station refers to station_nbr
SQL: SELECT T2.station_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 5 GROUP BY T2.station_nbr ORDER BY SUM(T1.units) DESC LIMIT 1
Database: sales_in_weather
Question: What is the earliest sunrise recorded in the stations with no more than 1 store in February 2012?
Evidence: in February 2012 refers to SUBSTR(date, 1, 7) = '2012-02'; earliest sunrise Min(sunrise);  station with no more than 1 store refers to station_nbr where Count(store_nbr) = 1
SQL: SELECT T1.station_nbr FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE sunrise IS NOT NULL AND T2.`date` LIKE '%2012-02%' AND T1.station_nbr IN ( SELECT station_nbr FROM relation GROUP BY station_nbr HAVING COUNT(store_nbr) = 1 ) ORDER BY sunrise LIMIT 1
Database: sales_in_weather
Question: In weather station 17, which store sold the highest quantity of item 45 in October 2012?
Evidence: weather station 17 refers to station_nbr = 17; item 45 refers to item_nbr = 45; in October 2012 refers to SUBSTR(date, 1, 7) = '2012-10': highest quantity refers to Max(Sum(units)); store refers to store_nbr
SQL: SELECT T1.store_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 45 AND T2.station_nbr = 17 AND T1.`date` LIKE '%2012-10%' GROUP BY T1.store_nbr ORDER BY SUM(T1.units) DESC LIMIT 1
Database: sales_in_weather
Question: What are the items sold by the store during the day whose station recorded the thickest snowfall?
Evidence: thickest snowfall refers to Max(snowfall); item refers to item_nbr
SQL: SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN ( SELECT station_nbr, `date` FROM weather ORDER BY snowfall DESC LIMIT 1 ) AS T3 ON T2.station_nbr = T3.station_nbr