1sf/bird-sql-train-with-schema huggingface dataset:
Database: retail_world
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
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
Database: retail_world
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
Question: What are the total products value shipped to Brazil by Speedy Express Company?
Evidence: shipped to Brazil refers to ShipCountry = 'Brazil'; by Speedy Express Company refers to CompanyName = 'Speedy Express'; total products value refers to sum(MULTIPLY(UnitPrice, Quantity))
SQL: SELECT SUM(T2.Quantity * 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 T3.CompanyName = 'Speedy Express' AND T1.ShipCountry = 'Brazil'
Database: retail_world
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
Question: How many subordinates does employee ID 2 have and what is the biggest order in terms of value that his/her subordinates have created?
Evidence: subordinates of employee ID 2 refers to EmployeeID where ReportsTo = 2;  biggest order in terms of value refers to max(MULTIPLY(Quantity, UnitPrice))
SQL: SELECT COUNT(T1.EmployeeID), SUM(T3.Quantity * T3.UnitPrice) 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 WHERE T1.ReportsTo = 2 ORDER BY SUM(T3.UnitPrice * T3.Quantity) DESC LIMIT 1
Database: retail_world
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
Question: How many sales values have been created by sales representative and which sales representative have the highest sales?
Evidence: sales representative refers to Title = 'Sales Representative'; sales values refers to MULTIPLY(Quantity, UnitPrice); the highest sales refers to max(MULTIPLY(Quantity, UnitPrice))
SQL: SELECT SUM(T3.UnitPrice * 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 WHERE T1.Title = 'Sales Representative' ORDER BY SUM(T3.UnitPrice * T3.Quantity)
Database: retail_world
Tables: Categories, Customers, Employees, Shippers, Suppliers, Products, Orders, OrderDetails
Columns (table index, column name): -1, *, 0, CategoryID, 0, CategoryName, 0, Description, 1, CustomerID, 1, CustomerName, 1, ContactName, 1, Address, 1, City, 1, PostalCode, 1, Country, 2, EmployeeID, 2, LastName, 2, FirstName, 2, BirthDate, 2, Photo, 2, Notes, 3, ShipperID, 3, ShipperName, 3, Phone, 4, SupplierID, 4, SupplierName, 4, ContactName, 4, Address, 4, City, 4, PostalCode, 4, Country, 4, Phone, 5, ProductID, 5, ProductName, 5, SupplierID, 5, CategoryID, 5, Unit, 5, Price, 6, OrderID, 6, CustomerID, 6, EmployeeID, 6, OrderDate, 6, ShipperID, 7, OrderDetailID, 7, OrderID, 7, ProductID, 7, Quantity
Question: How many employees is a UK citizen and are they all covering the same region?
Evidence: is a UK citizen refers to Country = 'UK'
SQL: SELECT COUNT(T1.EmployeeID), T3.RegionID 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.Country = 'UK' GROUP BY T3.RegionID