1sf/bird-sql-train-with-schema huggingface dataset:
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: List down the name of dishes that were positioned on the left upper corner.
Evidence: positioned on the left upper corner refers to xpos < 0.25 AND ypos < 0.25;
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Calculate the total dish count for menu with uuid of "510d47e4-2958-a3d9-e040-e00a18064a99" & "510d47e4-295a-a3d9-e040-e00a18064a99".
Evidence: 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');
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Calculate the total price of items for menu with ID 12882.
Evidence: total price = SUM(price);
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: List the top five dishes, by descending order, in terms of highest price.
Evidence: highest price refers to MAX(highest_price);
SQL: SELECT name FROM Dish ORDER BY highest_price DESC LIMIT 5
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Among the dishes, how many of them are for free?
Evidence: free refers to lowest_price = 0;
SQL: SELECT COUNT(*) FROM Dish WHERE lowest_price = 0
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: What dishes made their first and last appearances in 1855 and 1900, respectively?
Evidence: first appearance in 1855 refers to first_appeared = 1855; last appearance in 1900 refers to last_appeared = 1900;
SQL: SELECT name FROM Dish WHERE first_appeared = 1855 AND last_appeared = 1900
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Write down the top ten menus with the highest dish count.
Evidence: highest dish count refers to MAX(dish_count);
SQL: SELECT name FROM Menu GROUP BY name ORDER BY dish_count DESC LIMIT 10
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How many dishes appear in the right upper corner of the menu page?
Evidence: appear in the right upper corner of the menu page refers to xpos > 0.75 and ypos < 0.25;
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How long has the "Clear Green Turtle" dish appeared on the menu, and tell me when its latest update was?
Evidence: 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;
SQL: 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'
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Tally the dishes that have appeared on the menu for more than 100 years.
Evidence: appeared on the menu for more than 100 years = SUBTRACT(last_appeared, first_appeared) > 100;
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How many dishes have appeared on the menu in less than 5 years?
Evidence: appeared on the menu in less than 5 years = SUBTRACT(last_appeared, first_appeared) < 5;
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Give me the name and menu price of dishes that were free.
Evidence: dishes that were free refers to lowest_price = 0;
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How much does the dish on page 2 of menu ID 12474 cost?
Evidence: page 2 refers to page_number = 2;
SQL: SELECT T1.price FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T2.id = T1.menu_page_id WHERE T2.menu_id = 12474 AND T2.page_number = 2
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: 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.
Evidence: 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';
SQL: 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
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Who are the sponsors of the menu whose image full height is more than 10000 mm?
Evidence: image full height is more than 10000 mm refers to full_height > 10000;
SQL: SELECT T2.sponsor FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T1.full_height = 10000
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: 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.
Evidence: FALSE;
SQL: 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'
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Under what events was the menu page's full width less than 2000 mm?
Evidence: full width less than 2000 mm refers to full_width < 2000;
SQL: SELECT T1.event FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.full_width = 2000
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Name the dishes that cost 180,000.
Evidence: cost 180,000 refers to price = 180000;
SQL: SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.price = 180000
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: What is the position coordinate on the page menu of the "Small Hominy" dish and how long did it appear?
Evidence: position coordinate = xpos, ypos; Small Hominy is a name of dish; how long it appear = SUBTRACT(last_appeared, first_appeared);
SQL: 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'
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
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.
Evidence: image area = MULTIPLY(full_height, full_width);
SQL: 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'
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How many dishes appeared more than once on a menu?
Evidence: appeared more than once on a menu refers to times_appeared > menus_appeared;
SQL: SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: How many menus sponsored by Krogs Fiske Restaurant were created in April 2015?
Evidence: sponsored by Krogs Fiske Restaurant refers to sponsor = 'Krogs Fiskerestaurant'; created in April 2015 refers to date like '2015-04%';
SQL: SELECT COUNT(*) FROM Menu WHERE date LIKE '2015-04%' AND sponsor = 'Krogs Fiskerestaurant'
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: Which dish has the longest history?
Evidence: longest history refers to MAX(SUBTRACT(last_appeared, first_appeared));
SQL: SELECT name FROM Dish ORDER BY last_appeared - Dish.first_appeared DESC LIMIT 1
Database: menu
Tables: Dish, Menu, MenuPage, MenuItem
Columns (table index, column name): -1, *, 0, id, 0, name, 0, description, 0, menus_appeared, 0, times_appeared, 0, first_appeared, 0, last_appeared, 0, lowest_price, 0, highest_price, 1, id, 1, name, 1, sponsor, 1, event, 1, venue, 1, place, 1, physical_description, 1, occasion, 1, notes, 1, call_number, 1, keywords, 1, language, 1, date, 1, location, 1, location_type, 1, currency, 1, currency_symbol, 1, status, 1, page_count, 1, dish_count, 2, id, 2, menu_id, 2, page_number, 2, image_id, 2, full_height, 2, full_width, 2, uuid, 3, id, 3, menu_page_id, 3, price, 3, high_price, 3, dish_id, 3, created_at, 3, updated_at, 3, xpos, 3, ypos
Question: On 1887-07-21, what was the event that lead to the creation of menu id 21380?
Evidence: On 1887-07-21 refers to date = '1887-07-21';
SQL: SELECT event FROM Menu WHERE date = '1887-07-21' AND id = 21380