Chinastark/bird_dataset huggingface dataset:
Database: retail_world
Question: What is the name of the supplier that supplies the most products to the company?
Evidence: name of the supplier refers to SupplierID; the most product refers to max(count(ProductID))
SQL: SELECT T1.SupplierID FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T1.SupplierID ORDER BY COUNT(*) DESC LIMIT 1
Database: retail_world
Question: What are the names of the products that were ordered that have a unit price of no more than 5?
Evidence: unit price of no more than 5 refers to UnitPrice < 5; name of products refers to ProductName
SQL: SELECT DISTINCT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.UnitPrice < 5
Database: retail_world
Question: What is the title of the employee with the highest number of territories in charge?
Evidence: highest number of territories refers to max(TerritoryID)
SQL: SELECT T1.Title FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 1
Database: retail_world
Question: What is the most ordered products by customers?
Evidence: most ordered refers to max(count(ProductID)); product refers to ProductID
SQL: SELECT T1.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY COUNT(*) DESC LIMIT 1
Database: retail_world
Question: Which territories is the employee with a doctorate in charge of? List all of the territory descriptions.
Evidence: with a doctorate refers to TitleOfCourtesy = 'Dr.'
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 = 'Dr.'
Database: retail_world
Question: What are the territory descriptions of territories in the Eastern region?
Evidence: in the 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' ORDER BY T1.TerritoryDescription
Database: retail_world
Question: What is the average number of territories do each sales representative is in charge of?
Evidence: sales representative refers to Title = 'Sales Representative'; average number of territories = divide(count(TerritoryID) , count(EmployeeID)) where Title = 'Sales Representative'
SQL: SELECT CAST(COUNT(T2.TerritoryID) AS REAL) / COUNT(DISTINCT T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative'
Database: retail_world
Question: Among the beverages, which product has the highest customer satisfaction?
Evidence: beverage refers to CategoryName = 'Beverages'; highest customer satisfaction refers to max(ReorderLevel)
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Beverages' ORDER BY T1.ReorderLevel DESC LIMIT 1
Database: retail_world
Question: What is the full name of the employee who handled the highest amount of orders?
Evidence: full name refers to FirstName LastName; highest amount of orders refers to max(count(OrderID))
SQL: SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.FirstName, T1.LastName ORDER BY COUNT(*) DESC LIMIT 1
Database: retail_world
Question: How many products were ordered in the order with the highest freight?
Evidence: highest freight refers to max(Freight)
SQL: SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1
Database: retail_world
Question: Among the seafood products, which product have the highest total production of the production?
Evidence: seafood product refers to CategoryName = 'Seafood'; product refers to ProductID; highest total production refers to max(add(units in stock, units on order))
SQL: SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Seafood' ORDER BY T1.UnitsInStock + T1.UnitsOnOrder DESC LIMIT 1
Database: retail_world
Question: What is the difference in salary of the top 2 employees with the highest number of territories in charge?
Evidence: highest number of territories refers to max(TerritoryID); difference in salary = subtract(employeeA.Salary, employeeB.Salary)
SQL: SELECT MAX(Salary) - MIN(Salary) FROM ( SELECT T1.Salary FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.EmployeeID, T1.Salary ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 2 ) T1
Database: retail_world
Question: What is the average price of products with more than fifty units in stock?
Evidence: more than fifty units in stock refers to UnitsInStock > 50; average price = avg(UnitPrice where UnitsInStock > 50)
SQL: SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50
Database: retail_world
Question: List the company names of customers from the city with the most customers.
Evidence: most customers refers to max(count(Relationship))
SQL: SELECT CompanyName FROM `Customer and Suppliers by City` WHERE CITY = ( SELECT City FROM `Customer and Suppliers by City` GROUP BY City ORDER BY COUNT(Relationship) DESC LIMIT 1 )
Database: retail_world
Question: Find and list the company name, company contact name, and contact title of customers from Madrid.
Evidence: from Madrid refers to City = 'Madrid'
SQL: SELECT CompanyName, ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'
Database: retail_world
Question: Give the full name and contact number of employees in descending order of age.
Evidence: full name refers to FirstName LastName; contact number refers to HomePhone; descending order of age refers to order by BirthDate desc limit 1
SQL: SELECT FirstName, LastName, HomePhone FROM Employees ORDER BY BirthDate DESC
Database: retail_world
Question: Calculate the average price of products shipped to the UK.
Evidence: average price = divide(sum(UnitPrice) , count(ProductID)); the UK refers to Country = 'UK'
SQL: SELECT AVG(UnitPrice) AS avg FROM Invoices WHERE Country = 'UK'
Database: retail_world
Question: Among all the orders, which products sold for the most amount?
Evidence: the most amount refers to max(sum(Quantity))
SQL: SELECT ProductID FROM `Order Details` GROUP BY ProductID ORDER BY SUM(Quantity) DESC LIMIT 1
Database: retail_world
Question: List the name, address, and phone number of companies that supply products for more than thirty dollars per unit.
Evidence: more than thirty dollars per unit refers to UnitPrice > 30
SQL: SELECT T2.CompanyName, T2.Address, T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitPrice > 30
Database: retail_world
Question: Among the customers, list customers' company names and addresses who paid more than average in freight.
Evidence: paid more than average in freight refers to Freight > divide(sum(Freight) , count(OrderID))
SQL: SELECT DISTINCT T1.CompanyName, T1.Address FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > ( SELECT AVG(Freight) FROM Orders )
Database: retail_world
Question: Find and list the full name of employees who are from the territory, Wilton.
Evidence: full name refers to FirstName LastName; Wilton refers to TerritoryDescription = 'Wilton'
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 = 'Wilton'
Database: retail_world
Question: List the names of non-US suppliers that have discontinued.
Evidence: non-US refers to Country <> 'USA'; discontinued refers to Discontinued = 1
SQL: SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA'
Database: retail_world
Question: List the top five most costly products in 1998.
Evidence: most costly refers to max(add(unit price , Freight)); in 1998 refers to OrderDate > = '1998-01-01 00:00:00' AND OrderDate < '1999-01-01 00:00:00'
SQL: SELECT 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 T1.OrderDate LIKE '1998%' ORDER BY T3.UnitPrice + T1.Freight DESC LIMIT 5
Database: retail_world
Question: Of the customers who are from Canada, how many used Federal Shipping?
Evidence: from Canada refers to Country = 'Canada'; Federal Shipping refers to ShipName = 'Federal Shipping'
SQL: SELECT COUNT(T3.CustomerID) FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.ShipName = 'Federal Shipping'
Database: retail_world
Question: List the name of the top ten most ordered product's names in descending order of the number of orders.
Evidence: most ordered refers to max(COUNT(OrderID))
SQL: SELECT 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 GROUP BY T3.ProductName ORDER BY COUNT(*) DESC LIMIT 10
Database: retail_world
Question: Which supplier supplies the most amount of products?
Evidence: supplier refers to SupplierID; most amount refers to max(count(ProductID))
SQL: SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.SupplierID, T2.CompanyName ORDER BY COUNT(T1.ProductName) DESC LIMIT 1
Database: retail_world
Question: Please list the full name and region of each employee in alphabetical order.
Evidence: full name refers to FirstName LastName; region refers to RegionDescription
SQL: SELECT DISTINCT T1.FirstName, T1.LastName, T4.RegionDescription 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 ORDER BY T1.FirstName
Database: retail_world
Question: Which employee handled the most amount of orders in 1996? Give the full name, title, and address of this employee.
Evidence: most amount of orders refers to max(count(OrderID)); in 1996 refers to OrderDate > = '1996-01-01 00:00:00' AND OrderDate < '1997-01-01 00:00:00'; full name refers to FirstName, LastName
SQL: SELECT FirstName, LastName, Title, address FROM Employees WHERE EmployeeID = ( SELECT T1.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderDate BETWEEN '1996-01-01 00:00:00' AND '1997-01-01 00:00:00' GROUP BY T1.EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 )
Database: retail_world
Question: What was the average unit price of products shipped via United Package in 1997?
Evidence: via United Package refers to CompanyName = 'United Package'; in 1997 refers to OrderDate > = '1997-01-01 00:00:00' AND OrderDate < '1998-01-01 00:00:00'; average unit price = divide(sum(UnitPrice), count(ShipperID))
SQL: SELECT AVG(T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.OrderDate LIKE '1997%' AND T3.CompanyName = 'United Package'
Database: retail_world
Question: Calculate the percentage of shipping done through Speedy Express.
Evidence: through Speedy Express refers to CompanyName = 'Speedy Express'; percentage = divide(count(ShipperID where CompanyName = 'Speedy Express') , count(ShipperID)) * 100%
SQL: SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID
Database: retail_world
Question: Indicate the courtesy title of the 3 employees who have the lowest salary.
Evidence: courtesy title refers to TitleOfCourtesy; the lowest salary refers to MIN(Salary);
SQL: SELECT TitleOfCourtesy FROM Employees ORDER BY Salary LIMIT 3
Database: retail_world
Question: What is the last name of the employees who must report to the Vice President of Sales?
Evidence: report to represents a hierarchical relationship where the person being reported to is usually the direct supervisor of the reporter; Vice President of Sales refers to Title = 'Vice President, Sales';
SQL: SELECT LastName FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Vice President, Sales' )
Database: retail_world
Question: What is the highest total price paid for an order?
Evidence: the highest total price paid for an order can be calculated as MAX(MULTIPLY(UnitPrice, Quantity, SUBTRACT(1-Discount)));
SQL: SELECT UnitPrice * Quantity * (1 - Discount) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * (1 - Discount) DESC LIMIT 1
Database: retail_world
Question: Which 3 products are produced in greater quantity?
Evidence: 3 products produced in greater quantity refer to MAX(SUM(UnitsInStock, UnitsOnOrder)) Limit 3;
SQL: SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 3
Database: retail_world
Question: Of the 10 products with the highest unit price, identify by their ID the ones that have generated the least satisfaction.
Evidence: High reorder level generally means high user satisfaction of the product and vice versa; the least satisfaction refers to MIN(ReorderLevel); the highest unit price refers to MAX(UnitPrice);
SQL: SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1
Database: retail_world
Question: How many non-discontinued products are there in the dairy category?
Evidence: non-discontinued products in the dairy category refer to ProductID where Discontinued = 0 and CategoryName = 'Dairy Products';
SQL: SELECT COUNT(T1.CategoryID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.Discontinued = 0
Database: retail_world
Question: What territories is the Inside Sales Coordinator in charge of?
Evidence: territories refer to TerritoryDescription; Title = 'Inside Sales Coordinator';
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.Title = 'Inside Sales Coordinator'
Database: retail_world
Question: Indicate the name of the companies that have freighted products for a value greater than 2,000,000.
Evidence: freighted products for a value greater than 2,000,000 refer to Freight > 2000000; name of companies refers to CompanyName;
SQL: SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > 2000000
Database: retail_world
Question: Through which companies have products been shipped the most times to the city of Aachen?
Evidence: shipped the most times refer to MAX(COUNT(ShipVia)); city of Aachen refers to ShipCity = 'Aache'; companies refers to CompanyName;
SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCity = 'Aachen' GROUP BY T2.CompanyName ORDER BY COUNT(T1.ShipVia) DESC LIMIT 1
Database: retail_world
Question: List the full name of all employees who work in the Northern region.
Evidence: full names = FirstName, LastName; Northern region refers to RegionDescription = 'Northern';
SQL: SELECT DISTINCT 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 INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Northern'
Database: retail_world
Question: What is the name of the contact person of the Pavlova supplier company?
Evidence: contact person refers to ContactName; Pavlova is the name of the product;
SQL: SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Pavlova'
Database: retail_world
Question: Indicate the name of the products that have been shipped to the city of Paris.
Evidence: shipped to the city of Paris refers to ShipCity = 'Paris';
SQL: SELECT 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 T1.ShipCity = 'Paris'
Database: retail_world
Question: What product is the least shipped to the postal code 28023?
Evidence: the least shipped product refers ProductName where MIN(Quantity);
SQL: SELECT T4.ProductName 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 INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.PostalCode = 28023 ORDER BY T3.Quantity LIMIT 1
Database: retail_world
Question: What is the full name of the employee in charge of the Southern region who is to report to Andrew Fuller?
Evidence: full names = FirstName, LastName; report to represents a hierarchical relationship where the person being reported to is usually the direct supervisor of the reporter; Andrew Fuller refers to Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller'; Southern region refers to RegionDescription = 'Southern';
SQL: SELECT DISTINCT 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 INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Southern' AND T1.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' )
Database: retail_world
Question: On what date did the Du monde entier company request that 9 units of Filo Mix be sent to it?
Evidence: 9 units of Filo Mix refer to ProductName where Quantity = 9; Du monde entier is the name of the customer; date refers to OrderDate;
SQL: SELECT T2.OrderDate 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 INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T4.ProductName = 'Filo Mix' AND T3.Quantity = 9 AND T1.CompanyName = 'Du monde entier'
Database: retail_world
Question: Indicate the name of the categories to which the products of order number 10933 belong.
Evidence: order number 10933 refers to OrderID = 10933;
SQL: SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T2.OrderID = 10933
Database: retail_world
Question: What is the phone number for the employee in charge of the Portsmouth territory?
Evidence: phone refers to HomePhone; Portsmouth territory refers to TerritoryDescription = 'Portsmouth';
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 = 'Portsmouth'
Database: retail_world
Question: What is the average quantity of product that have been shipped by Federal Shipping in November 1996?
Evidence: Federal Shipping refers to CompanyName = 'Federal Shipping'; DIVIDE(SUM(Quantity), COUNT(ProductID)) where CompanyName = 'Federal Shipping' and ShippedDate > = '1996-11-01 00:00:00' AND ShippedDate < '1996-12-01 00:00:00';
SQL: SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.ShippedDate LIKE '1996-11%' AND T3.CompanyName = 'Federal Shipping'
Database: retail_world
Question: Of all the shipments made by United Package throughout the year 1996, what percentage correspond to the month of September?
Evidence: DIVIDE(COUNT(OrderID where CompanyName = 'United Package' and ShippedDate > = '1996-09-01 00:00:00' AND ShippedDate < '1996-09-30 00:00:00')), (COUNT(OrderID where CompanyName = 'United Package' and ShippedDate > = '1996-01-01 00:00:00' AND ShippedDate < '1997-01-01 00:00:00')) as percentage; 

SQL: SELECT CAST(COUNT(CASE WHEN T1.ShippedDate LIKE '1996-09%' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package' AND T1.ShippedDate LIKE '1996%'
Database: retail_world
Question: How many owners are located in Mexico?
Evidence: owners in Mexico refer to ContactTitle where Country = 'Mexico';
SQL: SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico' AND ContactTitle = 'Owner'
Database: retail_world
Question: What is the full address of Andr Fonseca?
Evidence: full address includes Address, City, Region, PostalCode and Country; ContactName = 'Andr Fonseca';
SQL: SELECT Address, City, Region, PostalCode, Country FROM Customers WHERE ContactName = 'Andr Fonseca'
Database: retail_world
Question: What are the companies that have the same phone area code as 171?
Evidence: phone area code as 171 refers to Phone LIKE '(171)%'; companies refer to CompanyName;
SQL: SELECT CompanyName FROM Customers WHERE Phone LIKE '(171)%'
Database: retail_world
Question: What is the difference in the number of employees from the UK and the USA who work as sales representatives?
Evidence: SUBTRACT(COUNT(EmployeeID where Country = 'UK' and Title = 'sales representative'), COUNT(EmployeeID where Country = 'USA' and Title = 'sales representative'));
SQL: SELECT ( SELECT COUNT(Title) FROM Employees WHERE Country = 'UK' AND Title = 'Sales Representative' ) - ( SELECT COUNT(Title) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative' ) AS DIFFERENCE
Database: retail_world
Question: How many sales associates are located in Sao Paulo, Brazil?
Evidence: sales associates refer to ContactTitle; Sao Paulo is the name of the city in the country Brazil;
SQL: SELECT COUNT(CustomerID) FROM Customers WHERE City = 'Sao Paulo' AND Country = 'Brazil' AND ContactTitle = 'Sales Associate'
Database: retail_world
Question: What is the family name of the employee who shipped the order 10521 to CACTU?
Evidence: order 10521 refers to OrderID = 10521; CustomerID = 'CACTU'; family name refers to LastName;
SQL: SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10521 AND T2.CustomerID = 'CACTU'
Database: retail_world
Question: What is the shipping cost for order number 10692 from the company Alfreds Futterkiste?
Evidence: Alfreds Futterkiste is the name of the company; order number 10692 refers to OrderID = 10692;
SQL: SELECT T2.Freight FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10692 AND T1.CompanyName = 'Alfreds Futterkiste'
Database: retail_world
Question: What is the shipping company for order number 10558?
Evidence: order number 10558 refers to OrderID = 10558;
SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10558
Database: retail_world
Question: Please list any three order numbers that have been shipped using Speedy Express.
Evidence: Speedy Express is the name of the shipping company; three order numbers refer to OrderID LIMIT 3;
SQL: SELECT T1.OrderID FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express' LIMIT 3
Database: retail_world
Question: What are the products that belong to the beverage category?
Evidence: products belong to beverage category refer to ProductName where CategoryName = 'beverage';
SQL: SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Beverages'