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】 menu
【Schema】
# Table: Menu
[
(id:INTEGER, Primary Key, Examples: [12463, 12464, 12465]),
(name:TEXT, Examples: [The Modern, Restaurant, El Fuerte Del Palmar]),
(sponsor:TEXT, Examples: [HOTEL EASTMAN]),
(event:TEXT, Examples: [BREAKFAST, [DINNER], FRUHSTUCK/BREAKFAST;]),
(venue:TEXT, Examples: [COMMERCIAL, SOC;, EDUC;]),
(place:TEXT, Examples: [HOT SPRINGS, AR]),
(physical_description:TEXT, Examples: [CARD; 4.75X7.5;]),
(occasion:TEXT, Examples: [EASTER;, ANNIVERSARY;, DAILY;]),
(notes:TEXT),
(call_number:TEXT, Examples: [1900-2822, 1900-2825, 1900-2827]),
(keywords:TEXT),
(language:TEXT),
(date:DATE, Examples: [1900-04-15]),
(location:TEXT, Examples: [Hotel Eastman]),
(location_type:TEXT),
(currency:TEXT, Examples: [Dollars, Cents, Francs]),
(currency_symbol:TEXT, Examples: [$, c, FF]),
(status:TEXT, Examples: [complete]),
(page_count:INTEGER, Examples: [2, 4, 12]),
(dish_count:INTEGER, Examples: [67, 34, 84])
]
# Table: MenuItem
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(menu_page_id:INTEGER, Examples: [1389, 3079, 1388]),
(price:REAL, Examples: [0.4, 0.6, 0.5]),
(high_price:REAL, Examples: [1.0, 3.0, 1.5]),
(dish_id:INTEGER, Examples: [1, 2, 3]),
(created_at:TEXT, Examples: [2011-03-28 15:00:44 UTC]),
(updated_at:TEXT, Examples: [2011-04-19 04:33:15 UTC]),
(xpos:REAL, Examples: [0.111429, 0.438571, 0.14]),
(ypos:REAL, Examples: [0.254735, 0.261922, 0.26272])
]
# Table: Dish
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Consomme printaniere royal]),
(description:TEXT),
(menus_appeared:INTEGER, Examples: [8, 111, 14]),
(times_appeared:INTEGER, Examples: [8, 117, 14]),
(first_appeared:INTEGER, Examples: [1897, 1895, 1893]),
(last_appeared:INTEGER, Examples: [1927, 1960, 1917]),
(lowest_price:REAL, Examples: [0.2, 0.1, 0.25]),
(highest_price:REAL, Examples: [0.4, 0.8, 1.0])
]
# Table: MenuPage
[
(id:INTEGER, Primary Key, Examples: [119, 120, 121]),
(menu_id:INTEGER, Examples: [12460, 12461, 12462]),
(page_number:INTEGER, Examples: [1, 2, 3]),
(image_id:REAL, Examples: [1603595.0, 1603596.0, 1603597.0]),
(full_height:INTEGER, Examples: [7230, 5428, 3074]),
(full_width:INTEGER, Examples: [5428, 7230, 2046]),
(uuid:TEXT, Examples: [510d47e4-2955-a3d9-e040-e00a18064a99])
]
【Foreign keys】
MenuItem.dish_id=Dish.id
MenuItem.menu_page_id=MenuPage.id
MenuPage.menu_id=Menu.id

    【Question】
    How much space does page 1 of the menu "Zentral Theater Terrace" cover? how much space = MULTIPLY(full_height, full_width); Zentral Theater Terrace is a name of menu;

    【Evidence】
    how much space = MULTIPLY(full_height, full_width); Zentral Theater Terrace is a name of menu;

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

