QIAN-ME/bird_schema_data huggingface dataset:
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Among the employee names, what is the most common middle initial? most common middle initial refers to MAX(COUNT(MiddleInitial));

    【Evidence】
    most common middle initial refers to MAX(COUNT(MiddleInitial));

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

SQL: SELECT MiddleInitial FROM Employees GROUP BY MiddleInitial ORDER BY COUNT(MiddleInitial) DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    What is the average price of products that cost between 100 and 200? average price = DIVIDE(SUM(Price, COUNT(Price))); cost refers to Price; Price BETWEEN 100 AND 200;

    【Evidence】
    average price = DIVIDE(SUM(Price, COUNT(Price))); cost refers to Price; Price BETWEEN 100 AND 200;

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

SQL: SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Find and list the full name of customers who bought products above-average quantity. full name of the customer = FirstName, MiddleInitial, LastName; above-average quantity = Quantity > AVG(Quantity);

    【Evidence】
    full name of the customer = FirstName, MiddleInitial, LastName; above-average quantity = Quantity > AVG(Quantity);

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

SQL: SELECT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.Quantity HAVING T1.Quantity > ( SELECT AVG(Quantity) FROM Sales )
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Give the full name of the customer who bought the most amount of products. full name of the customer = FirstName, MiddleInitial, LastName; most amount of products refers to MAX(MULTIPLY(Quantity, Price));

    【Evidence】
    full name of the customer = FirstName, MiddleInitial, LastName; most amount of products refers to MAX(MULTIPLY(Quantity, Price));

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

SQL: SELECT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID ORDER BY T2.Quantity * T1.Price DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Of the employees who sold Blade, who has the most amount of sales? Blade' is name of product; most amount of sales refers to MAX(MULTIPLY(Quantity, Price));

    【Evidence】
    Blade' is name of product; most amount of sales refers to MAX(MULTIPLY(Quantity, Price));

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

SQL: SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID ORDER BY T2.Quantity * T3.Price DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    List the full name of customers who spend more than 50,000 in descending order the amount spend. full name of the customer = FirstName, MiddleInitial, LastName; more than 50,000 in the amount refers to MULTIPLY(Quantity, Price) > 50000;

    【Evidence】
    full name of the customer = FirstName, MiddleInitial, LastName; more than 50,000 in the amount refers to MULTIPLY(Quantity, Price) > 50000;

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

SQL: SELECT DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.Quantity * T1.Price > 50000
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Name the product that sold the most quantity. most quantity refers to MAX(Quantity);

    【Evidence】
    most quantity refers to MAX(Quantity);

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

SQL: SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity DESC LIMIT 1
You are now a sqlite data analyst, and you are given a database schema as follows:

    【Schema】
    【DB_ID】 sales
【Schema】
# Table: Employees
[
(EmployeeID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Abraham, Reginald, Cheryl]),
(MiddleInitial:TEXT, Examples: [e, l, a]),
(LastName:TEXT, Examples: [Bennet, Blotchet-Halls, Carson])
]
# Table: Products
[
(ProductID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(Name:TEXT, Examples: [Adjustable Race, Bearing Ball, BB Ball Bearing]),
(Price:REAL, Examples: [1.6, 0.8, 2.4])
]
# Table: Sales
[
(SalesID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(SalesPersonID:INTEGER, Examples: [17, 5, 8]),
(CustomerID:INTEGER, Examples: [10482, 1964, 12300]),
(ProductID:INTEGER, Examples: [500, 306, 123]),
(Quantity:INTEGER, Examples: [500, 810, 123])
]
# Table: Customers
[
(CustomerID:INTEGER, Primary Key, Examples: [1, 2, 3]),
(FirstName:TEXT, Examples: [Aaron, Abby, Abe]),
(MiddleInitial:TEXT, Examples: [A, B, C]),
(LastName:TEXT, Examples: [Alexander, Bryant, Butler])
]
【Foreign keys】
Sales.SalesPersonID=Employees.EmployeeID
Sales.CustomerID=Customers.CustomerID
Sales.ProductID=Products.ProductID

    【Question】
    Find and list the products that sold below the average quantity. below the average quantity refers to Quantity < AVG(Quantity);

    【Evidence】
    below the average quantity refers to Quantity < AVG(Quantity);

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

SQL: SELECT DISTINCT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Quantity < ( SELECT AVG(Quantity) FROM Sales )
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 many dishes do not have correct data for the year in which it appeared first? do not have correct data refers to first_appeared < 1851 or first_appeared > 2012;

    【Evidence】
    do not have correct data refers to first_appeared < 1851 or first_appeared > 2012;

    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 Dish WHERE first_appeared < 1851 OR first_appeared > 2012
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】
    Among all the dishes that were once free, what is the name of the dish that had appeared on most menus? dishes that were once free refers to lowest_price = 0; appeared on most menus refers to MAX(menus_appeared);

    【Evidence】
    dishes that were once free refers to lowest_price = 0; appeared on most menus refers to MAX(menus_appeared);

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

SQL: SELECT name FROM Dish WHERE lowest_price = 0 ORDER BY menus_appeared DESC LIMIT 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】
    How many menus with the name "Waldorf Astoria" have 4 pages? 4 pages refers to page_count = 4;

    【Evidence】
    4 pages refers to page_count = 4;

    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 Menu WHERE name = 'Waldorf Astoria' AND page_count = 4