1sf/bird-sql-train-with-schema huggingface dataset:
Database: sales_in_weather
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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
Tables: sales_in_weather, weather, relation
Columns (table index, column name): -1, *, 0, date, 0, store_nbr, 0, item_nbr, 0, units, 1, station_nbr, 1, date, 1, tmax, 1, tmin, 1, tavg, 1, depart, 1, dewpoint, 1, wetbulb, 1, heat, 1, cool, 1, sunrise, 1, sunset, 1, codesum, 1, snowfall, 1, preciptotal, 1, stnpressure, 1, sealevel, 1, resultspeed, 1, resultdir, 1, avgspeed, 2, store_nbr, 2, station_nbr
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