qid,question,target_sql,ml_selected_sql,ml_score,ml_candidate_rank,ml_exact_match,candidate_contains_target,num_candidates 8,What are the ID and description of the condiments category?,"SELECT CategoryID, Description FROM Categories WHERE CategoryName = 'Condiments'","SELECT CategoryID, Description FROM Categories WHERE CategoryName = 'Condiments'",2.6396860807602733,1,1,1,24 12,On which day was the most verbose complaint received?,SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ),SELECT `Date received` FROM callcenterlogs ORDER BY ser_time DESC LIMIT 1,4.898225637838208,1,0,0,30 17,List the full name of employees and titles who have to report to Sales Manager.,"SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )","SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = 'Sales Manager'",1.9059548139463691,1,0,0,29 19,How many restaurants have more than 4 star reviews?,SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review > 4,2.9235273464397573,1,0,1,29 23,How many records in orders were recorded in 2017?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2017%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2017%',4.860603963746542,1,1,1,21 26,Who ordered the order ID CA-2011-118976 from the East region?,SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order ID` = 'CA-2011-118976' AND T2.Region = 'East',SELECT DISTINCT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Region = 'East' AND T1.Order ID = 'CA-2011-118976',1.807109897008021,1,0,0,30 29,How many records are in the client table?,SELECT COUNT(UNKNOWN) FROM client,SELECT COUNT(UNKNOWN) FROM client,3.1109523087002167,1,1,1,23 33,Where's Foon Yue Tseng's office located at? Give the detailed address.,"SELECT T1.addressLine1, T1.addressLine2 FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode WHERE T2.firstName = 'Foon Yue' AND T2.lastName = 'Tseng'",SELECT T3.email FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2._officeCode WHERE T2.jobTitle = 'Foon Yue Tseng' AND t1.city = 'France',-4.194238206172553,11,0,0,25 43,What is the detailed product of the complaint filed by Diesel Galloway on 2014/7/3?,SELECT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' AND T2.`Date received` = '2014-07-03',"SELECT T3.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2013-07-03'",-0.24178166093990355,6,0,0,18 45,What is the least purchased product by stores in the city of Santa Clarita?,SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Santa Clarita' GROUP BY T1.`Product Name` ORDER BY COUNT(T1.`Product Name`) ASC LIMIT 1,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'Santa Clarita' THEN T1.`Product Name` END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL,0.5340247412774978,6,0,0,29 51,How many customers are there in India?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'INDIA',SELECT COUNT(c_custkey) FROM customer AS c INNER JOIN nation AS n_nationkey WHERE n_name = 'INDIA',5.28069294663564,1,0,0,24 61,List the distinct productCode values linked to orderdetails.,SELECT DISTINCT T2.productCode FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode,SELECT DISTINCT T2.productCode FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2._orderNumber,-1.8701225009367681,1,0,0,24 68,How many records in central_superstore were recorded in 2017?,SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2017%',SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2017%',4.8266863463398515,1,1,1,24 69,To which region does the sales team that has used the WARE-MKL1006 warehouse the most times for its shipments belong?,SELECT T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.WarehouseCode = 'WARE-MKL1006' GROUP BY T2.Region ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1,SELECT T FROM ( SELECT CASE WHEN T1.WarehouseCode = 'WARE-MKL1006' THEN T2.Region END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.`Sales TeamID` = T1._SalesTeamID ) WHERE T IS NOT NULL,1.5944483297295617,1,0,0,27 70,Which nation and region does the Customer#000000008 come from?,"SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_name = 'Customer#000000008'","SELECT T2.c_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2._custkey INNER JOIN region AS T3 ON T2.`r_regionkey` = T3._regionkey WHERE T1.`n_name` = 'Customer#000000008'",-2.0299420661317296,7,0,0,26 73,List the distinct values of ContactTitle in the Suppliers table.,SELECT DISTINCT ContactTitle FROM Suppliers,SELECT DISTINCT ContactTitle FROM Suppliers,1.7139637912767958,1,1,1,17 79,Which region has the most number of sales team?,SELECT Region FROM `Sales Team` GROUP BY Region ORDER BY COUNT(DISTINCT `Sales Team`) DESC LIMIT 1,SELECT Region FROM `Sales Team` GROUP BY Region ORDER BY COUNT(SalesTeamID) DESC LIMIT 1,-0.6992493431312976,2,0,0,28 80,Tally the product name and quantity of the first ten sales.,"SELECT T3.Name, T2.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.SalesID BETWEEN 1 AND 10","SELECT T4.Name, T3.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN Products AS T3 ON T2.ProductID = 3 ORDER BY T1.`MiddleInitial` DESC LIMIT 1",0.8568596797976075,1,0,0,29 84,How many records in Orders were recorded in 2022?,SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2022%',SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2022%',5.25255107492374,1,1,1,23 90,"For each Issue, how many records are there in events?","SELECT Issue, COUNT(Client_ID) FROM events GROUP BY Issue","SELECT Issue, COUNT(Client_ID) FROM events GROUP BY Issue",5.573540162828874,1,1,1,21 93,What is the average salary of sales representatives in the United Kingdom?,SELECT AVG(Salary) FROM Employees WHERE Title = 'Sales Representative' AND Country = 'UK',SELECT AVG(Salary) FROM Employees WHERE Country = 'United' AND Title = 'Sales Representative',2.5006997933337103,1,0,1,24 95,What are the the total number of territory in each region?,"SELECT COUNT(TerritoryDescription) FROM Territories WHERE RegionID IN (1, 2, 3, 4) GROUP BY RegionID",SELECT COUNT(TerritoryDescription) FROM Territories GROUP BY RegionID,2.53898779313122,1,0,0,29 96,"In 2020, how many joined records exist between Sales Orders and Customers?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2020%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2020%',4.378280799748311,1,1,1,25 99,List out full name of employees who are working in Tokyo?,"SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo'","SELECT firstName, lastName FROM employees AS firstName INNER JOIN offices AS officeCode WHERE city = 'Tokyo'",-2.1520400921461746,3,0,0,26 100,"For each city, how many location records are linked?","SELECT T2.city, COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant GROUP BY T2.city","SELECT T2.city, COUNT(T1.`street_name Database: restaurant`) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.`id_resaurant` GROUP BY T2._city",-7.875421129610318,26,0,0,28 109,"In 2023, how many joined records exist between Employees and Orders?",SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.HireDate LIKE '2023%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T1.HireDate LIKE '2023%',3.444427737185252,1,0,0,30 111,What is the total Sales in the south_superstore table?,SELECT SUM(Sales) FROM south_superstore,SELECT SUM(Sales) FROM south_superstore,3.8154584555832485,1,1,1,21 113,Find the total payment of the orders by customers from San Francisco.,SELECT SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) AS TOTALPAYMENT 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.City = 'San Francisco',"SELECT SUM(CASE WHEN T1.City = 'San Francisco' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID INNER JOIN `Order Details`""",-7.092225612928408,21,0,0,30 120,List the country name of the customers in the building marketing segment with an account balance greater than 80% of the average account balance of all customers.,SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN ( SELECT AVG(c_acctbal) * 0.8 AS avg_acctbal FROM customer ) AS T3 WHERE T1.c_acctbal > T3.avg_acctbal,"SELECT CAST(SUM(IIF(T1.c_acctbal > 80, 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1._custkey = T2._nationkey INNER JOIN ( SELECT AVG(account balance) FROM nation )",-4.52559319798764,3,0,0,25 122,List the distinct values of ProductID in the Order Details table.,SELECT DISTINCT ProductID FROM `Order Details`,SELECT DISTINCT ProductID FROM `Order Details`,4.191300362894261,1,1,1,18 132,"For each Customer ID, what is the average Discount?","SELECT `Customer ID`, AVG(Discount) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Discount) FROM east_superstore GROUP BY `Customer id`",0.9338831875247025,9,1,1,28 134,"For each Region, how many records are there in east_superstore?","SELECT Region, COUNT(`Customer ID`) FROM east_superstore GROUP BY Region","SELECT Region, COUNT(`Customer ID`) FROM east_superstore GROUP BY Region",2.2163750566524576,1,1,1,19 135,In which regions are there no African food restaurants?,SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type != 'african',SELECT DISTINCT T3.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1: food_type = 'african',-4.619399730894314,22,0,0,30 139,List the distinct values of CustomerID in the Sales table.,SELECT DISTINCT CustomerID FROM Sales,SELECT DISTINCT CustomerID FROM Sales,4.508142555656296,1,1,1,19 144,"What products were ordered by the customer ID ""WILMK"" which were required on 3/26/1998?",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.RequiredDate LIKE '1998-03-26%' AND T1.CustomerID = 'WILMK',"SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID` = T2.OrderID INNER JOIN Products AS T3 WHERE T1.CustomerID = 'WILMK' AND STRFTIME('%Y', T2.`RequiredDate`) = '1998'",-2.0214266730517294,11,0,0,30 149,"For the planes which has the hightest total price, how much it exceeds the average?",SELECT MAX(quantityOrdered * priceEach) - AVG(priceEach) FROM orderdetails WHERE productCode IN ( SELECT productCode FROM products WHERE productLine = 'Planes' ),SELECT SUM(T2.MSRP - T2.buyPrice) / COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.`productCode` WHERE T3.productLine = 'Planes' AND T4.productName = 'Hightest Price',-0.04405666331172187,1,0,0,25 150,Calculates the profit processed by Supplier No. 7414 on order No. 817154.,SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey WHERE T1.l_suppkey = 7414 AND T1.l_orderkey = 817154,"SELECT CAST(SUM(IIF(T2.ps_supplycost = 7414, 1, 0)) AS REAL) * 100 / COUNT(T1.l_linenumber) FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.ls_suppkey = STRUPP_SUPPKEY",-4.045988693357122,1,0,0,23 151,Who is the customer who purchased the largest total cost of products in a single order?,"SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T1.`Order ID`, T2.`Customer Name` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1",SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID ORDER BY SUM(T1.Sales * T1.Discount) DESC LIMIT 1,0.002798581759506318,1,0,0,30 152,What product is the least shipped to the postal code 28023?,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,SELECT T3.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`PostalCode Database: retail_world` = T2.`CustomerID` INNER JOIN `Order Details` AS T3 ON T2.OrderID = 3 WHERE T1.PostalCode = 28023,-7.1296000561842385,2,0,0,30 157,Please provide sales ID for products named Hex Nut with a price greater than 100.,SELECT T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Hex Nut%' AND T1.Price > 100,SELECT CAST(SUM(CASE WHEN T1.Name = 'Hex Nut' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1 .ProductID = T2.ProductID,1.8416924756707844,5,0,0,30 166,What is the ratio between customers who live in Texas and customers who live in Indiana?,SELECT CAST(SUM(CASE WHEN State = 'Texas' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN State = 'Indiana' THEN 1 ELSE 0 END) FROM people,SELECT CAST(SUM(CASE WHEN State = 'Texas' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(State) FROM people,2.8981884904816275,1,0,0,26 168,"Among the suppliers providing parts under the type ""promo brushed steel"", how many of them are in debt?",SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T3.s_acctbal < 0 AND T1.p_type = 'PROMO BRUSHED STEEL',SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partsupp = T2.psupp INNER JOIN supplier AS T3 ON T3.ps_suppkey = T4.s2_suppekey WHERE T2.`s_acctbal` = 'PROMO BRUSHED STEEL',-2.7280764565498643,2,0,0,30 175,What is the name of the supplier that supplies the most products to the company?,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,SELECT T2.`SupplierID Database: retail_world` FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID ORDER BY T2.Company LIMIT 1,-7.008911618300695,22,0,0,26 177,What are the total sales of the accumulated orders of Hon Valutask Swivel Chairs in the West region?,SELECT SUM(T1.Sales) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Valutask Swivel Chairs' AND T1.Region = 'West',SELECT SUM(CASE WHEN T1.Region = 'West' AND T2.`Product Name` = 'Hon Valutask Swivel Chairs' THEN SUM(T1.Sales) DESC LIMIT 1,-6.2906428726702375,1,0,0,28 179,"Indicate the name of the companies that have freighted products for a value greater than 2,000,000.",SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > 2000000,SELECT DISTINCT T3.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.Freight > 20000,-0.023429113853973317,6,0,0,30 180,List the distinct car_name values linked to production.,SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,3.5476738467676725,2,1,1,25 184,Please name any three restaurants that have an unidentified region.,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T3.region = 'unknown' LIMIT 3,SELECT DISTINCT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant INNER JOIN geographic AS T3 ON T3.city = T4.city WHERE T 3.region = 'unknown' LIMIT 3,-4.802868023020555,9,0,0,26 188,Provide the full name of the employee who processed the sales order with ID 10274.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10274","SELECT `FirstName`, `LastName Database: retail_world` FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = STRFTIME('%Y', T2.OrderID) = 10274 GROUP BY `Sales Order`",-7.320715064863916,6,0,0,29 191,How many territories are owned by Anne Dodsworth?,SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Anne' AND T1.LastName = 'Dodsworth',SELECT COUNT(TerritoryID) FROM ( SELECT DISTINCT CASE WHEN T1.FirstName = 'Anne' THEN 1 ELSE 0 END) AS num FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1 . EmployeeID = T2.EmployeeID,-6.1521068108065835,8,0,0,28 192,What is the total Discount in the west_superstore table?,SELECT SUM(Discount) FROM west_superstore,SELECT SUM(Discount) FROM west_superstore,4.62380479920519,1,1,1,20 196,How many records are in the Categories table?,SELECT COUNT(Description) FROM Categories,SELECT COUNT(Description) FROM Categories,4.858577923200564,1,1,1,20 199,List the distinct values of FirstName in the Employees table.,SELECT DISTINCT FirstName FROM Employees,SELECT DISTINCT FirstName FROM Employees,3.6114104240234646,1,1,1,16 203,"How many percent more orders were fulfilled with shipper company ""United Package"" than with ""Speedy Express""?",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,SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.ShipperID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2 . ShipperID,-3.4007992510639347,27,0,0,30 205,Name the products where the suppliers come from Finland.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Finland',SELECT DISTINCT T3.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.Country = 'Finland',-1.8655527262926508,8,0,0,29 211,How many data records have matching records in production?,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1 . ID = T2.ID,3.7963757177570874,6,1,1,23 214,What product category got the least sales in the west superstore?,SELECT T2.Category FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` ORDER BY T1.Sales LIMIT 1,SELECT T2.Category FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id` ORDER BY T1.Sales LIMIT 1,-0.6316378290575527,9,1,1,28 220,List the products that were ordered by Anne McFarland from the Western store.,SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Anne McFarland',"SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Anne McFarland'",-0.46172283708573936,1,0,0,28 227,Please list the IDs of the orders made by Aimee Bixby with more than 3 kinds of products ordered.,SELECT DISTINCT T2.`Order ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' GROUP BY T2.`Product ID` HAVING COUNT(T2.`Product ID`) > 3,SELECT DISTINCT T3.`Product ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Customer Name = 'Aimee Bixby' AND T2.Order ID > 3,3.4026836594773378,1,0,0,30 230,How many client records have matching records in events?,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,7.188191141256713,1,1,1,26 233,How many records in orders were recorded in 2016?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2016%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2016%',4.860603963746542,1,1,1,21 238,"For each EmployeeID, how many Employees records are linked?","SELECT T2.EmployeeID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.EmployeeID","SELECT T2.EmployeeID, COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.Employees = T2.' + T1 . EmployeeID GROUP BY T2.`Employeeid`",-8.213886909322758,22,0,0,29 239,How much per unit of Konbu does Mayumi's charge?,SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'Mayumi%' AND T1.ProductName = 'Konbu',"SELECT CAST(SUM(IIF(T1.ProductName = 'Konbu', T2.`UnitPrice Database: retail_world`) - SUM(T2.CompanyName)) AS REAL) * 100 / COUNT(*) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID",-7.568537825404859,1,0,0,29 240,How many office supply orders were made by Cindy Stewart in the south superstore?,SELECT COUNT(*) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.Category = 'Office Supplies' AND T2.`Customer Name` = 'Cindy Stewart',SELECT COUNT(CASE WHEN T2.`Customer Name` = 'Office Supply' THEN 1 ELSE 0 END) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON T3.`Product ID` LIKE 'Cindy Stewart%' AND T3.Category = 'Office Supplies',-4.566439563128487,8,0,0,27 248,"What is the full address of the restaurant named ""Sanuki Restaurant""?","SELECT T2.city, T1.street_num, T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'sanuki restaurant'","SELECT T2.street_num, T3.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = STRFTIME('%Y', T2.`city`) = 'Sanuki Restaurant'",1.7829056004339683,5,0,0,17 252,"For each Segment, how many west_superstore records are linked?","SELECT T2.Segment, COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.Segment","SELECT T2.Segment, COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`CustomerID` = T2.`Customer ID` GROUP BY T2._Segment",0.7038939383663925,7,0,0,26 254,"What is the region of stores which have type of ""Town"" in the list?",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.Type = 'Town' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN Type = 'Town' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1._StateCode ) WHERE T IS NOT NULL,1.1631641605320053,1,0,0,26 270,"For each Type, how many Sales Orders records are linked?","SELECT T2.Type, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID GROUP BY T2.Type","SELECT T2.Type, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS t2 ON t2.StoreID = t1._StoreID GROUP BY T2.`Type`",0.8910530527264295,8,0,0,25 274,What is the percentage of total orders from stores in Orange County in 2018?,SELECT CAST(SUM(CASE WHEN T2.County = 'Orange County' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/18',SELECT CAST(SUM(CASE WHEN T2.County = 'Orange County' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS t2 ON t2.StoreID = t1._StoreID,-1.3084367790680969,1,0,0,25 279,Which car consumes fuel the most and has the highest price?,"SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.mpg DESC, T2.price DESC LIMIT 1",SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 WHERE T2.price = ( SELECT MAX(price) FROM price ),3.256519887893696,3,0,0,29 287,How many records are in the east_superstore table?,SELECT COUNT(`Product ID`) FROM east_superstore,SELECT COUNT(`Product ID`) FROM east_superstore,4.058955478397152,1,1,1,22 289,"In 2016, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2016%',1.7299368067526704,3,1,1,25 290,List the distinct values of TerritoryID in the EmployeeTerritories table.,SELECT DISTINCT TerritoryID FROM EmployeeTerritories,SELECT DISTINCT TerritoryID FROM EmployeeTerritories,4.2340918682410456,1,1,1,18 291,"Which ship mode has more ""deliver in person"" instructions, rail or mail?","SELECT IIF(SUM(IIF(l_shipmode = 'RAIL', 1, 0)) - SUM(IIF(l_shipmode = 'MAIL', 1, 0)), 'RAIL', 'MAIL') AS result FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON'","SELECT T1.l_shipmode FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1-URIL' AND l_deliveryinstruct = 'DELIVER IN PERSON' LIMIT 1",-5.599972335921321,9,0,0,26 296,Provide the products list which were ordered in 1996 by the company in Norway.,"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.Country = 'Norway' AND STRFTIME('%Y', T2.OrderDate) = '1996'","SELECT T3.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID INNER JOIN `Order Details` AS T3 ON STRFTIME('%Y', T2.`OrderDate`) = '1996' AND T1.Country = 'USA'",-7.553098544720364,21,0,0,30 297,What is the average price of model 70 cars?,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.model = 70,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1._model = 70,-3.233930100593507,26,0,0,30 298,"For each Product ID, how many records are there in south_superstore?","SELECT `Product ID`, COUNT(Order) FROM south_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM south_superstore GROUP BY `%Product ID`",1.0139516041251873,5,0,1,27 305,"In 2021, how many joined records exist between Sales Orders and Products?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2021%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2021%',3.9900040784658684,1,1,1,25 308,"For each l_linestatus, what is the average l_discount?","SELECT l_linestatus, AVG(l_discount) FROM lineitem GROUP BY l_linestatus","SELECT l_linestatus, AVG(l_discount) FROM lineitem ORDER BY l_discount DESC LIMIT 1",0.3750668582099326,1,0,1,30 309,What is the average quantityInStock for joined products and orderdetails records?,SELECT AVG(T1.quantityInStock) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode,SELECT AVG(T1.quantityInStock) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.ProductCode,6.130172956098138,1,1,1,18 314,"For each Product ID, how many east_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product ID`","SELECT T2.Product ID, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2._Product ID",-1.082806217005385,6,0,0,30 315,List the first names of employees with trading quantity for more than 500.,SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.Quantity > 500,SELECT DISTINCT T1.FirstName FROM Employees AS t1 INNER JOIN Sales AS T2 ON t1.EmployeeID = t2.SalesPersonID WHERE T2.Quantity > 500,5.302668223269325,1,1,1,22 318,How many records in Store Locations were recorded in 2016?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2016%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2016%',4.531000601842846,1,1,1,25 322,What is the average weight of Japanese cars with 4 cylinders that were produced from 1975 to 1980?,SELECT AVG(T1.weight) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year BETWEEN 1975 AND 1980 AND T1.cylinders = 4 AND T3.country = 'Japan',"SELECT CAST(SUM(IIF(T2.model_year = 1975, 1, 0)) AS REAL) / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country WHERE T1.`cylinders` = 4",-4.580752892966118,11,0,0,27 350,"For each Product ID, how many records are there in south_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM south_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM south_superstore GROUP BY `Product id`",2.239224142212158,5,1,1,25 351,How many Order Details records have matching records in Orders?,SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.OrderID = T2.OrderID,SELECT COUNT(T2.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.`ProductID Database: retail_world` = T2.ProductID ORDER BY T1.CompanyName,-4.819189493830723,23,0,0,29 354,"In sales ID between 30 and 40, who is the customer that bought a total quantity of 403?","SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity = 403 AND T1.SalesID BETWEEN 30 AND 40",SELECT T3.FirstName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.Quantity BETWEEN 30 AND 40,0.6323959812808831,1,0,0,30 366,"For each Region, how many records are there in east_superstore?","SELECT Region, COUNT(Order) FROM east_superstore GROUP BY Region","SELECT Region, COUNT(Order) FROM east_superstore GROUP BY Region",3.2614040037227507,1,1,1,19 367,What are the product names of Exotic Liquids?,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids',"SELECT DISTINCT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE STRFTIME('%Y', T2.`CompanyName`) = 'Exotic Liquids'",-4.508764147162053,1,0,0,28 371,"Among the parts shipped by rail on 1st December, 1995, list part names with 10% discount.",SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey INNER JOIN lineitem AS T3 ON T1.ps_partkey = T3.l_partkey WHERE T3.l_discount = 0.1 AND T3.l_shipdate = '1995-12-01' AND T3.l_shipmode = 'RAIL',"SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2._partkey INNER JOIN lineitem AS T3 ON T3.l_instruct = T4.L_INSTRUCT(T2.m_orderkey, 1, 1995, 0) AS T ORDER BY T_discount DESC LIMIT 1",-3.5764844319957745,2,0,0,29 373,How many records are in the client table?,SELECT COUNT(client_id) FROM client,SELECT COUNT(client_id) FROM client,4.795353829950178,1,1,1,22 376,"In 2014, what is the percentage of complaints from consumers in Houston that the delay was over 5 days?","SELECT CAST((SUM(CASE WHEN strftime('%J', T2.`Date sent to company`) - strftime('%J', T2.`Date received`) > 5 THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Houston' AND strftime('%Y', T2.`Date received`) = '2014'","SELECT CAST(SUM(CASE WHEN strftime('%Y', `Date received`) > '5' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date sent to company` = 'Houston'",-2.356343933806774,3,0,0,30 387,What is the average Quantity for joined Orders and Order Details records?,SELECT AVG(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,SELECT AVG(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.orderID,1.2008969059274515,3,1,1,22 393,How many records are in the central_superstore table?,SELECT COUNT(ID) FROM central_superstore,SELECT COUNT(ID) FROM central_superstore,3.274828510138871,1,1,1,18 402,How many records in events were recorded in 2023?,SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2023%',SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2023%',4.86473858191754,1,1,1,20 410,How many orders of more than 10 items have been returned?,SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 10 AND l_returnflag = 'R',SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 10 AND l_returnflag = 'R',2.78357860860658,1,1,1,30 414,List the distinct ProductID values linked to Sales Orders.,SELECT DISTINCT T2.ProductID FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,SELECT DISTINCT T2.`ProductID` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,1.2080396042427846,2,0,0,29 415,Please calculate the total value of Motorcycles orders.,SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productLine = 'Motorcycles',SELECT SUM(t1.quantityOrdered * t1.priceEach) / COUNT(t2.MSRP) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t2.productCode = t1 . productCode,-1.490040509993438,17,0,0,25 416,How many territories are there in the Eastern region?,SELECT COUNT(T1.RegionID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern',SELECT SUM(CASE WHEN T2.RegionDescription = 'Eastern' THEN 1 ELSE 0 END) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID,-4.811639413325915,15,0,0,28 426,"For each Category, how many east_superstore records are linked?","SELECT T2.Category, COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Category","SELECT T2.Category, COUNT(T1.Product ID) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Category",0.11811723323674184,4,0,0,29 429,How many records in central_superstore were recorded in 2019?,SELECT COUNT(Order) FROM central_superstore WHERE Ship LIKE '2019%',SELECT COUNT(Order) FROM central_superstore WHERE Ship LIKE '2019%',4.711183793132866,1,1,1,24 432,List the distinct values of CustomerID in the Customers table.,SELECT DISTINCT CustomerID FROM Customers,SELECT DISTINCT CustomerID FROM Customers,4.732550129264441,1,1,1,16 438,Calculate the percentage of cars that belong to the USA.,SELECT CAST(SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin,SELECT CAST(SUM(CASE WHEN origin = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin,1.6286604568789,3,0,0,30 443,Which Details has the highest Discount?,SELECT Details FROM `Order Details` ORDER BY Discount DESC LIMIT 1,SELECT Details FROM `Order Details` ORDER BY Discount DESC LIMIT 1,2.554689026984757,1,1,1,26 450,List all the customers with name containing the word 'Group'.,"SELECT T FROM ( SELECT IIF(`Customer Names` LIKE '%Group%', `Customer Names`, NULL) AS T FROM Customers ) WHERE T IS NOT NULL",SELECT T FROM ( SELECT DISTINCT CASE WHEN `Customer Names` = 'Group' THEN CustomerID ELSE NULL END AS T FROM Customers ) WHERE T IS NOT NULL,-0.014752976819227373,1,0,1,30 457,"What is the original price of the ""Black Avery Flip-Chart Easel Binder""?",SELECT T1.Sales / (1 - T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Blackstonian Pencils',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'Black Avery Flip-Chart Easel Binder', 1, 0)) AS REAL) * 100 / COUNT(T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductId`",-0.9601252159785549,8,0,0,28 461,How many orders were from Hanna Moos company in 1999?,"SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1999' AND T1.CompanyName = 'Hanna Moos'",SELECT COUNT(*) FROM ( SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '1999%' AND CompanyName = 'Hanna Moos' ) AS num,-0.9369920488860412,10,0,0,30 463,Which order number has the highest unit price?,"SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 )",SELECT OrderNumber FROM `Sales Orders` ORDER BY Unit Price DESC LIMIT 1,1.3629577156914547,1,0,0,24 465,Please list the names of all the products ordered by Aimee Bixby in 2016.,"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND STRFTIME('%Y', T2.`Ship Date`) = '2016'","SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Aimee Bixby' AND T2.Ship LIKE '2016%'",0.04618569784556424,1,0,0,30 468,List all the average reviews of Chinese restaurants for each county from highest to lowest.,SELECT AVG(T1.review) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'chinese' GROUP BY T1.id_restaurant ORDER BY AVG(T1.review) DESC,SELECT AVG(T3.review) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T3.county ORDER BY COUNT(T1.id_restaurant),-5.161953890174205,24,0,0,30 471,Give customer No.106936's region name.,SELECT T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_custkey = 106936,SELECT T.r_name FROM ( SELECT T2.c_custkey FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = '106936' ) AS T ORDER BY T.num DESC LIMIT 1,-5.426703983966979,1,0,0,30 472,How many Employees records have matching records in Customers?,SELECT COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2.MiddleInitial,SELECT COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.LastName = T2.FirstName,2.7437092407427337,5,0,0,28 478,Which customer made the order No. 10160? Give the contact name.,"SELECT t2.contactFirstName, t2.contactLastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.orderNumber = '10160'",SELECT customerName FROM orders WHERE orderNumber = '10160',4.352833908405115,1,0,0,30 486,"List down the email of client whose complaint is type ""PS"".",SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS',SELECT MIN(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS',-0.2277448836583151,6,0,0,26 494,How many west_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`ProductID`,0.4633335460807577,19,0,0,22 495,What is the full name of client whose email address is emily.garcia43@outlook.com?,"SELECT first, middle, last FROM client WHERE email = 'emily.garcia43@outlook.com'","SELECT first, middle, last FROM client WHERE email = 'emily.garcia43@outlook.com'",4.005777740928672,1,1,1,28 497,Which region has the lowest number of countries?,"SELECT T.r_name FROM ( SELECT T1.r_name, COUNT(T2.n_name) AS num FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey GROUP BY T1.r_name ) AS T ORDER BY T.num LIMIT 1",SELECT T.r_name FROM ( SELECT MIN(r_regionkey) AS num FROM region ) AS T ORDER BY T.num LIMIT 1,-2.7311750860646993,4,0,0,29 501,List the full name and phone number of clients who submitted the complaint via fax.,"SELECT T1.first, T1.middle, T1.last, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Fax'","SELECT T3.`Submitted via`, COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`submitted via` = 'Fax'",-1.1751568838005522,4,0,0,25 505,"For each city, how many generalinfo records are linked?","SELECT T2.city, COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant GROUP BY T2.city","SELECT T2.city, COUNT(T1.`label Database: restaurant`) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant LIKE '1%' GROUP BY T2.`city`",-7.73682157080263,7,0,0,30 511,List the distinct Submitted via values linked to callcenterlogs.,SELECT DISTINCT T2.`Submitted via` FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.Submitted via FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID`,-0.5755614949355405,2,0,0,27 527,List the distinct values of productCode in the products table.,SELECT DISTINCT productCode FROM products,SELECT DISTINCT productCode FROM products,4.732550129264441,1,1,1,14 530,What is the highest Profit in the central_superstore table?,SELECT MAX(Profit) FROM central_superstore,SELECT MAX(Profit) FROM central_superstore,4.255797521108007,1,1,1,21 533,How many west_superstore records have matching records in people?,SELECT COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`Customer ID`,3.2373698108779645,6,1,1,27 534,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN central_superStore AS T2 ON T1.`Card ID` = T2.`Product ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,29 535,List the distinct EmployeeID values linked to Employees.,SELECT DISTINCT T2.EmployeeID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.EmployeeID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`Customer ID` = T2.`CustomerID`,-4.963921839389222,13,0,0,30 538,How many records in production were recorded in 2015?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2015%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2015%',4.69216415425934,1,1,1,25 544,Which region does Noah Thompson live in?,SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Noah' AND T1.last = 'Thompson',SELECT T3.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE first = 'Noah' AND last = 'Thompson',-3.6263523881242445,7,0,0,25 551,List the distinct values of Sub-Category in the product table.,SELECT DISTINCT `Sub-Category` FROM product,SELECT DISTINCT `Sub-Category` FROM product,4.8772383955008465,1,1,1,19 555,"For each Country, how many records are there in Customers?","SELECT Country, COUNT(CustomerID) FROM Customers GROUP BY Country","SELECT Country, COUNT(CustomerID) FROM Customers GROUP BY Country",5.657580059238104,1,1,1,20 561,Which part and supplier have the most profit?,"SELECT T3.p_name, T4.s_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey INNER JOIN supplier AS T4 ON T1.ps_suppkey = T4.s_suppkey ORDER BY T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity DESC LIMIT 1","SELECT T.p_partkey, T.s_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppspkey INNER JOIN part AS T3 ON T3.p2_partname = T4._partname ORDER BY T.num LIMIT 1",-3.7888642598539426,2,0,0,28 567,What is the average SalesID for joined Sales and Products records?,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2. ProductID,6.816686193797493,1,1,1,24 568,"For each Product ID, how many west_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product ID`","SELECT T2.Product ID, COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`ProductID` GROUP BY T2._Product ID",-4.201297333548232,1,0,0,24 577,"For each country, how many records are there in country?","SELECT country, COUNT(origin) FROM country GROUP BY country","SELECT country, COUNT(origin) FROM country GROUP BY country",5.308929195236603,1,1,1,21 582,What percentage of orders were placed by customers in Madrid city in 1996?,"SELECT CAST(COUNT(CASE WHEN T1.City = 'Madrid' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.City) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = 1996","SELECT CAST(SUM(CASE WHEN T1.City = 'Madrid' AND STRFTIME('%Y', T2.OrderDate) = '1996' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2._CustomerID",-7.530695244891939,1,0,0,30 584,What percentage does the shipment of products by Speedy Express to Sweden make up to the shipping company's total?,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',"SELECT CAST(SUM(IIF(T2.CompanyName = 'Speedy Express', 1, 0)) AS REAL) * 100 / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID",-1.994509652935877,17,0,0,29 586,What is the average Quantity in the Order Details table?,SELECT AVG(Quantity) FROM `Order Details`,SELECT AVG(Quantity) FROM `Order Details`,4.585379189987882,1,1,1,21 594,How many employees from USA with Sales Representative title?,SELECT COUNT(Country) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative',SELECT COUNT(Country) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative',3.8488785355757718,2,1,1,26 596,"For each Region, how many records are there in central_superstore?","SELECT Region, COUNT(`Customer ID`) FROM central_superstore GROUP BY Region","SELECT Region, COUNT(Discount) FROM central_superstore GROUP BY Region",1.7087050757004802,2,0,1,23 598,How many records are in the customer table?,SELECT COUNT(c_custkey) FROM customer,SELECT COUNT(c_custkey) FROM customer,4.233836292305277,1,1,1,22 599,"Among the customers who have ordered the product ""Telescoping Adjustable Floor Lamp"", how many of them are consumers?",SELECT COUNT(DISTINCT T1.`Customer Name`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp' AND T1.Segment = 'Consumer',SELECT COUNT(CASE WHEN T2.`Product Name` = 'Telescoping Adjustable Floor Lamp' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON T3.`Product ID` LIKE 'Product ID%' AND T1.Segment = 'Consumer',-3.6633589323056497,3,0,0,30 602,Which is the most ordered quantity product? What is its expected profit margin per piece?,"SELECT productName, MSRP - buyPrice FROM products WHERE productCode = ( SELECT productCode FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1 )","SELECT productName, MSRP - buyPrice FROM products WHERE productCode = ( SELECT productCode FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1 )",2.9745702966853305,2,1,1,30 605,How many records are in the generalinfo table?,SELECT COUNT(review) FROM generalinfo,SELECT COUNT(review) FROM generalinfo,4.233836292305277,1,1,1,20 621,Calculate the total net profit of the store located in highest median income city.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 1",SELECT SUM(CASE WHEN T2.`City Name` = 'Net Profit' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) AS T ORDER BY T DESC LIMIT 1,1.7807282246498806,1,0,0,28 625,How many customers who are not in debt ordered an urgent order?,SELECT COUNT(T2.c_custkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_acctbal > 0 AND T1.o_orderpriority = '1-URGENT',SELECT COUNT(T2.c_nationkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T2.`c_acctbal` = '1-URGENT',0.16818702357949877,1,0,0,30 626,"For each ProductID, how many records are there in Order Details?","SELECT ProductID, COUNT(OrderID) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, COUNT(OrderID) FROM `Order Details` GROUP BY ProductID",2.2163750566524576,1,1,1,23 633,"Which nation does the supplier with the account balance of ""4393.04"" belong to?",SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal = 4393.04,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = '4393.04',1.158471383052099,1,0,0,30 642,"For each City, how many records are there in Customers?","SELECT City, COUNT(ContactTitle) FROM Customers GROUP BY City","SELECT City, COUNT(ContactTitle) FROM Customers GROUP BY City",5.101483010172825,1,1,1,20 650,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.`Customer ID`, COUNT(T1.`Sales Database: superstore`) FROM east_superstore AS T1 INNER JOIN west_superStore AS T2 ON T1.`CustomerID` = T2.Customer ID GROUP BY T2.'Customer ID",-7.2003758111321225,22,0,0,30 655,"In 2019, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2019%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2019%',1.7299368067526704,3,1,1,26 657,What is the percentage of cars that was produced by Japan among those that have a sweep volume of no less than 30?,SELECT CAST(SUM(CASE WHEN T3.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.displacement / T1.cylinders > 30,"SELECT CAST(SUM(IIF(T2.country = 'Japan', 1, 0)) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country",-4.366092240845418,2,0,0,26 668,How many records in central_superstore were recorded in 2020?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2020%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2020%',1.3761424421645654,1,1,1,25 670,What is the average Sales in the west_superstore table?,SELECT AVG(Sales) FROM west_superstore,SELECT AVG(Sales) FROM west_superstore,3.907064998086747,1,1,1,21 676,How many records are in the Shippers table?,SELECT COUNT(Phone) FROM Shippers,SELECT COUNT(Phone) FROM Shippers,3.1109523087002167,1,1,1,19 677,How many of the line items that have a quantity greater than 40 have been shipped by air?,SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 40 AND l_shipmode = 'AIR',SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 40 AND l_shipmode = 'AIR',4.330832387674977,1,1,1,26 683,How many orders have Margaret Peacock placed?,SELECT COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Margaret' AND T1.LastName = 'Peacock',SELECT COUNT(*) FROM Orders WHERE EmployeeID = ( SELECT COUNT(EmployeeID) FROM Employees WHERE FirstName = 'Margaret' AND LastName = '%Peacock' ),3.3365179759892647,9,0,0,30 691,Find the number of baseball ordered in December 2017.,SELECT COUNT(T2.OrderNumber) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Baseball' AND T2.OrderDate LIKE '12/%/18',SELECT SUM(CASE WHEN T2.`Sales Channel` = 'Baseball' AND T2.OrderDate LIKE '2017%' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID,-0.1843786914571415,3,0,0,30 693,"For each Product ID, how many records are there in central_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM central_superstore GROUP BY `Product id`",2.6627730204564872,4,1,1,25 705,How many records are in the data table?,SELECT COUNT(ID) FROM data,SELECT COUNT(ID) FROM data,4.474103997787976,1,1,1,17 718,List the distinct values of city in the client table.,SELECT DISTINCT city FROM client,SELECT DISTINCT city FROM client,2.269073942246225,1,1,1,16 721,How many models of Ford Maverick were produced?,SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick',SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` = 'Ford Maverick',-2.235988480352743,6,0,0,30 731,"For each CustomerID, how many records are there in Orders?","SELECT CustomerID, COUNT(CustomerID) FROM Orders GROUP BY CustomerID","SELECT CustomerID, COUNT(CustomerID) FROM Orders GROUP BY CustomerID",5.740830030114313,1,1,1,24 734,In which region have the most 1-star reviews been done?,SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1,SELECT T2.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id INNER JOIN state AS T3 ON T3.state_abbrev = T4.StateCode ORDER BY T1.`Stars` DESC LIMIT 1,-4.2394311908830815,9,0,0,27 742,"For each Address, how many records are there in Suppliers?","SELECT Address, COUNT(SupplierID) FROM Suppliers GROUP BY Address","SELECT Address, COUNT(SupplierID) FROM Suppliers GROUP BY Address",5.657580059238104,1,1,1,26 746,How many records are in the events table?,SELECT COUNT(Client_ID) FROM events,SELECT COUNT(Client_ID) FROM events,4.795353829950178,1,1,1,22 756,"Among the products under the office supplies category, what is the product that made the highest sales in the Central region?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Office Supplies' AND T2.Region = 'Central' ORDER BY T1.Sales DESC LIMIT 1,SELECT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Category = 'Office Supplies' ORDER BY T1.Sales DESC LIMIT 1,3.7158780211919535,1,0,0,28 759,What is the monthly average number of products shipped via Federal Shipping for the year 1996?,SELECT CAST(SUM(T1.ShipVia) AS REAL) / 12 FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate LIKE '1996%',"SELECT CAST(SUM(IIF(T2.CompanyName = 'Federal Shipping', 1, 0)) AS REAL) / 12 FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE STRFTIME('%Y', T1.`ShippedDate`) = '1996'",-4.541793617479076,26,0,0,30 763,How many records are in the part table?,SELECT COUNT(p_partkey) FROM part,SELECT COUNT(p_partkey) FROM part,0.9678999629812773,1,1,1,20 764,What was the best discount applied to sales orders in 2020?,SELECT MAX(`Discount Applied`) FROM `Sales Orders` WHERE OrderDate LIKE '%/%/20',SELECT MAX(`Discount Applied`) FROM `Sales Orders` WHERE OrderDate LIKE '2020%',0.9814522597681969,1,0,1,30 765,How long was Kendall Allen's complaint about her credit card?,SELECT T3.ser_time FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN callcenterlogs AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.first = 'Kendall' AND T2.last = 'Allen' AND T2.sex = 'Female' AND T1.Product = 'Credit card',SELECT T1.`Product Database: retail_complains` FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3 WHERE T3.sex = 'Kendall' AND T4.last = 'Credit card',-6.548202136509788,1,0,0,30 776,"Among all the customers who have purchased ML Bottom Bracket, identify the percentage of sales by Albert I. Ringer?","SELECT CAST(SUM(IIF(T3.FirstName = 'Albert' AND T3.MiddleInitial = 'I' AND T3.LastName = 'Ringer', 1, 0)) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T1.Name = 'ML Bottom Bracket'","SELECT CAST(SUM(IIF(T1.Name = 'ML Bottom Bracket', 1, 0)) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID",1.6551952775756118,2,0,0,30 787,"Among customers with IDs from 1 to 100, what is the highest price of products they purchased?",SELECT T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID BETWEEN 1 AND 100 ORDER BY T1.Price DESC LIMIT 1,SELECT MAX(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 1 AND 100 ORDER BY T2.Quantity DESC LIMIT 1,5.019456214717402,1,0,0,30 789,Which city in the Midwest region has the least number of clients?,SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Midwest' GROUP BY T2.city ORDER BY COUNT(T2.city) LIMIT 1,SELECT city FROM district WHERE state_abbrev = 'Midwest' GROUP BY city ORDER BY COUNT(district_id) DESC LIMIT 1,0.5654380293329191,5,0,0,25 790,"For each Category, how many central_superstore records are linked?","SELECT T2.Category, COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Category","SELECT T2.Category, COUNT(T1.Product ID) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Category",-1.2873351314971562,2,0,0,30 794,Which store in Arizona has the most net profit?,SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Arizona' ORDER BY T1.`Unit Price` - T1.`Unit Cost` DESC LIMIT 1,SELECT T FROM ( SELECT CASE WHEN T2.`City Name` = 'Arizona' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,0.7464712843992977,6,0,0,28 798,What is the average Profit in the central_superstore table?,SELECT AVG(Profit) FROM central_superstore,SELECT AVG(Profit) FROM central_superstore,3.9767391617997983,1,1,1,21 800,"Provide the name, model, sweep volume, and introduced year of the car with the best crash protection.","SELECT T1.car_name, T1.model, T1.displacement / T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID ORDER BY T1.weight DESC LIMIT 1","SELECT car_name, model, sweep volume, model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID ORDER BY T2.`model_year` DESC LIMIT 1",-2.946804721251363,2,0,0,30 802,Give the name of the territory where Mr. Robert King works.,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',SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Mr. Robert King` WHERE T1.TitleOfCourtesy = 'King' AND LastName = 'Mr.',-5.784321721710099,21,0,0,29 803,What is the highest Sales in the Sales by Category table?,SELECT MAX(Sales) FROM `Sales by Category`,SELECT MAX(Sales) FROM `Sales by Category`,4.372205796169083,1,1,1,24 805,What is the most widely used shipping company in the United States of America?,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,SELECT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID ORDER BY T1.`ShipCountry` DESC LIMIT 1,-1.344681858615724,2,0,0,30 807,How many records are in the callcenterlogs table?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs,SELECT COUNT(`Complaint ID`) FROM callcenterlogs,4.058955478397152,1,1,1,20 811,Which year did Europe produce the most cars?,SELECT T1.model_year FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Europe' GROUP BY T1.model_year ORDER BY COUNT(T1.model_year) DESC LIMIT 1,SELECT T1.model_year FROM production AS T1 INNER JOIN country AS T2 ON T3.origin = T2.country ORDER BY COUNT(*) DESC LIMIT 1,-4.879854295772359,9,0,0,26 812,"For each state, how many records are there in client?","SELECT state, COUNT(district_id) FROM client GROUP BY state","SELECT state, COUNT(district_id) FROM client GROUP BY state",5.308929195236603,1,1,1,21 828,"For each Customer ID, how many records are there in central_superstore?","SELECT `Customer ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Customer ID`","SELECT `Card ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Customer ID`",-0.13134620344618175,4,0,1,28 829,What is the re-order level of products that have an order quantity of 1?,SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity = 1,SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1ProductID = T2ProductID WHERE T2.Quantity = 1,-3.4242644937229616,7,0,0,30 833,"For each city, how many records are there in client?","SELECT city, COUNT(sex) FROM client GROUP BY city","SELECT city, COUNT(sex) FROM client GROUP BY city",4.990096263103385,1,1,1,21 838,List the distinct values of Country in the Employees table.,SELECT DISTINCT Country FROM Employees,SELECT DISTINCT Country FROM Employees,3.7368875748870978,1,1,1,21 842,How many records in orders were recorded in 2019?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2019%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2019%',4.775940017408425,1,1,1,23 843,Please list all of the restaurants that serve European food.,SELECT label FROM generalinfo WHERE food_type = 'european',SELECT label FROM generalinfo WHERE food_type = 'european',3.6055268509954166,1,1,1,29 856,How many sales teams are there in the Midwest?,SELECT SUM(CASE WHEN Region = 'Midwest' THEN 1 ELSE 0 END) FROM `Sales Team`,SELECT SUM(CASE WHEN Region = 'Midwest' THEN 1 ELSE 0 END) FROM `Sales Team`,0.1742013252609258,4,1,1,30 859,"How many suppliers for the part ""hot spring dodger dim light"" are in Vietnam?",SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey INNER JOIN nation AS T4 ON T3.s_nationkey = T4.n_nationkey WHERE T1.p_name = 'hot spring dodger dim light' AND T4.n_name = 'VIETNAM',SELECT COUNT(T2.n_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partpartkey INNER JOIN supplier AS T3 ON T3.s_suppkey = S_SLAVE_SUPPKEY INNER JOIN nation AS T4 ON T4.ns_nationkey = t3.n2_natekey WHERE T1.`p_name` = 'hot spring dodger dim light',-2.1278428117508796,3,0,0,29 871,"What is the total sales of 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' in the Central region?","SELECT SUM(T1.Sales) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' AND T2.Region = 'Central'","SELECT SUM(Sales) FROM central_superstore WHERE `Product Name` = 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' AND Region = 'Central'",0.22070372040263356,1,0,0,29 877,Please calculate the average unit price for products of Formaggi Fortini s.r.l.,SELECT SUM(T1.UnitPrice) / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Formaggi Fortini s.r.l.',SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'Formaggi Fortini s.r.l.' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.Suppliers = T2 . SupplierID,-3.0258935343394473,1,0,0,30 879,What is the Island Trading customer's complete address?,"SELECT Address, City, Region, Country, PostalCode FROM Customers WHERE CompanyName = 'Island Trading'","SELECT Address, City, Region, Country, PostalCode FROM Customers WHERE CompanyName = 'Island Trading'",1.0577510771808292,1,1,1,30 881,List by their ID number the 3 longest complaints.,SELECT `Complaint ID` FROM callcenterlogs ORDER BY ser_time DESC LIMIT 3,SELECT `Complaint ID` FROM callcenterlogs ORDER BY ser_time DESC LIMIT 3,2.532276505221716,1,1,1,30 889,"For each CompanyName, how many records are there in Suppliers?","SELECT CompanyName, COUNT(CompanyName) FROM Suppliers GROUP BY CompanyName","SELECT CompanyName, COUNT(CompanyName) FROM Suppliers GROUP BY CompanyName",4.258328108605211,1,1,1,19 893,"Among the customers, list customers' company names and addresses who paid more than average in freight.","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 )","SELECT DISTINCT T3.CompanyName, T1.Address FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID WHERE SUM(T2.Freight) > 100",-6.63221005643112,1,0,0,30 896,How many records in lineitem were recorded in 2017?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2017%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2017%',4.412960505279923,1,1,1,20 907,How many orders placed were with more than 5 product quantities?,"SELECT SUM(IIF(`Order Quantity` > 5, 1, 0)) FROM `Sales Orders`","SELECT SUM(IIF(`Order Quantity` > 5, 1, 0)) FROM `Sales Orders`",3.5994439584896067,1,1,1,30 911,"In complaints received in 2014, how many of them were submitted via call?","SELECT COUNT(T2.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Phone' AND strftime('%Y', T1.`Date received`) = '2014'",SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received Database: retail_complains` LIKE '2019%',-6.298049385773958,1,0,0,30 915,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Order ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product ID`","SELECT T2.Product ID, COUNT(T1.`Order ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.9797795559871658,7,0,0,29 926,Provide a list of restaurants from Marin county.,SELECT T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county',SELECT T2.`restaurants` FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T3.county = 'marin county',-0.15262248960709818,6,0,0,25 931,Find the percentage of discontinued products in Northwind's portfolio of products.,SELECT CAST(COUNT(CASE WHEN Discontinued = 1 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products,SELECT CAST(SUM(CASE WHEN Discontinued = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ProductID) FROM Products,2.7114740640676014,1,0,1,29 937,Please give the contact name for Tokyo Traders.,SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders',SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders',4.155756718517329,1,1,1,25 944,What is the longest server time when the call is about the issue of arbitration?,SELECT MAX(T1.ser_time) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.issue = 'Arbitration',SELECT MAX(T1.ser_time) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID` WHERE T2.issue = 'Arbitration',-3.1666693029970996,3,0,0,28 949,What is the full name of the employee who is in charge of the territory of Denver?,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Denver'","SELECT T1.FirstName, T1.`LastName Database: retail_world` FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T2.EmployeeID = T1 . EmployeeID INNER JOIN Territorie AS T3 ON T3.TerritoryID = 2 WHERE T3.`TerritoryDescription` = 'Denver'",-7.624533623082936,2,0,0,30 960,"How many sales associates are located in Sao Paulo, Brazil?",SELECT COUNT(CustomerID) FROM Customers WHERE City = 'Sao Paulo' AND Country = 'Brazil' AND ContactTitle = 'Sales Associate',"SELECT COUNT(CustomerID) FROM Customers WHERE City = 'Sao Paulo, Brazil' AND ContactTitle = 'Sales Associate'",3.103188483438859,1,0,0,28 964,"For each Sales Channel, how many Customers records are linked?","SELECT T2.`Sales Channel`, COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID GROUP BY T2.`Sales Channel`","SELECT T2.`Sales Channel`, COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`Customer Names` = T2._CustomerID GROUP BY T2.Sales Channel",-2.7004107215768585,7,0,0,30 969,List all the numbers ordered by 'Rochester Ltd' in 2018.,SELECT DISTINCT T FROM ( SELECT CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Rochester Ltd' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T1.`Sales Channel` = 'Rochester Ltd' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,-1.602895898122284,3,0,0,29 977,What is the average household income of Glendale?,SELECT AVG(`Household Income`) FROM `Store Locations` WHERE `City Name` = 'Glendale',SELECT AVG(`Household Income`) FROM `Store Locations` WHERE `City Name` = 'Glendale',3.79779690666384,1,1,1,26 994,"For each type, how many records are there in callcenterlogs?","SELECT type, COUNT(`rand client`) FROM callcenterlogs GROUP BY type","SELECT type, COUNT(`rand client`) FROM callcenterlogs GROUP BY type",2.389506030421148,1,1,1,20 999,How many orders that Medsep Group had made?,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,-0.2795347770941178,2,1,1,30 1001,How many west_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer IDs`,-1.8885046226933908,7,0,0,26 1010,Indicate street and number of the Adelitas Taqueria Restaurants.,"SELECT T1.street_name, T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'adelitas taqueria'","SELECT T2.street_name, T2.`street_num Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2._id_Restaurant WHERE T3.label = 'adelitas taqueria'",-6.569208035594975,2,0,0,16 1018,"For each CustomerID, how many records are there in Customers?","SELECT CustomerID, COUNT(MiddleInitial) FROM Customers GROUP BY CustomerID","SELECT CustomerID, COUNT(MiddleInitial) FROM Customers GROUP BY CustomerID",4.258328108605211,1,1,1,17 1020,What is the average _SalesTeamID for joined Sales Orders and Store Locations records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID,1.0877984167540204,6,1,1,24 1024,"For each CustomerID, how many Employees records are linked?","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2.MiddleInitial GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.FirstName = 'Employees' GROUP BY T2 . CustomerID",2.26091032880301,7,0,0,28 1025,What is the average Quantity for joined east_superstore and product records?,SELECT AVG(T1.Quantity) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Quantity) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,1.4402376731032602,7,1,1,26 1027,"For each Customer ID, how many records are there in people?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM people GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM people GROUP BY `Customer id`",0.3609433875357439,8,1,1,28 1029,How many records in Store Locations were recorded in 2019?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2019%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2019%',4.531000601842846,1,1,1,29 1032,How many Sales records have matching records in Customers?,SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.customerID,1.930527801036332,4,0,0,25 1034,"From 2018 to 2020, which year did the George Lewis group have the highest number of orders?","SELECT SUBSTR(T1.OrderDate, -2, 2) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'George Lewis' GROUP BY SUBSTR(T1.OrderDate, -2, 2) ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1",SELECT T FROM ( SELECT CASE WHEN T1.OrderDate LIKE '%/%/20' AND T2.`Sales Team` = 'George Lewis' THEN 1 ELSE 0 END) WHERE T IS NOT NULL,-0.49048507396618646,2,0,0,30 1038,How many records are in the lineitem table?,SELECT COUNT(l_orderkey) FROM lineitem,SELECT COUNT(l_orderkey) FROM lineitem,4.508889799613256,1,1,1,21 1041,"In 2020, what were the total orders of all stores in Maricopa County?",SELECT SUM(CASE WHEN T2.County = 'Maricopa County' AND OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID,SELECT SUM(CASE WHEN T2.County = 'Maricopa County' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS t2 ON t2.StoreID = t1._StoreID WHERE T1.ProcuredDate LIKE '2020%',0.5046876141286023,2,0,0,23 1042,What are the names of the products that were ordered by Alejandro Grove?,SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Alejandro Grove',"SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Alejandro Grove'",-0.46172283708573936,1,0,0,29 1044,"What are the names of the parts manufactured by manufacturer 3 that have a supply cost of 1,000?",SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey WHERE T1.ps_supplycost = 1000 AND T2.p_mfgr = 'Manufacturer#3',SELECT T3.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2._partkey WHERE T2.s_manufacturer = 3,-3.2307007494700217,3,0,0,30 1047,How many records are in the central_superstore table?,SELECT COUNT(`Product ID`) FROM central_superstore,SELECT COUNT(`Product ID`) FROM central_superstore,2.6802323237914716,1,1,1,19 1052,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(ProductID) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(ProductID) FROM Products GROUP BY ProductID",4.107549427355398,1,1,1,19 1055,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Client_ID","SELECT T2.Client_ID, COUNT(T1.`sex Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = STRFTIME('%Y', T2.`DateTime`, T3.`Submitted via`) GROUP BY T2._Client_IDs",-7.28768773377178,21,0,0,22 1057,"In 2018, how many joined records exist between Sales Orders and Products?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2018%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2018%',3.9900040784658684,1,1,1,27 1061,List all the territories where Laura Callahan is in charge.,SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.FirstName = 'Laura' AND T1.LastName = 'Callahan',SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Female Callahan` WHERE T1.FirstName = 'Laura' AND T2.LastName = '',-6.0064191393281146,23,0,0,29 1068,What is the percentage of the payment amount in 2004 was made by Atelier graphique?,"SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'","SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', t2.paymentDate) = '2004' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.checkNumber) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.salesRepEmployeeNumber = T2.customerNumber WHERE T1.customerName = 'Atelier graphique'",0.3710773568730108,5,0,0,24 1073,What is the average County for joined Regions and Store Locations records?,SELECT AVG(T2.County) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2.StateCode,SELECT AVG(T2.County) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2.stateCode,0.6436706784252857,6,1,1,23 1074,List the distinct values of Product ID in the central_superstore table.,SELECT DISTINCT `Product ID` FROM central_superstore,SELECT DISTINCT `Product ID` FROM central_superstore,3.923274995964464,1,1,1,18 1075,List the distinct values of client_id in the client table.,SELECT DISTINCT client_id FROM client,SELECT DISTINCT client_id FROM client,4.508142555656296,1,1,1,15 1084,"For each Product, how many district records are linked?","SELECT T2.Product, COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id GROUP BY T2.Product","SELECT T2.Product, COUNT(T1.`district Database: retail_complains`) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2 . district_id GROUP BY T2.` Product`",-8.135566130901198,22,0,0,24 1090,How many records are in the location table?,SELECT COUNT(street_num) FROM location,SELECT COUNT(street_num) FROM location,4.508889799613256,1,1,1,19 1094,Please indicate the product name of Tokyo Traders company with order quantity greater than 40.,SELECT DISTINCT T2.ProductName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T1.CompanyName = 'Tokyo Traders' AND T3.Quantity > 40,SELECT T2.ProductName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` INNER JOIN `Order Details` AS T3 WHERE T3.Quantity > 40,-6.156157315256086,1,0,0,30 1102,How many records are in the Employees table?,SELECT COUNT(EmployeeID) FROM Employees,SELECT COUNT(EmployeeID) FROM Employees,4.281554795135653,1,1,1,25 1103,List the distinct CustomerID values linked to Customers.,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.Customers = T2.`CustomerID`,-0.04008085267550021,2,0,0,27 1108,Calculate the total cost of the orders by Brad Thomas in 2016.,"SELECT SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) AS cost FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T1.`Product ID` = T3.`Product ID` AND T1.Region = T3.Region WHERE T1.Region = 'East' AND T2.`Customer Name` = 'Brad Thomas' AND strftime('%Y', T1.`Order Date`) = '2016'",SELECT CAST(SUM(CASE WHEN T2.`Customer Name` = 'Brad Thomas' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T1.Region = 'East' AND T4.Order = '2016',-3.822014017718678,3,0,0,30 1113,"In 2015, how many joined records exist between Sales Orders and Products?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2015%',3.9900040784658684,1,1,1,24 1115,What is the average UnitPrice for joined Categories and Products records?,SELECT AVG(T2.UnitPrice) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID,SELECT AVG(T2.UnitPrice) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2 . CategoryID,3.2348275627556204,2,1,1,24 1116,List the distinct food_type values linked to location.,SELECT DISTINCT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2._id_ restaurant,-1.7610076223720934,2,0,0,29 1117,Provide the list of product IDs and names under the meat/poultry category.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )","SELECT T4.ProductName, T3.ReorderLevel FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.CategoryName = 'Meat/Poultry'",-5.1109755268324575,2,0,0,21 1126,How many orders made by Rochester Ltd?,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Rochester Ltd' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Rochester Ltd' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,1.5570510383583065,2,1,1,30 1128,How many records are in the price table?,SELECT COUNT(ID) FROM price,SELECT COUNT(ID) FROM price,4.474103997787976,1,1,1,19 1158,What is the full name of clients who have issue about balance transfer?,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Issue = 'Balance transfer'",SELECT t2.Issue FROM client AS t1 INNER JOIN events AS t2 ON t1.client_id = T2.Client_ID WHERE T1.first = 'Balance transfer',3.023782873328042,6,0,0,20 1161,List down product names of free gifts.,SELECT Name FROM Products WHERE Price = 0,SELECT Name FROM Products WHERE Price = 0,4.2141629399820895,1,1,1,30 1162,"For each food_type, how many location records are linked?","SELECT T2.food_type, COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant GROUP BY T2.food_type","SELECT T2.food_type, COUNT(T1.`street_num Database: restaurant`) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2._id_postal_type GROUP BY T2.`food _type`",-8.27794709582776,22,0,0,27 1164,"Which part has a bigger size, ""pink powder drab lawn cyan"" or ""cornflower sky burlywood green beige""?","SELECT T.p_name FROM ( SELECT p_name, p_size FROM part WHERE p_name IN ('pink powder drab lawn cyan', 'cornflower sky burlywood green beige') ) AS T ORDER BY p_size DESC LIMIT 1",SELECT p_partkey FROM part WHERE p_name = 'pink powder drab lawn cyan' AND p_size > ( SELECT MAX(p_size) FROM part ),4.501316332293841,1,0,0,30 1168,List the distinct values of addressLine1 in the customers table.,SELECT DISTINCT addressLine1 FROM customers,SELECT DISTINCT addressLine1 FROM customers,4.5739967119286575,1,1,1,16 1172,How many of the cars from Japan weighed less than 3000?,SELECT COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'Japan' AND T4.weight < 3000,SELECT SUM(T2.weight) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country INNER JOIN data AS T4 ON T4.`ID` = T5.ID WHERE T7.country = 'Japan',-2.9091719223988406,19,0,0,27 1173,Who is the person to contact to get Camembert Pierrot?,SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Camembert Pierrot',SELECT T3.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.ProductName = 'Camembert Pierrot',-2.338558561575237,10,0,0,28 1175,"Among all the orders, which products sold for the most amount?",SELECT ProductID FROM `Order Details` GROUP BY ProductID ORDER BY SUM(Quantity) DESC LIMIT 1,SELECT ProductID FROM `Order Details` GROUP BY ProductID ORDER BY Quantity DESC LIMIT 1,1.8142998132226993,1,0,0,28 1180,"In 2018, how many joined records exist between client and events?",SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2018%',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2018%',3.895548961939772,1,1,1,29 1181,How many records are in the events table?,SELECT COUNT(Consumer) FROM events,SELECT COUNT(Consumer) FROM events,0.4565143531634555,1,1,1,20 1196,List the distinct values of CustomerID in the Orders table.,SELECT DISTINCT CustomerID FROM Orders,SELECT DISTINCT CustomerID FROM Orders,3.7368875748870978,1,1,1,19 1197,What is the highest Sales in the south_superstore table?,SELECT MAX(Sales) FROM south_superstore,SELECT MAX(Sales) FROM south_superstore,3.6592814209018685,1,1,1,18 1204,List the distinct values of status in the orders table.,SELECT DISTINCT status FROM orders,SELECT DISTINCT status FROM orders,1.7909536146026408,1,1,1,17 1209,How many Sales Orders records have matching records in Customers?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,0.9301827776553024,1,1,1,22 1210,Find the number of service members who complained in Syracuse.,SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Servicemember' AND T1.city = 'Syracuse',"SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE STRFTIME('%Y', T2.`Tags`) = 'Service Member'",-0.5976837084065242,9,0,0,23 1212,"For each Product ID, how many records are there in east_superstore?","SELECT `Product ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Product id`",0.12703978348430323,7,1,1,25 1220,On what street in Tuolumne County is Good Heavens restaurant located?,SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant INNER JOIN geographic AS T3 ON T2.city = T3.city WHERE T2.label = 'good heavens' AND T3.county = 'tuolumne county',SELECT CASE WHEN T1.street_name = 'good heavens' AND T2.county = 'tuolumne county' THEN 1 ELSE 0 END,-4.5607904660608956,5,0,0,30 1221,"Which of the customers, whose Tokyo-based sales representative reports to the Vice President of Sales whose employee number is 1056, has paid the highest payment? List the customer's name, the contact person and calculate the total amount of that customer's total payments.","SELECT T2.customerName, T2.contactFirstName, T2.contactLastName, SUM(T3.amount) FROM employees AS T1 INNER JOIN customers AS T2 ON T2.salesRepEmployeeNumber = T1.employeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber INNER JOIN offices AS T4 ON T1.officeCode = T4.officeCode WHERE T4.city = 'Tokyo' AND T1.reportsTo = 1056 GROUP BY T2.customerName, T2.contactFirstName, T2.contactLastName ORDER BY amount DESC LIMIT 1","SELECT t3.customerName, t2.contactPerson, SUM(t1.reportsTo) AS totalPayments FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS t3 ON t4.postalCode = t2._postalCode INNER JOIN offices AS t5 ON t5.officeCode = t5._officeCode INNER JOIN customerNumber AS t6 ON customerNumber = t6.customerNumber WHERE t1.`customerName` = 'Tokyo-based' AND t5.`reportsTo` = 1056 ORDER BY amount DESC LIMIT 1",-0.29238367368024376,3,0,0,30 1228,How many part supplies are close to being out of stock?,SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10,SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10,3.708777624096337,1,1,1,30 1231,What is the full name of customers who dealt with sales person with id 5?,"SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 5",SELECT AVG(T1.FirstName) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.SalesPersonID = 5,-1.4564954885726835,1,0,0,28 1235,How many records in events were recorded in 2019?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2019%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2019%',0.9721202878798406,1,1,1,22 1238,Which country produced the most expensive car in 1970?,SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN price AS T4 ON T4.ID = T1.ID WHERE T2.model_year = 1970 ORDER BY T4.price DESC LIMIT 1,SELECT T2.`country` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country WHERE T1.`model_year Database: cars` LIKE '1970%',-6.8843856275352024,2,0,0,30 1242,How many records are in the Customers table?,SELECT COUNT(CompanyName) FROM Customers,SELECT COUNT(CompanyName) FROM Customers,4.472691083849381,1,1,1,22 1244,What is the average UnitPrice in the Order Details table?,SELECT AVG(UnitPrice) FROM `Order Details`,SELECT AVG(UnitPrice) FROM `Order Details`,4.403180757019737,1,1,1,20 1253,On which streets in the city of San Francisco are there restaurants with a review of 1.7?,SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.review = 1.7,"SELECT SUM(CASE WHEN T1.city = 'San Francisco' AND T2.street_name = '1.7' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.`id_ restaurant` = T2._id_Restaurant WHERE STRFTIME('%Y', T2.`review`) = 1",-6.5704366376291485,22,0,0,29 1260,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(ReorderLevel) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(ReorderLevel) FROM Products GROUP BY CategoryID",4.801190791215032,1,1,1,17 1264,List the distinct values of Country in the Invoices table.,SELECT DISTINCT Country FROM Invoices,SELECT DISTINCT Country FROM Invoices,4.508142555656296,1,1,1,18 1270,How many records are in the events table?,SELECT COUNT(`Consumer consent provided?`) FROM events,SELECT COUNT(`Consumer consent provided?`) FROM events,3.4915061007646773,1,1,1,25 1281,How many products shipped on 19/11/1994 were ordered on 21/09/1994?,SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19',"SELECT SUM(IIF(T2.l_shipdate = '1994-09-21', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE STRFTIME('%Y-%m-%dT%H:%M') = '19/11/1994' AND T1._orderpriority = '1-based'",-2.635715613297999,25,0,0,28 1288,List the distinct Product ID values linked to central_superstore.,SELECT DISTINCT T2.`Product ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.Product ID FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID`,2.157346884787963,1,0,0,25 1293,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(UnitsInStock) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(UnitsInStock) FROM Products GROUP BY ProductName",4.258328108605211,1,1,1,20 1295,"For the orders of Customer ""WHITC"", what is the percentage of the orders were fulfilled with shipper company ""United Package""?",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',"SELECT CAST(SUM(IIF(T2.CompanyName = 'United Package', 1, 0)) AS REAL) * 100 / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`CustomerID` = 'WHITC'",0.3270907586187275,1,0,0,30 1309,What is the total o_totalprice in the orders table?,SELECT SUM(o_totalprice) FROM orders,SELECT SUM(o_totalprice) FROM orders,3.285106842666371,1,1,1,20 1330,What is the average p_retailprice in the part table?,SELECT AVG(p_retailprice) FROM part,SELECT AVG(p_retailprice) FROM part,3.377053414997773,1,1,1,21 1338,Please list the names of all the products ordered in order no. 10248.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248,SELECT DISTINCT T3.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10248,-1.3065645703748423,2,0,0,29 1344,In which city is the store with the highest sales order unit price located?,"SELECT T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1",SELECT T FROM ( SELECT CASE WHEN T2.`City Name` = 'City' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,0.4244418496122085,7,0,0,29 1345,What is the highest p_retailprice in the part table?,SELECT MAX(p_retailprice) FROM part,SELECT MAX(p_retailprice) FROM part,4.774886548329124,1,1,1,22 1351,What is the highest _SalesTeamID in the Sales Orders table?,SELECT MAX(_SalesTeamID) FROM `Sales Orders`,SELECT MAX(_SalesTeamID) FROM `Sales Orders`,4.52101077114806,1,1,1,20 1361,What is the difference in salary of the top 2 employees with the highest number of territories in charge?,"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",SELECT CAST(SUM(CASE WHEN T2.TerritoryID = 'Charge' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Salary) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID,0.7857885521751962,10,0,0,30 1362,How many orders which expected profits greater than 100?,SELECT COUNT(T1.productCode) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.MSRP - T2.buyPrice > 100,SELECT COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.`productCode` WHERE T2.MSRP > 100,0.9072544205534362,1,0,0,27 1370,How much is the car with the highest sweep volume?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.displacement / T1.cylinders DESC LIMIT 1,SELECT MAX(T1.displacement) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.`price` DESC LIMIT 1,-3.3150224315093846,8,0,0,30 1371,List all the order numbers for In-Store sales and find the city where the store is located.,"SELECT DISTINCT T1.OrderNumber, T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.`Sales Channel` = 'In-Store'",SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'In-Store' THEN T1.OrderNumber END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,-0.30116099302133714,6,0,0,23 1374,Provide the number of orders that were handled by Michael Suyama.,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',SELECT CAST(COUNT(CASE WHEN T1.FirstName = 'Michael' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1 . EmployeeID = T2.EmployeeID,4.087646421598622,1,0,0,29 1375,What is the miles per square hour of the cheapest car produced by the USA?,SELECT T4.acceleration FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'USA' ORDER BY T1.price ASC LIMIT 1,"SELECT CAST(SUM(IIF(T2.country = 'USA', 1, 0)) AS REAL) * 1000 / COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",5.298537340390954,1,0,0,30 1378,What is the name of the most expensive car?,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 WHERE T2.price = ( SELECT MAX(price) FROM price ),3.5870500809459105,7,0,1,30 1391,"For each Customer ID, how many records are there in central_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM central_superstore GROUP BY `Customer id`",1.2380829185987312,7,1,1,29 1392,"For each TerritoryID, how many records are there in EmployeeTerritories?","SELECT TerritoryID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY TerritoryID","SELECT TerritoryID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY Territoryid",0.4178911840339029,3,1,1,25 1393,How many records in orders were recorded in 2020?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2020%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2020%',4.860603963746542,1,1,1,22 1406,What is the name of the most popular restaurant serving Asian foods in San Francisco?,SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' ),SELECT label FROM generalinfo WHERE food_type = 'asian' AND city = 'san francisco' ORDER BY review DESC LIMIT 1,4.955800328788979,1,0,0,30 1407,How many east_superstore records have matching records in central_superstore?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN central_superStore AS T2 ON T1.` Customer ID` = T2.`CustomerID`,1.9833540620807815,6,0,1,26 1413,How many Sales Orders records have matching records in Products?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,2.4498378044898086,1,1,1,21 1420,How did Kyran Muller submit his complaint?,SELECT DISTINCT T2.`Submitted via` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Kyran' AND T1.last = 'Muller',SELECT SUM(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Muller',-1.0759877328636733,12,0,0,30 1426,Please calculate the average total price of orders from Exoto Designs Vendor in 2005.,"SELECT SUM(T2.quantityOrdered * T2.priceEach) / COUNT(T3.orderNumber) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.productVendor = 'Exoto Designs' AND STRFTIME('%Y', T3.orderDate) = '2005'","SELECT CAST(SUM(T2.priceEach) AS REAL) / COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2._productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.OrderNumber WHERE T4.productVendor = 'Exoto Designs Vendor' AND STRFTIME('%Y', t3.orderDate) = '2005'",-4.755979189309607,3,0,0,23 1427,List the distinct values of Category in the Sales by Category table.,SELECT DISTINCT Category FROM `Sales by Category`,SELECT DISTINCT Category FROM `Sales by Category`,3.2269600845389896,1,1,1,21 1432,Was the tag in the complaint filed by Matthew Pierce on 2016/10/28 approved by himself?,"SELECT CASE WHEN T2.`Consumer consent provided?` IN (NULL, 'N/A', 'Empty') THEN 'No' ELSE 'Yes' END FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Matthew' AND T1.last = 'Pierce' AND T2.`Date received` = '2016-10-28'","SELECT DISTINCT T3.`Consumer consent provided?` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016-10-28'",-0.28213502936812157,3,0,0,26 1434,Calculate the average price of products shipped to the UK.,SELECT AVG(UnitPrice) AS avg FROM Invoices WHERE Country = 'UK',SELECT AVG(UnitPrice) FROM Invoices WHERE Country = 'UK',3.3639828100360942,1,0,0,29 1436,How many central_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product Name`,0.11520016822759167,7,0,1,24 1437,Name the sales team and the region of order number 'SO - 000137'.,"SELECT T2.`Sales Team`, T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderNumber = 'SO - 000137'","SELECT T2.`Sales Team`, T3.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AST2 ON T2.SalesTeamID = T1._SalesteamID WHERE T1.OrderNumber = 'SO - 000137'",-0.24520772962358592,8,0,1,27 1438,How many countries are there in the No.2 region?,SELECT COUNT(n_nationkey) FROM nation WHERE n_regionkey = 2,SELECT COUNT(n_nationkey) FROM nation WHERE n_regionkey = 2,3.2871249777165725,1,1,1,26 1444,What is the highest UnitPrice in the Invoices table?,SELECT MAX(UnitPrice) FROM Invoices,SELECT MAX(UnitPrice) FROM Invoices,5.447284229782327,1,1,1,19 1479,"For each Company response to consumer, how many records are there in events?","SELECT `Company response to consumer`, COUNT(`Complaint ID`) FROM events GROUP BY `Company response to consumer`","SELECT `Company response to consumer`, COUNT(`Complaint ID`) FROM events GROUP BY `Company Response to consumer`",-0.5134493962347353,5,1,1,27 1480,"In 2022, how many joined records exist between Sales Orders and Customers?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2022%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2022%',4.378280799748311,1,1,1,25 1482,How many records in callcenterlogs were recorded in 2018?,SELECT COUNT(`rand client`) FROM callcenterlogs WHERE ser_time LIKE '2018%',SELECT COUNT(`rand client`) FROM callcenterlogs WHERE ser_time LIKE '2018%',1.3761424421645654,1,1,1,28 1483,What is the full address of the most popular restaurant among the diners?,"SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1","SELECT T3.street_num, T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1._id_restaurant = T2.id_ restaurant GROUP BY T3.`city` ORDER BY COUNT(T2.city) DESC LIMIT 1",-4.932490914414136,9,0,0,30 1485,Calculate the total number of sales closed by Michel E. DeFrance?,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.FirstName = 'Michel' AND T2.MiddleInitial = 'e' AND T2.LastName = 'DeFrance',"SELECT SUM(IIF(T2.FirstName = 'Michel', 1, 0)) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID",-1.4960476880377087,11,0,0,30 1488,How many Products records have matching records in Suppliers?,SELECT COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT COUNT(T1.`SupplierID`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID,-1.392382746660964,8,0,0,26 1497,List all the name of products with the ID of 30 to 40.,SELECT T FROM ( SELECT CASE WHEN ProductID BETWEEN 30 AND 40 THEN `Product Name` ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN ProductID BETWEEN 30 AND 40 THEN `Product Name` ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL,1.022737145134723,2,1,1,30 1498,How many records in payments were recorded in 2018?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2018%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2018%',4.198241534572536,1,1,1,24 1507,How many records in Store Locations were recorded in 2018?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2018%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2018%',4.531000601842846,1,1,1,27 1513,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(Tags) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(Tags) FROM events GROUP BY client_id",5.319414557497681,1,1,1,23 1533,List the employees' full names and ages in 2022 who lived in London.,"SELECT TitleOfCourtesy, FirstName, LastName , TIMESTAMPDIFF(YEAR, BirthDate, NOW()) AS ages FROM Employees WHERE City = 'London'","SELECT TitleOfCourtesy, FirstName, LastName, TIMESTAMPDIFF(NOW) AS ages FROM Employees WHERE City = 'London'",-0.8798685374273207,1,0,0,30 1538,"Describe the ID, city and region of the stores which are in Allen country.","SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.County = 'Allen County'","SELECT DISTINCT T2.StoreID, T3.City Name, T4.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2._StateCode WHERE T2.`City Name` = 'Allen'",1.8625890529298752,1,0,0,23 1539,Give me the social number and state of the client whose phone number is 100-121-8371.,"SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371'",SELECT T2.`state Database: retail_complains` FROM client AS T1 INNER JOIN district AS T2 INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371',-5.381086779264022,1,0,0,30 1552,What are the names of the ordered products that have profit deficiency in central superstore?,SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND T1.Profit < 0,SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Region = 'Central' AND T1.Profit < 0,3.4392094540310483,1,0,0,26 1553,"For each food_type, how many records are there in generalinfo?","SELECT food_type, COUNT(label) FROM generalinfo GROUP BY food_type","SELECT fod_type, COUNT(label) FROM generalinfo GROUP BY food_type",-4.043600451783416,1,0,0,21 1554,Calculate the quantity percentage of the gift products in the total trading quantity.,"SELECT CAST(SUM(IIF(T1.Price = 0, T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity)FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID",SELECT CAST(SUM(CASE WHEN T2.Quantity = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 .ProductID,1.2757916032108974,7,0,0,23 1566,"For each CategoryID, how many records are there in Categories?","SELECT CategoryID, COUNT(Description) FROM Categories GROUP BY CategoryID","SELECT CategoryID, COUNT(Description) FROM Categories GROUP BY CategoryID",4.720593201875388,1,1,1,21 1569,What is the detailed coordinates of the store where the product with the 4th highest profit were purchased from?,"SELECT T2.Latitude, T2.Longitude FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 3, 1","SELECT Latitude, Longitude FROM `Store Locations` WHERE `Profit Applied` = 4th ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1",-1.0308264905490814,1,0,0,30 1572,Please list the phone numbers of the suppliers of the products that have a higher units on order than units in stock.,SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitsInStock < T1.UnitsOnOrder,SELECT T3.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.UnitsInStock > UnitsOnOrder,2.091946509914786,1,0,0,26 1580,What is the order priority of the order with the highest total price?,SELECT o_orderpriority FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders ),SELECT o_orderpriority FROM orders ORDER BY o_totalprice DESC LIMIT 1,2.9189038185242606,1,0,1,28 1583,"Calculate the average sales of """"Sharp AL-1530CS Digital Copier in the east and the west superstore.",SELECT AVG(T1.Sales) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Sharp AL-1530CS Digital Copier',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'Sharp AL-1530CS Digital Copier', 1, 0)) AS REAL) / COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`",-4.714660805382997,3,0,0,30 1589,"What is the name of the Chinese restaurant that can be found at 104 San Tomas Aquino Road, Campbell?",SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 104 AND T1.city = 'campbell' AND T2.street_name = 'san tomas aquino road',"SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.city = 'san tomas aquino road, Campbell' LIMIT 104",4.563763066162946,1,0,0,11 1592,Which customerNumber has the highest amount?,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 1,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 1,4.234867299213488,1,1,1,22 1598,"For each Country, how many Products records are linked?","SELECT T2.Country, COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.Country","SELECT T2.Country, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` GROUP BY T2/Country",-7.847201407689739,22,0,0,29 1606,Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory.,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' ),SELECT TerritoryDescription FROM ( SELECT DISTINCT CASE WHEN T1.EmployeeID = 'Ms. Laura' THEN T1.`TerritoryID Database: retail_world` THEN 'Callahan' ELSE 'N/A' END AS T FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1._entityID = T2.EntityID WHERE T3.TerritoryDescription = 'No' AND T2.`Laura' = 'Yes' ),-6.118847574527346,3,0,0,30 1612,What is the total amount of sales made in the year 1997?,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.OrderDate LIKE '1997%',SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2._OrderID WHERE T1.OrderDate LIKE '1997%',-6.326208131477987,1,0,0,30 1616,"Name the most expensive ordered? Who, when was it ordered?","SELECT T2.OrderNumber, T1.`Customer Names`, T2.OrderDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID ORDER BY T2.`Unit Cost` DESC LIMIT 1",SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = t2._ProductID ORDER BY T2.`Unit Cost` DESC LIMIT 1,-0.24697957148596594,1,0,0,25 1617,Name the sales team name who had orders with the greatest net profit in 2020.,"SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 1",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate LIKE '%/%/20' AND T2.`Sales Team` = 'Net Profit' THEN T1._SalesTeamID ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,0.8529385503569447,2,0,0,27 1627,Which o_orderstatus has the highest o_totalprice?,SELECT o_orderstatus FROM orders ORDER BY o_totalprice DESC LIMIT 1,SELECT o_orderstatus FROM orders ORDER BY o_totalprice DESC LIMIT 1,2.7490427716561565,1,1,1,26 1643,"List the product ID of the top five products, by descending order, in terms of price.",SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 5,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 5,4.4446210421670855,1,1,1,29 1644,How many records are in the client table?,SELECT COUNT(sex) FROM client,SELECT COUNT(sex) FROM client,4.474103997787976,1,1,1,22 1657,What is the total amount in the payments table?,SELECT SUM(amount) FROM payments,SELECT SUM(amount) FROM payments,2.546392017884244,1,1,1,19 1665,Calculate the percentage of ordered office supplies products in the central and the south superstore.,SELECT CAST(SUM(CASE WHEN T3.Category = 'Office Supplies' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Category) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID`,SELECT CAST(SUM(CASE WHEN T3.Category = 'Office Supplies' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Product ID Database: superstore`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID`,-7.6150649515794475,3,0,0,28 1666,Which company placed the order with the id 10257?,SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10257,SELECT T3.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.OrderID = 10257,-0.6740261304930139,6,0,0,28 1670,"For each Product ID, what is the average Quantity?","SELECT `Product ID`, AVG(Quantity) FROM central_superstore GROUP BY `Product ID`","SELECT `product ID`, AVG(Quantity) FROM central_superstore GROUP BY `Product ID`",0.953228438520917,4,1,1,26 1675,Which Customer ID has the highest Sales?,SELECT `Customer ID` FROM west_superstore ORDER BY Sales DESC LIMIT 1,SELECT `Customer ID` FROM west_superstore ORDER BY Sales DESC LIMIT 1,2.7510811090561593,1,1,1,29 1691,How many records in Orders were recorded in 2015?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShippedDate LIKE '2015%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShippedDate LIKE '2015%',4.775940017408425,1,1,1,21 1694,How many complaints made by women and served after 3 pm received a timely response from the company?,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.sex = 'Female' AND T1.ser_start BETWEEN '15:00:01' AND '23:59:59' AND T3.`Timely response?` = 'Yes',SELECT SUM(CASE WHEN T2.`Timely response?` = 'Yes' THEN 1 ELSE 0 END) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 WHERE T3.`Complaint ID` = 3 AND T1.ser_start = '2014-03-03',-2.0315509026006424,3,0,0,19 1697,What types of food are served at the 4 top-reviewed restaurants?,SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4,SELECT food_type FROM generalinfo WHERE review > 4,2.9658992454617534,1,0,0,30 1699,Please list the order keys of all the orders that have more than 2 parts with a jumbo case container.,"SELECT T.l_orderkey FROM ( SELECT T2.l_orderkey, COUNT(T2.l_partkey) AS num FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_container = 'JUMBO CASE' GROUP BY T2.l_orderkey ) AS T WHERE T.num > 2","SELECT T.l_orderkey FROM ( SELECT IIF(T1.p_container = 'JUMBO CASE', 1, 0)) AS T ORDER BY T.t_partkey DESC LIMIT 2",-3.5405292970440296,6,0,0,30 1714,When did the earliest complaint start on 2017/3/22?,SELECT MIN(ser_time) FROM callcenterlogs WHERE `Date received` = '2017-03-22',SELECT MIN(ser_time) FROM callcenterlogs WHERE `Date received` = '2017-03-22',2.653044647188669,1,1,1,29 1718,List the distinct values of Sub-issue in the events table.,SELECT DISTINCT `Sub-issue` FROM events,SELECT DISTINCT `Sub-issue` FROM events,3.289744345701661,1,1,1,17 1721,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(Discontinued) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(Discontinued) FROM Products GROUP BY ProductID",4.957144497985576,1,1,1,20 1723,"For each Customer ID, how many records are there in south_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM south_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM south_superstore GROUP BY `Customer id`",2.135812741038043,7,1,1,26 1728,List the full names of all clients who live in the Pacific division.,"SELECT T2.first, T2.middle, T2.last FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.division = 'Pacific'","SELECT first, middle, last FROM client WHERE T1.division = 'Pacific'",-1.5388585378062987,1,0,0,28 1736,What is the salary range for sales representative in Northwind?,"SELECT ( SELECT MIN(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MIN , ( SELECT MAX(Salary) FROM Employees WHERE Title = 'Sales Representative' ) AS MAX",SELECT Salary FROM Employees WHERE Title = 'Sales Representative',4.952510709986218,1,0,0,29 1738,How many records in callcenterlogs were recorded in 2015?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2015%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2015%',2.652279595238586,1,1,1,24 1741,"For each EmployeeID, how many Customers records are linked?","SELECT T2.EmployeeID, COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.MiddleInitial GROUP BY T2.EmployeeID","SELECT T2.EmployeeID, COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2._MiddleInitial GROUP BY T2 . EmployeeID",-1.8647225340407554,1,0,0,28 1743,List the distinct values of city in the location table.,SELECT DISTINCT city FROM location,SELECT DISTINCT city FROM location,1.7909536146026408,1,1,1,17 1746,Calculate the average profit of prom brushed steel products.,SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity) / COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_type = 'PROMO BRUSHED STEEL',"SELECT CAST(SUM(IIF(T2.p_name = 'PROMO BRUSHED STEEL', 1, 0)) AS REAL) * 100 / COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1._ps_suppkey = T2.l_supponpkey INNER JOIN part AS T3 ON T3.p = T4._partkey WHERE T1.s_type = 'Brushed Steel'",-5.8717963906057316,9,0,0,28 1747,"For each CompanyName, how many Products records are linked?","SELECT T2.CompanyName, COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.CompanyName","SELECT T2.CompanyName, COUNT(T1.`UnitPrice Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` GROUP BY T2.%s",-7.891443809728125,23,0,0,30 1752,Indicate which company is located in France?,SELECT CompanyName FROM Customers WHERE Country = 'France',SELECT CompanyName FROM Customers WHERE Country = 'France',3.313150039848838,1,1,1,25 1760,What are the order date and product name of the order ID CA-2011-137274 from the Central region?,"SELECT T1.`Order Date`, T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'CA-2011-137274' AND T2.Region = 'Central'","SELECT DISTINCT `Order Date`, `Product Name` FROM central_superstore WHERE `Order ID` = 'CA-2011-137274' AND Region = 'Central'",-0.3648690792627915,1,0,0,21 1767,"Among all the customers in Brazil, how many of them have an account balance of less than 1000?",SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'BRAZIL' AND T1.c_acctbal < 1000,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 WHERE T2.n_name = 'BRAZIL' LIMIT 1,2.4802298154361453,2,0,0,21 1769,How many records in Sales Orders were recorded in 2022?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2022%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2022%',2.5546621231758806,1,1,1,25 1770,How many records in callcenterlogs were recorded in 2016?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2016%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2016%',5.195196781000291,1,1,1,23 1777,What was the latest order that customer No.114 made? Give the name of the product.,SELECT t3.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t1.productCode = t3.productCode WHERE t2.customerNumber = '114' ORDER BY t2.orderDate DESC LIMIT 1,"SELECT t.productName, t.MSRP - t.buyPrice FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderLineNumber INNER JOIN products AS t3 ON t2.`productCode` = t3.productCode WHERE t.customerNumber = '114' ORDER BY t.orderDate DESC LIMIT 1",-3.4902416292267735,3,0,0,30 1779,"List out the full name of employee who has birth day on ""3/4/1955 12:00:00 AM"".","SELECT FirstName, LastName FROM Employees WHERE BirthDate = '1955-03-04 00:00:00'","SELECT FirstName, LastName FROM Employees WHERE BirthDate = '1955-03-04 00:00:00'",3.631979856721465,1,1,1,30 1780,What are the top 10 products with the highest net profit?,"SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID GROUP BY T1._ProductID ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 10",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderNumber = '10' ORDER BY T1.`Unit Price` DESC LIMIT 10,0.709009704221241,6,0,0,30 1782,How many records are in the west_superstore table?,SELECT COUNT(`Customer ID`) FROM west_superstore,SELECT COUNT(`Customer ID`) FROM west_superstore,4.058955478397152,1,1,1,22 1787,List down the countries that are located in Asia.,SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_name = 'ASIA',SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1._regionkey = T2.r_regionkey WHERE T2.`r_name` = 'ASIA',-1.1106511722760604,2,0,0,21 1788,What is the average Discount for joined Order Details and Products records?,SELECT AVG(T1.Discount) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T1.Discount) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2._ProductID,-1.5178753402056153,7,0,1,29 1789,Please list all clients' phone numbers and complaint IDs which are still in progress.,"SELECT T1.phone, T2.`Complaint ID` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'In progress'",SELECT T1.`phone Database: retail_complains` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'In progress',-5.857230268239525,1,0,0,27 1793,List the distinct values of CompanyName in the Customers table.,SELECT DISTINCT CompanyName FROM Customers,SELECT DISTINCT CompanyName FROM Customers,4.5739967119286575,1,1,1,15 1800,Which 3 products are produced in greater quantity?,SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 3,SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 3,3.3207071168319184,1,1,1,30 1803,"For each car_name, how many records are there in data?","SELECT car_name, COUNT(ID) FROM data GROUP BY car_name","SELECT car_name, COUNT(ID) FROM data GROUP BY Car_name",-1.157431210951365,4,1,1,27 1808,"In 2023, how many joined records exist between Store Locations and Sales Orders?",SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID WHERE T1.`Time Zone` LIKE '2023%',SELECT COUNT(T1.StoreID) FROM Store Locations AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`Store Locations` = T2._StoreID WHERE T1.TimeZone LIKE '2023%',-0.2389866551131986,3,0,0,28 1812,"In 2017, how many joined records exist between Employees and Orders?",SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry LIKE '2017%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.ShipCountry LIKE '2017%',-0.6047357680050972,3,0,0,30 1815,Which customer is the most in debt?,SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer ),SELECT c_name FROM customer ORDER BY c_acctbal DESC LIMIT 1,4.8437841492662725,1,0,0,27 1822,List down the first name of customers who placed order for product id 1.,SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.ProductID = 1,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ProductID = 1 THEN T1.FirstName ELSE NULL END AS T FROM Customers t1 INNER JOIN Sales AS T2 ON t1.CustomerID = t2._CustomerID INNER JOIN Products t3 ON t2.ProductId = t3.ProductId ) WHERE T3.Name = 'Order',-2.7183412803791462,12,0,0,23 1829,How many records in Employees were recorded in 2018?,SELECT COUNT(FirstName) FROM Employees WHERE BirthDate LIKE '2018%',SELECT COUNT(FirstName) FROM Employees WHERE BirthDate LIKE '2018%',4.775940017408425,1,1,1,26 1832,What percentage of customers from France is in the automobile segment?,"SELECT CAST(SUM(IIF(T1.c_mktsegment = 'AUTOMOBILE', 1, 0)) AS REAL) * 100 / COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'FRANCE'",SELECT CAST(COUNT(CASE WHEN T1.c_mktsegment = 'AUTOMOBILE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1._nationkey = T2Nationkey WHERE T2.N_name = 'FRANCE',-4.860231496572539,2,0,0,15 1835,Name the product that was registered in the sales order 'SO - 0005951'.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.OrderNumber = 'SO - 0005951' THEN T1.`Product Name` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.OrderNumber = 'SO - 0005951' THEN T1.`Product Name` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,0.1509623220691709,2,1,1,29 1837,List all the server of the phone complaints with a late response from the company.,SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.`Submitted via` = 'Phone' AND T1.`Timely response?` = 'No',"SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Com plaint ID`, T1.Submitted via AS T3 WHERE T3.`Timely response?` = 'Yes'",-6.499220603665597,29,0,0,30 1839,"For each Customer ID, what is the average Sales?","SELECT `Customer ID`, AVG(Sales) FROM south_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Sales) FROM south_superstore GROUP BY `Customer id`",0.9716123581403018,7,1,1,27 1840,How many records in lineitem were recorded in 2016?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2016%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2016%',4.412960505279923,1,1,1,16 1842,List 5 customers in the West region who had their item shipped 'Second Class.',SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' AND T1.`Ship Mode` = 'Second Class' LIMIT 5,SELECT DISTINCT T3.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'West' AND T2.Ship Mode = 'Second Class',4.000288973409014,1,0,0,27 1862,"What is the total quantity that Cindy Stewart order ""Lexmark X 9575 Professional All-in-One Color Printer"" in the south superstore?",SELECT SUM(T1.Quantity) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Cindy Stewart' AND T3.`Product Name` = 'Lexmark X 9575 Professional All-in-One Color Printer',SELECT SUM(T1.`Quantity Database: superstore`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T3.`Product Name` = 'Cindy Stewart' AND T1.Quantity = 'Lexmark X 9575 Professional All-in-One Color Printer',-8.878362835527168,3,0,0,29 1867,"Calculate the total quantity of products with name starting with alphabet ""c"".","SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE SUBSTR(T1.Name, 1, 1) = 'C'","SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2. ProductID WHERE SUBSTR(T1.Name, 1, 0) = 'C'",0.8725999589108407,7,0,1,18 1869,Which is the most fuel efficient car in 1975?,SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = '1975' ORDER BY T1.mpg DESC LIMIT 1,SELECT t.car_name FROM data AS t1 INNER JOIN production AS t2 ON t1.ID = t2.ID WHERE T2.model_year = 1975 ORDER BY t.mpg DESC LIMIT 1,-2.8891476612785345,2,0,0,30 1871,What is the average value of the sales order?,SELECT SUM(UnitPrice * Quantity * (1 - Discount)) / COUNT(OrderID) FROM `Order Details`,SELECT AVG(UnitPrice * Quantity) FROM `Order Details`,2.7416913357234045,1,0,0,28 1872,"For each city, what is the average county?","SELECT city, AVG(county) FROM geographic GROUP BY city","SELECT city, AVG(county) FROM geographic GROUP BY city",4.0111727236389,1,1,1,20 1873,What is the full address of Rattlesnake Canyon Grocery?,"SELECT DISTINCT ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE ShipName = 'Rattlesnake Canyon Grocery'",SELECT JULIANDAY(ShipAddress) FROM Orders WHERE ShipCity = 'Rattlesnake Canyon Grocery',3.0442278658764916,1,0,0,30 1876,"Among the customers from Indiana, what is the percentage of their purchased orders in the Central region with no discount?",SELECT CAST(SUM(CASE WHEN T2.Discount = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'Central' AND T1.State = 'Indiana',SELECT CAST(SUM(CASE WHEN T1.State = 'Indiana' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Region = 'Central' AND T3.Discount = 0,-3.3665535892351346,6,0,0,30 1891,What is the horsepower and model year of the car named Subaru Dl?,"SELECT T1.horsepower, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'subaru dl'","SELECT CAST(SUM(IIF(T1.car_name = 'Subaru Dl', 1, 0)) AS REAL) * 100 / COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",5.801893757037787,1,0,0,24 1892,"In the complains received in 2012, how many of them are submitted through email?","SELECT COUNT(`Submitted via`) FROM events WHERE strftime('%Y', `Date received`) = '2012' AND `Submitted via` = 'Email'",SELECT COUNT(Submitted) FROM events WHERE `Date received` LIKE '2019%' AND `Submitted via` = 'Email',1.453170779975528,1,0,0,28 1893,Where was the order No. 10383 shipped to? Show me the address.,"SELECT t2.addressLine1, t2.addressLine2 FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.orderNumber = '10383'","SELECT addressLine1, addressLine2 FROM orders AS line1 INNER JOIN customers AS line2 ON customerNumber = line2.customerNumber WHERE orderNumber = '10383'",2.993033933993109,1,0,0,30 1902,How many records in callcenterlogs were recorded in 2015?,SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2015%',SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2015%',1.3761424421645654,1,1,1,22 1905,What are the territory descriptions of territories in the Eastern region?,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,SELECT DISTINCT T3.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.regionID WHERE T1.`TerritoryDescription Database: retail_world` LIKE 'Eastern%',-5.9916047865570645,1,0,0,27 1921,List the distinct Region values linked to Sales Orders.,SELECT DISTINCT T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID,"SELECT DISTINCT T2.Region FROM `Sales Orders`"" AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2 . SalesTeamID",0.9374207428671094,1,0,0,29 1924,What is the highest Price in the Products table?,SELECT MAX(Price) FROM Products,SELECT MAX(Price) FROM Products,4.895887793269589,1,1,1,18 1926,"For each ProductID, what is the average UnitPrice?","SELECT ProductID, AVG(UnitPrice) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, AVG(UnitPrice) FROM `Order Details` GROUP BY ProductID",1.9240616742257457,1,1,1,21 1936,Please list any three order numbers that have been shipped using Speedy Express.,SELECT T1.OrderID FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express' LIMIT 3,SELECTT1.OrderID FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.`CompanyName` = 'Speedy Express' LIMIT 3,-2.807390793265563,20,0,0,28 1937,How many condiments were sold in 1997?,SELECT COUNT(T2.ProductID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE T1.CategoryName = 'Condiments' AND T1.CategoryID = 2 AND T4.OrderDate LIKE '1997%',SELECT COUNT(T2.OrderID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID INNER JOIN `Order Details` AS T3 ON T2.ProductID LIKE '1997%',-5.072996210063524,6,0,0,30 1945,What is the most expensive product?,SELECT ProductName FROM Products WHERE UnitPrice = ( SELECT MAX(UnitPrice) FROM Products ),SELECT ProductName FROM Products ORDER BY UnitPrice DESC LIMIT 1,4.234867299213488,1,0,0,27 1962,"In 2016, how many joined records exist between Products and Sales Orders?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.ProcuredDate LIKE '2016%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2016%',0.6702568306168434,13,1,1,29 1965,"In customers with the first name of Erica, how many of them bought a quantity below 200?",SELECT COUNT(T1.ProductID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Erica' AND T1.Quantity < 200,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Erica' AND Quantity < 200,1.5161514811674328,2,0,0,30 1966,How many customers are in Brazil?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'BRAZIL',SELECT COUNT(c_custkey) FROM customer AS c INNER JOIN nation AS n_nationkey WHERE n_name = 'BRAZIL',5.4177565085838175,1,0,0,26 1967,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Client_ID","SELECT T2.Client_ID, COUNT(T1.`year Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.' client_id GROUP BY T2 . Client_ID",-8.40401578365651,2,0,0,22 1973,"Write the complaint ID, call ID, and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014.","SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014' AND server = 'AVIDAN'","SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014-12-30' AND server = 'AVIDAN'",1.0386271994027407,1,0,1,30 1988,How many records in Shippers were recorded in 2020?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2020%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2020%',4.412960505279923,1,1,1,25 2011,"Among the sales team in South region, write down the numbers of orders made by the sales team ID of one digit.",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'South' AND T2.SalesTeamID BETWEEN 1 AND 9 GROUP BY T2.SalesTeamID HAVING COUNT(T1.OrderNumber),SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'South' THEN T1.OrderNumber ELSE 0 END) WHERE T IS NOT NULL,-2.6217874337714355,3,0,0,27 2015,"List the top five cities in terms of the number of 5-star ratings in 2016 reviews, in descending order.",SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 AND T1.Date LIKE '2016%' ORDER BY T1.Date DESC LIMIT 5,"SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.`district_id Database: retail_complains`, SUM(T1.Stars) AS T3 WHERE T1.Date LIKE '2016%' ORDER BY T3.city DESC LIMIT 5",-7.007215426243161,3,0,0,29 2022,"Of all the shipments made by United Package throughout the year 1996, what percentage correspond to the month of September?",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%',"SELECT CAST(SUM(CASE WHEN T1.ShipVia = 'United Package' AND STRFTIME('%Y', T2.`ShippedDate Database: retail_world`) = '1996' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.CompanyName) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.`ShipVia` = T2.ShipperID",-8.269523933823093,10,0,0,22 2034,"What is the homepage link for the company that supplies the product ""Thringer Rostbratwurst""?",SELECT T2.HomePage FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Thringer Rostbratwurst',SELECT T4.HomePage FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.ProductName = 'Thringer Rostbratwurst',-1.7630880268997011,6,0,0,30 2036,Who are the top 8 suppliers supplying the products with the highest user satisfaction?,SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID ORDER BY T1.ReorderLevel DESC LIMIT 8,SELECT CASE WHEN T2.CompanyName = 'Top 8 Suppliers' THEN T1.ReorderLevel DESC LIMIT 8,-5.702084564614008,10,0,0,24 2042,Who are the suppliers of the discontinued products?,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1,SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.Discontinued = 1,-6.711211556241618,1,0,0,29 2045,Which two products has the highest and lowest expected profits? Determine the total price for each product in terms of the largest quantity that was ordered.,"SELECT T2.productName, SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice DESC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode UNION SELECT T2.productName, SUM(quantityOrdered * priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice ASC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode","SELECT productName, quantityOrdered, buyPrice FROM products ORDER BY quantityOrdered DESC LIMIT 2",1.301513748727916,1,0,0,30 2059,How many customers belong to the household segment in Germany?,SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'GERMANY',SELECT SUM(CASE WHEN T1.c_mktsegment = 'HOUSEHOLD' THEN 1 ELSE 0 END) FROM customer AS T1 INNER JOIN nation AS T2 WHERE T2.n_name = 'GERMANY',3.6871296599849206,1,0,0,27 2073,What is the total sales amount for Reflector?,SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Reflector',SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 .ProductID WHERE T2.CustomerID = 'Reflector',1.4386135120526249,7,0,0,27 2077,What is the birth date of the youngest client?,"SELECT day, month, year FROM client ORDER BY year DESC, month DESC, day DESC LIMIT 1",SELECT T1.birth_date FROM client WHERE T2.type = 'youngest',-4.119815110424626,2,0,0,25 2093,What years did the Buick Skylark 320 get in production?,SELECT T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'buick skylark 320',"SELECT CAST(SUM(IIF(T1.car_name = 'buick Skylark 320', 1, 0)) AS REAL) * 320 FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",0.5361567938610963,14,0,0,24 2095,"Identify the customer, which placed the largest order in terms of value.",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,"SELECT T3.CustomerName, T2.OrderID FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID Database: retail_world` ORDER BY SUM(T2.Quantity) DESC LIMIT 1",-5.148546417354283,1,0,0,28 2098,The product 'Mozzarella di Giovanni' belongs in which category? Include the category's description as well.,"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'",SELECT Description FROM Categories WHERE CategoryID = ( SELECT CategoryID FROM Products WHERE ProductName = 'Mozzarella di Giovanni' ),2.272570776193663,2,0,0,30 2100,Who are the sales representatives in New York City? List their full names.,"SELECT t1.lastName, t1.firstName FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t2.city = 'NYC' AND t1.jobTitle = 'Sales Rep'","SELECT DISTINCT T2.firstName, T3.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.`city` = 'New York City'",-3.7609785660246877,7,0,0,25 2103,List all the cities in Sonoma County.,SELECT city FROM geographic WHERE county = 'sonoma county',SELECT city FROM geographic WHERE county = 'Sonoma County',4.518817756509385,1,1,1,26 2119,How many west_superstore records have matching records in product?,SELECT COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2.`Product ID`,0.7553418808660253,6,1,1,26 2121,"For each EmployeeID, how many records are there in Employees?","SELECT EmployeeID, COUNT(Salary) FROM Employees GROUP BY EmployeeID","SELECT EmployeeID, COUNT(Salary) FROM Employees GROUP BY Employeeid",1.531694772231467,4,1,1,24 2124,Indicate the category name of the product name with the highest units on order.,SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.UnitsOnOrder = ( SELECT MAX(T1.UnitsOnOrder) FROM Products ),SELECT CategoryName FROM Products ORDER BY UnitsOnOrder DESC LIMIT 1,-4.065676471604268,3,0,0,24 2127,"In 2021, how many joined records exist between east_superstore and product?",SELECT COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2021%',SELECT COUNT(T1.Product ID) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductId ID` WHERE T1.Ship LIKE '2021%',-1.0438443857545041,7,0,0,26 2138,Calculate the total salary for employees from UK.,SELECT SUM(Salary) FROM Employees WHERE Country = 'UK',SELECT SUM(Salary) FROM Employees WHERE Country = 'UK',3.944219745464202,1,1,1,24 2164,How many west_superstore records have matching records in central_superstore?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN central_superStore AS T2 ON T1.`customer ID` = T2.`Customer id`,1.967268977938072,7,1,1,24 2170,How many records are in the Sales Totals by Amount table?,SELECT COUNT(Totals) FROM `Sales Totals by Amount`,SELECT COUNT(Totals) FROM `Sales Totals by Amount`,0.91753502753312,1,1,1,30 2177,List the distinct CustomerID values linked to Orders.,SELECT DISTINCT T2.CustomerID FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.`CustomerID` = T2._CustomerID,-0.16089392478181128,1,0,0,27 2179,Provide the list of products ordered by ID 10979 and calculate its total payment.,"SELECT T1.ProductName , SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10979 GROUP BY T1.ProductName","SELECT T3.ProductName, SUM(T2.UnitPrice * T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = STRFTIME('%Y', T2.`ProductID`) = 10979",0.15661915566668552,2,0,0,30 2181,List the name and phone number of customers in India who have an above-average account balance.,"SELECT T1.c_name, T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > ( SELECT AVG(c_acctbal) FROM customer ) ORDER BY T1.c_name","SELECT T2.n_name, T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1._custkey = T2._nationkey INNER JOIN ( SELECT AVG(c_acctbal) AS avg FROM customer ) AS T ORDER BY T.num DESC LIMIT 1",-6.508151167799639,1,0,0,28 2186,What is the percentage of furniture orders that were shipped through first class in 2013 at the Central superstore?,"SELECT CAST(SUM(CASE WHEN T1.`Ship Mode` = 'First Class' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Furniture' AND STRFTIME('%Y', T1.`Ship Date`) = '2013'",SELECT CAST(SUM(CASE WHEN T1.`Ship Mode Database: superstore` = 'First Class' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Category) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T2.`Product ID` = T1.Product ID,-8.292230267870544,26,0,0,30 2189,Please list the emails of the clients whose complaint date received is 7/3/2014.,SELECT T1.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2014-07-03',SELECT T3.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '7/3/2014',0.08581002665720404,6,0,0,26 2194,"In sales with a quantity of 60, how many of them have a price not greater than 500?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity = 60 AND T1.Price <= 500,SELECT COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 60 AND 500,-2.6009103911777864,7,0,0,28 2208,"For each EmployeeID, how many Employees records are linked?","SELECT T2.EmployeeID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.EmployeeID","SELECT T2.EmployeeID, COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`Employee ID` = T2.`EpmployeeID` GROUP BY T2 . EmployeeID",-7.842668085390222,5,0,0,27 2211,How many records are in the central_superstore table?,SELECT COUNT(Order) FROM central_superstore,SELECT COUNT(Order) FROM central_superstore,3.631509473542764,1,1,1,22 2213,What is the average Amount in the Sales Totals by Amount table?,SELECT AVG(Amount) FROM `Sales Totals by Amount`,SELECT AVG(Amount) FROM `Sales Totals by Amount`,2.7529024460578833,1,1,1,23 2218,Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.,"SELECT DISTINCT T1.`Product Name`, T3.`Sales Team` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T2.WarehouseCode = 'WARE-NMK1003'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'WARE-NMK1003' THEN T1.`Product Name` END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,-4.1008411085444365,8,0,0,27 2223,What is the difference between the number of returned items and not returned items with the full price of under 16947.7?,"SELECT SUM(IIF(l_returnflag = 'A', 1, 0)) - SUM(IIF(l_returnflag = 'N', 1, 0)) AS diff FROM lineitem WHERE l_extendedprice < 16947.7",SELECT COUNT(l_linenumber) FROM lineitem WHERE l_extendedprice * (1 - l_discount) > 16947.7 AND l_returnflag = 'R',3.536855112716038,1,0,0,26 2225,"Between 2018 to 2020, what is the average amount of shipped orders per year under Carl Nguyen?",SELECT CAST(COUNT(T1.OrderNumber) AS REAL) / 3 FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/18') OR (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/19') OR (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/20'),SELECT CAST(SUM(CASE WHEN T1.ShipDate LIKE '%/%/18' AND T2.`Sales Team` = 'Carl Nguyen' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team `AS T2 ON T2.SalesTeamID = T1._Sales TeamID,-7.926314820182676,11,0,0,29 2227,How many records are in the customers table?,SELECT COUNT(postalCode) FROM customers,SELECT COUNT(postalCode) FROM customers,4.281554795135653,1,1,1,26 2228,List the distinct Customer ID values linked to people.,SELECT DISTINCT T2.`Customer ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T1.`Customer Name` = 'Persones',1.4601546924365472,1,0,0,29 2233,"In 2022, how many joined records exist between Sales Orders and Sales Team?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID WHERE T1.ProcuredDate LIKE '2022%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2022%',-0.14329258916921866,10,1,1,24 2236,What is the average SalesID in the Sales table?,SELECT AVG(SalesID) FROM Sales,SELECT AVG(SalesID) FROM Sales,4.790907908673019,1,1,1,22 2242,How many records are in the east_superstore table?,SELECT COUNT(UNKNOWN) FROM east_superstore,SELECT COUNT(UNKNOWN) FROM east_superstore,0.1935415820006908,2,1,1,23 2251,What is the difference in number of unit price from Chef Anton's Cajun Seasoning product and Chef Anton's Gumbo Mix product of New Orleans Cajun Delights company.,SELECT ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Cajun Seasoning' ) - ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Gumbo Mix' ) AS calu,SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'New Orleans Cajun Delights' THEN 1 ELSE 0 END) AS REAL) * 100 - SUM(T1.UnitPrice) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID WHERE T1.`ProductName` = 'Chef Anton\',-3.2586668920260524,2,0,0,27 2252,What is the company name of the supplier who supplies the product with the highest unit price?,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 ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` ORDER BY T2.UnitPrice DESC LIMIT 1,-2.490047493819248,8,0,0,28 2256,"For each CompanyName, how many records are there in Shippers?","SELECT CompanyName, COUNT(Phone) FROM Shippers GROUP BY CompanyName","SELECT CompanyName, COUNT(Phone) FROM Shippers GROUP BY CompanyName",4.107549427355398,1,1,1,19 2259,"List the territory IDs, description and region description under the in-charge of Mrs. Margaret Peacock.","SELECT T3.TerritoryID, T3.TerritoryDescription, 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 WHERE T1.TitleOfCourtesy = 'Mrs.' AND T1.LastName = 'Peacock' AND T1.FirstName = 'Margaret'","SELECT T2.RegionID, T3.TerritoryDescription, T4.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`TerritoryID Database: retail_world` LIKE 'Mrs%' AND T1.LastName = 'Margaret Peacock'",-6.503267548453816,1,0,0,30 2268,"For each Client_ID, how many callcenterlogs records are linked?","SELECT T2.Client_ID, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` GROUP BY T2.Client_ID","SELECT T2.Client_ID, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`ComPlaint ID` GROUP BY T2 . Client_ID",-1.7226201987119472,6,0,0,22 2269,"Among all the clients from the New York city, how many of them have filed a complaint on the issue of Deposits and withdrawals?",SELECT COUNT(T2.Issue) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Issue = 'Deposits and withdrawals' AND T1.city = 'New York City',"SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE STRFTIME('%Y', T2.`Issue`) = 'Deprecation' AND T1.`city` = 'New York City'",0.47665914357809475,2,0,0,30 2274,How many sales ids are there for customer id 80?,SELECT COUNT(SalesID) FROM Sales WHERE CustomerID = 80,SELECT COUNT(SalesID) FROM Sales WHERE CustomerID = 80,3.4694061652731487,1,1,1,30 2277,"How many stars did ""Eagle Capital"" received from Little Rock on 2013/4/4?",SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T2.city = 'Little Rock' AND T1.Date = '2013-04-04',"SELECT SUM(CASE WHEN T1.Stars = 'Eagle Capital' AND T2.city = 'Little Rock' AND STRFTIME('%Y', T2.`Date`) = '2013-04-04' THEN 1 ELSE 0 END) AS count",-5.291835554745487,19,0,0,25 2283,"For each client_id, how many events records are linked?","SELECT T2.client_id, COUNT(T1.Client_ID) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id GROUP BY T2.client_id","SELECT T2.client_id, COUNT(T1.`Issue Database: retail_complains`) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2 . client_id GROUP BY T2.`district_id`)",-8.316278659448265,24,0,0,27 2285,How many records are in the generalinfo table?,SELECT COUNT(id_restaurant) FROM generalinfo,SELECT COUNT(id_restaurant) FROM generalinfo,3.3763894402063075,2,1,1,19 2288,"For each Region, how many Sales Orders records are linked?","SELECT T2.Region, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.Sales TeamID GROUP BY T2._Region",-1.9380171545515035,6,0,0,22 2292,What type of food is there in the restaurants on Adeline Street in Berkeley city?,SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'adeline st' AND T2.city = 'berkeley',SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.`id_restaurant Database: restaurant` = T2.`location` WHERE T2.city = 'berkeley' AND T3.street_name = 'adeline',-4.131036334505623,1,0,0,24 2297,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(client_id) FROM client GROUP BY client_id","SELECT Client_id, COUNT(client_id) FROM client GROUP BY client_id",-0.6231073019789377,10,1,1,20 2299,"In 2021, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2021%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2021%',1.7299368067526704,3,1,1,25 2301,What is the company name of the customer who made the biggest amount of purchase in a single order before discount?,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 WHERE T3.Discount = 0 GROUP BY T1.CompanyName ORDER BY SUM(T3.UnitPrice * T3.Quantity) DESC LIMIT 1,"SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID INNER JOIN `Order Details` AS T3 ON REPLACE(T2.OrderID, ',', '') = T3.Discount ORDER BY SUM(T3.UnitPrice) DESC LIMIT 1",-7.117485938729901,2,0,0,29 2303,What restaurant on Drive Street in San Rafael doesn't serve American food?,SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'drive' AND T1.food_type != 'american' AND T2.city = 'san rafael',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = 'american' AND t1.label = 'san rafael',1.0317388049056724,8,0,0,21 2313,How many records are in the Suppliers table?,SELECT COUNT(CompanyName) FROM Suppliers,SELECT COUNT(CompanyName) FROM Suppliers,4.472691083849381,1,1,1,19 2314,How many records in callcenterlogs were recorded in 2021?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2021%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2021%',5.195196781000291,1,1,1,26 2316,"For each Segment, how many records are there in people?","SELECT Segment, COUNT(`Customer ID`) FROM people GROUP BY Segment","SELECT Segment, COUNT(`Customer ID`) FROM people GROUP BY Segment",3.838534404372027,1,1,1,21 2320,What is the highest quantityOrdered in the orderdetails table?,SELECT MAX(quantityOrdered) FROM orderdetails,SELECT MAX(quantityOrdered) FROM orderdetails,3.942002641552742,1,1,1,20 2325,"For each City, how many east_superstore records are linked?","SELECT T2.City, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.City","SELECT T2.City, COUNT(T1.`Customer ID Database: superstore`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Ship` = T2.`City` GROUP BY T2._ City",-6.727413378706804,25,0,0,25 2328,Name the suppliers that supply products under the category 'cheeses.',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',SELECT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.`SupplierID Database: retail_world` = T2.`suppliers` INNER JOIN Categories AS T3 ON T2.CategoryID = 3 WHERE T3.Description = 'Cheses',-7.079651216142662,20,0,0,26 2329,How many products sold by Adam Hernandez?,SELECT SUM(CASE WHEN T2.`Sales Team` = 'Adam Hernandez' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID,SELECT COUNT(DISTINCT T) FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Adam' AND T1.OrderDate LIKE '%/%/19' THEN 1 ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,-3.037542618286009,1,0,0,27 2337,What is the name of the company that has the product with the highest unit price?,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 ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` ORDER BY T2.UnitPrice DESC LIMIT 1,-2.92249921316822,4,0,0,29 2339,How many customers are in the furniture segment?,SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE',SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE',2.75438134154952,1,1,1,22 2342,List down the nation keys and names in Africa.,"SELECT T1.n_name, T1.n_nationkey FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_name = 'AFRICA'","SELECT n_nationkey, n_name FROM nation AS n INNER JOIN region AS r_regionkey WHERE r_name = 'Africa'",0.6315577731733117,6,0,0,16 2344,"Among the employees who handled orders to Brazil, who has the highest salary and calculate the average salary of them.","SELECT T1.FirstName, T1.LastName, AVG(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry = 'Brazil' GROUP BY T1.FirstName, T1.LastName ORDER BY SUM(T1.Salary) DESC LIMIT 1",SELECT CAST(SUM(CASE WHEN T2.ShipCountry = 'Brazil' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,3.9181784571181844,1,0,0,28 2347,Calculate the total price of orders by Customer#000000013.,SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_name = 'Customer#000000013',SELECT SUM(o_totalprice) FROM orders AS o INNER JOIN customer AS c_custkey WHERE c_mktsegment = 'Customer#000000013',2.8494080299705034,1,0,0,24 2348,How many days delay for the complaint call from Mr. Brantley Julian Stanley on 2012/5/18?,"SELECT 365 * (strftime('%Y', T2.`Date sent to company`) - strftime('%Y', T2.`Date received`)) + 30 * (strftime('%M', T2.`Date sent to company`) - strftime('%M', T2.`Date received`)) + (strftime('%d', T2.`Date sent to company`) - strftime('%d', T2.`Date received`)) AS days FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-05-18' AND T1.sex = 'Male' AND T1.first = 'Brantley' AND T1.middle = 'Julian' AND T1.last = 'Stanley'",SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-05-18',3.3246002137914643,1,0,0,30 2354,How many cylinders does the cheapest car have?,SELECT T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY price ASC LIMIT 1,SELECT COUNT(T1.cylinders) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,0.34802743488222865,21,0,0,24 2366,Who is the supplier of the product with the highest unit price?,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 ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` ORDER BY T2.UnitPrice DESC LIMIT 1,-1.735243676781423,7,0,0,30 2369,Name customers in India with account balances over $5000.,SELECT T1.c_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > 5000 AND T2.n_name = 'INDIA',SELECT T3.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_mktsegment = 'INDIA' AND T2.`acctbal` > 5000,-2.331639420918215,6,0,0,25 2388,What is the average unit price of Tokyo Traders' products?,SELECT SUM(T1.UnitPrice) / COUNT(T2.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Tokyo Traders',"SELECT CAST(SUM(IIF(T2.CompanyName = 'Tokyo Traders', 1, 0)) AS REAL) / COUNT(T1.`UnitPrice Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID` = T2.SupplierID WHERE T1.UnitPrice LIKE '%/%/19'",-8.476148687253893,2,0,0,29 2389,What are the names of the top 3 customers who paid the highest amount of price per order after discount?,"SELECT `Customer Names` FROM ( SELECT T1.`Customer Names` , REPLACE(T2.`Unit Price`, ',', '') * T2.`Order Quantity` - REPLACE(T2.`Unit Price`, ',', '') * T2.`Discount Applied` AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY T DESC LIMIT 3",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Discount Applied` = 0 THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,-3.3272660921751758,2,0,0,30 2392,"Of the employees who sold Blade, who has the most amount of sales?","SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID ORDER BY T2.Quantity * T3.Price DESC LIMIT 1","SELECT MiddleInitial, LastName FROM Employees AS M1 INNER JOIN Sales AS M2 ON EmployeeID = M2.SalesPersonID INNER JOIN Products AS T3 ON ProductID = T3.ProductID ORDER BY Price DESC LIMIT 1",-3.191797766484323,29,0,0,29 2395,Write down the top ten companies with the most total sales by amount.,SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY SaleAmount DESC LIMIT 10,SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY SaleAmount DESC LIMIT 10,2.945060141704465,1,1,1,29 2398,Which country does Chevy C20 come from?,SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'chevy c20',SELECT T2.`country Database: cars` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country WHERE T5.car_name = 'chevy c20',-6.102708380981822,1,0,0,18 2399,List the full names of all clients who live in the Pacific division.,"SELECT T2.first, T2.middle, T2.last FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.division = 'Pacific'","SELECT T1.division, T3.middle, T4.last FROM district AS T1 INNER JOIN client AS T2 ON T2.district_id = T1 . district_id WHERE T2.`division Database: retail_complains` = 'Pacific'",-5.25888465567112,1,0,0,29 2402,Indicate the name of the products that have been shipped to the city of Paris.,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',SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = 2 INNER JOIN Products AS T3 ON T2.ProductID = 3,-6.063150602105646,17,0,0,30 2404,Which company name in London city has the most stocked products?,SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.City = 'London' ORDER BY T1.UnitsInStock DESC LIMIT 1,SELECT CompanyName FROM Products WHERE T2.City = 'London' ORDER BY T1.UnitsInStock DESC LIMIT 1,-3.63894883903539,6,0,0,29 2405,"Who is the owner of the final phone number for the complaints on server ""MORIAH"" on 9/11/2013?","SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'MORIAH' AND T2.`Date received` = '2013-09-11'","SELECT T4.`phone number` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'MORIAH' AND strftime('%Y', T1.`Date received`) = '2013'",-0.9931048192524233,21,0,0,28 2409,How many orders shipped via ship have a medium priority?,SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'SHIP' AND T1.o_orderpriority = '3-MEDIUM',"SELECT COUNT(IIF(T2.l_shipmode = 'Ship', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey",-4.340626589673492,2,0,0,21 2414,How many orders which expected profits greater than 100?,SELECT COUNT(T1.productCode) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.MSRP - T2.buyPrice > 100,SELECT COUNT(MSRP) FROM orderdetails WHERE quantityOrdered > 100,2.6034631637155115,1,0,0,29 2417,How many orders have Margaret Peacock placed?,SELECT COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Margaret' AND T1.LastName = 'Peacock',SELECT COUNT(*) FROM Orders WHERE EmployeeID = ( SELECT MAX(EmployeeID) FROM Employees ),-0.037359534636646805,1,0,0,30 2422,"How many stores procured products on October 27, 2018, in the city of Oregon?",SELECT SUM(CASE WHEN T1.ProcuredDate = '10/27/18' AND T2.`City Name` = 'Orlando' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID,SELECT SUM(CASE WHEN T2.`City Name` = 'Oregon' AND T1.OrderDate LIKE '%/%/18' THEN 1 ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) AND T IS NOT NULL,1.0865870647684814,6,0,0,28 2426,"For the planes which has the hightest total price, how much it exceeds the average?",SELECT MAX(quantityOrdered * priceEach) - AVG(priceEach) FROM orderdetails WHERE productCode IN ( SELECT productCode FROM products WHERE productLine = 'Planes' ),SELECT SUM(T2.MSRP - T2.buyPrice) / COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.`productCode` WHERE T3.productLine = 'Planes' AND T4.productName = 'Hightest Price',-0.04405666331172187,1,0,0,24 2432,List by name all customers who provided consent for the tag Older American.,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Older American' AND T2.`Consumer consent provided?` != 'N/A' AND T2.`Consumer consent provided?` IS NOT NULL AND T2.`Consumer consent provided?` != ''",SELECT T3.Tags FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer consent provided?` = 'Older American',-0.8935420574081009,1,0,0,30 2436,"Among the female clients that age between 20 to 40, list the date when their complaints were received.",SELECT DISTINCT T3.`Date received` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3.`Complaint ID` WHERE T1.age BETWEEN 20 AND 40 AND T1.sex = 'Female',SELECT T1.`Date received` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3.`Composition ID` WHERE T3.sex = 'Female' AND T5.age BETWEEN 20 AND 40,-2.0429010402226138,6,0,0,29 2437,What's the postal code of the office the VP Sales is at?,SELECT t2.postalCode FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t1.jobTitle = 'VP Sales',SELECT T2.postalCode FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.`city` = 'VP Sales',-1.9032661878879682,9,0,0,22 2447,"Among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in California?",SELECT COUNT(DISTINCT T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` INNER JOIN people AS T3 ON T3.`Customer ID` = T1.`Customer ID` WHERE T1.Sales > 5000 AND T3.State = 'California' AND T2.Region = 'West',SELECT COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` INNER JOIN people AS T3 ON T2.Customer ID = T3.`Customer ID` WHERE T3.State = 'California' AND T1.Sales > 1000,-5.683375301556094,3,0,0,27 2456,What is the percentage of cars that was produced by Japan among those that have a sweep volume of no less than 30?,SELECT CAST(SUM(CASE WHEN T3.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.displacement / T1.cylinders > 30,"SELECT CAST(SUM(IIF(T2.country = 'Japan', 1, 0)) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",0.5612371776788123,11,0,0,28 2458,What is the rating of each restaurant reviews on Atlantic Ave?,SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'atlantic ave',"SELECT CAST(SUM(IIF(T2.street_name = 'atlantic ave', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.review = 'Atlantic Ave'",3.6292749820720496,2,0,0,29 2459,What are the issues of the complains of male clients and products from age 25 and below?,SELECT DISTINCT T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.age < 25,"SELECT CAST(SUM(IIF(T1.sex = 'Male', 1, 0)) AS REAL) * 100 / COUNT(T2.Issue) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID",1.0093300737348792,8,0,0,29 2462,What are the names of the ordered products that have profit deficiency in central superstore?,SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND T1.Profit < 0,SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Region = 'Central' AND T1.Profit > 0,3.4392094540310483,1,0,0,22 2471,Please list the names of all the suppliers for the part with the highest retail price.,SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T1.p_size DESC LIMIT 1,SELECT T3.s_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partpartkey INNER JOIN supplier AS T3 ON T2->ps_suppkey = S_SUPPKEY INNER JOIN s_name = 'part with max retail price',-2.1014914676250727,2,0,0,29 2473,Who is the sales agent of the customer who has made the highest payment? Include the full names of employee and his/her supervisor.,"SELECT T1.firstName, T1.lastName, T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber ORDER BY T3.amount DESC LIMIT 1","SELECT t3.customerName, T3.paymentDate FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = t2.salesRepEmployeeNumber ORDER BY T1.reportsTo DESC LIMIT 1",-3.8521911768848613,1,0,0,25 2478,List down product names of free gifts.,SELECT Name FROM Products WHERE Price = 0,SELECT Name FROM Products WHERE Price = 0,4.2141629399820895,1,1,1,30 2480,What is the account balance of the supplier with the most parts?,"SELECT T.s_acctbal FROM ( SELECT T1.s_acctbal, COUNT(T2.ps_suppkey) AS num FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_suppkey GROUP BY T1.s_suppkey ) AS T ORDER BY T.num DESC LIMIT 1",SELECT T_acctbal FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_sup pkey ORDER BY T_ACCTbal DESC LIMIT 1,-0.6880428675226572,1,0,0,28 2497,Indicate the name of the country where Leka Trading supplies Ipoh Coffee product.,SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Ipoh Coffee' AND T2.CompanyName = 'Leka Trading',SELECT T3.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Leka Trading' AND T2.`CompanyName` = 'Ipoh Coffee',-4.210816627876304,1,0,0,30 2503,How many office supply orders were made by Cindy Stewart in the south superstore?,SELECT COUNT(*) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.Category = 'Office Supplies' AND T2.`Customer Name` = 'Cindy Stewart',SELECT COUNT(*) FROM south_superstore INNER JOIN people AS T1 INNER JOIN product AS T2 ON T1.`Customer ID` = T2.`Product ID` INNER JOIN category AS T3 ON T3.Category = T4.Category WHERE T3.`Customer Name` = 'Office supply orders' AND T1.Customer Name = 'Cindy Stewart',-3.5638188704131513,3,0,0,23 2505,What is the position of Robert King?,SELECT Title FROM Employees WHERE FirstName = 'Robert' AND LastName = 'King',"SELECT FirstName, LastName FROM Employees WHERE Title = 'Robert King'",4.496626174277652,1,0,0,25 2515,What is the maximum acceleration of a car with price over $40000?,SELECT MAX(T1.acceleration) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price > 40000,SELECT MAX(t1.acceleration) FROM data AS t1 INNER JOIN price AS t2 ON t1.ID = t2.ID WHERE T2.price > 40000,3.718072128099237,6,1,1,30 2517,Name the product that sold the most quantity.,SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity DESC LIMIT 1,SELECT T3.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID` ORDER BY T2.Quantity LIMIT 1,-1.4148745043100242,7,0,0,28 2527,"Which state does the owner of ""wyatt.collins@gmail.com"" live in? Give the full name of the state.",SELECT T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.email = 'wyatt.collins@gmail.com',SELECT T2.`state Database: retail_complains` FROM client AS T1 INNER JOIN district AS T2 WHERE T1.email = 'wyatt.collins@gmail.com' GROUP BY T2.state,-7.185677409186645,5,0,0,30 2533,How many French customers does Gerard Hernandez take care of?,SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.country = 'France' AND t2.firstName = 'Gerard' AND t2.lastName = 'Hernandez',SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.lastName = 'Gerard Hernandez',4.24419322764549,1,0,0,30 2534,"Among all the parts under the type ""promo brushed steel"", how many of them have a total available quantity from all suppliers of under 5000?",SELECT SUM(num) FROM ( SELECT COUNT(T3.s_name) AS num FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_type = 'PROMO BRUSHED STEEL' GROUP BY T2.ps_partkey HAVING SUM(T2.ps_availqty) < 5000 ) T,SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partsupp = T2.psupp INNER JOIN supplier AS T3 ON T3.ps_suppkey = T4._supponkey INNER JOIN s_partkey AS T4 ON T4.ps _partkey += T5.size INNER JOIN ( SELECT s_acctbal * T6.availqty FROM supplier WHERE s_name = 'promo brushed steel' ),-4.402554909762701,5,0,0,28 2535,What was the order date of items with the highest total price?,SELECT o_orderdate FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders ),SELECT o_orderdate FROM orders ORDER BY o_totalprice DESC LIMIT 1,3.9536753892466647,1,0,0,27 2547,Name the sales team and the region of order number 'SO - 000137'.,"SELECT T2.`Sales Team`, T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderNumber = 'SO - 000137'","SELECT T2.`Sales Team`, T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS STRFTIME('%Y', T1.OrderDate) = 'SO - 000137'",-0.7794598670548765,5,0,0,27 2552,Write down the date received of complaints sent via Fax.,SELECT T1.`Date received` FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Fax',SELECT T1.`Date received Database: retail_complains` FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1`` = T2.`Complaint ID` INNER JOIN subscribed via = T3.Submitted via,-6.6680391123767295,28,0,0,29 2554,Please name any three parts that have an available quantity of more than 9998.,SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_availqty > 9998 LIMIT 3,SELECT T3.ps_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps _partkey WHERE T1._size > 9998,-1.661463330069493,3,0,0,28 2561,"What is the lowest supply cost for the part ""hot spring dodger dim light""?",SELECT MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey WHERE T2.p_name = 'hot spring dodger dim light',SELECT MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN part AS T2 ON T1._partkey = T2.p_partkey WHERE T2.`p_type` = 'hot spring dodger dim light',-0.6207898200815551,1,0,0,29 2566,"How many of the ""Hon Pagoda Stacking Chairs"" have been sold in total in the west superstore?",SELECT SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Pagoda Stacking Chairs',SELECT COUNT(`Product ID`) FROM west_superstore WHERE `Product Name` = 'Hon Pagoda Stacking Chairs',1.8549712656058963,1,0,0,30 2574,Name the suppliers that supply products under the category 'cheeses.',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',SELECT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.`SupplierID Database: retail_world` = T2._SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.Categories,-7.366819686111016,20,0,0,27 2583,List all the cities where Shawn Torres sells Audio products.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T4.`Product Name` = 'Audio' AND T3.`Sales Team` = 'Shawn Torres' THEN T1.`City Name` ELSE NULL END AS T FROM `Store Locations` T1 INNER JOIN `Sales Orders` T2 ON T2._StoreID = T1.StoreID INNER JOIN `Sales Team` T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products T4 ON T4.ProductID = T2._ProductID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'Audio' THEN T1.`City Name` ELSE NULL END AS T FROM `Store Locations` T1 INNER JOIN `Sales Orders` T2 ON T2._StoreID = T1.StoreID ) WHERE T IS NOT NULL,-5.395811747676006,8,0,0,21 2584,Please list the name and phone number of the customer whose order was cancelled.,"SELECT T2.customerName, T2.phone FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.status = 'Cancelled'","SELECT customerName, phone FROM orders WHERE status = 'Cancelled'",4.220620937814764,1,0,0,23 2586,What are the companies that have the same phone area code as 171?,SELECT CompanyName FROM Customers WHERE Phone LIKE '(171)%',SELECT CompanyName FROM Customers WHERE Phone = 171,3.8696327747106047,1,0,0,28 2589,"Among the restaurants on street number below 1000, how many of them are in Railroad St.?",SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000,SELECT COUNT(city) FROM location WHERE street_num < 1000 AND street_name = 'Railroad St',0.9766731106924847,1,0,0,29 2605,List the name of all products in the west superstore that customers chose for same-day shipment in the year 2013.,SELECT T2.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Same Day' AND T1.`Ship Date` LIKE '2013%',SELECT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T1.Ship LIKE '2013%',-0.813259357410044,8,0,0,21 2617,List the price of Ford cars from model 1970 to 1980.,SELECT DISTINCT T3.price FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID WHERE T1.car_name LIKE 'ford%' AND T2.model_year BETWEEN 1970 AND 1980,"SELECT CAST(SUM(IIF(T1.car_name = 'France Cars', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T2.`price` = T3.price WHERE T3.`model_year Database: cars` BETWEEN '1970%' AND '1980%'",-6.228746834331555,26,0,0,30 2620,"Among the customers in the furniture market segment, how many of them have a nation key of 1?",SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE' AND c_nationkey = 1,SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE' AND c_nationkey = 1,3.470106252760632,1,1,1,22 2630,Calculate the total net profit of the store located in highest median income city.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 1",SELECT SUM(CASE WHEN T2.`City Name` = 'Net Profit' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) AS T SUM(T) WHERE T IS NOT NULL,1.3310770378615362,3,0,0,27 2633,Please list the weights of all the cars with the price over $40000.,SELECT T1.weight FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price > 40000,SELECT CAST(SUM(CASE WHEN price > 40000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,5.143878120729031,1,0,0,30 2638,How many parts have a jumbo case container?,SELECT COUNT(p_partkey) FROM part WHERE p_container = 'JUMBO CASE',SELECT COUNT(p_partkey) FROM part WHERE p_container = 'JUMBO CASE',5.335186955553954,1,1,1,20 2644,"Among the customers, list customers' company names and addresses who paid more than average in freight.","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 )","SELECT DISTINCT T3.CompanyName, T1.Address FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID WHERE Freight > ( SELECT AVG(Freight) FROM Orders )",-5.563533379284484,1,0,0,30 2647,State the name of all city in Maricopa County along with its latitude and longitude.,"SELECT DISTINCT `City Name`, Latitude, Longitude FROM `Store Locations` WHERE County = 'Maricopa County'","SELECT DISTINCT `City Name`, Latitude, Longitude FROM `Store Locations` WHERE County = 'Maricopa County'",2.76429158307425,1,1,1,27 2649,What is the contact name for product Teatime Chocolate Biscuits?,SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Teatime Chocolate Biscuits',SELECT T3.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Teatime Chocolate Biscuits',-5.766031945748935,1,0,0,30 2652,Identify the store location and sales team who processed the sales order 'SO - 0001004'.,"SELECT T3.`Sales Team`, T1.`City Name` FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._StoreID = T1.StoreID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T2.OrderNumber = 'SO - 0001004'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`City Name` = 'SO - 0001004' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Store Locations` T2 ON T2._StoreID = T1.StoreID ) WHERE T IS NOT NULL,-3.9836545259700196,19,0,0,25 2653,"Describe the supplier companies, cities and products which total production amount is more than 120.","SELECT T2.CompanyName, T2.City, T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitsInStock + UnitsOnOrder > 120","SELECT T3.CompanyName, T2.City FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE SUM(T1.UnitsInStock) > 120",0.3501979699407955,8,0,0,28 2654,Who is the newest hired employee? Give the full name.,"SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM Employees )","SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM employees )",1.456939102868159,8,1,1,30 2658,What is the region where the customer who placed the order id 10276 located?,SELECT T1.Region FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10276,SELECT T3.Region FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.OrderID = 10276,1.981352601420699,1,0,0,28 2659,"How many Chinese restaurants are there on 1st st, Livermore?",SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'livermore' AND T1.food_type = 'chinese' AND T2.street_name = '1st st',SELECT SUM(CASE WHEN T1.food_type = 'chinese' AND T2.street_name = 'livermore' THEN 1 ELSE 0 END) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.`id_restaurant Database: restaurant`,-6.26898900155604,2,0,0,30 2663,What was the quantity of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?,SELECT SUM(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10',SELECT CAST(SUM(CASE WHEN T2.`Product Name` = 'Aimee Bixby' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Order) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID`,-7.296161904065721,15,0,0,30 2666,"List the product ID of the top five products, by descending order, in terms of price.",SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 5,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 5,4.4446210421670855,1,1,1,29 2676,State the order number where Qualitest ordered the highest product quantity.,SELECT T1.OrderNumber FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Qualitest ' ORDER BY T1.`Order Quantity` DESC LIMIT 1,SELECT T1.OrderNumber FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Qualitest ' ORDER BY T1.`Order Quantity` DESC LIMIT 1,3.5733419381529523,1,1,1,30 2677,In which region have the most 1-star reviews been done?,SELECT T3.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.Stars = 1 GROUP BY T3.Region ORDER BY COUNT(T3.Region) DESC LIMIT 1,SELECT T2.Region FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id INNER JOIN state AS T3 ON T3.state_abbrev = T4.StateCode WHERE T1.`Stars` = 1,-4.742570529620505,27,0,0,28 2680,What is the total price of the order made by Cruz & Sons Co. on 2003/3/3?,SELECT SUM(t1.priceEach * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03',SELECT SUM(T2.priceEach * T2.quantityOrdered) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2._orderNumber INNER JOIN customers AS T3 ON T3.customernumber = T4.customerNumber WHERE t1.productCode = 'Cruz & Sons Co. on 2003/3/18' AND t3.status = 'Sales Rep',-3.5439113202607553,3,0,0,30 2683,"List down the sales, profit, and subcategories of the product ordered in the order ID US-2011-126571 in the East region.","SELECT T1.Sales, T1.Profit, T2.`Sub-Category` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'US-2011-126571' AND T2.Region = 'East'","SELECT T1.Sales, T2.Profit, T3.`Sub-Category` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Order ID` = T2.`Product ID` WHERE T3.Region = 'East' AND T1.'US-2011-126571'",0.4390910576433168,8,0,0,29 2685,What was the total cost of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?,SELECT DISTINCT (T2.Sales / (1 - T2.discount)) * T2.Quantity - Profit FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10',SELECT SUM(CASE WHEN T1.`Customer Name` = 'Aimee Bixby' THEN SUM(T2.Quantity * T2.Discount) > 10 THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`Customer ID = T2.`Customer ID`,-4.118183617411159,8,0,0,28 2689,What is the average household income in cities in the state of New Hampshire where there are stores of the type city?,SELECT AVG(T2.`Household Income`) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'New Hampshire' AND T2.Type = 'City',SELECT AVG(`Household Income`) FROM `Store Locations` WHERE State = 'New Hampshire' AND Type = 'City',1.4979588817638427,1,0,0,30 2691,Calculate the percentage of male clients from Indianapolis City.,SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(client_id) FROM client WHERE city = 'Indianapolis',SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(client_id) FROM client WHERE city = 'Indianapolis',4.905693529140799,1,1,1,28 2694,List out the discount levels applied for all orders from Ole Group.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`Customer Names` = 'Ole Group' THEN T2.`Discount Applied` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,SELECT DISTINCT T2.`Discount Applied` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T1.`Customer Names` = 'Ole Group',0.8841872926469864,6,0,1,29 2696,"How many times is the number of territories in ""Eastern Region"" than ""Southern Region""?",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,SELECT CAST(COUNT(CASE WHEN TerritoryID Database: retail_world = 'Eastern' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID WHERE T2.RegionDescription = 'Southern Region',-8.409639594367338,2,0,0,28 2698,"Determine the email and Code of employee who are working at United State, state CA","SELECT T1.email, T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.country = 'USA' AND T2.state = 'CA' GROUP BY T1.email, T1.officeCode","SELECT email, code FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.state = 'CA'",-2.679786584333513,1,0,0,29 2702,What is the review of the restaurant at 8440 Murray Ave?,SELECT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'murray ave' AND T1.street_num = 8440,"SELECT CAST(SUM(IIF(T1.street_num = 8440 Murray Ave, 1, 0)) AS REAL) * 1000",-0.6677346782140036,1,0,0,30 2704,Calculate the total trading quantity of Abraham sold to Aaron Alexander.,SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T2.SalesPersonID = 1 AND T1.FirstName = 'Aaron' AND T1.LastName = 'Alexander' AND T3.FirstName = 'Abraham',"SELECT CAST(SUM(IIF(T2.FirstName = 'Abraham', 1, 0)) AS REAL) * 100 / COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = EmployeeID WHERE T3.EmployeeID = 'Aaron Alexander'",1.2797187217328103,2,0,0,26 2718,How many orders purchased by Aaron Bergman have been delivered with the slowest shipping speed?,SELECT COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aaron Bergman' AND T2.`Ship Mode` = 'Standard Class',SELECT SUM(CASE WHEN T1.`Customer Name` = 'Aaron Bergman' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.Customer ID = T2.`Customer ID`,0.6978727048859207,3,0,0,30 2722,Calculate the total quantity of products that are gifts.,SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price = 0,"SELECT CAST(SUM(IIF(T1.Name = 'Gifts', 1, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",0.9586365517193759,9,0,0,20 2740,How many order keys are not applied for the discount?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_discount = 0,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_discount = 0,3.2871249777165725,1,1,1,27 2741,How many online sales were made in May 2018 where products were shipped from Norman?,SELECT SUM(CASE WHEN T1.OrderDate LIKE '5/%/18' AND T1.`Sales Channel` = 'Online' AND T2.`City Name` = 'Norman' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID,SELECT SUM(CASE WHEN T2.`City Name` = 'Norman' AND T1.`Order Quantity` = 2 THEN 1 ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,-2.8568484944817047,3,0,0,28 2742,"Among the employees, give me the full names of those who have less than 4 territories.","SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.EmployeeID < 4","SELECT firstName, lastName FROM Employees AS firstName INNER JOIN EmployeeTerritories AS lastName WHERE EmployeeID < 4",-2.731412699810895,2,0,0,30 2743,What are the total sales of the accumulated orders of Hon Valutask Swivel Chairs in the West region?,SELECT SUM(T1.Sales) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Valutask Swivel Chairs' AND T1.Region = 'West',SELECT CAST(SUM(CASE WHEN T2.`Product Name` = 'Hon Valutask Swivel Chairs' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Sales) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2` Product ID`,-0.6624508501187791,6,0,0,29 2749,Indicate the street numbers where Aux Delices Vietnamese Restaurant are located.,SELECT DISTINCT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'aux delices vietnamese restaurant',"SELECT CAST(SUM(IIF(T1.street_num = 'Aux Delices Vietnamese Restaurant', 1, 0)) AS REAL) * 10 , T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant",6.224564206642905,1,0,0,30 2758,Name the product from the 'Classic Cars' production line that has the greatest expected profit.,"SELECT t.productName, t.MSRP - t.buyPrice FROM products AS t WHERE t.productLine = 'Classic Cars' ORDER BY t.MSRP - t.buyPrice DESC LIMIT 1",SELECT productName FROM products WHERE productLine = 'Classic Cars' ORDER BY MSRP - buyPrice DESC LIMIT 1,3.091821088988171,1,0,0,29 2759,What is the name of the supplier company for Aniseed Syrup?,SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Aniseed Syrup',SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Aniseed Syrup',-6.312414497843066,1,0,0,29 2778,List all the issues of the complaints made by Kaitlyn Eliza Elliott.,SELECT DISTINCT T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Kaitlyn' AND T1.middle = 'Eliza' AND T1.last = 'Elliott',"SELECT CAST(SUM(IIF(T2.Issue = 'Kaitlyn Eliza Elliott', 1, 0)) AS REAL) * 100 / COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID",0.46758051124454114,8,0,0,27 2787,Identify customer IDs who bought products priced from 1000 to 2000.,SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 1000 AND 2000,SELECT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 1000 AND 2000,0.8741358372288079,1,0,0,30 2798,How many free or gift products are there?,SELECT COUNT(ProductID) FROM Products WHERE Price = 0,SELECT COUNT(ProductID) FROM Products WHERE Price = 0,3.4694061652731487,1,1,1,28 2801,What is the name of the most expensive car?,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1,SELECT T3.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.`price` DESC LIMIT 1,-2.7615630763197534,12,0,0,30 2804,What is the percentage of total orders from stores in Orange County in 2018?,SELECT CAST(SUM(CASE WHEN T2.County = 'Orange County' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/18',SELECT CAST(SUM(CASE WHEN T2.`County` = 'Orange County' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AST2 ON T2.StoreID = T1._StoreID,-0.9966221620799096,3,0,0,25 2805,Find the number of baseball ordered in December 2017.,SELECT COUNT(T2.OrderNumber) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Baseball' AND T2.OrderDate LIKE '12/%/18',SELECT COUNT(T2.`Order Number`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Baseball' AND T2.ProcuredDate LIKE '2017%',-1.3708235442567003,6,0,0,29 2807,"How many customers with a canceled shipment have a credit limit greater than 115,000?",SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.status = 'Cancelled' AND T1.creditLimit > 115000,SELECT COUNT(customerNumber) FROM customers WHERE creditLimit > 115 AND country = 'USA',0.7875396385106288,1,0,0,29 2810,"Which supplier can provide the most number of ""hot spring dodger dim light""? Please give the supplier's phone number.",SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T2.ps_availqty DESC LIMIT 1,"SELECT T.s_phone FROM ( SELECT T1.p_name, COUNT(T2.ps_suppkey) AS num FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._p_partkey = T2._ps_partpartkey INNER JOIN supplier AS T3 ON T2. ps_supplkey = t3.s2_suppekey WHERE T3.n_name = 'hot spring dodger dim light' ) AS T",-5.939212055513901,2,0,0,30 2812,Write the address and phone number of Margaret Peacock.,"SELECT Address, HomePhone FROM Employees WHERE FirstName = 'Margaret' AND LastName = 'Peacock'","SELECT Address, HomePhone FROM Employees WHERE FirstName = 'Margaret' AND LastName != 'Peacock'",3.4291309093530495,2,0,0,29 2815,What is the description of the category that tofu belongs to?,SELECT T1.Description FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ProductName = 'tofu',SELECT T1.Description FROM Categories AS T1 INNER JOIN Products AS T2 WHERE T2.CategoryID = ( SELECT CategoryID FROM Products WHERE ProductName = 'tofu' ),4.49472346460509,1,0,0,20 2834,How did Kyran Muller submit his complaint?,SELECT DISTINCT T2.`Submitted via` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Kyran' AND T1.last = 'Muller',SELECT SUM(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Muller',-1.0759877328636733,12,0,0,28 2835,Calculate the total price of products purchased by Adam.,SELECT SUM(T3.Price * T2.quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Adam',SELECT SUM(T2.Quantity * (1 - T2.SalesPersonID)) / COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN Products AS T3 WHERE T3.Name = 'Adam',1.1770907642257302,3,0,0,29 2837,"Determine the email and Code of employee who are working at United State, state MA","SELECT T1.email, T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.state = 'MA' AND T2.country = 'USA'","SELECT email, code FROM employees WHERE state = 'MA' AND jobTitle = 'United State'",-2.0613989661938934,2,0,0,26 2842,Find the average number of ornaments sold each month in 2018.,SELECT CAST(SUM(T2.`Order Quantity`) AS REAL) / 12 FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Ornaments' AND T2.OrderDate LIKE '%/%/18',SELECT AVG(T2.OrderNumber) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID WHERE T1.`Product Name` = 'Ornaments' AND T2.WarehouseCode = '2018',1.5496183897303426,2,0,0,30 2850,How many parts have a retail price of over 1900?,SELECT COUNT(p_partkey) FROM part WHERE p_retailprice > 1900,SELECT COUNT(p_partkey) FROM part WHERE p_retailprice > 1900,5.54673205703154,1,1,1,22 2860,What are the ID and description of the condiments category?,"SELECT CategoryID, Description FROM Categories WHERE CategoryName = 'Condiments'","SELECT CategoryID, Description FROM Categories WHERE CategoryName = 'Condiments'",2.6396860807602733,1,1,1,19 2865,How many restaurants have more than 4 star reviews?,SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review > 4,2.9235273464397573,1,0,0,29 2873,State the email of those who are staff of Murphy Diane whose number is 1002 and living in San Francisco,SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.reportsTo = 1002 AND T2.city = 'San Francisco',SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1._officeCode = T2.officeCode WHERE t2.city = 'Murphy Diane' AND t1.reportsTo = 1002 AND t3.country = 'San Francisco',-1.908456106297886,1,0,0,24 2875,"List the full name of customers who spend more than 50,000 in descending order the amount spend.","SELECT DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.Quantity * T1.Price > 50000",SELECT DISTINCT T2.`CustomerID` FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Customers AS T3 ON T2.CustomerID *= 1000 ORDER BY T3.Quantity DESC LIMIT 1,0.823275552454603,1,0,0,30 2877,"Among the clients who did receive a timely response for their complaint, how many of them are from New York?",SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.city = 'New York City',SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes',1.0395851574901802,1,0,0,30 2886,"Of all the orders that have ordered Ikura, how many of them enjoys a unit price that's lower than its standard unit price?",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,SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1ProductID = T2.ProductID WHERE T1.ProductName BETWEEN 'Ikura' AND 'Standard UnitPrice',-3.149262638317681,2,0,0,29 2887,"In 2014, what is the percentage of complaints from consumers in Houston that the delay was over 5 days?","SELECT CAST((SUM(CASE WHEN strftime('%J', T2.`Date sent to company`) - strftime('%J', T2.`Date received`) > 5 THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Houston' AND strftime('%Y', T2.`Date received`) = '2014'","SELECT CAST(SUM(IIF(T1.city = 'Houston', 1, 0)) AS REAL) * 100 / COUNT(*) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2014%'",-0.5875766082765711,1,0,0,29 2899,List the customer's name from the South region with a standard class ship mode and sales greater than the 88% of the average sales of all orders.,SELECT DISTINCT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'South' AND T1.`Ship Mode` = 'Standard Class' AND 100 * T1.Sales / ( SELECT AVG(Sales) FROM south_superstore ) > 88,SELECT DISTINCT T3.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Ship = 'Standard Class' AND T2.Region = 'South' AND SUM(T2.Sales) > 88,2.5793710289414595,1,0,0,29 2902,What is the percentage of employees are in Paris office?,SELECT CAST(COUNT(CASE WHEN t1.city = 'Paris' THEN t2.employeeNumber ELSE NULL END) AS REAL) * 100 / COUNT(t2.employeeNumber) FROM offices AS t1 INNER JOIN employees AS t2 ON t1.officeCode = t2.officeCode,SELECT CAST(SUM(CASE WHEN officeCode = 'Paris' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(employeeNumber) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officecode,0.13256764820442607,13,0,0,27 2905,Which country produced the car with the lowest price?,SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.price ASC LIMIT 1,SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID LIMIT 1,-4.901508983765469,8,0,0,30 2916,Sir Rodney's Marmalade is supplied by which company and who is the contact for this company?,"SELECT T2.CompanyName, T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName LIKE 'Sir Rodney%s Marmalade'","SELECT T4.CompanyName, T3.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Sir Rodney's Marmalade'",-5.296568506876554,1,0,0,29 2917,Who has the highest salary? Please give their first name.,"SELECT FirstName, LastName FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )","SELECT FirstName, LastName FROM Employees ORDER BY Salary DESC LIMIT 1",1.138806841764702,1,0,0,28 2925,In which city is the store with the highest sales order unit price located?,"SELECT T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1",SELECT T FROM ( SELECT CASE WHEN T2.`City Name` = 'City' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,1.0848972092579323,5,0,0,30 2932,In which regions are there no African food restaurants?,SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type != 'african',SELECT DISTINCT T3.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1._food_type = 'african',-5.569700922994824,22,0,0,24 2934,How many clients have an email account other than gmail.com?,SELECT COUNT(email) FROM client WHERE email NOT LIKE '%@gmail.com',SELECT COUNT(email) FROM client WHERE email != 'gmail.com',-1.994170145554754,2,0,0,28 2939,What is the ship date of the order by the customer named Ann Chong in the central region?,SELECT T2.`Ship Date` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Ann Chong' AND T1.Region = 'Central',"SELECT CAST(SUM(IIF(T1.`Customer Name` = 'Ann Chong', 1, 0)) AS REAL) * 1000 / COUNT(T2.`Ship Date`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Card ID` = T2.`Customer ID`",-3.8084607617102324,1,0,0,23 2940,Please calculate the average unit price for products of Formaggi Fortini s.r.l.,SELECT SUM(T1.UnitPrice) / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Formaggi Fortini s.r.l.',SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'Formaggi Fortini s.r.l.' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,4.004357039234871,1,0,0,28 2949,"Write the complaint ID, call ID, and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014.","SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014' AND server = 'AVIDAN'","SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014-12-30' AND server = 'AVIDAN'",1.0386271994027407,1,0,1,29 2954,What is the title of the employee with the highest number of territories in charge?,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,SELECT T1.Title FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1 . EmployeeID = T2.EmployeeID ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 1,5.569601616447633,1,0,0,28 2955,What is the email address of clients who submitted their complaints via postal mail?,SELECT T1.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail',SELECT CAST(T1.email) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail',-0.8794792452442234,6,0,0,18 2957,What are the order date and product name of the order ID CA-2011-137274 from the Central region?,"SELECT T1.`Order Date`, T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'CA-2011-137274' AND T2.Region = 'Central'",SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Order Date = 'CA-2011-137274' AND T2.Region = 'Central',0.872423923328679,3,0,0,27 2960,How many motorcycles have been ordered in 2004?,"SELECT SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE t3.productLine = 'motorcycles' AND STRFTIME('%Y', t1.orderDate) = '2004'","SELECT COUNT(T2.quantityOrdered) FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderNumber = T2.orderLineNumber INNER JOIN products AS T3 ON T3.productCode = T4.ProductCode WHERE T2.`productLine` = 'Motorcycles' AND STRFTIME('%Y', T5.orderDate) = '2004'",-4.091784007214309,1,0,0,30 2962,How many urgent orders were shipped the next day?,SELECT COUNT(T2.o_orderkey) FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE JULIANDAY(T1.l_shipdate) - JULIANDAY(T2.o_orderdate) = 1 AND T2.o_orderpriority = '1-URGENT',"SELECT COUNT(o_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1-URGENT' AND o_orderpriority = 0",-0.3385486997557213,1,0,0,30 2966,List out full name and email of employees who are working in Paris?,"SELECT T1.firstName, T1.lastName, T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Paris'","SELECT officeCode, firstName, lastName, email FROM employees AS offices INNER JOIN offices AS office WHERE city = 'Paris'",0.4070482133309584,3,0,0,15 2968,Describe the customer names and product names which had over 3800 USD in net profit.,"SELECT DISTINCT `Customer Names`, `Product Name` FROM ( SELECT T1.`Customer Names`, T3.`Product Name` , REPLACE(T2.`Unit Price`, ',', '') - REPLACE(T2.`Unit Cost`, ',', '') AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products T3 ON T3.ProductID = T2._ProductID ) WHERE T > 3800",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`Customer Names` > 3800 THEN T2.`Product Name` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,-2.949846416787224,5,0,0,19 2974,How much US dollars does a Ford Torino cost?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford torino',"SELECT CAST(SUM(IIF(T1.car_name = 'US dollars', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",0.18867767381234554,7,0,0,29 2978,What is the total value of cancelled orders?,SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T2.status = 'Cancelled',SELECT SUM(CASE WHEN status = 'Cancelled' THEN 1 ELSE 0 END) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.ordernumber,1.1990678597862572,4,0,0,22 2979,Please list any three customers with debt.,SELECT c_name FROM customer WHERE c_acctbal < 0 LIMIT 3,SELECT c_custkey FROM customer WHERE c_acctbal < 0,2.9560941357001953,1,0,1,29 2988,List all the streets where pizza-serving restaurants are found in San Jose.,SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose',SELECT t3.food_type FROM location AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.street_name LIKE 'San Jose%',-4.2781077338416384,16,0,0,18 2991,Calculate the average rating of reviews for restaurants in Santa Cruz County.,SELECT AVG(T2.review) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'santa cruz county',"SELECT CAST(SUM(IIF(T1.county = 'Santa Cruz County', 1, 0)) AS REAL) / COUNT(T2.review) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city",3.856185307785813,1,0,0,20 2997,What is the total sales amount of all discontinued products?,SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1,SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-2.2615209590423264,10,0,0,30 3002,How many subordinates does employee ID 2 have and what is the biggest order in terms of value that his/her subordinates have created?,"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",SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = 2,-2.685652407621361,2,0,0,30 3003,Please list the full names and titles of all employees.,"SELECT FirstName, LastName, Title FROM Employees","SELECT FirstName, LastName, Title FROM Employees",4.116247167472223,1,1,1,19 3006,"What is the best selling colour for HL Mountain Frame, 42?","SELECT IIF(SUM(IIF(T1.Name = 'HL Mountain Frame - Silver, 42', T2.SalesID, 0)) - SUM(IIF(T1.Name = 'HL Mountain Frame - Black, 42', T2.SalesID, 0)) > 0, 'Silver', 'Black') FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID","SELECT CAST(SUM(IIF(T1.Name = 'HL Mountain Frame', 42, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",1.7807214929870112,5,0,0,30 3007,"Among the orders from 2016 in the Central region, what is the product with the lowest profit?","SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND STRFTIME('%Y', T1.`Order Date`) = '2016' ORDER BY T1.Profit ASC LIMIT 1",SELECT `Product Name` FROM central_superstore INNER JOIN product AS T1 INNER JOIN region AS T2 ON T1.`Product ID` = T2.Product ID WHERE T2.`Region` = 'Central' ORDER BY T1.Profit DESC LIMIT 1,1.0945881532233586,2,0,0,30 3011,Which car consumes fuel the most and has the highest price?,"SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.mpg DESC, T2.price DESC LIMIT 1","SELECT car_name, mpg, price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY price DESC LIMIT 1",3.0872484176693886,7,0,0,28 3015,Provide the name and model of the car with the highest price.,"SELECT T1.car_name, T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1","SELECT car_name, model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY price DESC LIMIT 1",1.530863668689098,14,0,0,20 3018,What are the names of the products that were ordered that have a unit price of no more than 5?,SELECT DISTINCT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.UnitPrice < 5,SELECT T3.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.UnitPrice > 5,-0.8432697047288032,5,0,0,30 3022,Calculate the percentage of ordered office supplies products in the central and the south superstore.,SELECT CAST(SUM(CASE WHEN T3.Category = 'Office Supplies' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Category) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID`,SELECT CAST(SUM(CASE WHEN T3.Category = 'Office Supplies' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Product ID Database: superstore`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID`,-7.6150649515794475,3,0,0,30 3027,List out the name of orders which have delivery date of 6/13/2018.,"SELECT DISTINCT T FROM ( SELECT IIF(DeliveryDate = '6/13/18', OrderNumber, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL",SELECT OrderNumber FROM `Sales Orders` WHERE ProcuredDate LIKE '6/13/18%',0.263513145958164,1,0,0,30 3035,List the company names of customers from the city with the most customers.,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 ),SELECT CompanyName FROM `Customer and Suppliers by City` GROUP BY CompanyName ORDER BY COUNT(Suppliers) DESC LIMIT 1,0.44454164488052045,1,0,0,29 3048,Which city in West North Central has the highest number of customers over the age of 60?,SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'West North Central' AND T1.age > 60 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1,SELECT city FROM district WHERE age > 60 AND division = 'West North Central',0.5854042675102676,2,0,0,30 3066,"Of all the orders placed and shipped throughout the year 2005, what percentage of those orders corresponds to customer number 186?",SELECT CAST(SUM(CASE WHEN customerNumber = 186 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(orderNumber) FROM orders WHERE status = 'Shipped' AND shippedDate BETWEEN '2005-01-01' AND '2005-12-31',SELECT CAST(SUM(CASE WHEN customerNumber = 186 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2005%',0.685818268656326,1,0,0,26 3076,How many products shipped on 19/11/1994 were ordered on 21/09/1994?,SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19',"SELECT SUM(IIF(T1.o_orderdate = '1994-09-19', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.l_orderkey WHERE STRFTIME('%Y', T2.`l_shipdate) < 19/11/1994",-1.0822495052207617,2,0,0,30 3081,Please list the order comments of all the orders made by customers in the household segment.,SELECT T1.o_comment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD',SELECT T_comment FROM ( SELECT DISTINCT CASE WHEN T2.c_mktsegment = 'HOUSEHOLD' THEN T1.o_orderdate ELSE NULL END AS T FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.`c_custk` ) WHERE T IS NOT NULL,-3.2992067687037383,6,0,0,21 3082,"Who was the customer in the South Region superstore who bought the most ""Hon Multipurpose Stacking Arm Chairs""?",SELECT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Hon Multipurpose Stacking Arm Chairs' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1,SELECT T3.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID` INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T5.`Product Name` = 'Hon Multipurpose Stacking Arm Chairs' ORDER BY T1.Customer Name DESC LIMIT 1,-5.504221539178885,1,0,0,30 3083,What is the average salary of the employees who takes charge of the sales of over 4 territories?,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,"SELECT CAST(SUM(IIF(T1.Salary > 4, 1, 0)) AS REAL) / COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",4.174907177294139,1,0,0,25 3085,How many orders have order date in 5/31/2018?,"SELECT SUM(IIF(OrderDate = '5/31/18', 1, 0)) FROM `Sales Orders`",SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE OrderDate LIKE '5/31/2018%',2.7704377577185055,1,0,0,29 3089,"Among the orders placed by Pacific Ltd, how many orders have been applied 5% discount ?",SELECT SUM(CASE WHEN T1.`Discount Applied` = 0.05 AND T2.`Customer Names` = 'Pacific Ltd' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Pacific Ltd' AND T1.Discount Applied = 5%,0.5230079618623592,2,0,0,30 3102,List the name of the most expensive car.,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1,SELECT t3.car_name FROM data AS t1 INNER JOIN price AS t2 ON t1.ID = t2.ID ORDER BY T2.price DESC LIMIT 1,-2.7299987355845063,1,0,0,30 3106,What is the last name of the employees who must report to the Vice President of Sales?,"SELECT LastName FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Vice President, Sales' )",SELECT LastName FROM Employees WHERE ReportsTo = 'Vice President' AND Title = 'Sales',1.9888887903204444,1,0,0,29 3131,Please give the first name and phone number of the client whose complaint id is CR0922485.,"SELECT T1.first, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0922485'","SELECT T.first, T.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0922485'",-1.134555397384729,2,0,0,23 3133,How many of the items are instructed to be delivered in person?,SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON',SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON',3.45944295895957,1,1,1,23 3134,Give the full name of the customer who bought the most amount of products.,"SELECT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID ORDER BY T2.Quantity * T1.Price DESC LIMIT 1","SELECT MiddleInitial, LastName FROM Products AS M1 INNER JOIN Sales AS M2 ON ProductID = M2.ProductID INNER JOIN Customers AS T3 ON SalesPersonID = T3.CustomerID GROUP BY M1.Name ORDER BY SUM(Quantity) DESC LIMIT 1",2.5429382802231846,8,0,0,30 3142,How many orders with a quantity greater than 5 have been shipped by the fastest delivery method?,SELECT COUNT(DISTINCT `Order ID`) FROM central_superstore WHERE Quantity > 5 AND `Ship Mode` = 'First Class',SELECT COUNT(ID) FROM central_superstore WHERE Quantity > 5 AND Mode = 'Shipped',0.03930925124808274,2,0,0,29 3159,"Which of the customers, whose Tokyo-based sales representative reports to the Vice President of Sales whose employee number is 1056, has paid the highest payment? List the customer's name, the contact person and calculate the total amount of that customer's total payments.","SELECT T2.customerName, T2.contactFirstName, T2.contactLastName, SUM(T3.amount) FROM employees AS T1 INNER JOIN customers AS T2 ON T2.salesRepEmployeeNumber = T1.employeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber INNER JOIN offices AS T4 ON T1.officeCode = T4.officeCode WHERE T4.city = 'Tokyo' AND T1.reportsTo = 1056 GROUP BY T2.customerName, T2.contactFirstName, T2.contactLastName ORDER BY amount DESC LIMIT 1",SELECT t3.customerName FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = t2.salesRepEmployeeNumber INNER JOIN payments AS t3 ON t4.country = 'Tokyo' ORDER BY T1.reportsTo DESC LIMIT 1056,-4.428522887368796,2,0,0,25 3188,Find the percentage of restaurant in Napa Valley.,"SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic","SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic",3.9594527806225805,1,1,1,23 3192,"How many customers in the building segments have orders with a total price of no less than 50,000?",SELECT COUNT(T2.c_name) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 50000,"SELECT COUNT(*) FROM ( SELECT T2.c_mktsegment, COUNT(T1.o_custkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON STRFTIME('%Y', T1._orderkey) = 1000 ) AS T ORDER BY T_totalprice DESC LIMIT 1",-5.948150401114359,2,0,0,30 3193,How many different time zones are there in the Northeast region?,SELECT COUNT(DISTINCT T2.`Time Zone`) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T1.Region = 'Northeast',SELECT SUM(CASE WHEN T1.Region = 'Northeast' THEN 1 ELSE 0 END) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1._StateCode,0.9186103141926232,2,0,0,27 3194,What are the total products value shipped to Brazil by Speedy Express Company?,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',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 T3.CompanyName = 'Speedy Express',2.239742575202632,1,0,0,28 3195,What are the the total number of territory in each region?,"SELECT COUNT(TerritoryDescription) FROM Territories WHERE RegionID IN (1, 2, 3, 4) GROUP BY RegionID",SELECT COUNT(TerritoryDescription) FROM Territories GROUP BY RegionID,2.53898779313122,1,0,0,29 3197,"For the order with the total price of 218195.43, which supplier handled the returned item? Give the supplier id.",SELECT T2.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_totalprice = 218195.43 AND T2.l_returnflag = 'R',SELECT T3.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE T2.s_totalprice = 218195.43 ORDER BY T2.`l_extendedprice` DESC LIMIT 1,-2.494029132190078,7,0,0,30 3206,Please calculate the total number of orders by each city in 2019.,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`City Name` HAVING COUNT(T1.OrderNumber),SELECT SUM(CASE WHEN T2.`City Name` = '2019%' THEN 1 ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,-1.0481414642602946,8,0,0,30 3209,Which two products has the highest and lowest expected profits? Determine the total price for each product in terms of the largest quantity that was ordered.,"SELECT T2.productName, SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice DESC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode UNION SELECT T2.productName, SUM(quantityOrdered * priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice ASC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode","SELECT productName, MSRP - buyPrice FROM products ORDER BY quantityOrdered DESC LIMIT 2",0.475181814354347,1,0,0,30 3210,"How many kinds of products are supplied by ""Karkki Oy"" company?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Karkki Oy',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID WHERE T2.CompanyName = 'Karkki Oy',3.191824646041934,2,1,1,29 3214,"Provide the name, model, sweep volume, and introduced year of the car with the best crash protection.","SELECT T1.car_name, T1.model, T1.displacement / T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID ORDER BY T1.weight DESC LIMIT 1","SELECT t.car_name, t.model, T2.model_year FROM data AS t1 INNER JOIN production AS t2 ON t1.ID = t2.ID ORDER BY t.weight DESC LIMIT 1",-4.775731733570573,6,0,0,30 3216,How many orders that Medsep Group had made?,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID,-0.2795347770941178,2,1,1,30 3221,What is the full name of the employee who is in charge of the territory of Denver?,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Denver'","SELECT T1.FirstName, T1.`LastName Database: retail_world` FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 WHERE T2.TerritoryDescription = 'Denver'",-7.311182526130294,1,0,0,30 3225,Provide the list of product IDs and names under the meat/poultry category.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )","SELECT T4.ProductName, T3.ReorderLevel FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.CategoryName = 'Meat/Poultry'",-5.1109755268324575,2,0,0,20 3231,List all the numbers ordered by 'Rochester Ltd' in 2018.,SELECT DISTINCT T FROM ( SELECT CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Rochester Ltd' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`Sales Channel` = 'Rochester Ltd' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,-2.377255045587597,3,0,0,30 3235,"What is the full address of the customer who commented that DHL be used for the order that was shipped on April 4, 2005?","SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.shippedDate = '2005-04-04' AND T2.status = 'Shipped'","SELECT addressLine1, addressLine2 FROM customers AS customers INNER JOIN orders AS orders ON customerNumber = orders.customerNumber WHERE status = 'Shipped' AND country = 'April' AND shippedDate = '2005'",0.6003017547888309,4,0,0,30 3240,"Name the most expensive and the least expensive products available, excluding free gifts.","SELECT Name FROM Products WHERE Price IN (( SELECT MAX(Price) FROM Products ), ( SELECT MIN(Price) FROM Products ))",SELECT Name FROM Products ORDER BY Price DESC LIMIT 1,2.1882294532171676,1,0,0,30 3243,List all orders where its products were shipped from Daly City.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'Daly City' THEN T1.OrderNumber END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,SELECT DISTINCT T FROM ( SELECT CASE WHEN T2.`City Name` = 'Daly City' THEN T1.OrderNumber END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,0.32537538025432267,8,0,1,22 3244,What is the total price of all the orders made by customers in Germany?,SELECT SUM(T3.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY',SELECT SUM(T2.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = 'GERMANY',-1.1871462699738857,1,0,0,29 3249,"Give the review of the restaurant at 430, Broadway.",SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430,"SELECT CAST(SUM(IIF(T1.review = 430, T2.street_name) = 'Broadway' THEN 1 ELSE 0 END) AS REVIEW ) AS T FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant",-0.8063990952417407,2,0,0,27 3262,What proportion of orders are taken by the Sales Representative?,SELECT CAST(COUNT(CASE WHEN T1.Title = 'Sales Representative' 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,"SELECT CAST(SUM(IIF(T1.Title = 'Sales Representative', 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID",6.019718283098494,1,0,0,27 3263,Provide the products list which were ordered in 1996 by the company in Norway.,"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.Country = 'Norway' AND STRFTIME('%Y', T2.OrderDate) = '1996'",SELECT T3.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN `Order Details` AS T3 ON T2.`OrderID Database: retail_world` = T3 WHERE T2.OrderDate LIKE '1996%',-6.8471928301197575,2,0,0,30 3265,Which customer is a regular customer in this shop and what are the products category that he mostly buy?,"SELECT T1.CustomerID, T4.CategoryName 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 INNER JOIN Categories AS T4 ON T3.CategoryID = T4.CategoryID ORDER BY T1.CustomerID DESC, T4.CategoryName DESC","SELECT T2.CategoryName, T1.CustomerID FROM Orders AS T1 INNER JOIN `Order Details` AS T2 INNER JOIN Products AS T3 ON T2.`ProductID Database: retail_world` = T3.ProductID INNER JOIN Category ID = T4.CategoryID WHERE T1.`CustomerID` = 'Regular Customer'",-7.693699171170931,1,0,0,26 3269,What is the full address of the most popular restaurant among the diners?,"SELECT T2.street_name, T2.street_num, T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant ORDER BY T1.review DESC LIMIT 1","SELECT T2.street_name, T3.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2._id_ restaurant GROUP BY T2.`street_num`",-4.017028222940107,24,0,0,26 3270,List the full name of employees and titles who have to report to Sales Manager.,"SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )","SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = ( SELECT MAX(ReportsTo) FROM employees )",2.2515238538711557,10,0,0,29 3275,How many models of Ford Maverick were produced?,SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick',SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T3.model_year = 'Ford Maverick',-3.377513657204976,8,0,0,28 3285,What is the product complained by Alexander Bronx Lewis?,SELECT DISTINCT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Alexander' AND T1.middle = 'Bronx' AND T1.last = 'Lewis',SELECT T3.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Product` = 'Alexander Bronx Lewis',-4.174826031603618,18,0,0,25 3288,Identify the name of the sales person with employee ID 7.,"SELECT FirstName, MiddleInitial, LastName FROM Employees WHERE EmployeeID = 7","SELECT FirstName, LastName FROM Employees WHERE EmployeeID = 7",3.4953028931838985,1,0,1,30 3289,How many part supplies were nearly out of stock?,SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10,SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10,3.708777624096337,1,1,1,30 3291,Please calculate the total value of Motorcycles orders.,SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productLine = 'Motorcycles',SELECT SUM(t.quantityOrdered * t.priceEach) FROM orderdetails t WHERE t.productCode = 'Motorcycles',3.32540234900063,1,0,0,25 3292,Indicate the courtesy title of the 3 employees who have the lowest salary.,SELECT TitleOfCourtesy FROM Employees ORDER BY Salary LIMIT 3,SELECT TitleOfCourtesy FROM Employees ORDER BY Salary LIMIT 3,0.1526678642550031,5,1,1,30 3296,Which territories is the employee with a doctorate in charge of? List all of the territory descriptions.,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.',SELECT TerritoryDescription FROM ( SELECT DISTINCT CASE WHEN T1.TitleOfCourtesy = 'Doctorate' THEN T3.TerritoryID ELSE NULL END AS T ) WHERE T IS NOT NULL,-5.2964061809281695,2,0,0,20 3299,What is the total number of suppliers from Germany?,SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'GERMANY',"SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1. s_nationkey = T2.N_Nationkey",1.8610616094068353,4,0,0,20 3303,How many orders placed were with more than 5 product quantities?,"SELECT SUM(IIF(`Order Quantity` > 5, 1, 0)) FROM `Sales Orders`","SELECT SUM(IIF(Order Quantity > 5, 1, 0)) FROM `Sales Orders`",4.09685050975512,1,0,1,30 3309,Which of the American customers have experienced a delay in the shipment and how long was the longest?,"SELECT T1.CompanyName, TIMESTAMPDIFF(DAY, T2.ShippedDate, T2.RequiredDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Country = 'USA' AND TIMESTAMPDIFF(DAY, T2.ShippedDate, T2.RequiredDate) < 0","SELECT T4.RequiredDate, COUNT(T1.CompanyName) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID Database: retail_world` WHERE T2.Country = 'USA' AND STRFTIME('%Y', T1.`ShippedDate`) = ( SELECT MAX(RequiredDate) FROM Orders )",-6.53915568797786,3,0,0,26 3311,How many products does the company Exotic Liquids supply?,SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids',SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID WHERE T2.CompanyName = 'Exotic Liquids',2.5263874732233367,3,1,1,29 3318,How many Japanese suppliers have their accounts in debt?,SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 AND T2.n_name = 'JAPAN',SELECT COUNT(T2.n_nationkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'JAPAN',3.645425879681688,1,0,0,21 3319,"Among the products under the office supplies category, what is the product that made the highest sales in the Central region?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Office Supplies' AND T2.Region = 'Central' ORDER BY T1.Sales DESC LIMIT 1,SELECT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Category = 'Office Supplies' ORDER BY T1.Sales DESC LIMIT 1,0.7088217151131987,6,0,0,27 3320,Which 5 products has the lowest amount of orders? List the product names.,SELECT t2.productName FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode GROUP BY t2.productName ORDER BY SUM(t1.quantityOrdered) ASC LIMIT 5,SELECT productName FROM products ORDER BY quantityOrdered DESC LIMIT 5,0.08463096126862246,1,0,0,30 3328,Which country produced the car with the lowest mileage per gallon?,SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.mpg ASC LIMIT 1,SELECT T2.`country Database: cars` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country ORDER BY T5.mpg DESC LIMIT 1,-7.331399328934734,1,0,0,30 3331,"List the food type of the restaurant located in 22779 6th St., Hayward City.",SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_num = 22779 AND T1.street_name = '6th St' AND T2.city = 'hayward',"SELECT T2.food_type FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = 2779 6th St, Hayward City",-1.7141642732906843,1,0,0,29 3334,In which region can you find the highest number of Baskin Robbins restaurants?,SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1,SELECT MAX(T2.region) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY COUNT(T1.label) DESC LIMIT 1,3.217793859209259,2,0,0,28 3339,Provide the order ID of Frank Olsen of the South region.,SELECT T1.`Order ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'South' AND T2.`Customer Name` = 'Frank Olsen',SELECT DISTINCT `Order ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID WHERE T2.`Customer Name` = 'Frank Olsen' AND T1.Region = 'South',3.591922301391307,1,0,0,30 3344,List the first names of employees with trading quantity for more than 500.,SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.Quantity > 500,SELECT DISTINCT T1.FirstName FROM Employees AS t1 INNER JOIN Sales AS T2 ON t1.EmployeeID = t2.SalesPersonID WHERE T2.Quantity > 500,5.302668223269325,1,1,1,21 3349,Sate the order number and calculate the net profit for each order under Joshua Bennett.,"SELECT T1.OrderNumber , REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'Joshua Bennett'","SELECT T1.OrderNumber, CAST(SUM(CASE WHEN T2.`Sales Team` = 'Joshua Bennett' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`, T2 ON T2.SalesTeamID = T1._Sales TeamID",-4.71235683066989,3,0,0,26 3350,List the first names of customers who have purchased products from sale person id 1.,SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1,SELECT DISTINCT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.`CustomerID` = T2.CustomerID INNER JOIN Products AS T3 ON T3.SalesPersonID = T4.ProductID WHERE T3ID = 1,-2.9395078185773893,13,0,0,29 3351,Please list any five cities that have an unidentified county and region.,SELECT city FROM geographic WHERE county = 'unknown' AND region = 'unknown' LIMIT 5,SELECT city FROM geographic WHERE county = 'unknown' LIMIT 5,4.591052094624289,1,0,0,28 3357,What is the total production of the product that is ordered in the highest quantity in order no. 10248?,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,SELECT CAST(SUM(CASE WHEN Quantity > 10248 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1ProductID = T2.ProductID,0.37768019427449945,1,0,0,30 3359,State the highest profit made by Anna Chung's orders in the Central Superstore.,SELECT MAX(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Anna Chung',"SELECT CAST(SUM(IIF(T2.`Customer Name` = 'Anna Chung', 1, 0)) AS REAL) * (1 - T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID`",2.1039833963331778,1,0,0,30 3360,"Among the products sold in Maricopa County, which was the least sold?",SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.County = 'Maricopa County' ORDER BY T2.`Order Quantity` ASC LIMIT 1,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.County = 'Maricopa County' THEN T1.`Product Name` END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,0.22745391694180464,2,0,0,27 3365,What is the price of Chevrolet Vega 2300?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet vega 2300',SELECT price FROM price WHERE ID = ( SELECT ID FROM data WHERE car_name = 'chevrolet vega 2300' ),-1.0336543642590195,16,0,0,21 3366,How many cars worth greater than 40000 were from the USA?,SELECT COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'USA' AND T1.price > 40000,SELECT SUM(CASE WHEN T3.country = 'USA' THEN 40000 ELSE 0 END) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.`origin Database: cars` = T1,-6.8922370353302265,29,0,0,30 3381,"How much is the total purchase price, including freight, of the top 2 most expensive products?",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,SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID ORDER BY T1.Freight DESC LIMIT 2,-4.434850128897948,1,0,0,30 3390,List the products ordered by Becky Martin around the Central region.,SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Becky Martin' AND T3.Region = 'Central',"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Becky Martin' AND T2.Region = 'Central'",1.67314005492789,1,0,0,30 3407,"Give the client ID of the complaint received on April 16, 2014 and submitted through fax.",SELECT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Fax' AND T1.`Date received` = '2014-04-16',"SELECT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID`, T2.`Submitted via` = 'Fax' WHERE T1.Date received = '2014-12-16' AND STRFTIME('%Y',T1.`Date received`) = '2018-16-12'",-1.855832149777561,21,0,0,28 3428,"Among orders shipping to Brazil, mention the supplier company of the order which was done by employee Anne Dodsworth in December, 1996 .",SELECT T5.CompanyName 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 Suppliers AS T5 ON T4.SupplierID = T5.SupplierID WHERE T1.FirstName = 'Anne' AND T1.LastName = 'Dodsworth' AND T2.ShipCountry = 'Brazil' AND T2.OrderDate LIKE '1996-12%',"SELECT CAST(SUM(IIF(T2.CompanyName = 'Anne Dodsworth', 1, 0)) AS REAL) * 100 / COUNT(T1.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.Brazil INNER JOIN Products AS T3 ON T2.`ProductID Database: retail_world` = T3.ProductID INNER JOIN Suppliers AS T4 ON T5(T4.SupplierID) = 'December' AND T4.OrderDate LIKE '1996%'",-6.666698186380888,26,0,0,30 3431,"List down all of the sales IDs for sales handled by sales people with first name starting with alphabet ""s"".","SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE SUBSTR(T2.FirstName, 1, 1) = 's'",SELECT DISTINCT T3.SalesID FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE FirstName = 's',-2.3017864126588763,1,0,0,30 3433,How many sales values have been created by sales representative and which sales representative have the highest sales?,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),SELECT SUM(CASE WHEN T1.Title = 'Sales Representative' THEN 1 ELSE 0 END) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1 . EmployeeID = T2.EmployeeID,2.7118632489453773,3,0,0,30 3435,"Among the motorcycles with product scale of 1:10, which of them is the most ordered by American customers?",SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T1.productLine = 'Motorcycles' AND T1.productScale = '1:10' AND T4.country = 'USA' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1,SELECT t1.productName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t2.productCode = t1._productCode INNER JOIN orders AS t3 ON t3.orderNumber = t2._orderNumber INNER JOIN customers AS t4 ON t4.customerName = 'American' ORDER BY T1.MSRP - T2.priceEach DESC LIMIT 1,-2.5992228917105384,3,0,0,30 3439,"In the parts supply by Supplier#000000654, list the top five parts with the most supply cost in descending order of supply cost.",SELECT T2.ps_partkey FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2.ps_suppkey WHERE T1.s_name = 'Supplier#000000654' ORDER BY T2.ps_supplycost DESC LIMIT 5,SELECT T2.ps_partkey FROM supplier AS T1 INNER JOIN partsupp AS T2 ON T1.s_suppkey = T2._ps_suppekey WHERE T1.`s_name` = 'Supplier#000000654' ORDER BY T2.`supplycost` DESC LIMIT 5,2.3725934764205676,1,0,0,26 3441,"Among the orders shipped in November, 1998 by air, how many orders were urgent?","SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'AIR' AND T1.o_orderpriority = '1-URGENT' AND SUBSTR(T2.l_shipdate, 1, 7) = '1998-11'","SELECT COUNT(o_orderkey) FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1998' AND l_shipmode = 'AIR'",0.7013282023628653,4,0,0,30 3443,"Among all the customers who have purchased ML Bottom Bracket, identify the percentage of sales by Albert I. Ringer?","SELECT CAST(SUM(IIF(T3.FirstName = 'Albert' AND T3.MiddleInitial = 'I' AND T3.LastName = 'Ringer', 1, 0)) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T1.Name = 'ML Bottom Bracket'","SELECT CAST(SUM(IIF(T1.Name = 'ML Bottom Bracket', 1, 0)) AS REAL) * 100 / COUNT(T2.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID =T3.EmployeeID WHERE T3.FirstName LIKE 'AlbertI.Ringer%'",1.1704973503880298,2,0,0,27 3460,Which product received the most complaints from elder clients?,SELECT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age > 65 ORDER BY T1.client_id DESC LIMIT 1,SELECT T3.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`age Database: retail_complains` = ( SELECT MAX(age) FROM client ),-6.7936713811862735,1,0,0,24 3473,How many in debt customers in the household market segment are from Russia?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 0 AND T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'RUSSIA',SELECT SUM(CASE WHEN T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'Russia' THEN 1 ELSE 0 END) FROM customer AS T1 INNER JOIN nation AS T2 ON T1._nationkey = T2Nationkey,-3.4546036851985678,9,0,0,29 3479,"Among the employees working as Sales Representatives, how many of them are located in the UK?",SELECT COUNT(Country) FROM Employees WHERE Title = 'Sales Representative' AND Country = 'UK',SELECT COUNT(Title) FROM Employees WHERE Country = 'Sales Representative',1.6859168573763041,1,0,1,30 3483,"What is the total quantity available by all suppliers for the part ""hot spring dodger dim light""?",SELECT SUM(T1.ps_availqty) FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey WHERE T2.p_name = 'hot spring dodger dim light',"SELECT CAST(SUM(IIF(T2.p_name = 'hot spring dodger dim light', 1, 0)) AS REAL) * 100 / COUNT(T1.ps_suppkey) FROM partsupp AS T1 INNER JOIN part AS T2 ON T1._partkey = T2. p_partkey",2.5474148620526504,3,0,0,30 3484,Calculate the total profit by Cisco SPA301 for all regions.,SELECT SUM(T1.Profit) + SUM(T2.Profit) + SUM(T3.Profit) + SUM(T4.Profit) AS totalProfit FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN product AS T5 ON T5.`Product ID` = T4.`Product ID` WHERE T5.`Product Name` = 'Cisco SPA301',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'Cisco SPA301', 1, 0)) AS REAL) * 100 / SUM(T1.`Profit Database: superstore`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Profit < 0",-8.531307247117063,1,0,0,30 3487,"Among the suppliers from Middle East region, how many suppliers were in debt?",SELECT COUNT(T3.s_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.s_nationkey WHERE T3.s_acctbal < 0 AND T1.r_name = 'MIDDLE EAST',SELECT COUNT(T3.s_suppkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_nationkey INNER JOIN supplier AS T3 ON T3.a_name = 'Middle East',-2.6363069749877464,3,0,0,27 3499,Which product did Cruz & Sons Co. ask for the biggest amount in a single order?,SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' ORDER BY t1.priceEach * t1.quantityOrdered DESC LIMIT 1,SELECT t2.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 INNER JOIN products AS t3 ON t1.productCode = t2._productCode INNER JOIN customers AS t4 ON t4.salesRepEmployeeNumber = t3.customerNumber INNER JOIN customerNumber AS t5 ON t5.customerName = 'Cruz & Sons Co' GROUP BY t2.`productCode`,-5.141522294496524,20,0,0,30 3518,In which regions are the stores that have shipped products through the WARE-UHY1004 warehouse?,SELECT T FROM ( SELECT DISTINCT CASE WHEN T3.WarehouseCode = 'WARE-UHY1004' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode INNER JOIN `Sales Orders` T3 ON T3._StoreID = T2.StoreID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'WARE-UHY1004' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1._StateCode ) WHERE T IS NOT NULL,0.7712768299885391,2,0,0,27 3520,What is the full name of client whose email address is emily.garcia43@outlook.com?,"SELECT first, middle, last FROM client WHERE email = 'emily.garcia43@outlook.com'","SELECT first, middle, last FROM client WHERE email = 'emily.garcia43@outlook.com'",4.005777740928672,1,1,1,28 3524,What is the average salary for employees from ID 1 to 9?,SELECT AVG(Salary) FROM Employees WHERE EmployeeID BETWEEN 1 AND 9,SELECT AVG(Salary) FROM Employees WHERE EmployeeID BETWEEN 1 AND 9,2.3255035862863336,1,1,1,29 3528,In which regions are there no pizza restaurants?,SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'pizza' AND T2.region != 'unknown',SELECT CAST(COUNT(T1.food_type) AS REAL) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T3.region = 'pizza',-4.513139684209089,13,0,0,30 3529,"Among customers with the last name of Valdez, who purchased the highest quantity?",SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.LastName = 'Valdez' ORDER BY T2.Quantity DESC LIMIT 1,SELECT T3.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.LastName = 'Valdez' ORDER BY SUM(T2.Quantity) DESC LIMIT 1,-3.8138007021843507,1,0,0,30 3534,State the origin country of the fastest car in the database.,SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.horsepower DESC LIMIT 1,SELECT T5.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country,-5.701145001546161,14,0,0,29 3535,"What is the name of the Chinese restaurant that can be found at 104 San Tomas Aquino Road, Campbell?",SELECT T1.label FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 104 AND T1.city = 'campbell' AND T2.street_name = 'san tomas aquino road',SELECT T1.`label Database: restaurant` FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = 2 WHERE T2.street_num = 104 AND T2.`city` = 'san tomas aquino road',-5.046279682430477,1,0,0,18 3541,Give the customer segment from the West region that orders the order ID CA-2011-108189.,SELECT DISTINCT T2.Segment FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' AND T1.`Order ID` = 'CA-2011-108189',SELECT DISTINCT T3.Segment FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'West' AND T2.Order ID = 'CA-2011-108189',2.2879683077432142,2,0,0,26 3552,Provide the phone number of the customer with the highest total price in an order.,SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey ORDER BY T1.o_totalprice DESC LIMIT 1,SELECT T3.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey ORDER BY T2.`totalprice` DESC LIMIT 1,-2.4697151299366564,3,0,0,29 3558,List the names of the countries with the below-average number of customers in ascending order of customer numbers.,SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey GROUP BY T2.n_name HAVING COUNT(T1.c_name) > ( SELECT COUNT(customer.c_name) / COUNT(DISTINCT nation.n_name) FROM customer INNER JOIN nation ON customer.c_nationkey = nation.n_nationkey ) ORDER BY COUNT(T1.c_name),"SELECT T3.n_name, CAST(SUM(IIF(T1.c_name = 'Customer', 1, 0)) AS REAL) * (1 - AVG(c_acctbal) ) AS T FROM customer AS T1",-3.3980528808039017,2,0,0,30 3568,Which region does Hoffman Estates belong to?,SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Hoffman Estates',SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 WHERE T1.TerritoryDescription = 'Hoffman Estates',1.4114551554995973,2,0,0,27 3570,How many transactions payment made by customer that is lower than 10000. Group the result by year.,"SELECT STRFTIME('%Y', t1.paymentDate), COUNT(t1.customerNumber) FROM payments AS t1 WHERE t1.amount < 10000 GROUP BY STRFTIME('%Y', t1.paymentDate)",SELECT COUNT(checkNumber) FROM payments WHERE customerNumber < 10000 AND amount > 10000,1.6143534023026966,1,0,0,30 3574,"In total, how many orders were shipped via United Package?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.`CompanyName` = 'United Package',0.37849044791528547,1,0,0,28 3587,"Find the store ID with more orders between ""Aurora"" and ""Babylon"" city.",SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.`City Name` = 'Aurora (Township)' OR T2.`City Name` = 'Babylon (Town)' GROUP BY T2.StoreID ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1,SELECT CASE WHEN T2.City Name = 'Aurora' AND T2.`City Name` = 'Babylon' END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2._StoreID = T1.StoreID WHERE T IS NOT NULL,1.187130585647025,8,0,0,30 3594,List the products that were ordered by Anne McFarland from the Western store.,SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Anne McFarland',SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Customer Name` = 'Anne McFarland' THEN T1.`Product ID` ELSE NULL END AS T FROM west_superstore ) WHERE T IS NOT NULL,-1.0907165709381863,1,0,0,29 3603,"Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25?","SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25","SELECT T4.CustomerID, T3.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.Quantity BETWEEN 100 AND 150 AND SalesPersonID BETWEEN 25",-3.5590082293432728,20,0,0,30 3604,Which country has the most number of suppliers whose account is in debt?,"SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T2.n_name ) AS T ORDER BY T.num LIMIT 1","SELECT T.n_name FROM ( SELECT IIF(T1.s_acctbal < 0, 1, 0)) AS T ORDER BY T.num LIMIT 1",-2.9792909325754726,2,0,0,29 3606,Which street has the most restaurants?,SELECT street_name FROM location GROUP BY street_name ORDER BY COUNT(street_name) DESC LIMIT 1,SELECT street_name FROM location ORDER BY COUNT(street_name) DESC LIMIT 1,3.991242410171497,1,0,0,29 3607,What is the title of the employee who handled order id 10270?,SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257,SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderID = 10270,-1.4795356146944405,2,0,0,27 3613,"For each Sales Channel, how many records are there in Sales Orders?","SELECT `Sales Channel`, COUNT(OrderNumber) FROM `Sales Orders` GROUP BY `Sales Channel`","SELECT `Sales Channel`, COUNT(OrderNumber) FROM `Sales Orders` GROUP BY `Customer ID`",0.26579567780835794,7,0,1,29 3614,"For each Sales Channel, what is the average _SalesTeamID?","SELECT `Sales Channel`, AVG(_SalesTeamID) FROM `Sales Orders` GROUP BY `Sales Channel`","SELECT `Sales Channel`, AVG(_SalesTeamID) FROM `Sales Orders` GROUP BY `Sales channel`",1.11144242407955,1,1,1,26 3616,How many records in Sales Orders were recorded in 2016?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2016%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2016%',2.5546621231758806,1,1,1,23 3618,List the distinct values of ProductID in the Products table.,SELECT DISTINCT ProductID FROM Products,SELECT DISTINCT ProductID FROM Products,3.64534150430876,1,1,1,15 3631,List the distinct values of p_type in the part table.,SELECT DISTINCT p_type FROM part,SELECT DISTINCT p_type FROM part,1.3086772514486797,1,1,1,19 3634,What is the highest p_retailprice in the part table?,SELECT MAX(p_retailprice) FROM part,SELECT MAX(p_retailprice) FROM part,4.774886548329124,1,1,1,19 3635,"For each p_type, how many records are there in part?","SELECT p_type, COUNT(p_partkey) FROM part GROUP BY p_type","SELECT P_type, COUNT(p_partkey) FROM part GROUP BY p_type",5.099719302865705,1,1,1,28 3649,What is the average l_discount in the lineitem table?,SELECT AVG(l_discount) FROM lineitem,SELECT AVG(l_discount) FROM lineitem,2.961204791621454,1,1,1,19 3653,"For each l_linestatus, what is the average l_discount?","SELECT l_linestatus, AVG(l_discount) FROM lineitem GROUP BY l_linestatus","SELECT l_linestatus, AVG(l_discount) FROM lineitem ORDER BY l_discount DESC LIMIT 1",0.3750668582099326,1,0,0,29 3658,List the distinct values of CompanyName in the Suppliers table.,SELECT DISTINCT CompanyName FROM Suppliers,SELECT DISTINCT CompanyName FROM Suppliers,4.5739967119286575,1,1,1,19 3665,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(DIFFERENCE) FROM Employees GROUP BY Country","SELECT Country, COUNT(DIFFERENCE) FROM Employees GROUP BY Country",5.657580059238104,1,1,1,23 3671,"For each CompanyName, how many records are there in Shippers?","SELECT CompanyName, COUNT(CompanyName) FROM Shippers GROUP BY CompanyName","SELECT CompanyName, COUNT(CompanyName) FROM Shippers GROUP BY CompanyName",4.720593201875388,1,1,1,21 3674,List the distinct values of city in the geographic table.,SELECT DISTINCT city FROM geographic,SELECT DISTINCT city FROM geographic,3.0429959203251267,1,1,1,17 3678,"For each city, what is the average county?","SELECT city, AVG(county) FROM geographic GROUP BY city","SELECT city, AVG(county) FROM geographic GROUP BY city",4.0111727236389,1,1,1,19 3680,How many records are in the nation table?,SELECT COUNT(n_nationkey) FROM nation,SELECT COUNT(n_nationkey) FROM nation,4.233836292305277,1,1,1,24 3705,What is the total SalesID in the Sales table?,SELECT SUM(SalesID) FROM Sales,SELECT SUM(SalesID) FROM Sales,5.135285213219256,1,1,1,20 3706,What is the highest SalesID in the Sales table?,SELECT MAX(SalesID) FROM Sales,SELECT MAX(SalesID) FROM Sales,4.895887793269589,1,1,1,21 3707,"For each CustomerID, how many records are there in Sales?","SELECT CustomerID, COUNT(CustomerID) FROM Sales GROUP BY CustomerID","SELECT CustomerID, COUNT(CustomerID) FROM Sales GROUP BY CustomerID",4.107549427355398,1,1,1,23 3710,What is the average Price in the Products table?,SELECT AVG(Price) FROM Products,SELECT AVG(Price) FROM Products,4.790907908673019,1,1,1,20 3729,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Client_ID","SELECT T2.Client_ID, COUNT(T1.middle), T2.`sex Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = TO_CLIENT_ID GROUP BY T2 . Client_ID",-7.876225850322424,1,0,0,25 3731,List the distinct values of addressLine1 in the customers table.,SELECT DISTINCT addressLine1 FROM customers,SELECT DISTINCT addressLine1 FROM customers,4.5739967119286575,1,1,1,16 3741,How many records in Sales Orders were recorded in 2018?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2018%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2018%',2.5546621231758806,1,1,1,25 3749,Which ProductSales has the highest Sales?,SELECT ProductSales FROM `Sales by Category` ORDER BY Sales DESC LIMIT 1,SELECT ProductSales FROM `Sales by Category` ORDER BY Sales DESC LIMIT 1,3.018814279176737,1,1,1,28 3750,How many records are in the Customers table?,SELECT COUNT(CustomerID) FROM Customers,SELECT COUNT(CustomerID) FROM Customers,4.281554795135653,1,1,1,20 3751,List the distinct values of CustomerID in the Customers table.,SELECT DISTINCT CustomerID FROM Customers,SELECT DISTINCT CustomerID FROM Customers,4.732550129264441,1,1,1,18 3753,How many Sales Orders records have matching records in Customers?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,0.9301827776553024,1,1,1,25 3756,"In 2023, how many joined records exist between Sales Orders and Customers?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2023%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2023%',4.378280799748311,1,1,1,25 3770,List the distinct values of Customer ID in the central_superstore table.,SELECT DISTINCT `Customer ID` FROM central_superstore,SELECT DISTINCT `Customer ID` FROM central_superstore,4.163623849728527,1,1,1,20 3773,List the distinct Customer ID values linked to people.,SELECT DISTINCT T2.`Customer ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T1.`Customer Name` = 'Personal',1.4601546924365472,1,0,0,28 3779,Which ps_availqty has the highest ps_supplycost?,SELECT ps_availqty FROM partsupp ORDER BY ps_supplycost DESC LIMIT 1,SELECT ps_availqty FROM partsupp ORDER BY ps_supplycost DESC LIMIT 1,3.025628158642875,1,1,1,22 3785,List the distinct values of address_1 in the client table.,SELECT DISTINCT address_1 FROM client,SELECT DISTINCT address_1 FROM client,4.508142555656296,1,1,1,17 3788,How many records in events were recorded in 2015?,SELECT COUNT(`Consumer disputed?`) FROM events WHERE `Timely response?` LIKE '2015%',SELECT COUNT(`Consumer disputed?`) FROM events WHERE `Timely response?` LIKE '2015%',5.356133280361847,1,1,1,24 3789,How many records are in the east_superstore table?,SELECT COUNT(Order) FROM east_superstore,SELECT COUNT(Order) FROM east_superstore,4.472691083849381,1,1,1,20 3790,"For each Customer ID, how many records are there in east_superstore?","SELECT `Customer ID`, COUNT(Order) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(Order) FROM east_superstore GROUP BY `%Customer ID`",1.5921414731069579,6,0,1,28 3794,"For each Segment, how many east_superstore records are linked?","SELECT T2.Segment, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.Segment","SELECT T2.Segment, COUNT(T1.`Order Date Database: superstore`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer IDs` GROUP BY T2 . Segment",-7.263957854878354,22,0,0,28 3796,"For each Country, how many records are there in Suppliers?","SELECT Country, COUNT(SupplierID) FROM Suppliers GROUP BY Country","SELECT Country, COUNT(SupplierID) FROM Suppliers GROUP BY Country",5.657580059238104,1,1,1,19 3799,How many records in events were recorded in 2023?,SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2023%',SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2023%',4.86473858191754,1,1,1,22 3806,What is the total SalesTeamID in the Sales Team table?,SELECT SUM(SalesTeamID) FROM `Sales Team`,SELECT SUM(SalesTeamID) FROM `Sales Team`,5.311379135689884,1,1,1,24 3810,How many Sales Orders records have matching records in Sales Team?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID,"SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`, T2 ON T1._SalesTeamID = T2.Sales TeamID",-1.0890613681582468,6,0,1,27 3833,"For each Product ID, how many records are there in product?","SELECT `Product ID`, COUNT(`Product ID`) FROM product GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM product GROUP BY `Product id`",2.804578304027941,9,1,1,24 3836,"For each Customer ID, how many south_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.`Customer ID`, COUNT(T1.Customer ID) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID GROUP BY T2 `Customer ID`",-1.4773185811491831,8,0,0,30 3839,"For each Product ID, how many south_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product ID`","SELECT T2.`Product ID`, COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2 `Product ID` GROUP BY T2.Product ID",-5.102672790771479,8,0,0,28 3842,List the distinct RegionDescription values linked to Territories.,SELECT DISTINCT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID,SELECT DISTINCT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID,4.397643833972541,2,1,1,26 3844,List the distinct _CustomerID values linked to Customers.,SELECT DISTINCT T2._CustomerID FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,SELECT DISTINCT T2(_CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,0.5385033336650287,1,0,1,29 3848,"In 2019, how many joined records exist between Sales Orders and Sales Team?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID WHERE T1.ProcuredDate LIKE '2019%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2019%',2.6779675213447547,1,0,0,30 3857,List the distinct values of productCode in the orderdetails table.,SELECT DISTINCT productCode FROM orderdetails,SELECT DISTINCT productCode FROM orderdetails,4.22603725091863,1,1,1,17 3868,How many records are in the products table?,SELECT COUNT(MSRP) FROM products,SELECT COUNT(MSRP) FROM products,1.842977802856676,1,1,1,19 3872,What is the highest quantityInStock in the products table?,SELECT MAX(quantityInStock) FROM products,SELECT MAX(quantityInStock) FROM products,4.568769308283359,1,1,1,18 3873,"For each productCode, how many records are there in products?","SELECT productCode, COUNT(MSRP) FROM products GROUP BY productCode","SELECT productCode, COUNT(MSRP) FROM products GROUP BY productCode",4.58756171296914,1,1,1,17 3879,"For each productCode, how many orderdetails records are linked?","SELECT T2.productCode, COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode GROUP BY T2.productCode","SELECT T2.`productCode`, COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.ProductCode GROUP BY T2._productCode",-1.1727644395407308,1,0,0,26 3881,"For each Sub-Category, how many records are there in product?","SELECT `Sub-Category`, COUNT(`Product ID`) FROM product GROUP BY `Sub-Category`","SELECT `sub-Category`, COUNT(`Product ID`) FROM product GROUP BY `Sub-Category`",-0.8978850115434127,1,1,1,24 3883,How many records are in the Order Details table?,SELECT COUNT(OrderID) FROM `Order Details`,SELECT COUNT(OrderID) FROM `Order Details`,4.2741468966406035,1,1,1,21 3889,"For each EmployeeID, how many records are there in Employees?","SELECT EmployeeID, COUNT(EmployeeID) FROM Employees GROUP BY EmployeeID","SELECT EmployeeID, COUNT(EmployeeID) FROM Employees GROUP BY employeeID",-1.7600899651209514,15,1,1,24 3891,"For each TerritoryID, how many records are there in EmployeeTerritories?","SELECT TerritoryID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY TerritoryID","SELECT TerritoryID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY Territoryid",0.4178911840339029,3,1,1,26 3895,"For each EmployeeID, how many records are there in Employees?","SELECT EmployeeID, COUNT(MiddleInitial) FROM Employees GROUP BY EmployeeID","SELECT EmployeeID, COUNT(MiddleInitial) FROM Employees GROUP BY Employeeid",2.687193832301921,2,1,1,26 3905,Which CompanyName has the highest Amount?,SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY Amount DESC LIMIT 1,SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY Amount DESC LIMIT 1,2.5757005743797103,1,1,1,28 3912,How many records are in the production table?,SELECT COUNT(ID) FROM production,SELECT COUNT(ID) FROM production,1.842977802856676,1,1,1,21 3917,How many records are in the district table?,SELECT COUNT(district_id) FROM district,SELECT COUNT(district_id) FROM district,4.281554795135653,1,1,1,25 3919,List the distinct first values linked to district.,SELECT DISTINCT T2.first FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.first FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,7.288114550342641,1,1,1,24 3921,List the distinct values of customerNumber in the payments table.,SELECT DISTINCT customerNumber FROM payments,SELECT DISTINCT customerNumber FROM payments,4.468774599445206,1,1,1,14 3922,What is the average amount in the payments table?,SELECT AVG(amount) FROM payments,SELECT AVG(amount) FROM payments,2.2020147133380097,1,1,1,18 3930,"In 2020, how many joined records exist between Customers and Sales Orders?",SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2020%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2020%',1.0573735948651346,7,1,1,29 3931,"In 2019, how many joined records exist between Sales Orders and Products?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2019%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2019%',3.9900040784658684,1,1,1,28 3933,"For each City, how many Products records are linked?","SELECT T2.City, COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.City","SELECT T2.City, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` GROUP BY T2 . City",-8.219417575924702,2,0,0,29 3934,How many records are in the callcenterlogs table?,SELECT COUNT(server) FROM callcenterlogs,SELECT COUNT(server) FROM callcenterlogs,4.472691083849381,1,1,1,19 3936,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(server) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(server) FROM callcenterlogs GROUP BY `rand client`",1.0139516041251873,5,1,1,27 3938,List the distinct values of City in the Customers table.,SELECT DISTINCT City FROM Customers,SELECT DISTINCT City FROM Customers,5.1121551324071595,1,1,1,18 3939,List the distinct values of CustomerID in the Orders table.,SELECT DISTINCT CustomerID FROM Orders,SELECT DISTINCT CustomerID FROM Orders,3.7368875748870978,1,1,1,17 3946,"For each street_name, how many records are there in location?","SELECT street_name, COUNT(id_restaurant) FROM location GROUP BY street_name","SELECT Street_name, COUNT(id_restaurant) FROM location GROUP BY street_name",0.7577983375802315,6,1,1,23 3951,"For each Customer ID, how many records are there in central_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer `, COUNT(`Customer ID`) FROM central_superstore GROUP BY `Customer ID`",-0.9816810196316278,5,0,1,28 3954,How many Employees records have matching records in Orders?,SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EamingID,-7.281012478962479,20,0,0,27 3955,"For each EmployeeID, how many Employees records are linked?","SELECT T2.EmployeeID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.EmployeeID","SELECT T2.EmployeeID, COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.`Employee ID` = T2.`ElemployeeID` GROUP BY T2 . EmployeeID",-7.640386655432239,8,0,0,27 3956,List the distinct values of food_type in the generalinfo table.,SELECT DISTINCT food_type FROM generalinfo,SELECT DISTINCT food_type FROM generalinfo,4.5739967119286575,1,1,1,20 3966,What is the average County in the Store Locations table?,SELECT AVG(County) FROM `Store Locations`,SELECT AVG(County) FROM `Store Locations`,4.585379189987882,1,1,1,25 3971,Which Type has the highest County?,SELECT Type FROM `Store Locations` ORDER BY County DESC LIMIT 1,SELECT Type FROM `Store Locations` ORDER BY County DESC LIMIT 1,4.313333184026628,1,1,1,28 3976,"In 2020, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2020%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2020%',1.7299368067526704,3,1,1,24 3978,How many records are in the supplier table?,SELECT COUNT(s_suppkey) FROM supplier,SELECT COUNT(s_suppkey) FROM supplier,4.233836292305277,1,1,1,24 3995,"For each city, how many employees records are linked?","SELECT T2.city, COUNT(T1.officeCode) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode GROUP BY T2.city","SELECT T2.city, COUNT(T1.employeeNumber) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2 . officeCode GROUP BY T2.'city'",1.27853488904202,20,0,0,27 4003,"For each CustomerID, how many records are there in Customers?","SELECT CustomerID, COUNT(MiddleInitial) FROM Customers GROUP BY CustomerID","SELECT CustomerID, COUNT(MiddleInitial) FROM Customers GROUP BY CustomerID",4.258328108605211,1,1,1,18 4009,List the distinct EmployeeID values linked to Customers.,SELECT DISTINCT T2.EmployeeID FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.MiddleInitial,SELECT DISTINCT T2.EmployeeID FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2 .MiddleInitial,-0.7472858506014236,23,1,1,27 4015,"For each Customer ID, how many records are there in west_superstore?","SELECT `Customer ID`, COUNT(`Order ID`) FROM west_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Order ID`) FROM west_superstore GROUP BY `Customer id`",2.902552862667913,4,1,1,25 4016,List the distinct values of State in the people table.,SELECT DISTINCT State FROM people,SELECT DISTINCT State FROM people,3.537048448089766,1,1,1,20 4021,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.Customer ID FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID`,0.7755255050241875,1,0,0,27 4028,"In 2019, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2019%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2019%',1.7299368067526704,3,1,1,24 4031,"In 2020, how many joined records exist between Sales Orders and Customers?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2020%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2020%',4.378280799748311,1,1,1,25 4035,How many records are in the Employees table?,SELECT COUNT(ReportsTo) FROM Employees,SELECT COUNT(ReportsTo) FROM Employees,4.508889799613256,1,1,1,22 4036,"For each EmployeeID, how many records are there in Employees?","SELECT EmployeeID, COUNT(ReportsTo) FROM Employees GROUP BY EmployeeID","SELECT EmployeeID, COUNT(ReportsTo) FROM Employees GROUP BY Employeeid",2.1430605896349575,3,1,1,21 4037,How many records are in the central_superstore table?,SELECT COUNT(`Product ID`) FROM central_superstore,SELECT COUNT(`Product ID`) FROM central_superstore,2.6802323237914716,1,1,1,19 4046,How many records in callcenterlogs were recorded in 2019?,SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',5.5414186337814915,1,1,1,25 4052,How many records in payments were recorded in 2017?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2017%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2017%',4.198241534572536,1,1,1,22 4055,"For each employeeNumber, how many offices records are linked?","SELECT T2.employeeNumber, COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode GROUP BY T2.employeeNumber","SELECT T2.employeeNumber, COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2._officeCode GROUP BY T2 . employeeNumber",-1.8647225340407554,1,0,0,27 4056,How many records are in the east_superstore table?,SELECT COUNT(`Product ID`) FROM east_superstore,SELECT COUNT(`Product ID`) FROM east_superstore,4.058955478397152,1,1,1,23 4063,"For each Category, how many east_superstore records are linked?","SELECT T2.Category, COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Category","SELECT T2.Category, COUNT(T1.Product ID) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Category",0.09987911694449442,6,0,0,26 4066,List the distinct values of Address in the Customers table.,SELECT DISTINCT Address FROM Customers,SELECT DISTINCT Address FROM Customers,3.7368875748870978,1,1,1,15 4076,List the distinct division values linked to client.,SELECT DISTINCT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,6.850182465049296,1,1,1,20 4081,"In 2015, how many joined records exist between central_superstore and product?",SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2015%',SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID` WHERE T1.Ship LIKE '2015%',0.5370390419152429,4,1,1,25 4085,"For each Customer ID, how many records are there in west_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM west_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM west_superstore GROUP BY `Customer id`",1.8612544399969078,7,1,1,27 4095,Which ProductID has the highest Discount?,SELECT ProductID FROM `Order Details` ORDER BY Discount DESC LIMIT 1,SELECT ProductID FROM `Order Details` ORDER BY Discount DESC LIMIT 1,2.751315914611514,1,1,1,25 4099,How many records in Orders were recorded in 2018?,SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2018%',SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2018%',4.875700360326731,1,1,1,24 4109,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(SupplierID) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(SupplierID) FROM Products GROUP BY ProductName",4.801190791215032,1,1,1,19 4112,How many Order Details records have matching records in Products?,SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,0.16065463959083184,12,0,0,29 4120,List the distinct CustomerID values linked to Sales.,SELECT DISTINCT T2.CustomerID FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2.`MiddleInitial`,0.2179925729625553,2,0,0,29 4124,List the distinct CustomerID values linked to Employees.,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2.MiddleInitial,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2 . MiddleInitial,3.248187168618954,5,1,1,26 4135,How many records are in the events table?,SELECT COUNT(`Consumer complaint narrative`) FROM events,SELECT COUNT(`Consumer complaint narrative`) FROM events,3.763892544010846,1,1,1,22 4138,Which CategoryID has the highest UnitPrice?,SELECT CategoryID FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT CategoryID FROM Products ORDER BY UnitPrice DESC LIMIT 1,3.2321056184448573,1,1,1,22 4143,How many records are in the callcenterlogs table?,SELECT COUNT(priority) FROM callcenterlogs,SELECT COUNT(priority) FROM callcenterlogs,4.829372047253272,1,1,1,20 4144,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(priority) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(priority) FROM callcenterlogs GROUP BY `rand client`",0.8552437623717581,4,1,1,27 4150,How many records are in the west_superstore table?,SELECT COUNT(`Product ID`) FROM west_superstore,SELECT COUNT(`Product ID`) FROM west_superstore,4.058955478397152,1,1,1,21 4154,"For each Product ID, how many west_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product ID`","SELECT T2.Product ID, COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.9246971223463454,6,0,0,27 4155,List the distinct values of car_name in the data table.,SELECT DISTINCT car_name FROM data,SELECT DISTINCT car_name FROM data,1.7909536146026408,1,1,1,16 4156,"For each car_name, how many records are there in data?","SELECT car_name, COUNT(ID) FROM data GROUP BY car_name","SELECT car_name, COUNT(ID) FROM data GROUP BY Car_name",-1.464514208120316,5,1,1,27 4164,How many records are in the Order Details table?,SELECT COUNT(Details) FROM `Order Details`,SELECT COUNT(Details) FROM `Order Details`,4.2741468966406035,1,1,1,26 4167,What is the highest Quantity in the Order Details table?,SELECT MAX(Quantity) FROM `Order Details`,SELECT MAX(Quantity) FROM `Order Details`,4.872540310247595,1,1,1,20 4173,"For each Category, how many east_superstore records are linked?","SELECT T2.Category, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Category","SELECT T2.Category, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`ProductID` = T2.`Product ID` GROUP BY T2._Category",-0.12177965259222627,10,0,0,28 4178,What is the average County for joined Store Locations and Sales Orders records?,SELECT AVG(T1.County) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID,SELECT AVG(T1.County) FROM `Store Locations` AS T1 INNER JOIN Sales Orders AS T2 ON T1.StoreID = T2._StoreID,-1.871698066183918,5,0,0,27 4179,"In 2019, how many joined records exist between Store Locations and Sales Orders?",SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID WHERE T1.`Time Zone` LIKE '2019%',"SELECT COUNT(T1.StoreID) FROM `Store Locations`"" AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`Store ID` = T2._StoreID WHERE T2.ProcuredDate LIKE '2019%'",-1.2089783088464856,7,0,0,30 4181,"In 2023, how many joined records exist between Sales Orders and Sales Team?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID WHERE T1.ProcuredDate LIKE '2023%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID WHERE T2.ProcuredDate LIKE '2023%',3.5480352682555085,1,0,0,30 4184,How many records in orders were recorded in 2019?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2019%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2019%',4.775940017408425,1,1,1,22 4193,"For each CategoryID, how many Products records are linked?","SELECT T2.CategoryID, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID GROUP BY T2.CategoryID","SELECT T2.CategoryID, COUNT(T1.`UnitPrice Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = STRFTIME('%Y', T2.`ProductID`) GROUP BY T2 .CategoryID",-7.510177354642809,29,0,0,29 4194,How many Products records have matching records in Order Details?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-0.5347263173764019,7,0,0,27 4200,"In 2019, how many joined records exist between west_superstore and product?",SELECT COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2019%',SELECT COUNT(T1.`Product ID`) FROM west_superstore AS T1 WHERE T1.`Ship Date` LIKE '2019%',-0.19678905845844968,2,0,1,26 4207,How many records are in the west_superstore table?,SELECT COUNT(Order) FROM west_superstore,SELECT COUNT(Order) FROM west_superstore,4.472691083849381,1,1,1,21 4211,"In 2020, how many joined records exist between west_superstore and product?",SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2020%',SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T1.Ship LIKE '2020%',0.2789030847211518,7,0,1,20 4219,How many records in Store Locations were recorded in 2023?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2023%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2023%',4.531000601842846,1,1,1,27 4223,List the distinct city values linked to location.,SELECT DISTINCT T2.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.4005487274366257,14,1,1,29 4231,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Client_ID","SELECT T2.Client_ID, COUNT(T1.`sex Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = STRFTIME('%Y', T2.`Date`, T3.`Submitted via`) GROUP BY T2._Client_ ID",-7.3241872291605326,21,0,0,25 4237,How many records in central_superstore were recorded in 2020?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2020%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2020%',1.3761424421645654,1,1,1,24 4239,"For each Address, how many records are there in Customers?","SELECT Address, COUNT(CompanyName) FROM Customers GROUP BY Address","SELECT Address, COUNT(CompanyName) FROM Customers GROUP BY Address",4.58756171296914,1,1,1,23 4252,How many central_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,-0.321877554503208,9,1,1,24 4258,How many records are in the reviews table?,SELECT COUNT(district_id) FROM reviews,SELECT COUNT(district_id) FROM reviews,4.508889799613256,1,1,1,17 4261,List the distinct Product values linked to district.,SELECT DISTINCT T2.Product FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.Product FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2 . district_id,6.850182465049296,1,1,1,18 4270,Which Product ID has the highest Profit?,SELECT `Product ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,SELECT `Product ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,2.7510811090561593,1,1,1,26 4284,"For each Sub-issue, how many client records are linked?","SELECT T2.`Sub-issue`, COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.`Sub-issue`","SELECT T2.`Sub-issue`, COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T1.`sub-issue`",-2.76631141855311,2,0,0,27 4290,What is the average Profit in the central_superstore table?,SELECT AVG(Profit) FROM central_superstore,SELECT AVG(Profit) FROM central_superstore,3.9767391617997983,1,1,1,19 4295,What is the average Profit for joined central_superstore and product records?,SELECT AVG(T1.Profit) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T2.Profit) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Customer ID` = T2.`Product ID`,-0.9798962054282163,2,0,1,28 4296,How many records in production were recorded in 2015?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2015%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2015%',4.69216415425934,1,1,1,26 4306,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(client_id) FROM client GROUP BY client_id","SELECT Client_id, COUNT(client_id) FROM client GROUP BY client_id",-0.2568773873338699,9,1,1,20 4307,How many client records have matching records in events?,SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.CLIENT_ID) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,0.9764785109928789,19,1,1,22 4310,What is the total Sales in the west_superstore table?,SELECT SUM(Sales) FROM west_superstore,SELECT SUM(Sales) FROM west_superstore,4.290373418240225,1,1,1,20 4312,"For each Customer ID, what is the average Sales?","SELECT `Customer ID`, AVG(Sales) FROM west_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Sales) FROM west_superstore GROUP BY `Customer IDs`",0.7744649757648322,4,0,1,28 4314,How many east_superstore records have matching records in west_superstore?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM east_superstore AS T1 INNER JOIN west_superStore AS T2 ON T1.`Customer ID` = T2.`CustomerID`,-4.261636261633488,14,0,0,28 4317,How many records in central_superstore were recorded in 2018?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2018%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2018%',5.5414186337814915,1,1,1,24 4318,"In 2019, how many joined records exist between people and central_superstore?",SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.`Ship Mode` LIKE '2019%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T2.`Ship Mode` LIKE '2019%',-0.34235076061228686,1,0,0,30 4319,How many records in payments were recorded in 2022?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2022%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2022%',4.198241534572536,1,1,1,21 4322,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Card ID` = T2.` Customer ID` GROUP BY T2._Customer ID",-1.3849953030536195,8,0,0,28 4346,"For each country, how many records are there in production?","SELECT country, COUNT(ID) FROM production GROUP BY country","SELECT country, COUNT(ID) FROM production GROUP BY country",5.573540162828874,1,1,1,16 4347,List the distinct country values linked to data.,SELECT DISTINCT T2.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,3.401408466730224,3,1,1,24 4351,How many records in reviews were recorded in 2019?,SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2019%',SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2019%',4.69216415425934,1,1,1,24 4353,How many Products records have matching records in Sales Orders?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,SELECT COUNT(T1.`Product ID`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,0.9254314422500941,7,0,1,27 4355,What is the average _SalesTeamID for joined Products and Sales Orders records?,SELECT AVG(T2._SalesTeamID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,SELECT AVG(T2._SalesTeamID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,2.7880758779292294,1,1,1,28 4361,"In 2018, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2018%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2018%',1.7299368067526704,3,1,1,24 4370,How many events records have matching records in client?,SELECT COUNT(T1.Client_ID) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,SELECT COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,4.373624308676881,2,0,0,22 4373,"For each City, how many records are there in Customers?","SELECT City, COUNT(ContactTitle) FROM Customers GROUP BY City","SELECT City, COUNT(ContactTitle) FROM Customers GROUP BY City",5.101483010172825,1,1,1,20 4376,What is the highest Discount in the west_superstore table?,SELECT MAX(Discount) FROM west_superstore,SELECT MAX(Discount) FROM west_superstore,4.568769308283359,1,1,1,20 4385,How many records in Employees were recorded in 2016?,SELECT COUNT(FirstName) FROM Employees WHERE BirthDate LIKE '2016%',SELECT COUNT(FirstName) FROM Employees WHERE BirthDate LIKE '2016%',4.775940017408425,1,1,1,23 4386,"In 2016, how many joined records exist between Sales Orders and Products?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2016%',3.9900040784658684,1,1,1,25 4388,List the distinct values of ContactName in the Customers table.,SELECT DISTINCT ContactName FROM Customers,SELECT DISTINCT ContactName FROM Customers,4.5739967119286575,1,1,1,14 4397,List the distinct Company response to consumer values linked to callcenterlogs.,SELECT DISTINCT T2.`Company response to consumer` FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.Company response to consumer FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID`,-0.8528226712463025,2,0,0,28 4398,"For each Company response to consumer, how many callcenterlogs records are linked?","SELECT T2.`Company response to consumer`, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` GROUP BY T2.`Company response to consumer`","SELECT T2.`Company response to consumer`, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T 2.`Com plaint ID` GROUP BY T2.Company responseto consumer`",-4.99495956110559,8,0,0,21 4399,What is the average UnitPrice in the Order Details table?,SELECT AVG(UnitPrice) FROM `Order Details`,SELECT AVG(UnitPrice) FROM `Order Details`,4.403180757019737,1,1,1,19 4405,How many records in events were recorded in 2022?,SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2022%',SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2022%',2.4614983261766845,2,1,1,25 4406,How many records in events were recorded in 2016?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2016%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2016%',4.531000601842846,1,1,1,24 4408,"In 2016, how many joined records exist between Products and Sales Orders?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.ProcuredDate LIKE '2016%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2016%',0.6702568306168434,13,1,1,29 4412,What is the highest Sales in the south_superstore table?,SELECT MAX(Sales) FROM south_superstore,SELECT MAX(Sales) FROM south_superstore,3.6592814209018685,1,1,1,20 4416,"For each Region, how many records are there in people?","SELECT Region, COUNT(`Customer ID`) FROM people GROUP BY Region","SELECT Region, COUNT(`Customer ID`) FROM people GROUP BY Region",3.634229031461111,1,1,1,22 4421,What is the average Quantity for joined Products and Order Details records?,SELECT AVG(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-1.151437142981934,4,0,1,26 4428,"In 2015, how many joined records exist between Employees and Orders?",SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCity LIKE '2015%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.ShipCity LIKE '2015%',-1.350648979341596,5,0,0,30 4429,How many records in lineitem were recorded in 2023?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2023%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2023%',4.412960505279923,1,1,1,24 4435,"For each type, how many records are there in callcenterlogs?","SELECT type, COUNT(server) FROM callcenterlogs GROUP BY type","SELECT type, COUNT(server) FROM callcenterlogs GROUP BY type",5.319414557497681,1,1,1,20 4439,"In 2023, how many joined records exist between central_superstore and product?",SELECT COUNT(T1.Order) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2023%',SELECT COUNT(T1.`Order Date`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Region = '2023',-0.16654770774856092,9,0,1,22 4443,How many records are in the Employees table?,SELECT COUNT(Title) FROM Employees,SELECT COUNT(Title) FROM Employees,0.4565143531634555,1,1,1,24 4446,Which ProductID has the highest UnitPrice?,SELECT ProductID FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT ProductID FROM Products ORDER BY UnitPrice DESC LIMIT 1,3.2833217166913276,1,1,1,24 4452,How many records in orders were recorded in 2015?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2015%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2015%',4.860603963746542,1,1,1,23 4457,What is the average Quantity for joined west_superstore and people records?,SELECT AVG(T1.Quantity) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Quantity) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID`,0.8768377066453473,7,1,1,27 4467,"In 2020, how many joined records exist between data and production?",SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year LIKE '2020%',SELECT COUNT(T1.`ID`) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '2020%',-0.7091999165242282,7,0,0,29 4476,"For each Region, how many records are there in east_superstore?","SELECT Region, COUNT(`Customer ID`) FROM east_superstore GROUP BY Region","SELECT Region, COUNT(`Customer ID`) FROM east_superstore GROUP BY Region",2.2163750566524576,1,1,1,20 4479,What is the average Discount for joined east_superstore and people records?,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`Customer ID`,0.4283185646571653,4,1,1,28 4480,How many east_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,3.274764308310278,5,1,1,24 4499,What is the total UnitPrice in the Invoices table?,SELECT SUM(UnitPrice) FROM Invoices,SELECT SUM(UnitPrice) FROM Invoices,5.643234032997981,1,1,1,18 4506,"For each Region, how many east_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN products AS T2 ON T1.`Customer ID` = T2.`Product ID` GROUP BY T2 . Region",-1.3604918198435962,7,0,0,30 4508,List the distinct ProductID values linked to Orders.,SELECT DISTINCT T2.ProductID FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,SELECT DISTINCT T3.ProductID FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID` = T2.OrderID,-0.7606870863422448,2,0,0,30 4512,What is the average Quantity for joined west_superstore and product records?,SELECT AVG(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product IDs`,0.5559205771808811,6,0,1,26 4513,"For each Category, how many west_superstore records are linked?","SELECT T2.Category, COUNT(T1.`Product ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Category","SELECT T2.Category, COUNT(T1.Product ID) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Category",0.04849297291615156,5,0,0,26 4522,What is the average Discount in the central_superstore table?,SELECT AVG(Discount) FROM central_superstore,SELECT AVG(Discount) FROM central_superstore,4.6819763872133136,1,1,1,19 4529,How many records in Orders were recorded in 2023?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2023%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2023%',4.69216415425934,1,1,1,23 4534,How many records in Orders were recorded in 2021?,SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2021%',SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2021%',5.226797006773571,1,1,1,22 4535,"In 2017, how many joined records exist between Employees and Orders?",SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry LIKE '2017%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.ShipCountry LIKE '2017%',-0.6047357680050972,3,0,0,30 4537,How many events records have matching records in client?,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,1.9683945007579653,1,1,1,24 4538,"For each client_id, how many events records are linked?","SELECT T2.client_id, COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id GROUP BY T2.client_id","SELECT T2.client_id, COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2 client_id GROUP BY T2._client_ID",-1.6863011732407376,12,0,0,29 4539,"In 2021, how many joined records exist between events and callcenterlogs?",SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.ser_time LIKE '2021%',SELECT COUNT(T1.Complaint ID) FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.Client_ID = T2.client_id WHERE T2.`ser_time` LIKE '2021%',-0.640026194611921,12,0,0,22 4542,List the distinct acceleration values linked to production.,SELECT DISTINCT T2.acceleration FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.acceleration FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,3.5781766897849927,3,1,1,26 4549,"For each ProductName, what is the average UnitPrice?","SELECT ProductName, AVG(UnitPrice) FROM Products GROUP BY ProductName","SELECT ProductName, AVG(UnitPrice) FROM Products GROUP BY ProductName",4.311842978965913,1,1,1,19 4553,How many records are in the geographic table?,SELECT COUNT(IIF) FROM geographic,SELECT COUNT(IIF) FROM geographic,-0.15559118012075676,2,1,1,24 4557,How many records in Orders were recorded in 2015?,SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2015%',SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2015%',5.226797006773571,1,1,1,24 4567,List the distinct Product values linked to callcenterlogs.,SELECT DISTINCT T2.Product FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.Product FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Complaint ID`,2.2843269942518796,1,0,0,27 4568,"For each Product, how many callcenterlogs records are linked?","SELECT T2.Product, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` GROUP BY T2.Product","SELECT T2.Product, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Combo ID` = T2.`Combaint ID` GROUP BY T1.Product",0.4094435487843726,4,0,0,30 4569,"In 2022, how many joined records exist between Sales Orders and Store Locations?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2022%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2022%',1.7299368067526704,3,1,1,23 4570,How many records in payments were recorded in 2023?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2023%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2023%',4.198241534572536,1,1,1,24 4576,List the distinct state values linked to district.,SELECT DISTINCT T2.state FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.state FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,7.288114550342641,1,1,1,21 4578,"In 2019, how many joined records exist between Sales Orders and Customers?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2019%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2019%',4.378280799748311,1,1,1,25 4579,"In 2018, how many joined records exist between Sales Orders and Sales Team?",SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID WHERE T1.ProcuredDate LIKE '2018%',"SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`"" AS T2 ON T1._SalesTeamID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2018%'",-0.27887426505603213,8,0,1,30 4581,How many records in Shippers were recorded in 2020?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2020%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2020%',4.412960505279923,1,1,1,27 4586,"For each food_type, how many records are there in generalinfo?","SELECT food_type, COUNT(review) FROM generalinfo GROUP BY food_type","SELECT food_type, COUNT(review) FROM generalinfo GROUP BY Food_TYPE",-1.8005549322613752,24,1,1,27 4592,"In 2019, how many joined records exist between central_superstore and product?",SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2019%',SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID` WHERE T1.Ship LIKE '2019%',0.8118583155552613,5,1,1,27 4594,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(ReorderLevel) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(ReorderLevel) FROM Products GROUP BY ProductName",4.258328108605211,1,1,1,18 4595,How many records in Orders were recorded in 2017?,SELECT COUNT(CustomerID) FROM Orders WHERE RequiredDate LIKE '2017%',SELECT COUNT(CustomerID) FROM Orders WHERE RequiredDate LIKE '2017%',4.412960505279923,1,1,1,25 4602,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(UnitsInStock) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(UnitsInStock) FROM Products GROUP BY CategoryID",4.801190791215032,1,1,1,18 4615,"For each City, how many records are there in Customers?","SELECT City, COUNT(Fax) FROM Customers GROUP BY City","SELECT City, COUNT(Fax) FROM Customers GROUP BY City",5.009754053331397,1,1,1,20 4617,"In 2017, how many joined records exist between Order Details and Orders?",SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.OrderID = T2.OrderID WHERE T2.OrderDate LIKE '2017%',SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.ProductID LIKE '2017%',-3.5784570967956304,7,0,0,28 4622,"In 2021, how many joined records exist between callcenterlogs and events?",SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.`Date received` LIKE '2021%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 WHERE T1.`Date received` LIKE '2021%',-1.2002809607880327,3,0,0,29 4626,How many records in Orders were recorded in 2016?,SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2016%',SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2016%',5.226797006773571,1,1,1,25 4627,"In 2018, how many joined records exist between Employees and Orders?",SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry LIKE '2018%',SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID LIKE '2018%',-2.062271720369886,8,0,0,26 4629,"In 2020, how many joined records exist between Orders and Order Details?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.OrderDate LIKE '2020%',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.EmployeeID = T2.`OrderID` WHERE T2.OrderDate LIKE '2020%',-1.1313710884287809,3,0,0,30 4632,Which region has the highest county?,SELECT region FROM geographic ORDER BY county DESC LIMIT 1,SELECT region FROM geographic ORDER BY county DESC LIMIT 1,4.988260417689312,1,1,1,29 4638,List the distinct Stars values linked to district.,SELECT DISTINCT T2.Stars FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.Stars FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2 . district_id,7.235395858587943,1,1,1,19 4664,"For each Customer ID, how many central_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.`Customer ID`, COUNT(T1.`Product ID Database: superstore`) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Card ID` = T2.Customer ID GROUP BY T2.'Customer ID",-7.236875306520875,22,0,0,29 4670,How many records in events were recorded in 2019?,SELECT COUNT(Consumer) FROM events WHERE Timely LIKE '2019%',SELECT COUNT(Consumer) FROM events WHERE Timely LIKE '2019%',4.875700360326731,1,1,1,24 4677,"For each Region, how many south_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2._Region",-1.8748985306549413,7,0,0,26 4679,What is the total Quantity in the east_superstore table?,SELECT SUM(Quantity) FROM east_superstore,SELECT SUM(Quantity) FROM east_superstore,4.62380479920519,1,1,1,19 4684,What is the average Quantity for joined east_superstore and product records?,SELECT AVG(T1.Quantity) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Quantity) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product I`,1.858689651580863,7,0,1,27 4697,"For each Region, how many records are there in central_superstore?","SELECT Region, COUNT(`Customer ID`) FROM central_superstore GROUP BY Region","SELECT Region, COUNT(Discount) FROM central_superstore GROUP BY Region",1.7087050757004802,2,0,1,23 4698,"For each Region, what is the average Discount?","SELECT Region, AVG(Discount) FROM central_superstore GROUP BY Region","SELECT Region, AVG(Discount) FROM central_superstore GROUP BY Region",4.836608648850474,1,1,1,18 4699,"For each Region, how many people records are linked?","SELECT T2.Region, COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Customer ID) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`CustomerID` = T2.`Customer ID` GROUP BY T2 . Region",-0.7917905835734744,4,0,0,28 4700,"For each street_name, how many records are there in location?","SELECT street_name, COUNT(street_name) FROM location GROUP BY street_name","SELECT Street_name, COUNT(street_name) FROM location GROUP BY street_name",4.720593201875388,1,1,1,23