Chinastark/bird_dataset huggingface dataset:
Database: menu
Note: image area = MULTIPLY(full_height, full_width);
Question: Calculate the image area of the page menu for the dish named "Baked Stuffed Mullet & Sauce Pomard". Please include the page number and image ID.
SQL: SELECT menupage.full_height * menupage.full_width, menupage.page_number, menupage.image_id FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE dish.name = 'Baked Stuffed Mullet & Sauce Pomard'
Database: menu
Note: appeared more than once on a menu refers to times_appeared > menus_appeared;
Question: How many dishes appeared more than once on a menu?
SQL: SELECT count(*) FROM dish WHERE times_appeared > dish.menus_appeared
Database: menu
Note: sponsored by Krogs Fiske Restaurant refers to sponsor = 'Krogs Fiskerestaurant'; created in April 2015 refers to date like '2015-04%';
Question: How many menus sponsored by Krogs Fiske Restaurant were created in April 2015?
SQL: SELECT count(*) FROM menu WHERE date LIKE '2015-04%' AND sponsor = 'Krogs Fiskerestaurant'
Database: menu
Note: longest history refers to MAX(SUBTRACT(last_appeared, first_appeared));
Question: Which dish has the longest history?
SQL: SELECT name FROM dish ORDER BY last_appeared - dish.first_appeared DESC LIMIT 1
Database: menu
Note: On 1887-07-21 refers to date = '1887-07-21';
Question: On 1887-07-21, what was the event that lead to the creation of menu id 21380?
SQL: SELECT event FROM menu WHERE date = '1887-07-21' AND id = 21380
Database: menu
Note: Emil Kuehn is a name of menu;
Question: How many pages are there in the "Emil Kuehn" menu?
SQL: SELECT sum(CASE WHEN menu.name = 'Emil Kuehn' THEN 1 ELSE 0 END) FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id
Database: menu
Note: puree of split peas aux croutons is a name of dish;
Question: How many menus include puree of split peas aux croutons?
SQL: SELECT sum(CASE WHEN dish.name = 'Puree of split peas aux croutons' THEN 1 ELSE 0 END) FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id
Database: menu
Note: dishes with a stable price refers to highest_price is null; created in April of 2011 refers to SUBSTR(created_at,1,4) = '2011' and SUBSTR(created_at, 7, 1) = '4';
Question: What are the names of the dishes with a stable price that were created in April of 2011?
SQL: SELECT dish.name FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id WHERE substr(menuitem.created_at, 1, 4) = '2011' AND substr(menuitem.created_at, 7, 1) = '4' AND dish.highest_price IS NULL
Database: menu
Note: highest number of pages refers to MAX(COUNT(page_number));
Question: What is the name of the menu with the highest number of pages?
SQL: SELECT menu.name FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id GROUP BY menupage.menu_id ORDER BY count(menupage.page_number) DESC LIMIT 1
Database: menu
Note: mashed potatoes is a name of dish;
Question: Provide the menu page ids of all the menu that includes mashed potatoes.
SQL: SELECT menuitem.menu_page_id FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id WHERE dish.name = 'Mashed potatoes'
Database: menu
Note: sponsored by Pacific Mail Steamship Company refers to sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY'; no more than 2 pages refers to COUNT(page_number) <= 2;
Question: Among the menus sponsored by Pacific Mail Steamship Company, how many menus have no more than 2 pages?
SQL: SELECT count(*) FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menu.sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY' GROUP BY menupage.menu_id HAVING count(menupage.page_number) <= 2
Database: menu
Note: milk is a name of dish; highest price refers to MAX(price);
Question: Among the menus that include milk, what is the menu page id of the menu that has the highest price?
SQL: SELECT menuitem.menu_page_id FROM menuitem INNER JOIN dish ON dish.id = menuitem.dish_id WHERE dish.name = 'Milk' ORDER BY menuitem.price DESC LIMIT 1
Database: menu
Note: sponsored by Occidental and Oriental Steamship Company refers to sponsor = 'OCCidENTAL & ORIENTAL STEAMSHIP COMPANY'; highest number of pages refers to MAX(COUNT(page_number));
Question: What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages?
SQL: SELECT menupage.menu_id FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menu.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY menupage.menu_id ORDER BY count(menupage.page_number) DESC LIMIT 1
Database: menu
Note: positions = xpos, ypos; breaded veal cutlet with peas is a name of dish;
Question: List the positions of the dish "breaded veal cutlet with peas" on every menu where it appeared.
SQL: SELECT menuitem.xpos, menuitem.ypos FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id WHERE dish.name = 'breaded veal cutlet with peas'
Database: menu
Note: shown in the lower right corner refers to xpos > 0.75 AND ypos > 0.75;
Question: What are the names of the dishes shown in the lower right corner of menu page 48706?
SQL: SELECT dish.name FROM menuitem INNER JOIN dish ON dish.id = menuitem.dish_id WHERE menuitem.xpos > 0.75 AND menuitem.ypos > 0.75 AND menuitem.menu_page_id = 48706
Database: menu
Note: sponsored by The Society of Cumberland refers to sponsor = 'THE SOCIETY OF THE CUMBERLAND'; created for the 19th reunion refers to event = '19NTH REUNION'; Grand Pacific Hotel in Chicago, Illinois refers to place = 'GRAND PACIFIC HOTEL, CHICAGO, ILL';
Question: What are the names of the dishes in the menu sponsored by The Society of Cumberland that was created for the 19th reunion at Grand Pacific Hotel in Chicago, Illinois?
SQL: SELECT dish.name FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE menu.sponsor = 'THE SOCIETY OF THE CUMBERLAND' AND menu.event = '19NTH REUNION' AND menu.place = 'GRAND PACIFIC HOTEL,CHICAGO,ILL'
Database: menu
Note: baked apples with cream is a name of dish; highest price refers to MAX(price);
Question: Among the menus that include baked apples with cream, who is the sponsor of the menu with the highest price?
SQL: SELECT menu.sponsor FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id INNER JOIN menu ON menu.id = menupage.menu_id WHERE dish.name = 'Baked apples with cream' AND dish.id = 107 ORDER BY menuitem.price DESC LIMIT 1
Database: menu
Note: average number of dishes per menu = DIVidE(COUNT(dish_id), COUNT(menu_page_id)); Souper de Luxe is a name of menu; dish that appeared the most in all of its menus refers to MAX(COUNT(dish_id));
Question: What is the average number of dishes per menu in the Souper de Luxe menus? Identify what is the name of the dish that appeared the most in all of its menus.
SQL: SELECT count(*), menuitem.dish_id FROM menuitem INNER JOIN menupage ON menuitem.menu_page_id = menupage.id INNER JOIN menu ON menupage.menu_id = menu.id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE menu.name = 'Souper de Luxe' GROUP BY menu.id ORDER BY count(menuitem.dish_id) DESC LIMIT 1
Database: menu
Note: menus that are DIYs of the restaurant refers to sponsor is null;
Question: Please list the IDs of all the menus that are DIYs of the restaurant.
SQL: SELECT id FROM menu WHERE sponsor IS NULL
Database: menu
Note: created for lunch refers to event = 'LUNCH';
Question: How many menus were created for lunch?
SQL: SELECT count(*) FROM menu WHERE event = 'LUNCH'
Database: menu
Note: menus with over 10 pages refers to page_count > 10; over 20 dishes refers to dish_count > 20;
Question: Among the menus with over 10 pages, how many of them have over 20 dishes?
SQL: SELECT count(*) FROM menu WHERE page_count > 10 AND dish_count > 20
Database: menu
Note: most number of dishes refers to MAX(COUNT(dish_count));
Question: What is the ID of the menu with the most number of dishes?
SQL: SELECT id FROM menu ORDER BY dish_count DESC LIMIT 1
Database: menu
Note: Zentral Theater Terrace is a name of menu;
Question: How many dishes are there on the menu "Zentral Theater Terrace"?
SQL: SELECT count(*) FROM menu WHERE name = 'Zentral Theater Terrace'
Database: menu
Note: did not support taking out or booking in advance refers to call_number is null; created before 1950 refers to strftime('%Y', date) < '1950';
Question: Among the menus that did not support taking out or booking in advance, how many of them were created before 1950?
SQL: SELECT count(*) FROM menu WHERE call_number IS NULL AND strftime('%Y', date) < '1950'
Database: menu
Note: page 1 refers to page_number = 1; Zentral Theater Terrace is a name of menu;
Question: What is the image ID of page 1 of the menu "Zentral Theater Terrace"?
SQL: SELECT menupage.image_id FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menu.name = 'Zentral Theater Terrace' AND menupage.page_number = 1
Database: menu
Note: FALSE;
Question: To which menu does the menu page image ID5189412 belong? Please give its name.
SQL: SELECT menu.name FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menupage.image_id = 5189412
Database: menu
Note: if SUM(full_width where page_number = 1 AND menu.name = 'Zentral Theater Terrace') > SUM(full_width where page_number = 1 AND menu.name = 'Young''s Hotel'), it means Zentral Theater Terrace menu page is bigger than Young's Hotel; if SUM(full_width WHERE page_number = 1 AND menu.name = 'Young''s Hotel') < SUM(full_width WHERE page_number = 1 AND menu.name = 'Zentral Theater Terrace'), it means Young's Hotel menu page is bigger than Zentral Theater Terrace;
Question: Which menu page has a bigger width, page 1 of "Zentral Theater Terrace" or page 1 of "Young's Hotel"?
SQL: SELECT CASE WHEN sum(CASE WHEN menu.name = 'Zentral Theater Terrace' THEN menupage.full_width ELSE 0 END) - sum(CASE WHEN menu.name = 'Young''s Hotel' THEN menupage.full_width ELSE 0 END) > 0 THEN 'Zentral Theater Terrace' ELSE 'Young''s Hotel' END FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id
Database: menu
Note: Ritz Carlton is a name of menu; biggest height refers to MAX(full_height);
Question: Which menu page of "Ritz Carlton" has the biggest height?
SQL: SELECT menupage.page_number FROM menupage INNER JOIN menu ON menu.id = menupage.menu_id WHERE menu.name = 'Ritz Carlton' ORDER BY menupage.full_height DESC LIMIT 1
Database: menu
Note: Ritz Carlton is a name of menu; width of over 2490 refers to full_width > 1000;
Question: Among the menu pages of "Ritz Carlton", how many of them have a width of over 1000?
SQL: SELECT sum(CASE WHEN menu.name = 'Ritz Carlton' THEN 1 ELSE 0 END) FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menupage.full_width > 1000
Database: menu
Note: page 1 refers to page_number = 1;
Question: How many dishes are there on page 1 of menu ID12882?
SQL: SELECT sum(CASE WHEN menupage.page_number = 1 THEN 1 ELSE 0 END) FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id WHERE menupage.menu_id = 12882
Database: menu
Note: page 1 refers to page_number = 1;
Question: Please list the names of all the dishes on page 1 of menu ID12882.
SQL: SELECT dish.name FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE menupage.menu_id = 12882 AND menupage.page_number = 1
Database: menu
Note: Chicken gumbo is a name of dish;
Question: Please list the page numbers of all the menu pages on which the dish "Chicken gumbo" had appeared.
SQL: SELECT menupage.page_number FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE dish.name = 'Chicken gumbo'
Database: menu
Note: Chicken gumbo is a name of dish; biggest width refers to MAX(full_width);
Question: Among the menu pages on which the dish "Chicken gumbo" had appeared, what is the menu ID of the one with the biggest width?
SQL: SELECT menupage.id FROM menupage INNER JOIN menuitem ON menupage.id = menuitem.menu_page_id INNER JOIN dish ON menuitem.dish_id = dish.id WHERE dish.name = 'Chicken gumbo' ORDER BY menupage.full_width DESC LIMIT 1
Database: menu
Note: Chicken gumbo is a name of dish;
Question: For how many times had the dish "Chicken gumbo" appeared on a menu page?
SQL: SELECT sum(CASE WHEN dish.name = 'Chicken gumbo' THEN 1 ELSE 0 END) FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id
Database: menu
Note: Paysanne Soup is a name of dish; stable price refers to highest_price is null;
Question: Among the menu pages on which the dish "Paysanne Soup" had appeared, how many of them had a stable price for the dish?
SQL: SELECT sum(CASE WHEN dish.name = 'Paysanne Soup' THEN 1 ELSE 0 END) FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id WHERE dish.highest_price IS NULL
Database: menu
Note: highest price refers to MAX(price); Chicken gumbo is a name of dish;
Question: What is the highest price of the dish "Chicken gumbo" on a menu page?
SQL: SELECT menuitem.price FROM dish INNER JOIN menuitem ON dish.id = menuitem.dish_id WHERE dish.name = 'Chicken gumbo' ORDER BY menuitem.price DESC LIMIT 1
Database: menu
Note: how much space = MULTIPLY(full_height, full_width); Zentral Theater Terrace is a name of menu;
Question: How much space does page 1 of the menu "Zentral Theater Terrace" cover?
SQL: SELECT menupage.full_height * menupage.full_width FROM menu INNER JOIN menupage ON menu.id = menupage.menu_id WHERE menu.name = 'Zentral Theater Terrace' AND menupage.page_number = 1
Database: menu
Note: average number of dishes per menu = DIVidE(COUNT(dish_id), COUNT(page_count));
Question: What is the average number of dishes per menu page of menu ID12882?
SQL: SELECT cast(count(dish_id) AS REAL) / count(menu.page_count) FROM menuitem INNER JOIN menupage ON menuitem.menu_page_id = menupage.id INNER JOIN menu ON menupage.menu_id = menu.id WHERE menupage.menu_id = 12882
Database: shipping
Note: "S K L Enterprises Inc" is the cust_name; in 2017 refers to Cast(ship_date AS DATE) = 2017;
Question: How many shipments were ordered by S K L Enterprises Inc in 2017?
SQL: SELECT count(shipment.ship_id) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_name = 'S K L Enterprises Inc' AND strftime('%Y', shipment.ship_date) = '2017'
Database: shipping
Note: "S K L Enterprises Inc" is the cust_name; total number of pounds refers to Sum(weight);
Question: What is the total number of pounds being transported for S K L Enterprises Inc?
SQL: SELECT sum(shipment.weight) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_name = 'S K L Enterprises Inc'
Database: shipping
Note: "S K L Enterprises Inc" is the cust_name;
Question: Among the shipments done by Sue Newell, how many of them are for S K L Enterprises Inc?
SQL: SELECT count(*) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE customer.cust_name = 'S K L Enterprises Inc' AND driver.first_name = 'Sue' AND driver.last_name = 'Newell'
Database: shipping
Note: customer in Florida refers to state = 'FL';
Question: How many shipments were ordered by a customer in Florida?
SQL: SELECT count(customer.cust_id) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.state = 'FL'
Database: shipping
Note: "retailer" is the cust_type;  IDs of shipments refers to ship_id;
Question: Please list the IDs of all the shipments made by a retailer customer.
SQL: SELECT shipment.ship_id FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_type = 'retailer'
Database: shipping
Note: shipment in 2017 refers to Cast(ship_date AS DATE) = 2017; annual revenue of over 30000000 refers to annual_revenue > 30000000;
Question: Among the customers having at least one shipment in 2017, how many of them have an annual revenue of over 30000000?
SQL: SELECT count(countcusid) FROM ( SELECT count(customer.cust_id) AS countcusid FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE strftime('%Y', shipment.ship_date) = '2017' AND customer.annual_revenue > 30000000 GROUP BY customer.cust_id HAVING count(shipment.ship_id) >= 1 ) t3
Database: shipping
Note: in 2017 refers to Cast(ship_date AS DATE) = 2017;
Question: How many shipments in 2017 were done by Sue Newell?
SQL: SELECT count(*) FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE strftime('%Y', shipment.ship_date) = '2017' AND driver.first_name = 'Sue' AND driver.last_name = 'Newell'
Database: shipping
Note: driver refers to driver_id; full name refers to first_name, last_name; in 2017 refers to Cast(ship_date AS DATE) = 2017; Most shipment refers to Max(Sum(weight));
Question: What is the full name of the driver that has done the most shipments in 2017?
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE strftime('%Y', shipment.ship_date) = '2017' GROUP BY driver.first_name, driver.last_name ORDER BY count(*) DESC LIMIT 1
Database: shipping
Note: in 2017 refers to Cast(ship_date AS DATE) = 2017; 'New Jersey' is the state;
Question: Among the shipments in 2017, how many of them have the destination in New Jersey?
SQL: SELECT count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE strftime('%Y', shipment.ship_date) = '2017' AND city.state = 'New Jersey'
Database: shipping
Note: "New York" is the city_name; maximum weight refers to Max(weight);
Question: What is the maximum weight being transported to New York during a single shipment?
SQL: SELECT max(shipment.weight) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE city.city_name = 'New York'
Database: shipping
Note: "New York" and "Chicago" are both city_name; more pounds in total refers to Subtract (Sum(weight where city_name = 'New York'), Sum(weight where city_name = 'Chicago'));
Question: How much more pounds in total were transported to New York than to Chicago?
SQL: SELECT sum(CASE WHEN city.city_name = 'New York' THEN shipment.weight ELSE 0 END) - sum(CASE WHEN city.city_name = 'Chicago' THEN shipment.weight ELSE 0 END) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id
Database: shipping
Note: "S K L Enterprises Inc" is the cust_name; destination cities refers to city_name;
Question: Please list the destination cities of all the shipments ordered by S K L Enterprises Inc.
SQL: SELECT DISTINCT city.city_name FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id INNER JOIN city ON city.city_id = shipment.city_id WHERE customer.cust_name = 'S K L Enterprises Inc'
Database: shipping
Note: "S K L Enterprises Inc" is the cust_name; average = Divide (Sum(weight), Count(ship_id));
Question: What is the average weight of the goods being transported on a single shipment ordered by S K L Enterprises Inc?
SQL: SELECT avg(shipment.weight) FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE customer.cust_name = 'S K L Enterprises Inc'
Database: shipping
Note: "Florida" is the state; "Jacksonville" is city_name;
Question: Among all the shipments to Florida, what is the percentage of the shipment to Jacksonville?
SQL: SELECT cast(sum(CASE WHEN city.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS REAL) * 100 / count(*) FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE city.state = 'Florida'
Database: shipping
Note: shipment no. 1045 refers to ship_id = 1045; headquarter refers to if make = 'Peterbit', then 'Texax(TX)', if make = 'Mack', then 'North Carolina (NC)'; if make = 'Kenworth', then 'Washington (WA)';
Question: State the headquarter of the truck which completed shipment no.1045.
SQL: SELECT truck.make FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id WHERE shipment.ship_id = 1045
Database: shipping
Note: oldest truck model refers to Min(model_year);
Question: How many shipments were delivered by the oldest truck model?
SQL: SELECT count(*) FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id GROUP BY truck.model_year ORDER BY truck.model_year ASC LIMIT 1
Database: shipping
Note: shipment no. 1275 refers to ship_id = 1275; customer name refers to cust_name;
Question: Who was the customer of shipment no.1275? Give the customer's name.
SQL: SELECT customer.cust_name FROM customer INNER JOIN shipment ON customer.cust_id = shipment.cust_id WHERE shipment.ship_id = '1275'
Database: shipping
Note: shipment no. 1701 refers to ship_id = 1701; destination city refers to city_name;
Question: Where was the destination city of shipment no.1701?
SQL: SELECT city.city_name FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE shipment.ship_id = '1701'
Database: shipping
Note: shipment no. 1021 refers to ship_id = 1021; name refers to first_name, last_name;
Question: Give the name of the driver of shipment no.1021.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_id = '1021'
Database: shipping
Note: shipment on 2017/11/5 refers to ship_date = '2017-11/05'; name refers to first_name, last_name;
Question: Tell the name of the driver who received the shipment on 2017/11/5.
SQL: SELECT driver.first_name, driver.last_name FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE shipment.ship_date = '2017-11-05'
Database: shipping
Note: shipment no. 1398 refers to ship_id = 1398;
Question: Show the population of the city which was the destination of shipment no.1398.
SQL: SELECT city.population FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE shipment.ship_id = '1398'
Database: shipping
Note: "South Carolina" refers to state = 'SC'; first shipment refers to Min(ship_date);
Question: Provide the ship date of the first shipment to customers in South Carolina.
SQL: SELECT min(shipment.ship_date) FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id WHERE customer.state = 'SC'
Database: shipping
Note: on 2017/9/25 refers to ship_date = '2017-09-25';
Question: For the shipment received by Leszek Kieltyka on 2017/9/25, what was its weight?
SQL: SELECT shipment.weight FROM shipment INNER JOIN driver ON shipment.driver_id = driver.driver_id WHERE driver.first_name = 'Leszek' AND driver.last_name = 'Kieltyka' AND shipment.ship_date = '2017-09-25'
Database: shipping
Note: shipment no. 1346 refers to ship_id = 1346;
Question: What is the area of the destination city of shipment No.1346?
SQL: SELECT city.area FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE shipment.ship_id = '1346'
Database: shipping
Note: "U-haul Center Of N Syracuse" is the cust_name; on 2016/9/21 refers to ship_date = '2016/09/21';
Question: Provide the weight of the shipment to U-haul Center Of N Syracuse on 2016/9/21.
SQL: SELECT shipment.weight FROM shipment INNER JOIN customer ON shipment.cust_id = customer.cust_id WHERE customer.cust_name = 'U-haul Center Of N Syracuse' AND shipment.ship_date = '2016-09-21'
Database: shipping
Note: truck no. 3 refers to truck_id = 3; on 2016/9/19 refers to ship_date = '2016-09-19'; full name refers to first_name, last_name;
Question: Who was the driver of truck no.3 on 2016/9/19? Tell the full name.
SQL: SELECT driver.first_name, driver.last_name FROM truck INNER JOIN shipment ON truck.truck_id = shipment.truck_id INNER JOIN driver ON driver.driver_id = shipment.driver_id WHERE truck.truck_id = '3' AND shipment.ship_date = '2016-09-19'
Database: shipping
Note: shipment no. 1369 refers to ship_id = 1369; population density refers to Divide (area, population);
Question: Calculate the population density of the city as the destination of shipment no.1369.
SQL: SELECT city.area / city.population FROM shipment INNER JOIN city ON shipment.city_id = city.city_id WHERE shipment.ship_id = '1369'