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】
    What is the difference between the units sold for item 1 when the sunset was the earliest and the latest? item 1 refers to item_nbr = 1; when the sunset earliest refers to Min(sunset); latest sunset refers to Max(sunset); difference unit sold refers to Subtract(Sum(units where Min(sunset)), Sum(units where Max(sunset)))

    【Evidence】
    item 1 refers to item_nbr = 1; when the sunset earliest refers to Min(sunset); latest sunset refers to Max(sunset); difference unit sold refers to Subtract(Sum(units where Min(sunset)), Sum(units where Max(sunset)))

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

SQL: SELECT ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset LIMIT 1 ) - ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset DESC LIMIT 1 )
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 was the total unit sold for item 10 when the average temperature was below the median temperature? item 10 refers to item_nbr = 10; average temperature below median temperature refers to tavg < avg(tavg); total units refers to Sum(units)

    【Evidence】
    item 10 refers to item_nbr = 10; average temperature below median temperature refers to tavg < avg(tavg); total units refers to Sum(units)

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

SQL: SELECT SUM(T5.units) FROM weather AS T4 INNER JOIN sales_in_weather AS T5 ON T4.`date` = T5.`date` INNER JOIN relation AS T6 ON T5.store_nbr = T6.store_nbr WHERE T5.item_nbr = 10 AND T4.tavg < ( SELECT AVG(T1.tavg) FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 10 )
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 was the average temperature differences during May 2012 for store number 6 and 7? during May 2012 refers to SUBSTR(date, 1, 7) = '2012-05'; store number 6 refers to store_nbr = 6; store number 7 refers to store_nbr = 7; average temperature difference = Subtract (Divide (Sum(tavg), Count (date) where the store_nbr = 6), Divide (Sum(tavg), Count(date) where store_nbr = 7))

    【Evidence】
    during May 2012 refers to SUBSTR(date, 1, 7) = '2012-05'; store number 6 refers to store_nbr = 6; store number 7 refers to store_nbr = 7; average temperature difference = Subtract (Divide (Sum(tavg), Count (date) where the store_nbr = 6), Divide (Sum(tavg), Count(date) where store_nbr = 7))

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

SQL: SELECT ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr AND T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 6 ) - ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 7 )
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    How many customers have never married? MARITAL_STATUS = 'Never-married';

    【Evidence】
    MARITAL_STATUS = 'Never-married';

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

SQL: SELECT COUNT(ID) FROM Customers WHERE MARITAL_STATUS = 'Never-married'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Among all the customers, how many of them are teenagers? teenager is a person aged between 13 and 19 years;

    【Evidence】
    teenager is a person aged between 13 and 19 years;

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

SQL: SELECT COUNT(ID) FROM Customers WHERE age >= 13 AND age <= 19
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Please list the occupations of the customers with an education level of 11. education level of 11 refers to EDUCATIONNUM = 11;

    【Evidence】
    education level of 11 refers to EDUCATIONNUM = 11;

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

SQL: SELECT DISTINCT OCCUPATION FROM Customers WHERE EDUCATIONNUM = 11
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Of the first 60,000 customers' responses to the incentive mailing sent by the marketing department, how many of them are considered a true response? RESPONSE = 'true';

    【Evidence】
    RESPONSE = 'true';

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

SQL: SELECT COUNT(REFID) custmoer_number FROM Mailings1_2 WHERE RESPONSE = 'true'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    Among the customers over 30, how many of them are Machine-op-inspcts? over 30 refers to age > 30; OCCUPATION = 'Machine-op-inspct';

    【Evidence】
    over 30 refers to age > 30; OCCUPATION = 'Machine-op-inspct';

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

SQL: SELECT COUNT(ID) FROM Customers WHERE OCCUPATION = 'Machine-op-inspct' AND age > 30
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 software_company
【Schema】
# Table: Customers
[
(ID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(SEX:TEXT, Examples: [Male, Female]),
(MARITAL_STATUS:TEXT, Examples: [Never-married, Married-civ-spouse, Divorced]),
(GEOID:INTEGER, Examples: [61, 70, 53]),
(EDUCATIONNUM:INTEGER, Examples: [7, 3, 4]),
(OCCUPATION:TEXT, Examples: [Machine-op-inspct, Handlers-cleaners, Exec-managerial]),
(age:INTEGER, Examples: [62, 78, 69])
]
# Table: Mailings1_2
[
(REFID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REF_DATE:DATETIME, Examples: [2007-02-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: mailings3
[
(REFID:INTEGER, Primary Key, Examples: [60000, 60001, 60002]),
(REF_DATE:DATETIME, Examples: [2007-07-01 12:00:00]),
(RESPONSE:TEXT, Examples: [false, true])
]
# Table: Demog
[
(GEOID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(INHABITANTS_K:REAL, Examples: [30.046, 36.25, 47.645]),
(INCOME_K:REAL, Examples: [2631.47, 3012.75, 2192.41]),
(A_VAR1:REAL, Examples: [6.084, 4.604, 4.911]),
(A_VAR2:REAL, Examples: [5.79, 8.309, 8.557]),
(A_VAR3:REAL, Examples: [8.595, 6.007, 5.934]),
(A_VAR4:REAL, Examples: [3.935, 5.938, 6.494]),
(A_VAR5:REAL, Examples: [6.362, 8.773, 9.172]),
(A_VAR6:REAL, Examples: [8.626, 3.579, 3.202]),
(A_VAR7:REAL, Examples: [4.624, 6.349, 6.157]),
(A_VAR8:REAL, Examples: [8.324, 4.694, 4.822]),
(A_VAR9:REAL, Examples: [5.233, 6.884, 7.942]),
(A_VAR10:REAL, Examples: [6.232, 7.062, 7.901]),
(A_VAR11:REAL, Examples: [5.205, 7.319, 7.928]),
(A_VAR12:REAL, Examples: [8.231, 3.72, 2.33]),
(A_VAR13:REAL, Examples: [6.746, 6.405, 6.029]),
(A_VAR14:REAL, Examples: [8.679, 7.202, 6.455]),
(A_VAR15:REAL, Examples: [5.292, 4.932, 4.72]),
(A_VAR16:REAL, Examples: [3.5, 7.969, 8.564]),
(A_VAR17:REAL, Examples: [5.512, 8.15, 8.342]),
(A_VAR18:REAL, Examples: [5.783, 5.633, 4.938])
]
# Table: Sales
[
(EVENTID:INTEGER, Primary Key, Examples: [0, 1, 2]),
(REFID:INTEGER, Examples: [0, 1, 2]),
(EVENT_DATE:DATETIME, Examples: [2006-12-21 12:00:00]),
(AMOUNT:REAL, Examples: [17.907, 17.401, 13.277])
]
【Foreign keys】
Customers.GEOID=Demog.GEOID
Mailings1_2.REFID=Customers.ID
Sales.REFID=Customers.ID

    【Question】
    How many female customers have an education level of over 11? education level of 11 refers to EDUCATIONNUM = 11; SEX = 'Female';

    【Evidence】
    education level of 11 refers to EDUCATIONNUM = 11; SEX = 'Female';

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

SQL: SELECT COUNT(ID) FROM Customers WHERE EDUCATIONNUM > 11 AND SEX = 'Female'