SQL: SELECT T2.full_height * T2.full_width FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.name = 'Zentral Theater Terrace' AND T2.page_number = 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 menu
【Schema】
# Table: Menu
[
(id:INTEGER, Primary Key, Examples: [12463, 12464, 12465]),
(name:TEXT, Examples: [The Modern, Restaurant, El Fuerte Del Palmar]),
(sponsor:TEXT, Examples: [HOTEL EASTMAN]),
(event:TEXT, Examples: [BREAKFAST, [DINNER], FRUHSTUCK/BREAKFAST;]),
(venue:TEXT, Examples: [COMMERCIAL, SOC;, EDUC;]),
(place:TEXT, Examples: [HOT SPRINGS, AR]),
(physical_description:TEXT, Examples: [CARD; 4.75X7.5;]),
(occasion:TEXT, Examples: [EASTER;, ANNIVERSARY;, DAILY;]),
(notes:TEXT),
(call_number:TEXT, Examples: [1900-2822, 1900-2825, 1900-2827]),
(keywords:TEXT),
(language:TEXT),
(date:DATE, Examples: [1900-04-15]),
(location:TEXT, Examples: [Hotel Eastman]),
(location_type:TEXT),
(currency:TEXT, Examples: [Dollars, Cents, Francs]),
(currency_symbol:TEXT, Examples: [$, c, FF]),
(status:TEXT, Examples: [complete]),
(page_count:INTEGER, Examples: [2, 4, 12]),
(dish_count:INTEGER, Examples: [67, 34, 84])
]
# Table: MenuItem
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(menu_page_id:INTEGER, Examples: [1389, 3079, 1388]),
(price:REAL, Examples: [0.4, 0.6, 0.5]),
(high_price:REAL, Examples: [1.0, 3.0, 1.5]),
(dish_id:INTEGER, Examples: [1, 2, 3]),
(created_at:TEXT, Examples: [2011-03-28 15:00:44 UTC]),
(updated_at:TEXT, Examples: [2011-04-19 04:33:15 UTC]),
(xpos:REAL, Examples: [0.111429, 0.438571, 0.14]),
(ypos:REAL, Examples: [0.254735, 0.261922, 0.26272])
]
# Table: Dish
[
(id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(name:TEXT, Examples: [Consomme printaniere royal]),
(description:TEXT),
(menus_appeared:INTEGER, Examples: [8, 111, 14]),
(times_appeared:INTEGER, Examples: [8, 117, 14]),
(first_appeared:INTEGER, Examples: [1897, 1895, 1893]),
(last_appeared:INTEGER, Examples: [1927, 1960, 1917]),
(lowest_price:REAL, Examples: [0.2, 0.1, 0.25]),
(highest_price:REAL, Examples: [0.4, 0.8, 1.0])
]
# Table: MenuPage
[
(id:INTEGER, Primary Key, Examples: [119, 120, 121]),
(menu_id:INTEGER, Examples: [12460, 12461, 12462]),
(page_number:INTEGER, Examples: [1, 2, 3]),
(image_id:REAL, Examples: [1603595.0, 1603596.0, 1603597.0]),
(full_height:INTEGER, Examples: [7230, 5428, 3074]),
(full_width:INTEGER, Examples: [5428, 7230, 2046]),
(uuid:TEXT, Examples: [510d47e4-2955-a3d9-e040-e00a18064a99])
]
【Foreign keys】
MenuItem.dish_id=Dish.id
MenuItem.menu_page_id=MenuPage.id
MenuPage.menu_id=Menu.id

    【Question】
    What is the average number of dishes per menu page of menu ID12882? average number of dishes per menu = DIVIDE(COUNT(dish_id), COUNT(page_count));

    【Evidence】
    average number of dishes per menu = DIVIDE(COUNT(dish_id), COUNT(page_count));

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

SQL: SELECT CAST(COUNT(dish_id) AS REAL) / COUNT(T3.page_count) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.menu_id = 12882
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    How many shipments were ordered by S K L Enterprises Inc in 2017? "S K L Enterprises Inc" is the cust_name; in 2017 refers to Cast(ship_date AS DATE) = 2017

    【Evidence】
    "S K L Enterprises Inc" is the cust_name; in 2017 refers to Cast(ship_date AS DATE) = 2017

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

SQL: SELECT COUNT(T2.ship_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'S K L Enterprises Inc' AND STRFTIME('%Y', T2.ship_date) = '2017'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    What is the total number of pounds being transported for S K L Enterprises Inc? "S K L Enterprises Inc" is the cust_name; total number of pounds refers to Sum(weight)

    【Evidence】
    "S K L Enterprises Inc" is the cust_name; total number of pounds refers to Sum(weight)

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

SQL: SELECT SUM(T2.weight) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'S K L Enterprises Inc'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    Among the shipments done by Sue Newell, how many of them are for S K L Enterprises Inc? "S K L Enterprises Inc" is the cust_name

    【Evidence】
    "S K L Enterprises Inc" is the cust_name

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

SQL: SELECT COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.cust_name = 'S K L Enterprises Inc' AND T3.first_name = 'Sue' AND T3.last_name = 'Newell'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    How many shipments were ordered by a customer in Florida? customer in Florida refers to state = 'FL'

    【Evidence】
    customer in Florida refers to state = 'FL'

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

SQL: SELECT COUNT(T1.cust_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.state = 'FL'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    Please list the IDs of all the shipments made by a retailer customer. "retailer" is the cust_type;  IDs of shipments refers to ship_id

    【Evidence】
    "retailer" is the cust_type;  IDs of shipments refers to ship_id

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

SQL: SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer'
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 shipping
【Schema】
# Table: driver
[
(driver_id:INTEGER, Primary Key, Examples: [20, 21, 22]),
(first_name:TEXT, Examples: [Sue, Andrea, Roger]),
(last_name:TEXT, Examples: [Newell, Simons, McHaney]),
(address:TEXT, Examples: [268 Richmond Ave, 3574 Oak Limb Cv, 1839 S Orleans St]),
(city:TEXT, Examples: [Memphis]),
(state:TEXT, Examples: [TN]),
(zip_code:INTEGER, Examples: [38106, 38135, 38118]),
(phone:TEXT, Examples: [(901) 774-6569, (901) 384-0984, (901) 948-1043])
]
# Table: customer
[
(cust_id:INTEGER, Primary Key, Examples: [193, 304, 314]),
(cust_name:TEXT, Examples: [Advanced Fabricators]),
(annual_revenue:INTEGER, Examples: [39588651, 17158109, 47403613]),
(cust_type:TEXT, Examples: [manufacturer, wholesaler, retailer]),
(address:TEXT, Examples: [5141 Summit Boulevard]),
(city:TEXT, Examples: [West Palm Beach, Salt Lake City, Council Bluffs]),
(state:TEXT, Examples: [FL, UT, IA]),
(zip:REAL, Examples: [33415.0, 84107.0, 51503.0]),
(phone:TEXT, Examples: [(561) 683-3535, (801) 262-4864, (712) 366-4929])
]
# Table: truck
[
(truck_id:INTEGER, Primary Key, Examples: [1, 2, 3]),
(make:TEXT, Examples: [Peterbilt, Mack, Kenworth]),
(model_year:INTEGER, Examples: [2005, 2006, 2007])
]
# Table: shipment
[
(ship_id:INTEGER, Primary Key, Examples: [1000, 1001, 1002]),
(cust_id:INTEGER, Examples: [3660, 2001, 1669]),
(weight:REAL, Examples: [3528.0, 11394.0, 8712.0]),
(truck_id:INTEGER, Examples: [1, 2, 3]),
(driver_id:INTEGER, Examples: [23, 27, 21]),
(city_id:INTEGER, Examples: [137, 186, 268]),
(ship_date:TEXT, Examples: [2016-01-08, 2016-01-18, 2016-01-19])
]
# Table: city
[
(city_id:INTEGER, Primary Key, Examples: [100, 101, 102]),
(city_name:TEXT, Examples: [Union City, Huntington Park, Passaic]),
(state:TEXT, Examples: [New Jersey, California, New York]),
(population:INTEGER, Examples: [67088, 61348, 67861]),
(area:REAL, Examples: [1.3, 3.0, 3.1])
]
【Foreign keys】
shipment.cust_id=customer.cust_id
shipment.city_id=city.city_id
shipment.driver_id=driver.driver_id
shipment.truck_id=truck.truck_id

    【Question】
    Among the customers having at least one shipment in 2017, how many of them have an annual revenue of over 30000000? shipment in 2017 refers to Cast(ship_date AS DATE) = 2017; annual revenue of over 30000000 refers to annual_revenue > 30000000

    【Evidence】
    shipment in 2017 refers to Cast(ship_date AS DATE) = 2017; annual revenue of over 30000000 refers to annual_revenue > 30000000

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

SQL: SELECT COUNT(COUNTCUSID) FROM ( SELECT COUNT(T1.cust_id) AS COUNTCUSID FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE STRFTIME('%Y', T2.ship_date) = '2017' AND T1.annual_revenue > 30000000 GROUP BY T1.cust_id HAVING COUNT(T2.ship_id) >= 1 ) T3