Chinastark/bird_dataset huggingface dataset:
Database: retail_world
Question: Describe the ordered products which were the most overdue from required date.
Evidence: the most overdue from required date refers to MIN(SUBTRACT(ShippedDate, RequiredDate) < 0)
SQL: SELECT DISTINCT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE DATEDIFF(T1.ShippedDate, T1.RequiredDate) < 0
Database: retail_world
Question: Under the in-charge of inside sales coordinator, provide the product lists which were shipped to Mexico in 1996.
Evidence: shipped to Mexico refers to ShipCountry = 'Mexico'; in 1996 refers to year(ShippedDate) = 1996; charge of inside sales coordinator refers to Title = 'Inside Sales Coordinator'
SQL: SELECT T4.ProductName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.Title = 'Inside Sales Coordinator' AND T2.ShippedDate LIKE '1996%' AND T2.ShipCountry = 'Mexico'
Database: retail_world
Question: Identify the name of the most popular dairy product in terms of reorder quantity.
Evidence: 'dairy product' refers to CategoryName; most popular reorder quantity refers to MAX(ReorderLevel)
SQL: SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )
Database: retail_world
Question: Calculate the production volume of the dairy product 'Mascarpone Fabioli'.
Evidence: 'Mascarpone Fabioli' is a ProductName; calculation = SUM(UnitsInStock, UnitsOnOrder)
SQL: SELECT SUM(UnitsInStock + UnitsOnOrder) FROM Products WHERE ProductName = 'Mascarpone Fabioli'
Database: retail_world
Question: Identify the name and product category for the most expensive and the least expensive products.
Evidence: name of product refers to ProductName; category of product refers to CategoryName; the most expensive products refers to MAX(UnitPrice); the least expensive products refers to MIN(UnitPrice);
SQL: SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.UnitPrice IN (( SELECT MIN(UnitPrice) FROM Products ), ( SELECT MAX(UnitPrice) FROM Products ))
Database: retail_world
Question: Identify the customer, which placed the largest order in terms of value.
Evidence: value refers to SUM(UnitPrice * Quantity * SUBTRACT(1, Discount)); the largest order in value refers to MAX(value)
SQL: SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T2.CustomerID ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1
Database: retail_world
Question: Identify the number of employees in Northern sales region.
Evidence: Northern sales region refers to RegionDescription = 'Northern'
SQL: SELECT COUNT(T2.EmployeeID) FROM Territories AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Region AS T3 ON T1.RegionID = T3.RegionID WHERE T3.RegionDescription = 'Northern'
Database: retail_world
Question: What is the average value of the sales order?
Evidence: calculation = DIVIDE(SUM(UnitPrice * Quantity * SUBTRACT(1, Discount)), COUNT(OrderID))
SQL: SELECT SUM(UnitPrice * Quantity * (1 - Discount)) / COUNT(OrderID) FROM `Order Details`
Database: retail_world
Question: Find the percentage of discontinued products in Northwind's portfolio of products.
Evidence: discontinued products refers to Discontinued = 1; calculation = DIVIDE(SUM(Discontinued = 1), COUNT(ProductID)) * 100
SQL: SELECT CAST(COUNT(CASE WHEN Discontinued = 1 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products
Database: retail_world
Question: Provide the full name of the employee who processed the sales order with ID 10274.
Evidence: full name refers to FirstName, LastName; sales order with ID 10274 refers to OrderID = 10274
SQL: SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10274
Database: retail_world
Question: Calculate the total number of orders placed by the company 'GROSELLA-Restaurante'.
Evidence: 'GROSELLA-Restaurante' refers to CompanyName;
SQL: SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante'
Database: retail_world
Question: Name products and their quantity ordered by the company 'GROSELLA-Restaurante' in the sales order that was processed by Nancy Davolio.
Evidence: name products refers to ProductName; 'GROSELLA-Restaurante' refers to CompanyName; 'Nancy Davolio' is the full name of an employee; full name refers to FirstName, LastName;
SQL: SELECT T4.ProductName, T3.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID INNER JOIN Customers AS T5 ON T2.CustomerID = T5.CustomerID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T5.CompanyName = 'GROSELLA-Restaurante'
Database: retail_world
Question: Identify the total number of orders placed by the customer 'Laughing Bacchus Wine Cellars' and it's average value.
Evidence: 'Laughing Bacchus Wine Cellars' refers to CompanyName; calculation = DIVIDE(SUM(UnitPrice * Quantity * SUBTRACT(1, Discount)), COUNT(OrderID))
SQL: SELECT COUNT(T2.OrderID) , SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars'
Database: retail_world
Question: How many boxes of 'Pavlova' did Northwind sell?
Evidence: 'Pavlova' is a ProductName
SQL: SELECT COUNT(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Pavlova'
Database: retail_world
Question: What is the salary range for sales representative in Northwind?
Evidence: salary range is BETWEEN max(Salary) AND min(Salary); sales representative is a title
SQL: SELECT ( SELECT MIN(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MIN , ( SELECT MAX(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MAX
Database: retail_world
Question: How many suppliers does Northwind have in USA?
Evidence: 'USA' is a country; supplier refers to CompanyName
SQL: SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA'
Database: retail_world
Question: What products are no longer sold by Northwind?
Evidence: no longer sold refers to Discontinued = 1; products refers to ProductName
SQL: SELECT ProductName FROM Products WHERE Discontinued = 1
Database: retail_world
Question: Who is the Sales Agent for the company 'Eastern Connection'?
Evidence: 'Eastern Connection' is a CompanyName; 'Sales Agent' is a ContactTitle
SQL: SELECT ContactName FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactTitle = 'Sales Agent'
Database: retail_world
Question: How many companies do ship Northwind's orders?
Evidence: companies refers to ShipperID
SQL: SELECT COUNT(ShipperID) FROM Shippers
Database: retail_world
Question: Identify the total number of orders processed by Northwind employee named Andrew Fuller. What percent of those orders was shipped to Austria?
Evidence: 'Andrew Fuller' is the full name of an employee; full name refers to FistName, LastName; Austria refers to ShipCountry; calculation = DIVIDE(SUM(ShipCountry = 'Austria'), COUNT(OrderID)) * 100
SQL: SELECT CAST(COUNT(CASE WHEN T2.ShipCountry = 'Austria' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller'
Database: retail_world
Question: Indicate category name of soft drinks, coffees, teas, beers, and ales in description list.
Evidence: Soft drinks, coffees, teas, beers, and ales' is Description of CategoryName
SQL: SELECT CategoryName FROM Categories WHERE Description = 'Soft drinks, coffees, teas, beers, and ales'
Database: retail_world
Question: List the phone number of company named Around the Horn.
Evidence: phone number refers to Phone; 'Around the Horn' is a CompanyName
SQL: SELECT Phone FROM Customers WHERE CompanyName = 'Around the Horn'
Database: retail_world
Question: Indicate the fax of the company Blondesddsl pre et fils in Strasbourg city.
Evidence: 'Blondesddsl pre et fils' is a CompanyName
SQL: SELECT Fax FROM Customers WHERE CompanyName = 'Blondesddsl pre et fils' AND City = 'Strasbourg'
Database: retail_world
Question: How many companies are there in the city of London?
Evidence: companies refers to CompanyName;
SQL: SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London'
Database: retail_world
Question: Indicate the address of the company Eastern Connection whose contact name is Ann Devon.
Evidence: 'Eastern Connection' is a CompanyName; 'Ann Devon' is the full name of an employee; full name refers to FirstName, LastName
SQL: SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon'
Database: retail_world
Question: Indicate which company is located in France?
Evidence: company refers to CompanyName; France is a country
SQL: SELECT CompanyName FROM Customers WHERE Country = 'France'
Database: retail_world
Question: How many product names does the supplier Exotic Liquids have?
Evidence: 'Exotic Liquids' is a CompanyName
SQL: SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids'
Database: retail_world
Question: What is the name of the company that has the product with the highest unit price?
Evidence: name of the company refers to CompanyName; the highest unit price refers to MAX(UnitPrice)
SQL: SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitPrice = ( SELECT MAX(UnitPrice) FROM Products )
Database: retail_world
Question: Which company name in London city has the most stocked products?
Evidence: the most stocked products refers to MAX(UnitsInStock)
SQL: SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.City = 'London' ORDER BY T1.UnitsInStock DESC LIMIT 1
Database: retail_world
Question: Which product of Exotic Liquids company that have the highest reorder levels?
Evidence: 'Exotic Liquids' is a CompanyName; the highest reorder levels refers to MAX(ReorderLevel)
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' ORDER BY T1.ReorderLevel DESC LIMIT 1
Database: retail_world
Question: Provide the category name of the Chef Anton's Gumbo Mix product that New Orleans Cajun Delights company has.
Evidence: 'Chef Anton's Gumbo Mix' is a ProductName; 'New Orleans Cajun Delights' is a CompanyName;
SQL: SELECT T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T1.CompanyName = 'New Orleans Cajun Delights' AND T2.ProductName LIKE 'Chef Anton%s Gumbo Mix'
Database: retail_world
Question: Indicate the name of the country where Leka Trading supplies Ipoh Coffee product.
Evidence: 'Leka Trading' is a CompanyName; 'Ipoh Coffee' is a ProductName
SQL: SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Ipoh Coffee' AND T2.CompanyName = 'Leka Trading'
Database: retail_world
Question: Indicate the category name of the product name with the highest units on order.
SQL: SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.UnitsOnOrder = ( SELECT MAX(T1.UnitsOnOrder) FROM Products )
Database: retail_world
Question: What is the difference in number of unit price from Chef Anton's Cajun Seasoning product and Chef Anton's Gumbo Mix product of New Orleans Cajun Delights company.
Evidence: Chef Anton's Cajun Seasoning' AND 'Chef Anton''s Gumbo Mix' are ProductName; 'New Orleans Cajun Delights' is a CompanyName; calculation = SUBTRACT(UnitPrice where ProductName = 'Chef Anton's Cajun Seasoning', UnitPrice where ProductName = 'Chef Anton''s Gumbo Mix')
SQL: SELECT ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Cajun Seasoning' ) - ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Gumbo Mix' ) AS calu
Database: retail_world
Question: Which of Cooperativa de Quesos 'Las Cabras' products have a unit price greater than 20?
Evidence: Cooperativa de Quesos 'Las Cabras'' is a CompanyName; unit price greater than 20 refers to UnitPrice > 20
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'Cooperativa de Quesos%' AND T1.UnitPrice > 20
Database: retail_world
Question: Please indicate the product name of Tokyo Traders company with order quantity greater than 40.
Evidence: 'Tokyo Traders' is a CompanyName; order quantity greater than 40 refers to Quantity > 40
SQL: SELECT DISTINCT T2.ProductName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T1.CompanyName = 'Tokyo Traders' AND T3.Quantity > 40
Database: retail_world
Question: List all category name of Exotic Liquids 's product with units in stock over 100.
Evidence: 'Exotic Liquids' is a CompanyName; units in stock over 100 refers to UnitsInStock > 100
SQL: SELECT T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T2.UnitsInStock > 100 AND T1.CompanyName = 'Exotic Liquids'
Database: retail_world
Question: How many product names have order quantity less than 50? Calculate the percentage of orders less than 50 out of total order quantity.
Evidence: order quantity less than 50 refers to Quantity < 50; Calculation = DIVIDE(SUM(Quantity < 50), SUM(ProductID)) * 100
SQL: SELECT SUM(CASE WHEN T2.Quantity < 50 THEN 1 ELSE 0 END) , CAST(SUM(IF(T2.Quantity < 50, 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID
Database: retail_world
Question: Please indicate total order quantity of product Geitost and calculate the percentage of such product among all the order quantity.
Evidence: 'Geitost' is a ProductName; calculation = DIVIDE(ProductName = 'Geitost', COUNT(ProductID)) * 100
SQL: SELECT SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS sum , CAST(SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID
Database: retail_world
Question: What is the position of Robert King?
Evidence: 'Robert King' is the full name of an employee; full name refers to FirstName, LastName; position refers to Title
SQL: SELECT Title FROM Employees WHERE FirstName = 'Robert' AND LastName = 'King'
Database: retail_world
Question: Write the shipping company name with the telephone number of (503) 555-9931.
Evidence: telephone number of (503) 555-9931 refers to Phone = '(503) 555-9931'
SQL: SELECT CompanyName FROM Shippers WHERE Phone = '(503) 555-9931'
Database: retail_world
Question: Write the address and phone number of Margaret Peacock.
Evidence: Margaret Peacock is the full name of an employee; full name refers to FirstName, LastName; phone number refers to HomePhone
SQL: SELECT Address, HomePhone FROM Employees WHERE FirstName = 'Margaret' AND LastName = 'Peacock'
Database: retail_world
Question: What is the full address of Rattlesnake Canyon Grocery?
Evidence: full address refers to ShipAddress, ShipCity, ShipRegion,ShipPostalCode, ShipCountry; 'Rattlesnake Canyon Grocery' is a ShipName;
SQL: SELECT DISTINCT ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE ShipName = 'Rattlesnake Canyon Grocery'
Database: retail_world
Question: List all product names under Confections.
Evidence: 'Confections' is a CompanyName;
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Confections'
Database: retail_world
Question: Sir Rodney's Marmalade is supplied by which company and who is the contact for this company?
Evidence: 'Sir Rodney's Marmalade' is a ProductName; company refers to CompanyName; contact for a company refers to ContactName
SQL: SELECT T2.CompanyName, T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName LIKE 'Sir Rodney%s Marmalade'
Database: retail_world
Question: What is the full name of the employee who is in charge of the territory of Denver?
Evidence: full name refers to FirstName, LastName; Denver is a TerritoryDescription
SQL: SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Denver'
Database: retail_world
Question: List all the territories where Laura Callahan is in charge.
Evidence: territories refers to TerritoryDescription; Laura Callahan is the full name of an employee; full name refers to FirstName, LastName
SQL: SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.FirstName = 'Laura' AND T1.LastName = 'Callahan'
Database: retail_world
Question: How many orders were shipped via Federal Shipping?
Evidence: 'Federal Shipping' is a CompanyName; orders refers to OrderID
SQL: SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShipVia = 3
Database: retail_world
Question: Name the products where the suppliers come from Finland.
Evidence: 'Finland' is a Country; product refers to ProductName; suppliers refers to SupplierID
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Finland'
Database: retail_world
Question: The product 'Mozzarella di Giovanni' belongs in which category? Include the category's description as well.
Evidence: Mozzarella di Giovanni' is a ProductName; category refers to CategoryName;
SQL: SELECT T2.CategoryName, T2.Description FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Mozzarella di Giovanni'
Database: retail_world
Question: Name the suppliers that supply products under the category 'cheeses.'
Evidence: suppliers refers to CompanyName; 'cheeses' is a Description
SQL: SELECT DISTINCT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T3.Description = 'Cheeses'
Database: retail_world
Question: Name all products supplied by Zaanse Snoepfabriek.
Evidence: products refers to ProductName; 'Zaanse Snoepfabriek' is a CompanyName
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Zaanse Snoepfabriek'
Database: retail_world
Question: Which products by Plutzer Lebensmittelgromrkte AG were discontinued and what are their price?
Evidence: products refers to ProductName; 'Plutzer Lebensmittelgromrkte AG' is a CompanyName; price refers to UnitPrice; 
discontinued products refers to discontinued = 1
SQL: SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.Discontinued = 1
Database: retail_world
Question: List the cities where the product 'Mishi Kobe Niku' were shipped to.
Evidence: cities refers to ShipCity; 'Mishi Kobe Niku' is a ProductName
SQL: SELECT T1.ShipCity FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.ProductName = 'Mishi Kobe Niku'
Database: retail_world
Question: What percentage does the shipment of products by Speedy Express to Sweden make up to the shipping company's total?
Evidence: Speedy Express is a company; Sweden is a ShipCountry; calculation = DIVIDE(SUM(ShipCountry = 'Sweden'), SEM(ShipCountry)) * 100
SQL: SELECT CAST(COUNT(CASE WHEN T1.ShipCountry = 'Sweden' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express'
Database: retail_world
Question: How many territory fall into region 1?
Evidence: region 1 refers to RegionID = 1


SQL: SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1
Database: retail_world
Question: What are the the total number of territory in each region?
SQL: SELECT COUNT(TerritoryDescription) FROM Territories WHERE RegionID IN (1, 2, 3, 4) GROUP BY RegionID
Database: retail_world
Question: How many suppliers are from UK?
Evidence: from UK refers to Country = 'UK'
SQL: SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK'
Database: retail_world
Question: Please give the contact name for Tokyo Traders.
Evidence: Tokyo Traders refers to CompanyName = 'Tokyo Traders'
SQL: SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders'
Database: retail_world
Question: How many employees from USA with Sales Representative title?
Evidence: from USA refers to Country = 'USA'
SQL: SELECT COUNT(Country) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative'
Database: retail_world
Question: What are the highest salary earn by the the employee and what is his/her position in the company?
Evidence: highest salary refers to max(salary); position refers to Title
SQL: SELECT Salary, Title FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )
Database: retail_world
Question: How many products supplied by Plutzer Lebensmittelgromrkte AG that is currently out of stock and on order?
Evidence: Plutzer Lebensmittelgromrkte AG refers to CompanyName; is currently out of stock and on order refers to UnitsInStock = 0 and UnitsOnOrder > 0
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.UnitsInStock = 0 AND T1.UnitsOnOrder = 0
Database: retail_world
Question: What product have the highest unit price and how many quantity have been being sold?
Evidence: product refers to ProductID; highest unit price refers to Max(UnitPrice)
SQL: SELECT T1.ProductName, T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.UnitPrice DESC LIMIT 1
Database: retail_world
Question: Which employee has created the least order and please indicates the employee's title?
Evidence: least order refers to Min(OrderID)
SQL: SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.OrderID) LIMIT 1
Database: retail_world
Question: What is the most common product ordered by a customer from Germany?
Evidence: most common product refers to max(count(ProductID)); customer from Germany refers to Country = 'Germany'
SQL: SELECT T2.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Country = 'Germany' GROUP BY T2.ProductID ORDER BY COUNT(T2.ProductID) DESC LIMIT 1