Chinastark/bird_dataset huggingface dataset:
Database: sales
Question: List the full name of the customer who purchased the most quantity of products.
Evidence: full name of the customer = FirstName, LastName; most quantity refers to MAX(Quantity);
SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID ORDER BY T2.Quantity DESC LIMIT 1
Database: sales
Question: What is the name of the product that is most sold by sale person id 20?
Evidence: most sold refers to MAX(Quantity);
SQL: SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 20 ORDER BY T2.Quantity DESC LIMIT 1
Database: sales
Question: List the first names of employees with trading quantity for more than 500.
Evidence: trading quantity for more than 500 refers to Quantity > 500;
SQL: SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.Quantity > 500
Database: sales
Question: List the first names of customers who have purchased products from sale person id 1.
SQL: SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1
Database: sales
Question: Calculate the total trading quantity of Abraham sold to Aaron Alexander.
Evidence: total trading quantity = SUM(Quantity WHERE Employees.FirstName = 'Abraham' AND Customers.FirstName = 'Aaron' AND Customers.LastName = 'Alexander');
SQL: SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T2.SalesPersonID = 1 AND T1.FirstName = 'Aaron' AND T1.LastName = 'Alexander' AND T3.FirstName = 'Abraham'
Database: sales
Question: List the full names of customers who have purchased products in quantity over 600.
Evidence: full names of customers = FirstName, LastName; quantity over 600 refers to quantity > 600;
SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600
Database: sales
Question: Among the customers whose first name is Cameron, who bought the product in the most quantity?
Evidence: most quantity refers to MAX(Quantity); who refers to FirstName, LastName;
SQL: SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Cameron' ORDER BY T2.Quantity DESC LIMIT 1
Database: sales
Question: Please provide sales ID for products named Hex Nut with a price greater than 100.
Evidence: price greater than 100 refers to price > 100;
SQL: SELECT T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Hex Nut%' AND T1.Price > 100
Database: sales
Question: Identify customer IDs who bought products priced from 1000 to 2000.
Evidence: priced from 1000 to 2000 refers to Price BETWEEN 1000 AND 2000;
SQL: SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 1000 AND 2000
Database: sales
Question: Calculate the total quantity of products that are gifts.
Evidence: total quantity = SUM(Quantity); gifts refers to Price = 0;
SQL: SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price = 0
Database: sales
Question: Calculate the quantity percentage of the gift products in the total trading quantity.
Evidence: percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Price = 0), SUM(Quantity)), 1.0); gift products refers to Price = 0;
SQL: SELECT CAST(SUM(IIF(T1.Price = 0, T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity)FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID
Database: sales
Question: Calculate the percentage of sold blades in the total number of transactions.
Evidence: percentage = MULTIPLY(DIVIDE(SUM(Quantity WHERE Name = 'Blade'), SUM(Quantity)), 1.0); 'blades' refers to name of product;
SQL: SELECT CAST(SUM(IIF(T1.Name = 'Blade', T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID
Database: sales
Question: How many of the employees have the last name "Ringer" ?
SQL: SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer'
Database: sales
Question: Among the products with product ID lower than 15, how many of them costs 10 and below?
Evidence: product ID lower than 15 refers to ProductID < 15; costs 10 and below refers to Price; Price < = 10;
SQL: SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10
Database: sales
Question: Give the product's name brought by Aaron Alexander.
SQL: SELECT DISTINCT T1.Name 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 T3.FirstName = 'Aaron' AND T3.LastName = 'Alexander'
Database: sales
Question: Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.
Evidence: highest prices refers to MAX(Price); quantity ranges from 400 to 500 refers to Quantity BETWEEN 400 AND 500;
SQL: SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1
Database: sales
Question: Among customers named Kate, who has the highest quantity?
Evidence: highest quantity refers to MAX(Quantity);
SQL: SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Kate' ORDER BY T1.Quantity DESC LIMIT 1
Database: sales
Question: Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25?
Evidence: price ranges from 100 to 150 refers to Price BETWEEN 100 AND 150; quantity lower than 25 refers to Quantity < 25;
SQL: SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25
Database: sales
Question: List the quantity and price of the product bought by Abigail Henderson.
SQL: SELECT T2.Quantity, T1.Price 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 T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson'
Database: sales
Question: In sales with a quantity of 60, how many of them have a price not greater than 500?
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity = 60 AND T1.Price <= 500
Database: sales
Question: In customers with the first name of Erica, how many of them bought a quantity below 200?
Evidence: quantity below 200 refers to quantity < 200;
SQL: SELECT COUNT(T1.ProductID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Erica' AND T1.Quantity < 200
Database: sales
Question: Among products bought by Kathryn Ashe, what is the name of the product with the highest quantity?
Evidence: highest quantity refers to MAX(Quantity);
SQL: SELECT T1.Name 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 T3.FirstName = 'Kathryn' AND T3.LastName = 'Ashe' ORDER BY T2.Quantity DESC LIMIT 1
Database: sales
Question: What is the price and quantity of the product named Seat Tube?
SQL: SELECT DISTINCT T2.Price, T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Seat Tube'
Database: sales
Question: What is the price and name of the product bought by Erica Xu?
SQL: SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu'
Database: sales
Question: List the sales ID of the product with a quantity of 590 and named "External Lock Washer 7".
Evidence: External Lock Washer 7' is name of product;
SQL: SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'External Lock Washer 7' AND T1.Quantity = 590
Database: sales
Question: In sales ID between 30 and 40, who is the customer that bought a total quantity of 403?
Evidence: who refers to FirstName, LastName;
SQL: SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity = 403 AND T1.SalesID BETWEEN 30 AND 40
Database: sales
Question: List the customer's ID and last name of the customer that purchased a product with a quantity greater than 90% of the average quantity of all listed products.
Evidence: quantity greater than 90% of the average quantity = Quantity > MULTIPLY(AVG(Quantity), 0.9);
SQL: SELECT T2.CustomerID, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales ) * 0.9
Database: sales
Question: Among the sales ID ranges from 1 to 200, what is the percentage of the products with a price ranging from 200 to 300?
Evidence: sales ID ranges from 1 to 200 refers to SalesID between 1 and 200; percentage = MULTIPLY(DIVIDE(SUM(Price between 200 and 300), COUNT(Price)), 1.0);
SQL: SELECT CAST(SUM(IIF(T2.Price BETWEEN 200 AND 300, 1, 0)) AS REAL) * 100 / COUNT(T2.Price) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SalesID BETWEEN 1 AND 200
Database: sales
Question: What is the name of the most expensive product?
Evidence: most expensive product refers to MAX(Price);
SQL: SELECT Name FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )
Database: sales
Question: How many customers are named Madison?
SQL: SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison'
Database: sales
Question: How many types of "HL Touring Frames" are there?
Evidence: types of HL Touring Frames refers to Name like '%HL Touring Frame%';
SQL: SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%'
Database: sales
Question: How many customers share the most common last name?
Evidence: most common last name refers to MAX(COUNT(LastName));
SQL: SELECT COUNT(CustomerID) FROM Customers GROUP BY LastName ORDER BY COUNT(LastName) DESC LIMIT 1
Database: sales
Question: How many free or gift products are there?
Evidence: free gift refers to Price = 0;
SQL: SELECT COUNT(ProductID) FROM Products WHERE Price = 0
Database: sales
Question: What is the name of the sales person who handled the highest number of sales?
Evidence: name of the sales person = FirstName, MiddleInitial, LastName; highest number of sales refers to MAX(COUNT(SalesID));
SQL: SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T2.SalesPersonID = T1.EmployeeID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 1
Database: sales
Question: What is the full name of the customer who purchased the highest amount of total price in a single purchase?
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; highest amount of total price refers to MAX(MULTIPLY(Quantity, Price));
SQL: SELECT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID GROUP BY T1.SalesID, T1.Quantity, T3.Price, FirstName, MiddleInitial, LastName ORDER BY T1.Quantity * T3.Price DESC LIMIT 1
Database: sales
Question: How many "Mountain-500 Black 42" were sold in total?
Evidence: Mountain-500 Black 42' is name of product; sold in total = SUM(Quantity);
SQL: SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Mountain-500 Black, 42'
Database: sales
Question: How much is the total amount of sales handled by Heather McBadden?
Evidence: total amount of sales = SUM(MULTIPLY(Quantity, Price));
SQL: SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Heather' AND T1.LastName = 'McBadden'
Database: sales
Question: How many "Mountain-100 Silver, 38" were sold by Stearns MacFeather?
Evidence: Mountain-100 Silver, 38' is name of product;
SQL: SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Stearns' AND T1.LastName = 'MacFeather' AND T3.Name = 'Mountain-100 Silver, 38'
Database: sales
Question: How many type of products did Dalton M. Coleman purchase?
SQL: SELECT COUNT(T2.ProductID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M' AND T1.LastName = 'Coleman'
Database: sales
Question: What are the full names of the top 3 employees who handled the highest number of sales?
Evidence: full names of employees = FirstName, MiddleInitital, LastName; highest number of sales refers to MAX(COUNT(SalesID));
SQL: SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 3
Database: sales
Question: Among the "Mountain-500 Black" product types, which type was purchased the most?
Evidence: Mountain-500 Black product types refers to Name like 'Mountain-500 Black%'; purchased the most refers to MAX(SUM(Quantity));
SQL: SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Mountain-500 Black%' GROUP BY T2.Quantity, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1
Database: sales
Question: How many employees sold "ML Road Frame-W - Yellow, 40"?
Evidence: ML Road Frame-W - Yellow, 40' is name of product;
SQL: SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'ML Road Frame-W - Yellow, 40'
Database: sales
Question: How many chainring bolts were sold under sales ID 551971?
Evidence: Chainring Bolts' is name of product;
SQL: SELECT T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Chainring Bolts' AND T1.SalesID = 551971
Database: sales
Question: How many employees sold over 20,000 quantities of "Touring-2000 Blue, 50"?
Evidence: over 20,000 quantities refers to Quantity > 20000; 'Touring-2000 Blue, 50' is name of product;
SQL: SELECT COUNT(*) FROM ( SELECT SUM(Quantity) FROM Sales WHERE ProductID IN ( SELECT ProductID FROM Products WHERE Name = 'Touring-2000 Blue, 50' ) GROUP BY Quantity, SalesPersonID HAVING SUM(Quantity) > 20000 )
Database: sales
Question: What is the total cost of all the "Road-650, Red, 60" products that Abraham E. Bennet sold?
Evidence: total cost = SUM(MULTIPLY(Quantity, Price)); 'Road-650, Red, 60' is name of product;
SQL: SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Abraham' AND T1.MiddleInitial = 'e' AND T1.LastName = 'Bennet' AND T3.Name = 'Road-650 Red, 60'
Database: sales
Question: Which product has the highest total amount of quantity sold? Calculate its overall total price.
Evidence: highest total amount of quantity refers to MAX(Quantity); overall total price = SUM(MULTIPLY(Quantity, Price));
SQL: SELECT T1.Name, SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1
Database: sales
Question: List the first name of all the customers whose last name is Chen.
SQL: SELECT FirstName, LastName FROM Customers WHERE LastName = 'Chen'
Database: sales
Question: Among the employee names, what is the most common middle initial?
Evidence: most common middle initial refers to MAX(COUNT(MiddleInitial));
SQL: SELECT MiddleInitial FROM Employees GROUP BY MiddleInitial ORDER BY COUNT(MiddleInitial) DESC LIMIT 1
Database: sales
Question: What is the average price of products that cost between 100 and 200?
Evidence: average price = DIVIDE(SUM(Price, COUNT(Price))); cost refers to Price; Price BETWEEN 100 AND 200;
SQL: SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200
Database: sales
Question: Find and list the full name of customers who bought products above-average quantity.
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; above-average quantity = Quantity > AVG(Quantity);
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 )
Database: sales
Question: Give the full name of the customer who bought the most amount of products.
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; most amount of products refers to MAX(MULTIPLY(Quantity, Price));
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
Database: sales
Question: Of the employees who sold Blade, who has the most amount of sales?
Evidence: Blade' is name of product; most amount of sales refers to MAX(MULTIPLY(Quantity, Price));
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
Database: sales
Question: List the full name of customers who spend more than 50,000 in descending order the amount spend.
Evidence: full name of the customer = FirstName, MiddleInitial, LastName; more than 50,000 in the amount refers to MULTIPLY(Quantity, Price) > 50000;
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
Database: sales
Question: Name the product that sold the most quantity.
Evidence: most quantity refers to MAX(Quantity);
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
Database: sales
Question: Find and list the products that sold below the average quantity.
Evidence: below the average quantity refers to Quantity < AVG(Quantity);
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 )
Database: menu
Question: How many dishes do not have correct data for the year in which it appeared first?
Evidence: do not have correct data refers to first_appeared < 1851 or first_appeared > 2012;
SQL: SELECT COUNT(*) FROM Dish WHERE first_appeared < 1851 OR first_appeared > 2012
Database: menu
Question: Which dish lasted longer, Anchovies or Fresh lobsters in every style?
Evidence: if (SUBTRACT(last_appeared, first_appeared) WHERE name = 'Anchovies') > (SUBTRACT(last_appeared, first_appeared) WHERE name = 'Fresh lobsters in every style'), it means 'Anchovies' lasted longer; if (SUBTRACT(last_appeared , first_appeared) WHERE name = 'Fresh lobsters in every style') > (SUBTRACT(last_appeared , first_appeared) WHERE name = 'Anchovies') it means 'Fresh lobsters in every style' last longer;
SQL: SELECT CASE WHEN SUM(CASE WHEN name = 'Anchovies' THEN last_appeared - first_appeared ELSE 0 END) - SUM(CASE WHEN name = 'Fresh lobsters in every style' THEN last_appeared - first_appeared ELSE 0 END) > 0 THEN 'Anchovies' ELSE 'Fresh lobsters in every style' END FROM Dish WHERE name IN ('Fresh lobsters in every style', 'Anchovies')
Database: menu
Question: Among all the dishes that were once free, what is the name of the dish that had appeared on most menus?
Evidence: dishes that were once free refers to lowest_price = 0; appeared on most menus refers to MAX(menus_appeared);
SQL: SELECT name FROM Dish WHERE lowest_price = 0 ORDER BY menus_appeared DESC LIMIT 1
Database: menu
Question: How many menus with the name "Waldorf Astoria" have 4 pages?
Evidence: 4 pages refers to page_count = 4;
SQL: SELECT COUNT(*) FROM Menu WHERE name = 'Waldorf Astoria' AND page_count = 4
Database: menu
Question: What is the name of the dish that appeared on the upper left corner on menu page no. 1389?
Evidence: appeared on the upper left corner on menu refers to xpos < 0.25 AND ypos < 0.25; menu page no. refers to menu_page_id; menu_page_id = 1389;
SQL: SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.menu_page_id = 1389 AND T2.xpos < 0.25 AND T2.ypos < 0.25
Database: menu
Question: Please list the prices of the dish "Clear green turtle" on every menu page it appeared on.
Evidence: Clear green turtle is a name of dish;
SQL: SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle'
Database: menu
Question: Among all the menu pages with the appearance of the dish "Clear green turtle", how many of them have the dish at a stable price?
Evidence: Clear green turtle is a name of dish; stable price refers to highest_price is null;
SQL: SELECT SUM(CASE WHEN T1.name = 'Clear green turtle' 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
Database: menu
Question: What is the highest price of the dish "Clear green turtle" on a menu page?
Evidence: highest price refers to MAX(Price); Clear green turtle is a name of dish;
SQL: SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle' ORDER BY T2.price DESC LIMIT 1
Database: menu
Question: Please list the IDs of all the menus in which the dish "Clear green turtle" had appeared.
Evidence: Clear green turtle is a name of dish;
SQL: SELECT T1.menu_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 = 'Clear green turtle'
Database: menu
Question: Among the menus in which the dish "Clear green turtle" had appeared, how many of them used the dollar as their currency?
Evidence: Clear green turtle is a name of dish; dollar as currency refers to currency = 'Dollars';
SQL: 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'
Database: menu
Question: 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?
Evidence: Clear green turtle is a name of dish; not support taking out or booking in advance refers to call_number is null;
SQL: 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
Database: menu
Question: Please list the names of all the dishes that appeared on the menu "Zentral Theater Terrace".
Evidence: Zentral Theater Terrace is a name of menu;
SQL: 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'