Chinastark/bird_dataset huggingface dataset:
Database: retail_world
Question: Please list the territories whose sales are taken in charge by the employees who report to Andrew Fuller.
Evidence: territories refers to TerritoryDescription;
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.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' )
Database: retail_world
Question: How many employees in the UK takes charge of the sales in over 4 territories?
Evidence: UK refers to Country = 'UK'; employees with over 4 territories refers to EmployeeID WHERE TerritoryID > 4;
SQL: SELECT COUNT(COUNTEID) FROM ( SELECT T1.EmployeeID AS COUNTEID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Country = 'UK' GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4 ) T1
Database: retail_world
Question: How many territories are there in the Eastern Region?
Evidence: Eastern Region refers to RegionDescription = 'Eastern';
SQL: SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern'
Database: retail_world
Question: Please list all the territories in the Eastern Region.
Evidence: territories refers to TerritoryDescription; Eastern Region refers to RegionDescription = 'Eastern';
SQL: SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern'
Database: retail_world
Question: How many employees in total are in charge of the sales in the Eastern Region?
Evidence: Eastern Region refers to RegionDescription = 'Eastern';
SQL: SELECT COUNT(T.EmployeeID) FROM ( SELECT T3.EmployeeID FROM Region AS T1 INNER JOIN Territories AS T2 ON T1.RegionID = T2.RegionID INNER JOIN EmployeeTerritories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.RegionDescription = 'Eastern' GROUP BY T3.EmployeeID ) T
Database: retail_world
Question: Please list the home phone numbers of the employees who are in charge of the sales in the territories in the Eastern Region.
Evidence: home phone numbers refers to HomePhone; Eastern Region refers to RegionDescription = 'Eastern';
SQL: SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern ' GROUP BY T1.HomePhone
Database: retail_world
Question: How many more territories are there in than Eastern Region than in the Southern Region?
Evidence: how many more = SUBTRACT(SUM(RegionDescription = 'Eastern'), SUM(RegionDescription = 'Southern')); Eastern Region refers to RegionDescription = 'Eastern'; Southern Region refers to RegionDescription = 'Southern';
SQL: SELECT ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) - ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu
Database: retail_world
Question: Please list the names of all the products ordered in order no. 10248.
Evidence: names of the products refers to ProductName; order no. refers to OrderID;
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248
Database: retail_world
Question: What is the quantity of Ikura ordered in order no. 10273?
Evidence: Ikura refers to ProductName = 'Ikura'; order no. refers to OrderID;
SQL: SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'
Database: retail_world
Question: What is the total price of Ikura ordered in order no. 10273?
Evidence: total price = MULTIPLY(UnitPrice, Quantity); Ikura refers to ProductName = 'Ikura'; order no. refers to OrderID;
SQL: SELECT T2.UnitPrice * T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'
Database: retail_world
Question: What is the total production of the product that is ordered in the highest quantity in order no. 10248?
Evidence: total production of the product = SUM(units in stock, units on order); order no. refers to OrderID;
SQL: SELECT T1.UnitsInStock + T1.UnitsOnOrder FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T2.Quantity DESC LIMIT 1
Database: retail_world
Question: Of all the products ordered in order no. 10248, which product has the highest user satisfaction?
Evidence: order no. refers to OrderID; highest user satisfaction refers to MAX(ReorderLevel);
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1
Database: retail_world
Question: How many orders have asked for the product Tofu?
Evidence: product refers to ProductName;
SQL: SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Tofu'
Database: retail_world
Question: Please list the IDs of the orders with a product whose production is not continuous.
Evidence: IDs of the orders refers to OrderID; production is not continuous refers to Discontinued = 1;
SQL: SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1
Database: retail_world
Question: Of all the orders that have ordered Ikura, how many of them enjoys a unit price that's lower than its standard unit price?
Evidence: Ikura refers to ProductName = 'Ikura'; ordered unit price that's lower than its standard unit price refers to "Order Details".UnitPrice < "Product".UnitPrice;
SQL: SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura' AND T2.UnitPrice < T1.UnitPrice
Database: retail_world
Question: What is the name of the supplier company for Aniseed Syrup?
Evidence: name of the supplier refers to CompanyName; Aniseed Syrup refers to ProductName = 'Aniseed Syrup';
SQL: SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Aniseed Syrup'
Database: retail_world
Question: Please list the names of all the products whose supplier is in Japan.
Evidence: names of the products refers to ProductName; Japan refers to Country = 'Japan';
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan'
Database: retail_world
Question: Please list the phone numbers of the suppliers of the products that have a higher units on order than units in stock.
Evidence: UnitsInStock < UnitsOnOrder;
SQL: SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitsInStock < T1.UnitsOnOrder
Database: retail_world
Question: Among the products that are no longer in continuous production, how many of them have their supplier in the USA?
Evidence: no longer continuous refers to Discontinued = 1; USA refers to Country = 'USA';
SQL: SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'USA' AND T1.Discontinued = 1
Database: retail_world
Question: Who is the supplier of the product with the highest unit price?
Evidence: supplier of the product refers to CompanyName; 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: What is the average salary of the employees who takes charge of the sales of over 4 territories?
Evidence: average salary = DIVIDE(SUM(Salary), COUNT(EmployeeID)); employees who takes charge of over 4 territories refers to EmployeeID WHERE COUNT(TerritoryID) > 4;
SQL: SELECT AVG(T1.Salary) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4
Database: retail_world
Question: How much lower in percentage is the unit price of Ikura in order no. 10273 than its standard unit price?
Evidence: how much lower in percentage = MULTIPLY(DIVIDE(SUBTRACT(Products.UnitPrice, Order Details.UnitPrice), Products.UnitPrice), 100); Ikura refers to ProductName = 'Ikura'; order no. refers to OrderID;
SQL: SELECT CAST((T1.UnitPrice - T2.UnitPrice) AS REAL) * 100 / T1.UnitPrice FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'
Database: retail_world
Question: What is the average quantity of Ikura ordered in one order?
Evidence: average = AVG(Quantity); Ikura refers to ProductName = 'Ikura';
SQL: SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura'
Database: retail_world
Question: Among the products ordered in order no. 10248, which product has the biggest ratio of units on order to units in stock?
Evidence: order no. refers to OrderID; biggest ratio = MAX(DIVIDE(UnitsOnOrder, UnitsInStock));
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.UnitsOnOrder / T1.UnitsInStock DESC LIMIT 1
Database: retail_world
Question: Give the full name of the youngest employee.
Evidence: full name = FirstName, LastName; youngest refers to latest BirthDate;
SQL: SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM Employees )
Database: retail_world
Question: Who is the newest hired employee? Give the full name.
Evidence: newest hired refers to latest HireDate; full name = FirstName, LastName;
SQL: SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM Employees )
Database: retail_world
Question: Provide the number of orders that were handled by Michael Suyama.
SQL: SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama'
Database: retail_world
Question: Give the name of the territory where Mr. Robert King works.
Evidence: name of territory refers to TerritoryDescription; Mr. refers to TitleOfCourtesy = 'Mr';
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.TitleOfCourtesy = 'Mr.' AND T1.FirstName = 'Robert' AND T1.LastName = 'King'
Database: retail_world
Question: Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory.
Evidence: Ms. refers to TitleOfCourtesy = 'Ms'; ReportsTo’ represents a hierarchical relationship where the person being reported to is usually the direct supervisor of the reporter; name of the territory refers to TerritoryDescription;
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.EmployeeID = ( SELECT ReportsTo FROM Employees WHERE TitleOfCourtesy = 'Ms.' AND FirstName = 'Laura' AND LastName = 'Callahan' )
Database: retail_world
Question: Who is in charge of the "Santa Monica" territory? Give the full name.
Evidence: Santa Monica refers to TerritoryDescription = 'Santa Monica'; full name = FirstName, MiddleName, LastName;
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 = 'Santa Monica'
Database: retail_world
Question: Give the home phone number of the employee who is in charge of "Savannah" territory.
Evidence: home phone number refers to HomePhone; Savannah refers to TerritoryDescription = 'Savannah';
SQL: SELECT T1.HomePhone 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 = 'Savannah'
Database: retail_world
Question: For the order from "HILAA" on 1997/12/25, what was the total quantity of the products in that order?
Evidence: HILLA refers to CustomerID = 'HILAA'; on 1997/12/25 refers to OrderDate = '1997/12/25';
SQL: SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%'
Database: retail_world
Question: For the order paying the highest freight, how many kinds of products does it contain?
Evidence: highest freight refers to MAX(Freight); kinds of products refers to ProductID;
SQL: SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID
Database: retail_world
Question: Tell the name of the shipper company for the order No.10585.
Evidence: name of the shipper company refers to ShipName; order No. refers to OrderID;
SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10585
Database: retail_world
Question: Give the number of orders that were shipped by "Federal Shipping".
Evidence: Federal Shipping refers to CompanyName = 'Federal Shipping';
SQL: SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping'
Database: retail_world
Question: How many kinds of products are there in the the category of "dairy products"?
Evidence: kinds of products refers to ProductID; category refers to CategoryName;
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products'
Database: retail_world
Question: Which category does "tofu" belong to?
Evidence: category refers to CategoryName; tofu refers to ProductName = 'Tofu';
SQL: SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu'
Database: retail_world
Question: What is the total production of the products from the supplier “Escargots Nouveaux”?
Evidence: total production of the products = add(units in stock , units on order); supplier “Escargots Nouveaux” refers to CompanyName = 'Escargots Nouveaux'
SQL: SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Escargots Nouveaux'
Database: retail_world
Question: Give the reorder level for the products from the supplier "Nord-Ost-Fisch Handelsgesellschaft mbH".
Evidence: supplier "Nord-Ost-Fisch Handelsgesellschaft mbH" refers to CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH'
SQL: SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH'
Database: retail_world
Question: How many kinds of products are supplied by "Karkki Oy" company?
Evidence: supplied by refers to CompanyName
SQL: SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Karkki Oy'
Database: retail_world
Question: Give the contact name of the supplier for the product "Gudbrandsdalsost".
Evidence: product refers to ProductName
SQL: SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gudbrandsdalsost'
Database: retail_world
Question: Tell the country name of the supplier for "Scottish Longbreads".
Evidence: "Scottish Longbreads" refers to ProductName = 'Scottish Longbreads'
SQL: SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Scottish Longbreads'
Database: retail_world
Question: Give the number of territories in the "Northern" region.
Evidence: "Northern" region refers to RegionDescription = 'Northern'
SQL: SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern'
Database: retail_world
Question: Which region is "Columbia" in?
Evidence: region refers to RegionID; "Columbia" refers to TerritoryDescription = 'Columbia'
SQL: SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia'
Database: retail_world
Question: For the orders of Customer "WHITC", what is the percentage of the orders were fulfilled with shipper company "United Package"?
Evidence: Customer "WHITC" refers to CustomerID = 'WHITC'; shipper company "United Package" refers to CompanyName = 'United Package'; percentage = divide(count(ShipperID where CompanyName = 'United Package') , count(ShipperID)) * 100%
SQL: SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'United Package' 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 T1.CustomerID = 'WHITC'
Database: retail_world
Question: How many percent more orders were fulfilled with shipper company "United Package" than with "Speedy Express"?
Evidence: percent = divide(subtract(count(OrderID where CompanyName = 'United Package') , count(OrderID where CompanyName = 'Speedy Express')) , count(OrderID where CompanyName = 'Speedy Express')) * 100%
SQL: SELECT CAST((COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END)) AS REAL) * 100 / COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID
Database: retail_world
Question: How many times is the number of territories in "Eastern Region" than "Southern Region"?
Evidence: "Eastern Region" refers to RegionDescription = 'Eastern'; "Southern Region" refers to RegionDescription = 'Southern'; times = divide(count(TerritoryDescription where RegionDescription = 'Eastern') , count(TerritoryDescription where RegionDescription = 'Southern'))
SQL: SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) AS REAL) / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu
Database: retail_world
Question: How many customers are there in the country with the highest number of customers?
Evidence: highest number refers to max(count(CustomerID))
SQL: SELECT COUNT(CustomerID) FROM Customers GROUP BY Country ORDER BY COUNT(CustomerID) DESC LIMIT 1
Database: retail_world
Question: What are the order ids of the orders with freight of over 800?
Evidence: freight of over 800 refers to Freight > 800
SQL: SELECT OrderID FROM Orders WHERE Freight > 800
Database: retail_world
Question: What is the Island Trading customer's complete address?
Evidence: Island Trading refers to CompanyName = 'Island Trading'; complete address = Address, City, Region, Country, PostalCode
SQL: SELECT Address, City, Region, Country, PostalCode FROM Customers WHERE CompanyName = 'Island Trading'
Database: retail_world
Question: What is the most expensive product?
Evidence: product refers to ProductName; most expensive refers to max(UnitPrice)
SQL: SELECT ProductName FROM Products WHERE UnitPrice = ( SELECT MAX(UnitPrice) FROM Products )
Database: retail_world
Question: How many suppliers are there in the United States of America?
Evidence: United States of America refers to Country = 'USA'
SQL: SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA'
Database: retail_world
Question: Which product have the highest user satisfaction?
Evidence: product refers to ProductName; highest user satisfaction refers to max(ReorderLevel)
SQL: SELECT ProductName FROM Products WHERE ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )
Database: retail_world
Question: What is the full name of the employee with the highest salary?
Evidence: full name refers to FirstName LastName; highest salary refers to max(Salary)
SQL: SELECT FirstName, LastName FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )
Database: retail_world
Question: What are the names of the products that were discountinued?
Evidence: discontinued refers to Discontinued = 1; name of products refers to ProductName
SQL: SELECT ProductName FROM Products WHERE Discontinued = 1
Database: retail_world
Question: What is the average salary of sales representatives in the United Kingdom?
Evidence: average salary = avg(Salary); sales representative refers to Title = 'Sales Representative'; in the United Kingdom refers to Country = 'UK'
SQL: SELECT AVG(Salary) FROM Employees WHERE Title = 'Sales Representative' AND Country = 'UK'
Database: retail_world
Question: What is the most widely used shipping company in the United States of America?
Evidence: most widely used refers to max(count(ShipVia)); shipping company refers to CompanyName; in the United States of America refers to ShipCountry = 'USA'
SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCountry = 'USA' GROUP BY T2.CompanyName ORDER BY COUNT(T2.CompanyName) DESC LIMIT 1
Database: retail_world
Question: How many products were supplied by Pavlova, Ltd.?
Evidence: Pavlova, Ltd. refers to CompanyName = 'Pavlova, Ltd.'
SQL: SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'
Database: retail_world
Question: How many orders were shipped to GREAL via United Package?
Evidence: GREAL refers to CustomerID = 'GREAL'; via United Package refers to CompanyName = 'United Package'
SQL: SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.CustomerID = 'GREAL' AND T2.CompanyName = 'United Package'
Database: retail_world
Question: What are the names of the suppliers whose products have the highest user satisfaction?
Evidence: name of the supplier refers to SupplierID; highest user satisfaction refers to max(ReorderLevel)
SQL: SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )
Database: retail_world
Question: In total, how many orders were shipped via United Package?
Evidence: via United Package refers to CompanyName = 'United Package'
SQL: SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package'
Database: retail_world
Question: How many suppliers in Australia whose products were discontinued?
Evidence: in Australia refers to Country = 'Australia'; discontinued refers to Discontinued = 1
SQL: SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country = 'Australia'
Database: retail_world
Question: How much is the total purchase price, including freight, of the top 2 most expensive products?
Evidence: total purchase price including freight refers to add(multiply(UnitPrice , Quantity) , Freight); most expensive refers to max(UnitPrice)
SQL: SELECT T2.UnitPrice * T2.Quantity + T1.Freight FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID ORDER BY T2.UnitPrice * T2.Quantity + T1.Freight DESC LIMIT 2