db_id stringclasses 68 values | question stringlengths 24 325 | evidence stringlengths 0 580 | SQL stringlengths 23 728 |
|---|---|---|---|
menu | Among the menus in which the dish "Clear green turtle" had appeared, how many of them used the dollar as their currency? | Clear green turtle is a name of dish; dollar as currency refers to currency = 'Dollars'; | SELECT SUM(CASE WHEN T3.currency = 'Dollars' THEN 1 ELSE 0 END) 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Clear green turtle' |
menu | Among the menus in which the dish "Clear green turtle" had appeared, how many of them did not support taking out or booking in advance? | Clear green turtle is a name of dish; not support taking out or booking in advance refers to call_number is null; | SELECT SUM(CASE WHEN T4.name = 'Clear green turtle' THEN 1 ELSE 0 END) 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.call_number IS NULL |
menu | Please list the names of all the dishes that appeared on the menu "Zentral Theater Terrace". | Zentral Theater Terrace is a name of menu; | SELECT T4.name 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace' |
menu | Which dish has the highest price on the menu "Zentral Theater Terrace"? Please give its name. | highest price refers to MAX(Price); Zentral Theater Terrace is a name of menu; | SELECT T4.name 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace' ORDER BY T1.price DESC LIMIT 1 |
menu | How many dishes are there on the menu "Zentral Theater Terrace"? | Zentral Theater Terrace is a name of menu; | SELECT SUM(CASE WHEN T3.name = 'Zentral Theater Terrace' THEN 1 ELSE 0 END) 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 |
menu | How many dishes are there in total in the menus with the name "Waldorf Astoria"? | FALSE; | SELECT SUM(CASE WHEN T3.name = 'Waldorf Astoria' THEN 1 ELSE 0 END) 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 |
menu | Please list the IDs of the menus that are DIYs of the restaurant and have the dish "Clear green turtle". | IDs of the menus refers to menu_id; menus that are DIYs of the restaurant refers to sponsor is null; Clear green turtle is a name of dish; | SELECT T2.menu_id 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Clear green turtle' AND T3.sponsor IS NULL |
menu | What is the average page number of the menus that have the dish "Clear green turtle"? | average page number = AVG(page_number); Clear green turtle is a name of dish; | SELECT AVG(T1.page_number) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Clear green turtle' |
menu | What is the average price of the dishes on the menu "Zentral Theater Terrace"? | average price = AVG(price); Zentral Theater Terrace refers to menu; | SELECT SUM(T1.price) / COUNT(T1.price) 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 T3.name = 'Zentral Theater Terrace' |
menu | How many menu items were created on 28th March 2011? | created on 28th March 2011 refers to created_at like '2011-03-28%'; | SELECT COUNT(*) FROM MenuItem WHERE created_at LIKE '2011-03-28%' |
menu | How many dishes are included in the menu page ID 144? | FALSE; | SELECT COUNT(*) FROM MenuItem WHERE menu_page_id = 144 |
menu | How many menus were used in Dutcher House? | Dutcher House refers to location = 'Dutcher House'; | SELECT COUNT(*) FROM Menu WHERE location = 'Dutcher House' |
menu | How many dishes appeared on a menu more than once? | appeared on a menu more than once refers to times_appeared > menus_appeared; | SELECT COUNT(*) FROM Dish WHERE times_appeared > menus_appeared |
menu | How many menus were created for steamship? | steamship refers to venue = 'STEAMSHIP'; | SELECT COUNT(*) FROM Menu WHERE venue = 'STEAMSHIP' |
menu | How many pages were there on the menu created on 17th November 1898? | created on 17th November 1898 refers to date = '1898-11-17'; | SELECT SUM(CASE WHEN T1.date = '1898-11-17' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id |
menu | Name the dishes that were on the menu page ID 174. | FALSE; | SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.menu_page_id = 174 |
menu | List the names and menu page IDs of the dishes that first appeared in 1861. | first appeared in 1861 refers to first_appeared = 1861; | SELECT T2.name, T1.dish_id FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.first_appeared = 1861 |
menu | Among the dishes on menu page ID 7610, list the names and highest prices of the dishes in menu items that were created on 23rd May 2011. | highest prices of the dishes refers to MAX(price); created on 23rd May 2011 refers to created_at like '2011-05-23%'; | SELECT T1.name, T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.created_at LIKE '2011-05-23%' ORDER BY T2.price DESC LIMIT 1 |
menu | List the dishes included on page number 30 with the least in full height. | least in full height refers to MIN(full_height); | SELECT T3.name FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T1.page_number = 30 ORDER BY T1.full_height DESC, T1.full_height ASC LIMIT 1 |
menu | Provide the page IDs and name of the menu which had the highest page count. | page IDs refers to page_number; highest page count refers to MAX(page_count); | SELECT T1.page_number, T2.name FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id ORDER BY T2.page_count DESC LIMIT 1 |
menu | Provide the numbers of the menu item which includes Fresh lobsters in every style and location where that dish was used on a menu. | Fresh lobsters in every style' is a name of dish; location where the dish was used on a menu = (xpos, ypos); | SELECT T2.menu_id, T1.xpos, T1.ypos 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Fresh lobsters in every style' |
menu | List the dishes that appeared at the left upper corner of the CHAS.BRADLEY'S OYSTER & DINING ROOM"s sponsored menu. | appeared at the left upper corner refers to xpos < 0.25 and ypos < 0.25; CHAS.BRADLEY'S OYSTER & DINING ROOM refers to sponsor = 'CHAS.BRADLEY''S OYSTER & DINING ROOM'; | SELECT T4.name 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.sponsor = 'CHAS.BRADLEY''S OYSTER & DINING ROOM' AND T1.xpos < 0.25 AND T1.ypos < 0.25 |
menu | Provide the sponsor and event of the menu which includes Cerealine with Milk. | Cerealine with Milk is a name of dish; | SELECT T3.name, T3.event 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 INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Cerealine with Milk' |
menu | Who is the sponsor of menu with ID 12463? | FALSE; | SELECT sponsor FROM Menu WHERE id = 12463 |
menu | What is the event sponsored by the Republican House? | sponsored by the Republican House refers to sponsor = 'REPUBLICAN HOUSE'; | SELECT event FROM Menu WHERE sponsor = 'REPUBLICAN HOUSE' |
menu | Where is the place that menu with ID 12472 was created for? | place refers to location; | SELECT location FROM Menu WHERE id = 12472 |
menu | What is the occasion for menu with ID 12463? | FALSE; | SELECT occasion FROM Menu WHERE id = 12463 |
menu | List down the locations of menu sponsored by Norddeutscher Lloyd Bremen. | sponsored by Norddeutscher Lloyd Bremen refers to sponsor = 'Norddeutscher Lloyd Bremen'; | SELECT location FROM Menu WHERE sponsor = 'Norddeutscher Lloyd Bremen' |
menu | List down the image IDs for menu located at Manhattan Hotel. | located at Manhattan Hotel refers to location = 'Manhattan Hotel'; | SELECT T1.image_id FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.location = 'Manhattan Hotel' |
menu | State the full height and width for menu called "El Fuerte Del Palmar". | width refers to full_width; El Fuerte Del Palmar is a name of menu; | SELECT T1.full_height, T1.full_width FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.name = 'El Fuerte Del Palmar' |
menu | Is "c02c9a3b-6881-7080-e040-e00a180631aa" the uuid for menu called "The Biltmore"? | if 'c02c9a3b-6881-7080-e040-e00a180631aa' can be found in uuid, it means the 'c02c9a3b-6881-7080-e040-e00a180631aa' is the uuid for the menu called The Biltmore; if 'c02c9a3b-6881-7080-e040-e00a180631aa' can not be found in uuid, it means the 'c02c9a3b-6881-7080-e040-e00a180631aa' is not the uuid for the menu called The Biltmore; The Biltmore is a name of menu; | SELECT CASE WHEN T2.uuid = 'c02c9a3b-6881-7080-e040-e00a180631aa' THEN 'yes' ELSE 'no' END AS yn FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.name = 'The Biltmore' AND T2.uuid = 'c02c9a3b-6881-7080-e040-e00a180631aa' |
menu | State the name of menu with the longest full height. | longest full height refers to MAX(full_height); | SELECT T2.name FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id ORDER BY T1.full_height DESC LIMIT 1 |
menu | What is the page count for menu with page ID of 130? | page ID of 130 refers MenuPage.id = 130; | SELECT T1.page_count FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.id = 130 |
menu | List down the page numbers for menu with dishes on the right upper corner. | on the right upper corner refers to xpos > 0.75 AND ypos < 0.25; | SELECT T2.page_number FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id WHERE T3.xpos > 0.75 AND T3.ypos < 0.25 |
menu | List down the name of dishes from menu created in April. | created in April refers to SUBSTR(created_at, 7, 1) = '4'; | SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE SUBSTR(T1.created_at, 7, 1) = '4' |
menu | List down name of dishes from menu with menu page ID 1389. | FALSE; | SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.menu_page_id = 1389 |
menu | What is the highest price of dishes with menu item ID 1 to 5? | highest price refers to MAX(price); menu item ID 1 to 5 refers to MenuItem.id BETWEEN 1 AND 5; | SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.id BETWEEN 1 AND 5 ORDER BY T2.price DESC LIMIT 1 |
menu | List down the name of dishes that were positioned on the left upper corner. | positioned on the left upper corner refers to xpos < 0.25 AND ypos < 0.25; | SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.xpos < 0.25 AND T2.ypos < 0.25 |
menu | Calculate the total dish count for menu with uuid of "510d47e4-2958-a3d9-e040-e00a18064a99" & "510d47e4-295a-a3d9-e040-e00a18064a99". | total dish count for uuid of '510d47e4-2958-a3d9-e040-e00a18064a99' = SUM(dish_count WHERE uuid = '510d47e4-2958-a3d9-e040-e00a18064a99'); total dish count for uuid of '510d47e4-295a-a3d9-e040-e00a18064a99 = SUM(dish_count WHERE uuid = '510d47e4-295a-a3d9-e040-e00a18064a99'); | SELECT SUM(CASE WHEN T2.uuid = '510d47e4-2958-a3d9-e040-e00a18064a99' THEN T1.dish_count ELSE 0 END) - SUM(CASE WHEN T2.uuid = '510d47e4-295a-a3d9-e040-e00a18064a99' THEN T1.dish_count ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id |
menu | Calculate the total price of items for menu with ID 12882. | total price = SUM(price); | SELECT SUM(T2.price) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id WHERE T1.menu_id = 12882 |
menu | List the top five dishes, by descending order, in terms of highest price. | highest price refers to MAX(highest_price); | SELECT name FROM Dish ORDER BY highest_price DESC LIMIT 5 |
menu | Among the dishes, how many of them are for free? | free refers to lowest_price = 0; | SELECT COUNT(*) FROM Dish WHERE lowest_price = 0 |
menu | What dishes made their first and last appearances in 1855 and 1900, respectively? | first appearance in 1855 refers to first_appeared = 1855; last appearance in 1900 refers to last_appeared = 1900; | SELECT name FROM Dish WHERE first_appeared = 1855 AND last_appeared = 1900 |
menu | How many dishes appear in the right upper corner of the menu page? | appear in the right upper corner of the menu page refers to xpos > 0.75 and ypos < 0.25; | SELECT COUNT(*) FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T1.dish_id = T2.id WHERE T1.xpos > 0.75 AND T1.ypos < 0.25 |
menu | How long has the "Clear Green Turtle" dish appeared on the menu, and tell me when its latest update was? | Clear Green Turtle is a name of dish; how long a dish appeared on the menu = SUBTRACT(last_appeared, first_appeared); latest update refers to latest updated_at; | SELECT T1.last_appeared - T1.first_appeared, T2.updated_at FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle' |
menu | Tally the dishes that have appeared on the menu for more than 100 years. | appeared on the menu for more than 100 years = SUBTRACT(last_appeared, first_appeared) > 100; | SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared > 100 |
menu | How many dishes have appeared on the menu in less than 5 years? | appeared on the menu in less than 5 years = SUBTRACT(last_appeared, first_appeared) < 5; | SELECT COUNT(*) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared < 5 |
menu | Give me the name and menu price of dishes that were free. | dishes that were free refers to lowest_price = 0; | SELECT T2.name, T1.price FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.lowest_price = 0 |
menu | Among the dishes, how many of them were created between 2011-03-31 at 20:24:46 UTC and 2011-04-15 at 23:09:51 UTC. | created between 2011-03-31 at 20:24:46 UTC and 2011-04-15 at 23:09:51 UTC refers to created_at between '2011-03-31 20:24:46 UTC' AND '2011-04-15 23:09:51 UTC'; | SELECT SUM(CASE WHEN T2.created_at BETWEEN '2011-03-31 20:24:46 UTC' AND '2011-04-15 23:09:51 UTC' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id |
menu | Write down the image ID, full height, and full width of the menu that were used in the "100TH ANNIVERSARY OF BIRTH OF DANIEL WEBSTER" event. | FALSE; | SELECT T1.image_id, T1.full_height, T1.full_width FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.event = '100TH ANNIVERSARY OF BIRTH OF DANIEL WEBSTER' |
menu | Under what events was the menu page's full width less than 2000 mm? | full width less than 2000 mm refers to full_width < 2000; | SELECT T1.event FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.full_width = 2000 |
menu | Name the dishes that cost 180,000. | cost 180,000 refers to price = 180000; | SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.price = 180000 |
menu | What is the position coordinate on the page menu of the "Small Hominy" dish and how long did it appear? | position coordinate = xpos, ypos; Small Hominy is a name of dish; how long it appear = SUBTRACT(last_appeared, first_appeared); | SELECT T2.xpos, T2.ypos, T1.last_appeared - T1.first_appeared FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Small Hominy' |
menu | 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. | image area = MULTIPLY(full_height, full_width); | SELECT T1.full_height * T1.full_width, T1.page_number, T1.image_id FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Baked Stuffed Mullet & Sauce Pomard' |
menu | How many dishes appeared more than once on a menu? | appeared more than once on a menu refers to times_appeared > menus_appeared; | SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared |
menu | Which dish has the longest history? | longest history refers to MAX(SUBTRACT(last_appeared, first_appeared)); | SELECT name FROM Dish ORDER BY last_appeared - Dish.first_appeared DESC LIMIT 1 |
menu | On 1887-07-21, what was the event that lead to the creation of menu id 21380? | On 1887-07-21 refers to date = '1887-07-21'; | SELECT event FROM Menu WHERE date = '1887-07-21' AND id = 21380 |
menu | How many pages are there in the "Emil Kuehn" menu? | Emil Kuehn is a name of menu; | SELECT SUM(CASE WHEN T1.name = 'Emil Kuehn' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id |
menu | How many menus include puree of split peas aux croutons? | puree of split peas aux croutons is a name of dish; | SELECT SUM(CASE WHEN T1.name = 'Puree of split peas aux croutons' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id |
menu | What are the names of the dishes with a stable price that were created in April of 2011? | 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'; | SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE SUBSTR(T2.created_at, 1, 4) = '2011' AND SUBSTR(T2.created_at, 7, 1) = '4' AND T1.highest_price IS NULL |
menu | Provide the menu page ids of all the menu that includes mashed potatoes. | mashed potatoes is a name of dish; | SELECT T2.menu_page_id FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Mashed potatoes' |
menu | Among the menus sponsored by Pacific Mail Steamship Company, how many menus have no more than 2 pages? | sponsored by Pacific Mail Steamship Company refers to sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY'; no more than 2 pages refers to COUNT(page_number) < = 2; | SELECT COUNT(*) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'PACIFIC MAIL STEAMSHIP COMPANY' GROUP BY T2.menu_id HAVING COUNT(T2.page_number) <= 2 |
menu | Among the menus that include milk, what is the menu page id of the menu that has the highest price? | milk is a name of dish; highest price refers to MAX(price); | SELECT T1.menu_page_id FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.name = 'Milk' ORDER BY T1.price DESC LIMIT 1 |
menu | What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages? | sponsored by Occidental and Oriental Steamship Company refers to sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY'; highest number of pages refers to MAX(COUNT(page_number)); | SELECT T2.menu_id FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) DESC LIMIT 1 |
menu | What are the names of the dishes shown in the lower right corner of menu page 48706? | shown in the lower right corner refers to xpos > 0.75 AND ypos > 0.75; | SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.xpos > 0.75 AND T1.ypos > 0.75 AND T1.menu_page_id = 48706 |
menu | Among the menus that include baked apples with cream, who is the sponsor of the menu with the highest price? | baked apples with cream is a name of dish; highest price refers to MAX(price); | SELECT T4.sponsor FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id INNER JOIN Menu AS T4 ON T4.id = T1.menu_id WHERE T3.name = 'Baked apples with cream' AND T3.id = 107 ORDER BY T2.price DESC LIMIT 1 |
menu | Please list the IDs of all the menus that are DIYs of the restaurant. | menus that are DIYs of the restaurant refers to sponsor is null; | SELECT id FROM Menu WHERE sponsor IS NULL |
menu | How many menus were created for lunch? | created for lunch refers to event = 'LUNCH'; | SELECT COUNT(*) FROM Menu WHERE event = 'LUNCH' |
menu | Among the menus with over 10 pages, how many of them have over 20 dishes? | menus with over 10 pages refers to page_count > 10; over 20 dishes refers to dish_count > 20; | SELECT COUNT(*) FROM Menu WHERE page_count > 10 AND dish_count > 20 |
menu | What is the ID of the menu with the most number of dishes? | most number of dishes refers to MAX(COUNT(dish_count)); | SELECT id FROM Menu ORDER BY dish_count DESC LIMIT 1 |
menu | How many dishes are there on the menu "Zentral Theater Terrace"? | Zentral Theater Terrace is a name of menu; | SELECT COUNT(*) FROM Menu WHERE name = 'Zentral Theater Terrace' |
menu | What is the image ID of page 1 of the menu "Zentral Theater Terrace"? | page 1 refers to page_number = 1; Zentral Theater Terrace is a name of menu; | SELECT T2.image_id 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 |
menu | To which menu does the menu page image ID5189412 belong? Please give its name. | FALSE; | SELECT T1.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.image_id = 5189412 |
menu | Which menu page has a bigger width, page 1 of "Zentral Theater Terrace" or page 1 of "Young's Hotel"? | 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; | SELECT CASE WHEN SUM(CASE WHEN T1.name = 'Zentral Theater Terrace' THEN T2.full_width ELSE 0 END) - SUM(CASE WHEN T1.name = 'Young''s Hotel' THEN T2.full_width ELSE 0 END) > 0 THEN 'Zentral Theater Terrace' ELSE 'Young''s Hotel' END FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id |
menu | Which menu page of "Ritz Carlton" has the biggest height? | Ritz Carlton is a name of menu; biggest height refers to MAX(full_height); | SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.name = 'Ritz Carlton' ORDER BY T1.full_height DESC LIMIT 1 |
menu | Among the menu pages of "Ritz Carlton", how many of them have a width of over 1000? | Ritz Carlton is a name of menu; width of over 2490 refers to full_width > 1000; | SELECT SUM(CASE WHEN T1.name = 'Ritz Carlton' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.full_width > 1000 |
menu | How many dishes are there on page 1 of menu ID12882? | page 1 refers to page_number = 1; | SELECT SUM(CASE WHEN T1.page_number = 1 THEN 1 ELSE 0 END) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id WHERE T1.menu_id = 12882 |
menu | Please list the names of all the dishes on page 1 of menu ID12882. | page 1 refers to page_number = 1; | SELECT T3.name FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T1.menu_id = 12882 AND T1.page_number = 1 |
menu | Please list the page numbers of all the menu pages on which the dish "Chicken gumbo" had appeared. | Chicken gumbo is a name of dish; | SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo' |
menu | Among the menu pages on which the dish "Chicken gumbo" had appeared, what is the menu ID of the one with the biggest width? | Chicken gumbo is a name of dish; biggest width refers to MAX(full_width); | SELECT T1.id FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo' ORDER BY T1.full_width DESC LIMIT 1 |
menu | For how many times had the dish "Chicken gumbo" appeared on a menu page? | Chicken gumbo is a name of dish; | SELECT SUM(CASE WHEN T1.name = 'Chicken gumbo' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id |
menu | Among the menu pages on which the dish "Paysanne Soup" had appeared, how many of them had a stable price for the dish? | Paysanne Soup is a name of dish; stable price refers to highest_price is null; | SELECT SUM(CASE WHEN T1.name = 'Paysanne Soup' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL |
menu | 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; | 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 |
menu | 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)); | 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 |
shipping | 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) | 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' |
shipping | 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 | 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' |
shipping | How many shipments were ordered by a customer in Florida? | customer in Florida refers to state = 'FL' | 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' |
shipping | 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 | 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' |
shipping | What is the maximum weight being transported to New York during a single shipment? | "New York" is the city_name; maximum weight refers to Max(weight) | SELECT MAX(T1.weight) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'New York' |
shipping | How much more pounds in total were transported to New York than to Chicago? | "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')) | SELECT SUM(CASE WHEN T2.city_name = 'New York' THEN T1.weight ELSE 0 END) - SUM(CASE WHEN T2.city_name = 'Chicago' THEN T1.weight ELSE 0 END) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id |
shipping | Please list the destination cities of all the shipments ordered by S K L Enterprises Inc. | "S K L Enterprises Inc" is the cust_name; destination cities refers to city_name | SELECT DISTINCT T3.city_name FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id WHERE T1.cust_name = 'S K L Enterprises Inc' |
shipping | What is the average weight of the goods being transported on a single shipment ordered by S K L Enterprises Inc? | "S K L Enterprises Inc" is the cust_name; average = Divide (Sum(weight), Count(ship_id)) | SELECT AVG(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' |
shipping | Among all the shipments to Florida, what is the percentage of the shipment to Jacksonville? | "Florida" is the state; "Jacksonville" is city_name; | SELECT CAST(SUM(CASE WHEN T2.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Florida' |
shipping | State the headquarter of the truck which completed shipment no.1045. | 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)' | SELECT T1.make FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = 1045 |
shipping | How many shipments were delivered by the oldest truck model? | oldest truck model refers to Min(model_year) | SELECT COUNT(*) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id GROUP BY T1.model_year ORDER BY T1.model_year ASC LIMIT 1 |
shipping | Who was the customer of shipment no.1275? Give the customer's name. | shipment no. 1275 refers to ship_id = 1275; customer name refers to cust_name | SELECT T1.cust_name FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T2.ship_id = '1275' |
shipping | Where was the destination city of shipment no.1701? | shipment no. 1701 refers to ship_id = 1701; destination city refers to city_name | SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1701' |
shipping | Give the name of the driver of shipment no.1021. | shipment no. 1021 refers to ship_id = 1021; name refers to first_name, last_name | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1021' |
shipping | Tell the name of the driver who received the shipment on 2017/11/5. | shipment on 2017/11/5 refers to ship_date = '2017-11/05'; name refers to first_name, last_name | SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_date = '2017-11-05' |
shipping | Show the population of the city which was the destination of shipment no.1398. | shipment no. 1398 refers to ship_id = 1398 | SELECT T2.population FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1398' |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.