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: 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
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: 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
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: 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
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: 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
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 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
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: 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
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: 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
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: 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
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 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
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: 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
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 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
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 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
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 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
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 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
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: 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
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 companies do ship Northwind's orders?
Evidence: companies refers to ShipperID
SQL: SELECT COUNT(ShipperID) FROM Shippers
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: 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
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: 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
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 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
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: 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
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 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
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: 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
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: Indicate which company is located in France?
Evidence: company refers to CompanyName; France is a country
SQL: SELECT CompanyName FROM Customers WHERE Country = 'France'