qid,question,target_sql,ml_selected_sql,ml_score,ml_candidate_rank,ml_exact_match,candidate_contains_target,num_candidates 0,How many customers who are in Norway and have credit line under 220000?,SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway',SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway',1.064777700616938,2,1,1,29 1,How many records are in the callcenterlogs table?,SELECT COUNT(call_id) FROM callcenterlogs,SELECT COUNT(call_id) FROM callcenterlogs,4.858577923200564,1,1,1,18 2,List by ID all sales teams that have sold products at a 10% discount in store.,SELECT DISTINCT T FROM ( SELECT CASE WHEN `Discount Applied` = '0.1' AND `Sales Channel` = 'In-Store' THEN _SalesTeamID ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT _SalesTeamID FROM `Sales Orders` WHERE `Discount Applied` = '10%',0.7402727317885769,1,0,0,30 3,What percentage of customers engaged in the household segment are from Iran?,"SELECT CAST(SUM(IIF(T2.n_name = 'IRAN', 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD'",SELECT CAST(COUNT(CASE WHEN T2.n_name = 'HOUSEHOLD' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1._nationkey = T2Nationkey WHERE T1.`c_mktsegment` = 'Iran',-1.5664218759249224,1,0,0,22 4,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 T.n_name FROM ( SELECT AVG(c_acctbal) AS average FROM customer ) AS T ORDER BY COUNT(T1.c_name),-4.053616223641409,3,0,0,30 5,What are the top 2 countries with the highest number of indebted suppliers?,"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 T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2",SELECT T.n_name FROM ( SELECT MAX(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1(s_nationkey ) AS T ORDER BY T.num DESC LIMIT 2 DESC LIMIT 1,-7.446106250204507,26,0,0,28 6,Provide the shipping dates and products of the orders by Gene Hale.,"SELECT DISTINCT T2.`Ship Date`, 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` = 'Gene Hale'","SELECT T1.Ship Date, T2.`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`='Product ID' WHERE T3.Product Name = 'Gene Hale'",-3.57999123145979,5,0,0,26 7,List the distinct values of Category in the product table.,SELECT DISTINCT Category FROM product,SELECT DISTINCT Category FROM product,4.508142555656296,1,1,1,19 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 9,What is the total Profit in the east_superstore table?,SELECT SUM(Profit) FROM east_superstore,SELECT SUM(Profit) FROM east_superstore,3.8154584555832485,1,1,1,20 10,List down the cities with unknown country.,SELECT city FROM geographic WHERE county = 'unknown',SELECT city FROM geographic WHERE county = 'unknown',3.7001976283531595,1,1,1,21 11,Name the shipper which had the most shipments in first quarter of 1998.,"SELECT T1.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia WHERE STRFTIME('%Y', T2.ShippedDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1","SELECT T3.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia WHERE STRFTIME('%Y', T2.`ShippedDate`) = '1998' ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",-0.24027169662132256,1,0,0,29 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 13,How many records are in the Products table?,SELECT COUNT(ReorderLevel) FROM Products,SELECT COUNT(ReorderLevel) FROM Products,4.472691083849381,1,1,1,19 14,How many sales orders were processed by the store located in Chandler in 2020?,SELECT SUM(CASE WHEN T2.`City Name` = 'Chandler' AND T1.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.`City Name` = 'Chandler' AND T1.OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T2.StoreID = T1._StoreID,1.8804047749772452,21,1,1,28 15,How many records are in the east_superstore table?,SELECT COUNT(`Customer ID`) FROM east_superstore,SELECT COUNT(`Customer ID`) FROM east_superstore,-0.6722994221878681,2,1,1,23 16,"If Dragon Souveniers, Ltd. aren't satisfied with their order and want to send a complain e-mail, which e-mail address should they send to?","SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Dragon Souveniers, Ltd.'","SELECT T3.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'Dragon Souveniers, Ltd.' AND t2.jobTitle = 'Complain'",-0.9627610291207527,1,0,0,26 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 18,How many records are in the callcenterlogs table?,SELECT COUNT(priority) FROM callcenterlogs,SELECT COUNT(priority) FROM callcenterlogs,4.829372047253272,1,1,1,21 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 20,Where are the ship countries of orders placed by Janet Leverling?,SELECT DISTINCT T2.ShipCountry FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Janet' AND T1.LastName = 'Leverling',"SELECT DISTINCT T2.ShipCountry FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE STRFTIME('%Y', T2.`ShipCountry`) = 'Janet Leverling'",-4.100618885716169,20,0,0,29 21,Identify the total number of orders processed by Northwind employee named Andrew Fuller. What percent of those orders was shipped to Austria?,SELECT CAST(COUNT(CASE WHEN T2.ShipCountry = 'Austria' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller',SELECT CAST(COUNT(CASE WHEN T2.ShipCountry = 'Austria' 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,3.678263298234326,1,0,0,30 22,What is the total Quantity in the west_superstore table?,SELECT SUM(Quantity) FROM west_superstore,SELECT SUM(Quantity) FROM west_superstore,4.62380479920519,1,1,1,21 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 24,How many records in payments were recorded in 2016?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2016%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2016%',4.198241534572536,1,1,1,20 25,Calculate the average salary per order for Andrew Fuller.,SELECT CAST(SUM(T1.Salary) AS REAL) / COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller',SELECT CAST(SUM(CASE WHEN T1.FirstName = 'Andrew' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1 . EmployeeID = T2.EmployeeID,3.1157766650487733,1,0,0,30 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 27,List the name of the cars with model year 1975.,SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = 1975,SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 WHERE T2.model_year = 1975,-1.8894405633826532,25,0,0,30 28,How many records in orders were recorded in 2021?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2021%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2021%',4.775940017408425,1,1,1,21 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 30,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 IIF(T2.c_mktsegment = 'HOUSEHOLD' AND T1.o_orderdate LIKE '%/%/18' ) AS REAL,-3.5325902650417866,6,0,0,30 31,How many records are in the Orders table?,SELECT COUNT(CustomerID) FROM Orders,SELECT COUNT(CustomerID) FROM Orders,2.046806108159898,1,1,1,24 32,Which country does supplier No.34 come from?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 34,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = '34',0.9416508138589835,1,0,0,28 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 34,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 SalesPersonID BETWEEN 1 AND 1,-1.5464940490581445,3,0,0,30 35,Count the total quantity for sales from id 1 to 10.,SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10,SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10,3.889448638065988,1,1,1,25 36,"For each productCode, what is the average quantityOrdered?","SELECT productCode, AVG(quantityOrdered) FROM orderdetails GROUP BY productCode","SELECT productCode, AVG(quantityOrdered) FROM orderdetails GROUP BY productCode",4.627904631735407,1,1,1,24 37,"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 T1 INNER JOIN `Sales Team`"" AS T2 ON T1._SalesTeamID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2023%'",-2.174559100271989,3,0,0,28 38,"For each issue, how many callcenterlogs records are linked?","SELECT T2.issue, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` GROUP BY T2.issue","SELECT T2.issue, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Compose ID` GROUP BY T2 . issue",-0.05934151021458932,6,0,0,30 39,What is the full name of the employee who handled the highest amount of orders?,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.FirstName, T1.LastName ORDER BY COUNT(*) DESC LIMIT 1","SELECT `FirstName`, `LastName Database: retail_world` FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",-7.480578828094958,1,0,0,30 40,Find and list the names of districts which has below-average stars for Eagle Capital.,SELECT T2.division FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T1.Stars > ( SELECT AVG(Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id ),SELECT T2.division FROM reviews AS T1 INNER JOIN district AS T2 WHERE T1.Product = 'Eagle Capital' AND Stars < AVG(Stars),0.7383277356972894,4,0,0,26 41,"For each CustomerID, how many records are there in Customers?","SELECT CustomerID, COUNT(CustomerID) FROM Customers GROUP BY CustomerID","SELECT CustomerID, COUNT(CustomerID) FROM Customers GROUP BY CustomerID",4.914943716569838,1,1,1,19 42,Which countries do the top 5 highest paying customers in a single payment come from? Indicate their entire address.,"SELECT DISTINCT T2.country, T2.addressLine1, T2.addressLine2 FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber ORDER BY T1.amount DESC LIMIT 5",SELECT T3.country FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customernumber = T2.customerNumber ORDER BY T1.`amount` DESC LIMIT 5,-1.735243676781423,7,0,0,14 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 44,"Sum up the number sales ids handled by employees called Morningstar, Heather and Dean.","SELECT SUM(IIF(T2.FirstName = 'Morningstar', 1, 0)) + SUM(IIF(T2.FirstName = 'Heather', 1, 0)) + SUM(IIF(T2.FirstName = 'Dean', 1, 0)) AS num FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID","SELECT SUM(T2.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE FirstName = 'Morningstar, Heather, Dean'",3.298789964475988,1,0,0,30 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 46,"List down the customer IDs and names that start with alphabet ""W"".","SELECT DISTINCT CustomerID, `Customer Names` FROM Customers WHERE `Customer Names` LIKE 'W%' ORDER BY `Customer Names` DESC","SELECT DISTINCT CustomerID, Customer Names FROM Customers WHERE `Customer Names` LIKE 'W%'",2.156687594298648,1,0,0,30 47,"For each Product ID, how many records are there in west_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM west_superstore GROUP BY `Product id`",2.547232411439056,5,1,1,25 48,Please list the IDs of the orders with a product whose production is not continuous.,SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1,SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Discontinued = 1,-3.4495814294674774,8,0,0,29 49,What is the average _SalesTeamID for joined Customers and Sales Orders records?,SELECT AVG(T2._SalesTeamID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,SELECT AVG(T2._SalesTeamID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,2.76784154322925,1,1,1,25 50,"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 central_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 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 52,Which district did the review on 2018/9/11 come from? Give the name of the city.,"SELECT T2.district_id, T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Date = '2018-09-11'",SELECT T2.district_id FROM reviews AS T1 INNER JOIN district AS T2 WHERE T1.Date = '2018-09-11',3.6229839631336405,1,0,0,30 53,Please list the names of the top 3 most expensive cars.,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 3,SELECT T3.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.`price` DESC LIMIT 3,-2.7615630763197534,12,0,0,30 54,"Please list the full name, date of birth, and email id of the elderly clients in descending order of age.","SELECT first, middle, last, year, month , day, email FROM client WHERE age > 65 ORDER BY age DESC","SELECT first, middle, last, year, month, day, email FROM client WHERE age > 65 ORDER BY age DESC",4.101736419102051,26,1,1,29 55,"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?` LIKE 'Yes%',-1.1934274556781985,8,0,0,30 56,"In 2021, 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 '2021%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2021%',0.04596297571415969,9,1,1,24 57,"For each ProductID, how many records are there in Order Details?","SELECT ProductID, COUNT(Details) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, COUNT(Details) FROM `Order Details` GROUP BY ProductID",2.2163750566524576,1,1,1,21 58,"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 T3.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.`email` = 'wyatt.collins@gmail.com',1.2540765355771284,1,0,0,22 59,"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,24 60,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 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 62,Calculate the difference in the average number of low-priority orders shipped by truck in each month of 1995 and 1996.,"SELECT (CAST(SUM(IIF(STRFTIME('%Y', T2.l_shipdate) = 1995, 1, 0)) AS REAL) / 12) - (CAST(SUM(IIF(STRFTIME('%Y', T2.l_shipdate) = 1996, 1, 0)) AS REAL) / 12) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderpriority = '5-LOW' AND T2.l_shipmode = 'TRUCK'","SELECT CAST(SUM(IIF(T2.l_shipmode = 'TRUCK', 1, 0)) AS REAL) / 12, AVG(T1.o_totalprice) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.L_orderkey WHERE T1.b_shipdate BETWEEN '1995-01-01 00:00:00' AND '1996-01'",-5.319217993340604,2,0,0,30 63,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(CASE WHEN T1.Title = 'Sales Representative' 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,3.8051154173509194,2,0,0,29 64,"What is the division of the review of 5 stars received on December 17, 2017 for the product Eagle National Mortgage?",SELECT T1.division FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5 AND T2.Date = '2017-12-17' AND T2.Product = 'Eagle National Mortgage',SELECT T2.`division Database: retail_complains` FROM district AS T1 INNER JOIN reviews AS T2 WHERE T2.Product = 'Eagle National Mortgage' AND T3.Stars = 5 AND T1.division = '2015',-5.793132681356614,20,0,0,25 65,How many records are in the events table?,SELECT COUNT(`Consumer disputed?`) FROM events,SELECT COUNT(`Consumer disputed?`) FROM events,3.8422359514964475,1,1,1,22 66,Indicate the fax of the company Blondesddsl pre et fils in Strasbourg city.,SELECT Fax FROM Customers WHERE CompanyName = 'Blondesddsl pre et fils' AND City = 'Strasbourg',SELECT Fax FROM Customers WHERE CompanyName = 'Blondesddsl pre et fils' AND City = 'Strasbourg',3.338487861355547,1,1,1,26 67,How many records are in the events table?,SELECT COUNT(Tags) FROM events,SELECT COUNT(Tags) FROM events,4.474103997787976,1,1,1,18 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 71,"Among all the customers in Germany, how many of them have an account balance of over 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 = 'GERMANY' AND T1.c_acctbal > 1000,SELECT COUNT(c_custkey) FROM customer AS c INNER JOIN nation AS n_nationkey WHERE n_name = 'GERMANY' AND c_acctbal < 1000,4.939721981786777,1,0,0,30 72,"For each o_orderstatus, what is the average o_totalprice?","SELECT o_orderstatus, AVG(o_totalprice) FROM orders GROUP BY o_orderstatus","SELECT o_orderstatus, AVG(o_totalprice) FROM orders GROUP BY o_Orderstatus",1.6320801767541326,4,1,1,29 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 74,How many records in Store Locations were recorded in 2015?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2015%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2015%',4.531000601842846,1,1,1,26 75,"For each CategoryID, what is the average UnitPrice?","SELECT CategoryID, AVG(UnitPrice) FROM Products GROUP BY CategoryID","SELECT CategoryID, AVG(UnitPrice) FROM Products GROUP BY CategoryID",3.8676392703737554,1,1,1,16 76,List the full address of all the American restaurants with a review of 4 or more?,"SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4",SELECT T3.address FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.`review` > 4,-2.28231049330864,12,0,0,30 77,"For each Type, how many records are there in Store Locations?","SELECT Type, COUNT(StoreID) FROM `Store Locations` GROUP BY Type","SELECT Type, COUNT(StoreID) FROM `Store Locations` GROUP BY Type",2.9256675097848137,1,1,1,23 78,List the country and how many customers are there.,"SELECT country, COUNT(customerNumber) FROM customers GROUP BY country","SELECT country, COUNT(customerNumber) FROM customers GROUP BY country",3.4862355305126824,1,1,1,27 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 81,What is the type of store located in the city with the highest amount of water area?,SELECT CASE WHEN MAX(`Water Area`) THEN Type END FROM `Store Locations`,SELECT Type FROM `Store Locations` ORDER BY Population DESC LIMIT 1,2.5118566669332827,1,0,0,30 82,List the distinct Client_ID values linked to client.,SELECT DISTINCT T2.Client_ID FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT DISTINCT T2.Client_ID FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2 . Client_ID,4.517492586728658,2,1,1,23 83,How many records are in the east_superstore table?,SELECT COUNT(`Order ID`) FROM east_superstore,SELECT COUNT(`Order ID`) FROM east_superstore,3.9261874356305757,1,1,1,22 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 85,What is the highest Quantity in the west_superstore table?,SELECT MAX(Quantity) FROM west_superstore,SELECT MAX(Quantity) FROM west_superstore,4.568769308283359,1,1,1,19 86,How many Products records have matching records in Sales?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID,1.9683945007579653,1,0,0,23 87,Which phone number should I call if I want to reach Nancy Davolio's home?,SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy',SELECT HomePhone FROM Employees WHERE LastName = 'Nancy Davolio',3.809577653380821,1,0,0,29 88,How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?,SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon',"SELECT CAST(SUM(IIF(T2.p_mfgr = 'smoke turquoise purple blue salmon', 1, 0)) AS REAL) * 100 / COUNT(T1.l_receiptdate) FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.ls_suppkey = T2.ps_supponpkey INNER JOIN part AS T3 ON T3.ps2_partkey = t2._partkey WHERE STRFTIME('%Y') = '1996'",-2.6136803492270753,1,0,0,29 89,How many records in events were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2019%',5.2423417437044275,1,1,1,27 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 91,List the distinct RegionID values linked to Territories.,SELECT DISTINCT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID,SELECT DISTINCT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1. RegionID = T2 . RegionID,3.1611094467732275,16,1,1,25 92,"For each Product, how many records are there in events?","SELECT Product, COUNT(`Complaint ID`) FROM events GROUP BY Product","SELECT Product, COUNT(`Complaint ID`) FROM events GROUP BY Product",2.763642992064369,1,1,1,20 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 94,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%',2.2754407512325847,2,1,1,25 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 97,What is the average number of items shipped each day in April of 1994?,SELECT AVG(l_linenumber) FROM lineitem WHERE l_shipdate BETWEEN '1994-01-01' AND '1994-01-30',"SELECT AVG(l_linenumber) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994'",-0.3148972492721097,1,0,0,28 98,Which country are the majority of the suppliers located?,SELECT Country FROM Suppliers GROUP BY Country ORDER BY COUNT(SupplierID) DESC LIMIT 1,SELECT Country FROM Suppliers GROUP BY Country ORDER BY COUNT(SupplierID) DESC LIMIT 1,2.4079194889845303,2,1,1,30 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 101,"List down the territory IDs, descriptions and region description which are under the in-charge of Nancy Davolio,","SELECT T3.RegionID, 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.LastName = 'Davolio' AND T1.FirstName = 'Nancy'","SELECT DISTINCT TerritoryID, TerritoryDescription, T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.`TerritoryID Database: retail_world` INNER JOIN Region AS T3 WHERE T2.TerritoryDescription = 'Nancy Davolio'",-7.395354078609683,1,0,0,28 102,What is the average quantityOrdered in the orderdetails table?,SELECT AVG(quantityOrdered) FROM orderdetails,SELECT AVG(quantityOrdered) FROM orderdetails,3.728650270570542,1,1,1,21 103,How many central_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.737887350722345,6,1,1,26 104,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(middle) FROM client GROUP BY client_id","SELECT Client_id, COUNT(middle) FROM client GROUP BY client_id",4.915599430868499,1,1,1,20 105,How many employees who are living in Australia and have the credit limit under 200000? State their email address and countries where they are working.,"SELECT T2.email, T3.country FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber INNER JOIN offices AS T3 ON T2.officeCode = T3.officeCode WHERE T3.country = 'Australia' AND T1.creditLimit < 200000 AND T2.jobTitle = 'Sales Rep'",SELECT COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber INNER JOIN offices AS T3 ON T3.officeCode = T4._officeCode WHERE T4.jobTitle = 'Australia' AND T5.creditLimit > 200000,-4.516833742625363,2,0,0,30 106,"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 SUM(CASE WHEN T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 1000 THEN 1 ELSE 0 END) FROM orders AS T1 INNER JOIN customer AS T2 ON T1 .o_custkey = T2 . c_cUSTkey,-1.937758391415634,26,0,0,30 107,How many records are in the south_superstore table?,SELECT COUNT(`Customer ID`) FROM south_superstore,SELECT COUNT(`Customer ID`) FROM south_superstore,4.058955478397152,1,1,1,23 108,How many records in events were recorded in 2019?,SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2019%',SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2019%',1.0525531105760992,1,1,1,26 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 110,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.Order) FROM west_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.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID` GROUP BY T2._Customer ID",-2.346438605161889,2,0,0,28 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 112,List the distinct ProductID values linked to Order Details.,SELECT DISTINCT T2.ProductID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.ProductID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.`ProductID` = T2._ProductID,-1.05862685203527,7,0,0,29 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 114,How many records are in the Customers table?,SELECT COUNT(MiddleInitial) FROM Customers,SELECT COUNT(MiddleInitial) FROM Customers,4.829372047253272,1,1,1,20 115,Provide the supplier company name in Sydney and its homepage address if available.,"SELECT CompanyName, HomePage FROM Suppliers WHERE City = 'Sydney'","SELECT CompanyName, HomePage FROM Suppliers WHERE City = 'Sydney'",3.5537425855537075,1,1,1,21 116,"For each n_regionkey, how many records are there in nation?","SELECT n_regionkey, COUNT(n_nationkey) FROM nation GROUP BY n_regionkey","SELECT n_regionkey, COUNT(n_nationkey) FROM nation GROUP BY n_Regionkey",2.1985162768669366,3,1,1,25 117,"In which region can you find the stores located in the state whose median income is no more than 30,000?",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Median Income` < 30000 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 T2.`Median Income` > 30 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.9053863338965784,1,0,0,30 118,What is the shipment duration for order number CA-2011-134103?,"SELECT DISTINCT strftime('%J', `Ship Date`) - strftime('%J', `Order Date`) AS duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103'",SELECT DISTINCT duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103',1.198609427284135,2,0,0,27 119,"For each Customer ID, how many records are there in central_superstore?","SELECT `Customer ID`, COUNT(Order) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(Order) FROM central_superstore GROUP BY `Customer id`",0.8360234758377255,8,1,1,28 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 121,"Find the total production amount and product names which had ""10 - 500 g pkgs."" as quantity per unit.","SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'","SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'",1.4780055991639327,1,1,1,24 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 123,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 CompanyName, Country, COUNT(RequiredDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID WHERE T1.CompanyName = 'American' AND STRFTIME('%Y', T2.`ShippedDate`) = ( SELECT MAX(Duration) FROM Orders )",-6.4640923710909135,2,0,0,29 124,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 LastName = 'Margaret' AND FirstName != 'Peacock'",3.4291309093530495,2,0,0,30 125,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 126,"For each CustomerID, what is the average SalesID?","SELECT CustomerID, AVG(SalesID) FROM Sales GROUP BY CustomerID","SELECT CustomerID, AVG(SalesID) FROM Sales GROUP BY CustomerID",4.2440370062370105,1,1,1,21 127,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.OrderDate LIKE '%/%/18' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T2.StoreID = T1._StoreID,0.12933345533893872,18,0,0,23 128,"In 2019, how many orders were shipped by the sales team with the highest number of orders in the said year? Provide the name of the sales team.","SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' AND T1.ShipDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1",SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN T1.ShipDate LIKE '%/%/19' AND T2.`Sales Team` = 'Sales Team' THEN 1 ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,-2.047194926620483,2,0,0,24 129,How many client records have matching records in events?,SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,7.188191141256713,1,1,1,22 130,What does the one and only 24-hour diner's name?,SELECT label FROM generalinfo WHERE food_type = '24 hour diner',SELECT label FROM generalinfo WHERE food_type = '24 hour diner',4.341428898147528,1,1,1,27 131,"For each TitleOfCourtesy, how many records are there in Employees?","SELECT TitleOfCourtesy, COUNT(Salary) FROM Employees GROUP BY TitleOfCourtesy","SELECT TitleOfCourtesy, COUNT(Salary) FROM Employees GROUP BY TitleOfClotesy",-3.689959341250336,2,0,0,29 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 133,"How many types of ""HL Touring Frames"" are there?",SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%',SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%',1.3380334637277929,8,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 136,How many records in events were recorded in 2022?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2022%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2022%',0.9721202878798406,1,1,1,22 137,"Which customer ordered 'Global High-Back Leather Tilter, Burgundy' on 10/13/2013 in 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` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Global High-Back Leather Tilter, Burgundy' AND T1.`Order Date` = '2013-10-13' AND T1.Region = 'East'","SELECT CASE WHEN T1.`Customer Name` = 'Global High-Back Leather Tilter, Burgundy' AND T1.Region = 'East' AND STRFTIME('%Y', T2.`Order Date`) = '2013'",1.7378887522989765,5,0,0,30 138,What is the phone number for the employee in charge of the Portsmouth territory?,SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Portsmouth',"SELECT CAST(SUM(IIF(T2.TerritoryDescription = 'Portsmouth', 1, 0)) AS REAL) * 100 / COUNT(T1.HomePhone) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",-0.6152311444649506,1,0,0,28 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 140,"From 1/3/97 to 8/10/97, how many orders were shipped via Federal Shipping?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate BETWEEN '1997-03-01 00:00:00' AND '1997-10-08 23:59:59',"SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE SUBSTR(T2.CompanyName, 1, 8) = 'Federal Shipping'",3.174142541754053,1,0,0,29 141,How many records in central_superstore were recorded in 2022?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2022%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2022%',1.3761424421645654,1,1,1,26 142,"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.`product ID` WHERE T1.Ship LIKE '2020%',1.4084905939424353,7,1,1,27 143,"For each r_regionkey, how many records are there in region?","SELECT r_regionkey, COUNT(r_comment) FROM region GROUP BY r_regionkey","SELECT r_Regionkey, COUNT(r_comment) FROM region GROUP BY r_regionkey",2.2347831495998514,2,1,1,27 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 145,Which Region has the highest SalesTeamID?,SELECT Region FROM `Sales Team` ORDER BY SalesTeamID DESC LIMIT 1,SELECT Region FROM `Sales Team` ORDER BY SalesTeamID DESC LIMIT 1,3.8477670436799967,1,1,1,25 146,How many records are in the callcenterlogs table?,SELECT COUNT(`rand client`) FROM callcenterlogs,SELECT COUNT(`rand client`) FROM callcenterlogs,4.058955478397152,1,1,1,25 147,Describe Sales Representative names who were hired in 1992 and compare the number of orders among them.,"SELECT T1.FirstName, T1.LastName, COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative' AND STRFTIME('%Y', T1.HireDate) = '1992' GROUP BY T1.EmployeeID, T1.FirstName, T1.LastName","SELECT CASE WHEN T1.Title = 'Sales Representative' AND STRFTIME('%Y', T2.HireDate) = '1992' THEN T3.OrderID ORDER BY COUNT(T1.FirstName) DESC LIMIT 1",0.010883917546267878,1,0,0,30 148,How many art products were ordered in 2013 in the east superstore?,"SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'",SELECT SUM(CASE WHEN T1.Region = 'East' AND T2.`Sub-Category` = 'Art' THEN 1 ELSE 0 END) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` LIKE '2019%',0.9388855752260432,2,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 153,"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,27 154,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,26 155,How many products have been discountinued by New Orleans Cajun Delights?,SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights',SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights',3.592486056943458,2,1,1,28 156,How many orders in total have the customers in the household segment made?,SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD',"SELECT COUNT(IIF(T2.c_mktsegment = 'HOUSEHOLD', 1, 0)) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey",5.449472803810461,1,0,0,27 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 158,What is the social number of the person who made the most complaints?,SELECT T1.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T1.client_id ORDER BY COUNT(T1.client_id) DESC LIMIT 1,SELECT T4.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID ORDER BY T1.`social Database: retail_complains` DESC,-7.7203700077207795,25,0,0,30 159,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 INNER JOIN country AS T3 ON T3.origin = T4.country ORDER BY T1.`price Database: cars` DESC LIMIT 1,-6.057273195415325,1,0,0,27 160,"In 2019, how many joined records exist between central_superstore and product?",SELECT COUNT(T1.`Product 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.`Product ID`) FROM central_superstore AS T1 WHERE T1.`Ship Date` LIKE '2019%',1.1229403246524883,1,0,0,25 161,How many records in callcenterlogs were recorded in 2018?,SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2018%',SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2018%',5.5414186337814915,1,1,1,26 162,Who is the customer from the West region that received the highest discount?,SELECT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' ORDER BY T1.Discount DESC LIMIT 1,SELECT T3.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'West' ORDER BY T2.Discount DESC LIMIT 1,3.7695194864265575,1,0,0,25 163,Calculate the difference between the number of cars that has a horsepower of 130 with the model year 1970 and model year 1976,SELECT SUM(CASE WHEN T2.model_year = 1970 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.model_year = 1976 THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower = 130,"SELECT CAST(SUM(IIF(T1.horsepower = 130, 1, 0)) AS REAL) * 100 / COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",4.176726439126272,1,0,0,30 164,"For each Title, how many records are there in Employees?","SELECT Title, COUNT(Salary) FROM Employees GROUP BY Title","SELECT Title, COUNT(Salary) FROM Employees GROUP BY Title",5.573540162828874,1,1,1,21 165,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 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 167,List the distinct values of CITY in the Customer and Suppliers by City table.,SELECT DISTINCT CITY FROM `Customer and Suppliers by City`,SELECT DISTINCT CITY FROM `Customer and Suppliers by City`,4.395721130221813,1,1,1,20 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 169,"In 2023, 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 '2023%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 WHERE T2.model_year LIKE '2023%',-3.045050569915853,17,0,0,29 170,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(age) FROM client GROUP BY client_id","SELECT Client_id, COUNT(age) FROM client GROUP BY client_id",5.308929195236603,1,1,1,18 171,"For each Address, how many records are there in Customers?","SELECT Address, COUNT(PostalCode) FROM Customers GROUP BY Address","SELECT Address, COUNT(PostalCode) FROM Customers GROUP BY Address",5.657580059238104,1,1,1,19 172,How many records in events were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2019%',4.531000601842846,1,1,1,23 173,How many orders were shipped to GREAL via United Package?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.CustomerID = 'GREAL' AND T2.CompanyName = 'United Package',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.`CompanyName` = 'United Package',0.34718308171689344,1,0,0,29 174,What is the percentage of the increase of complaints filed by the clients from New York from the year 2016 to the year 2017?,"SELECT 100.0 * (SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2017' THEN 1 ELSE 0 END) - SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END)) / SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'New York City'",SELECT CAST(SUM(CASE WHEN T2.`Date received` = '2016' 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 T3.Date received = '2017-01-01',-4.759135921014574,8,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 176,List line items shipped by truck with delivery time before 1997.,"SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'truck'","SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND L_shipmode = 'TRUCK'",2.663053222712639,2,1,1,22 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 178,"Describe the product names delivered in 2021 for the customer ""Sundial"".",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.DeliveryDate LIKE '%/%/21' AND T1.`Customer Names` = 'Sundial ' THEN T3.`Product Name` END 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 IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Sundial' 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,-0.42729280620654525,3,0,0,25 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 181,"What kind of restaurants can be found at ""106 E 25th Ave""?",SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = '106 E 25th Ave',4.528117285762832,1,0,0,29 182,"For each street_name, how many generalinfo records are linked?","SELECT T2.street_name, COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant GROUP BY T2.street_name","SELECT T2.street_name, COUNT(T1.`review Database: restaurant`) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = STRFTIME('%Y', T2.`st_name`) GROUP BY T2 . street_name",-7.6445326608848045,2,0,0,30 183,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` = 3 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 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 185,What is the total quantityInStock in the products table?,SELECT SUM(quantityInStock) FROM products,SELECT SUM(quantityInStock) FROM products,4.62380479920519,1,1,1,18 186,"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",-7.912233853720492,25,0,0,26 187,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,24 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 189,Who is the newest hired employee? Give the full name.,"SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM Employees )",SELECT LastName FROM Employees WHERE FirstName = 'Hire' ORDER BY HireDate DESC LIMIT 1,1.2928857167591292,1,0,0,29 190,Indicate the name of the customers who have placed an order of 3 units in February 2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Order Quantity` = 3 AND T2.OrderDate LIKE '2/%/18' 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,SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.`Order Quantity` = 3 AND T2.WarehouseCode = 'February',-2.048611298495041,22,0,0,28 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 193,Which ProductID has the highest Price?,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 1,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 1,4.988260417689312,1,1,1,22 194,List the cities where the product 'Mishi Kobe Niku' were shipped to.,SELECT T1.ShipCity FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.ProductName = 'Mishi Kobe Niku',SELECT CAST(COUNT(CASE WHEN T2.ProductName = 'Mishi Kobe Niku' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID`,-2.6173864577148698,5,0,0,30 195,List the distinct values of s_address in the supplier table.,SELECT DISTINCT s_address FROM supplier,SELECT DISTINCT s_address FROM supplier,3.64534150430876,1,1,1,15 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 197,List all cities in the Northern California Region.,SELECT city FROM geographic WHERE region = 'northern california',SELECT city FROM geographic WHERE region = 'northern california',5.540593934017408,1,1,1,23 198,How many records are in the Employees table?,SELECT COUNT(NOW) FROM Employees,SELECT COUNT(NOW) FROM Employees,1.842977802856676,1,1,1,23 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 200,"Among the orders placed by Ei, how many orders have quantity greater than 4?",SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei ' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,1.5253751966558504,2,0,0,30 201,Please list the phone numbers of all the suppliers in Germany.,SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'Germany',SELECT T3.n_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'GERMANY',-4.311249126644935,2,0,0,28 202,What is the number of complaints related to Credit cards came from female clients?,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T2.Product = 'Credit card',SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Product` = 'Credit card',0.7935554650782183,1,0,0,29 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 204,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,19 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 206,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 207,How many sales people managed to sell Headlights - Weatherproof?,SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Headlights - Weatherproof',"SELECT SUM(IIF(T1.Name = 'Headlights - Weatherproof', 1, 0)) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2. ProductID",0.22188729517950964,10,0,0,22 208,List the distinct values of Product ID in the south_superstore table.,SELECT DISTINCT `Product ID` FROM south_superstore,SELECT DISTINCT `Product ID` FROM south_superstore,3.06645068596712,1,1,1,18 209,"For each Address, how many records are there in Employees?","SELECT Address, COUNT(HomePhone) FROM Employees GROUP BY Address","SELECT Address, COUNT(HomePhone) FROM Employees GROUP BY Address",3.2614040037227507,1,1,1,19 210,Please indicate the names of the customers whose order with a total price over $300000.,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000,"SELECT T.c_name FROM ( SELECT DISTINCT CASE WHEN T1.o_totalprice > 300000 THEN 1 ELSE 0 END) AS T FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = STRFTIME('%Y', T2.mktsegment)",-2.4245624297289408,2,0,0,30 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 212,List the distinct values of rand client in the callcenterlogs table.,SELECT DISTINCT `rand client` FROM callcenterlogs,SELECT DISTINCT `rand client` FROM callcenterlogs,4.376147590469199,1,1,1,19 213,List the distinct CustomerID values linked to Customers.,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Orders AS T2 WHERE T1.Region = 'USA',-0.2457039182159971,1,0,0,30 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 215,"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 216,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 217,"For each CustomerID, how many Employees records are linked?","SELECT T2.CustomerID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`LastName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID GROUP BY T2.`CustomerID`)",-8.273197178787278,30,0,0,30 218,How many records in east_superstore were recorded in 2018?,SELECT COUNT(`Customer ID`) FROM east_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Customer ID`) FROM east_superstore WHERE Ship LIKE '2018%',1.2777280467699532,1,1,1,24 219,What is the name of the product that was ordered recently by Darren Powers?,SELECT 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` = 'Darren Powers' ORDER BY T2.`Order Date` DESC LIMIT 1,"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Darren Powers'",0.1764592514961489,1,0,0,30 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 221,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.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` LIKE 'Ornaments' AND T2.OrderDate LIKE '%/%/18',0.5876838913664917,8,0,0,30 222,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(ProductName) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(ProductName) FROM Products GROUP BY ProductName",4.720593201875388,1,1,1,21 223,How many customers have the first name Abigail?,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Abigail',SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Abigail',4.44142787490034,1,1,1,28 224,What is the average Discount for joined west_superstore and people records?,SELECT AVG(T1.Discount) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Discount) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,0.5559205771808811,6,1,1,27 225,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(id_restaurant) FROM generalinfo GROUP BY city","SELECT city, COUNT(id_restaurant) FROM generalinfo GROUP BY city",1.7928846294666145,2,1,1,14 226,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,19 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 228,How many records in callcenterlogs were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',5.195196781000291,1,1,1,25 229,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,0.6749474128310311,6,0,0,29 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 231,Please list the names of all the car models whose origin country is the USA.,SELECT DISTINCT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T2.country = T3.origin WHERE T3.country = 'USA',SELECT T1.`car_name Database: cars` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.`origin country` = T4.country WHERE T3.country = 'USA',-5.80595470121392,1,0,0,28 232,What is the name of the corporate customer from Rhode Island who had the highest number of orders in 2016 from the east superstore?,"SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Segment = 'Corporate' AND T2.State = 'Rhode Island' AND T2.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2016' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1",SELECT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Region = 'Rhode Island' ORDER BY T1.Order DESC LIMIT 1,0.15496834595288678,8,0,0,30 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 234,How many employees in total are in charge of the sales in the Eastern Region?,SELECT COUNT(T.EmployeeID) FROM ( SELECT T3.EmployeeID FROM Region AS T1 INNER JOIN Territories AS T2 ON T1.RegionID = T2.RegionID INNER JOIN EmployeeTerritories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.RegionDescription = 'Eastern' GROUP BY T3.EmployeeID ) T,SELECT COUNT(*) FROM ( SELECT COUNT(EmployeeID) FROM EmployeeTerritories WHERE T1.RegionDescription = 'Eastern' AND T2.TerritoryID = 0 ) AS total,-3.622411359448878,2,0,0,29 235,What are the countries in the region of 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',2.0029301643565813,1,0,0,25 236,Please list the full name and region of each employee in alphabetical order.,"SELECT DISTINCT T1.FirstName, T1.LastName, T4.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID ORDER BY T1.FirstName","SELECT FirstName, LastName, RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.`TerritoryID Database: retail_world` GROUP BY EmployeeID",-6.865905283091095,1,0,0,25 237,"In 2022, how many joined records exist between district and reviews?",SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Date LIKE '2022%',SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 WHERE T2.Date LIKE '2022%',3.438223079493648,1,0,0,25 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 241,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,25 242,"List down the customer names and product names of the order made by ""Anthony Torres"" via distributor channel.","SELECT DISTINCT T1.`Customer Names`, T4.`Product Name` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products AS T4 ON T4.ProductID = T2._ProductID WHERE T3.`Sales Team` = 'Anthony Torres' AND T2.`Sales Channel` = 'Distributor'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'Anthony Torres' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,-3.0426699063077702,3,0,0,26 243,"For the product No. S18_3482 in the Order No.10108, how much discount did the customer have?",SELECT (t1.MSRP - t2.priceEach) / t1.MSRP FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productCode = 'S18_3482' AND t2.orderNumber = '10108',SELECT SUM(t1.MSRP - t1.buyPrice) / COUNT(t2.orderNumber) FROM products AS t1 INNER JOIN orderdetails AS t2 WHERE t2.productCode = 'S18_3482' AND T1.productLine = '10108',3.741830264046808,1,0,0,28 244,How many restaurants can you find in Concord?,SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord',SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord',2.709032284535404,1,1,1,19 245,"What are the names of the products with a profit of no less than 1,000 in one single order?",SELECT DISTINCT T2.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Profit > 1000,SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Profit > 1000,0.956201100784328,1,0,0,27 246,List the distinct values of n_regionkey in the nation table.,SELECT DISTINCT n_regionkey FROM nation,SELECT DISTINCT n_regionkey FROM nation,3.64534150430876,1,1,1,17 247,"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 fod_type",-4.420629039646348,2,0,0,23 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 249,Please list all the 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',SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.`RegionID` = T2.RegionID WHERE RegionDescription = 'Eastern',-4.066444006365127,10,0,0,29 250,The sales of how many territories in total do the employees in London take charge of?,SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'London',"SELECT CAST(SUM(IIF(T2.TerritoryID = 1, 1, 0)) AS REAL) * 100 / COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 WHERE T1.City = 'London'",1.585347761798475,5,0,0,28 251,"Between 8/1/2003 and 8/30/2004, how many checks were issued by Mini Gifts Distributors Ltd.? Please list their check numbers.",SELECT T1.checkNumber FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate >= '2003-08-01' AND T1.paymentDate <= '2004-08-30' AND T2.customerName = 'Mini Gifts Distributors Ltd.',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate BETWEEN '2003-01-01' AND '2004-30-30',4.4393802314104756,1,0,0,30 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 253,What is the shipping company for order number 10558?,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10558,"SELECT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE STRFTIME('%Y', T2.`OrderID`) = '10558'",-0.3838580847227179,6,0,0,30 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 255,"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 T1.Client_id",-0.237197371986719,12,0,0,28 256,How many records are in the people table?,SELECT COUNT(`Customer ID`) FROM people,SELECT COUNT(`Customer ID`) FROM people,2.626981045637359,1,1,1,21 257,What is the average o_totalprice in the orders table?,SELECT AVG(o_totalprice) FROM orders,SELECT AVG(o_totalprice) FROM orders,2.961204791621454,1,1,1,20 258,List the distinct EmployeeID values linked to Orders.,SELECT DISTINCT T2.EmployeeID FROM Orders AS T1 INNER JOIN Employees AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.EmployeeID FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.`CustomerID`,-3.2259548095511232,10,0,0,30 259,"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_num, 1, 0)) AS REAL) * 100 / SUM(T2.review) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant",-1.2542316531306423,1,0,0,27 260,What is the average price of cars with 8 cylinders?,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8,"SELECT CAST(SUM(IIF(T1.cylinders = 8, 1, 0)) AS REAL) / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",3.7233179784668464,1,0,0,29 261,"In 2018, 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 LIKE '2018%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T1.`Ship Date` LIKE '2018%',-0.34235076061228686,1,0,0,30 262,State the name of all territories in Northern region.,SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern',"SELECT CAST(SUM(IIF(T1.TerritoryDescription = 'Northern', 1, 0)) AS REAL) * 100 / COUNT(T2.RegionDescription) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID",0.12129032976202378,10,0,0,27 263,How many suppliers in Australia whose products were discontinued?,SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country = 'Australia',SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = 2 WHERE T2.Country = 'Australia',1.2121177138101387,6,0,0,26 264,What are the countries that belong to Africa?,SELECT T2.n_name FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T1.r_name = 'Africa',SELECT T1.r_name FROM region AS T1 INNER JOIN nation AS T2 ON T1._regionkey = T2.n_regionkey WHERE T2.`n_name` = 'Africa',1.981352601420699,1,0,0,24 265,List the distinct values of RegionDescription in the Region table.,SELECT DISTINCT RegionDescription FROM Region,SELECT DISTINCT RegionDescription FROM Region,4.22603725091863,1,1,1,16 266,What is the total County in the Store Locations table?,SELECT SUM(County) FROM `Store Locations`,SELECT SUM(County) FROM `Store Locations`,5.311379135689884,1,1,1,21 267,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,23 268,"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(T2.UnitPrice * T2.Quantity) / COUNT(T1.Freight) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID Database: retail_world` ORDER BY T3.Quantity DESC LIMIT 2,-6.951600887586133,2,0,0,29 269,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 T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2.ps_partkey WHERE MAX(ps_availqty) > 9998,-1.0795932479283363,1,0,0,28 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 271,List the distinct CustomerID values linked to Employees.,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,6.76316711712273,1,1,1,28 272,State the first name of male clients who did not receive timely response from the call center.,SELECT T1.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.sex = 'Male',SELECT T3.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No',-2.462133764752354,11,0,0,27 273,"For each Category, what is the average Sales?","SELECT Category, AVG(Sales) FROM `Sales by Category` GROUP BY Category","SELECT Category, AVG(Sales) FROM `Sales by Category` GROUP BY Category",1.8389334169977387,1,1,1,21 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 275,How many states are in the Midwest region?,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN State ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL,"SELECT COUNT(DISTINCT T) FROM ( SELECT IIF(Region = 'Midwest', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL",1.1956806988365287,8,1,1,29 276,"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",1.551645907464883,2,1,1,23 277,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,24 278,How many kinds of items are returned in order no.5?,SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R',SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R',3.4441519470337862,2,1,1,26 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 280,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 DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Ship LIKE '2019%' AND T2.Ship Mode = 'Same Day',1.3421760349522833,2,0,0,23 281,What were the total orders of Medsep Group from 2018 to 2020?,"SELECT SUM(CASE WHEN SUBSTR(T1.OrderDate, -2) IN ('18', '19', '20') AND T2.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID",SELECT SUM(CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,0.21453815487453778,2,0,0,30 282,What is the total _SalesTeamID in the Sales Orders table?,SELECT SUM(_SalesTeamID) FROM `Sales Orders`,SELECT SUM(_SalesTeamID) FROM `Sales Orders`,5.0814097158861165,1,1,1,24 283,What was the original price of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?,SELECT DISTINCT T2.Sales / (1 - T2.Discount) 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 T1.`Customer 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 WHERE T3.Product Name = 'Xerox 1952' AND T2.Order = '2014-09-10',-3.778095378613068,3,0,0,29 284,"What is the largest quantity of ""Manjimup Dried Apples"" for an order?",SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T2.ProductID = T1.ProductID WHERE T1.ProductName = 'Manjimup Dried Apples' ORDER BY T2.Quantity DESC LIMIT 1,SELECT Largest quantity FROM `Order Details` WHERE ProductID = ( SELECT ProductID FROM Products WHERE ProductName = 'Manjimup Dried Apples' ORDER BY Quantity DESC LIMIT 1 ),2.3523560263843297,1,0,0,22 285,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,18 286,Which Mode has the highest Quantity?,SELECT Mode FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT Mode FROM central_superstore ORDER BY Quantity DESC LIMIT 1,2.7843473276576187,1,1,1,23 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 288,What is the average price per car produced in Japan?,SELECT AVG(T1.price) 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 = 'Japan',"SELECT CAST(SUM(IIF(T2.country = 'Japan', 1, 0)) AS REAL) / COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",-1.5509980306834554,12,0,0,30 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 292,List out 3 customer numbers who have highest amount payment,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3,4.234867299213488,1,1,1,23 293,"Among the orders made by customers in the household segment, how many of them are urgent?",SELECT COUNT(T1.o_orderpriority) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' AND T1.o_orderpriority = '1-URGENT',"SELECT COUNT(IIF(T2.c_mktsegment = 'HOUSEHOLD', 1, 0)) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE STRFTIME('%Y', T2._orderdate) = '1-URGENT'",-3.104523050132949,8,0,0,28 294,How many kinds of products did order No. 10252 contain?,SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252',SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252',4.368543554303919,1,1,1,29 295,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 product AS T2 ON T1.`Product ID` LIKE 'West%',0.731149660151245,1,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 299,List the distinct CompanyName values linked to Orders.,SELECT DISTINCT T2.CompanyName FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CompanyName FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2 . CustomerID,3.566299093467801,6,1,1,29 300,What is the average quantity of Ikura ordered in one order?,SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura',SELECT AVG(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.OrderID = 1,-1.0683831430408552,6,0,0,30 301,"Find and list the company name, company contact name, and contact title of customers from Madrid.","SELECT CompanyName, ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'","SELECT CompanyName , ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'",2.3202079770761097,3,1,1,17 302,"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.9565230419914731,6,0,0,28 303,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 304,List the car's name with a price worth greater than 85% of the average price of all cars.,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price * 100 > ( SELECT AVG(price) * 85 FROM price ),SELECT T3.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE SUM(T2.price) > 85,-2.9924018130212353,1,0,0,30 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 306,"Among the suppliers for the parts ordered in order no.4, how many of them are in debt?",SELECT COUNT(T1.l_linenumber) FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 4 AND T2.s_acctbal < 0,"SELECT COUNT(IIF(T2.s_acctbal < 4, 1, 0)) FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = STRFTIME('%Y')",-3.7371257151625437,2,0,0,30 307,"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 T3.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,2.3725934764205676,1,0,0,19 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 310,Name 10 products that were shipped first class from the East region.,SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'First Class' AND T2.Region = 'East' LIMIT 10,SELECT DISTINCT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Region = 'East' AND T1.Ship Mode = 'First Class',3.9637631788553036,1,0,0,29 311,How many records are in the Products table?,SELECT COUNT(ProductName) FROM Products,SELECT COUNT(ProductName) FROM Products,4.281554795135653,1,1,1,19 312,Please list all first and last names of clients who live in New York city.,"SELECT first, last FROM client WHERE city = 'New York City'","SELECT first, last FROM client WHERE city = 'New York City'",5.523639575703045,1,1,1,21 313,"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`",2.527639221639878,3,1,1,28 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 316,What is the percentage of restaurants in the Bay Area region that scored over 4 for the review rating?,"SELECT CAST(SUM(IIF(T2.review > 4, 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 RIGHT JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area'","SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city",5.860834093080811,1,0,0,29 317,Which street in San Francisco has the most burger restaurants?,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.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1,SELECT street_name FROM location WHERE food_type = 'burger' AND city = 'san francisco' ORDER BY id_restaurant DESC LIMIT 1,0.25759859006731917,4,0,0,30 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 319,"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 T.email, T.code FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.state = 'CA' AND t1.jobTitle = 'United State'",-3.2501476534866334,2,0,0,27 320,How many records in Sales Orders were recorded in 2021?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2021%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2021%',2.5546621231758806,1,1,1,25 321,What is the name and marketing segment of the customer with the total order price of 199180.63?,"SELECT T2.c_name, T2.c_mktsegment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 199180.63","SELECT T1.o_name, T2.c_mktsegment FROM orders AS T1 INNER JOIN customer AS T2 ON T1(o_custkey) = T2.`customer` WHERE STRFTIME('%Y', T1._orderdate) = '199180.63'",-0.9178953640931253,1,0,0,30 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 323,"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 = T2._id_resaurant WHERE T1.`street_num Database: restaurant` LIKE '22779 6th St., Hayward City%'",-5.4847671856132765,1,0,0,27 324,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,22 325,How many of the complaints are longer than 15 minutes?,"SELECT COUNT(ser_time) FROM callcenterlogs WHERE strftime('%M', ser_time) > '15'",SELECT COUNT(ser_time) FROM callcenterlogs WHERE ser_time > 15,3.075796639809661,1,0,0,29 326,What is the region with the most customers?,"SELECT T.r_name FROM ( SELECT T3.r_name, COUNT(T2.c_custkey) AS num 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 GROUP BY T3.r_name ) AS T ORDER BY T.num DESC LIMIT 1","SELECT T.r_name FROM ( SELECT T1.n_name, COUNT(T2.c_custkey) AS num FROM nation AS T1 INNER JOIN customer AS T2 ON T1._nationkey = T2._c_nationskey ) AS T ORDER BY T.num DESC LIMIT 1",-5.773784941915502,1,0,0,27 327,How many records are in the south_superstore table?,SELECT COUNT(`Product ID`) FROM south_superstore,SELECT COUNT(`Product ID`) FROM south_superstore,4.058955478397152,1,1,1,22 328,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,28 329,How many customers have an employee who reports to William Patterson as their sales representitive?,SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'William' AND t2.lastName = 'Patterson',SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.lastName = 'William' AND t1.country = 'Patterson',3.0674642305209376,1,0,0,26 330,Which country produced the most fuel-efficient car?,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 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 ORDER BY T1.mpg DESC LIMIT 1,-4.276808313686769,1,0,0,30 331,"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 332,Which product was ordered the most in 2018?,SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._ProductID ORDER BY COUNT(T1._ProductID) DESC LIMIT 1,SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '2018%' ORDER BY T1.`Order Quantity` DESC LIMIT 1,1.8496845453835373,1,0,0,30 333,What is the average age of Norwalk clients?,SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T1.age) AS average FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Norwalk',SELECT CAST(SUM(CASE WHEN T2.city = 'Norwalk' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,3.6837671038416593,1,0,0,26 334,"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 335,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,24 336,What is the full name of the Vice President of Sales. Give me the URL of his/her photo.,"SELECT FirstName, LastName FROM Employees WHERE Title = 'Vice President, Sales'","SELECT FirstName, LastName, Title FROM Employees WHERE Title = 'Vice President'",2.386218533791852,1,0,0,30 337,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 DISTINCT T3.`Complaint ID` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`first` = 'CR0922485',-0.6243178301070229,7,0,0,25 338,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,25 339,What is the detailed position of the store which has order SO - 000115?,"SELECT T2.Latitude, T2.Longitude FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderNumber = 'SO - 000115'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'SO - 000115' 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,-1.8678371751710479,7,0,0,22 340,What is the last name of the customer who placed an order for sales id 178?,SELECT T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesID = 178,SELECT DISTINCT T2.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T3.SalesID = 178,-2.342410477221593,19,0,0,26 341,"For each CustomerID, how many Customers records are linked?","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.`CustomerID`, COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID GROUP BY T2. CustomerID",-2.021360378256521,9,0,0,29 342,How many deli in Belmont have a review rating of 2 or more?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli',SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'deli' AND review > 2,2.7474379229097354,1,0,0,30 343,List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.,"SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )","SELECT `Product`, `Issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE ( SELECT AVG(age) / 60 FROM client )",-2.6769270149148285,1,0,0,27 344,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(Discontinued) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(Discontinued) FROM Products GROUP BY ProductName",4.258328108605211,1,1,1,20 345,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 346,How many female clients are there older than 30?,SELECT COUNT(sex) FROM client WHERE sex = 'Female' AND age > 30,SELECT COUNT(sex) FROM client WHERE sex = 'Female' AND age > 30,2.5920570122251765,1,1,1,26 347,Lists the last name of all clients who made a PS-type complaint and were served by TOVA.,SELECT t1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS' AND T2.server = 'TOVA',SELECT t2.server FROM client AS t1 INNER JOIN callcenterlogs AS t2 ON t1.client_id = t2.`rand client` WHERE T1.last = 'TOVA' AND T2.type = 'PS',-1.0194968082701594,6,0,0,27 348,How many employees in the UK takes charge of the sales in over 4 territories?,SELECT COUNT(COUNTEID) FROM ( SELECT T1.EmployeeID AS COUNTEID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Country = 'UK' GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4 ) T1,SELECT COUNT(*) FROM ( SELECT COUNT(EmployeeID) FROM Employees WHERE Country = 'UK' AND TerritoryID < 4 ),1.2407285499645238,1,0,0,30 349,"What profit can the seller Carousel DieCast Legends make from the sale of the product described as ""The perfect holiday or anniversary gift for executives""?",SELECT SUM(T2.MSRP - T2.buyPrice) FROM productlines AS T1 INNER JOIN products AS T2 ON T1.productLine = T2.productLine WHERE T2.productVendor = 'Carousel DieCast Legends' AND T1.textDescription LIKE '%perfect holiday or anniversary gift for executives%',"SELECT CAST(SUM(IIF(T2.productVendor = 'Carousel DieCast Legends', 1, 0)) AS REAL) * 100 / COUNT(T1.textDescription) FROM productlines AS T1 INNER JOIN products AS T2 ON T1.productLine = T2 . productLine WHERE T2.MSRP = '1-perfect holiday or anniversary gift for executives'",2.3691926977518007,3,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 352,"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 id`",0.5976044409762774,7,1,1,28 353,"In 2022, 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 '2022%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2022%',3.1390577645048587,5,1,1,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 355,How many records in Orders were recorded in 2019?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2019%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2019%',4.69216415425934,1,1,1,26 356,What is the position title for Laura Callahan?,SELECT Title FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan',"SELECT FirstName, LastName, Title FROM Employees WHERE Title = 'Laura Callahan'",4.261071144733432,1,0,0,29 357,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 T3.postalCode FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.`city` = 'VP Sales',-1.7707412156183686,17,0,0,23 358,How many price records have matching records in data?,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1 . ID = T2.ID,3.6245935204533737,9,1,1,24 359,List the distinct values of Region in the product table.,SELECT DISTINCT Region FROM product,SELECT DISTINCT Region FROM product,5.1121551324071595,1,1,1,17 360,"For each Region, how many records are there in west_superstore?","SELECT Region, COUNT(`Product ID`) FROM west_superstore GROUP BY Region","SELECT Region, COUNT(`Product ID`) FROM west_superstore GROUP BY Region",2.606365159118271,1,1,1,19 361,"For each CompanyName, what is the average Amount?","SELECT CompanyName, AVG(Amount) FROM `Sales Totals by Amount` GROUP BY CompanyName","SELECT CompanyName, AVG(Amount) FROM `Sales Totals by Amount` GROUP BY CompanyName",2.2835803207605045,1,1,1,22 362,"Calculate the average production rate per year from 1971 to 1980. Among them, name the cars with a weight of fewer than 1800 lbs.",SELECT CAST(COUNT(T1.ID) AS REAL) / 9 FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 UNION ALL SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 AND T2.weight < 1800,SELECT AVG(T2.weight) / 1800 FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T1.`model_year Database: cars` BETWEEN 1971 AND 1980 AND T3.car_name = 'Among',-8.281021122729223,27,0,0,29 363,"For each ContactName, how many records are there in Customers?","SELECT ContactName, COUNT(ContactName) FROM Customers GROUP BY ContactName","SELECT ContactName, COUNT(ContactName) FROM Customers GROUP BY ContactName",4.258328108605211,1,1,1,19 364,"How many clients who live in New York City have the complaint outcome as ""AGENT""?",SELECT COUNT(T2.`rand client`) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.city = 'New York City' AND T2.outcome = 'AGENT',SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'AGENT',0.9117418772558709,1,0,0,30 365,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,27 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 368,How many type of products did Dalton M. Coleman purchase?,SELECT COUNT(T2.ProductID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M' AND T1.LastName = 'Coleman',SELECT SUM(IIF(T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M. Coleman' THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1._CustomerID = T2.CustomerID,-0.8293410870686538,2,0,0,28 369,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,26 370,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 orderNumber = ( SELECT orderNumber FROM customers WHERE customerName = 'Cancelled' )",3.339602674202558,1,0,0,27 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 372,List all the products that were shipped to Starenweg 5.,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.ShipAddress = 'Starenweg 5' GROUP BY T3.ProductName,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = 2 WHERE T1.`ShipAddress Database: retail_world` = 'Starenweg' AND T2.ProductID = 4,-5.567411311670205,30,0,0,30 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 374,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2015%',4.378280799748311,1,1,1,25 375,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 DISTINCT T3.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`middle Database: retail_complains` LIKE 'Alexander Bronx Lewis%' AND T2.`Product` = 'Apple',-7.102617056939869,20,0,0,28 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 377,How many companies are there in the city of London?,SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London',SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London',4.735663816874709,1,1,1,24 378,How many customers records have matching records in offices?,SELECT COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode,SELECT COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.salesRepEmployeeNumber = T2.officeCode,2.532004173282811,3,0,0,27 379,Calculate the average net profit of bar tools which has ordered quantity exceed 5.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5",SELECT SUM(CASE WHEN T2.`Product Name` = 'Bar Tools' THEN 1 ELSE 0 END) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5,-2.2456996349966256,7,0,0,27 380,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 381,How many records in Shippers were recorded in 2016?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2016%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2016%',4.412960505279923,1,1,1,23 382,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,2.4020717217729604,4,0,0,29 383,What is the total Sales in the Sales by Category table?,SELECT SUM(Sales) FROM `Sales by Category`,SELECT SUM(Sales) FROM `Sales by Category`,4.932604740907138,1,1,1,23 384,How many Japanese cars weigh more than 2000 lbs?,SELECT 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 T3.country = 'Japan' AND T1.weight > 2000,SELECT 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.`weight Database: cars` > 2000 AND T3.`country` = 'Japan's',-5.958855187695865,26,0,0,27 385,How many south_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.9254314422500941,7,0,1,23 386,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.11258406942185,18,0,0,22 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 388,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 SUM(T1.Profit) / COUNT(T2.`Product ID`) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Customer ID` = T2.`CustomerID` INNER JOIN central_superstores AS T3 ON T3.`Customer Name` = 'Cisco SPA301',-5.108930722612855,3,0,0,30 389,What is the average Discount for joined Orders and Order Details records?,SELECT AVG(T2.Discount) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,SELECT AVG(T2.Discount) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderId,2.8864582106601397,1,1,1,24 390,Calculate the percentage of sold blades in the total number of transactions.,"SELECT CAST(SUM(IIF(T1.Name = 'Blade', 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(IIF(T1.Name = 'Blade', 1, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",5.302264977143993,1,0,0,19 391,List all the name of customers who have orders that are still processing.,SELECT t2.customerName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.status = 'In Process',SELECT t3.customerName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customernumber WHERE T1.status = 'Processing',-2.3990105922397365,1,0,0,22 392,How many records are in the location table?,SELECT COUNT(street_name) FROM location,SELECT COUNT(street_name) FROM location,4.281554795135653,1,1,1,20 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 394,"What was the total amount of sales handled by Nancy Davolio in December 1996, excluding discounts?",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.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T2.OrderDate LIKE '1996-12%' AND T3.Discount = 0,"SELECT SUM(T2.UnitPrice * (1 - T2.Discount)) / COUNT(T1.FirstName) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID INNER JOIN `Order Details` AS T3 ON STRFTIME('%Y', T3.OrderDate) = '1996-01-01'",-5.247887191057959,24,0,0,30 395,"For each Sub-issue, how many records are there in events?","SELECT `Sub-issue`, COUNT(Client_ID) FROM events GROUP BY `Sub-issue`","SELECT `sub-issue`, COUNT(Client_ID) FROM events GROUP BY `Sub-issue`",-0.10585472286749244,1,1,1,25 396,"Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?","SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000",SELECT CAST(SUM(CASE WHEN T1.street_num < 1000 AND T2.food_type = 'afghhani' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON STRFTIME('%Y-%m-%dT%H:%M:%S' ) = '2000' ORDER BY SUM(T2.percentage) ASC,-5.683197720986799,27,0,0,30 397,List the distinct values of region in the geographic table.,SELECT DISTINCT region FROM geographic,SELECT DISTINCT region FROM geographic,3.7368875748870978,1,1,1,18 398,How many records in Employees were recorded in 2017?,SELECT COUNT(FirstName) FROM Employees WHERE HireDate LIKE '2017%',SELECT COUNT(FirstName) FROM Employees WHERE HireDate LIKE '2017%',4.860603963746542,1,1,1,25 399,List the distinct values of city in the district table.,SELECT DISTINCT city FROM district,SELECT DISTINCT city FROM district,1.7909536146026408,1,1,1,18 400,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(Salary) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(Salary) FROM Employees GROUP BY FirstName",5.657580059238104,1,1,1,22 401,What is the name of the most expensive car that was produced by the USA?,SELECT T4.car_name 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 DESC LIMIT 1,SELECT T3.car_name 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._country INNER JOIN data AS T4 ON T4.id = T5.ID WHERE T4.`country` = 'USA',-7.025700129122911,16,0,0,27 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 403,"Compared with the orders happened on 2005-04-08 and two days later, which day's order had a higher value?","SELECT T2.orderDate FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-08' OR STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-10' ORDER BY T1.quantityOrdered * T1.priceEach DESC LIMIT 1","SELECT STRFTIME('%Y', t2.orderDate) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2._orderNumber WHERE T1.productCode = '2005-04-08' AND T2.status = 'Compared'",-1.8498563598306215,6,0,0,26 404,List out 3 best seller products during year 2003 with their total quantity sold during 2003.,"SELECT t3.productName, 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 STRFTIME('%Y', t1.orderDate) = '2003' GROUP BY t3.productName ORDER BY SUM(t2.quantityOrdered) DESC LIMIT 3",SELECT T2.productName FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderDate = '2003-03-03' INNER JOIN products AS T3 ON T3.productCode = T2.`productCode` WHERE T4.productLine = 'Seller Products' ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 3,-3.732620430863324,1,0,0,28 405,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,20 406,"For each CustomerID, how many Orders records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`ShipperID Database: retail_world`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.`CustomerID` = T2.`Customer ID` GROUP BY T2 . CustomerID",-7.227458359489602,22,0,0,29 407,How many client records have matching records in district?,SELECT COUNT(T1.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,3.962704724092811,2,0,0,26 408,How many records are in the Employees table?,SELECT COUNT(Title) FROM Employees,SELECT COUNT(Title) FROM Employees,0.4565143531634555,1,1,1,23 409,"What is the average supply cost for the part ""hot spring dodger dim light""?",SELECT AVG(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.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_partkey) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1._ps_suppkey = T2.s_sup pkey",-2.2387583525383445,1,0,0,29 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 411,"For each addressLine1, how many records are there in customers?","SELECT addressLine1, COUNT(postalCode) FROM customers GROUP BY addressLine1","SELECT addressLine1, COUNT(postalCode) FROM customers GROUP BY addressline1",3.120479763653612,5,1,1,29 412,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,22 413,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 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 417,"For each city, how many records are there in offices?","SELECT city, COUNT(officeCode) FROM offices GROUP BY city","SELECT city, COUNT(officeCode) FROM offices GROUP BY city",5.573540162828874,1,1,1,19 418,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,1.9639877974507434,1,1,1,27 419,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 420,Through which companies have products been shipped the most times to the city of Aachen?,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCity = 'Aachen' GROUP BY T2.CompanyName ORDER BY COUNT(T1.ShipVia) DESC LIMIT 1,SELECT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`ShipCity` = 'Aachen',-1.1011963211610292,6,0,0,30 421,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,24 422,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 `Ship Mode` = 'Standard Class',1.1834299531404817,1,0,0,30 423,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,26 424,"Among the products, how many of them were discontinued in production?",SELECT COUNT(*) FROM Products WHERE Discontinued = 1,SELECT COUNT(*) FROM Products WHERE Discontinued = 1,3.169412411033504,1,1,1,29 425,"Among the products with product ID lower than 15, how many of them costs 10 and below?",SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10,SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10,1.8391404876033823,3,1,1,30 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 427,"For each EmployeeID, how many records are there in EmployeeTerritories?","SELECT EmployeeID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY EmployeeID","SELECT EmployeeID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY Employeeid",1.2409773306787333,3,1,1,25 428,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.4721772548090296,7,0,0,30 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 430,List the distinct Client_ID values linked to callcenterlogs.,SELECT DISTINCT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID`,1.8929701146144775,1,0,0,30 431,List the distinct values of c_mktsegment in the customer table.,SELECT DISTINCT c_mktsegment FROM customer,SELECT DISTINCT c_mktsegment FROM customer,4.5739967119286575,1,1,1,18 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 433,What is the total Discount in the central_superstore table?,SELECT SUM(Discount) FROM central_superstore,SELECT SUM(Discount) FROM central_superstore,5.100529480702467,1,1,1,19 434,"In the parts shipped by rail, how many are of medium priority?",SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'RAIL' AND T1.o_orderpriority = '3-MEDIUM',"SELECT COUNT(IIF(T2.l_shipmode = 'RAIL', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE STRFTIME('%Y', T2.s_shipdate) = '5-MEDIUM'",-5.452956725565637,2,0,0,23 435,How many orders were shipped in 1994?,"SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994'","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994'",3.489673465544708,1,1,1,26 436,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,23 437,How many American food restaurants are unpopular in Carmel?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' ),SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel',4.392452881735614,1,0,0,28 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 439,What percentage do items under the category of 'Furniture' make up the total number of items ordered that are shipped as standard in the West region?,SELECT CAST(SUM(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' AND T1.`Ship Mode` = 'Standard Class',SELECT CAST(SUM(CASE WHEN T3.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Region = 'West' AND T1.Ship Mode = 'Standard Class',-1.0969520844047076,3,0,0,30 440,How many records are in the Employees table?,SELECT COUNT(ReportsTo) FROM Employees,SELECT COUNT(ReportsTo) FROM Employees,4.508889799613256,1,1,1,22 441,Which region has the second most clients?,"SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division ORDER BY COUNT(T2.division) DESC LIMIT 1, 1",SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id GROUP BY T2.`division` ORDER BY COUNT(*) DESC LIMIT 1,-4.91627684590862,8,0,0,30 442,"Among the German customers, how many of the them has credit limit of zero?",SELECT COUNT(customerNumber) FROM customers WHERE creditLimit = 0 AND country = 'Germany',SELECT COUNT(customerNumber) FROM customers WHERE creditLimit = 0 AND country = 'Germany',3.0845859245576692,1,1,1,26 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 444,How many records are in the production table?,SELECT COUNT(ID) FROM production,SELECT COUNT(ID) FROM production,1.842977802856676,1,1,1,22 445,How many records are in the events table?,SELECT COUNT(`Complaint ID`) FROM events,SELECT COUNT(`Complaint ID`) FROM events,3.2446266442338896,1,1,1,20 446,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,26 447,"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.`OrderID` LIKE '2020%',-2.5757217244553914,8,0,0,30 448,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(call_id) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(call_id) FROM callcenterlogs GROUP BY `rand client`",1.5921414731069579,6,1,1,27 449,"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.FirstName, T3.MiddleInitial, T4.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Customers AS T3 ON T2=T3.CustomerID WHERE T5.Quantity > 1000",-4.1786149111342095,3,0,0,30 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 451,"For each productCode, how many records are there in orderdetails?","SELECT productCode, COUNT(orderNumber) FROM orderdetails GROUP BY productCode","SELECT productCode, COUNT(orderNumber) FROM orderdetails GROUP BY productCode",3.863222952712137,1,1,1,20 452,How many checks were issued by Euro+ Shopping Channel in the year 2004?,"SELECT COUNT(T1.checkNumber) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE customerName = 'Euro+ Shopping Channel' AND STRFTIME('%Y', T1.paymentDate) = '2004'",SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2004%' AND customerName = 'Euro+ Shopping Channel',4.824515869777131,1,0,0,21 453,What is the total Quantity in the Order Details table?,SELECT SUM(Quantity) FROM `Order Details`,SELECT SUM(Quantity) FROM `Order Details`,5.311379135689884,1,1,1,20 454,"For each Sales Channel, how many Products records are linked?","SELECT T2.`Sales Channel`, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID GROUP BY T2.`Sales Channel`","SELECT T2.`Sales Channel`, COUNT(_ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID GROUP BY T2.SalesChannel",-2.3334473472833097,8,0,0,30 455,How many records in Orders were recorded in 2016?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2016%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2016%',4.69216415425934,1,1,1,20 456,Give the model year of the heaviest car.,SELECT 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 T3.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.`weight Database: cars` = 'heaviest',-5.646345896102548,1,0,0,19 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 458,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.first) 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.`first Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 WHERE T2.`Consumer consent provided?` = 'No' GROUP BY T1.client_id",-8.080193719589785,2,0,0,30 459,"Among all the orders made by Aimee Bixby, what was the longest shipment time?","SELECT MAX(strftime('%J', `Ship Date`) - strftime('%J', `Order Date`)) AS longestTimeDays FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby'",SELECT MAX(SUM(CASE WHEN T2.`Customer Name` = 'Aimee Bixby' THEN 1 ELSE 0 END) AS longestTime ) - longestTime,-1.9523423317005746,1,0,0,26 460,What are the cost prices of large burnished copper?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_type = 'LARGE BURNISHED COPPER',"SELECT CAST(SUM(IIF(T1.p_name = 'large burnished copper', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",-1.0414190953858882,1,0,0,24 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 462,State 10 emails of UK Sales Rep who have the lowest credit limit.,SELECT DISTINCT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' ORDER BY T1.creditLimit LIMIT 10,SELECT T3.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.country = 'UK' AND t2.creditLimit = ( SELECT MIN(creditLimit) FROM employees ),-1.7567344598582486,2,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 464,What is the first name of employee who handled sales for customer called Abigail?,SELECT DISTINCT T3.FirstName 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 T1.FirstName = 'Abigail',SELECT DISTINCT T4.FirstName 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 T3.SalesName = 'Abigail',-4.11872320048825,2,0,0,22 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 466,To which segment belongs the customer that made the most orders in April 1994?,"SELECT T.c_mktsegment FROM ( SELECT T2.c_mktsegment, COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate LIKE '1994-04-%' GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 1","SELECT T3.c_mktsegment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE STRFTIME('%Y', T2.`o_orderdate) = '1994-01-01' ORDER BY T1._orderdate DESC LIMIT 1",-0.833677767584791,1,0,0,29 467,How many records are in the Sales table?,SELECT COUNT(CustomerID) FROM Sales,SELECT COUNT(CustomerID) FROM Sales,4.795353829950178,1,1,1,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 469,Complaint about Credit Card mostly came from clients of which age group?,"SELECT SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END), SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adult , SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elder FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'",SELECT SUM(CASE WHEN T3.Product = 'Credit card' THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T3.`Product` ORDER BY COUNT(T2.age) DESC LIMIT 1,0.27108493393461475,1,0,0,29 470,What is the average Sales in the south_superstore table?,SELECT AVG(Sales) FROM south_superstore,SELECT AVG(Sales) FROM south_superstore,3.4321500354297707,1,1,1,21 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 473,Indicate order numbers with an order date after 1/1/2018.,SELECT DISTINCT T FROM ( SELECT CASE WHEN OrderDate > '1/1/18' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT DISTINCT OrderNumber FROM `Sales Orders` WHERE OrderDate < '1/1/18',1.552063492190097,1,0,0,30 474,"How many ""Mountain-100 Silver, 38"" were sold by Stearns MacFeather?","SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Stearns' AND T1.LastName = 'MacFeather' AND T3.Name = 'Mountain-100 Silver, 38'","SELECT COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 WHERE T3.Name = 'Mountain-100 Silver, 38'",3.8266531906071535,1,0,0,30 475,How many customers are in the automobile market segment?,SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE',SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE',4.519123996368745,1,1,1,26 476,"For each Sub-Category, how many east_superstore records are linked?","SELECT T2.`Sub-Category`, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Sub-Category`","SELECT T2.Sub-Category, COUNT(T1.`Order Date`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2 . Sub-Category",-3.0370376805543264,4,0,0,23 477,List all the order numbers along with its product name for each order under the sales team of 'Douglas Tucker'.,"SELECT DISTINCT T1.ProductID, T1.`Product Name` 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 T3.`Sales Team` = 'Douglas Tucker'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Douglas Tucker' THEN T1.`Product Name` ELSE NULL END AS T FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,-5.311136399899541,3,0,0,27 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 479,"For each CustomerID, how many records are there in Orders?","SELECT CustomerID, COUNT(OrderID) FROM Orders GROUP BY CustomerID","SELECT CustomerID, COUNT(OrderID) FROM Orders GROUP BY CustomerID",5.657580059238104,1,1,1,19 480,How many records in Sales Orders were recorded in 2023?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2023%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2023%',2.5546621231758806,1,1,1,23 481,"Among the cars introduced in 1977, provide the names and the horse powers of cars from Europe.","SELECT T1.car_name, T1.horsepower 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 = 1977 AND T3.country = 'Europe'","SELECT T4.car_name, T3.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3=T2.origin WHERE T1.`horsepower Database: cars` = 'EUROPE' AND T5.country = 'Europe'",-6.4973335864223145,20,0,0,23 482,How many customers are named Madison?,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison',SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison',2.40604250302234,1,1,1,30 483,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,25 484,How many records in orders were recorded in 2023?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2023%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2023%',4.775940017408425,1,1,1,22 485,"For each Region, how many south_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Customer ID) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` GROUP BY T2._Region",0.11811723323674184,4,0,0,28 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 487,What is the average discount for the parts made by Manufacturer#5?,SELECT AVG(T3.l_discount) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey WHERE T1.p_mfgr = 'Manufacturer#5',"SELECT CAST(SUM(IIF(T1.p_mfgr = 'Manufacturer#5', 1, 0)) AS REAL) * 100 / COUNT(T2.l_orderkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._p_partkey = T2.ps_partsupp",-5.5517550261961555,1,0,0,28 488,What was the average unit price of products shipped via United Package in 1997?,SELECT AVG(T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.OrderDate LIKE '1997%' AND T3.CompanyName = 'United Package',SELECT CAST(SUM(CASE WHEN T1.`ShipVia Database: retail_world` LIKE '1997%' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2._OrderID INNER JOIN Shippers AS T3 ON T2.ShipVia = T3.ShipperID WHERE T4.CompanyName = 'United Package' AND STRAL,-8.151944879674886,20,0,0,30 489,How many sales representatives whose salaries are higher than 2000?,SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative',SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative',5.38936943880976,1,1,1,27 490,How many clients who live in Kansas City provided a 1-star review?,SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Kansas City' AND T1.Stars = 1,SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id WHERE T2.city = 'Kansas City' AND T1.`Stars` = 1,-3.0126210973768677,3,0,0,30 491,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 492,"Among the bakeries, what is total number of bakery located at University Avenue, Palo Alto?",SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.',"SELECT CAST(SUM(CASE WHEN T2.food_type = 'bakery' AND T1.street_name = 'University Avenue, Palo Alto' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.`id_ restaurant` = T2._id_RESTaurant WHERE T2.`city` = 'palo alto'",-1.0969520844047076,3,0,0,19 493,"List the sales ID of the product with a quantity of 590 and named ""External Lock Washer 7"".",SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'External Lock Washer 7' AND T1.Quantity = 590,SELECT DISTINCT T2.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID` WHERE T3.Name = 'External Lock Washer 7' AND T4.Quantity = 590,-0.05049338886464584,6,0,0,30 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 496,"Provide Speedy Express's phone number and number of shipped orders on 30th January, 1998.","SELECT T2.Phone, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express' AND T1.ShippedDate LIKE '1998-01-30%' GROUP BY T2.Phone","SELECT T3.Phone, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`ShippedDate Database: retail_world` BETWEEN 'Speedy Express' AND '1998-01-30'",-7.779209256776558,2,0,0,30 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 498,What is the average price of the orders made by a customer in Germany?,SELECT AVG(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 AVG(T2.o_totalprice) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = 'GERMANY',-1.8673180218082466,1,0,0,30 499,"What is the nationality of ""Customer#000000055""?",SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055',SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055',4.790260304573829,1,1,1,30 500,How many records in Store Locations were recorded in 2021?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2021%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2021%',4.531000601842846,1,1,1,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 502,What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL?,"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.`Date received` = '2017-03-27' AND T2.server = 'MICHAL'","SELECT t3.server FROM client AS t1 INNER JOIN callcenterlogs AS t2 ON t1.client_id = t2.`rand client` WHERE strftime('%Y', T2.`Date received`) = '2017-03-27' AND T1.middle = 'MICHAL'",-0.09869255839915161,10,0,0,27 503,What is the total county in the geographic table?,SELECT SUM(county) FROM geographic,SELECT SUM(county) FROM geographic,2.0682716902406586,1,1,1,21 504,How many records in events were recorded in 2017?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2017%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2017%',0.9721202878798406,1,1,1,21 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 506,How many records are in the Employees table?,SELECT COUNT(Salary) FROM Employees,SELECT COUNT(Salary) FROM Employees,4.795353829950178,1,1,1,21 507,"In 2021, 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.OrderDate LIKE '2021%',SELECT COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID LIKE '2021%' AND T2.OrderDate LIKE '203%',-5.3152701560417235,22,0,0,30 508,List the distinct ProductName values linked to Categories.,SELECT DISTINCT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2 . CategoryID,4.148467611236144,2,1,1,26 509,How many 2003 Harley-Davidson Eagle Drag Bikes were ordered?,SELECT SUM(t2.quantityOrdered) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productName = '2003 Harley-Davidson Eagle Drag Bike',SELECT SUM(quantityOrdered) FROM products WHERE productCode = '2003 Harley-Davidson Eagle Drag Bikes' AND orderNumber = 0,-2.9677130338865707,4,0,0,27 510,"In 2015, 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 '2015%',"SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders`, T2 ON T1.StateCode = T2._StateCode WHERE T1.`Time Zone` LIKE '2015%'",0.3499603866982444,4,0,0,26 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 512,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(`Complaint ID`) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(`Complaint ID`) FROM callcenterlogs GROUP BY `rand client`",1.8612544399969078,7,1,1,27 513,How many orders that the employees who are located in Tacoma handled?,SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'Tacoma',SELECT COUNT(CASE WHEN T2.OrderID = 'Tacoma' THEN 1 ELSE 0 END) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,1.707199878165019,9,0,0,29 514,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,24 515,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) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.ordernumber = T2.orderNumber INNER JOIN customers AS T3 ON T3.customerNumber = T4.salesRepEmployeeNumber WHERE t1.productCode = 'Cruz & Sons Co.' AND t3.orderDate = '2003-03-03',-3.75818792392802,2,0,0,30 516,Find the percentage of products that were shipped from Burbank in 2018?,SELECT CAST(SUM(CASE WHEN T3.`City Name` = 'Burbank' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) 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 T2.OrderDate LIKE '%/%/18',SELECT CAST(SUM(CASE WHEN T2.`City Name` = 'Burbank' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OrderNumber) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID,-2.727050018996442,8,0,0,30 517,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,25 518,"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 519,What is the highest Discount in the east_superstore table?,SELECT MAX(Discount) FROM east_superstore,SELECT MAX(Discount) FROM east_superstore,4.568769308283359,1,1,1,21 520,"For each City, how many records are there in people?","SELECT City, COUNT(`Customer ID`) FROM people GROUP BY City","SELECT City, COUNT(`Customer ID`) FROM people GROUP BY City",3.939587244100999,1,1,1,21 521,List the distinct values of Customer ID in the south_superstore table.,SELECT DISTINCT `Customer ID` FROM south_superstore,SELECT DISTINCT `Customer ID` FROM south_superstore,3.923274995964464,1,1,1,20 522,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 T3.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Issue` = 'Kaitlyn Eliza Elliott',-1.3020355423082628,7,0,0,23 523,Which car in the database provides the best crash protection based on its weight? How much is it?,"SELECT T1.ID, T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.weight DESC LIMIT 1",SELECT T2.`car` FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T3.price DESC LIMIT 1,-3.480833761292496,9,0,0,30 524,What are the total quantities of the items ordered by customer 101660 on 10/5/1995?,SELECT SUM(T2.l_quantity) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1995-10-05' AND T1.o_custkey = 101660,"SELECT CAST(SUM(IIF(T2.l_discount = 101660, 1, 0)) AS REAL) * 100 / COUNT(T1._orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderdate = '1995-10-5'",-2.8158589474033024,1,0,0,30 525,"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.8943865113199694,6,0,0,30 526,"Give the home phone number of the employee who is in charge of ""Savannah"" territory.",SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Savannah',SELECT CAST(SUM(CASE WHEN T2.TerritoryDescription = 'Savannah' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.HomePhone) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID,-1.6028546179072587,1,0,0,28 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 528,Which supplier supplies the most amount of products?,"SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.SupplierID, T2.CompanyName ORDER BY COUNT(T1.ProductName) DESC LIMIT 1",SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID ORDER BY COUNT(T1.ProductName) DESC LIMIT 1,1.9179957760359625,9,0,0,30 529,How many records in production were recorded in 2023?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2023%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2023%',4.69216415425934,1,1,1,24 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 531,What is the last name of sales person for sales id 100?,SELECT T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.SalesID = 100,"SELECT MiddleInitial, LastName FROM Employees AS M1 INNER JOIN Sales AS M2 ON M1.EmployeeID = M2.SalesPersonID WHERE SalesID BETWEEN 100 AND 100",3.36505196708943,1,0,0,30 532,How many orders was handled by employees who reported to employee id 5?,SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.ReportsTo = 5,SELECT COUNT(CASE WHEN T2.OrderID = 5 THEN 1 ELSE 0 END) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,2.6038148249825714,9,0,0,23 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 536,List the distinct values of r_regionkey in the region table.,SELECT DISTINCT r_regionkey FROM region,SELECT DISTINCT r_regionkey FROM region,3.64534150430876,1,1,1,18 537,What is the average number of territories do each sales representative is in charge of?,SELECT CAST(COUNT(T2.TerritoryID) AS REAL) / COUNT(DISTINCT T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative',"SELECT CAST(SUM(IIF(T1.Title = 'Sales Representative', 1, 0)) AS REAL) / COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",3.7671748558707163,1,0,0,26 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 539,Which country has the most restaurants with Italian food?,SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1,SELECT t3.county FROM generalinfo AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city ORDER BY T1.food_type DESC LIMIT 1,-3.041964223800193,1,0,0,23 540,How many orders were shipped to Venezuela in 1996?,"SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND STRFTIME('%Y', ShippedDate) = '1996'","SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND STRFTIME('%Y', ShippedDate) = '1996'",4.570360559419819,1,1,1,25 541,What is the highest Quantity in the east_superstore table?,SELECT MAX(Quantity) FROM east_superstore,SELECT MAX(Quantity) FROM east_superstore,4.568769308283359,1,1,1,19 542,Please indicate the total price of order key 32.,SELECT o_totalprice FROM orders WHERE o_orderkey = 32,SELECT o_totalprice FROM orders WHERE o_orderkey = 32,3.3453214991348648,1,1,1,27 543,"For each CompanyName, how many records are there in Customers?","SELECT CompanyName, COUNT(Phone) FROM Customers GROUP BY CompanyName","SELECT CompanyName, COUNT(Phone) FROM Customers GROUP BY CompanyName",5.740830030114313,1,1,1,19 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 545,How many sales people are handling all the customers?,SELECT COUNT(EmployeeID) FROM Employees,SELECT COUNT(EmployeeID) FROM Employees,4.281554795135653,1,1,1,22 546,"What is the total profit of ""Memorex Froggy Flash Drive 8 GB in south superstore?",SELECT SUM(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product Name` = 'Memorix Froggy Flash Drive 8 GB',SELECT SUM(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID WHERE T2.`Product Name` = 'Memorex Froggy Flash Drive 8 GB',0.547146935578119,1,0,0,29 547,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.106522902217317,19,0,0,26 548,How many records are in the events table?,SELECT COUNT(`Submitted via`) FROM events,SELECT COUNT(`Submitted via`) FROM events,4.4626557072628135,1,1,1,23 549,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.35007485372478,19,0,0,28 550,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` AS t2 ON T1._SalesTeamID = t2.SalesTeamid,-0.28934733811492847,9,1,1,28 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 552,"In 2016, 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 '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2016%',4.378280799748311,1,1,1,25 553,How many products with the highest expected profits were sold in total?,SELECT SUM(t2.quantityOrdered) FROM orderdetails AS t2 INNER JOIN ( SELECT t1.productCode FROM products AS t1 ORDER BY t1.MSRP - t1.buyPrice DESC LIMIT 1 ) AS t3 ON t2.productCode = t3.productCode,SELECT COUNT(MSRP) FROM products WHERE productCode IN ( SELECT productCode FROM orderdetails WHERE quantityOrdered = 1 AND priceEach = 'Total' ) ORDER BY quantityOrdered DESC LIMIT 1,2.383491365498966,7,0,0,30 554,Write the shipping company name with the telephone number of (503) 555-9931.,SELECT CompanyName FROM Shippers WHERE Phone = '(503) 555-9931',SELECT CompanyName FROM Shippers WHERE Phone = '(503) 555-9931',0.9095791552534148,2,1,1,26 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 556,"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 T1.ProcuredDate LIKE '2019%',2.6779675213447547,1,0,0,28 557,What is the total quantityOrdered in the orderdetails table?,SELECT SUM(quantityOrdered) FROM orderdetails,SELECT SUM(quantityOrdered) FROM orderdetails,4.151560844427445,1,1,1,19 558,"In 2018, 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 '2018%',"SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.PostalVia = T2.ShipVia WHERE STRFTIME('%Y', T2.`OrderDate`) LIKE '2018%'",-1.4014949486031076,8,0,0,27 559,What is the total price in the price table?,SELECT SUM(price) FROM price,SELECT SUM(price) FROM price,5.135285213219256,1,1,1,20 560,Calculate the percentage of American cars among all cars.,SELECT CAST(SUM(CASE WHEN T3.country = 'USA' 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,"SELECT CAST(SUM(IIF(T2.country = 'USA', 1, 0)) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",-0.9026572771619422,6,0,0,28 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 562,What is the phone number of all companies where the last name of the contact person starts with the letter M and are not from Germany?,SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany',SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany',1.8637819118693049,2,1,1,21 563,How many records are in the Order Details table?,SELECT COUNT(ProductID) FROM `Order Details`,SELECT COUNT(ProductID) FROM `Order Details`,4.168924784157151,1,1,1,19 564,How many records in Sales Orders were recorded in 2019?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2019%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2019%',2.5546621231758806,1,1,1,27 565,How many records in Orders were recorded in 2022?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2022%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2022%',4.69216415425934,1,1,1,23 566,Pick 5 clients with 0 priority and write down their last name.,SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5,SELECT T4.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5,-2.034696172331132,5,0,0,30 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 569,Which Product ID has the highest Discount?,SELECT `Product ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Product ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,3.7680960726543127,1,1,1,25 570,"How many countries are there in the region whose comment description is ""asymptotes sublate after the r.""",SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_comment = 'asymptotes sublate after the r',SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1._regionkey = T2.r_regionkey WHERE T2.`comment description` = 'asymptotes sublate after the r',-2.8932195478452427,3,0,0,30 571,What is the stock value of every condiments?,SELECT T1.UnitPrice * T1.UnitsInStock FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,"SELECT CAST(SUM(IIF(T2.CategoryID = 'Condiments', 1, 0)) AS REAL) * 100 / COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.Categories = T2.Categories",-6.227244918459764,1,0,0,29 572,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 SUM(IIF(T2.l_shipmode = 'Ship', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE T1._orderpriority = '1-MEDIUM'",-5.089868057396249,2,0,0,25 573,List the distinct values of Type in the Store Locations table.,SELECT DISTINCT Type FROM `Store Locations`,SELECT DISTINCT Type FROM `Store Locations`,4.623211308038417,1,1,1,21 574,Calculate the percentage of part supply that costs more than 500.,"SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp",SELECT CAST(SUM(CASE WHEN ps_supplycost > 500 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp,3.6150835978572124,1,1,1,15 575,List the name of the top ten most ordered product's names in descending order of the number of orders.,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID GROUP BY T3.ProductName ORDER BY COUNT(*) DESC LIMIT 10,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID Database: retail_world` ORDER BY T2.Count DESC LIMIT 5,-6.212220994510703,27,0,0,30 576,How many records in Shippers were recorded in 2017?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2017%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2017%',4.412960505279923,1,1,1,23 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 578,What is the highest county in the geographic table?,SELECT MAX(county) FROM geographic,SELECT MAX(county) FROM geographic,1.9042390318031022,1,1,1,24 579,Find the number of customers handled by each of the sales people.,SELECT COUNT(CustomerID) FROM Sales GROUP BY SalesPersonID,SELECT COUNT(CustomerID) FROM Sales GROUP BY SalesPersonID,4.260563302097911,1,1,1,28 580,How many records in Orders were recorded in 2023?,SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2023%',SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2023%',4.875700360326731,1,1,1,22 581,"In 1997, how many orders were shipped via mail?","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1997' AND l_shipmode = 'MAIL'","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1997' AND L_shipmode = 'MAIL'",2.137714153711724,3,1,1,28 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 583,Which ProductName has the highest UnitPrice?,SELECT ProductName FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT ProductName FROM Products ORDER BY UnitPrice DESC LIMIT 1,2.970222456920592,1,1,1,21 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 585,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' ),2.14336890218409,5,0,0,22 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 587,How many records in orders were recorded in 2021?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2021%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2021%',4.860603963746542,1,1,1,22 588,The sales of how many territories is Nancy Davolio in charge of?,SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio',SELECT SUM(CASE WHEN T2.TerritoryID = 'Nancy Davolio' THEN 1 ELSE 0 END) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID,0.8568430709918483,5,0,0,24 589,How many records are in the Customers table?,SELECT COUNT(ContactTitle) FROM Customers,SELECT COUNT(ContactTitle) FROM Customers,4.858577923200564,1,1,1,20 590,List the distinct values of EmployeeID in the Employees table.,SELECT DISTINCT EmployeeID FROM Employees,SELECT DISTINCT EmployeeID FROM Employees,4.732550129264441,1,1,1,16 591,List the distinct values of Customer ID in the west_superstore table.,SELECT DISTINCT `Customer ID` FROM west_superstore,SELECT DISTINCT `Customer ID` FROM west_superstore,3.06645068596712,1,1,1,19 592,How many online purchases did Ole Group make in May 2019?,SELECT SUM(CASE WHEN T1.`Sales Channel` = 'Online' AND T2.`Customer Names` = 'Ole Group' AND T1.OrderDate LIKE '5/%/19' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,SELECT SUM(CASE WHEN T2.`Customer Names` = 'Online Purchases' AND T1.WarehouseCode = 'Ole Group' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,-0.4948818665908043,6,0,0,23 593,"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 M1.EmployeeID = M2.SalesPersonID INNER JOIN Products AS T3 ON ProductID = T3.ProductID ORDER BY T2.Quantity DESC LIMIT 1",-3.319772738535027,1,0,0,28 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 595,Give the full name of the youngest employee.,"SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM Employees )","SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM employees )",3.590990668592302,10,1,1,29 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 597,"For Which order was the most profitable, please list the customer name of the order and the profit of the order.","SELECT t3.customerName, (t1.priceEach - t4.buyPrice) * 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 INNER JOIN products AS t4 ON t1.productCode = t4.productCode GROUP BY t3.customerName, t1.priceEach, t4.buyPrice, t1.quantityOrdered ORDER BY (t1.priceEach - t4.buyPrice) * t1.quantityOrdered DESC LIMIT 1","SELECT customerName, priceEach FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1",3.0528153145880133,1,0,0,30 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 600,"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 601,"Among the customers in Asia, how many customers are in debt?",SELECT COUNT(T1.n_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_acctbal < 0 AND T3.r_name = 'ASIA',SELECT COUNT(T2.c_custkey) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = 'ASIA' AND T2.r_acctbal < 0,-3.2049878565507295,1,0,0,25 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 603,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,29 604,How many offices records have matching records in employees?,SELECT COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode,SELECT COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.OfficeCode,3.1545960473816805,16,1,1,26 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 606,How many records in Store Locations were recorded in 2022?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2022%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2022%',4.531000601842846,1,1,1,27 607,Which line item with the highest quantity is shipped by air?,SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'AIR' ORDER BY l_quantity DESC LIMIT 1,SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'AIR' ORDER BY l_quantity DESC LIMIT 1,4.258242642939207,1,1,1,23 608,List the name of all customers who had made orders online.,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,1.4383563681290443,8,1,1,28 609,List the distinct values of EmployeeID in the Orders table.,SELECT DISTINCT EmployeeID FROM Orders,SELECT DISTINCT EmployeeID FROM Orders,3.7368875748870978,1,1,1,17 610,List the name of the top ten items with the most quantity available in the descending order of availability.,SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey ORDER BY T2.ps_availqty DESC LIMIT 10,"SELECT T_name FROM ( SELECT T1.p_name, T2.ps_availqty FROM part AS T1 INNER JOIN partsupp AS T2 ON T1(p_partkey)) AS T ORDER BY T_size DESC LIMIT ten",-3.9194771978295435,1,0,0,30 611,List the distinct _CustomerID values linked to Products.,SELECT DISTINCT T2._CustomerID FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,SELECT DISTINCT T2._CustomerID FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,1.1576630472153995,2,1,1,26 612,List the distinct values of state_abbrev in the district table.,SELECT DISTINCT state_abbrev FROM district,SELECT DISTINCT state_abbrev FROM district,4.5739967119286575,1,1,1,17 613,"In restaurants with a review of 2, how many restaurants have a street number below 500?",SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500,"SELECT COUNT(T1.id_restaurant), SUM(T2.review) FROM location AS T1 INNER JOIN generalinfo AS T2 WHERE T1.street_num BETWEEN 2 AND 500",1.7873855778473997,6,0,0,30 614,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,3.7680960726543127,1,1,1,27 615,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,15 616,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 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,1.7691488085246179,3,1,1,28 617,Identify all restaurants in Contra Costa County by id.,SELECT T1.id_restaurant FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'contra costa county',SELECT t3.county FROM location AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city WHERE T1.id_restaurant = 'contra costa county',-2.5866895192474786,1,0,0,20 618,How many records are in the Orders table?,SELECT COUNT(EmployeeID) FROM Orders,SELECT COUNT(EmployeeID) FROM Orders,2.046806108159898,1,1,1,24 619,How many records are in the client table?,SELECT COUNT(first) FROM client,SELECT COUNT(first) FROM client,4.474103997787976,1,1,1,26 620,How many records in Employees were recorded in 2023?,SELECT COUNT(NOW) FROM Employees WHERE BirthDate LIKE '2023%',SELECT COUNT(NOW) FROM Employees WHERE BirthDate LIKE '2023%',4.5904187201585955,1,1,1,26 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 622,"Among all the customers, what is the percentage of the customer's nation being Germany?","SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey","SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2.N_Nationkey",3.8387790130529824,2,1,1,18 623,What is the total price charged for orders shipped by air without shipping instructions?,SELECT l_extendedprice * (1 - l_discount) * (1 + l_tax) AS totalprice FROM lineitem WHERE l_shipmode = 'AIR' AND l_shipinstruct = 'NONE',SELECT SUM(l_extendedprice) * (1 - l_discount) FROM lineitem WHERE l_shipmode = 'AIR',4.517979713506193,1,0,0,30 624,"In 2018, 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 '2018%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2018%',3.2578974223951658,3,1,1,30 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 627,How many orders were shipped in 1998?,"SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'",3.489673465544708,1,1,1,27 628,"Among the products that are no longer in continuous production, how many of them have their supplier in the USA?",SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'USA' AND T1.Discontinued = 1,SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.Country = 'USA',-2.34973806999143,9,0,0,30 629,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(first) FROM client GROUP BY client_id","SELECT Client_id, COUNT(first) FROM client GROUP BY client_id",5.101483010172825,1,1,1,18 630,"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 DISTINCT T1.Sales, T2.Profit, T3.`Sub-Category` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T3.Region = 'East'",1.3636564346995752,6,0,0,28 631,"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 client AS T2 ON T1.Client_ID = T2.client_id WHERE T2.`ser_time` LIKE '2021%',-0.9588096426177511,5,0,0,25 632,"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 T2.customerName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2._productCode INNER JOIN orders AS T3 ON T3.orderNumber = T4.orderLineNumber INNER JOIN customers AS T4 ON T4[customerNumber] = T5.customerNumber WHERE T0.productScale = '1:10' ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1,-3.365826250187919,2,0,0,24 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 634,"Provide order number, warehouse code of customers Elorac, Corp.","SELECT DISTINCT T1.OrderNumber, T1.WarehouseCode FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Elorac, Corp'","SELECT DISTINCT T1.OrderNumber, T2.`Customer Names` FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Elorac, Corp'",3.775966765410432,1,0,0,27 635,"Among all orders shipped, calculate the percentage of orders shipped at least 3 days before the required date.",SELECT COUNT(CASE WHEN JULIANDAY(t1.shippeddate) - JULIANDAY(t1.requireddate) > 3 THEN T1.customerNumber ELSE NULL END) FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.status = 'Shipped',"SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', t2.shippedDate) > '3' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t2.orderNumber) FROM orders AS t1 INNER JOIN orderdetails AS t2 WHERE t1.status = 'Shipped'",-2.3087136683241885,1,0,0,18 636,What is the average county in the geographic table?,SELECT AVG(county) FROM geographic,SELECT AVG(county) FROM geographic,1.7238943856944275,1,1,1,21 637,"In 1996, how many orders were from customers in the UK?","SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1996' AND T1.Country = 'UK'",SELECT COUNT(*) FROM ( SELECT COUNT(OrderDate) FROM Orders WHERE Country = 'UK' AND OrderDate LIKE '1996%' ) AS num,-0.9142481817781656,9,0,0,30 638,"List the product code of the top five motorcycles, by descending order, the number of quantity in stock.","SELECT productCode, quantityInStock FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5",SELECT productCode FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5,1.6521769195025626,1,0,0,29 639,"Among the orders made by customers in Germany, which one of them has the highest priority in delivery? Please give its order key.",SELECT T3.o_orderkey 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' ORDER BY T3.o_orderdate LIMIT 1,SELECT T3.o_orderkey FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2._custkey INNER JOIN orders AS T3 ON T2.c_name = 'GERMANY' ORDER BY T2.`o_clerk` DESC LIMIT 1,-2.2134467731223175,5,0,0,30 640,"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,25 641,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,20 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 643,Please list any three orders that caused a loss to the company.,SELECT `Order ID` FROM central_superstore WHERE Profit < 0 LIMIT 3,SELECT `Order ID` FROM central_superstore WHERE Profit > 3,3.512569477288966,1,0,0,30 644,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,7.137637499549893,1,1,1,24 645,How many records in events were recorded in 2021?,SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2021%',SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2021%',1.779794041378321,2,1,1,23 646,Give the product's name brought by Aaron Alexander.,SELECT DISTINCT T1.Name 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 T3.FirstName = 'Aaron' AND T3.LastName = 'Alexander',"SELECT DISTINCT T.FirstName, T.MiddleInitial, T2.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 T3.`CustomerID` = 'Aaron Alexander'",-3.891379040087832,3,0,0,29 647,Find the net profit of the floral products which were delivered in 2021.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.DeliveryDate LIKE '%/%/21' AND T2.`Product Name` = 'Floral'",SELECT SUM(CASE WHEN T2.`Product Name` = 'Floral' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.DeliveryDate LIKE '2021%',0.6967400306566935,2,0,0,30 648,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`,-1.0883419934589624,8,0,0,30 649,How many records are in the employees table?,SELECT COUNT(officeCode) FROM employees,SELECT COUNT(officeCode) FROM employees,4.281554795135653,1,1,1,26 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 651,"For each ProductID, what is the average Quantity?","SELECT ProductID, AVG(Quantity) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, AVG(Quantity) FROM `Order Details` GROUP BY ProductID",2.4057697593944316,1,1,1,17 652,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,1.484219125354764,1,1,1,26 653,"For each City, how many east_superstore records are linked?","SELECT T2.City, COUNT(T1.`Order 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.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`CustomerID` = T2.`Customer ID` GROUP BY T2._City",-0.5849258728967368,7,0,0,27 654,"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,27 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 656,Which ProductID has the highest Quantity?,SELECT ProductID FROM `Order Details` ORDER BY Quantity DESC LIMIT 1,SELECT ProductID FROM `Order Details` ORDER BY Quantity DESC LIMIT 1,2.751315914611514,1,1,1,24 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 658,How many customers are located in London?,SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London',SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London',4.575657378806123,1,1,1,22 659,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,30 660,"State the full name of state code ""GA"".","SELECT T FROM ( SELECT IIF(StateCode = 'GA', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL","SELECT T FROM ( SELECT IIF(StateCode = 'GA', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL",1.187220556193117,9,1,1,29 661,Calculate the percentage of manufactured parts by Manufacturer#3.,"SELECT CAST(SUM(IIF(p_mfgr = 'Manufacturer#3', 1, 0)) AS REAL) * 100 / COUNT(p_partkey) FROM part",SELECT CAST(SUM(CASE WHEN p_mfgr = 'Manufacturer#3' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(p_partkey) FROM part,4.490644721020928,1,1,1,26 662,What is the nationality of supplier number 1?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 1,SELECT T.n_name FROM ( SELECT AVG(s_suppkey) AS num FROM supplier ) WHERE T.num = 1,-2.0415214456277244,3,0,0,29 663,How many records in central_superstore were recorded in 2018?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2018%',1.3761424421645654,1,1,1,26 664,How many records in Orders were recorded in 2019?,SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2019%',SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2019%',5.25255107492374,1,1,1,25 665,How many cases of billing dispute issues occurred in the Mountain division?,SELECT COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.Issue = 'Billing disputes' AND T3.division = 'Mountain',SELECT CAST(COUNT(CASE WHEN T2.division = 'Billing disputes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.district_id) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.`client_id`,-5.333903230440277,20,0,0,26 666,How many records in payments were recorded in 2021?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2021%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2021%',4.198241534572536,1,1,1,21 667,State the customer name of orders which has shipped date in 7/8/2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' 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,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' 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,1.9642993910280548,1,1,1,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 669,Indicate the name of the categories to which the products of order number 10933 belong.,SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T2.OrderID = 10933,SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID LIKE '10933%',-2.7129456010987854,6,0,0,30 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 671,What is the county and region of Davis City?,"SELECT county, region FROM geographic WHERE city = 'Davis'","SELECT county, region FROM geographic WHERE city = 'Davis'",3.9463967056163036,1,1,1,23 672,"For each Region, how many south_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) 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.Product ID) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2._Region",-2.086741940238239,7,0,0,29 673,What is the average unit price of a Cookware product?,"SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Cookware'","SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Cookware'",1.9775676835651126,6,1,1,27 674,"In 2015, 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 '2015%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2015%',1.7579935829204043,8,1,1,28 675,How many chainring bolts were sold under sales ID 551971?,SELECT T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Chainring Bolts' AND T1.SalesID = 551971,SELECT SUM(CASE WHEN T2.Name = 'Chainring Bolts' THEN 1 ELSE 0 END) FROM Sales AS T1 INNER JOIN Products AS T2 WHERE T1.SalesID = 551971,0.08816778290103587,2,0,0,28 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 678,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.age) 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.age), T2.`phone Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = STRFTIME('%Y', T1.`age`) GROUP BY T2._Client_ ID",-8.177387413934007,23,0,0,25 679,"For each Product ID, how many records are there in east_superstore?","SELECT `Product ID`, COUNT(Order) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM east_superstore GROUP BY `Product id`",1.394592214025158,6,1,1,26 680,What is the average price of products that cost between 100 and 200?,SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200,SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200,3.83815416077436,1,1,1,24 681,"For each l_linestatus, how many records are there in lineitem?","SELECT l_linestatus, COUNT(l_orderkey) FROM lineitem GROUP BY l_linestatus","SELECT l_linestatus, COUNT(l_orderkey) FROM lineitem GROUP BY l_linestatus",1.1283732078070061,19,1,1,30 682,Please list all sale team names which had orders on 5/31/2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL,"SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/2018' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team`, T2.SalesTeamID ) WHERE T IS NOT NULL",0.6671285485755187,1,0,0,22 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 684,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(TerritoryID) DESC LIMIT 1,4.040579299892898,4,0,0,28 685,What are the most popular confections product and calculate the total sales generated by this product?,SELECT COUNT(T1.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T1.ProductID = T3.ProductID WHERE T2.CategoryName = 'Confections' GROUP BY T3.Quantity ORDER BY T3.Quantity DESC LIMIT 1,SELECT T2.Quantity FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2._CategoryID INNER JOIN `Order Details` AS T3 ON T2.`ProductID` = T3.ProductID ORDER BY SUM(T3.Quantity) DESC LIMIT 1,-1.9117357873385477,5,0,0,29 686,"Among the customers of empolyee 1370, who has the highest credit limit?Please list the full name of the contact person.","SELECT t2.contactFirstName, t2.contactLastName FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = t2.salesRepEmployeeNumber WHERE t1.employeeNumber = '1370' ORDER BY t2.creditLimit DESC LIMIT 1","SELECT contactFirstName, contactLastName FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber ORDER BY creditLimit DESC LIMIT 1",4.9210632521067295,1,0,0,21 687,"Indicate the profit of product Sauder Camden County Barrister Bookcase, Planked Cherry Finish.","SELECT DISTINCT T1.Profit FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Sauder Camden County Barrister Bookcase, Planked Cherry Finish'","SELECT CAST(SUM(IIF(T2.`Product Name` = 'Sauder Camden County Barrister Bookcase, Planked Cherry Finish', 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`",-3.993693858921734,2,0,0,24 688,How many records are in the Orders table?,SELECT COUNT(OrderID) FROM Orders,SELECT COUNT(OrderID) FROM Orders,3.1109523087002167,1,1,1,21 689,How many Planes orders were there?,SELECT COUNT(T1.productCode) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productLine = 'Planes',SELECT COUNT(MSRP) FROM orderdetails WHERE productLine = 'Planes',5.314105624927306,1,0,0,19 690,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 = 'ux Delices Vietnamese Restaurant', 1, 0)) AS REAL) * 100 / COUNT(T2.label) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant",3.7946356277548783,1,0,0,28 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 692,"For each Category, how many records are there in Sales by Category?","SELECT Category, COUNT(ProductSales) FROM `Sales by Category` GROUP BY Category","SELECT Category, COUNT(ProductSales) FROM `Sales by Category` GROUP BY Category",1.1951373301920047,1,1,1,21 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 694,How many records are in the central_superstore table?,SELECT COUNT(`Order ID`) FROM central_superstore,SELECT COUNT(`Order ID`) FROM central_superstore,4.058955478397152,1,1,1,21 695,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`Channel ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,29 696,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,20 697,How many cars with horsepower greater than 200 were produced in 1975?,SELECT COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower > 200 AND T2.model_year = 1975,SELECT COUNT(ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE model_year BETWEEN 200 AND 1975,2.5673891800606294,5,0,0,30 698,"For each ProductID, how many Order Details records are linked?","SELECT T2.ProductID, COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.`ProductID Database: retail_world` = T2.`CustomerID` GROUP BY T2'sProductID",-7.640121747046319,22,0,0,29 699,What is the average Profit for joined east_superstore and people records?,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`Customer ID`,1.6215291294679084,5,1,1,26 700,List the order key of the orders with a total price between 200000 and 300000.,SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000,SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000,2.2469881928827093,1,1,1,27 701,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 702,Make a list of all the territories in the Southern region.,SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern',SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.`RegionID` = T2.RegionID WHERE T3.RegionDescription = 'Southern',-3.730773326540303,10,0,0,29 703,What is the name of the contact person of the Pavlova supplier company?,SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Pavlova',SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.'SupplierID',-5.41255207915475,29,0,0,30 704,Name the part which is most profitable.,"SELECT T.p_name FROM ( SELECT T3.p_name , T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity AS num 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 ) AS T ORDER BY T.num DESC LIMIT 1","SELECT T.p_name, T.l_extendedprice * (1 - T1.ps_supplycost) * T.L_quantity FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1._suppkey = STRFTIME('%Y', T2._l_shipdate) AS T ORDER BY T.mfgr DESC LIMIT 1",-0.5758396310702334,1,0,0,30 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 706,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,30 707,List the distinct values of l_linestatus in the lineitem table.,SELECT DISTINCT l_linestatus FROM lineitem,SELECT DISTINCT l_linestatus FROM lineitem,4.5739967119286575,1,1,1,17 708,"Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?",SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN `Sales Channel` = 'In-Store' AND WarehouseCode = 'WARE-NMK1003' AND `Discount Applied` = '0.4' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE WarehouseCode = 'WARE-NMK1003' AND `Discount Applied` = 0.4 AND `Sales Channel` = 'In-Store' AND OrderDate LIKE '%/%/18',-0.16771771426126958,8,0,0,30 709,List the top five most costly products in 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.OrderDate LIKE '1998%' ORDER BY T3.UnitPrice + T1.Freight DESC LIMIT 5,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID INNER JOIN Products AS T3 WHERE T1.OrderDate = '1998-01-01',-6.884709579519233,26,0,0,30 710,"Among the elderlies, state the last name of whose complaint is handled in server YIFAT?",SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.age > 65 AND T2.server = 'YIFAT',SELECT T0.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'YIFAT',-1.5630698359695399,4,0,0,28 711,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.Customer ID FROM east_superstore AS T1 INNER JOIN west_superStore AS T2 ON T1.`Customer ID` = T2.`Card ID`,1.2642776408001093,1,0,0,28 712,"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 CASE WHEN T2.County = 'Maricopa County' 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.05680324057272782,2,0,0,29 713,"For each Customer ID, how many people records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Order ID` = T2.`OrderItem ID` GROUP BY T2._Customer ID",-1.3484958076648672,8,0,0,30 714,What is the highest UnitPrice in the Order Details table?,SELECT MAX(UnitPrice) FROM `Order Details`,SELECT MAX(UnitPrice) FROM `Order Details`,4.626232883631512,1,1,1,20 715,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 STRFTIME('%Y', T2.`age`) = ( SELECT MAX(age) FROM client )",-4.022695531384127,4,0,0,30 716,"What is the total quantity of ""Telescoping Adjustable Floor Lamp"" ordered from central superstores?",SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Telescoping Adjustable Floor Lamp',SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID WHERE T2.`Product Name` = 'Telescoping Adjustable Floor Lamp',1.3283693646131736,1,0,0,29 717,What are the highest salary earn by the the employee and what is his/her position in the company?,"SELECT Salary, Title FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )","SELECT MAX(Salary) , Title FROM Employees ORDER BY Salary DESC LIMIT 1",1.6305071887708789,1,0,0,29 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 719,How many records are in the client table?,SELECT COUNT(age) FROM client,SELECT COUNT(age) FROM client,4.474103997787976,1,1,1,20 720,How do I contact the President of the company?,SELECT t.email FROM employees t WHERE t.jobTitle = 'President',SELECT t.email FROM employees t WHERE t.jobTitle = 'President',5.589768377451869,1,1,1,25 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 722,Which Customer ID has the highest Sales?,SELECT `Customer ID` FROM south_superstore ORDER BY Sales DESC LIMIT 1,SELECT `Customer ID` FROM south_superstore ORDER BY Sales DESC LIMIT 1,2.465633925434841,1,1,1,27 723,"What is the total production of the products from the supplier ""Escargots Nouveaux""?",SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Escargots Nouveaux',SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'Escargots Nouveaux' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,5.843092059017411,1,0,0,27 724,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 REPLACE(T1.`Date received Database: retail_complains`, ',', '') FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = STRFTIME('%Y', T2.`Submitted via`) = 'Fax'",-6.387686801496666,18,0,0,29 725,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 NOT LIKE '%@gmail.com',-0.29175115815922015,9,1,1,21 726,How many customers from the furniture segments come from Iraq?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ',"SELECT COUNT(IIF(T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ' , 1, 0)) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1._custkey = T2._nationkey WHERE STRFTIME('%Y', T2.`c_acctbal) = 1",-0.9640238740396262,2,0,0,29 727,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(ProductName) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(ProductName) FROM Products GROUP BY CategoryID",4.914943716569838,1,1,1,18 728,List down the company names that have the highest reorder level.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID ORDER BY T1.ReorderLevel ASC,-5.976121334580537,24,0,0,30 729,Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.,"SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1","SELECT ProductID, Name FROM Products ORDER BY Price DESC LIMIT 1",3.2959686530098136,1,0,0,30 730,What is the highest Quantity in the central_superstore table?,SELECT MAX(Quantity) FROM central_superstore,SELECT MAX(Quantity) FROM central_superstore,4.961034746521523,1,1,1,20 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 732,Identify all the restaurants in Marin County by their id.,SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county',SELECT T4.id_restaurant FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'marin county',-1.4163349314299811,10,0,0,20 733,"For each ProductID, what is the average Price?","SELECT ProductID, AVG(Price) FROM Products GROUP BY ProductID","SELECT ProductID, AVG(Price) FROM Products GROUP BY ProductID",4.128019882299922,1,1,1,16 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 735,How many complaints on credit cards in the year 2016 were filed by male clients?,"SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card'",SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',3.895548961939772,1,0,0,29 736,How many records in orders were recorded in 2022?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2022%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2022%',4.860603963746542,1,1,1,22 737,List the distinct values of City in the Employees table.,SELECT DISTINCT City FROM Employees,SELECT DISTINCT City FROM Employees,5.1121551324071595,1,1,1,19 738,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(ProductID) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(ProductID) FROM Products GROUP BY CategoryID",5.271174303156182,1,1,1,21 739,What is the name of the country of the supplier with the highest debt?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_suppkey DESC LIMIT 1,SELECT T.n_name FROM ( SELECT MIN(s_acctbal) AS debt FROM supplier ) AS T ORDER BY T.s_name DESC LIMIT 1,-1.6777995517238926,2,0,0,27 740,What is the average UnitPrice for joined Products and Order Details records?,SELECT AVG(T2.UnitPrice) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T2.UnitPrice) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductId,-0.5404932107122092,5,1,1,26 741,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 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 743,How many Australian customers who have credit line under 220000?,SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Australia',SELECT COUNT(creditLimit) FROM customers WHERE creditLimit > 220000 AND country = 'Australia',0.3927829349473405,5,0,1,30 744,How many records in events were recorded in 2019?,SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2019%',SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2019%',5.709770768212599,1,1,1,25 745,List the store located cities with regions in no water area of California state.,SELECT DISTINCT T2.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'California' AND T2.`Water Area` = '0',SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`City Name` = 'California' 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.8571387274139934,1,0,0,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 747,Name products and their quantity ordered by the company 'GROSELLA-Restaurante' in the sales order that was processed by Nancy Davolio.,"SELECT T4.ProductName, T3.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID INNER JOIN Customers AS T5 ON T2.CustomerID = T5.CustomerID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T5.CompanyName = 'GROSELLA-Restaurante'","SELECT T4.ProductName, T2.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.`OrderID Database: retail_world` = T3 WHERE T3.CompanyName = 'GROSELLA-Restaurante' AND T5.OrderID = ( SELECT MAX(Quantity) FROM Products )",-6.10930209147566,26,0,0,28 748,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 FirstName, MiddleInitial, LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Customers AS T3 ON T2.MiddleInitial = T3.CustomerID ORDER BY SUM(T2.Quantity) DESC LIMIT 1",-3.5484999157674078,2,0,0,30 749,How many complaints have the client Diesel Galloway filed?,SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`galloway filed` LIKE 'Diesel Galloway%',1.1730934182384198,12,0,0,22 750,How many restaurants are on Irving Street?,SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving',SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving',2.203965808740351,1,1,1,24 751,"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,26 752,"In 2020, 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 LIKE '2020%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Card ID` = T2.`CustomerID` WHERE T2.Ship LIKE '2020%',-0.8621523588502984,12,0,0,30 753,"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 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Ship Mode LIKE '2019%',-0.22073208908131747,4,0,0,30 754,What is the total number of orders made by customers in United States?,SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey INNER JOIN nation AS T3 ON T2.c_nationkey = T3.n_nationkey WHERE T3.n_name = 'UNITED STATES',"SELECT SUM(IIF(T2.n_name = 'United States', 1, 0)) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_acctbal",-1.5384045323644688,1,0,0,23 755,What is the name of product with the ID of 77?,SELECT ProductName FROM Products WHERE ProductID = 77,SELECT ProductName FROM Products WHERE ProductID = 77,4.109981628474669,1,1,1,26 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 757,Please calculate the number of clients by each division.,"SELECT T2.division, COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division",SELECT CAST(COUNT(CASE WHEN T2.division = 'division' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1: district_id,-4.000069724675209,1,0,0,23 758,Which product of Exotic Liquids company that have the highest reorder levels?,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' ORDER BY T1.ReorderLevel DESC LIMIT 1,SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Exotic Liquids' ORDER BY ReorderLevel DESC LIMIT 1,-5.142674629937487,1,0,0,29 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 760,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 COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country WHERE T1.`price Database: cars` LIKE 'USA%' AND T3.`country` = 'USA',-6.6146836540742235,27,0,0,30 761,"How many items were shipped on 4th December, 1993?",SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipdate = '1993-12-04',"SELECT COUNT(l_linenumber) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1993'",3.0263026622769997,1,0,0,26 762,What is the total Amount in the Sales Totals by Amount table?,SELECT SUM(Amount) FROM `Sales Totals by Amount`,SELECT SUM(Amount) FROM `Sales Totals by Amount`,3.625246724625693,1,1,1,23 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 766,How many orders have asked for the product Tofu?,SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Tofu',SELECT COUNT(*) FROM `Order Details` WHERE Tofu = ( SELECT COUNT(OrderID) FROM Products WHERE T1.ProductName = 'Tofu' ),0.17826665673573197,1,0,0,27 767,In what years were the clients who demanded more problems with Certificate of deposit born?,SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1,SELECT MIN(T1.year) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = 'Certificate of deposit born',-0.11455458874360017,1,0,0,26 768,"In 2023, 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 '2023%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2023%',1.6966190930446512,4,1,1,25 769,What is the average Discount for joined people and central_superstore records?,SELECT AVG(T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.4368266782895212,7,0,1,28 770,Which state has the highest number of clients who gave a 5-star review?,SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) DESC LIMIT 1,SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id ORDER BY COUNT(T1.Stars) DESC LIMIT 5,5.3425484337872815,1,0,0,30 771,List down the full name of clients who have disputed the response from company.,"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.`Consumer disputed?` = 'Yes'",SELECT T3.Consumer_ID FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer disputed?` = 'Yes',2.08607843732891,1,0,0,28 772,How many orders through distributor were for the minimum quantity?,SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`,SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`,3.538651903831531,1,1,1,30 773,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 T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T1.SupplierID = ( SELECT IIF(T1.ProductName = 'Aniseed Syrup' , 1, 0))",1.1376625076576368,14,0,0,24 774,Which is the origin country of the $44274.40748 car?,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 WHERE T1.price = 44274.40748,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 = T4.country WHERE T1.`price Database: cars` = 44274.40748,-5.80595470121392,1,0,0,30 775,"In the West, how many stores are there in the city whose land area is below 20,000,000?",SELECT SUM(CASE WHEN T1.Region = 'West' AND T2.`Land Area` < 20000000 THEN 1 ELSE 0 END) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode,SELECT COUNT(T2.StoreID) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1._StateCode WHERE T1.`Land Area` < 20 AND T2.`City Name` = 'West',-2.497366988628605,10,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 777,What is the average Discount for joined Products and Order Details records?,SELECT AVG(T2.Discount) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T2.Discount) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.productID,0.1361369320296367,5,1,1,26 778,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 DESC LIMIT 1,0.8922136917990824,1,0,0,28 779,"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,19 780,List restaurant ids located in Danville city.,SELECT id_restaurant FROM location WHERE city = 'Danville',SELECT id_restaurant FROM location WHERE city = 'Danville',4.160762766797156,1,1,1,28 781,"For each country, how many data records are linked?","SELECT T2.country, COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID GROUP BY T2.country","SELECT T2.`country`, COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1. ID = T2.ID GROUP BY T2.'country'",-0.6422097350873044,6,0,0,29 782,Which country has the least number of suppliers?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey GROUP BY T1.s_nationkey ORDER BY COUNT(T1.s_name) LIMIT 1,SELECT T.n_name FROM ( SELECT MIN(s_suppkey) AS num FROM supplier ) AS T ORDER BY T.num LIMIT 1,-2.7311750860646993,4,0,0,28 783,Give the street number of a bar in Oakland with a 2.7 review.,SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar',"SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2._id_ restaurant WHERE t1.food_type = 'bar' AND t2.city = 'oakland' AND strftime('%Y', T2.`review`) = '2.7'",1.226661015506362,3,0,0,28 784,"For each productCode, what is the average quantityInStock?","SELECT productCode, AVG(quantityInStock) FROM products GROUP BY productCode","SELECT productCode, AVG(quantityInStock) FROM products GROUP BY productCode",3.041160148502155,1,1,1,21 785,How many records in events were recorded in 2015?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2015%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2015%',0.9721202878798406,1,1,1,22 786,Who ordered the Bush Mission Pointe Library in the Central Region?,SELECT DISTINCT T2.`Customer Name` FROM central_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` = 'Bush Mission Pointe Library' AND T3.Region = 'Central',"SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Bush Mission Pointe Library' AND T2.Region = 'Central'",2.6399245465759056,1,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 788,"For each Type, what is the average County?","SELECT Type, AVG(County) FROM `Store Locations` GROUP BY Type","SELECT Type, AVG(County) FROM `Store Locations` GROUP BY Type",3.5457654445587097,1,1,1,21 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 791,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,20 792,"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 SUM(CASE WHEN T1.`Discount Applied` = 5 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,0.4308507829472991,6,0,0,30 793,How many records in Store Locations were recorded in 2017?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2017%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2017%',4.531000601842846,1,1,1,24 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 795,What are the names of the suppliers whose products have the highest user satisfaction?,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID ORDER BY T1.ReorderLevel DESC LIMIT 1,-6.711317726182812,1,0,0,28 796,Who is the sales representitive of Muscle Machine Inc? Please give the employee's full name.,"SELECT t2.firstName, t2.lastName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'","SELECT firstName, lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.firstName = 'Muscle Machine Inc'",3.357386429276219,1,0,0,27 797,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 CAST(SUM(IIF(T1.car_name = 'chevrolet vega 2300', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",5.801893757037787,1,0,0,24 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 799,"Clerk#000000936 dealt with a ""Not Specified"" order on 1995/3/13, what was the charge for the part of the order shipped by truck?",SELECT T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax) AS num FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_clerk = 'Clerk#000000936' AND T2.l_shipmode = 'TRUCK' AND T1.o_orderstatus = '4-NOT SPECIFIED' AND T1.o_orderdate = '1995-03-13',"SELECT CAST(SUM(IIF(T2.l_shipmode = 'TRUCK', 1, 0)) AS REAL) * 100 / COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON STRFTIME('%Y', T1._orderdate) = '1995-03-13' AND T1. o_clerk = 'Clerk#000000936'",-0.866810539761878,3,0,0,29 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 801,How many records in Store Locations were recorded in 2020?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2020%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2020%',4.531000601842846,1,1,1,29 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 804,How many records in events were recorded in 2016?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2016%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2016%',0.9721202878798406,1,1,1,21 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 806,"Among the customers from Houston, Texas, what is the total profit of their orders in the Central region?",SELECT SUM(T2.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.City = 'Houston' AND T1.State = 'Texas' AND T2.Region = 'Central',SELECT SUM(CASE WHEN T1.City = 'Houston' AND T2.Region = 'Texas' THEN 1 ELSE 0 END) AS totalProfit,-5.3604349051528954,4,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 808,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 T2.ProductID FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2._OrderID,-0.3432838843967356,2,0,0,30 809,"What is the address of the client who made a complaint via postal mail on March 14, 2012?","SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-03-14' AND T2.`Submitted via` = 'Postal mail'",SELECT T3.`Submitted via` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-03-14',-0.9005643243175047,2,0,0,24 810,List the distinct acceleration values linked to price.,SELECT DISTINCT T2.acceleration FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.acceleration FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,1.565677225365341,8,1,1,28 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 813,"What is the supply cost for the part ""violet olive rose ivory sandy""?",SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'violet olive rose ivory sandy',"SELECT CAST(SUM(IIF(T1.p_name = 'violet olive rose ivory sandy', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",1.9328012477979546,1,0,0,19 814,"What is the quantity of the part ""burnished seashell gainsboro navajo chocolate"" ordered in order no.1?",SELECT T1.l_quantity FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate',SELECT l_quantity FROM lineitem WHERE l_orderkey = 1 AND p_name = 'burnished seashell gainsboro navajo chocolate',1.4954672575550172,1,0,0,29 815,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 Categories AS T4 ON T3[CategoryID] = T4.CategoryID ORDER BY COUNT(T1.OrderID) DESC LIMIT 1",-7.506674159363944,2,0,0,29 816,List priority 2 complaints by date received.,SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC,SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC,1.6431956388088245,2,1,1,27 817,How many orders were made by customers who live in Texas at the Central superstore?,SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.State = 'Texas',SELECT COUNT(T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.State = 'Texas' AND T2.Order ID = 'Central',0.30625686111482353,3,0,0,30 818,"Give the contact name of the supplier for the product ""Gudbrandsdalsost"".",SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gudbrandsdalsost',"SELECT CAST(SUM(IIF(T1.ProductName = 'Gudbrandsdalsost', 1, 0)) AS REAL) * 100 / SUM(T2.ContactName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.Suppliers",-4.052336353220377,19,0,0,30 819,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 BETWEEN 10000 AND 10000,1.7971795540870341,2,0,0,25 820,"Who order from the west region on August 12, 2013, and received a discount of 0.2?",SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order Date` = '2013-08-12' AND T1.Discount = 0.2 AND T1.Region = 'West',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.Discount = 0.2,2.607581230486063,1,0,0,30 821,What is the total Discount in the east_superstore table?,SELECT SUM(Discount) FROM east_superstore,SELECT SUM(Discount) FROM east_superstore,4.62380479920519,1,1,1,20 822,How many records in events were recorded in 2021?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2021%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2021%',5.2423417437044275,1,1,1,27 823,How many Borough-type stores located in the city of Brooklyn have a population of less than 3 million?,SELECT SUM(CASE WHEN Population < 3000000 AND Type = 'Borough' AND `City Name` = 'Brooklyn' THEN 1 ELSE 0 END) FROM `Store Locations`,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `City Name` = 'Brooklyn' AND Population < 3,0.5146215869622524,1,0,0,30 824,List the distinct Type values linked to Sales Orders.,SELECT DISTINCT T2.Type FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID,SELECT DISTINCT T2.Type FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS t2 ON T1._StoreID = t2.StoreID,2.064717912614034,1,1,1,27 825,"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_name = 'railroad' AND street_num < 1000,2.286328970296554,2,1,1,21 826,Please list the phone numbers of all the suppliers for the parts ordered in order no.1.,SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 1,SELECT l_phone FROM lineitem AS l_linenumber WHERE l_orderkey = 1,-1.2343259204609793,1,0,0,30 827,"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`",0.05557500025436668,8,1,1,27 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 830,List the 5 sales teams that have made sales with the highest net profits.,"SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 5","SELECT T FROM ( SELECT IIF(T2.`Sales Team` = 'Net profits', 1, 0)) AS T ORDER BY T DESC LIMIT 5",-0.5940826778419658,1,0,0,29 831,"In 2017, 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 T2.`Timely response?` LIKE '2017%',SELECT COUNT(T1.`Operator ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` LIKE '2017%',-1.1250243068796493,5,0,0,30 832,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 SUM(IIF(T2.o_orderpriority = '1-URGENT', 1, 0)) FROM lineitem AS T1 INNER JOIN orders AS T2 ON T1.l_orderkey = T2._orderkey WHERE T1._shipdate = 'Y-m-d H:i:s'",-3.2504321489077785,2,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 834,"For each Product ID, what is the average Profit?","SELECT `Product ID`, AVG(Profit) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Profit) FROM east_superstore GROUP BY `Product id`",1.0082283918203707,4,1,1,27 835,Name of customer whose order is applied with the highest discount.,SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey ORDER BY T2.l_discount DESC LIMIT 1,SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_Orderkey INNER JOIN customer AS T3 ON T2->c_custkey = 3 ORDER BY l_discount DESC LIMIT 1,-0.928595305694973,10,0,0,25 836,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 DISTINCT T3.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T0.food_type = 'pizza',-4.141931063318477,10,0,0,30 837,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 AVG(T1.weight) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.`price` > 40000,-4.734469863563395,19,0,0,30 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 839,"Among the clients in Middle Atlantic, how many are them are female and no more than 18 years old?",SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Middle Atlantic' AND T1.sex = 'Female' AND T1.age < 18,SELECT COUNT(CASE WHEN T1.sex = 'Middle Atlantic' AND T2.division = 'Female' AND COUNT(T1.age) > 18 THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN district AS T2 ON T1._district_id = T2 . district_id,-1.274505556122078,5,0,0,21 840,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,22 841,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer complaint narrative`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer complaint narrative`) FROM events GROUP BY client_id",2.323295767256636,1,1,1,19 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 844,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 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.`car_name Database: cars` = 'chevy c20',-6.102708380981822,1,0,0,18 845,How many records are in the Orders table?,SELECT COUNT(Freight) FROM Orders,SELECT COUNT(Freight) FROM Orders,3.1109523087002167,1,1,1,21 846,Please indicate total order quantity of product Geitost and calculate the percentage of such product among all the order quantity.,"SELECT SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS sum , CAST(SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID",SELECT CAST(SUM(CASE WHEN T1.ProductName = 'Geitost' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.ProductID) FROM Products AS T1 INNER JOIN `Order Details`',-7.175764721446197,1,0,0,29 847,Calculate the percentage of countries that belong to the American region.,"SELECT CAST(SUM(IIF(T1.r_name = 'America', 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey","SELECT CAST(SUM(IIF(T2.n_name = 'ASIA', 1, 0)) AS REAL) * 100 / COUNT(T1.r_regionkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.regionkey = T2._regionkey WHERE T1.`r_name` = 'USA'",-3.6729741611199116,12,0,0,19 848,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,26 849,Which productCode has the highest quantityOrdered?,SELECT productCode FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1,SELECT productCode FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1,3.7166281856852397,1,1,1,29 850,"Which order has a higher priority, order no. 4 or order no. 36?","SELECT l_orderkey FROM lineitem WHERE l_orderkey IN (4, 36) ORDER BY l_shipdate DESC LIMIT 1",SELECT l_orderkey FROM lineitem WHERE l_priority = 4 AND l_receiptdate = 36,-1.2237521733732768,2,0,0,30 851,"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,21 852,How much is the Volkswagen Dasher with 14.1 mph acceleration?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'volkswagen dasher' AND T1.acceleration = '14.1',"SELECT CAST(SUM(IIF(T1.car_name = 'volkswagen dasher with 14.1 mph acceleration', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",1.4314797756562494,8,0,0,24 853,What percentage of complaints are from the elderly?,SELECT CAST(SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT CAST(SUM(CASE WHEN T2.Client_ID = 'Elderly' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2 . Client_ID,1.3849818640257558,6,0,0,26 854,Which productCode has the highest quantityInStock?,SELECT productCode FROM products ORDER BY quantityInStock DESC LIMIT 1,SELECT productCode FROM products ORDER BY quantityInStock DESC LIMIT 1,2.267579984910052,1,1,1,26 855,"For each City, how many records are there in Suppliers?","SELECT City, COUNT(HomePage) FROM Suppliers GROUP BY City","SELECT City, COUNT(HomePage) FROM Suppliers GROUP BY City",5.573540162828874,1,1,1,19 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 857,Give the number of Moroccan customers whose account is in debt.,SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'MOROCCO' AND T1.c_acctbal < 0,"SELECT CAST(SUM(IIF(T2.n_name = 'MOROCC', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2. n_name",2.837785462259841,3,0,0,18 858,List all the customer company names and cities located in Canada.,"SELECT CompanyName, City FROM Customers WHERE Country = 'Canada'","SELECT CompanyName, City FROM Customers WHERE Country = 'Canada'",4.331591136744747,1,1,1,19 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 860,How many records in Sales Orders were recorded in 2017?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2017%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2017%',2.5546621231758806,1,1,1,24 861,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(ReorderLevel) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(ReorderLevel) FROM Products GROUP BY ProductID",4.957144497985576,1,1,1,17 862,"What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42?","SELECT ( SELECT Price FROM Products WHERE Name = 'HL Mountain Frame - Black, 42' ) - ( SELECT Price FROM Products WHERE Name = 'LL Mountain Frame - Black, 42' ) AS num","SELECT SUM(Price) FROM Products WHERE Name = 'HL Mountain Frame - Black, 42'",3.4302310537459606,1,0,0,30 863,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 864,How many south_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.678180644731282,8,1,1,27 865,Indicate the quantity of Blade products sold.,SELECT DISTINCT T2.Quantity FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Blade',"SELECT CAST(SUM(IIF(T1.Name = 'Blade', 1, 0)) AS REAL) * 100 / COUNT(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",5.743576240688024,1,0,0,23 866,"For each Product, how many records are there in reviews?","SELECT Product, COUNT(district_id) FROM reviews GROUP BY Product","SELECT Product, COUNT(district_id) FROM reviews GROUP BY Product",3.2614040037227507,1,1,1,22 867,"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 AVG(Quantity) FROM Customers WHERE FirstName = 'Valdez' ORDER BY Quantity DESC LIMIT 1,3.363701730947934,1,0,0,27 868,How much higher is the salary of Andrew Fuller than that of Nancy Davolio?,SELECT ( SELECT Salary FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) - ( SELECT Salary FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' ) AS RESULT,SELECT ( SELECT MAX(Salary) FROM Employees WHERE FirstName = 'Andrew' GROUP BY Salary ) AS MAX,-2.1697100141330905,2,0,0,29 869,"Among the cars from Asia, list the IDs of cars that were introduced in 1979.",SELECT T1.ID FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Japan' AND T1.model_year = 1979,SELECT T3.origin FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.`model_year Database: cars` = '1979',-6.447567787073786,24,0,0,30 870,Which region is Joshua Bennet located in?,SELECT T FROM ( SELECT DISTINCT CASE WHEN `Sales Team` = 'Joshua Bennett' THEN Region ELSE NULL END AS T FROM `Sales Team` ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN Region = 'Joshua Bennet' THEN Region ELSE NULL END AS T FROM `Sales Team` ) WHERE T IS NOT NULL,0.4907394669238686,2,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 872,"How many products were supplied by Pavlova, Ltd.?","SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'","SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.CompanyName = 'Pavlova, Ltd.'",1.0603064121593377,2,0,0,27 873,"Please list the names of all the customers who had ordered the product ""Telescoping Adjustable Floor Lamp"".",SELECT 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',SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Telescoping Adjustable Floor Lamp' THEN T1.`Customer Name` ELSE NULL END AS T FROM people AS T1 INNER JOIN central_superstore AS T2 ON T3.`Customer ID` = T1.Customer ID ) WHERE T IS NOT NULL,-4.132815884123113,1,0,0,30 874,List by their ID the complaints received by the company on 25/09/2014 that took the longest.,"SELECT `Complaint ID` FROM events WHERE strftime('%J', `Date sent to company`) - strftime('%J', `Date received`) = ( SELECT MAX(strftime('%J', `Date sent to company`) - strftime('%J', `Date received`)) FROM events WHERE `Date sent to company` = '2014-09-25' ) AND `Date sent to company` = '2014-09-25'",SELECT `Complaint ID` FROM events WHERE `Date sent to company` = '2014-09-25',3.423111748472986,1,0,0,29 875,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.Order) 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 Date`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2._Product ID",-1.6847395696134277,6,0,0,30 876,How many employees are there in Sydney?,SELECT COUNT(employeeNumber) FROM employees WHERE officeCode = ( SELECT officeCode FROM offices WHERE city = 'Sydney' ),SELECT COUNT(employeeNumber) FROM employees AS T1 INNER JOIN offices AS T2 ON officeCode = T1.officeCode WHERE T2.city = 'Sydney',2.1865033966827556,4,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 878,Please calculate the total payment amount of customers who come from the USA.,SELECT SUM(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.country = 'USA',SELECT SUM(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customernumber = T2.customerNumber WHERE t2.country = 'USA',6.090288159371342,1,1,1,17 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 880,List the distinct car_name values linked to price.,SELECT DISTINCT T2.car_name FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.car_name FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,4.211148065032614,2,1,1,24 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 882,"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,19 883,How many records are in the Sales by Category table?,SELECT COUNT(ProductSales) FROM `Sales by Category`,SELECT COUNT(ProductSales) FROM `Sales by Category`,3.251157247000616,1,1,1,23 884,How many clients under the age of 35 gave Eagle National Mortgage 1 star?,SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35,SELECT SUM(CASE WHEN T1.Product = 'Eagle National Mortgage' AND T2.age = 35 THEN 1 ELSE 0 END) AS num FROM reviews AS T1 INNER JOIN client AS T2 ON T1.`district_id Database: retail_complains` = T2.`district2_id`,-5.669108190952867,21,0,0,30 885,What is the highest Discount in the central_superstore table?,SELECT MAX(Discount) FROM central_superstore,SELECT MAX(Discount) FROM central_superstore,4.961034746521523,1,1,1,23 886,List the full names and phone numbers of clients that were from the Pacific.,"SELECT T1.first, T1.middle, T1.last, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific'","SELECT first, middle, last, phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.division = 'Pacific'",3.2877445118590702,1,0,0,25 887,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) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2._OrderID INNER JOIN Shippers AS T3 ON T2.ShipVia = T3.ShipperID WHERE T4.CompanyName = 'Speedy Express',1.4878791552983899,1,0,0,29 888,"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 T1 INNER JOIN orders AS T2 ON T1.salesRepEmployeeNumber = T2.orderNumber WHERE t1.customerName = 'DHL' AND t2.shippedDate = '2005-04-04'",2.150280116871707,2,0,0,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 890,"How many kinds of products are there in the the category of ""dairy products""?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products',SELECT COUNT(CASE WHEN T2.CategoryName = 'Dairy Products' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2 . CategoryID,1.210154243172933,8,0,0,23 891,List the distinct values of StateCode in the state table.,SELECT DISTINCT StateCode FROM state,SELECT DISTINCT StateCode FROM state,3.0429959203251267,1,1,1,15 892,How many orders have been shipped through 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',3.4445852422842687,18,1,1,28 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 894,Identify the customer and list down the country with the check number GG31455.,"SELECT t2.customerName, t2.country FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.checkNumber = 'GG31455'","SELECT customer, country FROM ( SELECT customerNumber, checkNumber FROM payments WHERE customerNumber = 'GG31455' ) GROUP BY customerNumber",-1.3790156383122902,1,0,0,30 895,How many records are in the offices table?,SELECT COUNT(officeCode) FROM offices,SELECT COUNT(officeCode) FROM offices,4.233836292305277,1,1,1,17 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 897,How many complaints from female clients born in the year 2000 were not sent through the web?,SELECT COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T1.year = 2000 AND T2.`Submitted via` != 'Web',"SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Female' AND strftime('%Y', T1.`year Database: retail_complains`) = '2000' AND T1 .sex = 'Yes'",-6.1636653268029375,27,0,0,30 898,"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,25 899,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 DISTINCT OrderNumber FROM `Sales Orders` WHERE deliveryDate LIKE '6/13/18%',0.6035215403949401,2,0,0,24 900,"List the name, address, and phone number of companies that supply products for more than thirty dollars per unit.","SELECT T2.CompanyName, T2.Address, T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitPrice > 30","SELECT T2.CompanyName, T3.Address, T4.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T1.`UnitPrice Database: retail_world` > 100",-8.158024597103186,2,0,0,30 901,What is the average Quantity in the central_superstore table?,SELECT AVG(Quantity) FROM central_superstore,SELECT AVG(Quantity) FROM central_superstore,4.6819763872133136,1,1,1,20 902,"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 DISTINCT 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 = T4.`Product ID` WHERE T3.`Product Name` = 'Hon Multipurpose Stacking Arm Chairs' ORDER BY T1.Customer Name DESC LIMIT 1,-5.342265695541423,1,0,0,30 903,What is the average Sales in the Sales by Category table?,SELECT AVG(Sales) FROM `Sales by Category`,SELECT AVG(Sales) FROM `Sales by Category`,4.149153669557308,1,1,1,23 904,List down the issues for complaint with server time of below 10 minutes.,"SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%M', T1.ser_time) < '10'",SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID` WHERE T1.ser_time < 10,0.653654695018016,7,0,0,29 905,Calculate the total products that are supplied by Japan suppliers.,SELECT COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan',SELECT SUM(CASE WHEN T2.Country = 'Japan' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,-1.3169763652228486,25,0,0,27 906,How many records are in the Employees table?,SELECT COUNT(RESULT) FROM Employees,SELECT COUNT(RESULT) FROM Employees,4.795353829950178,1,1,1,19 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 908,"Among the sales ID ranges from 1 to 200, what is the percentage of the products with a price ranging from 200 to 300?","SELECT CAST(SUM(IIF(T2.Price BETWEEN 200 AND 300, 1, 0)) AS REAL) * 100 / COUNT(T2.Price) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SalesID BETWEEN 1 AND 200",SELECT CAST(SUM(CASE WHEN T2.Price BETWEEN 200 AND 300 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = 2,3.6512312736446764,1,0,0,30 909,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 COUNT(DISTINCT T) FROM `Sales Orders` WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`City Name`,-1.0778704921423459,4,0,0,30 910,Provide the product's name of the product with the highest sales in the South region.,SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'South' ORDER BY T1.Sales DESC LIMIT 1,SELECT T3.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`Product ID` WHERE T2.Region = 'South' ORDER BY T1.Sales LIMIT 1,0.3533333751040319,8,0,0,29 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 912,"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 first_name INNER JOIN EmployeeTerritories AS last_name WHERE EmployeeID < 4",1.165821730938963,1,0,0,30 913,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',0.970514988600732,3,0,0,28 914,"In 2016, how many joined records exist between client and events?",SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',3.863060732190222,1,1,1,23 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 916,What is the total p_retailprice in the part table?,SELECT SUM(p_retailprice) FROM part,SELECT SUM(p_retailprice) FROM part,3.9925081370819413,1,1,1,21 917,What is the full name of employee who sold 1000 units?,"SELECT DISTINCT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000","SELECT DISTINCT MiddleInitial, LastName FROM Sales AS M1 INNER JOIN Employees AS M2 ON M1.SalesPersonID = M2.EmployeeID WHERE MIN(Quantity) < 1000",2.4667043334890577,3,0,0,30 918,"For each ProductID, how many Sales records are linked?","SELECT T2.ProductID, COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1. ProductID = T2._ProductID GROUP BY T2.`ProductID`",0.6198574531094436,1,0,0,26 919,"For each ProductID, how many Products records are linked?","SELECT T2.ProductID, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`UnitPrice Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1[ProductID] = T2.`ProductID` GROUP BY T2.) ProductID",-7.600077419746499,21,0,0,27 920,What is the average Discount in the Order Details table?,SELECT AVG(Discount) FROM `Order Details`,SELECT AVG(Discount) FROM `Order Details`,4.585379189987882,1,1,1,21 921,How many records in Orders were recorded in 2023?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCity LIKE '2023%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCity LIKE '2023%',5.226797006773571,1,1,1,23 922,How many employees is a UK citizen and are they all covering the same region?,"SELECT COUNT(T1.EmployeeID), T3.RegionID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Country = 'UK' GROUP BY T3.RegionID",SELECT COUNT(*) FROM ( SELECT DISTINCT CASE WHEN T3.RegionID = 'UK' THEN 1 ELSE 0 END) AS num FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.`TerritoryID Database: retail_world` WHERE T2.Country = 'USK' AND T1.`RegionID` = 'T2',-7.000147443367577,28,0,0,30 923,What is the first name of clients who have the highest priority?,SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs ),SELECT first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` ORDER BY T2.priority DESC LIMIT 1,-1.4298314886109331,7,0,0,29 924,List the phone numbers of suppliers from Japan.,SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'JAPAN',SELECT T3.n_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'JAPAN',-4.149156005641145,2,0,0,29 925,"In 2016, 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 '2016%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 WHERE T1.`Date received` LIKE '2016%',-0.22017744452341104,1,0,0,30 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 927,How many records are in the Employees table?,SELECT COUNT(DIFFERENCE) FROM Employees,SELECT COUNT(DIFFERENCE) FROM Employees,4.281554795135653,1,1,1,23 928,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 = T2.`SupplierID` WHERE T2.ProductName = 'Teatime Chocolate Biscuits',-1.708124802774924,24,0,0,30 929,"Among the products under the type ""promo brushed steel"", how many of them are manufactured by Manufacturer#5?",SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5',SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5',4.815006456683995,1,1,1,23 930,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 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 932,Give the percentage of Japanese suppliers whose account is in debt.,"SELECT CAST(SUM(IIF(T2.n_name = 'JAPAN', 1, 0)) AS REAL) * 100 / COUNT(T1.s_name) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0",SELECT CAST(SUM(CASE WHEN T2.n_name = 'JAPAN' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1. s_nationkey = T2._natekey,-0.852357321372774,1,0,0,25 933,How many records in Shippers were recorded in 2020?,SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2020%',SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2020%',4.69216415425934,1,1,1,26 934,What percentage of streets named 11th Street are in Alameda County?,"SELECT CAST(SUM(IIF(T1.street_name = '11th st', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.County = 'alameda county'","SELECT CAST(SUM(IIF(T2.County = 'Alameda County', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city",3.0350320188095847,2,0,0,24 935,"For each productCode, how many products records are linked?","SELECT T2.productCode, COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T2.productCode","SELECT T2.`productCode`, COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.ProductCode GROUP BY T2._productCode",1.784149979974237,1,0,0,27 936,Calculate the total price for products from id 400 to 500.,SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500,SELECT SUM(T1.Price) / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 400 AND 500,1.7330551380559367,7,0,0,30 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 938,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 939,"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(Country) FROM Employees WHERE Title = 'Sales Representative' AND Country = 'UK',3.2945559638121185,1,1,1,30 940,"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.SalesTeamid WHERE T1.ProcuredDate LIKE '2018%',0.27483981241019345,22,1,1,25 941,"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`",-9.236736687809278,21,0,0,29 942,Which UnitsInStock has the highest UnitPrice?,SELECT UnitsInStock FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT UnitsInStock FROM Products ORDER BY UnitPrice DESC LIMIT 1,2.74856165942381,1,1,1,20 943,How many Orders records have matching records in Order Details?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,"SELECT COUNT(T1.`ShipAddress Database: retail_world`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID`""",-7.052391442649507,21,0,0,23 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 945,How many Sales records have matching records in Products?,SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2. ProductID,6.8278779059027,1,1,1,21 946,How many records are in the client table?,SELECT COUNT(district_id) FROM client,SELECT COUNT(district_id) FROM client,4.233836292305277,1,1,1,21 947,How many orders were shipped by the sales team with the highest amount of shipped orders in 2020? Give the name of the said sales team.,"SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.ShipDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1","SELECT SUM(CASE WHEN T2.`Sales Team` = 'SAID' AND T1.OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`"" AS T2 ON T2.SalesTeamID = T1._SalesteamID",-1.9192931957539388,24,0,0,24 948,"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 `CustomerID`, `SalesID` FROM Products WHERE Price BETWEEN 100 AND 150 AND Quantity < 25",1.397730219566399,1,0,0,30 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 950,To whom does Steve Patterson report? Please give his or her full name.,"SELECT t2.firstName, t2.lastName FROM employees AS t1 INNER JOIN employees AS t2 ON t2.employeeNumber = t1.reportsTo WHERE t1.firstName = 'Steve' AND t1.lastName = 'Patterson'","SELECT t.firstName, t.lastName FROM employees t WHERE t.jobTitle = 'Steve Patterson'",2.0523034668899585,1,0,0,22 951,"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.`Dealer ID` GROUP BY T2._Segment",-7.202796930137707,23,0,0,28 952,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,27 953,"For each CustomerID, how many Customers records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`Region Database: retail_world`) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID` = T2.` CustomerID` GROUP BY T2 . CustomerID",-7.547934239692371,8,0,0,30 954,What is the name of the product with the highest retail price?,SELECT p_name FROM part WHERE p_retailprice = ( SELECT MAX(p_retailprice) FROM part ),SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,4.8437841492662725,1,0,0,30 955,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 SupplierID = 'London' GROUP BY CompanyName ORDER BY COUNT(SupplierID) DESC LIMIT 1,-1.8710026636455948,7,0,0,30 956,"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 957,"Under the in-charge of inside sales coordinator, provide the product lists which were shipped to Mexico in 1996.",SELECT T4.ProductName 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 WHERE T1.Title = 'Inside Sales Coordinator' AND T2.ShippedDate LIKE '1996%' AND T2.ShipCountry = 'Mexico',SELECT T3.ProductName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = 3 WHERE T1.`Title Database: retail_world` = 'Inside Sales Coordinator' AND T4.ShipCountry = 'Mexico',-7.051242857416207,25,0,0,25 958,What are the most popular restaurants in San Francisco among diners?,"SELECT id_restaurant, label FROM generalinfo WHERE city = 'San Francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE city = 'San Francisco' )","SELECT id_restaurant, label, review FROM generalinfo WHERE city = 'San Francisco' AND label = 'diners'",4.115326367014618,1,0,0,18 959,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 T3.CompanyName, T4.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,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 961,How many records are in the productlines table?,SELECT COUNT(textDescription) FROM productlines,SELECT COUNT(textDescription) FROM productlines,4.124260722271573,1,1,1,23 962,How many central_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID`,-0.7129365550930942,3,0,0,29 963,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,18 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 965,"Among the supplied products from Australia, describe the discontinued products and the category.","SELECT T2.ProductName, T3.CategoryName 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 T1.Country = 'Australia' AND T2.Discontinued = 1","SELECT T4.ProductName, T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` INNER JOIN Categories AS T3 ON T2.CategoryID = 3 WHERE T1.`Country` = 'Australia' AND T5.Discontinued = 1",-6.2620386313154945,2,0,0,29 966,"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 status = 'Shipped' AND shippedDate LIKE '2005%',0.7291633157730193,5,0,0,29 967,Which product received a review from Indianapolis on 2016/10/7?,SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07',SELECT Product FROM reviews WHERE `district_id Database: retail_complains` = 'Indianapolis' AND Date = '2016-10-7',-5.709721611749709,1,0,0,27 968,"In 2023, 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 '2023%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2023%',2.745452202207259,12,1,1,28 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 970,Give the full name of employee who handled the order id 10280.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280","SELECT T1.FirstName, T1.`LastName Database: retail_world` FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderID = 10280",-6.305031961681968,1,0,0,30 971,"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.`ProductID` GROUP BY T2 . Product ID",-2.385190164282605,9,0,0,29 972,How many records are in the orders table?,SELECT COUNT(o_orderkey) FROM orders,SELECT COUNT(o_orderkey) FROM orders,2.046806108159898,1,1,1,21 973,Which is the city where most of the 1 star reviews come from?,SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 1 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1,SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id ORDER BY Stars DESC LIMIT 1,2.300855854410839,11,0,0,30 974,How many countries from the USA have an In Process order status?,SELECT COUNT(t2.orderNumber) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'On Hold' AND t1.country = 'USA',SELECT COUNT(CASE WHEN status = 'In Process' THEN 1 ELSE 0 END) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customernumber WHERE t2.status = 'Active' AND t1.country = 'USA',3.7847479959294725,1,0,0,18 975,Calculate the total production for each product which were supplied from Japan,SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan',SELECT CAST(SUM(CASE WHEN T2.Country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T1.UnitsInStock = 1,5.114498961085459,1,0,0,29 976,"What is the discounted price of the part ""burnished seashell gainsboro navajo chocolate"" in order no.1?",SELECT T1.l_extendedprice * (1 - T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate' AND T1.l_orderkey = 1,SELECT ( SELECT MAX(l_extendedprice) FROM lineitem WHERE l_orderkey = 1 AND p_name = 'burnished seashell gainsboro navajo chocolate' ),-1.972863777956291,1,0,0,26 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 978,"For each CustomerID, how many Sales records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.MiddleInitial = T2._MiddleInitial GROUP BY T2.`CustomerID`",0.6566508285615026,1,0,0,27 979,How many non-discontinued products are there in the dairy category?,SELECT COUNT(T1.CategoryID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.Discontinued = 0,SELECT COUNT(T2.Discontinued) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.CategoryName = 'Dairy Products',-3.4485211545159404,1,0,0,25 980,Which order of Logitech G600 MMO Gaming Mouse has the highest total cost?,SELECT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Logitech G600 MMO Gaming Mouse' GROUP BY T1.`Order ID` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) DESC LIMIT 1,SELECT CASE WHEN T2.`Product Name` = 'Logitech G600 MMO Gaming Mouse' THEN T1.`Order ID` ORDER BY SUM(T1.Sales / T1.Profit) DESC LIMIT 1,-1.2048434046440848,2,0,0,29 981,State all the order numbers for sales team of Samuel Fowler.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Samuel Fowler' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL,SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T1.`Sales Channel` = 'Samuel Fowler' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._Sales TeamID ) WHERE T IS NOT NULL,-3.115594332367098,3,0,0,23 982,"Among the customers with an account balance lower than 4000, what is the percentage of the customers in the US?","SELECT CAST(SUM(IIF(T2.n_name = 'United States', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 4000","SELECT CAST(SUM(IIF(T2.n_name = 'ACCOUNT BALANCER', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1._nationkey = T2Nationkey WHERE T1.`c_acctbal < 4000",-2.2498296576368397,2,0,0,30 983,How many cities are there in Monterey?,SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey',SELECT COUNT(city) FROM geographic WHERE region = 'monterey',3.1970396822459666,1,0,0,19 984,What is the average Discount in the west_superstore table?,SELECT AVG(Discount) FROM west_superstore,SELECT AVG(Discount) FROM west_superstore,4.2263400530524775,1,1,1,19 985,"What is the restaurant's name and ID located at Ocean Avenue, San Francisco?","SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue'","SELECT T3.label, T2.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.`city` WHERE T1.`street_name Database: restaurant` = 'san francisco' AND T1/city = 'ocean ave'",-5.801242041734548,21,0,0,27 986,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 DISTINCT 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.4352756629864511,2,0,0,26 987,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 988,Which region does territory id 2116 belong to?,SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryID = 2116,SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 WHERE T1.TerritoryID = 2116,-2.829533352240382,3,0,0,27 989,What is the highest Sales in the west_superstore table?,SELECT MAX(Sales) FROM west_superstore,SELECT MAX(Sales) FROM west_superstore,4.134196383558846,1,1,1,20 990,How many records in west_superstore were recorded in 2017?,SELECT COUNT(Order) FROM west_superstore WHERE Ship LIKE '2017%',SELECT COUNT(Order) FROM west_superstore WHERE Ship LIKE '2017%',5.226797006773571,1,1,1,23 991,"Calculate the percentage of order via in-store channel of customer ""Medline"".",SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._CustomerID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medline ',SELECT CAST(SUM(CASE WHEN T2.`Customer Names` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,-1.5407994380110852,1,0,0,30 992,"For each city, how many customers records are linked?","SELECT T2.city, COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode GROUP BY T2.city","SELECT T2.city, COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = t2.employeeNumber GROUP BY T2.`city`",-1.3871170647013782,6,0,0,27 993,"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,21 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 995,"For each Product ID, what is the average Quantity?","SELECT `Product ID`, AVG(Quantity) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Quantity) FROM west_superstore GROUP BY `Product id`",0.3640827266159323,5,1,1,25 996,List the distinct values of type in the callcenterlogs table.,SELECT DISTINCT type FROM callcenterlogs,SELECT DISTINCT type FROM callcenterlogs,3.6114104240234646,1,1,1,18 997,"Give the reorder level for the products from the supplier ""Nord-Ost-Fisch Handelsgesellschaft mbH"".",SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH',SELECT SUM(CASE WHEN T1.ReorderLevel = 'Nord-Ost-Fisch Handelsgesellschaft mbH' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T2.SupplierID = T1 . SupplierID,-0.05428409834114302,18,0,0,30 998,List the distinct values of state in the client table.,SELECT DISTINCT state FROM client,SELECT DISTINCT state FROM client,3.537048448089766,1,1,1,16 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 1000,"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,27 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 1002,What is the total Profit in the central_superstore table?,SELECT SUM(Profit) FROM central_superstore,SELECT SUM(Profit) FROM central_superstore,4.39529225528895,1,1,1,20 1003,"Who is the one representing the company ""Heli Swaren GmbH & Co. KG""?",SELECT ContactName FROM Suppliers WHERE CompanyName = 'Heli Swaren GmbH & Co. KG',SELECT ContactName FROM Suppliers WHERE CompanyName = 'Heli Swaren GmbH & Co. KG',3.338365914293825,1,1,1,28 1004,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,22 1005,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_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 west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Card ID` = T2.`customer ID` GROUP BY T2._Customer ID",-1.3484958076648672,8,0,0,29 1006,"In 2017, how many joined records exist between Orders and Customers?",SELECT COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.ShipName LIKE '2017%',SELECT COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 WHERE T1.ShipName LIKE '2017%',-4.766292465331575,28,0,0,29 1007,List the distinct values of Region in the people table.,SELECT DISTINCT Region FROM people,SELECT DISTINCT Region FROM people,1.7909536146026408,1,1,1,19 1008,"Among the suppliers in the European region, what percentage have a below-average account balance?","SELECT CAST(SUM(IIF(T3.s_acctbal < ( SELECT AVG(supplier.s_acctbal) FROM supplier ), 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE'","SELECT CAST(SUM(IIF(T2.r_name = 'EURAN', 1, 0)) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.n_nationkey = T2.N_Nationkey INNER JOIN region AS T3 ON T2[r_regionkey ] = T3.regionkey WHERE T2.`acctbal` < AVG(T3.balance)",-3.0764229386670574,1,0,0,21 1009,"For each Region, how many records are there in west_superstore?","SELECT Region, COUNT(`Customer ID`) FROM west_superstore GROUP BY Region","SELECT Region, COUNT(`Customer ID`) FROM west_superstore GROUP BY Region",2.2163750566524576,1,1,1,21 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 1011,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,26 1012,"List down the customer company names, addresses, phones and faxes which are located in London.","SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London'","SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London'",2.955696941005687,1,1,1,22 1013,What is the shipping cost for order number 10692 from the company Alfreds Futterkiste?,SELECT T2.Freight FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10692 AND T1.CompanyName = 'Alfreds Futterkiste',"SELECT CAST(SUM(IIF(T1.CompanyName = 'Alfreds Futterkiste', 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2 .CustomerID WHERE T2.Freight = 10692",2.6092200981017957,3,0,0,29 1014,How many records in events were recorded in 2023?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2023%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2023%',0.9721202878798406,1,1,1,21 1015,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 ID`,1.4402376731032602,7,1,1,25 1016,"Write down the call id of clients whose first name start with alphabet ""B"".",SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first LIKE 'B%',SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE t1.first LIKE 'B%',0.6749994664427895,6,1,1,30 1017,"For each city, how many records are there in district?","SELECT city, COUNT(district_id) FROM district GROUP BY city","SELECT city, COUNT(district_id) FROM district GROUP BY city",5.308929195236603,1,1,1,18 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 1019,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 T2.city FROM client AS T1 INNER JOIN district AS T2 WHERE T1.age > 60 ORDER BY COUNT(T2.division) DESC LIMIT 1,-1.7133754440282738,4,0,0,30 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 1021,What is the name of the least popular Indian restaurant on Shattuck Avenue in Berkeley?,SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1,SELECT MIN(`review Database: restaurant`) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = 2 WHERE T2.street_name = 'shattuck ave' AND T3.city = 'berkeley' LIMIT 1,-4.776726956075047,1,0,0,29 1022,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,24 1023,How many cars were released in the USA in 1981?,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'USA' AND T1.model_year = 1981,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.`country` = T2.origin WHERE T1.model_year = 1981,-4.081357275457796,25,0,0,29 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 1026,How many urgent orders did Clerk#000000001 handle in 1997?,"SELECT COUNT(o_orderkey) FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1997' AND o_clerk = 'Clerk#000000001' AND o_orderpriority = '1-URGENT'",SELECT COUNT(o_orderkey) FROM orders WHERE o_clerk = 'Clerk#000000001' AND o_orderpriority = 0,1.839812505342054,1,0,0,30 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 1028,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,24 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 1030,"In 2021, 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 '2021%',SELECT COUNT(T1.`ID`) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '2021%',-0.4777675011888459,1,0,0,30 1031,What is the percentage of male clients complaining about their credit cards?,SELECT CAST(SUM(CASE WHEN T1.sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card',"SELECT CAST(SUM(IIF(T2.Product = 'Credit card', 1, 0)) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID",5.743576240688024,1,0,0,25 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 1033,What percentage of restaurants are from the Bay Area?,"SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city","SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city",5.860834093080811,1,1,1,26 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 1035,How many records in Orders were recorded in 2020?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2020%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2020%',4.69216415425934,1,1,1,22 1036,How many suppliers from Germany have left a comment with 'carefully regular packages'?,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' AND T1.s_comment LIKE '%carefully regular packages%',SELECT SUM(CASE WHEN T2.n_name = 'GERMANY' AND T1.s_comment = 'Carefully regular packages' THEN 1 ELSE 0 END) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1(s_nationkey ) = T2 . n_name,2.1847577635800626,9,0,0,25 1037,Which customer ordered 1939 'Chevrolet Deluxe Coupe' at the highest price?,SELECT t4.customerName 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.productName = '1939 Chevrolet Deluxe Coupe' ORDER BY t2.priceEach DESC LIMIT 1,SELECT t4.customerName 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 = '1939 Chevrolet Deluxe Coupe' ORDER BY T1.buyPrice DESC LIMIT 1,0.4303268344904027,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 1039,How many records in production were recorded in 2022?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2022%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2022%',4.69216415425934,1,1,1,25 1040,"For each Sub-Category, how many east_superstore records are linked?","SELECT T2.`Sub-Category`, COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Sub-Category`","SELECT T2.Sub-Category, COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2._SubSubCategory",-2.162922110718048,8,0,0,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 1043,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 DESC LIMIT 1",-2.9851068812162573,2,0,0,28 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 1045,How many records in orders were recorded in 2015?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2015%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2015%',4.775940017408425,1,1,1,22 1046,"For each company, how many records are there in events?","SELECT company, COUNT(`Complaint ID`) FROM events GROUP BY company","SELECT company, COUNT(`Complaint ID`) FROM events GROUP BY company",2.763642992064369,1,1,1,19 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 1048,"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 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.Order BETWEEN 2016 AND 1,1.263234276310328,8,0,0,30 1049,"For each EmployeeID, how many records are there in Orders?","SELECT EmployeeID, COUNT(OrderID) FROM Orders GROUP BY EmployeeID","SELECT EmployeeID, COUNT(OrderID) FROM Orders GROUP BY Employeeid",2.0961497771648943,5,1,1,23 1050,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,16 1051,What are the names of the cars worth 20000?,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 20000,SELECT t3.car_name FROM data AS t1 INNER JOIN price AS t2 ON t1.ID = t2.ID WHERE T2.price = 20000,-2.4689617220822537,3,0,0,30 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 1053,List the distinct values of Country in the Suppliers table.,SELECT DISTINCT Country FROM Suppliers,SELECT DISTINCT Country FROM Suppliers,3.7368875748870978,1,1,1,18 1054,"For each CustomerID, how many Sales Orders records are linked?","SELECT T2.CustomerID, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.`CustomerID`, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID GROUP BY T3.`Customer Names`",-2.5059724516091433,9,0,0,29 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 1056,Which Country has the highest UnitPrice?,SELECT Country FROM Invoices ORDER BY UnitPrice DESC LIMIT 1,SELECT Country FROM Invoices ORDER BY UnitPrice DESC LIMIT 1,3.477966288850088,1,1,1,24 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 1058,How many records are in the product table?,SELECT COUNT(`Product ID`) FROM product,SELECT COUNT(`Product ID`) FROM product,2.626981045637359,1,1,1,22 1059,What is the average UnitPrice in the Invoices table?,SELECT AVG(UnitPrice) FROM Invoices,SELECT AVG(UnitPrice) FROM Invoices,5.250901335507442,1,1,1,19 1060,Identify the number of employees in Northern sales region.,SELECT COUNT(T2.EmployeeID) FROM Territories AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Region AS T3 ON T1.RegionID = T3.RegionID WHERE T3.RegionDescription = 'Northern',SELECT COUNT(T2.EmployeeID) FROM Territories AS T1 INNER JOIN EmployeeTerritory AS T2 ON T1.`TerritoryID Database: retail_world` LIKE 'Northern%' AND T2.RegionDescription = 'Sales Region',-8.214408959780846,2,0,0,30 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 1062,"List the first names of the employees who take the orders that ship to the city of ""Reims"".",SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCity = 'Reims',"SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1 . EmployeeID = T2.EmployeeID WHERE STRFTIME('%Y', T2.`ShipCity`) = 'Reims'",-5.8121079137669485,9,0,0,30 1063,What is the average _SalesTeamID for joined Sales Orders and Products records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,2.7880758779292294,1,1,1,20 1064,How many records are in the Suppliers table?,SELECT COUNT(HomePage) FROM Suppliers,SELECT COUNT(HomePage) FROM Suppliers,4.233836292305277,1,1,1,19 1065,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(sex) FROM client GROUP BY client_id","SELECT Client_id, COUNT(sex) FROM client GROUP BY client_id",5.308929195236603,1,1,1,22 1066,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 buyPrice DESC LIMIT 1,3.2416704498234803,1,0,0,30 1067,List the phone number of company named Around the Horn.,SELECT Phone FROM Customers WHERE CompanyName = 'Around the Horn',SELECT Phone FROM Customers WHERE CompanyName = 'Around the Horn',3.318757801366626,1,1,1,24 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 1069,How many records in Orders were recorded in 2023?,SELECT COUNT(CustomerID) FROM Orders WHERE ShipCountry LIKE '2023%',SELECT COUNT(CustomerID) FROM Orders WHERE ShipCountry LIKE '2023%',4.775940017408425,1,1,1,23 1070,What is the email id of clients whose calls were hung?,SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG',SELECT T3.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG',2.1410472197364294,1,0,0,25 1071,List the distinct review values linked to location.,SELECT DISTINCT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.375687580069202,13,1,1,29 1072,"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 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 1076,List all the states in the South region.,SELECT state FROM state WHERE Region = 'South',SELECT state FROM state WHERE Region = 'South',0.6118702182052002,1,1,1,22 1077,What is the average Discount for joined east_superstore and product records?,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2.`Product ID`,1.2430965998421832,5,1,1,25 1078,"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,19 1079,Indicate the name of the parts without discount.,SELECT T3.p_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 WHERE T2.l_discount = 0.0000,SELECT T3.p_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_supponpkey INNER JOIN part AS T3 ON TK->ps_partkey = 3,-5.0602042883253,2,0,0,30 1080,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` INNER JOIN product AS T3 ON T3.`Product ID` = T4.Product ID WHERE T3.Product Name = 'Xerox 1952',-2.9095416681989064,3,0,0,28 1081,Identify the names of the top 3 customers with the highest number of orders of all time and calculate for the average total price per order of each customers.,"SELECT T.c_name, T.res FROM ( SELECT T2.c_name, SUM(T1.o_totalprice) / COUNT(T1.o_orderkey) AS res , COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 3","SELECT T3.c_name, CAST(SUM(T1.o_totalprice) AS REAL) / 3 FROM orders AS T1 INNER JOIN customer AS T2 ON T1. o_custkey = T2.C_Custkey ORDER BY SUM(T2.num_orderkey) DESC LIMIT 3",-5.8592539854294365,2,0,0,30 1082,How many orders were shipped by Federal Shipping?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping',"SELECT COUNT(IIF(T2.CompanyName = 'Federal Shipping', 1, 0)) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID",1.0955585063286173,11,0,0,28 1083,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,16 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 1085,"For each issue, how many records are there in events?","SELECT issue, COUNT(`Complaint ID`) FROM events GROUP BY issue","SELECT issue, COUNT(`Complaint ID`) FROM events GROUP BY issue",3.676800518882487,1,1,1,17 1086,List down the territory IDs and descriptions existed in Southern region.,"SELECT T1.TerritoryID, T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern'","SELECT DISTINCT TerritoryID, TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID WHERE T2.RegionDescription = 'Southern'",1.2977481667800583,4,0,0,30 1087,Please list the top three product names with the highest unit price.,SELECT t1.productName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode ORDER BY t2.priceEach DESC LIMIT 3,SELECT productName FROM products ORDER BY quantityInStock + buyPrice DESC LIMIT 3,3.229847411774693,1,0,0,29 1088,Which CustomerID has the highest SalesID?,SELECT CustomerID FROM Sales ORDER BY SalesID DESC LIMIT 1,SELECT CustomerID FROM Sales ORDER BY SalesID DESC LIMIT 1,4.988260417689312,1,1,1,29 1089,How many records in Sales Orders were recorded in 2015?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2015%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2015%',2.5546621231758806,1,1,1,22 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 1091,"Among the teenager clients who use Google account and Microsoft account, which group of client is more than the other?",SELECT CASE WHEN SUM(CASE WHEN email LIKE '%@gmail.com' THEN 1 ELSE 0 END) > SUM(CASE WHEN email LIKE '%@outlook.com' THEN 1 ELSE 0 END) THEN 'Google account' ELSE 'Microsoft account' END FROM client WHERE age BETWEEN 13 AND 19,SELECT CAST(SUM(CASE WHEN email = 'Google account' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(age) FROM client WHERE age > 12,1.4982393915152867,1,0,0,30 1092,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,23 1093,Identify the name and product category for the most expensive and the least expensive products.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.UnitPrice IN (( SELECT MIN(UnitPrice) FROM Products ), ( SELECT MAX(UnitPrice) FROM Products ))","SELECT T2.ProductName, T3.UnitPrice FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID ORDER BY T1.`CategoryName Database: retail_world` DESC LIMIT 1",-6.110629982905291,1,0,0,29 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 1095,Add the total profit of Patrick Gardner in the Central region.,SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Patrick Gardner' AND T1.Region = 'Central',SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.Customer ID = T2.`Customer ID` WHERE T1.`Customer Name` = 'Patrick Gardner' AND T2.Region = 'Central',2.4323997649816227,3,0,0,27 1096,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 T3.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T2.OrderID = 10270,-2.445341198726436,1,0,0,28 1097,How many events records have matching records in callcenterlogs?,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN callcenterlogs AS T2 WHERE T2.`Server` = 'All',-1.6968096479064423,4,0,0,22 1098,What are the products that belong to the beverage category?,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Beverages',SELECT T3.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.CategoryName = 'Beverages',-4.115459607891517,1,0,0,26 1099,"Give me the address, home phone and salary of the Sales Manager.","SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'","SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'",2.925369889710495,1,1,1,23 1100,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,23 1101,State the delivery date of cookware.,"SELECT T FROM ( SELECT DISTINCT IIF(T2.`Product Name` = 'Cookware', T1.DeliveryDate, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Cookware' THEN T1.DeliveryDate END AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL,0.45860330226572915,2,0,0,23 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 1104,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 1105,How many complaints are not in process with an agent?,SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT',SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT',2.755814447484841,1,1,1,11 1106,How many records in lineitem were recorded in 2020?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2020%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2020%',4.412960505279923,1,1,1,24 1107,How many products were ordered in the order with the highest freight?,SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1,SELECT CAST(COUNT(CASE WHEN T2.ProductID = 'ProductID' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Freight) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2._OrderID,-2.255999238757841,2,0,0,29 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 1109,"For each Product ID, what is the average Discount?","SELECT `Product ID`, AVG(Discount) FROM central_superstore GROUP BY `Product ID`","SELECT `product ID`, AVG(Discount) FROM central_superstore GROUP BY `Product ID`",0.953228438520917,4,1,1,27 1110,List the distinct productCode values linked to products.,SELECT DISTINCT T2.productCode FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode,SELECT DISTINCT T2.productCode FROM products AS T1 INNER JOIN orderdetails AS T2 WHERE T1.productLine = 'Products',0.6499427938111422,1,0,0,27 1111,Please give the name of customers from the West region that bought exactly 8 items in their purchase.,SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Quantity = 8 AND T1.Region = 'West',SELECT DISTINCT T3.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Quantity = 8 AND T2.Region = 'West',2.9020898784705276,1,0,0,29 1112,"For each s_address, how many records are there in supplier?","SELECT s_address, COUNT(s_suppkey) FROM supplier GROUP BY s_address","SELECT S_address, COUNT(s_suppkey) FROM supplier GROUP BY s_address",4.107549427355398,1,1,1,21 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 1114,How many different orders with a total price greater than 4000 are cancelled?,SELECT COUNT(DISTINCT T1.orderNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.quantityOrdered * T1.priceEach > 4000 AND T2.status = 'Cancelled',SELECT SUM(CASE WHEN T2.status = 'Cancelled' AND T1.quantityOrdered > 4000 THEN 1 ELSE 0 END) FROM orderdetails AS t1 INNER JOIN orders AS T2 ON t1.orderNumber = t2.ordernumber,4.1464015998273265,2,0,0,15 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 1118,How many restaurants in the city of Richmond serve Mediterranean food?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond',SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond',4.531202089984032,1,1,1,28 1119,Write down all of the product ids that were placed by Meander.,SELECT DISTINCT T2.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.FirstName = 'Meander',SELECT DISTINCT T3.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.`FirstName` = 'Meander',1.5654851522041353,1,0,0,30 1120,"For each EmployeeID, how many records are there in Orders?","SELECT EmployeeID, COUNT(EmployeeID) FROM Orders GROUP BY EmployeeID","SELECT EmployeeID, COUNT(EmployeeID) FROM Orders GROUP BY Employeeid",0.03959373847385952,7,1,1,24 1121,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer consent provided?`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer consent provided?`) FROM events GROUP BY client_ID",2.5646400320318685,1,1,1,16 1122,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,2.4994282084308685,4,1,1,27 1123,How many line items were returned in 1998?,"SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'TRUCK'","SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'",1.1032735616331442,1,0,0,28 1124,What was the issue that the client with the longest server time faced?,SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ),SELECT MAX(T1.`ser_time Database: retail_complains`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Complaint ID` WHERE T2.Issue = 'Server Timefaced',-6.694200370341414,6,0,0,29 1125,"In 2016, 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.ShipCountry LIKE '2016%',SELECT COUNT(T1.`OrderID`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID LIKE '2016%',-1.9642404392320005,3,0,0,30 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 1127,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,21 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 1129,How many more territories are there in than Eastern Region than in the Southern Region?,SELECT ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) - ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu,SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 WHERE T2.RegionDescription = 'Eastern' AND T1.RegionID = 'Southern',3.5656745669006176,1,0,0,29 1130,What is the country location of the employee who handled order id 10257?,SELECT T1.Country FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257,SELECT T3.Country FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T2.OrderID = 10257,-2.4808322427853167,1,0,0,29 1131,How many records in Orders were recorded in 2017?,SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2017%',SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2017%',5.226797006773571,1,1,1,23 1132,How many product names have order quantity less than 50? Calculate the percentage of orders less than 50 out of total order quantity.,"SELECT SUM(CASE WHEN T2.Quantity < 50 THEN 1 ELSE 0 END) , CAST(SUM(IF(T2.Quantity < 50, 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID",SELECT CAST(SUM(CASE WHEN T2.Quantity > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`ProductID Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2ProductID,-7.458133672217456,2,0,0,30 1133,How many orders have order date in 5/31/2018?,"SELECT SUM(IIF(OrderDate = '5/31/18', 1, 0)) FROM `Sales Orders`","SELECT SUM(IIF(OrderDate = '5/31/18', 1, 0)) FROM `Sales Orders`",2.72968634068747,3,1,1,28 1134,List the distinct CategoryID values linked to Products.,SELECT DISTINCT T2.CategoryID FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.CategoryID FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.ProductID = T2.`CategoryID`,-4.772100180373082,24,0,0,30 1135,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(`rand client`) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(`rand client`) FROM callcenterlogs GROUP BY `rand client`",2.877465441869129,4,1,1,26 1136,"For each State, how many records are there in people?","SELECT State, COUNT(`Customer ID`) FROM people GROUP BY State","SELECT State, COUNT(`Customer ID`) FROM people GROUP BY State",3.5812554675732,1,1,1,19 1137,"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.`Customer ID` = T2.`CustomerID` GROUP BY T2 . Region",-1.0208381575352357,3,0,0,29 1138,How many suppliers does Northwind have in USA?,SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA',SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA',4.535546361480658,1,1,1,24 1139,"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(T1.`OrderID`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID LIKE '2018%',-1.3111801037632351,2,0,0,30 1140,Calculate the percentage salary of employees who handled orders shipped in 1996.,"SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' THEN T1.Salary ELSE 0 END) AS REAL) * 100 / SUM(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID","SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' 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",4.819058602309409,1,0,0,27 1141,How many records in events were recorded in 2021?,SELECT COUNT(Submitted) FROM events WHERE `Date received` LIKE '2021%',SELECT COUNT(Submitted) FROM events WHERE `Date received` LIKE '2021%',0.9721202878798406,1,1,1,25 1142,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,24 1143,How many records in orders were recorded in 2018?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2018%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2018%',4.860603963746542,1,1,1,21 1144,What is the store id of the store located in the most populous county?,SELECT CASE WHEN MAX(Population) THEN StoreID END FROM `Store Locations`,SELECT StoreID FROM `Store Locations` GROUP BY StoreID ORDER BY Population DESC LIMIT 1,1.8142998132226993,1,0,0,27 1145,How many south_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`CustomerID` = T2.`Customer ID`,-1.4983920376809987,5,0,0,28 1146,How many records are in the Products table?,SELECT COUNT(SupplierID) FROM Products,SELECT COUNT(SupplierID) FROM Products,4.508889799613256,1,1,1,21 1147,List the distinct values of Address in the Employees table.,SELECT DISTINCT Address FROM Employees,SELECT DISTINCT Address FROM Employees,3.7368875748870978,1,1,1,17 1148,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer 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.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.4773185811491831,8,0,0,30 1149,List the distinct values of Region in the Sales Team table.,SELECT DISTINCT Region FROM `Sales Team`,SELECT DISTINCT Region FROM `Sales Team`,3.817762749807698,1,1,1,21 1150,What is the average SalesTeamID in the Sales Team table?,SELECT AVG(SalesTeamID) FROM `Sales Team`,SELECT AVG(SalesTeamID) FROM `Sales Team`,4.585379189987882,1,1,1,21 1151,"Among the orders made by Aimee Bixby, how many of them included at least one kind of product under the category ""Furniture""?",SELECT COUNT(DISTINCT T2.`Order ID`) 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.Category = 'Furniture' AND T1.`Customer Name` = 'Aimee Bixby',SELECT CAST(COUNT(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T1.Customer Name = 'Aimee Bixby',-5.749464757137697,3,0,0,30 1152,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 T2.TerritoryID ELSE NULL END AS T ) WHERE T IS NOT NULL,-5.2964061809281695,2,0,0,30 1153,"In 2021, 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 '2021%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2021%',2.745452202207259,12,1,1,29 1154,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 1155,Who is the customer from the East region that purchased the order with the highest profit?,SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' ORDER BY T1.Profit DESC LIMIT 1,SELECT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'East' ORDER BY T2.Profit DESC LIMIT 1,3.8211179710776197,1,0,0,28 1156,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 WHERE Salary = ( SELECT MAX(Salary) FROM employees )",3.4152260514327595,5,1,1,27 1157,Please list the names of all the products ordered in order CA-2011-112326 in superstores in the center.,SELECT DISTINCT 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-112326',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 ID = 'CA-2011-112326' AND T2.Name = 'Center',-0.28646211426811236,10,0,0,22 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 1159,How many customers are there in the country with the highest number of customers?,SELECT COUNT(CustomerID) FROM Customers GROUP BY Country ORDER BY COUNT(CustomerID) DESC LIMIT 1,SELECT COUNT(CustomerID) FROM Customers ORDER BY Country DESC LIMIT 1,1.566723854738679,1,0,0,30 1160,How many countries belong to the Algeria region?,SELECT COUNT(T1.r_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T2.n_name = 'ALGERIA',SELECT SUM(CASE WHEN T2.n_name = 'ALGERIA' THEN 1 ELSE 0 END) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2._regionkey WHERE T1.`r_name` = 'Algeria' LIMIT 1,-2.4252368957283457,21,0,0,25 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 1163,"Among all asian restaurants in N. Milpitas Blvd., Milpitas, how many of them have restaurant ID greater than 385?",SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385,SELECT SUM(CASE WHEN T2.food_type = 'asian' AND T1.id_restaurant > 385 AND T3.city = 'milpitas blvd' THEN 1 ELSE 0 END) AS num,-0.7915259526103597,2,0,0,28 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 1165,What is the total price of Ikura ordered in order no. 10273?,SELECT T2.UnitPrice * T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10273,-0.3254323452750006,1,0,0,30 1166,"Among the reviews from midwest region, what are the products that received 1 star?",SELECT DISTINCT T3.Product FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN reviews AS T3 ON T2.district_id = T3.district_id WHERE T1.Region = 'Midwest' AND T3.Stars = 1,SELECT DISTINCT T2.Product FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.`state_abbrev Database: retail_complains` INNER JOIN reviews AS T3 WHERE T3.Stars = 1,-5.601126177390059,1,0,0,27 1167,How many orderdetails records have matching records in products?,SELECT COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode,SELECT COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2. productCode,6.9006273124924915,1,1,1,18 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 1169,What is the price and quantity of the product named Seat Tube?,"SELECT DISTINCT T2.Price, T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Seat Tube'","SELECT CAST(SUM(IIF(T2.Name = 'Seat Tube', 1, 0)) AS REAL) * 100 / COUNT(T1.Quantity) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2. ProductID",5.860834093080811,1,0,0,27 1170,What is the total amount of tax charged for the order placed by customer 88931 on 7/13/994?,SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = 88931 AND T1.o_orderdate = '1994-07-13',"SELECT SUM(IIF(T2.l_tax = 88931, 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE STRFTIME('%Y', T2.s_orderdate) = '7/13/994'",-2.356388722919178,1,0,0,30 1171,"What is the highest profit order in the East superstore of customers from Houston, Texas?",SELECT T1.`Order ID` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.City = 'Houston' AND T2.State = 'Texas' ORDER BY T1.Profit DESC LIMIT 1,SELECT MAX(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.City = 'Houston' ORDER BY T1.Profit DESC LIMIT 1,0.2507265230792876,6,0,0,30 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 1174,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM east_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM east_superstore ORDER BY Quantity DESC LIMIT 1,1.484219125354764,1,1,1,26 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 1176,"What is the difference in order number from ""WARE-MKL1006"" and ""WARE-NBV1002""?","SELECT SUM(IIF(WarehouseCode = 'WARE-MKL1006', 1, 0)) - SUM(IIF(WarehouseCode = 'WARE-NBV1002', 1, 0)) AS difference FROM `Sales Orders`",SELECT CAST(SUM(CASE WHEN OrderNumber = 'WARE-MKL1006' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OrderNumber) FROM `Sales Orders`,2.145573487060982,1,0,0,30 1177,How many records are in the Products table?,SELECT COUNT(Discontinued) FROM Products,SELECT COUNT(Discontinued) FROM Products,4.472691083849381,1,1,1,19 1178,"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.`Order ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID GROUP BY T2 `Customer ID`",-6.116898764143691,3,0,0,30 1179,How many records in lineitem were recorded in 2015?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2015%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2015%',4.412960505279923,1,1,1,18 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 1182,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 DISTINCT 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.3038906828246315,3,0,0,26 1183,Which county is El Cerrito from?,SELECT county FROM geographic WHERE city = 'el cerrito',SELECT county FROM geographic WHERE city = 'el cerrito',3.911853537969903,1,1,1,27 1184,Who is the clerk in charge of handling the item with the highest amount of extended price?,SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T2.l_extendedprice DESC LIMIT 1,SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.l_orderkey ORDER BY T2.`extendedprice` DESC LIMIT 1,0.5725899247426172,1,0,0,30 1185,Which product did Cruz & Sons Co. order on 2003/3/3?,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.' AND t2.orderDate = '2003-03-03',SELECT t2.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 INNER JOIN customers AS t3 ON t1.orderNumber = t3.customerNumber INNER JOIN products AS t4 ON t4.productCode = t5._productCode WHERE t5.status = 'Cruz & Sons Co. order on 2003/3/18',-6.3259087833822365,3,0,0,30 1186,"Please list the names of all the products under the type ""promo brushed steel"".",SELECT p_name FROM part WHERE p_type = 'PROMO BRUSHED STEEL',SELECT p_name FROM part WHERE p_type = 'PROMO BRUSHED STEEL',4.644831429257246,1,1,1,23 1187,How many orders were made by Corey Roper in 2015?,"SELECT COUNT(T2.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Corey Roper' AND STRFTIME('%Y', T2.`Ship Date`) = '2015'",SELECT COUNT(CASE WHEN `Customer Name` = 'Corey Roper' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Ship LIKE '2015%',-1.9252452771154505,5,0,0,30 1188,List the order for all in-store sales along with the products sold.,"SELECT DISTINCT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'In-Store'","SELECT DISTINCT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'In-Store'",3.9479140454183614,1,1,1,30 1189,"For the order paying the highest freight, how many kinds of products does it contain?",SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID,SELECT SUM(CASE WHEN T2.ProductID = 'ProductID' THEN 1 ELSE 0 END) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID Database: retail_world` ORDER BY T.Freight DESC LIMIT 1,-6.191812865584216,3,0,0,29 1190,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 sent to company` = 'Mr. Brantley Julian Stanley on 2012/5/18',-2.693424103691303,1,0,0,30 1191,"For each state, how many district records are linked?","SELECT T2.state, COUNT(T1.district_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id GROUP BY T2.state","SELECT T2.state, COUNT(T1.`district Database: retail_complains`) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id GROUP BY T2.`state`'",-8.251180145223689,26,0,0,28 1192,"Which employee handled the most amount of orders in 1996? Give the full name, title, and address of this employee.","SELECT FirstName, LastName, Title, address FROM Employees WHERE EmployeeID = ( SELECT T1.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderDate BETWEEN '1996-01-01 00:00:00' AND '1997-01-01 00:00:00' GROUP BY T1.EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 )","SELECT Title, Title, address FROM Orders WHERE OrderDate LIKE '1996%' GROUP BY Title ORDER BY COUNT(OrderID) DESC LIMIT 1",-1.004837318643112,1,0,0,30 1193,List the distinct ProductID values linked to Sales.,SELECT DISTINCT T2.ProductID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.ProductID FROM Sales AS T1 INNER JOIN Products AS T2 WHERE T1.SalesID = ( SELECT DISTINCT Price FROM Products ),2.447240649042812,7,0,0,28 1194,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`,2.6702752715528404,7,1,1,24 1195,"Among the products manufactured by manufacturer 5 that have a retail price of no more than 1,000, how many products were shipped via rail?",SELECT 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_mfgr = 'Manufacturer#5' AND T3.p_retailprice < 1000 AND T2.l_shipmode = 'RAIL',SELECT COUNT(T2.p_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_supponpkey INNER JOIN part AS T3 ON T3.s_partname = 'manufactured by manufacturer 5' AND T_retailprice = 1000,-3.8697821067505043,9,0,0,29 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 1198,"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 T2.RegionDescription = '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,-1.0546967594325716,6,0,0,30 1199,"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 people AS T2 ON T1.`Customer ID` = T2.`Card ID` GROUP BY T2._Region",-1.4480209584195545,9,0,0,30 1200,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,4.269325719476612,4,1,1,30 1201,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(IIF(T1.s_acctbal < 0 AND T2.n_name = 'JAPAN' THEN 1 ELSE 0 END) AS REAL) * 1000,-4.142019278586002,1,0,0,26 1202,"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.`Product ID` GROUP BY T2 . Region",-1.1198481941178708,8,0,0,30 1203,Which item was shipped on 3/4/2013 and scheduled for same day delivery in the South region?,SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2013-03-04' AND T2.Region = 'South' AND T1.`Order Date` = '2013-03-04',SELECT T3.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T1.Ship = '2013-03-04' AND T2.Region = 'South',1.4259918090971213,7,0,0,30 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 1205,How many client records have matching records in events?,SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,4.373624308676881,2,1,1,20 1206,What is the total price of the order 10100?,SELECT SUM(t.priceEach * t.quantityOrdered) FROM orderdetails t WHERE t.orderNumber = '10100',SELECT SUM(t.priceEach * t.quantityOrdered) FROM orderdetails t WHERE t.orderNumber = '10100',5.865357261667042,1,1,1,26 1207,What is the delivery time and the clerk of order number 6?,"SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate), T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderkey = 6",SELECT JULIANDAY(T2.l_receiptdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE T2.num = 6,-2.5344382562355863,1,0,0,29 1208,What is the price of the car ID 15?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.ID = 15,"SELECT CAST(SUM(IIF(T2.price = 15, 1, 0)) AS REAL) * 100 / COUNT(T1.id) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",3.3663147425687625,2,0,0,27 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 1211,How many records in orders were recorded in 2023?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2023%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2023%',4.860603963746542,1,1,1,21 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 1213,State the shipping company of order id 10260.,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260,SELECT DISTINCT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`OrderID` = 10260,-0.3249308936076072,6,0,0,30 1214,"For the order from ""HILAA"" on 1997/12/25, what was the total quantity of the products in that order?",SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%',SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T3.OrderDate = '1997-12-25',-5.4211903211786385,2,0,0,27 1215,Calculate the percentage of complaints made by Google account client in server ZOHARI.,SELECT CAST(SUM(CASE WHEN T1.email LIKE '%@gmail.com' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'ZOHARI',SELECT CAST(SUM(CASE WHEN T2.server = 'ZOHARI' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client`,-1.3686198315935028,2,0,0,25 1216,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(T2.Quantity) AS REAL) / 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 =T3.EmployeeID WHERE T3.LastName = 'Aaron Alexander',-1.6817764863534004,7,0,0,26 1217,"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,18 1218,How many records are in the Customers table?,SELECT COUNT(Phone) FROM Customers,SELECT COUNT(Phone) FROM Customers,0.4565143531634555,1,1,1,20 1219,What are the top 2 order keys of the item with the highest amount of extended price?,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2,2.804678555558904,1,1,1,28 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 1222,"What is the name of the supplier that provides the part ""hot spring dodger dim light"" with the lowest supply cost?",SELECT T2.s_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light' ORDER BY T1.ps_supplycost LIMIT 1,"SELECT T.s_name FROM ( SELECT T2.p_name, MIN(ps_supplycost) AS REAL) * 100 / COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON STRFTIME('%Y', T2.`s_suppkey) = 'hot spring dodger dim light'",-2.796557442813045,1,0,0,29 1223,What is the amount of customers of 1957 Chevy Pickup by customers in a month?,SELECT COUNT(T2.customerNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.productCode IN ( SELECT productCode FROM products WHERE productName = '1957 Chevy Pickup' ),SELECT SUM(T2.quantityOrdered * T2.priceEach) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2._orderNumber INNER JOIN products AS T3 ON T3.productCode = T4._productCode WHERE productLine = '1957 Chevy Pickup' AND orderDate LIKE '%/%/1957%',-4.010312353160767,3,0,0,30 1224,What is the price and name of the product bought by Erica Xu?,"SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu'","SELECT CAST(SUM(IIF(T2.FirstName = 'Erica' AND T2.MiddleInitial = 'Xu', 1, 0)) AS REAL) * 100 / COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN Products AS T3 ON T3.ProductID = 2",-0.24371179975018067,4,0,0,29 1225,List down the product name for products from id 1 to 10.,SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10,SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10,4.723318039666508,1,1,1,26 1226,"In 2021, 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.`Timely response?` LIKE '2021%',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` LIKE '2021%',3.8497672039645754,1,1,1,27 1227,What is the average Profit in the east_superstore table?,SELECT AVG(Profit) FROM east_superstore,SELECT AVG(Profit) FROM east_superstore,3.4321500354297707,1,1,1,22 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 1229,How many Customers records have matching records in Sales Orders?,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID,0.9279632400673623,7,1,1,30 1230,List the distinct sex values linked to district.,SELECT DISTINCT T2.sex FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.sex FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,7.322100793293633,1,1,1,21 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 1232,"Who is the customer with an order shipped on March 5, 2013, in the eastern 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.`Ship Date` = '2013-03-05',"SELECT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Ship = 'March 5, 2013' AND T2.Name = 'East'",1.324387687104238,7,0,0,30 1233,"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.8110392633326788,8,1,1,26 1234,List the distinct values of QuantityPerUnit in the Products table.,SELECT DISTINCT QuantityPerUnit FROM Products,SELECT DISTINCT QuantityPerUnit FROM Products,4.22603725091863,1,1,1,16 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 1236,Mention the first name of employee who took care the order id 10250.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10250",SELECT CASE WHEN T2.OrderID = 10250 THEN 'FirstName' ELSE 'LastName' END FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,0.06059182401217215,3,0,0,29 1237,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 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 1239,"In 2016, how many joined records exist between south_superstore and product?",SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2016%',SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID` WHERE T1.Ship LIKE '2016%',1.3857734724596558,7,1,1,25 1240,Which company had the most orders in 1998?,"SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",SELECT CompanyName FROM Orders WHERE OrderDate LIKE '1998%' GROUP BY CompanyName ORDER BY COUNT(OrderID) DESC LIMIT 1,4.644705385978611,1,0,0,30 1241,How many female employees are in charge of 3 or more territories?,SELECT COUNT(EID) FROM ( SELECT T1.EmployeeID AS EID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.TitleOfCourtesy IN ('Ms.' OR 'Mrs.') GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) >= 3 ) T1,SELECT COUNT(*) FROM ( SELECT COUNT(EmployeeID) FROM Employees WHERE TitleOfCourtesy = 'Female' AND TerritoryID < 3 ),-0.8264994100940279,5,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 1243,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 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 1245,List the distinct values of RegionID in the Region table.,SELECT DISTINCT RegionID FROM Region,SELECT DISTINCT RegionID FROM Region,3.0429959203251267,1,1,1,15 1246,What is the fastest car made by Japan?,SELECT T1.car_name 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 T3.country = 'Japan' ORDER BY T1.horsepower DESC LIMIT 1,"SELECT CAST(SUM(IIF(T1.car_name = 'Japan', 1, 0)) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",0.2565890020276155,4,0,0,23 1247,Tell the origin country of car no.382.,SELECT DISTINCT T2.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.ID = 382,SELECT T3.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.`ID` = 382,-2.93698899159315,8,0,0,28 1248,How many clients from Mozambique required orders with a low priority order?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN orders AS T3 ON T1.c_custkey = T3.o_custkey WHERE T2.n_name = 'MOZAMBIQUE' AND T3.o_orderpriority = '5-LOW',"SELECT SUM(CASE WHEN T2.n_name = 'Mozambique' THEN 1 ELSE 0 END) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2._nationk INNER JOIN orders AS T3 ON STRFTIME('%Y', T3.o_custkey )",-0.44466435444914026,2,0,0,29 1249,"Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date?","SELECT T1.OrderNumber, T1.OrderDate FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Apollo Ltd' ORDER BY T1.`Unit Price` 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` = 'Apollo Ltd' ORDER BY T1.`Unit Price` DESC LIMIT 1,3.7158780211919535,1,0,0,29 1250,What is the oldest age of male clients?,SELECT MAX(age) FROM client WHERE sex = 'Male',SELECT MAX(age) FROM client WHERE sex = 'Male',4.226653647370264,1,1,1,23 1251,How many east_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,-0.14049518813872028,11,1,1,26 1252,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 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 1254,List the distinct client_id values linked to district.,SELECT DISTINCT T2.client_id FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.client_id FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,6.76316711712273,1,1,1,20 1255,"For each ProductID, what is the average Discount?","SELECT ProductID, AVG(Discount) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, AVG(Discount) FROM `Order Details` GROUP BY ProductID",2.4057697593944316,1,1,1,20 1256,How many generalinfo records have matching records in location?,SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.url = T2.url,-3.241196102237646,5,0,0,29 1257,How many records in Orders were recorded in 2021?,SELECT COUNT(OrderID) FROM Orders WHERE RequiredDate LIKE '2021%',SELECT COUNT(OrderID) FROM Orders WHERE RequiredDate LIKE '2021%',5.25255107492374,1,1,1,24 1258,What is the average SalesID for joined Customers and Sales records?,SELECT AVG(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID,SELECT AVG(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.customerID = T2.CustomerID,3.8727287743868954,2,1,1,19 1259,How many records in orders were recorded in 2020?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2020%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2020%',4.775940017408425,1,1,1,23 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 1261,"For each Country, how many records are there in Suppliers?","SELECT Country, COUNT(CompanyName) FROM Suppliers GROUP BY Country","SELECT Country, COUNT(CompanyName) FROM Suppliers GROUP BY Country",4.58756171296914,1,1,1,21 1262,What is the name of the customer number 93697 with the total order price of 191918.92?,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 191918.92 AND T1.o_custkey = 93697,"SELECT T3.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE STRFTIME('%Y', T2.`o_orderdate) = '191918.92'",-0.4417841262402543,1,0,0,30 1263,"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 FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'MORIAH' AND T1.`middle Database: retail_complains` = '2013-08-11',-5.1219257780260845,27,0,0,30 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 1265,How many records are in the client table?,SELECT COUNT(email) FROM client,SELECT COUNT(email) FROM client,4.474103997787976,1,1,1,22 1266,"For each Product ID, how many records are there in central_superstore?","SELECT `Product ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Product id`",2.239224142212158,5,1,1,26 1267,How many orders were made by Alan Barnes in 2015 at the Central superstore?,"SELECT COUNT(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` = 'Alan Barnes' AND STRFTIME('%Y', T2.`Order Date`) = '2015'","SELECT SUM(CASE WHEN T1.`Customer Name` = 'Alan Barnes' AND STRFTIME('%Y', T2.`Order Date`) = '2015' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`.`Customer ID` = T2.Customer ID",-4.528202648346815,4,0,0,30 1268,"For each Product ID, how many south_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product 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.`Product ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`Product id` GROUP BY T2._Product ID",-1.3849953030536195,8,0,0,29 1269,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,22 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 1271,Compare the numbers of orders between the Eastern and Western stores in 2015.,"SELECT east, west FROM ( SELECT COUNT(`Order ID`) AS east , ( SELECT COUNT(`Order ID`) FROM west_superstore WHERE `Order Date` LIKE '2015%' ) AS west FROM east_superstore WHERE `Order Date` LIKE '2015%' )",SELECT CAST(COUNT(CASE WHEN T2.country = 'East' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.UNKNOWN) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.unknown = T2.`UNKNOWN Database: superstore` WHERE T1.`Western` LIKE '2015%',-7.993287870521647,2,0,0,26 1272,How many records in callcenterlogs were recorded in 2022?,SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2022%',SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2022%',1.3761424421645654,1,1,1,22 1273,"For each ProductID, what is the average UnitPrice?","SELECT ProductID, AVG(UnitPrice) FROM Products GROUP BY ProductID","SELECT ProductID, AVG(UnitPrice) FROM Products GROUP BY ProductID",5.006882409791407,1,1,1,18 1274,List all customer names with orders that are disputed.,"SELECT t3.firstName, t3.lastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = t3.employeeNumber WHERE t1.status = 'Disputed'",SELECT t3.firstName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2._customerNumber INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = T3.employeeNumber WHERE t1 . status = 'Disputed',-1.6034609062176053,17,0,0,30 1275,Which sales representatives in New York city whose leader is Anthony Bow with the employee number is 1143? Indicate their employee numbers.,SELECT T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.reportsTo = 1143 AND T2.city = 'NYC',SELECT T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1._officeCode = T2.officeCode WHERE t2.city = 'New York City' AND t1.reportsTo = 1143,-1.2931041270132566,1,0,0,25 1276,List the distinct street_name values linked to generalinfo.,SELECT DISTINCT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.2110652475088455,8,1,1,29 1277,How many west_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID`,1.9777095262503273,7,1,1,28 1278,Calculate the total quantity ordered for 18th Century Vintage Horse Carriage and the average price.,"SELECT SUM(T2.quantityOrdered) , SUM(T2.quantityOrdered * T2.priceEach) / SUM(T2.quantityOrdered) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productName = '18th Century Vintage Horse Carriage'",SELECT SUM(T2.quantityOrdered) / COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2._productCode WHERE T2.orderNumber = '18th Century Vintage Horse Carriage',-2.4700779408176734,1,0,0,26 1279,List the distinct CompanyName values linked to Products.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,7.134667971474412,1,1,1,27 1280,List the distinct server values linked to events.,SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Compose ID`,1.22314728424665,2,0,0,29 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 1282,What are the miles per gallon of the most expensive car?,SELECT T1.mpg FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1,"SELECT CAST(SUM(IIF(T1.mpg = 1, 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",-0.00936638623131753,17,0,0,30 1283,How many records in Orders were recorded in 2017?,SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2017%',SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2017%',5.25255107492374,1,1,1,24 1284,How many products records have matching records in orderdetails?,SELECT COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode,SELECT COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.ProductCode,6.680563450166989,1,1,1,22 1285,How many records are in the Customers table?,SELECT COUNT(ContactName) FROM Customers,SELECT COUNT(ContactName) FROM Customers,4.472691083849381,1,1,1,18 1286,How many records are in the callcenterlogs table?,SELECT COUNT(outcome) FROM callcenterlogs,SELECT COUNT(outcome) FROM callcenterlogs,4.858577923200564,1,1,1,19 1287,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2015%',1.7299368067526704,3,1,1,26 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 1289,"Among the product lists in order ID 10337, write down the product names and suppliers which had the highest in reorder level.","SELECT T2.ProductName, T1.CompanyName 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 T3.OrderID = 10337 ORDER BY T2.ReorderLevel DESC LIMIT 1","SELECT T4.ProductName, T3.OrderID FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` WHERE T2.ProductID = 10337 ORDER BY T1.`CompanyName` DESC LIMIT 1",-4.8105112299612856,1,0,0,30 1290,How many records are in the products table?,SELECT COUNT(MSRP) FROM products,SELECT COUNT(MSRP) FROM products,1.842977802856676,1,1,1,16 1291,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 1292,How many west_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,2.0967273085311766,7,1,1,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 1294,"Among the listed winery, what is the street number of the winery named ""Tulocay Winery""?",SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery',SELECT T1.`street_num Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = 2 WHERE T2.food_type = 'winery' AND T3.label = 'Tulocay winery',-4.770183880980884,2,0,0,19 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 1296,How many records in Shippers were recorded in 2023?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2023%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2023%',4.412960505279923,1,1,1,25 1297,Please list the id and detailed position of all stores in Birmingham city.,"SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham'","SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham'",2.3106369194595886,1,1,1,25 1298,What is the total Discount in the Order Details table?,SELECT SUM(Discount) FROM `Order Details`,SELECT SUM(Discount) FROM `Order Details`,5.311379135689884,1,1,1,21 1299,"For each Customer ID, how many records are there in south_superstore?","SELECT `Customer ID`, COUNT(Order) FROM south_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(Order) FROM south_superstore GROUP BY `Order Date`",0.05557500025436668,8,0,1,27 1300,Write down the name of products whose sale quantity is more than 950.,SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 950,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.Quantity > 950 THEN T1.Name ELSE 0 END) WHERE T IS NOT NULL,-3.044972477423737,5,0,0,16 1301,How many records are in the client table?,SELECT COUNT(middle) FROM client,SELECT COUNT(middle) FROM client,1.842977802856676,1,1,1,25 1302,When was the employee who handled order id 10281 hired?,SELECT T1.HireDate FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10281,"SELECT IIF(T2.OrderID = 10281, 1, 0) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID",-1.572838689867421,21,0,0,30 1303,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 DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 1000 AND 2000 ORDER BY SUM(T2.Quantity) DESC LIMIT 1,2.6930407760407835,5,0,0,30 1304,How many district records have matching records in reviews?,SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T1.`district Database: retail_complains`) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district _id,-7.272429719463899,20,0,0,25 1305,"For each status, how many records are there in orders?","SELECT status, COUNT(orderNumber) FROM orders GROUP BY status","SELECT status, COUNT(orderNumber) FROM orders GROUP BY status",5.101483010172825,1,1,1,18 1306,List down the restaurant ID of restaurants located in Sunnyvale.,SELECT id_restaurant FROM location WHERE city = 'sunnyvale',SELECT id_restaurant FROM location WHERE city = 'sunnyvale',3.734807551953072,1,1,1,25 1307,How many different clerks have served the customer with the address uFTe2u518et8Q8UC?,SELECT COUNT(T1.o_clerk) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_address = 'uFTe2u518et8Q8UC',"SELECT SUM(IIF(T2.c_address = 'uFTe2u518et8Q8UC', 1, 0)) AS REAL) * 100 / COUNT(T1.o_clerk) FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.s_custid WHERE T2.`c_mktsegment` = 'Clerks'",-7.725248858872865,2,0,0,30 1308,"For each Country, how many records are there in Customers?","SELECT Country, COUNT(CompanyName) FROM Customers GROUP BY Country","SELECT Country, COUNT(CompanyName) FROM Customers GROUP BY Country",4.58756171296914,1,1,1,19 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 1310,What is the most common product ordered by a customer from Germany?,SELECT T2.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Country = 'Germany' GROUP BY T2.ProductID ORDER BY COUNT(T2.ProductID) DESC LIMIT 1,SELECT T3.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 ON T1.Country = T2.Country ORDER BY T2.`ProductID` DESC LIMIT 1,-2.4154037666614077,4,0,0,30 1311,"For each ContactTitle, how many records are there in Suppliers?","SELECT ContactTitle, COUNT(SupplierID) FROM Suppliers GROUP BY ContactTitle","SELECT ContactTitle, COUNT(SupplierID) FROM Suppliers GROUP BY ContactTitle",2.7446606686406816,1,1,1,17 1312,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2017%',3.9900040784658684,1,1,1,25 1313,"List the phone number of the customer who placed orders with a total price of more than $300,000.",SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000,SELECT T3.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T2.`totalprice` > 3000,-2.0528088854557263,13,0,0,29 1314,"Between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server DARMON?","SELECT AVG(CAST(SUBSTR(ser_time, 4, 2) AS REAL)) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '2017-04-01'","SELECT AVG(ser_time) FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2017-01-01' AND ser_time LIKE '%/%/1/2017%'",1.2194431952222167,1,0,0,23 1315,"What are the names of the parts that have a part supply cost of at least 1,000?",SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000,"SELECT T.p_name FROM ( SELECT IIF(ps_supplycost < 1000, 1, 0) AS T FROM part ) AS T ORDER BY T.ps_availqty DESC LIMIT 1",-1.415357728924728,2,0,0,30 1316,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,-2.144702449513077,12,0,0,29 1317,"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%',3.1390577645048587,5,1,1,29 1318,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,21 1319,List the distinct values of City in the people table.,SELECT DISTINCT City FROM people,SELECT DISTINCT City FROM people,2.269073942246225,1,1,1,20 1320,How many territories are there in the region with the highest number of territories?,"SELECT COUNT(T2.RegionDescription), T1.TerritoryDescription, COUNT(*) AS num FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T1.TerritoryDescription ORDER BY num DESC LIMIT 1",SELECT COUNT(TID) FROM Territories AS num FROM Region ORDER BY num DESC LIMIT 1,-2.7663154319325702,2,0,0,30 1321,How many Employees records have matching records in EmployeeTerritories?,SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT COUNT(T1.`Title Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.Employee ID,-7.0631909393683605,20,0,0,26 1322,Which division is Diesel Galloway in?,SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Diesel' AND T1.last = 'Galloway',SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.`division` = 'Diesel Galloway',-3.10464782160089,7,0,0,23 1323,Which order have the highest unit cost?,"SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 )",SELECT OrderNumber FROM `Sales Orders` ORDER BY `Unit Cost` DESC LIMIT 1,1.2689414596620465,1,0,0,28 1324,"What is the full address of the customers who, having received a timely response from the company, have dispute about that response?","SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes'","SELECT CAST(SUM(IIF(T2.`Timely response?`, NULL)) AS REAL) * 100 / COUNT(T1.address_1) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer disputed?` = 'Yes'",0.415986725654654,1,0,0,30 1325,How many suppliers have their accounts in debt?,SELECT COUNT(s_suppkey) FROM supplier WHERE s_acctbal < 0,SELECT COUNT(s_suppkey) FROM supplier WHERE s_acctbal < 0,4.022997268207655,1,1,1,30 1326,"For each City, how many records are there in Customers?","SELECT City, COUNT(CompanyName) FROM Customers GROUP BY City","SELECT City, COUNT(CompanyName) FROM Customers GROUP BY City",5.319414557497681,1,1,1,15 1327,List the distinct _CustomerID values linked to Store Locations.,SELECT DISTINCT T2._CustomerID FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID,SELECT DISTINCT T2._CustomerID FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS t2 ON t1.StoreID = t2._StoreID,2.2843269942518796,1,1,1,26 1328,"What is the total cost of all the ""Road-650, Red, 60"" products that Abraham E. Bennet sold?","SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Abraham' AND T1.MiddleInitial = 'e' AND T1.LastName = 'Bennet' AND T3.Name = 'Road-650 Red, 60'","SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2[ProductID] = T3; T4.Name = 'Road-650, Red, 60'",-2.8380503505319905,2,0,0,2 1329,"Name the countries that belong in the region with comment description ""furiously express accounts wake sly"".",SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_comment = 'furiously express accounts wake sly',SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1._regionkey = T2.r_regionkey WHERE T2.`r_comment` = 'furiously express accounts wake sly',-1.5750943459251971,1,0,0,27 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 1331,"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 1332,Did Ms. Lyric Emely Taylor provide the consent for result of the complaint call on 2016/5/20?,"SELECT CASE WHEN T2.`Consumer consent provided?` IN (NULL, 'N/A', '') THEN 'No' ELSE 'Yes' END FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lyric' AND T1.middle = 'Emely' AND T1.last = 'Taylor' AND T1.sex = 'Female' AND T2.`Date received` = '2016-05-20'","SELECT 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-05-20'",-2.908822121328724,9,0,0,29 1333,How many territory fall into region 1?,SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1,SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1,2.105871600676612,1,1,1,28 1334,Please give the name of the customer who has made the single order with the highest total price.,SELECT T2.c_name 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 T_name FROM ( SELECT T2.c_name, SUM(T1.o_totalprice) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.`c_custid` ) WHERE T IS NOT NULL",-3.383176888881421,3,0,0,30 1335,List the customer's ID and last name of the customer that purchased a product with a quantity greater than 90% of the average quantity of all listed products.,"SELECT T2.CustomerID, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales ) * 0.9","SELECT T2.CustomerID, T3.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.`CustomerID` WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales )",1.49447197695639,1,0,0,29 1336,Please calculate the average total price of shipped orders from German customers.,SELECT SUM(T3.quantityOrdered * T3.priceEach) / COUNT(T2.orderNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T2.status = 'Shipped' AND T1.country = 'Germany',SELECT CAST(SUM(CASE WHEN T2.status = 'Shipped' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.salesRepEmployeeNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2._customerNumber INNER JOIN orderdetails AS T3 ON t2.ordernumber = T3.orderNumber,-4.763807268035749,24,0,0,30 1337,"From 2003 to 2004, how many customers have paid more than three times?","SELECT COUNT(customernumber) FROM ( SELECT customernumber FROM payments WHERE STRFTIME('%Y', paymentDate) >= '2003' AND STRFTIME('%Y', paymentDate) <= '2004' GROUP BY customernumber HAVING COUNT(customernumber) > 3 ) T",SELECT COUNT(customerNumber) FROM payments WHERE paymentDate BETWEEN '2003-01-01' AND '2004-04-30',4.844292648597046,1,0,0,26 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 1339,"For each CITY, how many records are there in Customer and Suppliers by City?","SELECT CITY, COUNT(Suppliers) FROM `Customer and Suppliers by City` GROUP BY CITY","SELECT CITY, COUNT(Suppliers) FROM `Customer and Suppliers by City` GROUP BY CITY",2.175825649182447,1,1,1,20 1340,To whom does the employee have to inform that is the sales representative of the French customer?,SELECT T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.country = 'France',SELECT T3.customerName FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.`country` = 'France',1.7633608167736303,3,0,0,30 1341,List down the customer ids who placed order with Michael Suyama.,SELECT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama',"SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE STRFTIME('%Y', T1.`LastName Database: retail_world`) = 'Michael' AND T2.`CustomerID` = 'Soundama'",-6.60063545496828,30,0,0,30 1342,"Among the cars with an acceleration of over 10 miles per squared hour, how many of them cost more than $20000 and less than $30000?",SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.acceleration > 10 AND T2.price BETWEEN 20000 AND 30000,SELECT COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.`acceleration Database: cars` BETWEEN 20000 AND 30000 AND T2.`price` < 10,-8.965291966096304,22,0,0,30 1343,How many records in west_superstore were recorded in 2015?,SELECT COUNT(`Product ID`) FROM west_superstore WHERE Ship LIKE '2015%',SELECT COUNT(`Product ID`) FROM west_superstore WHERE Ship LIKE '2015%',1.3573268699547099,1,1,1,23 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 1346,How many east_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID`,-0.6047817528024223,8,0,0,26 1347,How many records are in the payments table?,SELECT COUNT(checkNumber) FROM payments,SELECT COUNT(checkNumber) FROM payments,4.281554795135653,1,1,1,15 1348,What territories is the Inside Sales Coordinator in charge of?,SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Title = 'Inside Sales Coordinator',SELECT DISTINCT T2.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Elfitories` WHERE T1.Title = 'Inside Sales Coordinator',-4.361227136783139,1,0,0,28 1349,"Who is the sales representative that made the order which was sent to 25 Maiden Lane, Floor No. 4?","SELECT T2.firstName, T2.lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T1.addressLine1 = '25 Maiden Lane' AND T1.addressLine2 = 'Floor No. 4'","SELECT t.firstName, t.lastName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE T1.customerName = '25 Maiden Lane' AND T2.jobTitle = 'Sales Rep'",-3.6023742337069318,6,0,0,29 1350,Identify the total number of orders placed by the customer 'Laughing Bacchus Wine Cellars' and it's average value.,"SELECT COUNT(T2.OrderID) , SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars'","SELECT SUM(CASE WHEN T1.CompanyName = 'Laughing Bacchus Wine Cellars' THEN 1 ELSE 0 END) , AVG(T2.UnitPrice) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID",-6.544517988639209,2,0,0,30 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 1352,"For each Country, how many records are there in Customers?","SELECT Country, COUNT(ContactTitle) FROM Customers GROUP BY Country","SELECT Country, COUNT(ContactTitle) FROM Customers GROUP BY Country",4.107549427355398,1,1,1,19 1353,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2017%',-0.27887426505603213,8,1,1,23 1354,"Among all the suppliers providing the part ""hot spring dodger dim light"", how many of them are in Europe?",SELECT COUNT(T1.r_regionkey) 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 T1.r_name = 'EUROPE',SELECT COUNT(T3.s_suppkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2._nationkey INNER JOIN supplier AS T3 ON T2.n_name = 'hot spring dodger dim light',-4.9681565550799585,2,0,0,24 1355,Please list the phone numbers of the top 3 customers that have the highest credit limit and have Leslie Jennings as their sales representitive.,SELECT t1.phone FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Leslie' AND t2.lastName = 'Jennings' ORDER BY t1.creditLimit DESC LIMIT 3,SELECT phone FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber ORDER BY creditLimit DESC LIMIT 3,0.37156810925443623,1,0,0,27 1356,How many records in Shippers were recorded in 2017?,SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2017%',SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2017%',4.69216415425934,1,1,1,25 1357,What percentage of restaurants in Monterey County have Mexican food?,"SELECT CAST(SUM(IIF(T2.food_type = 'mexican', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'monterey county'","SELECT CAST(SUM(IIF(T1.county = 'monterey county', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city",2.918939244602369,2,0,0,18 1358,Which employee has created the least order and please indicates the employee's title?,SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.OrderID) LIMIT 1,SELECT T3.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID ORDER BY T2.OrderID DESC LIMIT 1,-3.1031622085842745,1,0,0,30 1359,"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`",3.41871280272248,10,1,1,25 1360,What is the average price for joined data and price records?,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,6.1358290547634615,1,1,1,23 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 1363,"For each Region, how many east_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) 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.Product ID) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Region",-1.1932011374351836,4,0,0,29 1364,List the distinct values of o_orderstatus in the orders table.,SELECT DISTINCT o_orderstatus FROM orders,SELECT DISTINCT o_orderstatus FROM orders,4.732550129264441,1,1,1,15 1365,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(RESULT) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(RESULT) FROM Employees GROUP BY FirstName",5.657580059238104,1,1,1,18 1366,"Calculate the order percentage by ""Carlos Miller"" sales team.",SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID,"SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`, T2.SalesTeamID",-0.6675036767843576,1,0,0,27 1367,"For each city, how many records are there in location?","SELECT city, COUNT(id_restaurant) FROM location GROUP BY city","SELECT city, COUNT(id_restaurant) FROM location GROUP BY city",5.101483010172825,1,1,1,18 1368,"In 2022, 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 '2022%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2022%',3.9900040784658684,1,1,1,25 1369,"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(IIF(T2.l_shipmode = 'AIR', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 WHERE T1.o_orderpriority = '1-URGENT' AND STRFTIME('%Y', T2.s_shipdate) = '1998-01-01'",-1.0012936156242114,1,0,0,30 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 1372,List all the addresses for the suppliers of the biggest parts.,SELECT T2.s_address FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey ORDER BY T3.p_size DESC LIMIT 1,SELECT T3.p_address FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_sup pkey INNER JOIN part AS T3 ON T2._partkey = t3.part_partkey ORDER BY T_availqty DESC LIMIT 1,-1.281859079428118,2,0,0,26 1373,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,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 1376,Is (206) 555-1189 the home phone number for Laura Callahan?,SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan',"SELECT FirstName, LastName FROM Employees WHERE HomePhone = '206 555-1189'",1.8317542507326088,1,0,0,28 1377,"Please list any two clients with their full names who have been tagged as ""Older American"" by the company without seeking their permission.","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?` IN (NULL, 'N/A', '') LIMIT 2","SELECT first, middle, last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE Tags = 'Older American' AND T2.`Consumer consent provided?` = 'N/A'",1.1370118500368,3,0,0,29 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 1379,State the full name of clients with server time of 20 minutes and above.,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE strftime('%M', T2.ser_time) > '20'","SELECT first, middle, last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE STRFTIME('%Y', T2.ser_time) > '20'",-1.1925920939534775,2,0,0,28 1380,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 = 'Ipoh Coffee' AND T2.`CompanyName` = 'Leka Trading',-5.449671536866246,2,0,0,29 1381,"For each ContactName, how many records are there in Suppliers?","SELECT ContactName, COUNT(SupplierID) FROM Suppliers GROUP BY ContactName","SELECT ContactName, COUNT(SupplierID) FROM Suppliers GROUP BY ContactName",4.720593201875388,1,1,1,17 1382,"In 2012, how many complaints about Credit card product came from clients in Omaha?","SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Omaha' AND strftime('%Y', T2.`Date received`) = '2012' AND T2.Product = 'Credit card'",SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2012%',3.895548961939772,1,0,0,29 1383,How many customers in the Northeast use Microsoft email?,SELECT COUNT(T1.email) 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 = 'Northeast' AND T1.email LIKE '%@outlook.com',SELECT COUNT(T1.`email Database: retail_complains`) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2District_ID INNER JOIN state AS T3 ON T2.state_abbrev = T3StateCode WHERE T3.Region = 'Northeast' AND T4.StateCode = 'Microsoft',-6.857926779642149,2,0,0,27 1384,How many south_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.7465842547027142,8,1,1,26 1385,"In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?",SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5,SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Stars) FROM district AS T1 INNER JOIN reviews AS T2 ON T2.district_id = T1 . district_id WHERE Stars = 5,-0.10207257661903832,10,0,0,19 1386,What is the highest o_totalprice in the orders table?,SELECT MAX(o_totalprice) FROM orders,SELECT MAX(o_totalprice) FROM orders,3.0436374256045164,1,1,1,20 1387,List the distinct values of Region in the central_superstore table.,SELECT DISTINCT Region FROM central_superstore,SELECT DISTINCT Region FROM central_superstore,3.4486835200729438,1,1,1,15 1388,Calculate the swept volume of the $34538.97449 car.,SELECT T1.displacement / T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 34538.97449,"SELECT CAST(SUM(IIF(T2.price = '34538.97449', 1, 0)) AS REAL) * 100 / COUNT(T1.cylinders) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",2.049987958587557,8,0,0,29 1389,How many Products records have matching records in Order Details?,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductId,-1.7657371143393048,17,1,1,24 1390,What is the average UnitPrice in the Products table?,SELECT AVG(UnitPrice) FROM Products,SELECT AVG(UnitPrice) FROM Products,5.250901335507442,1,1,1,20 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 1394,"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 CASE WHEN T1.`Date received Database: retail_complains` LIKE '2019%' AND T2.`Submitted via` = 'Fax' THEN T2.Client_ID },-8.185183877005867,2,0,0,30 1395,How many records in lineitem were recorded in 2019?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2019%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2019%',4.412960505279923,1,1,1,24 1396,How many records are in the geographic table?,SELECT COUNT(IIF) FROM geographic,SELECT COUNT(IIF) FROM geographic,3.1109523087002167,1,1,1,21 1397,What is the highest Profit in the east_superstore table?,SELECT MAX(Profit) FROM east_superstore,SELECT MAX(Profit) FROM east_superstore,3.6592814209018685,1,1,1,21 1398,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,18 1399,"How many employees sold over 20,000 quantities of ""Touring-2000 Blue, 50""?","SELECT COUNT(*) FROM ( SELECT SUM(Quantity) FROM Sales WHERE ProductID IN ( SELECT ProductID FROM Products WHERE Name = 'Touring-2000 Blue, 50' ) GROUP BY Quantity, SalesPersonID HAVING SUM(Quantity) > 20000 )","SELECT COUNT(T1.EmployeeID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.Name = 'Touring-2000 Blue, 50'",-2.3642150552103076,2,0,0,30 1400,On what date did the customer with the lowest credit limit serviced by sales representative Barry Jones make payments for his/her orders?,SELECT T3.paymentDate FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber WHERE T1.firstName = 'Barry' AND T1.lastName = 'Jones' AND T1.jobTitle = 'Sales Rep' ORDER BY T2.creditLimit ASC LIMIT 1,SELECT MIN(T2.paymentDate) FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T3.customernumber = T4.customerNumber WHERE t2.customerName = 'Barry Jones' AND t1.jobTitle = 'Sales Rep' GROUP BY T2.`creditLimit` ORDER BY SUM(T3.amount) DESC LIMIT 1,-0.9083880526008552,3,0,0,29 1401,What product have the highest unit price and how many quantity have been being sold?,"SELECT T1.ProductName, T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.UnitPrice DESC LIMIT 1","SELECT ProductName, COUNT(ProductID) FROM Products ORDER BY T1.UnitPrice DESC LIMIT 1",-3.233320233894182,1,0,0,30 1402,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 1403,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.957926503340143,16,0,0,29 1404,List the distinct values of Segment in the people table.,SELECT DISTINCT Segment FROM people,SELECT DISTINCT Segment FROM people,5.1121551324071595,1,1,1,20 1405,List the distinct label values linked to location.,SELECT DISTINCT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.345881867067645,14,1,1,29 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 1408,How many records are in the partsupp table?,SELECT COUNT(ps_partkey) FROM partsupp,SELECT COUNT(ps_partkey) FROM partsupp,3.598611489804307,2,1,1,20 1409,What is the full address of the office where 4 people work and one of them is Sales Representation?,"SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep'","SELECT addressLine1, addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.jobTitle = 'Sales Rep' AND t1.country = 'USA'",3.762571137557591,1,0,0,30 1410,How many records in callcenterlogs were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2019%',2.652279595238586,1,1,1,25 1411,What is the highest amount in the payments table?,SELECT MAX(amount) FROM payments,SELECT MAX(amount) FROM payments,2.382359359446688,1,1,1,18 1412,Which county in northern California has the highest number of cities?,SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1,SELECT county FROM geographic WHERE region = 'northern california' ORDER BY city DESC LIMIT 1,5.290913095014493,1,0,0,25 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 1414,"For each customerNumber, how many records are there in payments?","SELECT customerNumber, COUNT(checkNumber) FROM payments GROUP BY customerNumber","SELECT customerNumber, COUNT(checkNumber) FROM payments GROUP BY customerNumber",5.507473026431465,1,1,1,16 1415,How many records in Orders were recorded in 2022?,SELECT COUNT(CustomerID) FROM Orders WHERE ShipName LIKE '2022%',SELECT COUNT(CustomerID) FROM Orders WHERE ShipName LIKE '2022%',5.226797006773571,1,1,1,25 1416,How many records are in the central_superstore table?,SELECT COUNT(`Customer ID`) FROM central_superstore,SELECT COUNT(`Customer ID`) FROM central_superstore,3.5370566337888154,1,1,1,22 1417,"Among the employee names, what is the most common middle initial?",SELECT MiddleInitial FROM Employees GROUP BY MiddleInitial ORDER BY COUNT(MiddleInitial) DESC LIMIT 1,SELECT MiddleInitial FROM Employees WHERE FirstName = 'MiddleInitial' ORDER BY LastName DESC LIMIT 1,2.2311027875521563,1,0,0,30 1418,Name all products supplied by Zaanse Snoepfabriek.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Zaanse Snoepfabriek',"SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE STRFTIME('%Y', T2.`CompanyName`) = 'Zaanse Snoepfabriek'",-6.364906510332548,1,0,0,25 1419,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 orderdetails ORDER BY quantityOrdered DESC LIMIT 5,1.6928064949570827,1,0,0,30 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 1421,Which country produced the highest number of cars? Calculate the annual average number of cars that the said country produced from the very start to the present.,"SELECT T2.country, CAST(COUNT(T1.ID) AS REAL) / COUNT(DISTINCT T1.model_year) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin GROUP BY T2.country ORDER BY COUNT(T2.country) DESC LIMIT 1",SELECT T4.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin ORDER BY COUNT(T2.country) DESC LIMIT 1,-5.473475626603804,9,0,0,29 1422,How many customers in Chicago ordered at least 10 Cardinal EasyOpen D-Ring Binders in a single order?,SELECT COUNT(DISTINCT T1.`Customer ID`) 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` = 'Cardinal EasyOpen D-Ring Binders' AND T2.City = 'Chicago' AND T1.Quantity > 10,SELECT SUM(CASE WHEN T3.`Product Name` = 'Cardinal EasyOpen D-Ring Binders' THEN 1 ELSE 0 END) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID Database: superstore` INNER JOIN product AS T3 WHERE T3.City = 'Chicago' AND T1.Quantity BETWEEN 10 AND 10,-7.656083233214892,20,0,0,28 1423,To whom does Nancy Davolio report? Please give that employee's full name.,"SELECT FirstName, LastName FROM Employees WHERE EmployeeID = ( SELECT ReportsTo FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' )","SELECT FirstName, LastName FROM Employees WHERE ReportsTo = 'Davolio' AND FirstName = 'Nancy'",4.5226768319117365,1,0,0,29 1424,Name the customers from the Eastern region whose orders cost above 80000.,SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' AND T1.Sales / (1 - T1.Discount) * T1.Quantity - T1.Profit > 80000,SELECT DISTINCT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'East' AND T2.Sales > 80000,2.3410103590925604,1,0,0,30 1425,What is the average price of products with more than fifty units in stock?,SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50,SELECT AVG(UnitPrice) FROM Products WHERE UnitsInStock > 50,2.4703571839203984,1,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 1428,Calculate the total sales ids that were sales of Flat Washer 8.,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Flat Washer 8',SELECT SUM(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.Name = 'Flat Washer 8',1.2584921348321487,1,0,0,30 1429,Please name any two products that have the highest satisfaction levels among users of Heli Swaren GmbH & Co. KG.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Heli Swaren GmbH & Co. KG' ORDER BY T1.ReorderLevel DESC LIMIT 2,"SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE STRFTIME('%Y', T2.`CompanyName`) = 'Heli Swaren GmbH & Co. KG' LIMIT 2",-6.127333854692301,1,0,0,30 1430,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,0.028367121565147695,4,1,1,25 1431,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 * (1 - T2.Quantity)) / COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.ReportsTo = T2,-4.5827541371282985,11,0,0,30 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 1433,"For each c_mktsegment, how many records are there in customer?","SELECT c_mktsegment, COUNT(c_custkey) FROM customer GROUP BY c_mktsegment","SELECT c_mktsegment, COUNT(c_custkey) FROM customer GROUP BY c_Mktsegment",1.7835743516782323,3,1,1,30 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 1435,What is the total value of shipped vintage car orders from 2003-2004?,SELECT SUM(T2.priceEach * T2.quantityOrdered) 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 T3.status = 'Shipped' AND T3.orderDate BETWEEN '2003-01-01' AND '2004-12-31',"SELECT SUM(T2.quantityOrdered * T2.priceEach) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2._productCode INNER JOIN orders AS T3 ON T3.ordernumber = T4.orderNumber WHERE T3.`status` = 'Shipped' AND STRFTIME('%Y', T2.`shippedDate) = '2003-2004'",-2.2357644416127394,2,0,0,25 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 1439,"Of all the products ordered in order no. 10248, which product has the highest user satisfaction?",SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1,SELECT T3.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T1.`ReorderLevel Database: retail_world` = 10248 ORDER BY T2.OrderID DESC LIMIT 1,-4.465681911806745,1,0,0,30 1440,"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` = T2.`location`,-5.792005493042374,9,0,0,30 1441,Calculate the average number of complaints received from New Bedford each year which are closed with explanation.,"SELECT STRFTIME('%Y', T3.`Date received`) , CAST(SUM(CASE WHEN T3.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T3.`Complaint ID`) AS average 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.city = 'New Bedford' GROUP BY strftime('%Y', T3.`Date received`)",SELECT CAST(SUM(CASE WHEN T2.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client Database: retail_complains` = T2.client_id INNER JOIN events IS NOT NULL,-9.461559887628859,2,0,0,29 1442,How many Sales Orders records have matching records in Store Locations?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID,0.22162122535963777,4,1,1,25 1443,"What is the total quantity of the part ""hot spring dodger dim light"" ordered in all orders?",SELECT SUM(T1.p_partkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_name = 'hot spring dodger dim light',"SELECT CAST(SUM(IIF(T1.p_name = 'hot spring dodger dim light', 1, 0)) AS REAL) * 100 / COUNT(T2.l_orderkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1._partkey = T2.L_partkey",1.3578769304346052,5,0,0,30 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 1445,What is the customer names of orders which have unit cost greater than 4000USD?,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 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,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 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.1362490814046953,1,1,1,29 1446,How many records are in the country table?,SELECT COUNT(origin) FROM country,SELECT COUNT(origin) FROM country,3.1109523087002167,1,1,1,19 1447,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 GROUP BY T_ACCTbal ORDER BY COUNT(*) DESC LIMIT 1,-1.8680562827215268,1,0,0,26 1448,Which Customer ID has the highest Profit?,SELECT `Customer ID` FROM central_superstore ORDER BY Profit DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Profit DESC LIMIT 1,4.898225637838208,1,1,1,26 1449,"For each Product ID, how many west_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer 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.`Customer ID Database: superstore`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2 `Product ID` GROUP BY T3.`Product Name`",-9.236736687809278,21,0,0,26 1450,List the quantity and price of the product bought by Abigail Henderson.,"SELECT T2.Quantity, T1.Price 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 T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson'","SELECT CAST(SUM(IIF(T2.FirstName = 'Abigail' AND T2.MiddleInitial = 'Henderson', 1, 0)) AS REAL) * 100 / COUNT(T1.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 . ProductID",-2.545292731825326,2,0,0,27 1451,List out the city name of states located in South region.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Region = 'South' THEN T2.`City Name` 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 T1.Region = 'South' THEN T2.`City Name` ELSE NULL END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1._StateCode ) WHERE T IS NOT NULL,1.5710356224931565,1,0,0,25 1452,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",3.834964362230201,2,0,0,18 1453,"What is the total price of all orders from the customer with the phone number ""627-220-3983""?",SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_phone = '627-220-3983',"SELECT SUM(IIF(T2.c_phone = '627-220-3983', 1, 0)) AS REAL) * 100 / COUNT(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.s_custid",-7.1823149993295745,1,0,0,29 1454,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 1455,Calculate the total number of orders placed by the company 'GROSELLA-Restaurante'.,SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante',SELECT CAST(SUM(CASE WHEN T1.CompanyName = 'GROSELLA-Restaurante' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1._CustomerID = T2.CustomerID,-3.4391334401170015,8,0,0,30 1456,What proportion of suppliers are from Asia?,"SELECT CAST(SUM(IIF(T1.r_name = 'ASIA', 1, 0)) AS REAL) * 100 / COUNT(T1.r_regionkey) 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",SELECT CAST(SUM(CASE WHEN T2.n_name = 'ASIA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.s_nationkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey ++,-4.253471946128709,3,0,0,23 1457,"Of the 10 products with the highest unit price, identify by their ID the ones that have generated the least satisfaction.","SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1","SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1",2.3424752606324017,4,1,1,30 1458,How much is the part supply cost for the medium metallic grey dodger linen?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'medium metallic grey dodger linen',"SELECT CAST(SUM(IIF(T1.p_mfgr = 'medium metallic grey dodger linen', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_partkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._p_partsuppkey = T2.PS_suppkey WHERE STRFTIME('%Y', T2.`ps_availqty`) = 'cyan'",-3.2191937928973298,1,0,0,30 1459,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(T1.Profit) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,0.8768377066453473,7,1,1,27 1460,How many records in production were recorded in 2016?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2016%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2016%',4.69216415425934,1,1,1,25 1461,Calculate the average payment per product under confections category.,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T3.CategoryName = 'Confections',SELECT CAST(SUM(CASE WHEN T2.CategoryName = 'Confections' THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.Discount) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-9.211272764322693,20,0,0,30 1462,How many records in Customer and Suppliers by City were recorded in 2017?,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City` WHERE Relationship LIKE '2017%',SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City` WHERE Relationship LIKE '2017%',3.67056647466942,1,1,1,21 1463,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(label) FROM generalinfo GROUP BY city","SELECT city, COUNT(label) FROM generalinfo GROUP BY city",5.223027939731705,1,1,1,19 1464,"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%',1.333560649529996,7,1,1,27 1465,List all the streets with more than 10 restaurants in Alameda county.,SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10,SELECT t3.street_name FROM geographic AS t1 INNER JOIN location AS t2 ON t1.city = t2.city WHERE T1.county > 'alameda county',-4.186365915233564,10,0,0,29 1466,How many orders has Aimee Bixby made?,SELECT COUNT(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',SELECT COUNT(T2.`Order 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 = 'Made',0.33658041960110074,3,0,0,29 1467,List the distinct Product ID values linked to west_superstore.,SELECT DISTINCT T2.`Product ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.`Product ID` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID,1.5583132422296788,1,0,0,24 1468,How many records in events were recorded in 2020?,SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2020%',SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2020%',1.0525531105760992,1,1,1,25 1469,List the distinct values of Region in the state table.,SELECT DISTINCT Region FROM state,SELECT DISTINCT Region FROM state,3.537048448089766,1,1,1,16 1470,How much did Petit Auto pay on 2004-08-09?,SELECT t1.amount FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Petit Auto' AND t1.paymentDate = '2004-08-09',SELECT SUM(CASE WHEN t2.customerName = 'Petit Auto' AND t1.paymentDate LIKE '2004-08-09%' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(t1.checkNumber) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.salesRepEmployeeNumber WHERE STRFTIME('%Y-%m-%dT%H:%M:%S') = '',-6.587173818143427,24,0,0,24 1471,Calculate the average quantity per sales from sales id 20 to 30.,SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30,SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30,1.8021002990699653,1,1,1,29 1472,List the distinct Product ID values linked to south_superstore.,SELECT DISTINCT T2.`Product ID` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.`Product ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID,1.4957358249086206,1,0,0,24 1473,Show the origin country of Chevrolet Malibu.,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 = 'chevrolet malibu',"SELECT CAST(SUM(IIF(T1.car_name = 'chevrolet malibu', 1, 0)) AS REAL) * 100 / COUNT(T2.country) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",-0.3082468871664735,13,0,0,28 1474,List the distinct values of Company response to consumer in the events table.,SELECT DISTINCT `Company response to consumer` FROM events,SELECT DISTINCT `Company response to consumer` FROM events,3.719929399566426,1,1,1,21 1475,"For each Product ID, what is the average Quantity?","SELECT `Product ID`, AVG(Quantity) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Quantity) FROM east_superstore GROUP BY `Product id`",0.9716123581403018,7,1,1,27 1476,How many central_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.12271205210004123,20,1,1,25 1477,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 COUNT(CASE WHEN T1.`Customer Name` = 'Aaron Bergman' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`` = T2.`Customer ID` WHERE T2.Ship Mode = 'Standard Ship',-1.3487310339404828,8,0,0,30 1478,What is the average Quantity in the east_superstore table?,SELECT AVG(Quantity) FROM east_superstore,SELECT AVG(Quantity) FROM east_superstore,4.2263400530524775,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 1481,"How many customers have a credit limit of not more than 100,000 and which customer made the highest total payment amount for the year 2004?","SELECT ( SELECT COUNT(customerNumber) FROM customers WHERE creditLimit <= 100000 AND customerNumber IN ( SELECT customerNumber FROM payments WHERE STRFTIME('%Y', paymentDate) = '2004' ) ), T1.customerName FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.creditLimit <= 100000 AND STRFTIME('%Y', T2.paymentDate) = '2004' GROUP BY T1.customerNumber, T1.customerName ORDER BY SUM(T2.amount) DESC LIMIT 1",SELECT COUNT(customerNumber) FROM customers WHERE creditLimit > 1000 AND paymentDate BETWEEN '2004-01-01',2.033917773472511,1,0,0,30 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 1484,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,23 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 1486,What is the average _SalesTeamID for joined Sales Orders and Customers records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,2.76784154322925,1,1,1,19 1487,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_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 west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`Channel ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,29 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 1489,How many product names does the supplier Exotic Liquids have?,SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids',SELECT SUM(CASE WHEN T2.CompanyName = 'Exotic Liquids' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,-2.467481697231323,29,0,0,30 1490,How many records are in the Customers table?,SELECT COUNT(CustomerID) FROM Customers,SELECT COUNT(CustomerID) FROM Customers,4.281554795135653,1,1,1,19 1491,What is the discounted price of line item number 1?,SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1,SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1,2.652892691530507,1,1,1,27 1492,"In the Bay Area, what is the most common type of food served by restaurants?",SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1,SELECT T3.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city ORDER BY COUNT(T1.region) DESC LIMIT 1,-4.464722420661728,2,0,0,28 1493,"What is the order ID of the security-Tint Envelopes product ordered on June 3, 2013, in the Central region?",SELECT DISTINCT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Security-Tint Envelopes' AND T1.`Order Date` = '2013-06-03',"SELECT DISTINCT `Order ID` FROM central_superstore WHERE `Product Name` = 'Security-Tint Envelopes' AND STRFTIME('%Y', `Order Date`) = '2013'",1.7694760794405449,1,0,0,19 1494,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 Mode = 'Standard Class' AND T2.Region = 'South' AND AVG(Sales) > 88,2.489939477514214,1,0,0,30 1495,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 SUM(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10248 ORDER BY T3.Quantity DESC LIMIT 1,0.2730411694546997,3,0,0,29 1496,"Among all the orders made by Aimee Bixby, how many of them chose the slowest delivery speed?",SELECT COUNT(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' AND T2.`Ship Mode` = 'Standard Class',SELECT COUNT(CASE WHEN T1.`Customer Name` = 'Aimee Bixby' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`` = T2.`Customer ID` WHERE T2.Ship Mode = 'Standard Class',-4.003082670121715,1,0,0,30 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 1499,How many records are in the location table?,SELECT COUNT(id_restaurant) FROM location,SELECT COUNT(id_restaurant) FROM location,4.858577923200564,1,1,1,22 1500,How many records in Shippers were recorded in 2015?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2015%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2015%',4.412960505279923,1,1,1,24 1501,What is the name of the product with the lowest quantity?,SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity LIMIT 1,SELECT T.Name FROM ( SELECT MIN(Quantity) FROM Products ) AS T ORDER BY T.Quantity DESC LIMIT 1,-3.223500831401038,1,0,0,28 1502,"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.313658695703505,8,1,1,27 1503,How many client records have matching records in events?,SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,7.102778900454914,1,1,1,22 1504,What products are no longer sold by Northwind?,SELECT ProductName FROM Products WHERE Discontinued = 1,SELECT ProductName FROM Products WHERE Discontinued = 1,4.109981628474669,1,1,1,30 1505,"In 2019, 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 '2019%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2019%',3.4416734708638548,4,1,1,30 1506,What is the highest l_discount in the lineitem table?,SELECT MAX(l_discount) FROM lineitem,SELECT MAX(l_discount) FROM lineitem,3.0436374256045164,1,1,1,20 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 1508,"For each Address, how many records are there in Customers?","SELECT Address, COUNT(Fax) FROM Customers GROUP BY Address","SELECT Address, COUNT(Fax) FROM Customers GROUP BY Address",5.573540162828874,1,1,1,19 1509,Calculate the average net profit of phones which have sales channel of distributor.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Phones' AND T1.`Sales Channel` = 'Distributor'",SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'Phones' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID,-2.469767916750797,2,0,0,30 1510,What is the total Quantity in the central_superstore table?,SELECT SUM(Quantity) FROM central_superstore,SELECT SUM(Quantity) FROM central_superstore,5.100529480702467,1,1,1,21 1511,"Among the seafood products, which product have the highest total production of the production?",SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Seafood' ORDER BY T1.UnitsInStock + T1.UnitsOnOrder DESC LIMIT 1,SELECT T3.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.categoryID WHERE T1.`UnitsInStock Database: retail_world` = 'Seafood' GROUP BY T3.`CategoryName` ORDER BY SUM(T2.UnitsOnOrder) DESC LIMIT 1,-6.782641341741414,2,0,0,22 1512,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(review) FROM generalinfo GROUP BY city","SELECT city, COUNT(review) FROM generalinfo GROUP BY city",5.573540162828874,1,1,1,18 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 1514,What is the average Quantity in the west_superstore table?,SELECT AVG(Quantity) FROM west_superstore,SELECT AVG(Quantity) FROM west_superstore,4.2263400530524775,1,1,1,21 1515,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",-0.24283469148951697,20,0,0,30 1516,What is the name of the product that is most sold by sale person id 20?,SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 20 ORDER BY T2.Quantity DESC LIMIT 1,SELECT T3.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.SalesPersonID = 20 ORDER BY T1.`Price` DESC LIMIT 1,-3.621272371652204,4,0,0,30 1517,How many records in payments were recorded in 2020?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2020%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2020%',4.198241534572536,1,1,1,21 1518,List the distinct values of city in the generalinfo table.,SELECT DISTINCT city FROM generalinfo,SELECT DISTINCT city FROM generalinfo,4.508142555656296,1,1,1,18 1519,In which region can you find the top 4 most popular restaurants?,SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4,SELECT t3.region FROM generalinfo AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city ORDER BY T1.review DESC LIMIT 4,-4.336300626704618,9,0,0,29 1520,"For the order with the total price of 231499.38, what was the discounted price for supplier No. 9397?",SELECT T1.l_extendedprice * (1 - T1.l_discount) AS DISCOUNTERPRICE FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE T1.l_suppkey = 9397 AND T2.o_totalprice = 231499.38,"SELECT T3.o_totalprice FROM lineitem AS T1 INNER JOIN orders AS T2 ON T1.l_orderkey = T2._orderkey WHERE STRFTIME('%Y', T2.s_orderdate) = '231499.38' AND T2.`o_orderpriority` = 9397",0.05976178267549482,6,0,0,30 1521,What are the full names of the top 3 employees who handled the highest number of sales?,"SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 3",SELECT T3.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID ORDER BY SUM(T2.Quantity) DESC LIMIT 3,-3.9606533079654693,1,0,0,29 1522,What is the total ps_supplycost in the partsupp table?,SELECT SUM(ps_supplycost) FROM partsupp,SELECT SUM(ps_supplycost) FROM partsupp,3.079553430179709,1,1,1,21 1523,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.990246737955662,12,0,0,23 1524,When was the latest date the items of order no.1 were shipped?,SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1,SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1,1.4073511452880183,1,1,1,27 1525,"For each Region, how many central_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Product ID) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2 . Region",-1.258328131322466,5,0,0,27 1526,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(UnitsInStock) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(UnitsInStock) FROM Products GROUP BY ProductID",4.957144497985576,1,1,1,21 1527,"What was the phone of number of the client who made the complaint call ""CR0100432"" ?",SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432',SELECT T3.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432',1.3141370677994584,1,0,0,30 1528,"Among all the suppliers in debt, how many of them are in Europe?",SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE' AND T3.s_acctbal < 0,SELECT COUNT(T3.s_suppkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2._regionkey INNER JOIN supplier AS T3 ON T2.r_name = 'EUROPE',2.3899517867372477,3,0,0,28 1529,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,22 1530,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 INNER JOIN payments AS t3 ON t2.customerNumber = t3 .customerNumber ORDER BY T1.reportsTo DESC LIMIT 1",1.8954859509658721,3,0,0,30 1531,What are the prices on cheese products?,SELECT T2.UnitPrice FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.Description = 'Cheeses',"SELECT CAST(SUM(IIF(T1.Description = 'Cheeses', 1, 0)) AS REAL) * 100 / COUNT(T2.UnitPrice) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.categoryID = T2.CategoryID",3.64497087541131,2,0,0,20 1532,List the distinct client_id values linked to events.,SELECT DISTINCT T2.client_id FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,SELECT DISTINCT T2.client_id FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2 . client_id,4.517492586728658,2,1,1,27 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 1534,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 1535,"On which date was the part ""burnished seashell gainsboro navajo chocolate"" in order no.1 shipped?",SELECT T1.l_shipdate FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate',"SELECT STRFTIME('%Y', l_shipdate) FROM lineitem WHERE l_orderkey = 1 AND p_name = 'burnished seashell gainsboro navajo chocolate'",-0.17145393920309973,1,0,0,22 1536,"For each CompanyName, how many records are there in Customers?","SELECT CompanyName, COUNT(CompanyName) FROM Customers GROUP BY CompanyName","SELECT CompanyName, COUNT(CompanyName) FROM Customers GROUP BY CompanyName",4.258328108605211,1,1,1,21 1537,"In complaints about the credit card product, list the phone number of the oldest client.",SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1,SELECT MAX(T1.phone) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Product` = 'Credit card',-1.8527752617515363,20,0,0,27 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 1540,How many Credit Card complaints did Sharon handle?,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Product = 'Credit card' AND T1.server = 'SHARON',SELECT SUM(CASE WHEN T1.`server Database: retail_complains` = 'Sharon' THEN 1 ELSE 0 END) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1`` = T2.`Complaint ID` WHERE T2.Product = 'CreditCard',-6.178685165979125,14,0,0,20 1541,List the distinct Type values linked to Regions.,SELECT DISTINCT T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2.StateCode,SELECT DISTINCT T2.`Type` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2._StateCode,0.49739034739047877,5,0,0,22 1542,From which city and state does the customer that bought the product with the highest sales?,"SELECT T5.City, T5.State 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 people AS T5 ON T5.`Customer ID` = T4.`Customer ID` ORDER BY T2.Sales DESC LIMIT 1","SELECT T2.City, T3.State FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Customer ID Database: superstore` = T2.`Customer `ALIASES` INNER JOIN product AS T3 ON T3.`Product` = t2.`City` ORDER BY T1.Sales DESC LIMIT 1",-8.851775548590494,1,0,0,28 1543,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(Discontinued) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(Discontinued) FROM Products GROUP BY CategoryID",4.801190791215032,1,1,1,18 1544,"For each CustomerID, how many records are there in Orders?","SELECT CustomerID, COUNT(Freight) FROM Orders GROUP BY CustomerID","SELECT CustomerID, COUNT(Freight) FROM Orders GROUP BY CustomerID",5.657580059238104,1,1,1,20 1545,"For each Region, how many records are there in product?","SELECT Region, COUNT(`Product ID`) FROM product GROUP BY Region","SELECT Region, COUNT(`Product ID`) FROM product GROUP BY Region",3.634229031461111,1,1,1,20 1546,How many American cars have an acceleration time of less than 12 seconds?,SELECT 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 T3.country = 'USA' AND T1.acceleration < 12,SELECT SUM(CASE WHEN T1.`acceleration Database: cars` > 12 THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country,-6.754165679744572,3,0,0,26 1547,How many records in orders were recorded in 2018?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2018%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2018%',4.775940017408425,1,1,1,22 1548,"Calculate the revenue produced through sales of HL Road Frame - Red, 56.","SELECT SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'HL Road Frame - Red, 56'","SELECT CAST(SUM(IIF(T1.Name = 'HL Road Frame - Red, 56', 1, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 .ProductID WHERE T2.Quantity = 56",1.6636776583397472,7,0,0,26 1549,"List down the company names which supplied products for the order on 14th August, 1996.",SELECT T1.CompanyName 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 INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE date(T4.OrderDate) = '1996-08-14',SELECT T3.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` INNER JOIN `Order Details` AS T3 ON T2.ProductID = '14th August' AND T4.OrderDate = 1996,-6.099669766377573,3,0,0,30 1550,What is the full name of the employee in charge of the Southern region who is to report to Andrew Fuller?,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Southern' AND T1.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' )",SELECT DISTINCT T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`TerritoryID Database: retail_world` INNER JOIN Region AS T3 ON T2.RegionID = T3._RegionID WHERE T1.ReportsTo = 'Andrew' AND LastName = 'Fuller',-6.1851832926066885,1,0,0,30 1551,How many records are in the south_superstore table?,SELECT COUNT(Order) FROM south_superstore,SELECT COUNT(Order) FROM south_superstore,4.858577923200564,1,1,1,21 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 1555,Which county and region does the street E. El Camino Real belong to?,"SELECT DISTINCT T2.county, T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real'","SELECT county, region FROM location AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city WHERE T2.county = 'E. El Camino Real'",2.53839739961741,2,0,0,20 1556,Which Customer ID has the highest Quantity?,SELECT `Customer ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Customer ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,3.1400756888400467,1,1,1,27 1557,How many Store Locations records have matching records in Sales Orders?,SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID,SELECT COUNT(T1.StoreID) FROM Store Locations AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.storeID = T2._StoreID,-0.39629867763868504,5,0,0,28 1558,How many records are in the Products table?,SELECT COUNT(ProductID) FROM Products,SELECT COUNT(ProductID) FROM Products,4.233836292305277,1,1,1,20 1559,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(IIF(T2.c_mktsegment = 'Customer#000000013', 1, 0)) AS REAL) * 100 / COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON STRFTIME('%Y-%m-%d', T2.s_custkey",-6.194173790623039,23,0,0,28 1560,Provide the order comments for at least 5 orders made by customers in the furniture 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 = 'Furniture' LIMIT 5,"SELECT CAST(SUM(IIF(T2.c_mktsegment = 'FURNITURE', 1, 0)) AS REAL) * 100 / COUNT(T1.o_comment) FROM orders AS T1 INNER JOIN customer AS T2 ON T1. o_custkey = T2.C_Custkey WHERE T1._orderpriority = ( SELECT MIN(o_clerk) FROM customer )",-0.12406285756228312,6,0,0,30 1561,"Which region does ""Supplier#000000129"" belong to?",SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129',"SELECT T.r_name FROM ( SELECT IIF(T1.n_name = 'Supplier#000000129', 1, 0)) AS T ORDER BY T.s_acctbal DESC LIMIT 2",-3.7615488196518085,6,0,0,22 1562,"For all the complaint callers on 2017/3/27, what percentage of the clients are females?",SELECT CAST(SUM(CASE WHEN T1.sex = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2017-03-27',"SELECT CAST(SUM(CASE WHEN `sex Database: retail_complains` = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2017-03-27' LIMIT 1",-7.720898156900219,27,0,0,27 1563,List the distinct values of Region in the west_superstore table.,SELECT DISTINCT Region FROM west_superstore,SELECT DISTINCT Region FROM west_superstore,4.5739967119286575,1,1,1,16 1564,How many Sales Manager who are working in Sydney? List out their email.,SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.jobTitle LIKE '%Sales Manager%' AND T2.city = 'Sydney',SELECT email FROM ( SELECT officeCode FROM offices WHERE city = 'Sydney' ) WHERE territory = 'Sales Manager',0.5158068639709876,1,0,0,29 1565,Count the number of orders made from the store in city with population of 3000000 to 4000000.,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.Population BETWEEN 3000000 AND 4000000,SELECT COUNT(DISTINCT T) FROM ( SELECT DISTINCT CASE WHEN Population > 3000000 THEN T2.`City Name` END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,-3.3524345781493903,9,0,0,30 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 1567,"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 T2.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 WHERE T1.o_totalprice = 218195.43 LIMIT 1,-2.9057764839856888,7,0,0,30 1568,List the distinct ProductID values linked to Products.,SELECT DISTINCT T2.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.`ProductID` FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-4.933828345643109,17,0,0,30 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 1570,List the distinct values of Product ID in the product table.,SELECT DISTINCT `Product ID` FROM product,SELECT DISTINCT `Product ID` FROM product,4.781764725374198,1,1,1,17 1571,List the distinct Product ID values linked to east_superstore.,SELECT DISTINCT T2.`Product ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.Product ID FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`,1.4801312911458482,1,0,0,25 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 1573,"Name the sales person who helped Elizabeth A. White to purchase Road-250 Black, 48.","SELECT DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID INNER JOIN Customers AS T4 ON T2.CustomerID = T4.CustomerID WHERE T4.MiddleInitial = 'A' AND T4.LastName = 'White' AND T1.Name = 'Road-250 Black, 48' AND T4.FirstName = 'Elizabeth'","SELECT DISTINCT T2.`SalesPerson` FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Employees AS T3 ON T2.MiddleInitial = T3._MiddleInitial INNER JOIN Customers AS T4 ON T3.CustomerID = 4 WHERE T4.FirstName = 'White to purchase Road-250 Black, 48'",-1.1747156836394759,3,0,0,30 1574,What is the average _SalesTeamID in the Sales Orders table?,SELECT AVG(_SalesTeamID) FROM `Sales Orders`,SELECT AVG(_SalesTeamID) FROM `Sales Orders`,4.297958644536284,1,1,1,23 1575,"In west superstore, what is the name and the shipping mode of the product that was ordered with the shortest shipment time?","SELECT DISTINCT T2.`Product Name`, T1.`Ship Mode` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' ORDER BY T1.`Ship Date` - T1.`Order Date` LIMIT 1","SELECT DISTINCT T2.`Product Name`, T3.`Ship Mode` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID WHERE T1.Order BETWEEN 1 AND 2 AND 3",3.4026836594773378,1,0,0,30 1576,Please list any three line item numbers that have 10% off.,SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3,SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3,4.39251279768461,1,1,1,30 1577,List the distinct city values linked to generalinfo.,SELECT DISTINCT T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = 'generalinfo',-1.1762715476737373,1,0,0,29 1578,List the distinct Phone values linked to Products.,SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,7.235395858587943,1,1,1,27 1579,"For each ProductID, how many Products records are linked?","SELECT T2.ProductID, COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.Products [ ProductID ] = T2.`ProductID` GROUP BY T2.$ProductID",-7.3241872291605326,21,0,0,30 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 1581,"Among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation?","SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2015' AND T2.`Timely response?` = 'Yes' AND T2.`Company response to consumer` = 'Closed with explanation'",SELECT SUM(CASE WHEN T1.`Date received Database: retail_complains` LIKE '2015%' AND T2.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`),-7.803031018186007,2,0,0,30 1582,Which detailed product did Mr Lennox Oliver Drake complain about?,SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male',SELECT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE SUB-product = 'Lennox Oliver Drake',-2.567484465669718,3,0,0,29 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 1584,Identify the name of the most popular dairy product in terms of reorder quantity.,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T3.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.CategoryName = 'Dairy Products' ORDER BY ReorderLevel DESC LIMIT 1,-5.461461230668485,9,0,0,29 1585,"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_partsuppkey = T2._ps_partkey INNER JOIN supplier AS T3 ON T2=T3._supppkey ORDER BY T3.num DESC LIMIT 1 ) AS T T",-6.212340754039141,8,0,0,26 1586,What is the highest Discount in the Order Details table?,SELECT MAX(Discount) FROM `Order Details`,SELECT MAX(Discount) FROM `Order Details`,4.872540310247595,1,1,1,22 1587,How many records are in the generalinfo table?,SELECT COUNT(label) FROM generalinfo,SELECT COUNT(label) FROM generalinfo,2.046806108159898,1,1,1,19 1588,"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(*) FROM ( SELECT COUNT(OrderID) FROM `Order Details` WHERE ProductName = 'Ikura' AND UnitPrice < 0 ) AS num,-5.345837974462153,11,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 1590,"Find and list the full name of employees who are from the territory, Wilton.","SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Wilton'","SELECT DISTINCT T3.TerritoryDescription, T1.FirstName, T2.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Achievement ID` INNER JOIN Territorie AS T3 ON T2._territoryID = T3._TerritoryID WHERE FirstName = 'Wilton' AND LastName = ''",-7.4281756091207995,26,0,0,29 1591,"In the calls from the mountain division, how many are from teenage clients?",SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain',SELECT COUNT(CASE WHEN T2.division = 'mountain' THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN district AS T2 ON T1.`district_id Database: retail_complains` = T2 . district_id WHERE T1.age BETWEEN 65 AND 65,-8.179453611294308,2,0,0,17 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 1593,"For each Customer ID, what is the average Discount?","SELECT `Customer ID`, AVG(Discount) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Discount) FROM central_superstore GROUP BY `Customer id`",1.2285834818637964,6,1,1,28 1594,List the distinct weight values linked to production.,SELECT DISTINCT T2.weight FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.weight FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,3.745483736263038,3,1,1,28 1595,What is the average Discount for joined central_superstore and product records?,SELECT AVG(T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,1.0165601431967068,6,1,1,26 1596,"For each CompanyName, how many records are there in Sales Totals by Amount?","SELECT CompanyName, COUNT(Totals) FROM `Sales Totals by Amount` GROUP BY CompanyName","SELECT CompanyName, COUNT(Totals) FROM `Sales Totals by Amount` GROUP BY CompanyName",2.1283556155790317,1,1,1,25 1597,"What are the names of the sales teams that have served to customer Apotheca, Ltd?","SELECT DISTINCT T3.`Sales Team` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T1.`Customer Names` = 'Apotheca, Ltd'","SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Apotheca, Ltd' 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",0.7359115478792885,3,0,0,26 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 1599,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 Database: superstore` 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',-4.899069574277604,1,0,0,26 1600,Find and list the part key of the parts which has an above-average retail price.,SELECT p_partkey FROM part WHERE p_retailprice > ( SELECT AVG(p_retailprice) FROM part ),SELECT p_partkey FROM part WHERE ( SELECT AVG(p_retailprice) FROM part ),2.6003060713218384,1,0,0,27 1601,How much is the Peugeot 505s Turbo Diesel?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'peugeot 505s turbo diesel',"SELECT CAST(SUM(IIF(T1.car_name = 'peugeot 505s turbo diesel', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",5.743576240688024,1,0,0,18 1602,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,-1.1029329990364187,6,0,0,30 1603,"In 2022, 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 '2022%',SELECT COUNT(T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` LIKE '2022%',-0.827893057383417,2,0,0,30 1604,"Which region is ""Columbia"" in?",SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia',SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.'RegionID',-4.553357517398893,24,0,0,27 1605,"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.683176400879586,2,0,0,27 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 1607,Give the full name of the employee who has sold the most quantity.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID ORDER BY T2.Quantity DESC LIMIT 1","SELECT FirstName, MiddleInitial, LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY LastName ORDER BY Quantity DESC LIMIT 1",5.820838310495843,1,0,0,23 1608,How many district records have matching records in client?,SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T1.`division Database: retail_complains`) FROM district AS T1 INNER JOIN client AS T2 ON T1.`district_id` = T2.district_ID,-7.0306460975093135,20,0,0,26 1609,"In 2016, 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 '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2016%',-0.08365622895824228,11,1,1,21 1610,"Identify the top customer of the store located in Gilbert, Arizona based on net profit associated with the customer relationship in 2019.","SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Gilbert' AND T2.ProcuredDate LIKE '%/%/19' ORDER BY REPLACE(T2.`Unit Price`, ',', '') - REPLACE(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 WHERE T2.ProcuredDate LIKE '%/%/19' AND T2.`Sales Channel` = 'Net Profit',-0.7318956994009277,19,0,0,26 1611,"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.`customer ID` = T2.`CustomerID` GROUP BY T2 . Customer ID",-1.4773185811491831,8,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 1613,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,20 1614,How many west_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,3.274764308310278,5,1,1,22 1615,Indicate the procured dates for the customer whose ID is 11.,"SELECT DISTINCT T FROM ( SELECT IIF(_CustomerID = 11, ProcuredDate, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL","SELECT DISTINCT T FROM ( SELECT IIF(_CustomerID = 11, ProcuredDate, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL",2.335768737713008,1,1,1,28 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 1618,How many Customers records have matching records in Employees?,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.MiddleInitial,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.middleInitial,2.845642402172344,11,1,1,29 1619,How many records in Orders were recorded in 2019?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2019%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2019%',4.775940017408425,1,1,1,25 1620,Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803',"SELECT T3.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE STRFTIME('%Y', T2.`o_orderdate) = '1997-12-10'",0.4551407681593595,1,0,0,30 1621,How many east_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,2.0967273085311766,7,1,1,23 1622,What are the names of Robert King's territories?,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.LastName = 'King' AND T1.FirstName = 'Robert',SELECT DISTINCT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`TerritoryID Database: retail_world` WHERE T1.FirstName = 'Robert' AND T2.LastName = '',-5.886769985408741,20,0,0,28 1623,List the distinct EmployeeID values linked to Employees.,SELECT DISTINCT T2.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.employeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,3.2951029773973057,11,1,1,26 1624,"In 2017, 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 '2017%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1._ID = T2.ID WHERE T2.`model_year` LIKE '2017%',-2.1574036028367947,13,0,0,29 1625,How many cities are located in the Bay Area?,SELECT COUNT(city) FROM geographic WHERE region = 'bay area',SELECT COUNT(city) FROM geographic WHERE region = 'bay area',4.8700929185746205,1,1,1,23 1626,How many labels of the restaurant have an unknown country?,SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown',SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2 . county = 'unknown',3.5987211436914515,6,1,1,26 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 1628,List the distinct values of Product ID in the east_superstore table.,SELECT DISTINCT `Product ID` FROM east_superstore,SELECT DISTINCT `Product ID` FROM east_superstore,4.376147590469199,1,1,1,18 1629,Which sales team id has the highest number of orders in 2018?,SELECT _SalesTeamID FROM `Sales Orders` WHERE OrderDate LIKE '%/%/18' GROUP BY _SalesTeamID ORDER BY COUNT(_SalesTeamID) DESC LIMIT 1,SELECT _SalesTeamID FROM `Sales Orders` WHERE OrderDate LIKE '2018%' ORDER BY `Order Quantity` DESC LIMIT 1,2.931408990840451,1,0,0,28 1630,How many records in Employees were recorded in 2019?,SELECT COUNT(EmployeeID) FROM Employees WHERE HireDate LIKE '2019%',SELECT COUNT(EmployeeID) FROM Employees WHERE HireDate LIKE '2019%',4.775940017408425,1,1,1,29 1631,How many west_superstore records have matching records in south_superstore?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN south_superStore AS T2 ON T1.` Customer ID` = T2.`CustomerID`,-1.0014301616813697,18,0,0,26 1632,"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 INNER JOIN events AS T2 WHERE T1.`Date received` LIKE '2021%',-0.22017744452341104,1,0,0,29 1633,"For each Category, how many records are there in product?","SELECT Category, COUNT(`Product ID`) FROM product GROUP BY Category","SELECT Category, COUNT(`Product ID`) FROM product GROUP BY Category",2.389506030421148,1,1,1,20 1634,"What is the profit from selling the ""O'Sullivan Living Dimensions 2-Shelf Bookcases""?",SELECT DISTINCT T1.Profit FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'O''Sullivan Living Dimensions 2-Shelf Bookcases',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'O'Sullivan Living Dimensions 2-Shelf Bookcases'), 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`",-7.984103637499779,18,0,0,27 1635,List the distinct values of CompanyName in the Shippers table.,SELECT DISTINCT CompanyName FROM Shippers,SELECT DISTINCT CompanyName FROM Shippers,4.732550129264441,1,1,1,16 1636,What is the total l_discount in the lineitem table?,SELECT SUM(l_discount) FROM lineitem,SELECT SUM(l_discount) FROM lineitem,3.285106842666371,1,1,1,23 1637,"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) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id` WHERE T1.Ship LIKE '2023%',0.47254558123966217,8,1,1,28 1638,What are the names of the products that were discountinued?,SELECT ProductName FROM Products WHERE Discontinued = 1,SELECT ProductName FROM Products WHERE Discontinued = 1,4.109981628474669,1,1,1,22 1639,How many callcenterlogs records have matching records in events?,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Compose ID` = T2.`ComPlaint ID`,2.01507919395,7,0,0,29 1640,"For each CompanyName, how many Orders records are linked?","SELECT T2.CompanyName, COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CompanyName","SELECT T2.CompanyName, COUNT(T1.`EmployeeID Database: retail_world`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.`CustomerID` GROUP BY T2.%CompanyName",-7.842941120454676,22,0,0,30 1641,Which sales team name has the least orders in 2019?,SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) ASC LIMIT 1,SELECT `Sales Team` FROM `Sales Orders` WHERE OrderDate LIKE '2019%' ORDER BY `Order Quantity` DESC LIMIT 1,1.4999263036025998,1,0,0,28 1642,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(FirstName) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(FirstName) FROM Employees GROUP BY FirstName",3.820864006717214,3,1,1,22 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 1645,List the distinct values of TitleOfCourtesy in the Employees table.,SELECT DISTINCT TitleOfCourtesy FROM Employees,SELECT DISTINCT TitleOfCourtesy FROM Employees,4.142085766784503,1,1,1,15 1646,"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,27 1647,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,24 1648,Please name any three products that have been discontinued in the meat or poultry category.,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.Discontinued = 1 AND T1.CategoryName = 'Meat/Poultry' LIMIT 3,SELECT T3.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID WHERE T2.Discontinued = 1 AND T1.`CategoryName Database: retail_world` = 'Meat or Poultry',-4.4903694796226405,1,0,0,24 1649,List the distinct Customer ID values linked to central_superstore.,SELECT DISTINCT T2.`Customer ID` FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.Customer ID FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID`,-1.6799507234760511,20,0,0,28 1650,What is the total UnitPrice in the Products table?,SELECT SUM(UnitPrice) FROM Products,SELECT SUM(UnitPrice) FROM Products,5.643234032997981,1,1,1,21 1651,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 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,1.7905644975998625,5,1,1,22 1652,"Among the cars originated from Japan, what is the name of the car with the highest price?",SELECT T4.car_name 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' ORDER BY T1.price DESC LIMIT 1,SELECT t4.car_name 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 = T5.ID WHERE T3.country = 'Japan' ORDER BY T1.price DESC LIMIT 1,2.4563049523371228,2,0,0,29 1653,How many French customers shipped 2 orders which have been cancelled?,SELECT COUNT(T2.country) FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.status = 'Shipped' AND T2.country = 'France' GROUP BY T2.customerNumber HAVING COUNT(T1.status) = 2,SELECT COUNT(T1.orderNumber) FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.salesRepEmployeeNumber WHERE t2.customerName = 'France' AND t1.status = 'Shipped',3.174927218435716,1,0,0,29 1654,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%',5.709770768212599,1,1,1,25 1655,How many records are in the Shippers table?,SELECT COUNT(CompanyName) FROM Shippers,SELECT COUNT(CompanyName) FROM Shippers,4.281554795135653,1,1,1,18 1656,"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 DISTINCT T2.CompanyName, T3.City, T4.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE SUM(T1.UnitsInStock) > 120",-3.727807242772438,5,0,0,30 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 1658,"In 2021, 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 '2021%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2021%',3.4416734708638548,4,1,1,29 1659,"Among the products with an order quantity of no less than 5 that was shipped in the month of May 2019, what is the name of the product with the lowest net profit?","SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5 AND ShipDate LIKE '5/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') ASC LIMIT 1",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5 AND T1.ShipDate LIKE '%/%/19',0.9200894499297564,7,0,0,30 1660,Calculate the difference in the average age of elderly and middle-aged clients in the Northeast region.,SELECT (CAST(SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.age > 65 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END)) AS difference 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 = 'Northeast',"SELECT CAST(SUM(IIF(T2.Region = 'Northeast', 1, 0)) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode",-1.032558301137922,1,0,0,29 1661,"Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order?",SELECT T1.Quantity 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 people AS T5 ON T5.`Customer ID` = T4.`Customer ID` WHERE T5.City = 'Chicago' AND T5.State = 'Illinois' ORDER BY T1.Quantity DESC LIMIT 1,SELECT MAX(T1.`Quantity Database: superstore`) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Customer ID` = T2.`Customer Illinois` INNER JOIN people AS T3 ON T3.`City` =T2.City WHERE T3.State = 'Chicago' AND T1.Quantity BETWEEN 1 AND 1,-8.642782362801087,26,0,0,30 1662,How many records in Sales Orders were recorded in 2020?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2020%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2020%',2.5546621231758806,1,1,1,24 1663,"The part ""hot spring dodger dim light"" is ordered in how many orders?",SELECT COUNT(T1.p_partkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_name = 'hot spring dodger dim light',"SELECT COUNT(IIF(T1.p_name = 'hot spring dodger dim light', 1, 0)) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1._partkey = T2.l_partkey INNER JOIN ( SELECT l_orderkey FROM lineitem WHERE l_shipmode = 'NONE' AND l_discount = 0 )",0.8650654023190013,9,0,0,29 1664,How many east_superstore records have matching records in people?,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`Customer ID`,3.2373698108779645,6,1,1,26 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 1667,What is the average number of customers per sales person?,SELECT CAST(COUNT(T1.CustomerID) AS REAL) / COUNT(T3.EmployeeID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID,"SELECT CAST(SUM(IIF(T2.SalesPersonID = 1, 1, 0)) AS REAL) * 100 / COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.customerID",-2.1432796587084995,18,0,0,24 1668,From which branch does the sales representative employee who made the most sales in 2005? Please indicates its full address and phone number.,"SELECT T3.addressLine1, T3.addressLine2, T3.phone 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 employees AS T4 ON T3.salesRepEmployeeNumber = T4.employeeNumber INNER JOIN offices AS T5 ON T4.officeCode = T5.officeCode WHERE STRFTIME('%Y', T2.orderDate) = '2005' AND T4.jobTitle = 'Sales Rep' ORDER BY T1.quantityOrdered DESC LIMIT 1","SELECT t2.phone, t1.orderDate FROM orderdetails AS t1 INNER JOIN orders AS t2 INNER JOIN employees AS t3 ON t3.salesRepEmployeeNumber = T2.employeeNumber INNER JOIN customers AS t4 ON t4.customerNumber = t5.customerName INNER JOIN offices AS t5 ON t5._officeCode = t6.officeCode INNER JOIN productName = 'Sales Rep' ORDER BY T3.priceEach DESC LIMIT 1",-2.0651995663288627,3,0,0,30 1669,"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.5381654342258282,6,1,1,27 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 1671,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._partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = S_SUPPKEY INNER JOIN s_name = 'part' ORDER BY T1.`p_retailprice` DESC LIMIT 1,-2.306066190184703,3,0,0,30 1672,List the distinct values of TerritoryDescription in the Territories table.,SELECT DISTINCT TerritoryDescription FROM Territories,SELECT DISTINCT TerritoryDescription FROM Territories,4.315921288822575,1,1,1,20 1673,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 T2.`Sales Team` = 'SO - 0001004' THEN T1.`Store ID` END AS T FROM `Store Locations` T1 INNER JOIN `Sales Orders` T2 ON T2._StoreID = T1.StoreID ) WHERE T IS NOT NULL,-4.014379174071272,3,0,0,27 1674,"How many ""Mountain-500 Black 42"" were sold in total?","SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Mountain-500 Black, 42'","SELECT SUM(IIF(T1.Name = 'Mountain-500 Black 42', 1, 0)) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.Quantity = ( SELECT COUNT(T2.SalesID) AS REAL) * 100",-2.567723189797417,25,0,0,30 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 1676,"Among the sales order shipped in July 2018, calculate the percentage of orders for home fragrances.",SELECT SUM(CASE WHEN T2.`Product Name` = 'Home Fragrances' THEN 1 ELSE 0 END) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ShipDate LIKE '7/%/18',SELECT CAST(SUM(CASE WHEN T2.`Product Name` = 'Home Fragmentrances' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ShipDate LIKE '%/%/18',-3.1307030812720837,3,0,0,30 1677,"Please state the segment, the name, the address, and the phone number of customer number 3.","SELECT c_mktsegment, c_name, c_address, c_phone FROM customer WHERE c_custkey = 3","SELECT c_mktsegment , c_address, c_phone FROM customer WHERE c_custkey = 3",0.6506063118499886,1,0,0,28 1678,How many cars in the database are originated from Europe?,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Europe',SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.`country` = 'Europe',-3.0242149446949695,6,0,0,16 1679,Provide the category name of the Chef Anton's Gumbo Mix product that New Orleans Cajun Delights company has.,SELECT T3.CategoryName 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 T1.CompanyName = 'New Orleans Cajun Delights' AND T2.ProductName LIKE 'Chef Anton%s Gumbo Mix',"SELECT T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.`SupplierID Database: retail_world`, T2.`ProductName` = 'New Orleans Cajun Delights' WHERE T1.CompanyName = 'Chef Anton' AND T2.SupplierID = 1",-6.645789960604828,20,0,0,29 1680,What was the review context from Jacksonville on 2017/7/22?,SELECT T1.Reviews FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Jacksonville' AND T1.Date = '2017-07-22',SELECT IIF(T2.city = 'Jacksonville' AND T1.Date = '2017-07-22' ),-2.2110322555927375,1,0,0,30 1681,List the full names of customers who have purchased products in quantity over 600.,"SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600",SELECT DISTINCT T3.ProductID FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.Quantity > 600,-0.588811593087117,5,0,0,27 1682,Give the phone number of the customer with the highest account balance.,SELECT c_phone FROM customer ORDER BY c_acctbal DESC LIMIT 1,SELECT c_phone FROM customer ORDER BY c_acctbal DESC LIMIT 1,4.121762181981593,1,1,1,25 1683,How many south_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order Date`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID`,0.7553418808660253,6,0,1,26 1684,"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 T3.Product",1.6304218193903868,6,0,0,30 1685,"In 2020, 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 '2020%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.ShipCountry LIKE '2020%',-1.6776922418428342,6,0,0,30 1686,"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 = STRFTIME(T2.`Date sent to company`) GROUP BY T2 . Client_ID",-7.565322349285287,2,0,0,25 1687,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.272196132875074,2,0,0,30 1688,"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,30 1689,Which l_linestatus has the highest l_discount?,SELECT l_linestatus FROM lineitem ORDER BY l_discount DESC LIMIT 1,SELECT l_linestatus FROM lineitem ORDER BY l_discount DESC LIMIT 1,2.7843473276576187,1,1,1,23 1690,List the distinct CustomerID values linked to Sales Orders.,SELECT DISTINCT T2.CustomerID FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT DISTINCT T2.`CustomerID` FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,1.281162407351752,1,0,0,30 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 1692,What is the name of the 24 hour diner at San Francisco?,SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco',SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco',2.8487650061513,1,1,1,24 1693,List out the product name of order which has unit cost of 781.22.,"SELECT T FROM ( SELECT DISTINCT IIF(T1.`Unit Cost` = 781.22, T2.`Product Name`, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` = 781.22 THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL,1.5710356224931565,1,0,0,27 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 1695,How many data records have matching records in price?,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN price AS T2 ON T1 . ID = T2.ID,3.6245935204533737,9,1,1,26 1696,What percentage of customers from the African region is in the household segment?,"SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD'",SELECT CAST(COUNT(CASE WHEN T2.r_mktsegment = 'HOUSEHOLD' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.c_custkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2._regionkey,-4.890269163171264,2,0,0,24 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 1698,"For each car_name, how many price records are linked?","SELECT T2.car_name, COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID GROUP BY T2.car_name","SELECT T2.car_name, COUNT(T1.`price Database: cars`) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = STRFTIME('%Y', T2.`mpg`) GROUP BY T2 . car_name_list",-6.667052859823096,24,0,0,28 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 1700,"For each TerritoryID, how many Employees records are linked?","SELECT T2.TerritoryID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.TerritoryID","SELECT T2.TerritoryID, COUNT(T1.`Title Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`EnergyID` GROUP BY T2 . Territory ID",-7.187414032189782,21,0,0,23 1701,How many east_superstore records have matching records in product?,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,2.448279108071293,7,1,1,27 1702,List the product's name bought by the customer named Bill Shonely from 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` = 'Bill Shonely' AND T2.Region = 'Central',"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Bill Shonely' AND T2.Region = 'Central'",1.67314005492789,1,0,0,29 1703,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.231238740978715,5,0,0,19 1704,How many records in lineitem were recorded in 2021?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2021%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2021%',4.412960505279923,1,1,1,20 1705,What is the average price before discount of the top 10 orders with the highest total price?,SELECT SUM(T2.l_extendedprice) / 10 FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 10,"SELECT CAST(SUM(IIF(T1.o_totalprice = 10, 1, 0)) AS REAL) / 10 FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.l_orderkey ORDER BY T2.`l_extendedprice` DESC LIMIT 10",-1.4575935082475096,2,0,0,27 1706,Calculate the percentage of shipping done through Speedy Express.,SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID,SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'Speedy Express' 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,-2.294618626446719,26,0,0,30 1707,List the distinct values of city in the offices table.,SELECT DISTINCT city FROM offices,SELECT DISTINCT city FROM offices,3.537048448089766,1,1,1,16 1708,How much did customer 103 pay in total?,SELECT SUM(t.amount) FROM payments t WHERE t.customerNumber = '103',SELECT SUM(t.amount) FROM payments t WHERE t.customerNumber = '103',4.258627618569569,2,1,1,25 1709,What is the difference in the number of employees from the UK and the USA who work as sales representatives?,SELECT ( SELECT COUNT(Title) FROM Employees WHERE Country = 'UK' AND Title = 'Sales Representative' ) - ( SELECT COUNT(Title) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative' ) AS DIFFERENCE,SELECT COUNT(Title) - DIFFERENCE FROM Employees WHERE Country = 'UK' AND Title = 'Sales Representative',4.0342716296562395,1,0,0,29 1710,State the name of employee that manages the order from Victuailles en stock?,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.CompanyName = 'Victuailles en stock'",SELECT CASE WHEN T2.CompanyName = 'Victuailles en stock' THEN T1.FirstName ELSE NULL END AS T FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.'EmployeeID Database: retail_world',-4.225134014183099,1,0,0,30 1711,"List the 5 orders with the highest total price, indicating the delivery date.","SELECT T1.o_orderkey, T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 5","SELECT T1.o_orderkey, T2.l_receiptdate DESC LIMIT 5",-1.5976911709667114,1,0,0,29 1712,"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(T2.p_supplycost) FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2._partkey WHERE T2. p_name = 'hot spring dodger dim light',-3.9792916707053316,3,0,0,24 1713,"List the product ID of the top five products, by descending order, the number of quantities in stock.",SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5,SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5,2.933061650491635,1,1,1,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 1715,Which region has the highest number of restaurants?,SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1,SELECT T4.id_restaurant FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city ORDER BY COUNT(T1.region) DESC LIMIT 1,-4.078464895633154,7,0,0,27 1716,List the distinct CustomerID values linked to Products.,SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 . ProductID,3.858427072429393,3,1,1,22 1717,How many records in production were recorded in 2021?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2021%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2021%',4.69216415425934,1,1,1,24 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 1719,How many records in orders were recorded in 2019?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2019%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2019%',4.860603963746542,1,1,1,22 1720,List the distinct values of country in the production table.,SELECT DISTINCT country FROM production,SELECT DISTINCT country FROM production,3.64534150430876,1,1,1,18 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 1722,"For each p_type, what is the average p_retailprice?","SELECT p_type, AVG(p_retailprice) FROM part GROUP BY p_type","SELECT p_type, AVG(p_retailprice) FROM part GROUP BY p_Type",4.665074346846358,25,1,1,30 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 1724,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 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.6089614345979868,20,1,1,22 1725,How much is the total amount of sales handled by Heather McBadden?,SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Heather' AND T1.LastName = 'McBadden',SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 WHERE T3.Name = 'Heather McBadden',4.416472304122998,1,0,0,27 1726,Mention the most populated city and median income of the store in Florida state.,"SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1","SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1",4.1507289931112235,1,1,1,28 1727,What is the ratio number of territories in Northern region and number territories in Western region?,SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' ) AS REAL) * 100 / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Westerns' ) AS Calu,SELECT CAST(SUM(CASE WHEN T2.RegionDescription = 'Northern' 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',2.725976966568051,2,0,0,30 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 1729,"For each car_name, how many production records are linked?","SELECT T2.car_name, COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID GROUP BY T2.car_name","SELECT T2.car_name, COUNT(T1.`price Database: cars`) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2._ID GROUP BY T2.`car_id`",-6.984924274865001,7,0,0,22 1730,How many Products records have matching records in Categories?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2._CategoryID,0.7812631476605252,12,0,0,25 1731,Indicate the address of the restaurant with the most popular reviews.,"SELECT T2.street_num, T2.street_name 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_num, T2.`street_name` FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = TO_ID_RESTaurant ORDER BY T1._review DESC LIMIT 1",-6.506667105994132,26,0,0,28 1732,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'",5.700922928356373,1,0,0,30 1733,"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.`Order Quantity` > ( SELECT MAX(Order Quantity) FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2._StoreID = T1.StoreID ) AND T IS NOT NULL,0.5506327832040286,3,0,0,30 1734,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,20 1735,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 T1ProductID = T2.ProductID,-6.006579090759503,14,0,0,27 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 1737,List the distinct values of country in the country table.,SELECT DISTINCT country FROM country,SELECT DISTINCT country FROM country,3.0429959203251267,1,1,1,17 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 1739,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(TitleOfCourtesy) FROM Employees GROUP BY Country","SELECT Country, COUNT(TitleOfCourtesy) FROM Employees GROUP BY Country",4.957144497985576,1,1,1,20 1740,"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,20 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 1742,List down the product id for products with the highest quantity.,SELECT DISTINCT ProductID FROM Sales WHERE Quantity = ( SELECT MAX(Quantity) FROM Sales ),SELECT ProductID FROM Sales ORDER BY Quantity DESC LIMIT 1,4.988260417689312,1,0,0,24 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 1744,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 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' ORDER BY T1.Order DESC LIMIT 1,-2.407622079174838,2,0,0,30 1745,Which different vendor has the most amount of orders? Calculate the total estimated earnings.,"SELECT DISTINCT T1.productVendor, T1.MSRP - T1.buyPrice FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T1.productVendor, T1.MSRP, T1.buyPrice ORDER BY COUNT(T2.quantityOrdered) DESC LIMIT 1","SELECT productVendor, MSRP - buyPrice FROM products WHERE productCode IN ( SELECT productCode FROM orderdetails WHERE orderNumber = 0 GROUP BY productVendor ) ORDER BY SUM(quantityOrdered) DESC LIMIT 1",2.706044770428535,2,0,0,30 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 1748,What is the average price for joined production and price records?,SELECT AVG(T2.price) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT AVG(T2.price) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,6.571209840254912,1,1,1,24 1749,What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.,SELECT MAX(T1.`Discount Applied`) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Colorado' AND T2.`Land Area` = 111039036,SELECT MAX(CASE WHEN T2.State = 'Colorado' AND T1.`Land Area` = 111039036 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.0442447943049964,1,0,0,30 1750,Identify by their ID all clients who did not give their consent permission.,SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'N/A' OR 'Consumer consent provided?' IS NULL OR 'Consumer consent provided?' = '',SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'Yes' AND provided = 'No',0.6266944657317424,1,0,0,27 1751,Calculate the total quantity of products purchased by customer called Adrian.,SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Adam',SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.SalesPersonID = 'Adam',-1.1527557579524528,1,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 1753,List the supplier company names located in Germany.,SELECT CompanyName FROM Suppliers WHERE Country = 'Germany',SELECT CompanyName FROM Suppliers WHERE Country = 'Germany',4.352833908405115,1,1,1,26 1754,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(CASE WHEN T2.CompanyName = 'Tokyo Traders' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.`SupplierID`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,-7.687417613540874,27,0,0,28 1755,What is the percentage of complaints about the late fee issue whose priority is 2 in 2017?,"SELECT CAST(SUM(CASE WHEN T1.priority = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2017'",SELECT CAST(SUM(CASE WHEN T1.priority = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID`,-1.4114931157194661,1,0,0,30 1756,"Among all the orders made by a customer in the household segment, what is the highest total price?",SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD',SELECT MAX(T2.s_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_ custkey WHERE T2.`c_mktsegment` = 'HOUSEHOLD',-2.370362865560458,2,0,0,30 1757,How many records in central_superstore were recorded in 2015?,SELECT COUNT(`Product ID`) FROM central_superstore WHERE Ship LIKE '2015%',SELECT COUNT(`Product ID`) FROM central_superstore WHERE Ship LIKE '2015%',1.2186519528324635,1,1,1,22 1758,List the distinct values of Sales Channel in the Sales Orders table.,SELECT DISTINCT `Sales Channel` FROM `Sales Orders`,SELECT DISTINCT `Sales Channel` FROM `Sales Orders`,2.7848209580947096,1,1,1,24 1759,"For each Product ID, how many east_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer ID`) 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.`Customer ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.8078898316533725,6,0,0,28 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 1761,"For each city, how many records are there in location?","SELECT city, COUNT(street_num) FROM location GROUP BY city","SELECT city, COUNT(street_num) FROM location GROUP BY city",5.573540162828874,1,1,1,20 1762,"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 `Sales channel`",2.135812741038043,7,1,1,29 1763,What is the largest supplier's account balance?,SELECT MAX(s_acctbal) FROM supplier,SELECT MAX(s_acctbal) FROM supplier,5.447284229782327,1,1,1,22 1764,Provide the engine displacement status of the $37443.85589 car.,SELECT T1.displacement FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '37443.85589',"SELECT CAST(SUM(IIF(T1.displacement = '37443.85589', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",3.4581662393109864,2,0,0,30 1765,State the company name of all suppliers in USA.,SELECT CompanyName FROM Suppliers WHERE Country = 'USA',SELECT CompanyName FROM Suppliers WHERE Country = 'USA',3.7001976283531595,1,1,1,23 1766,"Of all the classic cars, with a product scale of 1:18, which product is the most ordered product by customers?",SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productScale = '1:18' AND T1.productLine = 'Classic Cars' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1,SELECT productName FROM products WHERE productLine = 'Classic Cars' AND productScale = '1:18' GROUP BY productName ORDER BY quantityOrdered DESC LIMIT 1,4.2039782062075846,1,0,0,29 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 1768,"Among the parts supplied by Supplier#000000018, provide parts names which had supply costs above 900.",SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey INNER JOIN supplier AS T3 ON T1.ps_suppkey = T3.s_suppkey WHERE T1.ps_supplycost > 900 AND T3.s_name = 'Supplier#000000018',SELECT T3.s_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2._partkey INNER JOIN supplier AS T3 ON T2.p_suppkey = AVG(ps_supplycost) WHERE TK->p_name = 'Supplier#000000018' AND T2.`p_size` > 900,-3.5422989051637375,13,0,0,30 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 1771,Calculate the average net profit for bakeware product.,"SELECT AVG(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'","SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'",1.0487655471973734,1,0,0,29 1772,"Among the USA employess, how many of them has PhD title of courtesy?",SELECT COUNT(Country) FROM Employees WHERE TitleOfCourtesy = 'Dr.' AND Country = 'USA',SELECT COUNT(Country) FROM Employees WHERE TitleOfCourtesy = 'USA' AND Country = 'USA',2.0117951292753946,1,0,0,22 1773,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(Client_ID) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(Client_ID) FROM events GROUP BY client_id",5.657580059238104,1,1,1,18 1774,"What is the average, highest and lowest annual payments collected between 1/1/2003 to 12/31/2005?","SELECT CAST(SUM(T1.amount) AS REAL) / 3, MAX(T1.amount) , MIN(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate BETWEEN '2003-01-01' AND '2005-12-31'",SELECT CAST(SUM(CASE WHEN T1.paymentDate BETWEEN '2003-01-01' THEN 1 ELSE 0 END) AS REAL) / 12/31/2005,-3.771845079293188,2,0,0,28 1775,"For each ProductID, how many records are there in Order Details?","SELECT ProductID, COUNT(ProductID) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, COUNT(ProductID) FROM `Order Details` GROUP BY ProductID",2.205674658790451,1,1,1,20 1776,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM west_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM west_superstore ORDER BY Discount DESC LIMIT 1,3.1400756888400467,1,1,1,25 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 1778,How many records in central_superstore were recorded in 2022?,SELECT COUNT(`Order ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2022%',SELECT COUNT(`Order ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2022%',4.69714110864527,1,1,1,24 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 1781,"Among all customers handled by Innes E. del Castillo, how many have purchased Short-Sleeve Classic Jersey, L?","SELECT 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 = 'Innes' AND T3.LastName = 'del Castillo' AND T1.Name = 'Short-Sleeve Classic Jersey, L' AND T3.MiddleInitial = 'e'","SELECT COUNT(T1.CustomerID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID WHERE T1.`Name` = 'Short-Sleeve Classic Jersey, L?'",-1.9258055971177581,2,0,0,29 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 1783,Please list the full names of all the male clients born after the year 1990.,"SELECT first, middle, last FROM client WHERE year > 1990","SELECT first, middle, last FROM client WHERE year > 1990",1.8133196049975595,1,1,1,28 1784,What is the highest County in the Store Locations table?,SELECT MAX(County) FROM `Store Locations`,SELECT MAX(County) FROM `Store Locations`,4.872540310247595,1,1,1,21 1785,How many free gifts have customer with id 11782 received?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID = 11782 AND T1.Price = 0,SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.CustomerID = 11782 AND T3.SalesID = 0,-3.619623465397044,9,0,0,30 1786,What are the order ids of the orders with freight of over 800?,SELECT OrderID FROM Orders WHERE Freight > 800,SELECT OrderID FROM Orders WHERE Freight > 800,3.885849684795838,1,1,1,27 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 1790,What is the contact title for the person who supplied a product that is 10 boxes x 12 pieces.,SELECT T2.ContactTitle FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.QuantityPerUnit = '10 boxes x 12 pieces',SELECT T3.ContactTitle FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.QuantityPerUnit = '10 boxes x 12 pieces',-1.5750943459251971,1,0,0,30 1791,List the distinct values of Customer ID in the people table.,SELECT DISTINCT `Customer ID` FROM people,SELECT DISTINCT `Customer ID` FROM people,4.781764725374198,1,1,1,22 1792,Calculate the average amount of payments made by customers during the first half of 2004.,SELECT AVG(amount) FROM payments WHERE paymentDate BETWEEN '2004-01-01' AND '2004-06-30',SELECT AVG(amount) FROM payments WHERE paymentDate LIKE '2004%',1.2459250693136343,1,0,0,29 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 1794,Calculate percentage of household segment in Indonesia.,"SELECT CAST(SUM(IIF(T1.c_mktsegment = 'HOUSEHOLD', 1, 0)) AS REAL) * 100 / COUNT(T1.c_mktsegment) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'INDONESIA'","SELECT CAST(SUM(IIF(T2.n_name = 'HOUSEHOLD', 1, 0)) AS REAL) * 100 / COUNT(T1.c_mktsegment) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2.N_NATIONkey",-0.9968760953795275,11,0,0,19 1795,Please list all the years in which the car model Chevrolet Impala was introduced in the market.,SELECT DISTINCT T1.model_year FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.car_name = 'chevrolet impala',SELECT CAST(COUNT(CASE WHEN T1.model_year = 'chevrolet impala' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.`ID` = T2.ID,-5.197420241669101,19,0,0,21 1796,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,-2.4095663508641016,3,0,0,29 1797,How many companies do ship Northwind's orders?,SELECT COUNT(ShipperID) FROM Shippers,SELECT COUNT(ShipperID) FROM Shippers,4.233836292305277,1,1,1,27 1798,"List the review and label of the restaurants in Mission Blvd., Hayward.","SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd'","SELECT T1.review, T1.`street_name Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T2.id_restaurant = 1 INNER JOIN city AS T3 ON T3.city = T4.city WHERE T3.`city` = 'mission blvd' AND T5.label = 'hayward'",-6.434790806969713,3,0,0,19 1799,What percentage of clients who sent their complaints by postal mail are age 50 and older?,SELECT CAST(SUM(CASE WHEN T1.age > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail',SELECT CAST(SUM(CASE WHEN T2.`Submitted via` = 'Postal mail' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,-4.5569502568449645,13,0,0,26 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 1801,"From which country is the company ""Drachenblut Delikatessen"" from?",SELECT Country FROM Customers WHERE CompanyName = 'Drachenblut Delikatessen',SELECT Country FROM Customers WHERE CompanyName = 'Drachenblut Delikatessen',3.1893266824188897,1,1,1,25 1802,"For each CompanyName, how many records are there in Suppliers?","SELECT CompanyName, COUNT(SupplierID) FROM Suppliers GROUP BY CompanyName","SELECT CompanyName, COUNT(SupplierID) FROM Suppliers GROUP BY CompanyName",4.720593201875388,1,1,1,18 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 1804,What are the complaint id of client who were born in 1931?,SELECT T2.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.year = 1931,SELECT T3.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.year = 1931,0.5452118896553069,7,0,0,28 1805,How many records are in the region table?,SELECT COUNT(r_comment) FROM region,SELECT COUNT(r_comment) FROM region,4.795353829950178,1,1,1,22 1806,"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 LIKE '2019%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T1.`Ship Date` LIKE '2019%',-0.34235076061228686,1,0,0,30 1807,How many records are in the Suppliers table?,SELECT COUNT(SupplierID) FROM Suppliers,SELECT COUNT(SupplierID) FROM Suppliers,4.281554795135653,1,1,1,20 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 1809,For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?,SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.ser_time = '2017-03-27',-1.2318858903659697,4,0,0,28 1810,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,29 1811,Indicate the address of the company Eastern Connection whose contact name is Ann Devon.,SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon',SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName == 'Ann Devon',3.7999671432365245,10,1,1,27 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 1813,List the distinct employeeNumber values linked to offices.,SELECT DISTINCT T2.employeeNumber FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode,SELECT DISTINCT T2.employeeNumber FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2 . officeCode,3.8652916411987492,4,1,1,21 1814,In which counties can you find the restaurant with the highest number of branches?,SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1,SELECT SUM(T2.county) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY COUNT(T1.label) DESC LIMIT 1,1.6613207912527763,11,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 1816,List the names and prices of the cars with model 82 and mileage per gallon of greater than 30.,"SELECT T2.car_name, T1.price FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.model = 82 AND T2.mpg > 30","SELECT T3.car_name, T4.mpg FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.`model 82` < 30",-5.030297711959925,20,0,0,29 1817,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 1818,List all of the restaurants on Park St.,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st',SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = 2 WHERE T1.`street_name Database: restaurant` = 'St',-7.726077526024949,18,0,0,20 1819,"Among the ""Mountain-500 Black"" product types, which type was purchased the most?","SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Mountain-500 Black%' GROUP BY T2.Quantity, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Name = 'Mountain-500 Black' THEN T2.Quantity DESC LIMIT 1 ) WHERE T IS NOT NULL,-0.16906887822134775,1,0,0,29 1820,List all the product names and categories of the highest reorder level.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID ORDER BY T2.ReorderLevel DESC LIMIT 1","SELECT ProductName, CategoryName FROM Products ORDER BY ReorderLevel DESC LIMIT 1",-1.1658996664445878,3,0,0,30 1821,"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 WHERE T2.Quantity = 42",-1.5470264105053197,1,0,0,30 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 1823,How many records are in the Employees table?,SELECT COUNT(HomePhone) FROM Employees,SELECT COUNT(HomePhone) FROM Employees,4.508889799613256,1,1,1,19 1824,List the distinct issue values linked to callcenterlogs.,SELECT DISTINCT T2.issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Complaint ID`,2.580690571736428,1,0,0,29 1825,"For each productLine, how many records are there in productlines?","SELECT productLine, COUNT(textDescription) FROM productlines GROUP BY productLine","SELECT productLine, COUNT(textDescription) FROM productlines GROUP BY productLine",4.374654598322957,1,1,1,18 1826,How many records in central_superstore were recorded in 2021?,SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2021%',SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2021%',4.8266863463398515,1,1,1,23 1827,How many 2001 Ferrari Enzo were ordered?,SELECT SUM(t1.orderNumber) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t2.productName = '2001 Ferrari Enzo',SELECT SUM(t.quantityOrdered) FROM orderdetails t WHERE t.productCode = '2001 Ferrari Enzo',3.39067915176632,1,0,0,30 1828,What is the most ordered products by customers?,SELECT T1.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY COUNT(*) DESC LIMIT 1,SELECT T2.`ProductID Database: retail_world` FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2. ProductID ORDER BY COUNT(T2.`Customer ID`) DESC LIMIT 1,-7.010529479266417,22,0,0,27 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 1830,"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 Locations` = T2._StoreID WHERE T1.TimeZone LIKE '2019%',-0.22073208908131747,4,0,0,29 1831,"Of the orders with a lower delivery priority, how many have an urgent priority order?",SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' GROUP BY o_orderdate ORDER BY o_orderdate DESC LIMIT 1,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' LIMIT 1,2.5129945755066996,1,0,0,30 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 1833,"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 1834,"For each customerNumber, what is the average amount?","SELECT customerNumber, AVG(amount) FROM payments GROUP BY customerNumber","SELECT customerNumber, AVG(amount) FROM payments GROUP BY customerNumber",3.7133769914034245,1,1,1,13 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 1836,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,23 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 1838,Calculate the difference between the total sales in the East superstore and the total sales in the West superstore.,SELECT SUM(T1.Sales) - SUM(T2.Sales) AS difference FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT CAST(SUM(CASE WHEN T2.`Sales Database: superstore` = 'East' THEN 1 ELSE 0 END) AS REAL) * 100 - SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN west_superStore AS T2 ON T1.`Customer ID`,-7.1987708054361885,21,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 1841,"In 2016, how many joined records exist between east_superstore and people?",SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Ship LIKE '2016%',SELECT COUNT(T1.Customer ID) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`CustomerID` = T2.`Customer ID` WHERE T1.Ship LIKE '2016%',-0.35552405981049273,7,0,0,28 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 1843,Please list all the customers that have Steve Patterson as their sales representitive.,SELECT t1.customerName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Steve' AND t2.lastName = 'Patterson',SELECT customerName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'Steve Patterson',3.242689151962863,1,0,0,30 1844,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 1845,What is the name of the product with the highest net profit?,"SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1","SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1",0.7045166163280848,1,0,0,29 1846,"Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'","SELECT DISTINCT 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 WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied` 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 WHERE T3.`Product Name` = 'Cocktail Glasses' AND T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Discount Applied` DESC LIMIT 1 )",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Cocktail Glasses' 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,-2.900570306307882,2,0,0,26 1847,How many owners are located in Mexico?,SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico' AND ContactTitle = 'Owner',SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico',4.861432842260551,1,0,0,24 1848,How many records in orders were recorded in 2022?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2022%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2022%',4.775940017408425,1,1,1,22 1849,What is the unit cost of order SO - 000103?,"SELECT DISTINCT T FROM ( SELECT IIF(OrderNumber = 'SO - 000103', `Unit Cost`, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL","SELECT DISTINCT T FROM ( SELECT IIF(OrderNumber = 'SO - 000103', `Unit Cost`, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL",1.0101556757608623,4,1,1,30 1850,What is the average Sales for joined south_superstore and people records?,SELECT AVG(T1.Sales) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Sales) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.858689651580863,7,1,1,26 1851,How many records are in the Customers table?,SELECT COUNT(Fax) FROM Customers,SELECT COUNT(Fax) FROM Customers,1.842977802856676,1,1,1,20 1852,How many records in callcenterlogs were recorded in 2015?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2015%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2015%',5.195196781000291,1,1,1,24 1853,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 n1 INNER JOIN region AS n2 ON n1.n_regionkey = n2._regionkey WHERE n2.r_name = 'africa'",-0.7400128098129081,1,0,0,15 1854,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(outcome) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(outcome) FROM callcenterlogs GROUP BY `rand client`",1.9710576947811465,4,1,1,27 1855,How many suppliers are from UK?,SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK',SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK',3.1970396822459666,1,1,1,23 1856,How many of the cities are in a Bay Area?,SELECT COUNT(city) FROM geographic WHERE region = 'bay area',SELECT COUNT(city) FROM geographic WHERE region = 'bay area',4.8700929185746205,1,1,1,24 1857,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 SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2. ProductID,-1.5109040492709693,27,0,0,29 1858,How many records are in the orderdetails table?,SELECT COUNT(orderNumber) FROM orderdetails,SELECT COUNT(orderNumber) FROM orderdetails,4.829372047253272,1,1,1,25 1859,Please list the full names of all the male clients in the Pacific division.,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific' AND T1.sex = 'Male'","SELECT first, middle, last, division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.division = 'Pacific'",3.7639506337210715,1,0,0,22 1860,Which region has the most territories?,SELECT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T2.RegionID ORDER BY COUNT(T1.TerritoryID) DESC LIMIT 1,SELECT RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2. RegionID GROUP BY RegionID ORDER BY COUNT(T1.TerritoryID) DESC,2.2244071321246413,8,0,0,29 1861,Mention the supplier country of Ipoh Coffee and the order ID which had maximum in total payment.,"SELECT T3.Country, T1.OrderID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Suppliers AS T3 ON T2.SupplierID = T3.SupplierID WHERE T2.ProductName = 'Ipoh Coffee' ORDER BY T1.UnitPrice * T1.Quantity * (1 - T1.Discount) DESC LIMIT 1","SELECT T4.Country, T1.OrderID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1ProductID = T2.ProductID INNER JOIN Suppliers AS T3 ON T2.`SupplierID Database: retail_world` = T3 WHERE T3.Country = 'Ipoh Coffee' AND SUM(T2.Quantity) > MAX(T1.UnitPrice) > 0",-6.5872297900131755,23,0,0,30 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 1863,In which year did Around the Horn place the most orders?,"SELECT STRFTIME('%Y', T2.OrderDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Around the Horn' GROUP BY STRFTIME('%Y', T2.OrderDate) ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",SELECT CASE WHEN T1.CompanyName = 'Around the Horn' THEN T2.OrderDate DESC LIMIT 1,-2.791205686674114,2,0,0,30 1864,Provide the name of the contact person who made the orders that shipped to Switzerland.,SELECT T1.ContactName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.ShipCountry = 'Switzerland' GROUP BY T1.ContactName,"SELECT CAST(SUM(IIF(T2.ShipCountry = 'Switzerland', 1, 0)) AS REAL) * 100 / COUNT(T1.ContactName) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2 . CustomerID",-0.4853735523079036,20,0,0,29 1865,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`,-2.192412176532301,1,0,0,23 1866,"Among sales teams in Midwest region, which sales team has an order quantity greater than 5?",SELECT DISTINCT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'Midwest' AND T1.`Order Quantity` > 5,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.Region = 'Midwest' AND T2.`Sales Team` = 'Sales Team' THEN 1 ELSE 0 END) WHERE T IS NOT NULL,-1.209915874541009,1,0,0,21 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 1868,What is the supply cost of large plated tin?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_type = 'large plated tin',"SELECT CAST(SUM(IIF(T1.p_name = 'large plated tin', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",-1.0986370472937348,1,0,0,20 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 1870,What was the detailed issue did Mr Gunner Omer Fuller complain about?,SELECT T2.`Sub-issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Gunner' AND T1.middle = 'Omer' AND T1.last = 'Fuller' AND T1.sex = 'Male',SELECT T2.`Sub-issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE SUB-issue = 'Mr Gunner Omer Fuller',-0.13648169954189357,1,0,0,29 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 1874,What is the name of the customer who purchased the product with the highest net profiit?,"SELECT `Customer Names` FROM ( SELECT T1.`Customer Names`, T2.`Unit Price` - T2.`Unit Cost` AS ""net profit"" FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY `net profit` DESC LIMIT 1",SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Net' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,0.8333227027698005,5,0,0,29 1875,List the distinct values of Region in the east_superstore table.,SELECT DISTINCT Region FROM east_superstore,SELECT DISTINCT Region FROM east_superstore,4.5739967119286575,1,1,1,17 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 1877,List the distinct values of RegionID in the Territories table.,SELECT DISTINCT RegionID FROM Territories,SELECT DISTINCT RegionID FROM Territories,4.732550129264441,1,1,1,16 1878,Name of customers who have ordered Cocktail Glasses by online sales channel.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T3.`Product Name` = 'Cocktail Glasses' AND T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` END 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 IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,-0.4273498205699829,9,0,0,28 1879,How many location records have matching records in generalinfo?,SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.name = T2.label,-3.188737939555564,3,0,0,28 1880,"Which category does ""tofu"" belong to?",SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu',SELECT CategoryName FROM Categories WHERE CategoryName = 'tofu',2.1669870167006637,1,0,0,18 1881,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,30 1882,Which product did Phillina Ober buy?,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` = 'Phillina Ober',"SELECT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Phillina Ober'",-2.711858730910604,1,0,0,30 1883,What is the highest amount of order made by the sales representative in Boston? Please give the name of the product and amount.,"SELECT T2.productName, T1.quantityOrdered * T1.priceEach FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T1.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T4.city = 'Boston' AND T4.salesRepEmployeeNumber IN ( SELECT employeeNumber FROM employees WHERE jobTitle = 'Sales Rep' ) ORDER BY T1.quantityOrdered DESC LIMIT 1","SELECT t.productName, t.quantityOrdered * t.priceEach FROM orderdetails AS t INNER JOIN products AS t1 INNER JOIN orders AS t2 ON t1.productCode = t2._productCode INNER JOIN customers AS t3 ON t2.salesRepEmployeeNumber = t3.employeeNumber INNER JOIN employees AS t4 ON t4.editsTo = t5.edeesTo WHERE t6.country = 'Boston'",-4.527219807475095,28,0,0,30 1884,Calculate the percentage of suppliers in 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 WHERE T1.s_acctbal < 0",SELECT CAST(SUM(CASE WHEN T2.n_name = 'GERMANY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1 . s_nationkey = T2 . n_name,2.201781544450664,7,0,0,23 1885,"For each Product ID, how many records are there in east_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM east_superstore GROUP BY `Product id`",2.547232411439056,5,1,1,24 1886,"In 2020, 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 '2020%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2020%',0.04596297571415969,9,1,1,26 1887,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM east_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM east_superstore ORDER BY Discount DESC LIMIT 1,3.1400756888400467,1,1,1,25 1888,"For each Product ID, how many records are there in west_superstore?","SELECT `Product ID`, COUNT(Order) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM west_superstore GROUP BY `Product id`",1.2299336675511308,8,1,1,27 1889,How many complaints from customers with a gmail.com email were received by the company in February 2017?,SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE (T2.`Date received` LIKE '2017-02%' OR T2.`Date received` LIKE '2017-01%') AND T1.email LIKE '%@gmail.com',SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE `Date received` LIKE '2017-01%',-1.0470618448025837,4,0,0,25 1890,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 WHERE T1.`c_acctbal < 0,0.8091424503413083,2,0,0,29 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 1894,List the distinct values of CategoryID in the Products table.,SELECT DISTINCT CategoryID FROM Products,SELECT DISTINCT CategoryID FROM Products,3.6114104240234646,1,1,1,15 1895,What is the name of the product that Aimee Bixby bought?,SELECT DISTINCT T3.`Product Name` 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` = T1.`Product ID` WHERE T2.`Customer Name` = 'Aimee Bixby',"SELECT DISTINCT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Aimee Bixby'",-0.0002200346056697599,1,0,0,29 1896,"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 T.email, T.code FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.state = 'MA' AND t1.jobTitle = 'United State'",-3.2501476534866334,2,0,0,24 1897,How many records in south_superstore were recorded in 2018?,SELECT COUNT(Order) FROM south_superstore WHERE Ship LIKE '2018%',SELECT COUNT(Order) FROM south_superstore WHERE Ship LIKE '2018%',5.25255107492374,1,1,1,24 1898,"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 1899,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.SalesPersonID = T2.EmployeeID,-0.15575156481129382,2,0,0,25 1900,In which counties are there A&W Root Beer Restaurants?,SELECT DISTINCT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'a & w root beer',SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'A&W Root Beer',-1.6051173913226655,13,0,0,19 1901,How many reviews by people between 30 and 50 years include the word 'great'?,SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.age BETWEEN 30 AND 50 AND T1.Reviews LIKE '%great%',SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.`district_id Database: retail_complains` = T2.`district_id` WHERE T2.age BETWEEN 30 AND 50 AND T3.age <= 50,-6.097092103767134,26,0,0,29 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 1903,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.Order) 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.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` GROUP BY T2._Customer ID",-2.0082319680364273,2,0,0,29 1904,"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` = T2.Composition ID GROUP BY STRFTIME('%Y-%m-%d')",-4.9434494419935895,16,0,0,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 1906,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,28 1907,How many states located in the Midwest region?,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN StateCode ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL,SELECT COUNT(DISTINCT T) FROM ( SELECT DISTINCT CASE WHEN Region = 'Midwest' THEN State END AS T FROM Regions ) WHERE T IS NOT NULL,-1.6437937081081855,2,0,0,28 1908,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2015%',-0.27887426505603213,8,1,1,23 1909,What is the average annual amount of shipped sales from 1997 to 1998?,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / 3 FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.ShippedDate BETWEEN '1996-01-01 00:00:00' AND '1998-12-31 23:59:59',SELECT CAST(SUM(CASE WHEN T1.ShippedDate BETWEEN '1997-01-01 00:00:00' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 WHERE T2.Discount = 1,-1.801904661116468,1,0,0,30 1910,What are the top 5 nations of suppliers with the lowest account balance?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_acctbal LIMIT 1,"SELECT T.n_name FROM ( SELECT T1.s_suppkey, MIN(s_acctbal) AS min ) AS T ORDER BY T.min",-3.5073792240379214,2,0,0,28 1911,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,25 1912,List the suppliers' names which supplied smoke red pale saddle plum.,SELECT 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 T1.p_name = 'smoke red pale saddle plum',"SELECT T.s_name 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_PARTkey INNER JOIN supplier AS T3 ON T2=T3.availqty WHERE T3.n_name = 'smoke red pale saddle plum' ) AS T SELECT T",-5.575487339278063,12,0,0,25 1913,Which products by Plutzer Lebensmittelgromrkte AG were discontinued and what are their price?,SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.Discontinued = 1,SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID` = T2.SupplierID WHERE T2.`CompanyName` = 'Plutzer Lebensmittelgromrkte AG' AND T1:Discontinued = 1,2.1361060438194532,3,0,0,29 1914,How many records in lineitem were recorded in 2018?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2018%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2018%',4.412960505279923,1,1,1,25 1915,List all the complaints narratives made by the customer named Brenda and last name Mayer.,SELECT T2.`Consumer complaint narrative` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Brenda' AND T1.last = 'Mayer',SELECT t2.`Consumer complaint narrative` FROM client AS t1 INNER JOIN events AS t2 ON t1.client_id = t2.Client_ID WHERE T1.first = 'Brenda' AND T2.last = 'Mayer',0.2585528334638038,2,0,0,29 1916,"Of the clients whose businesses are located in the city of Boston, calculate which of them has a higher average amount of payment.",SELECT T1.customerNumber FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.city = 'Boston' GROUP BY T1.customerNumber ORDER BY SUM(T2.amount) / COUNT(T2.paymentDate) DESC LIMIT 1,SELECT COUNT(T2.checkNumber) FROM customers AS T1 INNER JOIN payments AS T2 ON T1.salesRepEmployeeNumber = T2.customerNumber WHERE t1.city = 'Boston' AND t2.amount > ( SELECT AVG(amount) FROM payments ),3.3598076988408487,1,0,0,29 1917,How many records are in the callcenterlogs table?,SELECT COUNT(server) FROM callcenterlogs,SELECT COUNT(server) FROM callcenterlogs,4.472691083849381,1,1,1,19 1918,When was the $32650.65157 car introduced to the market? State the year.,SELECT T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '32650.65157',SELECT T3.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.`model Database: cars` = '32650.65157',-5.620583219013796,1,0,0,30 1919,How many east_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,0.6480567680739887,20,1,1,23 1920,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN people AS T2 WHERE T2.City = 'east-superstore',0.24902695528031604,2,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 1922,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product 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.`Discount Database: superstore`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2`.Product ID GROUP BY T2.Product ID`",-9.236736687809278,21,0,0,28 1923,List by order number the 3 items with the lowest price after applying the discount.,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice * (1 - l_discount) LIMIT 3,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice * (1 - l_discount) LIMIT 3,2.8717456629879443,1,1,1,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 1925,"In 2018, 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 '2018%',SELECT COUNT(T1.`ID`) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '2018%',-1.633341212337738,9,0,0,30 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 1927,"For each City, how many records are there in Suppliers?","SELECT City, COUNT(SupplierID) FROM Suppliers GROUP BY City","SELECT City, COUNT(SupplierID) FROM Suppliers GROUP BY City",5.308929195236603,1,1,1,18 1928,How much is the total quantity of items from the East region shipped on 3/25/2015? Name the products.,"SELECT SUM(T1.Quantity), T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2015-03-25' AND T2.Region = 'East'",SELECT SUM(T2.`Product Name`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Ship = '2015' AND T2.Region = 'East',1.089796008959256,6,0,0,30 1929,List down the customer names with a disputed order status.,SELECT t1.customerName FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'Disputed',SELECT customerName FROM customers AS T1 INNER JOIN orders AS T2 ON T1.salesRepEmployeeNumber = T2.orderNumber WHERE t2.status = 'Disputed',2.201216659750764,4,0,0,23 1930,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,24 1931,"How many orders did ""Laughing Bacchus Wine Cellars"" make?",SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars',SELECT SUM(CASE WHEN T2.OrderID = 'Laughing Bacchus Wine Cellars' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID`,-4.6613466243512995,25,0,0,28 1932,Name the item ordered by Jonathan Doherty with the highest quantity in the East region.,SELECT T3.`Product Name` 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` = T1.`Product ID` WHERE T2.`Customer Name` = 'Jonathan Doherty' AND T2.Region = 'East' ORDER BY T1.Quantity DESC LIMIT 1,"SELECT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Jonathan Doherty' ORDER BY T1.Quantity DESC LIMIT 1",0.9065221081700967,1,0,0,30 1933,List the distinct values of company in the events table.,SELECT DISTINCT company FROM events,SELECT DISTINCT company FROM events,5.1121551324071595,1,1,1,17 1934,What is the address of the Peking Duck restaurant?,SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.label = 'peking duck restaurant',4.650518069492971,1,0,0,23 1935,"For each Region, how many central_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM central_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 central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2._Region",-1.6878407872448788,8,0,0,30 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 1938,How many Customers records have matching records in Orders?,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.`CustomerID`) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.customerID = T2.CustomerID,-0.0077174634464283465,6,0,0,25 1939,What was the total price of the products shipped to Rovelli Gifts Distributors Ltd. between 1/1/2003 and 12/31/2003?,"SELECT T3.priceEach * T3.quantityOrdered FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.customerName = 'Rovelli Gifts' AND T2.status = 'Shipped' AND STRFTIME('%Y', T2.shippedDate) = '2003'",SELECT SUM(T2.priceEach * T2.quantityOrdered) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.`customerNumber` INNER JOIN orderdetails AS T3 ON T3.ordernumber = T4.orderNumber WHERE t3.status = 'Shipped' AND t2.shippedDate BETWEEN '2003-01-01' AND '2004-12-31',-2.077727212983636,3,0,0,27 1940,How many sales transactions were given by the customer named Joe L. Lopez?,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Joe' AND T2.MiddleInitial = 'L' AND T2.LastName = 'Lopez',SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID WHERE FirstName = 'Joe' AND T2.MiddleInitial = 'L. Lopez',-0.2729065405359127,6,0,0,30 1941,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 1942,"What is the name of the state that the client with the email ""skylar.ramirez@gmail.com"" lives in?",SELECT T3.state FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T3.email = 'skylar.ramirez@gmail.com',SELECT T1.`StateCode Database: retail_complains` FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 WHERE T3.email = 'skylar.ramirez@gmail.com',-5.381086779264022,1,0,0,30 1943,How many furniture products had been shipped by standard class in the East superstore?,SELECT COUNT(T2.Category) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class',SELECT COUNT(CASE WHEN T2.Category = 'Standard Class' THEN 1 ELSE 0 END) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID`,-2.790098083715679,3,0,0,28 1944,How many records in Shippers were recorded in 2018?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2018%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2018%',4.412960505279923,1,1,1,25 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 1946,"Customer No.129301 made an order on 1996/7/27, what was the delivery time for the first part of that order?",SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = '129301' AND T1.o_orderdate = '1996-07-27',"SELECT JULIANDAY(T2.l_receiptdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T2.o_orderkey = T1._orderkey WHERE STRFTIME('%Y', T2.`l_commitdate) = '1996-07-27' AND T1. o_orderpriority = '129301'",-1.8483653183261572,10,0,0,28 1947,Who is the sales representative of the customer who has made the highest payment? Include the full name of employee and his/her supervisor.,"SELECT T4.LastName, T4.FirstName, T4.ReportsTo , T1.Quantity * T1.UnitPrice * (1 - T1.Discount) AS payment FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID INNER JOIN Employees AS T4 ON T2.EmployeeID = T4.EmployeeID ORDER BY payment DESC LIMIT 1","SELECT T1.OrderID, T2.`Sales Representative`, T2.LastName FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.`OrderID Database: retail_world` = T2 INNER JOIN Customers AS T3 ON T2._CustomerID = T3.CustomerID INNER JOIN Employees AS T4 ON T4.ReportsTo = T5.ReportsTo ORDER BY SUM(T1.UnitPrice) DESC LIMIT 1",-7.8256019472505605,1,0,0,30 1948,Please list the phone numbers of all the customers in the household segment and are in Brazil.,SELECT T1.c_phone 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 = 'BRAZIL',SELECT c_phone FROM customer AS c_custkey INNER JOIN nation AS nation WHERE n_name = 'HOUSEHOLD' AND c_mktsegment = 'BRAZIL',4.236791962729718,1,0,0,23 1949,Calculate the percentage of customers' accounts in debt.,"SELECT CAST(SUM(IIF(c_acctbal < 0, 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer",SELECT CAST(SUM(CASE WHEN c_acctbal < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(c_custkey) FROM customer,0.8716789738425136,3,1,1,24 1950,How many records in orders were recorded in 2017?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2017%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2017%',4.775940017408425,1,1,1,22 1951,"For each Customer ID, how many records are there in east_superstore?","SELECT `Customer ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Customer id`",1.1468316332161275,11,1,1,28 1952,Who is the customer who purchased the highest number of products in a single order?,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 T1.CompanyName ORDER BY COUNT(T3.ProductID) 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 T2 .OrderID = T3.OrderID ORDER BY SUM(T3.ProductID) ASC LIMIT 1,-7.7216845150249975,23,0,0,29 1953,List the distinct values of Customer ID in the east_superstore table.,SELECT DISTINCT `Customer ID` FROM east_superstore,SELECT DISTINCT `Customer ID` FROM east_superstore,3.06645068596712,1,1,1,20 1954,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 1955,List all of the restaurant addresses from an unknown region.,SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown',SELECT t3.street_name FROM geographic AS t1 INNER JOIN location AS t2 ON t1.city = t2.city WHERE T1.region = 'unknown',-3.58290997486332,2,0,0,25 1956,"For each Region, how many west_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM west_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 west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2._Region",-1.9333681843591821,9,0,0,30 1957,List the distinct values of Client_ID in the events table.,SELECT DISTINCT Client_ID FROM events,SELECT DISTINCT Client_ID FROM events,4.508142555656296,1,1,1,13 1958,"For each Issue, how many client records are linked?","SELECT T2.Issue, COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Issue","SELECTT2.Issue, COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.`Issue`",-2.1535277193258544,7,0,0,28 1959,Please indicate store id in the state of California that have been applied 20% discount in store.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.State = 'California' AND T1.`Sales Channel` = 'In-Store' AND T1.`Discount Applied` = 0.2 THEN T2.StoreID END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,SELECT CASE WHEN T2.State = 'California' AND T2.`Discount Applied` = 0.1 AND T1.`Sales Channel` = 'In-Store',0.7370196251466308,7,0,0,27 1960,List the distinct Customer ID values linked to south_superstore.,SELECT DISTINCT T2.`Customer ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.4957358249086206,1,0,0,25 1961,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 CAST(SUM(IIF(T1.c_acctbal > 5000, 1, 0)) AS REAL) * 1000 FROM customer AS T1 INNER JOIN nation AS T2 WHERE T2.n_name = 'INDIA'",4.754626362652841,1,0,0,26 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 1963,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(HomePhone) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(HomePhone) FROM Employees GROUP BY FirstName",5.740830030114313,1,1,1,18 1964,"For each city, how many records are there in location?","SELECT city, COUNT(street_name) FROM location GROUP BY city","SELECT city, COUNT(street_name) FROM location GROUP BY city",5.308929195236603,1,1,1,20 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 1968,How many restaurants have not obtained a minimum of 3 in their reviews?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3,1.8943045553992333,1,1,1,30 1969,"Write down the store IDs and region of the state ""Michigan"".","SELECT DISTINCT T2.StoreID, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'Michigan'","SELECT T2.`StoreID`, T3.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1._StateCode WHERE T1.State = 'Michigan'",0.1468409297489647,5,0,0,30 1970,List out sale rep that has sold 1969 Harley Davidson Ultimate Chopper. List out their names and quantity sold throughout the year.,"SELECT t5.firstName, t5.lastName, SUM(t2.quantityOrdered) 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 INNER JOIN employees AS t5 ON t4.salesRepEmployeeNumber = t5.employeeNumber WHERE t1.productName = '1969 Harley Davidson Ultimate Chopper' GROUP BY t5.lastName, t5.firstName","SELECT t.firstName, t.lastName, T.quantityOrdered FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2._productCode INNER JOIN orders AS t3 ON t2.orderNumber = '1969 Harley Davidson Ultimate Chopper' INNER JOIN employees AS t4 ON t3.salesRepEmployeeNumber = t4.employeeNumber INNER JOIN customers AS t5 ON t5.customerNumber = T4.customerID INNER JOIN t5 .quantityOrdered = T5.orderDate ORDER BY t.secondName DESC LIMIT 1",-4.118376079601321,12,0,0,30 1971,"For each Region, what is the average SalesTeamID?","SELECT Region, AVG(SalesTeamID) FROM `Sales Team` GROUP BY Region","SELECT Region, AVG(SalesTeamID) FROM `Sales Team` GROUP BY Region",3.7539008754002734,1,1,1,23 1972,List the name of the customer with the most number of order quantity from 2018 to 2020.,SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.OrderDate LIKE '%/%/18' OR T2.OrderDate LIKE '%/%/19' OR T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Order Quantity` DESC LIMIT 1,SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.OrderDate LIKE '2018%' AND T2.`Sales Channel` = 'PostgreSQL',-0.46135688500875516,8,0,0,30 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 1974,"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(DISTINCT T) FROM west_superstore INNER JOIN product AS T1 INNER JOIN people AS T2 ON T1.`Order ID` = T2.`Customer ID` WHERE T2.State = 'California' AND T1.Sales > 5000,-2.1162398027103606,3,0,0,27 1975,"Among the calls from California, what percentage are priority 1?",SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T4.State = 'California',SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.StateCode) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.`district_id Database: retail_complains` AS T4 WHERE T4.State = 'California' AND T5.Priority = '1',-6.7174925463892325,27,0,0,28 1976,"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",-0.9232071509586202,6,1,1,23 1977,"For each City, how many records are there in Customers?","SELECT City, COUNT(CustomerID) FROM Customers GROUP BY City","SELECT City, COUNT(CustomerID) FROM Customers GROUP BY City",5.308929195236603,1,1,1,18 1978,"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 T1.ProcuredDate LIKE '%/%/18' AND T2.`City Name` = 'Oregon' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations ` AS T2 ON T2.StoreID = T1._StoreID,0.6631221924135248,2,0,0,27 1979,How many production records have matching records in data?,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1. ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,3.7887984933320618,12,1,1,26 1980,Which customer have the biggest purchase in one order and where does this order being ship to?,"SELECT T1.CompanyName, T2.ShipCountry 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 T1.CompanyName, T2.ShipCountry ORDER BY COUNT(T3.ProductID) DESC LIMIT 1","SELECT T1.CompanyName, T2.`ShipCountry Database: retail_world` FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1._CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T3.`OrderID` = T4.OrderID WHERE T3.ProductID = ( SELECT MAX(ProductID) FROM orders )",-7.2532638000585665,30,0,0,30 1981,How many records are in the Employees table?,SELECT COUNT(MiddleInitial) FROM Employees,SELECT COUNT(MiddleInitial) FROM Employees,4.829372047253272,1,1,1,21 1982,"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,30 1983,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(CASE WHEN T2.model_year BETWEEN 1970 AND 1980 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID,-3.929820321095043,30,0,0,30 1984,In how many counties is there a street called Appian Way?,SELECT COUNT(DISTINCT T2.county) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'appian way',SELECT COUNT(t2.county) FROM location AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city WHERE T1.street_name = 'Appian Way',5.474214559962223,1,0,0,21 1985,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 1986,How many records are in the Products table?,SELECT COUNT(UnitsInStock) FROM Products,SELECT COUNT(UnitsInStock) FROM Products,4.472691083849381,1,1,1,20 1987,How many records are in the events table?,SELECT COUNT(Submitted) FROM events,SELECT COUNT(Submitted) FROM events,4.795353829950178,1,1,1,22 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 1989,How many records in Employees were recorded in 2018?,SELECT COUNT(Salary) FROM Employees WHERE HireDate LIKE '2018%',SELECT COUNT(Salary) FROM Employees WHERE HireDate LIKE '2018%',1.0417914958953383,1,1,1,28 1990,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(Title) FROM Employees GROUP BY Country","SELECT Country, COUNT(Title) FROM Employees GROUP BY Country",5.319414557497681,1,1,1,22 1991,List down the quantity per unit for products of Tokyo Traders.,SELECT T1.QuantityPerUnit 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) * 100 / COUNT(T1.QuantityPerUnit) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID",1.2937990993393436,8,0,0,28 1992,"For each City, how many records are there in Employees?","SELECT City, COUNT(NOW) FROM Employees GROUP BY City","SELECT City, COUNT(NOW) FROM Employees GROUP BY City",5.009754053331397,1,1,1,23 1993,Lists all parts supplied by Supplier#000000034.,SELECT T3.p_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T2.s_name = 'Supplier#000000034',"SELECT T FROM ( SELECT T2.p_name, COUNT(T1.ps_partkey) AS num FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1._ps_suppkey = T2._supppkey INNER JOIN part AS T3 ON T3.s_partname = 'Supplier#000000034' ) AS T ORDER BY T.num LIMIT 1",-6.846568573698786,2,0,0,29 1994,"What is the average age of clients whose complaint type is ""TT""?",SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT',SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT',1.8048142885668323,1,1,1,30 1995,When was the product with the highest unit price shipped?,SELECT t1.shippedDate FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber ORDER BY t2.priceEach DESC LIMIT 1,SELECT t.productCode FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.ordernumber ORDER BY t.priceEach DESC LIMIT 1,-4.697315270528788,1,0,0,28 1996,List the full name of all employees who work in the Northern region.,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Northern'",SELECT DISTINCT T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`TerritoryID Database: retail_world` INNER JOIN Region AS T3 ON T2.RegionID = T3 . RegionID WHERE T1.FirstName = 'Northern' AND T1 . LastName = '',-6.851085128738043,23,0,0,28 1997,How old was the oldest employee at the time he or she was hired?,"SELECT MAX(TIMESTAMPDIFF(YEAR, BirthDate, HireDate)) FROM Employees",SELECT MIN(HireDate) FROM Employees WHERE BirthDate = 'He' AND TIMESTAMPDIFF = 'She',2.5254184126292807,1,0,0,22 1998,"In 2015, 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 '2015%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 WHERE T2.model_year LIKE '2015%',-3.1430729659516286,15,0,0,30 1999,List the distinct values of ProductName in the Products table.,SELECT DISTINCT ProductName FROM Products,SELECT DISTINCT ProductName FROM Products,4.732550129264441,1,1,1,16 2000,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 Regions WHERE State = 'New Hampshire' AND Type = 'City',-1.242322581100804,3,0,0,29 2001,"For each CategoryID, how many Products records are linked?","SELECT T2.CategoryID, COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID GROUP BY T2.CategoryID","SELECT T2.CategoryID, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1[CategoryID] = T2.`CategoryID` GROUP BY T1.ProductName",-7.8508676238044455,24,0,0,28 2002,"For each o_orderstatus, how many records are there in orders?","SELECT o_orderstatus, COUNT(o_orderkey) FROM orders GROUP BY o_orderstatus","SELECT o_orderstatus, COUNT(o_orderkey) FROM orders GROUP BY o_Orderstatus",2.687193832301921,2,1,1,28 2003,List the distinct values of CompanyName in the Sales Totals by Amount table.,SELECT DISTINCT CompanyName FROM `Sales Totals by Amount`,SELECT DISTINCT CompanyName FROM `Sales Totals by Amount`,3.670609226793579,1,1,1,21 2004,"What is the comment of the product ""burlywood plum powder puff mint""?",SELECT p_comment FROM part WHERE p_name = 'burlywood plum powder puff mint',SELECT p_comment FROM part WHERE p_name = 'burlywood plum powder puff mint',2.3013381203749566,1,1,1,23 2005,Which ProductID has the highest UnitPrice?,SELECT ProductID FROM `Order Details` ORDER BY UnitPrice DESC LIMIT 1,SELECT ProductID FROM `Order Details` ORDER BY UnitPrice DESC LIMIT 1,2.7510811090561593,1,1,1,24 2006,List the distinct values of EmployeeID in the EmployeeTerritories table.,SELECT DISTINCT EmployeeID FROM EmployeeTerritories,SELECT DISTINCT EmployeeID FROM EmployeeTerritories,4.2340918682410456,1,1,1,19 2007,List the phone numbers of customers whose order priority is urgent.,SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderpriority = '1-URGENT',SELECT T3.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T2.`o_orderpriority` = 'URGENT',-0.8460594008336841,12,0,0,27 2008,What is the quantity of Ikura ordered in order no. 10273?,SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',SELECT CAST(SUM(CASE WHEN T2.OrderID = 10273 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID`,-1.287813905182336,3,0,0,29 2009,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 Sales AS T2 ON T1.CustomerID = T2.`CustomerID`,-0.7020741847399714,2,0,0,26 2010,"For each Address, how many Products records are linked?","SELECT T2.Address, COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.Address","SELECT T2.Address, COUNT(T1.`SupplierID`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2._SupplierID GROUP BY T2.`Address`",-3.8586001286190204,2,0,0,30 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 2012,Calculate ratio between the highest unit cost and the lowest unit cost?,"SELECT ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) / ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 )",SELECT CAST(SUM(CASE WHEN T2.`Unit Cost` = '1-Unit Cost' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders`,-1.7000068717238326,1,0,0,30 2013,How many Products records have matching records in Categories?,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.categoryID,1.7307936259528676,10,1,1,22 2014,"From 2012 to 2015, how many complaints were submitted via email from female clients?","SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2012' AND '2015' AND T2.`Submitted via` = 'Email' AND T1.sex = 'Male'","SELECT COUNT(T1.`sex Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Email' AND strftime('%Y', T1.`Date received`) = '2017'",-6.343455194498136,24,0,0,30 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 2016,"For each region, what is the average county?","SELECT region, AVG(county) FROM geographic GROUP BY region","SELECT region, AVG(county) FROM geographic GROUP BY region",4.109136442510689,1,1,1,19 2017,Compute the total order quantity for Uncle Bob's Organic Dried Pears so far.,SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName LIKE 'Uncle Bob%s Organic Dried Pears',SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.ProductName = 'Uncle Bobs Organic Dried Pears',-2.498413444847828,8,0,0,30 2018,List the distinct values of Product in the reviews table.,SELECT DISTINCT Product FROM reviews,SELECT DISTINCT Product FROM reviews,3.0429959203251267,1,1,1,16 2019,What category does the item ordered by Katherine Murray on 11/4/2018 in the South region belong to?,SELECT DISTINCT T3.Category 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` = 'Katherine Murray' AND T1.`Order Date` = '2018-11-04' AND T2.Region = 'South',SELECT CASE WHEN T2.`Customer Name` = 'Katherine Murray' AND T1.Order Date LIKE '11/4/2018%' AND T2.Region = 'South',1.0315908008705221,1,0,0,30 2020,"Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641?",SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs,SELECT `Complaint` FROM callcenterlogs WHERE priority = 0 LIMIT 1,2.6902856201673044,1,0,0,29 2021,How many streets with restaurants are there in the Northern California region?,SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'northern california',SELECT COUNT(T1.geographic) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T3.region = 'northern california',-4.667561043207262,8,0,0,13 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 2023,Calculate the difference in the average retail price of parts shipped via ship and air.,"SELECT (CAST(SUM(IIF(T3.l_shipmode = 'SHIP', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'SHIP', 1, 0))) - (CAST(SUM(IIF(T3.l_shipmode = 'AIR', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'AIR', 1, 0))) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey","SELECT CAST(SUM(IIF(T2.l_shipmode = 'Ship', 1, 0)) AS REAL) * (1 - T1.p_retailprice) / COUNT(T1.ps_partkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._p_partsupp = T2.psupp INNER JOIN lineitem AS T3 ON T2._ps_suppkey = T3; T3.L_orderkey = ( SELECT AVG(FK->l_linenumber) - T4) / SUM(1-1, 1, 1) * T3",-4.286816569244086,9,0,0,12 2024,What are the regions with Greek restaurants?,SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek',SELECT t3.food_type FROM geographic AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.region = 'greek',-1.3113746912968365,1,0,0,25 2025,Which state has the most cities?,SELECT state_abbrev FROM district GROUP BY state_abbrev ORDER BY COUNT(city) DESC LIMIT 1,SELECT state_abbrev FROM district ORDER BY city DESC LIMIT 1,4.853929977489169,1,0,0,30 2026,Calculate the total payment of orders for Vegie-spread product.,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) AS sum FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Vegie-spread',SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.ProductName = 'Vegie-spread',-0.45112142032336766,1,0,0,29 2027,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 firstName, lastName, email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.city = 'Paris'",-2.7647616253199327,1,0,0,19 2028,What is the average amount in the payments table?,SELECT AVG(amount) FROM payments,SELECT AVG(amount) FROM payments,2.2020147133380097,1,1,1,19 2029,What product category that Sam Craven ordered from the central and east superstore?,SELECT DISTINCT T3.Category 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` = T1.`Product ID` LEFT JOIN central_superstore AS T4 ON T3.`Product ID` = T4.`Product ID` WHERE T2.`Customer Name` = 'Sam Craven',SELECT T2.Category FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID` INNER JOIN product AS T3 ON T3.`Product ID` LIKE 'Sam Craven%',-3.1791339372228897,12,0,0,30 2030,"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,18 2031,"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",3.7315544173038773,1,0,0,30 2032,"How much higher in percentage is the highest supply cost of the part ""hot spring dodger dim light"" than the lowest supply cost?",SELECT CAST((MAX(T1.ps_supplycost) - MIN(T1.ps_supplycost)) AS REAL) * 100 / MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.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_partkey) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1._ps_suppkey = T2.s_supponpkey INNER JOIN part AS T3 ON T3.p = T4._partkey ORDER BY T_supplycost * (1 - S)",-6.622840979155399,29,0,0,30 2033,List street names in San Francisco city.,SELECT street_name FROM location WHERE city = 'San Francisco',SELECT street_name FROM location WHERE city = 'san francisco',3.7378363639173835,1,1,1,26 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 2035,How many suppliers from Egypt have a debit balance?,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 = 'EGYPT',SELECT SUM(IIF(T1.s_acctbal < 0 AND T2.n_name = 'Egypt' THEN 1 ELSE 0 END) AS REAL) * 1000,-2.7299710223310303,2,0,0,23 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 2037,"List the ID, city, state and region for the store type which is fewer between borough and CDP.","SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.State, T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.Type = 'Borough' OR T2.Type = 'CDP'","SELECT DISTINCT T2.StoreID, T2.`City Name`, T3.`Type` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2._StateCode WHERE T1.`StateCode` BETWEEN 'BORough' AND 'CDP'",0.09475349674558084,1,0,0,29 2038,"For each ProductID, how many Orders records are linked?","SELECT T2.ProductID, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`CustomerID Database: retail_world`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID` GROUP BY T2.) ProductID",-7.687239410998927,21,0,0,30 2039,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,24 2040,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 T2.`Sales Channel` > 3800 THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,-1.3682186864577441,3,0,0,26 2041,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 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 2043,How many customers are in debt?,SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0,SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0,4.022997268207655,1,1,1,27 2044,Find the customer who made the highest payment in 2005.,"SELECT t2.customerName FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t1.paymentDate) = '2005' GROUP BY t2.customerNumber, t2.customerName ORDER BY SUM(t1.amount) DESC LIMIT 1",SELECT customerName FROM payments WHERE paymentDate LIKE '2005%' ORDER BY paymentDate DESC LIMIT 1,3.47036256753829,1,0,0,24 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 2046,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 Title = 'Vice President of Sales',2.0791039629818466,1,0,0,30 2047,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.683999698782375,5,0,0,28 2048,When was the order with the highest amount of total price shipped?,SELECT T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 1,"SELECT STRFTIME('%Y', T2.l_shipdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey ORDER BY T2.`totalprice` DESC LIMIT 1",-4.407006686636612,6,0,0,28 2049,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,-5.306819043822273,16,0,0,30 2050,What is the average quantityInStock in the products table?,SELECT AVG(quantityInStock) FROM products,SELECT AVG(quantityInStock) FROM products,4.2263400530524775,1,1,1,17 2051,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.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID,1.058210426837013,12,1,1,28 2052,"What was the serve time for the complaint call from client ""C00007127"" on 2017/2/22?",SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22',"SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.Client_ID WHERE STRFTIME('%Y', T2.`Date received`) = '2017-06-22'",-2.3076809737833455,2,0,0,23 2053,What is the social number of the client who has the longest delay in his/her complaint? Calculate the days of delay and state the company's response to the consumer.,"SELECT T1.social , 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`)), T2.`Company response to consumer` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID ORDER BY 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`)) DESC LIMIT 1",SELECT T2.`Company response to consumer` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`social Database: retail_complains` = ( SELECT MAX(delay) FROM client ),-5.741030325660363,2,0,0,30 2054,In which segment does the customer who purchased the product from the east superstore with the highest original price belong?,SELECT T2.Segment 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` = T1.`Product ID` WHERE T1.Region = 'East' ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1,"SELECT T2.`Segment Database: superstore` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID INNER JOIN product AS T3 ON REPLACE(T3.`Product ID`, ',', '') DESC LIMIT 1",-7.612590080970629,20,0,0,21 2055,How many records are in the Store Locations table?,SELECT COUNT(StoreID) FROM `Store Locations`,SELECT COUNT(StoreID) FROM `Store Locations`,4.168924784157151,1,1,1,19 2056,What is the average UnitPrice for joined Products and Categories records?,SELECT AVG(T1.UnitPrice) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT AVG(T1.UnitPrice) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.categoryID,2.934686920244112,2,1,1,18 2057,How many records are in the Employees table?,SELECT COUNT(TitleOfCourtesy) FROM Employees,SELECT COUNT(TitleOfCourtesy) FROM Employees,6.216288690184852,1,1,1,17 2058,"For each Customer ID, what is the average Quantity?","SELECT `Customer ID`, AVG(Quantity) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Quantity) FROM central_superstore GROUP BY `Customer id`",1.7004284371736567,7,1,1,29 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 2060,List any five parts name in Medium Plated Brass.,SELECT p_name FROM part WHERE p_type = 'MEDIUM PLATED BRASS' LIMIT 5,SELECT p_name FROM part WHERE p_type = 'Medium Plated Brass' LIMIT 5,3.6855197167001394,18,1,1,19 2061,"Among the orders in Central superstore, which art product were ordered the most?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' GROUP BY T2.`Product Name` ORDER BY COUNT(T2.`Product ID`) DESC LIMIT 1,SELECT SUM(CASE WHEN T2.`Product Name` = 'Art' THEN 1 ELSE 0 END) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` LIKE 'Central superstore%' ORDER BY T1.Order DESC LIMIT 1,-1.4079607871768458,3,0,0,26 2062,List the name of all the products with order quantities greater than or equal to 10 in the central superstore that has been shipped by the slowest delivery method.,SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class' AND T1.Quantity >= 10,SELECT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Quantity > 10 AND T2.Ship Mode = 'Standard Class',1.111435643892467,6,0,0,30 2063,"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 2064,Please list the home phone numbers of the employees who are in charge of the sales in the territories in the Eastern Region.,SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern ' GROUP BY T1.HomePhone,"SELECT CAST(SUM(IIF(T2.RegionDescription = 'Eastern', 1, 0)) AS REAL) * 100 / COUNT(T1.HomePhone) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",-5.224083863928504,12,0,0,30 2065,What counties are not in the Bay Area Region?,SELECT DISTINCT county FROM geographic WHERE region != 'bay area',SELECT county FROM geographic WHERE region = 'bay area',2.305393660436965,1,0,0,23 2066,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, SUM(T1.quantityOrdered) 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 T3.salesRepEmployeeNumber = T4.customerNumber INNER JOIN t4.productLine = 'Cruz & Sons Co.' ORDER BY STRFTIME('%Y', T5.orderDate) DESC LIMIT 1",-3.5155755688162644,1,0,0,30 2067,How many records are in the Employees table?,SELECT COUNT(FirstName) FROM Employees,SELECT COUNT(FirstName) FROM Employees,1.942087695388649,2,1,1,22 2068,Which product have the highest user satisfaction?,SELECT ProductName FROM Products WHERE ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT ProductName FROM Products ORDER BY ReorderLevel DESC LIMIT 1,0.9316298834628769,1,0,0,20 2069,List out full name of employees who are working in Boston?,"SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Boston'","SELECT firstName, lastName FROM employees AS firstName INNER JOIN offices AS officeCode WHERE city = 'Boston'",-2.3143160245854224,2,0,0,19 2070,"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 2071,What is the average sales for each categories?,SELECT AVG(ProductSales) FROM `Sales by Category` GROUP BY CategoryName,SELECT AVG(Sales) FROM `Sales by Category` GROUP BY Category,3.444922758284864,1,0,0,25 2072,List the names of non-US suppliers that have discontinued.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA',SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.Country = 'US',-0.8046283990169757,12,0,0,30 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 2074,How many Orders records have matching records in Customers?,SELECT COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.`ShipperID Database: retail_world`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.`CustomerID` = T2._CustomerID,-7.329080442718088,18,0,0,25 2075,Give the name and phone number of the customers who have more than 9000 account balance.,"SELECT c_name, c_phone FROM customer WHERE c_acctbal > 9000","SELECT c_name, c_phone FROM customer WHERE c_acctbal > 9000",3.62879618453073,1,1,1,28 2076,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,22 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 2078,What is the average price in the price table?,SELECT AVG(price) FROM price,SELECT AVG(price) FROM price,4.790907908673019,1,1,1,20 2079,"How many items shipped by REG AIR were ordered on March 22, 1995?",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 = 'REG AIR' AND T1.o_orderdate = '1995-03-22',"SELECT COUNT(IIF(T2.l_shipmode = 'REG AIR', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE STRFTIME('%Y', T1._orderdate) = '1995-12-22'",-4.175754724091427,1,0,0,30 2080,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.`LastName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.`EmployeeID` = T2.EpmployeeID,-7.031209136453339,20,0,0,27 2081,How many east_superstore records have matching records in south_superstore?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN south_superStore AS T2 ON T1.`customer ID` = T2.`Customer id`,1.2451555690663145,9,1,1,25 2082,What is the total sales of furniture products in the east superstore in the year 2016.,"SELECT SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE STRFTIME('%Y', T1.`Order Date`) = '2016' AND T2.Category = 'Furniture'","SELECT SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Category = 'Furniture' AND strftime('%Y', T1.Order) = '2016'",2.2674073878732575,2,0,0,23 2083,"Which car is the cheapest? Provide its acceleration, number of cylinders, and producing year.","SELECT T1.acceleration, T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID ORDER BY T3.price ASC LIMIT 1","SELECT T4.acceleration, T3.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 WHERE T2.`price` = 'cheapest'",-5.6239954692988166,12,0,0,28 2084,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 2085,"Among the customers from Morocco, how many customers were in debt?",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 T2.n_name = 'MOROCCO',SELECT COUNT(IIF(T1.c_acctbal < 0 AND T2.n_name = 'MOROCCO' THEN 1 ELSE 0 END) AS REAL) * 10,-4.142019278586002,1,0,0,21 2086,How many employees have territories in the Eastern region?,SELECT COUNT(DISTINCT T1.FirstName) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern',SELECT COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = 2 INNER JOIN Region AS T3 ON T2.RegionID = 3 AND T3.TerritoryID = 4,-6.785744780172842,23,0,0,29 2087,"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.OrderID LIKE '2017%',-7.066866742495691,19,0,0,30 2088,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,-2.376713683338068,1,0,0,29 2089,List the distinct city values linked to employees.,SELECT DISTINCT T2.city FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode,SELECT DISTINCT T2.city FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2 . officeCode,4.517492586728658,2,1,1,21 2090,How many records in callcenterlogs were recorded in 2022?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2022%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2022%',5.195196781000291,1,1,1,24 2091,How many employees have Andrew Fuller as their direct supervisor?,SELECT COUNT(EmployeeID) FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ),SELECT COUNT(ReportsTo) FROM Employees WHERE FirstName != 'Andrew' AND LastName = 'Fuller',2.567878188010161,1,0,0,30 2092,List the distinct values of Product ID in the west_superstore table.,SELECT DISTINCT `Product ID` FROM west_superstore,SELECT DISTINCT `Product ID` FROM west_superstore,4.376147590469199,1,1,1,18 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 2094,How many records in east_superstore were recorded in 2018?,SELECT COUNT(`Product ID`) FROM east_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Product ID`) FROM east_superstore WHERE Ship LIKE '2018%',1.3573268699547099,1,1,1,26 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 2096,How much is the salary of the first employee that was hired?,SELECT Salary FROM Employees WHERE HireDate = ( SELECT MIN(HireDate) FROM Employees ),SELECT Salary FROM Employees WHERE HireDate = '1994-01-01',4.160762766797156,1,0,0,30 2097,"Of the customers who are from Canada, how many used Federal Shipping?",SELECT COUNT(T3.CustomerID) FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.ShipName = 'Federal Shipping',SELECT COUNT(CustomerID) FROM Customers WHERE ShipName = 'Canada' AND ShipVia = 'Federal Shipping',-1.1106376747284312,4,0,0,24 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 2099,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 DISTINCT T3.`Ship Date` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.Customer ID WHERE T2.`Customer Name` = 'Ann Chong' AND T1.Region = 'Central',3.94664750817441,1,0,0,21 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 2101,Which restaurant on the street Alameda de las Pulgas in the city of Menlo Park is the worst rated?,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'avenida de las pulgas' AND T2.city = 'menlo park' ORDER BY review LIMIT 1,SELECT T3.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id3_id2 WHERE T1.`street_name Database: restaurant` = 'alameda de las pulgas' ANDT2.city = 'menlo park',-5.9633106371116975,1,0,0,20 2102,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,3.2958196255451435,1,1,1,27 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 2104,"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 2105,"For each city, how many records are there in client?","SELECT city, COUNT(first) FROM client GROUP BY city","SELECT city, COUNT(first) FROM client GROUP BY city",5.009754053331397,1,1,1,21 2106,What is the name of the customer with the highest amount of 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,30 2107,"In 2015, 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 '2015%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2015%',3.4416734708638548,4,1,1,30 2108,How many clients with the last name Alvarado are from Maryland?,SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T1.state_abbrev = T3.StateCode WHERE T2.last = 'Alvarado' AND T2.state = 'MD',SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T3.state_abbrev = T4.StateCode WHERE T2.`last` = 'Alvarado',-4.462827669386769,6,0,0,15 2109,State top 3 emails of UK Sales Rep who have the highest credit limit.,"SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3",SELECT t3.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber ORDER BY T1.creditLimit DESC LIMIT 3,-3.673903924065356,2,0,0,30 2110,List the distinct values of productLine in the productlines table.,SELECT DISTINCT productLine FROM productlines,SELECT DISTINCT productLine FROM productlines,4.22603725091863,1,1,1,15 2111,How many types of restaurants are there in the Yosemite and Mono Lake area?,SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area',SELECT COUNT(t2.food_type) FROM geographic AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.region = 'yosemite and mono lake area',4.5360728832034685,9,1,1,22 2112,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,21 2113,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Order 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.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID` GROUP BY T2._Customer ID",-1.3484958076648672,8,0,0,28 2114,"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,18 2115,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,1.0994058576273393,6,1,1,29 2116,How many male clients born in the year 1977 were given priority 0 in their complaints?,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.sex = 'Male' AND T2.priority = 0 AND T1.year = 1997,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0,-2.598522495983445,14,0,0,30 2117,Please indicate the street names of restaurants with food type is American.,SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American',SELECT DISTINCT T3.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.`food_type` = 'american',-2.551249759304037,10,0,0,20 2118,"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.471640873549665,27,0,0,29 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 2120,What is the average Discount in the east_superstore table?,SELECT AVG(Discount) FROM east_superstore,SELECT AVG(Discount) FROM east_superstore,4.2263400530524775,1,1,1,19 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 2122,"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.9273437405164126,1,0,0,27 2123,How many records in Shippers were recorded in 2022?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2022%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2022%',4.412960505279923,1,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 2125,Which product has the highest net profit in 2019?,"SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ProcuredDate LIKE '2019%' ORDER BY T1.`Unit Price` DESC LIMIT 1,1.8496845453835373,1,0,0,30 2126,What is the highest total price paid for an order?,SELECT UnitPrice * Quantity * (1 - Discount) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * (1 - Discount) DESC LIMIT 1,SELECT MAX(UnitPrice) FROM `Order Details`,4.657540249829904,1,0,0,29 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 2128,What is the percentage of restaurants that serve American food in Dublin city?,"SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'","SELECT CAST(SUM(IIF(food_type = 'american', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo",3.9611480402210963,1,0,0,20 2129,List the distinct values of Product in the events table.,SELECT DISTINCT Product FROM events,SELECT DISTINCT Product FROM events,5.1121551324071595,1,1,1,15 2130,"Among customers named Kate, who has the highest quantity?","SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Kate' ORDER BY T1.Quantity DESC LIMIT 1","SELECT FirstName, MiddleInitial, LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.FirstName = 'Kate' GROUP BY FirstName ORDER BY Quantity DESC LIMIT 1",3.2155176320854784,1,0,0,23 2131,"What is the biggest discount among all orders for the part ""burnished seashell gainsboro navajo chocolate""?",SELECT MAX(T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate',SELECT ( SELECT MAX(l_discount) FROM lineitem WHERE l_partkey = 'burnished seashell gainsboro navajo chocolate' ) AS MAX LIMIT 1,-1.5684900947062985,2,0,0,28 2132,What is the total Price in the Products table?,SELECT SUM(Price) FROM Products,SELECT SUM(Price) FROM Products,5.135285213219256,1,1,1,22 2133,What is the average Price for joined Products and Sales records?,SELECT AVG(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1 . ProductID = T2.ProductID,4.401765145937516,2,1,1,25 2134,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`Channel ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,29 2135,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 2136,List the distinct Country values linked to Products.,SELECT DISTINCT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,6.850182465049296,1,1,1,26 2137,What is the average quantityOrdered for joined orderdetails and products records?,SELECT AVG(T1.quantityOrdered) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode,SELECT AVG(T1.quantityOrdered) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.ProductCode,6.130172956098138,1,1,1,18 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 2139,"For each QuantityPerUnit, how many records are there in Products?","SELECT QuantityPerUnit, COUNT(UnitsInStock) FROM Products GROUP BY QuantityPerUnit","SELECT QuantityPerUnit, COUNT(UnitsInStock) FROM Products GROUP BY QuantityperUnit",2.6006554639138653,4,1,1,22 2140,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,0.9153430171709739,2,1,1,30 2141,"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',-2.413033827841353,2,0,0,26 2142,List the distinct city values linked to customers.,SELECT DISTINCT T2.city FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode,SELECT DISTINCT T3.city FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber,-2.516007343583507,1,0,0,24 2143,"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%',1.333560649529996,7,1,1,25 2144,What is the average Quantity for joined central_superstore and product records?,SELECT AVG(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.3070078377045955,10,1,1,27 2145,What is the family name of the employee who shipped the order 10521 to CACTU?,SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10521 AND T2.CustomerID = 'CACTU',"SELECT T3.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.employeeID WHERE STRFTIME('%Y', T2.`OrderID`) = 10521",-0.8991118288234787,6,0,0,30 2146,How many records in reviews were recorded in 2017?,SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2017%',SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2017%',4.69216415425934,1,1,1,24 2147,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 2148,"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 DISTINCT T1.`sex Database: retail_complains` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 WHERE T3.`Date received` BETWEEN 20 AND 40 AND T2.`Complaint ID` = 'Female',-7.101039881616705,1,0,0,30 2149,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 2150,What is the highest UnitPrice in the Products table?,SELECT MAX(UnitPrice) FROM Products,SELECT MAX(UnitPrice) FROM Products,5.447284229782327,1,1,1,19 2151,How many days was the fastest shipping of Berglunds snabbkp's order?,"SELECT datediff(T2.ShippedDate, T2.OrderDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Berglunds snabbkp' ORDER BY datediff(T2.ShippedDate, T2.OrderDate) LIMIT 1",SELECT days FROM ( SELECT COUNT(OrderDate) FROM Customers WHERE CompanyName = 'Berglunds snabbkp' AND OrderDate LIKE '%/%/18' GROUP BY days ) AS days,-1.7896797120990566,5,0,0,29 2152,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.orderDate = '2004-01-01',1.3054794956336138,1,0,0,29 2153,List the distinct values of street_name in the location table.,SELECT DISTINCT street_name FROM location,SELECT DISTINCT street_name FROM location,4.732550129264441,1,1,1,19 2154,How many production records have matching records in price?,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN price AS T2 ON T1. ID = T2.ID,4.063389489346647,10,1,1,26 2155,What is the average Quantity for joined people and central_superstore records?,SELECT AVG(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.0877984167540204,6,1,1,29 2156,Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.,"SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.SalesTeamID = 18 AND T1.`Sales Channel` = 'In-Store' OR T1.`Sales Channel` = 'Online'","SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`.SalesTeamID = 18 WHERE T1.OrderNumber = '2-Order-Number' AND T1.`Sales Channel` = 'Online'",-1.0352666895357117,1,0,0,30 2157,"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(T2.s_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.S_Nationkey WHERE T2.`s_acctbal` = '1-MEDIUM' AND T1._name = 'Middle East',-1.8909670013737148,12,0,0,23 2158,Which Customer ID has the highest Profit?,SELECT `Customer ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,SELECT `Customer ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,2.465633925434841,1,1,1,26 2159,"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 2160,How many price records have matching records in production?,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.id) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,3.345663442490121,13,1,1,25 2161,What is the full address of Albert's Café?,"SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'","SELECT T2.street_name, T3.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = STRFTIME('%Y', T2.`street_num`) = 'albert'",-1.9896698781464137,12,0,0,24 2162,"For each Sales Channel, how many Store Locations records are linked?","SELECT T2.`Sales Channel`, COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID GROUP BY T2.`Sales Channel`","SELECT T2.`Sales Channel`, COUNT(T1.StoreID) FROM Store Locations AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`Store Locations` = T2._StoreID GROUP BY T2.SalesChannel",-1.9620251506132806,8,0,0,30 2163,"How many customers are there in Berlin, Germany?",SELECT COUNT(City) FROM Customers WHERE Country = 'Germany' AND City = 'Berlin',SELECT COUNT(City) FROM Customers WHERE Country = 'Germany' AND City = 'Berlin',2.8306520084364655,9,1,1,26 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 2165,How many Sales Rep who are working in Tokyo? List out email and full name of those employees.,"SELECT T1.firstName, T1.lastName, T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo' AND T1.jobTitle = 'Sales Rep'","SELECT email, lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.city = 'Tokyo' AND t1.jobTitle = 'Sales Rep'",-2.1016421993588867,9,0,0,28 2166,"In 2015, 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 T2.`Date received` LIKE '2015%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 WHERE T2.`Date received` LIKE '2015%',-1.6305803841216309,2,0,0,30 2167,"In 2022, 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.ShipCountry LIKE '2022%',SELECT COUNT(T1.`OrderID`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID LIKE '2022%',-2.4403929867587815,6,0,0,29 2168,How many records are in the west_superstore table?,SELECT COUNT(`Order ID`) FROM west_superstore,SELECT COUNT(`Order ID`) FROM west_superstore,3.9261874356305757,1,1,1,22 2169,"Among the car models introduced in the market in 1970, how many of them have the USA as their origin country?",SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.model_year = 1970 AND T2.country = 'USA',SELECT COUNT(T1.model_year) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.`country` = 'USA',-3.155822333741955,27,0,0,29 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 2171,List the distinct values of employeeNumber in the employees table.,SELECT DISTINCT employeeNumber FROM employees,SELECT DISTINCT employeeNumber FROM employees,4.22603725091863,1,1,1,16 2172,Which Customer ID has the highest Quantity?,SELECT `Customer ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,3.2958196255451435,1,1,1,28 2173,"For each food_type, how many records are there in generalinfo?","SELECT food_type, COUNT(id_restaurant) FROM generalinfo GROUP BY food_type","SELECT f od_type, COUNT(id_restaurant) FROM generalinfo GROUP BY food_type",-3.9730370114420688,6,0,0,26 2174,At what numbers on 9th Avenue of San Francisco there are restaurants?,SELECT id_restaurant FROM location WHERE City = 'san francisco' AND street_name = '9th avenue',SELECT id_restaurant FROM location WHERE City = 'San Francisco' AND street_name = '9th Avenue',2.3084316945442813,3,1,1,27 2175,What is the total UnitPrice in the Order Details table?,SELECT SUM(UnitPrice) FROM `Order Details`,SELECT SUM(UnitPrice) FROM `Order Details`,5.186631828369567,1,1,1,20 2176,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,24 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 2178,What is the average SalesID for joined Sales and Customers records?,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.`CustomerID` = T2.CustomerID,0.7093694530904708,5,0,0,26 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 2180,What is the highest price in the price table?,SELECT MAX(price) FROM price,SELECT MAX(price) FROM price,4.895887793269589,1,1,1,18 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 2182,List the distinct values of StateCode in the Regions table.,SELECT DISTINCT StateCode FROM Regions,SELECT DISTINCT StateCode FROM Regions,3.7368875748870978,1,1,1,15 2183,List the distinct CategoryID values linked to Categories.,SELECT DISTINCT T2.CategoryID FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.categoryID FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2 . CategoryID,3.417956236249954,17,1,1,27 2184,"For each Customer ID, how many records are there in east_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM east_superstore GROUP BY `Customer id`",1.498476125909368,8,1,1,27 2185,"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.RequiredDate LIKE '2020%',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.RequiredDate LIKE '2020%',-2.869459106394088,7,0,0,30 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 2187,How many records are in the Customer and Suppliers by City table?,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City`,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City`,1.4122608396405114,1,1,1,20 2188,How many product ids have the lowest price?,SELECT COUNT(DISTINCT ProductID) FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products ),SELECT COUNT(ProductID) FROM Products ORDER BY Price DESC LIMIT 1,2.3237301313099517,1,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 2190,"What product was ordered in the Central region on April 26, 2018, and shipped by April 27, 2018?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order Date` = '2018-04-26' AND T1.`Ship Date` = '2018-04-27' AND T2.Region = 'Central',"SELECT `Product Name` FROM central_superstore WHERE Ship LIKE '2018%' AND Region = 'Central' AND STRFTIME('%Y', `Order Date`) = '2018'",0.6555139313215526,4,0,0,30 2191,What is the average Profit for joined east_superstore and product records?,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.3907899639470112,7,1,1,26 2192,How many records in lineitem were recorded in 2022?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2022%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2022%',4.412960505279923,1,1,1,25 2193,Which city has the largest population?,SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1,SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1,2.508553637329441,1,1,1,30 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 2195,What is the full name of the employees who report to the Sales Manager?,"SELECT FirstName, LastName FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )","SELECT FirstName, LastName, Title, ReportsTo FROM Employees WHERE Title = 'Sales Manager'",1.6271998030448154,1,0,0,29 2196,Which chicken restaurant has the highest review?,SELECT label FROM generalinfo WHERE food_type = 'chicken' ORDER BY review DESC LIMIT 1,SELECT label FROM generalinfo ORDER BY review DESC LIMIT 1,4.988260417689312,1,0,0,28 2197,What is the amount of discount applied to the product with the highest net profit and what is the name of the said product?,"SELECT T1.`Unit Price` * T1.`Discount Applied`, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1",SELECT SUM(CASE WHEN T2.`Product Name` = 'Net Profit' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY T1.`Unit Price` DESC LIMIT 1,-0.09993707573878405,3,0,0,30 2198,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,29 2199,"Among the cars over 3000lbs, how many of them cost less than $30000?",SELECT COUNT(T1.car_name) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.weight > 3000 AND T2.price < 30000,SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T3.price > 30000,-4.617819166043026,16,0,0,30 2200,"For each employeeNumber, how many records are there in employees?","SELECT employeeNumber, COUNT(officeCode) FROM employees GROUP BY employeeNumber","SELECT employeenumber, COUNT(officeCode) FROM employees GROUP BY employeeNumber",3.3361052964556017,2,1,1,22 2201,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,19 2202,How many west_superstore records have matching records in east_superstore?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Card ID` = T2.`CustomerID`,-3.83030456413587,19,0,0,26 2203,Describe the ordered products which were the most overdue from required date.,"SELECT DISTINCT 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 DATEDIFF(T1.ShippedDate, T1.RequiredDate) < 0",SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = 2 ORDER BY T2.RequiredDate DESC LIMIT 1,1.2185368341715075,1,0,0,30 2204,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,22 2205,"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'",-0.9418312810200119,23,0,0,28 2206,"List down the product IDs and names that include the word ""Outdoor"".","SELECT ProductID, T FROM ( SELECT ProductID , CASE WHEN `Product Name` LIKE '%Outdoor%' THEN `Product Name` ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL ORDER BY T DESC","SELECT ProductID, `Product Name` FROM Products WHERE `Word Name` = 'Outdoor'",1.930545455490096,1,0,0,30 2207,How many records are in the orders table?,SELECT COUNT(orderNumber) FROM orders,SELECT COUNT(orderNumber) FROM orders,4.233836292305277,1,1,1,19 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 2209,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",4.859832788710389,1,0,0,29 2210,What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?,"SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card'",SELECT AVG(T2.`Complaint ID`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`city` = 'New York' AND T2.`Date received` < 3,-0.2912467449077257,2,0,0,30 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 2212,List out the phone number of the shipping company of order id 10296.,SELECT T2.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260,SELECT T3.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`OrderID` = 10296,-0.38084252071490265,1,0,0,30 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 2214,"For each ProductID, how many Sales Orders records are linked?","SELECT T2.ProductID, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.`ProductID`, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID GROUP BY T2.__ProductID",-0.17117866673625934,4,0,0,30 2215,"For each Customer ID, what is the average Profit?","SELECT `Customer ID`, AVG(Profit) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Profit) FROM central_superstore GROUP BY `Customer id`",0.8752183066253295,7,1,1,26 2216,"For each Region, what is the average Discount?","SELECT Region, AVG(Discount) FROM east_superstore GROUP BY Region","SELECT Region, AVG(Discount) FROM east_superstore GROUP BY Region",5.006882409791407,1,1,1,21 2217,What is the average _SalesTeamID for joined Sales Orders and Sales Team records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID,"SELECT AVG(T2.SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`"" AS T2 ON T1._SalesteamID = T2.`Sales Team`",2.75802149011263,5,0,0,27 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 2219,"For each state_abbrev, how many records are there in district?","SELECT state_abbrev, COUNT(district_id) FROM district GROUP BY state_abbrev","SELECT state_abbrev, COUNT(district_id) FROM district GROUP BY STATE_ABbrev",2.8792233457210585,1,1,1,28 2220,"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,18 2221,List the distinct values of Country in the Customers table.,SELECT DISTINCT Country FROM Customers,SELECT DISTINCT Country FROM Customers,3.7368875748870978,1,1,1,16 2222,Please list the names of all the suppliers for parts under Brand#55.,SELECT 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 T1.p_brand = 'Brand#55',"SELECT T.s_name FROM ( SELECT IIF(T1.p_name = 'Brand#55', 1, 0)) AS T FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2._suppkey = 3",-1.2464162872704911,1,0,0,30 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 2224,List down all of the product names that were placed by sales person with id 10.,SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 10,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.SalesPersonID = 10 THEN T1.Name ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL,-2.6064794780510705,2,0,0,25 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 2226,"Compare the number of orders between ""Platters"" and ""Serveware"" products.","SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' THEN 1 ELSE 0 END) AS num1 , SUM(CASE WHEN T2.`Product Name` = 'Serveware' THEN 1 ELSE 0 END) AS num2 FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID",SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' AND T1.WarehouseCode = 'Serveware' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID,2.7305328055767912,2,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 2229,Lists the name of the product and customer who placed an order on 10/21/18 and it was delivered on 11/21/19.,"SELECT T3.`Product Name`, 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 WHERE T2.OrderDate = '10/21/18' AND T2.DeliveryDate = '11/21/19'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`Customer Names` = 'Delivery on 10/21/18' THEN T2.`Product Name` ELSE NULL END 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 IS NOT NULL,-3.274738084680363,3,0,0,23 2230,Which _CustomerID has the highest _SalesTeamID?,SELECT _CustomerID FROM `Sales Orders` ORDER BY _SalesTeamID DESC LIMIT 1,SELECT _CustomerID FROM `Sales Orders` ORDER BY _SalesTeamID DESC LIMIT 1,2.2463708167457126,2,1,1,28 2231,How many Customers records have matching records in Sales?,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.customerID = T2.CustomerID,3.2941306289403838,5,1,1,26 2232,What sales channels are used the most in the 3 places with the highest median income?,SELECT `Sales Channel` FROM ( SELECT T1.`Sales Channel` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 3 ) GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1,SELECT T FROM ( SELECT CASE WHEN T2.`Median Income` = 3 THEN T1.`Sales Channel` 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.886364512164486,1,0,0,30 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 2234,Which p_name has the highest p_retailprice?,SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,4.8437841492662725,1,1,1,24 2235,How many records in Orders were recorded in 2016?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2016%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2016%',4.775940017408425,1,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 2237,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(T2.`Sub-product`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,-1.2926938924743423,4,0,0,22 2238,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%',3.737185633835157,1,0,0,22 2239,List the distinct values of CategoryID in the Categories table.,SELECT DISTINCT CategoryID FROM Categories,SELECT DISTINCT CategoryID FROM Categories,4.5739967119286575,1,1,1,17 2240,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,15 2241,Which city has the highest county?,SELECT city FROM geographic ORDER BY county DESC LIMIT 1,SELECT city FROM geographic ORDER BY county DESC LIMIT 1,4.773174011703834,1,1,1,29 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 2243,List the distinct values of City in the Suppliers table.,SELECT DISTINCT City FROM Suppliers,SELECT DISTINCT City FROM Suppliers,5.1121551324071595,1,1,1,17 2244,How many customers share the most common last name?,SELECT COUNT(CustomerID) FROM Customers GROUP BY LastName ORDER BY COUNT(LastName) DESC LIMIT 1,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Most common' ORDER BY LastName DESC LIMIT 1,3.903430175094086,1,0,0,28 2245,List all the dates of the urgent orders.,SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-URGENT',SELECT o_orderdate FROM orders WHERE o_custkey = 'URGENT',4.160762766797156,1,0,0,30 2246,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 2247,How many records in Shippers were recorded in 2019?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2019%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2019%',4.412960505279923,1,1,1,23 2248,"For each region, how many records are there in geographic?","SELECT region, COUNT(IIF) FROM geographic GROUP BY region","SELECT region, COUNT(IIF) FROM geographic GROUP BY region",1.1378285085880602,2,1,1,26 2249,List the distinct values of Issue in the events table.,SELECT DISTINCT Issue FROM events,SELECT DISTINCT Issue FROM events,3.537048448089766,1,1,1,16 2250,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 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 2253,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.5486773895406887,2,0,0,22 2254,"For each Country, what is the average UnitPrice?","SELECT Country, AVG(UnitPrice) FROM Invoices GROUP BY Country","SELECT Country, AVG(UnitPrice) FROM Invoices GROUP BY Country",4.128019882299922,1,1,1,19 2255,How many employees records have matching records in offices?,SELECT COUNT(T1.officeCode) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode,SELECT COUNT(T1.employeeNumber) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2 . officeCode,3.2371556086040982,5,0,0,21 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 2257,What is the city located in Bay Area of Santa Clara?,SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county',SELECT city FROM geographic WHERE county = 'bay area' AND region = 'santa clara',0.465135036940439,1,0,0,20 2258,List every city in San Mateo County.,SELECT city FROM geographic WHERE county = 'san mateo county',SELECT city FROM geographic WHERE county = 'san mateo county',3.8969331317056195,1,1,1,26 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 2260,What is the average actual profit by 1937 Lincoln Berline?,SELECT SUM(T1.priceEach - T2.buyPrice) / COUNT(*) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productName = '1937 Lincoln Berline',SELECT CAST(SUM(T2.MSRP - T2.buyPrice) AS REAL) / COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.`productCode` WHERE T3.productName = '1937 Lincoln Berline',-3.525935494948212,2,0,0,27 2261,What is the highest ps_supplycost in the partsupp table?,SELECT MAX(ps_supplycost) FROM partsupp,SELECT MAX(ps_supplycost) FROM partsupp,3.803141037258856,1,1,1,19 2262,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(Salary) FROM Employees GROUP BY Country","SELECT Country, COUNT(Salary) FROM Employees GROUP BY Country",5.101483010172825,1,1,1,22 2263,Provide the price and country origin of the car named Ford Maverick.,"SELECT DISTINCT T1.price, 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 INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T4.car_name = 'ford maverick'","SELECT T2.`price`, T3.`country Database: cars` 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",-6.715215616717535,20,0,0,28 2264,List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.,SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC,SELECT id_restaurant FROM location WHERE street_num BETWEEN 70 AND 2000 AND food_type = 'american',1.644485739835725,1,0,0,30 2265,"List the products whose supplier is Pavlova, Ltd. Please include the product ID and re-order level.","SELECT T1.ProductName, T1.ProductID, T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'","SELECT DISTINCT T2.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` WHERE T1.`ProductName` = 'Pavlova, Ltd'",-5.047319202410095,1,0,0,30 2266,What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer?,SELECT CAST(SUM(CASE WHEN T2.`Consumer consent provided?` = 'Consent provided' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Consumer consent provided?`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.first = 'Mason' AND T1.middle = 'Javen' AND T1.last = 'Lopez',SELECT CAST(SUM(CASE WHEN T1.`sex Database: retail_complains` = 'Mr Mason Javen Lopez' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer consent provided?` == 'N/A',-6.756029027482377,28,0,0,29 2267,Please list the names of customers who have total orders of over 3 in 2018.,"SELECT DISTINCT IIF(COUNT(T2.CustomerID) > 3, T2.`Customer Names`, NULL) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._CustomerID HAVING COUNT(T2.CustomerID)",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate > '2018%' THEN T2.`Customer Names` END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,-0.7359716851669976,2,0,0,26 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 2270,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 2271,"Calculate the average monthly order and percentage of warehouse ""WARE-NMK1003"" in 2019. Among them, mention number of orders for floor lamps.","SELECT CAST(SUM(CASE WHEN T2.WarehouseCode = 'WARE-NMK1003' THEN 1 ELSE 0 END) AS REAL) / 12 , CAST(SUM(CASE WHEN T2.WarehouseCode = 'WARE-NMK1003' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OrderNumber), COUNT(CASE WHEN T1.`Product Name` = 'Floor Lamps' AND T2.WarehouseCode = 'WARE-NMK1003' THEN T2.`Order Quantity` ELSE NULL END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T2.OrderDate LIKE '%/%/19'",SELECT AVG(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'WARE-NMK1003' AND T2.OrderDate LIKE '%/%/19',0.39521264563700764,1,0,0,30 2272,How many records are in the EmployeeTerritories table?,SELECT COUNT(EmployeeID) FROM EmployeeTerritories,SELECT COUNT(EmployeeID) FROM EmployeeTerritories,0.3305238570680074,2,1,1,26 2273,"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,22 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 2275,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderDate LIKE '2015%',-6.35188344780534,28,0,0,30 2276,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.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 T4.Name = 'Adam',-1.1201862689925037,3,0,0,28 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 2278,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,28 2279,"In 2023, 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 '2023%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2023%',3.2578974223951658,3,1,1,29 2280,List the distinct values of ContactName in the Suppliers table.,SELECT DISTINCT ContactName FROM Suppliers,SELECT DISTINCT ContactName FROM Suppliers,4.5739967119286575,1,1,1,18 2281,List the distinct values of State in the state table.,SELECT DISTINCT State FROM state,SELECT DISTINCT State FROM state,2.269073942246225,1,1,1,16 2282,Provide the nation and region of the customer with the address of wH55UnX7 VI?,"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_address = 'wH55UnX7 VI'","SELECT T2.c_nationkey, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = 'wH55UnX7' AND T1.`n_regionkey` = 'VI'",-0.6002779883212239,6,0,0,21 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 2284,"How many orders were shipped by ""Speedy Express""?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = t2.ShipperID WHERE T2.CompanyName = 'Speedy Express',3.384093509128391,7,1,1,28 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 2286,"What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region?",SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county',SELECT t3.label FROM geographic AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.county = 'el dorado county' AND T2.region = 'lake tahoe region',-4.1081626965981695,10,0,0,17 2287,"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,25 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 2289,How many male clients are from the state of Massachusetts?,SELECT COUNT(T3.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.state = 'Massachusetts' AND T3.sex = 'Male',SELECT COUNT(T2.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON Ttrict_id = T3.district_id WHERE T3.`sex` = 'Male' AND T4.sex = 'Massachusetts',-1.9669488886309763,9,0,0,26 2290,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer disputed?`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer disputed?`) FROM events GROUP BY client_id",0.12310258088170124,2,1,1,22 2291,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,25 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 2293,List by its ID number all restaurants on 11th Street in Oakland.,SELECT id_restaurant FROM location WHERE city = 'oakland' AND street_name = '11th street',SELECT id_restaurant FROM location WHERE city = 'oakland' AND street_name = '11th street',2.321615630178865,5,1,1,20 2294,How many furniture products were ordered at central superstore?,SELECT COUNT(*) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Furniture',SELECT COUNT(T2.Category) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id` WHERE T1.Category = 'Furniture',0.11218752367855339,4,0,0,21 2295,"Which part is ordered in a bigger amount in order no.1, ""burnished seashell gainsboro navajo chocolate"" or ""salmon white grey tan navy""?","SELECT T.p_name FROM ( SELECT T2.p_name, SUM(T1.l_quantity) AS num FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name IN ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate') GROUP BY T1.l_partkey ) AS T ORDER BY T.num DESC LIMIT 1","SELECT T.p_name FROM ( SELECT IIF(T1.l_orderkey = 1, 1, 0)) AS T ORDER BY T.burnished seashell gainsboro navajo chocolate DESC LIMIT 1",-1.4480334028778097,1,0,0,30 2296,List the products ordered by customers in Coachella.,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.City = 'Coachella',SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Customer ID Database: superstore` = 'Coachella' THEN T1.`Product Name` ELSE NULL END AS T FROM west_superstore ) WHERE T IS NOT NULL,-5.782256879772661,1,0,0,29 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 2298,"How many of the employees have the last name ""Ringer"" ?",SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer',SELECT COUNT(EmployeeID) FROM Employees WHERE LastName = 'Ringer',5.573354715830862,1,0,0,26 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 2300,Which company supplies Gula Malacca?,SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gula Malacca',SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T1.ProductName = 'Gula Malacca',0.9802500311118818,5,0,0,28 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 2302,How many times was Ford Maverick introduced to the market?,SELECT COUNT(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` = 'France Maverick',-3.5245470427124976,13,0,0,30 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 2304,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,22 2305,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, T1.`Unit Price` / SUM(T2.`Unit Cost`) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`, T2 ON T2.SalesTeamID = T1._Sales TeamID WHERE T2.`Sales Team` = 'Joshua Bennett'",-2.926140257258012,1,0,0,30 2306,How many records are in the Sales Orders table?,SELECT COUNT(OrderNumber) FROM `Sales Orders`,SELECT COUNT(OrderNumber) FROM `Sales Orders`,3.9261874356305757,1,1,1,21 2307,Calculate the average age of clients from the Midwest region.,SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T3.Region) AS average 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',SELECT CAST(SUM(CASE WHEN T2.Region = 'Midwest' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id INNER JOIN state AS T3 ON Tstate_abbrev = T3.StateCode,-7.227005819802723,8,0,0,29 2308,How much lower in percentage is the unit price of Ikura in order no. 10273 than its standard unit price?,SELECT CAST((T1.UnitPrice - T2.UnitPrice) AS REAL) * 100 / T1.UnitPrice FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',"SELECT CAST(SUM(IIF(T1.UnitPrice > 10273, 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1. ProductID = T2.ProductID WHERE T2.`OrderID` = 'Ikura'",-5.029652440410347,22,0,0,30 2309,How many records in payments were recorded in 2015?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2015%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2015%',4.198241534572536,1,1,1,20 2310,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` 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 T1.`mpg Database: cars` DESC LIMIT 1,-7.34544312791853,1,0,0,30 2311,"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.S_SUPPkey INNER JOIN s_name = 'PROMO BRUSHED STEEL' WHERE T_mfgr = '5000',-1.0958126667000827,3,0,0,28 2312,"Tell the country name of the supplier for ""Scottish Longbreads"".",SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Scottish Longbreads',SELECT T3.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.ProductName = 'Scottish Longbreads',-4.5914851649208215,24,0,0,27 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 2315,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 WHERE City = 'City' GROUP BY CompanyName ORDER BY Suppliers DESC LIMIT 1,2.061495867620209,1,0,0,27 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 2317,What is the comment of the order with the highest total price?,SELECT o_comment FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders ),SELECT o_comment FROM orders ORDER BY o_totalprice DESC LIMIT 1,4.525326082948764,1,0,0,29 2318,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2017%',1.6966190930446512,4,1,1,25 2319,Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed?,SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '1/%/20' GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1,SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '%/%/20' ORDER BY `Discount Applied` DESC LIMIT 1,0.7477060618709942,1,0,0,30 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 2321,What is the county and region of Plearn-Thai Cuisine restaurant?,"SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'","SELECT city, county, region FROM geographic AS city INNER JOIN generalinfo AS label WHERE label = 'Plearn-Thai Cuisine'",1.1603965497970474,9,0,0,20 2322,"How many stores with less need for products, and purchased through a distributor, are located in Washtenaw County?",SELECT SUM(CASE WHEN T1.`Order Quantity` = 1 AND T1.`Sales Channel` = 'Distributor' AND T2.County = 'Washtenaw County' 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` = 'Washtenaw County' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T2.StoreID = T1._StoreID,1.2956035114652695,2,0,0,28 2323,"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.11811723323674184,4,0,0,28 2324,How many people records have matching records in central_superstore?,SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Product ID`,3.3613721366475766,6,0,0,28 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 2326,List the distinct values of Address in the Suppliers table.,SELECT DISTINCT Address FROM Suppliers,SELECT DISTINCT Address FROM Suppliers,3.7368875748870978,1,1,1,19 2327,"In 2018, 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 '2018%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2018%',2.745452202207259,12,1,1,29 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 2330,"For each Product ID, how many records are there in central_superstore?","SELECT `Product ID`, COUNT(Order) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM central_superstore GROUP BY `Product id`",1.5921414731069579,6,1,1,26 2331,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Complaint ID`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Complaint ID`) FROM events GROUP BY client_id",-0.0766145268262662,2,1,1,22 2332,What is the average Profit for joined people and central_superstore records?,SELECT AVG(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id`,0.6086764935981326,9,1,1,29 2333,"Among the sales order shipped in July 2018, calculate the percentage of orders for home fragrances.",SELECT SUM(CASE WHEN T2.`Product Name` = 'Home Fragrances' THEN 1 ELSE 0 END) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ShipDate LIKE '7/%/18',SELECT CAST(SUM(CASE WHEN T2.`Product Name` = 'Home Fragrances' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.WarehouseCode LIKE 'July 2018%',-3.5689124905783967,3,0,0,29 2334,What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?,"SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card'","SELECT CAST(SUM(IIF(T1.city = 'New York', 1, 0)) AS REAL) / COUNT(T2.`Complaint ID`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Product` = 'Credit card' AND strftime('%Y', T1.`Date received`) > 3",-4.800946498335098,5,0,0,27 2335,"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_type = 'pink powder drab lawn cyan' AND p_size > ( SELECT MAX(p_size) FROM part ),3.253223336679849,1,0,0,30 2336,What is the average price before discount of the top 10 orders with the highest total price?,SELECT SUM(T2.l_extendedprice) / 10 FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 10,"SELECT CAST(SUM(IIF(T1.o_totalprice = 10, 1, 0)) AS REAL) / 10 FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.l_orderkey ORDER BY T2.`l_extendedprice` DESC LIMIT 10",-2.409658650110379,3,0,0,29 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 2338,What is the difference in the number of employees from the UK and the USA who work as sales representatives?,SELECT ( SELECT COUNT(Title) FROM Employees WHERE Country = 'UK' AND Title = 'Sales Representative' ) - ( SELECT COUNT(Title) FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative' ) AS DIFFERENCE,SELECT DIFFERENCE FROM Employees WHERE Country = 'USA' AND Title = 'Sales Representative',1.805121016343523,1,0,0,27 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 2340,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(CASE WHEN ShipVia = 'Federal Shipping' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(CompanyName) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShippedDate = T2.ShipperID,-1.2504706349410633,9,0,0,30 2341,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 COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'marin county',-1.1237191275798606,7,0,0,20 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 2343,From which city and state does the customer that bought the product with the highest sales?,"SELECT T5.City, T5.State 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 people AS T5 ON T5.`Customer ID` = T4.`Customer ID` ORDER BY T2.Sales DESC LIMIT 1","SELECT T2.`Customer City`, T2.State FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Customer ID Database: superstore`, T3.`Customer State` = 'Sales' ORDER BY T1.Sales DESC LIMIT 1",-4.980712923801667,1,0,0,29 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 2345,"Among the products with an order quantity of no less than 5 that was shipped in the month of May 2019, what is the name of the product with the lowest net profit?","SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` > 5 AND ShipDate LIKE '5/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') ASC LIMIT 1",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` = 5 AND T1.WarehouseCode = 'May 2019',1.324771663252039,7,0,0,30 2346,"Among the sales ID ranges from 1 to 200, what is the percentage of the products with a price ranging from 200 to 300?","SELECT CAST(SUM(IIF(T2.Price BETWEEN 200 AND 300, 1, 0)) AS REAL) * 100 / COUNT(T2.Price) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SalesID BETWEEN 1 AND 200",SELECT CAST(SUM(CASE WHEN T2.Price BETWEEN 200 AND 300 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID`,-1.3835952502279514,2,0,0,29 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 2349,State top 3 emails of UK Sales Rep who have the highest credit limit.,"SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3",SELECT email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'UK Sales Rep' ORDER BY creditLimit DESC LIMIT 3,3.9118029337011975,2,0,0,30 2350,What is the average price of products with more than fifty units in stock?,SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50,SELECT AVG(UnitPrice) FROM Products WHERE UnitsInStock > 50,2.4703571839203984,1,0,0,30 2351,"Among the sales with 40% discount via in-store channel, how many products were shipped from warehouse code of WARE-NMK1003?",SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN `Sales Channel` = 'In-Store' AND WarehouseCode = 'WARE-NMK1003' AND `Discount Applied` = '0.4' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT COUNT(DISTINCT T) FROM `Sales Orders` WHERE `Discount Applied` = 40 AND WarehouseCode = 'WARE-NMK1003',-1.3002342604745063,3,0,0,30 2352,What is the average sales for each categories?,SELECT AVG(ProductSales) FROM `Sales by Category` GROUP BY CategoryName,SELECT AVG(Sales) FROM `Sales by Category` GROUP BY Category,3.444922758284864,1,0,0,29 2353,"Calculate the percentage of order via in-store channel of customer ""Medline"".",SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._CustomerID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medline ',"SELECT CAST(SUM(IIF(T2.`Customer Names`, ',', '')) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'In-Store'",-0.6901660678477204,8,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 2355,"In complaints about the credit card product, list the phone number of the oldest client.",SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1,SELECT MIN(T1.phone) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Product` = 'Credit card',-2.818118474932671,17,0,0,29 2356,How many clients under the age of 35 gave Eagle National Mortgage 1 star?,SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35,SELECT COUNT(*) FROM client WHERE T1.Product = 'Eagle National Mortgage' AND T2.age > 35,-3.311576349704645,2,0,0,29 2357,How many orders has Aimee Bixby made?,SELECT COUNT(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',SELECT SUM(CASE WHEN T2.`Customer Name` = 'Aimee Bixby' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.Customer ID,-1.8144935161679259,8,0,0,30 2358,List the name of the top ten items with the most quantity available in the descending order of availability.,SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey ORDER BY T2.ps_availqty DESC LIMIT 10,SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2.ps_partkey ORDER BY T2.`quantity` DESC LIMIT 10,-1.400375040345265,6,0,0,28 2359,What is the most common product ordered by a customer from Germany?,SELECT T2.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Country = 'Germany' GROUP BY T2.ProductID ORDER BY COUNT(T2.ProductID) DESC LIMIT 1,SELECT T3.ProductID FROM Customers AS T1 INNER JOIN `Order Details` AS T2 ON T1.Country = T2.Country WHERE T2.`Customer` = 'Germany',-0.7733015708914384,7,0,0,24 2360,Identify by their ID all clients who did not give their consent permission.,SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'N/A' OR 'Consumer consent provided?' IS NULL OR 'Consumer consent provided?' = '',SELECT Client_ID FROM events WHERE `Consumer consent provided?` = 'No',1.5395551805609882,1,0,0,25 2361,"What is the full address of the customers who, having received a timely response from the company, have dispute about that response?","SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes'","SELECT address_1, address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes'",0.480169249071505,1,0,0,30 2362,What is the name of the corporate customer from Rhode Island who had the highest number of orders in 2016 from the east superstore?,"SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Segment = 'Corporate' AND T2.State = 'Rhode Island' AND T2.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2016' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1",SELECT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.Region = 'Rhode Island' AND T1.Order Date = '2016' ORDER BY T3.Segment DESC LIMIT 1,-1.0338417263794661,7,0,0,28 2363,Which country are the majority of the suppliers located?,SELECT Country FROM Suppliers GROUP BY Country ORDER BY COUNT(SupplierID) DESC LIMIT 1,SELECT Country FROM Suppliers GROUP BY Country ORDER BY COUNT(SupplierID) DESC LIMIT 1,2.4079194889845303,2,1,1,28 2364,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 T3.`Consumer consent provided?` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2016-10-28',-4.59793206163293,20,0,0,30 2365,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,0.6120910190860873,2,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 2367,What is the county and region of Plearn-Thai Cuisine restaurant?,"SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'","SELECT city, county, region FROM geographic AS city INNER JOIN generalinfo AS label WHERE label = 'Plearn-Thai Cuisine'",1.618466431441597,3,0,0,18 2368,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.SalesAmount) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.Name = 'Reflector',-1.637266772276595,1,0,0,29 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 2370,What are the products that belong to the beverage category?,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Beverages',"SELECT CAST(SUM(IIF(T1.CategoryName = 'Beverages', 1, 0)) AS REAL) * 100 / COUNT(T2.ProductName) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1. CategoryID = T2.CategoryID",1.3674834584170124,8,0,0,26 2371,How many states located in the Midwest region?,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN StateCode ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN State ELSE NULL END AS T FROM Regions ),-1.5843493121926093,7,0,0,29 2372,How many complaints are not in process with an agent?,SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT',SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT',2.755814447484841,1,1,1,16 2373,"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(`Quantity Database: superstore`) FROM south_superstore WHERE `Customer Name` = 'Cindy Stewart' AND `Lexmark X 9575 Professional All-in-One Color Printer` != 'No',-7.264194884266614,3,0,0,30 2374,How many territories are there in the region with the highest number of territories?,"SELECT COUNT(T2.RegionDescription), T1.TerritoryDescription, COUNT(*) AS num FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T1.TerritoryDescription ORDER BY num DESC LIMIT 1",SELECT MAX(T1.TerritoryDescription) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2. RegionID ORDER BY COUNT(*) DESC LIMIT 1,3.1559046753324314,6,0,0,29 2375,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` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` IS NOT NULL,-4.1107973674189315,20,0,0,26 2376,"List down the customer names and product names of the order made by ""Anthony Torres"" via distributor channel.","SELECT DISTINCT T1.`Customer Names`, T4.`Product Name` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products AS T4 ON T4.ProductID = T2._ProductID WHERE T3.`Sales Team` = 'Anthony Torres' AND T2.`Sales Channel` = 'Distributor'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'Anthony Torres' 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,-2.9748638138694043,8,0,0,24 2377,What is the phone number for the employee in charge of the Portsmouth territory?,SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Portsmouth',"SELECT CAST(SUM(IIF(T2.TerritoryDescription = 'Portsmouth', 1, 0)) AS REAL) * 100 / COUNT(T1.HomePhone) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",-0.6152311444649506,1,0,0,28 2378,What is the shipment duration for order number CA-2011-134103?,"SELECT DISTINCT strftime('%J', `Ship Date`) - strftime('%J', `Order Date`) AS duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103'",SELECT DISTINCT duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103',1.198609427284135,2,0,0,27 2379,How many customers are in debt?,SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0,SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0,4.022997268207655,1,1,1,28 2380,State the company name of all suppliers in USA.,SELECT CompanyName FROM Suppliers WHERE Country = 'USA',SELECT CompanyName FROM Suppliers WHERE Country = 'USA',3.7001976283531595,1,1,1,23 2381,"Among the customers in Asia, how many customers are in debt?",SELECT COUNT(T1.n_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_acctbal < 0 AND T3.r_name = 'ASIA',"SELECT COUNT(IIF(T2.r_name = 'ASIA', 1, 0)) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2._custkey INNER JOIN region AS T3 ON T2.c_regionkey = ASIA_R_REGIONkey WHERE T3.mktsegment = 'DEBT'",-2.933332162717991,9,0,0,27 2382,"For Which order was the most profitable, please list the customer name of the order and the profit of the order.","SELECT t3.customerName, (t1.priceEach - t4.buyPrice) * 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 INNER JOIN products AS t4 ON t1.productCode = t4.productCode GROUP BY t3.customerName, t1.priceEach, t4.buyPrice, t1.quantityOrdered ORDER BY (t1.priceEach - t4.buyPrice) * t1.quantityOrdered DESC LIMIT 1","SELECT customerName, priceEach FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1",3.0528153145880133,1,0,0,29 2383,"Among the orders in Central superstore, which art product were ordered the most?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' GROUP BY T2.`Product Name` ORDER BY COUNT(T2.`Product ID`) DESC LIMIT 1,SELECT SUM(CASE WHEN T2.`Product Name` = 'Art' THEN 1 ELSE 0 END) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2` Product ID`,-1.4251317133819128,7,0,0,26 2384,List all the products that were shipped to Starenweg 5.,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.ShipAddress = 'Starenweg 5' GROUP BY T3.ProductName,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = 2 WHERE T1.`ShipAddress Database: retail_world` = 'Starenweg 5' AND T2.`OrderID` = 2,-5.447173664415911,21,0,0,30 2385,Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.,"SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1","SELECT ProductID, Name FROM Products ORDER BY Price DESC LIMIT 1",3.2959686530098136,1,0,0,27 2386,What is the country location of the employee who handled order id 10257?,SELECT T1.Country FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257,SELECT CASE WHEN T2.OrderID = 10257 THEN 'USA' END FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,-1.062725003760567,15,0,0,30 2387,Which county in northern California has the highest number of cities?,SELECT county FROM geographic WHERE region = 'northern california' GROUP BY county ORDER BY COUNT(city) DESC LIMIT 1,SELECT county FROM geographic WHERE region = 'northern california' ORDER BY city DESC LIMIT 1,5.290913095014493,1,0,0,23 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 2390,What is the average number of territories do each sales representative is in charge of?,SELECT CAST(COUNT(T2.TerritoryID) AS REAL) / COUNT(DISTINCT T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative',"SELECT CAST(SUM(IIF(T1.Title = 'Sales Representative', 1, 0)) AS REAL) / COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",3.7671748558707163,1,0,0,23 2391,To whom does the employee have to inform that is the sales representative of the French customer?,SELECT T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.country = 'France',SELECT T3.customerName FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE T2.`country` = 'France',1.7318477391626361,5,0,0,28 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 2393,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 t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2._orderNumber INNER JOIN products AS t3 ON t2.productCode = t3._productCode WHERE t3.customerNumber = '114',-4.903878150221658,3,0,0,29 2394,How many line items were returned in 1998?,"SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'TRUCK'","SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'",1.1032735616331442,1,0,0,27 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 2396,Provide the supplier company name in Sydney and its homepage address if available.,"SELECT CompanyName, HomePage FROM Suppliers WHERE City = 'Sydney'","SELECT CompanyName, HomePage FROM Suppliers WHERE City = 'Sydney'",3.5537425855537075,1,1,1,20 2397,List by its ID number all restaurants on 11th Street in Oakland.,SELECT id_restaurant FROM location WHERE city = 'oakland' AND street_name = '11th street',SELECT id_restaurant FROM location WHERE city = 'oakland' AND street_name = '11th street',2.759760527928745,9,1,1,17 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 2400,"Among all the customers in Germany, how many of them have an account balance of over 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 = 'GERMANY' AND T1.c_acctbal > 1000,SELECT COUNT(c_custkey) FROM customer AS c INNER JOIN nation AS n_nationkey WHERE n_name = 'GERMANY' AND c_acctbal < 1000,4.939721981786777,1,0,0,30 2401,Calculate the average amount of payments made by customers during the first half of 2004.,SELECT AVG(amount) FROM payments WHERE paymentDate BETWEEN '2004-01-01' AND '2004-06-30',SELECT CAST(SUM(CASE WHEN amount > 2004 THEN 1 ELSE 0 END) AS REAL) / COUNT(customerNumber) FROM payments,1.1534013405854509,1,0,0,28 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 2403,"Describe the product names delivered in 2021 for the customer ""Sundial"".",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.DeliveryDate LIKE '%/%/21' AND T1.`Customer Names` = 'Sundial ' THEN T3.`Product Name` END 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 IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'Sundial' THEN T1.`Customer Names` ELSE NULL END 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 IS NOT NULL,-3.4628228708981537,3,0,0,28 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 2406,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 T2.City = 'San Francisco' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID Database: retail_world`,-5.531279473000018,1,0,0,30 2407,Calculate the percentage of shipping done through Speedy Express.,SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID,"SELECT CAST(SUM(IIF(T2.CompanyName = 'Speedy Express', 1, 0)) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID",0.24169238611923763,10,0,0,28 2408,Please list the phone numbers of all the customers in the household segment and are in Brazil.,SELECT T1.c_phone 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 = 'BRAZIL',SELECT c_phone FROM customer AS c_custkey INNER JOIN nation AS nation WHERE n_name = 'HOUSEHOLD' AND c_mktsegment = 'BRAZIL',4.236791962729718,1,0,0,22 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 2410,What are the names of Robert King's territories?,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.LastName = 'King' AND T1.FirstName = 'Robert',"SELECT DISTINCT T2.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Female`, T3.TerritoryID AS T4 WHERE T4.`TerritoryDescription` = 'Robert King'",-7.373844848438087,3,0,0,26 2411,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 = 'adelitas taqueria' AND T3.label = 'Adelitas Taqueria '",-6.397514465540302,26,0,0,28 2412,Which product did Phillina Ober buy?,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` = 'Phillina Ober',"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Phillina Ober'",0.1764592514961489,1,0,0,26 2413,"Find the total production amount and product names which had ""10 - 500 g pkgs."" as quantity per unit.","SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'","SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'",1.4780055991639327,1,1,1,25 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 2415,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(SUM(IIF(T2.n_name = 'AUTOMOBILE', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2.N_Nationkey WHERE T1.`c_mktsegment` = 'FRANCE'",0.1066942792064658,1,0,0,10 2416,Which region does territory id 2116 belong to?,SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryID = 2116,SELECT T3.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.`RegionID` WHERE T2.TerritoryID = 2116,-4.264999372127655,24,0,0,30 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 2418,How many restaurants are on Irving Street?,SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving',SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'irving',2.203965808740351,1,1,1,26 2419,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',1.8383903946726687,1,0,0,29 2420,"For the product No. S18_3482 in the Order No.10108, how much discount did the customer have?",SELECT (t1.MSRP - t2.priceEach) / t1.MSRP FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productCode = 'S18_3482' AND t2.orderNumber = '10108',SELECT MAX(quantityOrdered) FROM products WHERE productCode = 'S18_3482' AND orderNumber = 10108,4.138767923323765,1,0,0,28 2421,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 T2.`Sales Team` = 'Net Profit' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team`.SalesTeamID ) WHERE T IS NOT NULL,-0.8457057450012554,2,0,0,27 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 2423,What are the top 5 nations of suppliers with the lowest account balance?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_acctbal LIMIT 1,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'suppliers' LIMIT 5,0.5457128063386367,1,0,0,29 2424,Identify the names of the top 3 customers with the highest number of orders of all time and calculate for the average total price per order of each customers.,"SELECT T.c_name, T.res FROM ( SELECT T2.c_name, SUM(T1.o_totalprice) / COUNT(T1.o_orderkey) AS res , COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 3","SELECT T2.c_name, CAST(SUM(IIF(T1.o_orderdate = '3-01-01', 1, 0)) AS REAL) / 3, SUM(T2.s_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1. o_custkey = T2._custkeys",-6.017964602801858,3,0,0,30 2425,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.6552483171236778,7,0,0,29 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 2427,What is the full name of the employee in charge of the Southern region who is to report to Andrew Fuller?,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Southern' AND T1.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' )","SELECT DISTINCT T2.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`TerritoryID Database: retail_world` INNER JOIN Region AS T3 WHERE T3.RegionDescription = 'Southern' AND T1 . ReportsTo = 'Andrew'",-6.512946199277063,3,0,0,29 2428,What is the city located in Bay Area of Santa Clara?,SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county',SELECT city FROM geographic WHERE county = 'santa clara',0.9695881009881603,1,0,0,20 2429,How many employees in the UK takes charge of the sales in over 4 territories?,SELECT COUNT(COUNTEID) FROM ( SELECT T1.EmployeeID AS COUNTEID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Country = 'UK' GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4 ) T1,SELECT COUNT(*) FROM ( SELECT COUNT(EmployeeID) FROM Employees WHERE Country = 'UK' AND TerritoryID < 4 ),0.46928025549351127,2,0,0,28 2430,Calculate the total quantity ordered for 18th Century Vintage Horse Carriage and the average price.,"SELECT SUM(T2.quantityOrdered) , SUM(T2.quantityOrdered * T2.priceEach) / SUM(T2.quantityOrdered) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productName = '18th Century Vintage Horse Carriage'",SELECT SUM(T2.quantityOrdered) / COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2._productCode WHERE T2.orderNumber = '18th Century Vintage Horse Carriage',-2.4700779408176734,1,0,0,26 2431,What is the family name of the employee who shipped the order 10521 to CACTU?,SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10521 AND T2.CustomerID = 'CACTU',SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderID = 10521,-3.84609947737861,2,0,0,30 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 2433,"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 T5.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS',-0.5678459970816717,6,0,0,26 2434,What is the oldest age of male clients?,SELECT MAX(age) FROM client WHERE sex = 'Male',SELECT MAX(age) FROM client WHERE sex = 'Male',4.226653647370264,1,1,1,21 2435,Indicate the name of the customers who have placed an order of 3 units in February 2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Order Quantity` = 3 AND T2.OrderDate LIKE '2/%/18' 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,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.OrderNumber = 3 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,0.7697712142397845,2,0,0,23 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 2438,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 ProductID ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products,3.3819745106139525,1,0,0,29 2439,"Of all the classic cars, with a product scale of 1:18, which product is the most ordered product by customers?",SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productScale = '1:18' AND T1.productLine = 'Classic Cars' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1,SELECT productName FROM products WHERE productLine = 'Classic Cars' AND productScale = '1:18' GROUP BY productName ORDER BY quantityOrdered DESC LIMIT 1,4.2039782062075846,1,0,0,29 2440,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 CASE WHEN T2.street_name = 'san francisco' AND T1.id_restaurant = 1.7 THEN 1 ELSE 0 END,-5.151561401182371,10,0,0,26 2441,How many of the complaints are longer than 15 minutes?,"SELECT COUNT(ser_time) FROM callcenterlogs WHERE strftime('%M', ser_time) > '15'",SELECT COUNT(ser_time) FROM callcenterlogs WHERE ser_time > 15,3.075796639809661,1,0,0,30 2442,What is the first name of employee who handled sales for customer called Abigail?,SELECT DISTINCT T3.FirstName 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 T1.FirstName = 'Abigail',SELECT T4.FirstName 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 T3.SalesID = 'Abigail',-4.286453131549003,1,0,0,19 2443,How much is the total amount of sales handled by Heather McBadden?,SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Heather' AND T1.LastName = 'McBadden',SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 WHERE T3.Name = 'Heather McBadden',4.416472304122998,1,0,0,30 2444,"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_INSUFFICIENT_DISCOUNTER IN (1, 2, 3, 4, 5, 6, 7, 0) AS T ORDER BY T_discount DESC LIMIT 1",-3.892374604374059,2,0,0,28 2445,Provide the category name of the Chef Anton's Gumbo Mix product that New Orleans Cajun Delights company has.,SELECT T3.CategoryName 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 T1.CompanyName = 'New Orleans Cajun Delights' AND T2.ProductName LIKE 'Chef Anton%s Gumbo Mix',SELECT T2.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` INNER JOIN Categories AS T3 WHERE T3.CategoryID = 'New Orleans Cajun Delights' AND T4.ProductName = 'Chef Anton's Gumbo Mix',-6.469102051076055,1,0,0,27 2446,Name all products supplied by Zaanse Snoepfabriek.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Zaanse Snoepfabriek',SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Zaanse Snoepfabriek',-5.723164465219303,1,0,0,25 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 2448,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,23 2449,"How much higher in percentage is the highest supply cost of the part ""hot spring dodger dim light"" than the lowest supply cost?",SELECT CAST((MAX(T1.ps_supplycost) - MIN(T1.ps_supplycost)) AS REAL) * 100 / MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.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_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1. ps_suppkey = T2.s_supponpkey INNER JOIN part AS T3 ON T3.k_partkey = t1._partkey ORDER BY T3.`p_size` DESC LIMIT 1",-4.516938301596532,2,0,0,30 2450,List the product's name bought by the customer named Bill Shonely from 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` = 'Bill Shonely' AND T2.Region = 'Central',SELECT DISTINCT T2.`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`='Product ID' AND T3.Region = 'Central',0.35789672555240776,6,0,0,28 2451,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.7202105246210058,2,0,0,29 2452,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 T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` ORDER BY T2.ReorderLevel DESC LIMIT 8,-6.711317726182812,1,0,0,27 2453,List priority 2 complaints by date received.,SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC,SELECT DISTINCT `Complaint ID` FROM callcenterlogs WHERE priority = 2 ORDER BY `Date received` DESC,1.2086012166215079,4,1,1,26 2454,What percentage of streets named 11th Street are in Alameda County?,"SELECT CAST(SUM(IIF(T1.street_name = '11th st', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.County = 'alameda county'","SELECT CAST(SUM(IIF(T2.county = 'Alameda County', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1._street_name = '11th Street'",-1.387000460526781,16,0,0,16 2455,What is the amount of discount applied to the product with the highest net profit and what is the name of the said product?,"SELECT T1.`Unit Price` * T1.`Discount Applied`, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Order Quantity` = ( SELECT MAX(Discount Applied) FROM Products ),0.1566913602080813,3,0,0,30 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 2457,"Among the orders placed by Ei, how many orders have quantity greater than 4?",SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei ' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,SELECT SUM(CASE WHEN T1.`Order Quantity` > 4 AND T2.`Customer Names` = 'Ei' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,1.5253751966558504,2,0,0,30 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 2460,How many employees have Andrew Fuller as their direct supervisor?,SELECT COUNT(EmployeeID) FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ),"SELECT COUNT(ReportsTo) FROM ( SELECT FirstName, LastName FROM Employees WHERE ReportsTo = 'Andrew' AND FirstName = 'Fuller' )",1.3971011608461499,2,0,0,30 2461,Please calculate the number of clients by each division.,"SELECT T2.division, COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division",SELECT CAST(COUNT(CASE WHEN T2.division = 'Client' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.`district_id Database: retail_complains`) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.' DistrictId,-8.327331030527438,2,0,0,21 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 2463,List the names of customers whose accounts are in debt.,SELECT c_name FROM customer WHERE c_acctbal < 0,SELECT c_name FROM customer WHERE c_acctbal < 0,3.865977647452437,1,1,1,30 2464,Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803',"SELECT T.c_name FROM ( SELECT IIF(T1.o_clerk = 'Clerk#000000803', 1, 0)) AS T ASC LIMIT 1",-2.5805741494587418,1,0,0,28 2465,What is the email id of clients whose calls were hung?,SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG',SELECT T3.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG',2.1410472197364294,1,0,0,30 2466,How many complaints from customers with a gmail.com email were received by the company in February 2017?,SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE (T2.`Date received` LIKE '2017-02%' OR T2.`Date received` LIKE '2017-01%') AND T1.email LIKE '%@gmail.com',SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.Date received = '2017-01-01',-0.7237698836895954,6,0,0,30 2467,What is the average price of cars with 8 cylinders?,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8,"SELECT CAST(SUM(IIF(T1.cylinders = 8, 1, 0)) AS REAL) / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",3.7233179784668464,1,0,0,30 2468,List the car's name with a price worth greater than 85% of the average price of all cars.,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price * 100 > ( SELECT AVG(price) * 85 FROM price ),SELECT t3.car_name FROM data AS t1 INNER JOIN price AS t2 ON t1.ID = t2.ID WHERE T2.price * 100 > ( SELECT AVG(price) FROM price ),-3.156100018740341,1,0,0,29 2469,What is the amount of customers of 1957 Chevy Pickup by customers in a month?,SELECT COUNT(T2.customerNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.productCode IN ( SELECT productCode FROM products WHERE productName = '1957 Chevy Pickup' ),SELECT SUM(t.quantityOrdered * t.priceEach) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderLineNumber INNER JOIN products AS t3 ON t3.productCode = t1 .productCode INNER JOIN productlines AS t4 WHERE t4.productLine = '1957 Chevy Pickup' AND t5.customerNumber = '12',-3.360048008108094,3,0,0,30 2470,Calculate percentage of household segment in Indonesia.,"SELECT CAST(SUM(IIF(T1.c_mktsegment = 'HOUSEHOLD', 1, 0)) AS REAL) * 100 / COUNT(T1.c_mktsegment) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'INDONESIA'","SELECT CAST(SUM(IIF(T2.n_name = 'INDONESIA', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2._natekey WHERE T1.`c_mktsegment` = 'HOUSEHOLD'",0.1066942792064658,1,0,0,27 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 2472,How many cars in the database are originated from Europe?,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Europe',SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.`country` = 'Europe',-4.287098663514847,19,0,0,28 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 2474,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 addressLine1, addressLine2 FROM offices AS offices INNER JOIN employees AS employees WHERE officeCode = 'foon Yue' AND lastName = 'Tseng'",1.589190608333514,3,0,0,23 2475,"Which region is ""Columbia"" in?",SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia',SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 WHERE T1.TerritoryDescription = 'Columbia',1.075961125066579,4,0,0,27 2476,How many furniture products had been shipped by standard class in the East superstore?,SELECT COUNT(T2.Category) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class',SELECT SUM(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1`Product ID = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class',-2.711698823369344,3,0,0,21 2477,How much is the Peugeot 505s Turbo Diesel?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'peugeot 505s turbo diesel',"SELECT CAST(SUM(IIF(T1.car_name = 'Peugeot 505s Turbo Diesel', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",2.799059887956628,3,0,0,21 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 2479,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 average FROM customer ) AS T3 WHERE T3.r_regionkey = 'INDIA'",-4.747137724926646,2,0,0,24 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 2481,"Among the product lists in order ID 10337, write down the product names and suppliers which had the highest in reorder level.","SELECT T2.ProductName, T1.CompanyName 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 T3.OrderID = 10337 ORDER BY T2.ReorderLevel DESC LIMIT 1","SELECT T3.ProductName, T4.OrderID FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` WHERE T2.ProductID = 10337 ORDER BY T1.`CompanyName` DESC LIMIT 1",-4.8105112299612856,1,0,0,30 2482,What is the shipping company for order number 10558?,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10558,SELECT T4.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.`ShipperID` WHERE T2.OrderID = 10558,-1.1096680127529768,6,0,0,30 2483,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 T4.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T3.price DESC LIMIT 1,-3.9974973021347626,1,0,0,30 2484,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, Region FROM Customers WHERE CompanyName = 'Island Trading'",1.0006307994641381,1,0,0,30 2485,How many kinds of items are returned in order no.5?,SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R',SELECT COUNT(l_linenumber) FROM lineitem WHERE l_orderkey = 5 AND l_returnflag = 'R',3.4441519470337862,2,1,1,26 2486,"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 T3.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.`district_id Database: retail_complains` = T2.district_ID WHERE T1.Date BETWEEN '2016%' AND '2016',-6.727130547144796,25,0,0,30 2487,"Among the customers from Morocco, how many customers were in debt?",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 T2.n_name = 'MOROCCO',"SELECT COUNT(IIF(T2.n_name = 'MOROCCO', 1, 0)) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.N_Nationkey INNER JOIN ( SELECT AVG(c_acctbal) FROM customer )",-1.9939511380606667,22,0,0,22 2488,Calculate the total number of orders placed by the company 'GROSELLA-Restaurante'.,SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante',SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante',-1.4700067969816633,2,0,0,28 2489,Which detailed product did Mr Lennox Oliver Drake complain about?,SELECT DISTINCT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lennox' AND T1.middle = 'Oliver' AND T1.last = 'Drake' AND T1.sex = 'Male',SELECT T1.`Drake` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = 'Lennox Oliver Drake',-1.2529134858224145,3,0,0,28 2490,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 2491,List the full names and phone numbers of clients that were from the Pacific.,"SELECT T1.first, T1.middle, T1.last, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific'","SELECT first, middle, last, phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.division = 'Pacific'",3.2877445118590702,1,0,0,25 2492,Write down all of the product ids that were placed by Meander.,SELECT DISTINCT T2.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.FirstName = 'Meander',SELECT DISTINCT T3.ProductID FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T1.`FirstName` = 'Meander',1.5654851522041353,1,0,0,30 2493,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,25 2494,"Tell the country name of the supplier for ""Scottish Longbreads"".",SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Scottish Longbreads',SELECT T3.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID WHERE T1.`ProductName` = 'Scottish Longbreads',-2.8673875443344374,19,0,0,28 2495,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,25 2496,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 Ship LIKE '2016%'",-0.1769181784239644,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 2498,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 2499,How many online purchases did Ole Group make in May 2019?,SELECT SUM(CASE WHEN T1.`Sales Channel` = 'Online' AND T2.`Customer Names` = 'Ole Group' AND T1.OrderDate LIKE '5/%/19' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,SELECT SUM(CASE WHEN T2.`Customer Names` = 'Online Purchases' AND T1.WarehouseCode = 'May 2019' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID,1.6528433606771202,3,0,0,23 2500,List down the restaurant ID of restaurants located in Sunnyvale.,SELECT id_restaurant FROM location WHERE city = 'sunnyvale',SELECT id_restaurant FROM location WHERE city = 'sunnyvale',3.734807551953072,1,1,1,24 2501,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.2483607805353145,29,0,0,29 2502,How many products were ordered in the order with the highest freight?,SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1,SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID,-7.538495891607772,25,0,0,28 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 2504,"Among the customers from Chicago, Illinois, what is the highest quantity of products bought in a single order?",SELECT T1.Quantity 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 people AS T5 ON T5.`Customer ID` = T4.`Customer ID` WHERE T5.City = 'Chicago' AND T5.State = 'Illinois' ORDER BY T1.Quantity DESC LIMIT 1,SELECT MAX(T1.`Quantity Database: superstore`) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.`Customer `ID` = T2.`Customer ID` INNER JOIN central_superstores AS T3 ON T3.`CustomerID`='Customer ID' AND T3.City = 'Chicago' ORDER BY T1.Quantity DESC LIMIT 1,-8.728208410197505,17,0,0,30 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 2506,State the first name of male clients who did not receive timely response from the call center.,SELECT T1.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.sex = 'Male',SELECT T3.first FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No',2.1674986876009976,1,0,0,30 2507,How many complaints have the client Diesel Galloway filed?,SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`galloway filed` = 'false',-1.307254707078441,5,0,0,18 2508,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(T1.l_suppkey = 7414, 1, 0)) AS REAL) * 100 / COUNT(T2.ps_partkey) FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.lapkey = T2.lappkey WHERE T1.`l_orderkey` = 817154",0.10686737361596772,1,0,0,30 2509,Calculate the average payment per product under confections category.,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T3.CategoryName = 'Confections',SELECT CAST(SUM(CASE WHEN T2.CategoryName = 'Confections' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2 . CategoryID,3.4519058418729043,1,0,0,29 2510,How many orders through distributor were for the minimum quantity?,SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`,SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`,2.2324087328032856,2,1,1,29 2511,How many employees who are living in Australia and have the credit limit under 200000? State their email address and countries where they are working.,"SELECT T2.email, T3.country FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber INNER JOIN offices AS T3 ON T2.officeCode = T3.officeCode WHERE T3.country = 'Australia' AND T1.creditLimit < 200000 AND T2.jobTitle = 'Sales Rep'",SELECT COUNT(employeeNumber) FROM customers AS customers INNER JOIN employees AS offices ON employeeNumber = officeCode WHERE country = 'Australia' AND creditLimit > 200000,2.872571995117565,1,0,0,30 2512,"Provide Speedy Express's phone number and number of shipped orders on 30th January, 1998.","SELECT T2.Phone, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express' AND T1.ShippedDate LIKE '1998-01-30%' GROUP BY T2.Phone","SELECT T3.Phone, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`ShippedDate Database: retail_world` BETWEEN 30th January, 1998 AND 30th",-7.59318489643991,26,0,0,28 2513,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 officeCode, firstName, lastName FROM employees AS employeeNumber INNER JOIN offices AS offices WHERE city = 'New York City'",-1.5959827427439732,3,0,0,28 2514,State the full name of clients with server time of 20 minutes and above.,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE strftime('%M', T2.ser_time) > '20'",SELECT T3.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server_time > 20,0.16947126098043352,20,0,0,29 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 2516,"In the West, how many stores are there in the city whose land area is below 20,000,000?",SELECT SUM(CASE WHEN T1.Region = 'West' AND T2.`Land Area` < 20000000 THEN 1 ELSE 0 END) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode,SELECT COUNT(T2.StoreID) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1._StateCode WHERE T1.`Land Area` < 20 AND T2.`City Name` = 'West',-0.9521188917020869,5,0,0,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 2518,Which region is Joshua Bennet located in?,SELECT T FROM ( SELECT DISTINCT CASE WHEN `Sales Team` = 'Joshua Bennett' THEN Region ELSE NULL END AS T FROM `Sales Team` ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN Region = 'Joshua Bennet' THEN Region ELSE NULL END AS T FROM `Sales Team` ) WHERE T IS NOT NULL,1.5099844652454115,1,0,0,29 2519,How many product ids have the lowest price?,SELECT COUNT(DISTINCT ProductID) FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products ),SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 1,0.2944230199345146,1,0,0,30 2520,What is the delivery time and the clerk of order number 6?,"SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate), T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderkey = 6","SELECT JULIANDAY(T2.l_receiptdate), T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2._l_orderkey WHERE T2.numORDER = 6",-2.4045549359884526,9,0,0,26 2521,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', 1, 0)) AS REAL) * 100 / SUM(T2.UnitPrice) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID WHERE T2.`CompanyName` = 'Mayumi'",-2.357976895961578,1,0,0,30 2522,"Among the parts that are returned, how many of them are provided by a supplier in debt?",SELECT COUNT(T1.l_partkey) FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_returnflag = 'R' AND T2.s_acctbal < 0,SELECT COUNT(l_linenumber) FROM lineitem AS l_returnflag INNER JOIN supplier AS s_suppkey WHERE s_acctbal < 0 AND s_name = 'DEBT',0.38877541901043555,1,0,0,30 2523,"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 T1.CompanyName, T1.`CustomerID Database: retail_world` FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1._CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T3.OrderID = 1",-7.307253580752854,21,0,0,26 2524,What is the percentage of male clients complaining about their credit cards?,SELECT CAST(SUM(CASE WHEN T1.sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card',"SELECT CAST(SUM(IIF(T2.Product = 'Male', 1, 0)) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID",1.027353975716933,3,0,0,30 2525,Name products and their quantity ordered by the company 'GROSELLA-Restaurante' in the sales order that was processed by Nancy Davolio.,"SELECT T4.ProductName, T3.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID INNER JOIN Customers AS T5 ON T2.CustomerID = T5.CustomerID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T5.CompanyName = 'GROSELLA-Restaurante'","SELECT DISTINCT T3.ProductName, T2.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.`EmployeeID` = T2.`OrderID Database: retail_world` INNER JOIN Products AS T3 ON T4.ProductID = T3.`ProductID` WHERE T1.LastName = 'Nancy Davolio' AND T5.OrderID = 1",-7.497226237980518,27,0,0,28 2526,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 COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id WHERE T1.ser_start = '3 pm' AND T2.`Timely response?` = 'No',-2.6147003409247236,17,0,0,20 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 2528,"Name the sales person who helped Elizabeth A. White to purchase Road-250 Black, 48.","SELECT DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID INNER JOIN Customers AS T4 ON T2.CustomerID = T4.CustomerID WHERE T4.MiddleInitial = 'A' AND T4.LastName = 'White' AND T1.Name = 'Road-250 Black, 48' AND T4.FirstName = 'Elizabeth'","SELECT DISTINCT T2.`SalesPerson` FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Employees AS T3 ON T2.MiddleInitial = T3._MiddleInitial INNER JOIN Customers AS T4 ON T3.CustomerID = 4 AND T4.LastName = 'Road-250 Black, 48'",-2.141492502859289,2,0,0,28 2529,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 Kingdom',1.9551214807298938,1,0,0,25 2530,Which city has the largest population?,SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1,SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1,2.508553637329441,1,1,1,30 2531,How many countries from the USA have an In Process order status?,SELECT COUNT(t2.orderNumber) FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'On Hold' AND t1.country = 'USA',SELECT COUNT(*) FROM ( SELECT customerNumber FROM customers WHERE customerName = 'USA' AND status = 'In Process' ) AS num,4.064116454292114,1,0,0,30 2532,What is the last name of the customer who placed an order for sales id 178?,SELECT T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesID = 178,SELECT LastName FROM ( SELECT DISTINCT CASE WHEN SalesPersonID = 178 THEN CustomerID ELSE NULL END AS T FROM Customers ) WHERE T IS NOT NULL,-3.9935780017483467,1,0,0,29 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 2536,"What is the supply cost for the part ""violet olive rose ivory sandy""?",SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'violet olive rose ivory sandy',"SELECT CAST(SUM(IIF(T1.p_name = 'violet olive rose ivory sandy', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2._ps_partkey",-4.348678201590497,2,0,0,10 2537,What is the contact title for the person who supplied a product that is 10 boxes x 12 pieces.,SELECT T2.ContactTitle FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.QuantityPerUnit = '10 boxes x 12 pieces',SELECT T3.ContactTitle FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.QuantityPerUnit = '10 boxes x 12 pieces',-5.343741895653909,1,0,0,30 2538,"Among the supplied products from Australia, describe the discontinued products and the category.","SELECT T2.ProductName, T3.CategoryName 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 T1.Country = 'Australia' AND T2.Discontinued = 1","SELECT T2.ProductName, T1.Discontinued FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.`SupplierID Database: retail_world` = T2.`Suppliers` INNER JOIN Categories AS T3 ON TID = T3.CategoryID WHERE T4.CategoryName = 'Australia' AND T5.Country = 'USA'",-6.378476490342696,3,0,0,30 2539,List the restaurant's ID that has a review greater than the 70% of average review of all American restaurants with street number greater than 2000.,SELECT T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'american' AND T1.street_num > 2000 GROUP BY T1.id_restaurant ORDER BY AVG(T2.review) * 0.7 DESC,"SELECT T2.id_restaurant, AVG(review) FROM location AS T1 INNER JOIN generalinfo AS T2 WHERE T1.street_num BETWEEN '2000' AND 'American'",0.6332625394162384,3,0,0,24 2540,State all the order numbers for sales team of Samuel Fowler.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Samuel Fowler' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL,SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Samuel Fowler' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,-3.4676643587357785,6,0,0,23 2541,How many orders was handled by employees who reported to employee id 5?,SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.ReportsTo = 5,SELECT COUNT(CASE WHEN T2.OrderID = 5 THEN 1 ELSE 0 END) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,2.831580448710727,7,0,0,23 2542,How many cars were released in the USA in 1981?,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'USA' AND T1.model_year = 1981,SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.`model_year Database: cars` = 'USA' AND T2.`country 1981` LIKE '1981%',-6.923924543700437,26,0,0,30 2543,Which street in San Francisco has the most burger restaurants?,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.food_type = 'burgers' GROUP BY T2.street_name ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1,SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.city = 'san francisco' AND food_type = 'burger',1.396126284961504,11,0,0,30 2544,"In which region can you find the stores located in the state whose median income is no more than 30,000?",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Median Income` < 30000 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 T2.`Median Income` > 30 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.9053863338965784,1,0,0,28 2545,List all the name of customers who have orders that are still processing.,SELECT t2.customerName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.status = 'In Process',SELECT customerName FROM orders WHERE orderNumber = 0 AND status = 'Processing',-2.2359590486611602,15,0,0,20 2546,To whom does Steve Patterson report? Please give his or her full name.,"SELECT t2.firstName, t2.lastName FROM employees AS t1 INNER JOIN employees AS t2 ON t2.employeeNumber = t1.reportsTo WHERE t1.firstName = 'Steve' AND t1.lastName = 'Patterson'","SELECT firstName, lastName FROM employees WHERE officeCode = 'Steve' AND jobTitle = 'Patterson'",2.2202932895800225,1,0,0,22 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 2548,"Which region does ""Supplier#000000129"" belong to?",SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129',"SELECT T.r_name FROM ( SELECT IIF(T1.n_name = 'Supplier#000000129', 1, 0)) AS T ORDER BY T.s_acctbal DESC LIMIT 1",-4.478907245044782,1,0,0,21 2549,List all the complaints narratives made by the customer named Brenda and last name Mayer.,SELECT T2.`Consumer complaint narrative` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Brenda' AND T1.last = 'Mayer',SELECT t2.`Consumer complaint narrative` FROM client AS t1 INNER JOIN events AS t2 ON t1.client_id = t2.Client_ID WHERE T1.first = 'Brenda' AND T2.last = 'Mayer',0.2585528334638038,2,0,0,25 2550,What are the prices on cheese products?,SELECT T2.UnitPrice FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.Description = 'Cheeses',"SELECT CAST(SUM(IIF(T1.Description = 'Cheeses', 1, 0)) AS REAL) * 100 / COUNT(T2.UnitPrice) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.categoryID = T2.CategoryID",3.64497087541131,2,0,0,20 2551,"Compared with the orders happened on 2005-04-08 and two days later, which day's order had a higher value?","SELECT T2.orderDate FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-08' OR STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-10' ORDER BY T1.quantityOrdered * T1.priceEach DESC LIMIT 1","SELECT SUM(T1.quantityOrdered * T1.priceEach) / COUNT(T2.orderNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON STRFTIME('%Y', T3.orderDate) = '2005-04-08' AND T2.status = 'Representative'",-4.5036903846670615,1,0,0,26 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 2553,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,25 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 2555,What is the first name of clients who have the highest priority?,SELECT T1.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = ( SELECT MAX(priority) FROM callcenterlogs ),SELECT T0.first FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` ORDER BY T2.priority DESC LIMIT 1,-0.9788662361901231,6,0,0,28 2556,How many owners are located in Mexico?,SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico' AND ContactTitle = 'Owner',SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico',4.861432842260551,1,0,0,24 2557,List the full names of customers who have purchased products in quantity over 600.,"SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600",SELECT DISTINCT T3.ProductID FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.Quantity > 600,0.11660578942832495,6,0,0,29 2558,Please indicate the street names of restaurants with food type is American.,SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American',SELECT DISTINCT T3.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.`food_type` = 'american',-3.2271943797031524,11,0,0,20 2559,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 T2.`CompanyName` = 'Exotic Liquids',-6.807471814493292,2,0,0,28 2560,"For all the complaint callers on 2017/3/27, what percentage of the clients are females?",SELECT CAST(SUM(CASE WHEN T1.sex = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2017-03-27',"SELECT CAST(SUM(T2.percentage) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2017-03-27'",-3.7771709260847475,8,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 2562,How many orders were shipped to Venezuela in 1996?,"SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND STRFTIME('%Y', ShippedDate) = '1996'",SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry = 'Venezuela' AND ShippedDate LIKE '1996%',4.867174581115788,1,0,0,29 2563,How much is the Volkswagen Dasher with 14.1 mph acceleration?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'volkswagen dasher' AND T1.acceleration = '14.1',"SELECT CAST(SUM(IIF(T1.car_name = 'Volkswagen Dasher', 1, 0)) AS REAL) / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",-3.6687952976759277,23,0,0,23 2564,How many type of products did Dalton M. Coleman purchase?,SELECT COUNT(T2.ProductID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M' AND T1.LastName = 'Coleman',SELECT SUM(IIF(T1.FirstName = 'Dalton' AND T1.MiddleInitial = 'M. Coleman' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1._CustomerID = T2.CustomerID,-0.6990323238430237,2,0,0,29 2565,What is the ratio number of territories in Northern region and number territories in Western region?,SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' ) AS REAL) * 100 / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Westerns' ) AS Calu,SELECT CAST(SUM(CASE WHEN TerritoryID Database: retail_world = 'Northern' 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 == 'Western',-8.031719745019025,22,0,0,30 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 2567,"How many orders did ""Laughing Bacchus Wine Cellars"" make?",SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars',SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID Database: retail_world` = T2.CustomerID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars' AND T2.`OrderID` = 0,-6.43439688894661,26,0,0,28 2568,List the names and prices of the cars with model 82 and mileage per gallon of greater than 30.,"SELECT T2.car_name, T1.price FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.model = 82 AND T2.mpg > 30","SELECT T4.car_name, T3.mpg FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.`model 82` > 30",-5.757098964052965,2,0,0,30 2569,Did Ms. Lyric Emely Taylor provide the consent for result of the complaint call on 2016/5/20?,"SELECT CASE WHEN T2.`Consumer consent provided?` IN (NULL, 'N/A', '') THEN 'No' ELSE 'Yes' END FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Lyric' AND T1.middle = 'Emely' AND T1.last = 'Taylor' AND T1.sex = 'Female' AND T2.`Date received` = '2016-05-20'","SELECT CAST(SUM(IIF(T2.`Consumer consent provided?`, 1, 0)) AS REAL) * 100 / COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2016-05-20'",-1.3619414370183678,2,0,0,30 2570,State 10 emails of UK Sales Rep who have the lowest credit limit.,SELECT DISTINCT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' ORDER BY T1.creditLimit LIMIT 10,SELECT email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'UK Sales Rep' ORDER BY creditLimit DESC LIMIT 10,3.745700805111931,3,0,0,30 2571,How many customers are named Madison?,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison',SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison',2.40604250302234,1,1,1,29 2572,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(IIF(State = 'Texas', 1, 0)) AS REAL) * 100 / COUNT(State) FROM people",2.1832712833588146,1,0,0,24 2573,What is the total price charged for orders shipped by air without shipping instructions?,SELECT l_extendedprice * (1 - l_discount) * (1 + l_tax) AS totalprice FROM lineitem WHERE l_shipmode = 'AIR' AND l_shipinstruct = 'NONE',SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_shipmode = 'AIR',2.0259380998140255,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 2575,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',0.9805599588004698,2,1,1,29 2576,"How many customers have a credit limit of not more than 100,000 and which customer made the highest total payment amount for the year 2004?","SELECT ( SELECT COUNT(customerNumber) FROM customers WHERE creditLimit <= 100000 AND customerNumber IN ( SELECT customerNumber FROM payments WHERE STRFTIME('%Y', paymentDate) = '2004' ) ), T1.customerName FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.creditLimit <= 100000 AND STRFTIME('%Y', T2.paymentDate) = '2004' GROUP BY T1.customerNumber, T1.customerName ORDER BY SUM(T2.amount) DESC LIMIT 1",SELECT COUNT(customerNumber) FROM customers WHERE creditLimit > 100 AND paymentDate BETWEEN '2004-01-01',2.0860666987349945,1,0,0,30 2577,"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,29 2578,What is the total sales of furniture products in the east superstore in the year 2016.,"SELECT SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE STRFTIME('%Y', T1.`Order Date`) = '2016' AND T2.Category = 'Furniture'","SELECT SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Category = 'Furniture' AND strftime('%Y', T1.Order) = '2016'",0.7823699413875773,8,0,0,26 2579,List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.,"SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )","SELECT `Product`, `Issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE ( SELECT AVG(age) FROM client ) > 60",-3.611475708353725,2,0,0,30 2580,How many orders that the employees who are located in Tacoma handled?,SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'Tacoma',SELECT CAST(COUNT(CASE WHEN T1.City = 'Tacoma' 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,1.8069260084567194,7,0,0,30 2581,"From which country is the company ""Drachenblut Delikatessen"" from?",SELECT Country FROM Customers WHERE CompanyName = 'Drachenblut Delikatessen',SELECT Country FROM Customers WHERE CompanyName = 'Drachenblut Delikatessen',3.1893266824188897,1,1,1,26 2582,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 DISTINCT T1.`FirstName` FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN Products AS T3 ON T2.ProductID = 3 AND T3.Name = 'Products',-0.055368592337329235,5,0,0,29 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 2585,To which segment belongs the customer that made the most orders in April 1994?,"SELECT T.c_mktsegment FROM ( SELECT T2.c_mktsegment, COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate LIKE '1994-04-%' GROUP BY T1.o_custkey ) AS T ORDER BY T.num DESC LIMIT 1",SELECT T2.`c_mktsegment` FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_ custkey WHERE T1.`o_orderkey` = 'April 1994' ORDER BY T2._acctbal DESC LIMIT 1,0.842528644338986,1,0,0,29 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 2587,"Among the orders made by customers in the household segment, how many of them are urgent?",SELECT COUNT(T1.o_orderpriority) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' AND T1.o_orderpriority = '1-URGENT',"SELECT COUNT(IIF(T2.c_mktsegment = 'HOUSEHOLD', 1, 0)) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T1 .o_orderpriority = '1-URGENT'",2.6007401203775986,4,0,0,29 2588,How many of the cities are in a Bay Area?,SELECT COUNT(city) FROM geographic WHERE region = 'bay area',SELECT COUNT(city) FROM geographic WHERE region = 'bay area',4.8700929185746205,1,1,1,25 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 2590,What is the average price per car produced in Japan?,SELECT AVG(T1.price) 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 = 'Japan',"SELECT CAST(SUM(IIF(T2.country = 'Japan', 1, 0)) AS REAL) / COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",-0.5871329341479146,9,0,0,28 2591,What is the average number of customers per sales person?,SELECT CAST(COUNT(T1.CustomerID) AS REAL) / COUNT(T3.EmployeeID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID,"SELECT CAST(SUM(IIF(T2.SalesPersonID = 1, 1, 0)) AS REAL) * 100 / COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.customerID",-2.51350004448823,20,0,0,25 2592,"Among the products with product ID lower than 15, how many of them costs 10 and below?",SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10,SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10,1.8391404876033823,3,1,1,30 2593,"The part ""hot spring dodger dim light"" is ordered in how many orders?",SELECT COUNT(T1.p_partkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_name = 'hot spring dodger dim light',SELECT COUNT(l_orderkey) FROM part WHERE p_type = 'hot spring dodger dim light',3.009199465196142,1,0,0,30 2594,"Among the bakeries, what is total number of bakery located at University Avenue, Palo Alto?",SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.',SELECT CAST(SUM(CASE WHEN T2.food_type = 'bakery' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.postalo_ale to (T2.city) = 'palo alto',-3.5191613204233168,3,0,0,19 2595,"Among the car models introduced in the market in 1970, how many of them have the USA as their origin country?",SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.model_year = 1970 AND T2.country = 'USA',SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.`country` = T2.origin WHERE T1.model_year LIKE '1970%',-4.5528678585975255,19,0,0,29 2596,Which supplier supplies the most amount of products?,"SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.SupplierID, T2.CompanyName ORDER BY COUNT(T1.ProductName) DESC LIMIT 1",SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` ORDER BY SUM(T2.Amount) DESC,-7.0048715415129275,21,0,0,22 2597,Who is the sales representative of the customer who has made the highest payment? Include the full name of employee and his/her supervisor.,"SELECT T4.LastName, T4.FirstName, T4.ReportsTo , T1.Quantity * T1.UnitPrice * (1 - T1.Discount) AS payment FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID INNER JOIN Employees AS T4 ON T2.EmployeeID = T4.EmployeeID ORDER BY payment DESC LIMIT 1","SELECT FirstName, LastName, ReportsTo FROM `Order Details` AS LastName FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.`CustomerID Database: retail_world` INNER JOIN Employees AS T3 ON T2.ReportsTo = T3.EmployeeID GROUP BY LastName ORDER BY Discount DESC LIMIT 1",-7.112169361071626,2,0,0,30 2598,What is the total amount of tax charged for the order placed by customer 88931 on 7/13/994?,SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = 88931 AND T1.o_orderdate = '1994-07-13',"SELECT CAST(SUM(IIF(T2.l_discount = '88931', 1, 0)) AS REAL) * 100 / COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1._orderkey = T2.L_ORDERkey WHERE STRFTIME('%Y', T2.`l_shipdate) = '994'",-2.830887144941725,1,0,0,20 2599,What are the most popular confections product and calculate the total sales generated by this product?,SELECT COUNT(T1.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T1.ProductID = T3.ProductID WHERE T2.CategoryName = 'Confections' GROUP BY T3.Quantity ORDER BY T3.Quantity DESC LIMIT 1,SELECT T1.`UnitPrice Database: retail_world` FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.categoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T2.`ProductID` = T3.ProductID ORDER BY SUM(T3.Quantity) DESC LIMIT 1,-6.642853757865272,1,0,0,24 2600,List all of the restaurants on Park St.,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st',"SELECT T2.`label Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = STRFTIME('%Y', T2.street_name) WHERE T3.label = 'ping st'",-7.702031717665817,22,0,0,27 2601,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 CAST(SUM(IIF(T2.CompanyName = 'Discontinued', 1, 0)) AS REAL) * 100 / COUNT(*) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID",-4.451593719559533,26,0,0,30 2602,Which sales team id has the highest number of orders in 2018?,SELECT _SalesTeamID FROM `Sales Orders` WHERE OrderDate LIKE '%/%/18' GROUP BY _SalesTeamID ORDER BY COUNT(_SalesTeamID) DESC LIMIT 1,SELECT _SalesTeamID FROM `Sales Orders` WHERE ProcuredDate LIKE '2018%' ORDER BY OrderNumber DESC LIMIT 1,2.4089117883341484,1,0,0,27 2603,What were the total orders of Medsep Group from 2018 to 2020?,"SELECT SUM(CASE WHEN SUBSTR(T1.OrderDate, -2) IN ('18', '19', '20') AND T2.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID",SELECT SUM(CASE WHEN T1.OrderDate LIKE '2018%' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medsep Group',0.5046876141286023,2,0,0,30 2604,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(CASE WHEN T3.country = 'Japan' THEN 1 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._country INNER JOIN data AS T4 ON T4.id = T5.ID,-5.878321854973208,20,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 2606,What is the name of the product with the highest retail price?,SELECT p_name FROM part WHERE p_retailprice = ( SELECT MAX(p_retailprice) FROM part ),SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,4.8437841492662725,1,0,0,28 2607,How many clients from Mozambique required orders with a low priority order?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN orders AS T3 ON T1.c_custkey = T3.o_custkey WHERE T2.n_name = 'MOZAMBIQUE' AND T3.o_orderpriority = '5-LOW',SELECT SUM(CASE WHEN T1.c_mktsegment = 'Mozambique' THEN 1 ELSE 0 END) FROM customer AS T1 INNER JOIN nation AS T2 ON T2.n_nationkey = T3.o_custkey INNER JOIN orders AS T4 INNER JOIN o_orderkey IS NOT NULL,-2.0738743520380494,1,0,0,30 2608,How many Borough-type stores located in the city of Brooklyn have a population of less than 3 million?,SELECT SUM(CASE WHEN Population < 3000000 AND Type = 'Borough' AND `City Name` = 'Brooklyn' THEN 1 ELSE 0 END) FROM `Store Locations`,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `City Name` = 'Borough' AND Population < 3,0.5290679551657118,1,0,0,28 2609,"In restaurants with a review of 2, how many restaurants have a street number below 500?",SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500,SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 WHERE T2.review > 2 AND T1.street_num < 500,5.318352693801226,1,0,0,30 2610,How many suppliers from Germany have left a comment with 'carefully regular packages'?,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' AND T1.s_comment LIKE '%carefully regular packages%',SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 WHERE T2.n_name = 'GERMANY',3.304142609358554,1,0,0,25 2611,What is the name of the contact person of the Pavlova supplier company?,SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Pavlova',SELECT T3.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID WHERE T1.`ProductName` = 'Pavlova',-4.354173626557586,26,0,0,28 2612,Calculate the percentage of American cars among all cars.,SELECT CAST(SUM(CASE WHEN T3.country = 'USA' 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,"SELECT CAST(SUM(IIF(T3.country = 'USA', 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 = t2.country",2.0202557519583033,13,1,1,27 2613,Please list the full names of all the male clients born after the year 1990.,"SELECT first, middle, last FROM client WHERE year > 1990","SELECT first, middle, last FROM client WHERE year > 1990",1.8133196049975595,1,1,1,29 2614,Who is the sales representitive of Muscle Machine Inc? Please give the employee's full name.,"SELECT t2.firstName, t2.lastName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'","SELECT firstName, lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.firstName = 'Muscle Machine Inc'",3.357386429276219,1,0,0,26 2615,"What are the names of the products with a profit of no less than 1,000 in one single order?",SELECT DISTINCT T2.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Profit > 1000,SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Profit > 1000,0.956201100784328,1,0,0,21 2616,How many orders were made by customers who live in Texas at the Central superstore?,SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.State = 'Texas',SELECT COUNT(T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id` WHERE T1.State = 'Texas',-0.7143394908073228,9,0,0,28 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 2618,Calculate the total sales ids that were sales of Flat Washer 8.,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Flat Washer 8',SELECT SUM(CASE WHEN T1.SalesID = 'Flat Washer 8' THEN 1 ELSE 0 END) FROM Sales AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1 . ProductID,2.125573667408533,3,0,0,29 2619,Name of customer whose order is applied with the highest discount.,SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey ORDER BY T2.l_discount DESC LIMIT 1,SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_Orderkey INNER JOIN customer AS T3 ON T2->c_custkey = 3 ORDER BY l_discount DESC LIMIT 1,-0.15398317425360855,7,0,0,26 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 2621,"In west superstore, what is the name and the shipping mode of the product that was ordered with the shortest shipment time?","SELECT DISTINCT T2.`Product Name`, T1.`Ship Mode` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' ORDER BY T1.`Ship Date` - T1.`Order Date` LIMIT 1","SELECT T3.`Product Name`, T1.Ship Mode FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Region = 'West' ORDER BY T3.Ship Date DESC LIMIT 1",1.0262002640422854,6,0,0,28 2622,How many deli in Belmont have a review rating of 2 or more?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE city = 'belmont' AND review > 2 AND food_type = 'deli',SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'deli' AND review > 2,2.7474379229097354,1,0,0,25 2623,"Indicate the profit of product Sauder Camden County Barrister Bookcase, Planked Cherry Finish.","SELECT DISTINCT T1.Profit FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Sauder Camden County Barrister Bookcase, Planked Cherry Finish'","SELECT CAST(SUM(IIF(T2.`Product Name` = 'Sauder Camden County Barrister Bookcase', 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`",-1.6967071165378371,2,0,0,28 2624,"Find and list the company name, company contact name, and contact title of customers from Madrid.","SELECT CompanyName, ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'","SELECT CompanyName , ContactName, ContactTitle FROM Customers WHERE City = 'Madrid'",2.3202079770761097,3,1,1,19 2625,How many countries belong to the Algeria region?,SELECT COUNT(T1.r_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T2.n_name = 'ALGERIA',SELECT COUNT(T2.n_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2._regionkey INNER JOIN ( SELECT n_name FROM nation WHERE n_nationkey = 'algeria' ),-1.0474466243724085,16,0,0,18 2626,"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(SalesID) FROM Sales WHERE Quantity > 60 AND Price < 500,0.6138423162729927,1,0,0,30 2627,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.`Eleura Callahan` WHERE T1.LastName = 'Laura' AND FirstName != 'Callahan',-5.7444638140725175,26,0,0,30 2628,Indicate the procured dates for the customer whose ID is 11.,"SELECT DISTINCT T FROM ( SELECT IIF(_CustomerID = 11, ProcuredDate, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL","SELECT DISTINCT T FROM ( SELECT IIF(_CustomerID = 11, ProcuredDate, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL",2.335768737713008,1,1,1,28 2629,Please list the names of the top 3 most expensive cars.,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 3,SELECT T3.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY COUNT(T2.price) DESC LIMIT 3,-3.3183632562125203,1,0,0,30 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 2631,List the full address of all the American restaurants with a review of 4 or more?,"SELECT T1.street_num, T1.street_name, T1.city FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.review >= 4","SELECT T3.address FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.`review` IN (4, 3)",-2.451290554908974,11,0,0,30 2632,What is the county and region of Davis City?,"SELECT county, region FROM geographic WHERE city = 'Davis'","SELECT county, region FROM geographic WHERE city = 'Davis'",3.9463967056163036,1,1,1,22 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 2634,Which restaurant on the street Alameda de las Pulgas in the city of Menlo Park is the worst rated?,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'avenida de las pulgas' AND T2.city = 'menlo park' ORDER BY review LIMIT 1,SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = 2 WHERE T1.`street_name Database: restaurant` = 'alameda de las pulgas' AND T3.city = 'menlo park',-4.8250706291971674,1,0,0,13 2635,"Among all the orders made by a customer in the household segment, what is the highest total price?",SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD',SELECT MAX(o_totalprice) FROM orders WHERE o_mktsegment = 'HOUSEHOLD',-1.4803724863314565,1,0,0,29 2636,List down the company names that have the highest reorder level.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID ORDER BY T1.ReorderLevel DESC LIMIT 1,-6.711317726182812,1,0,0,30 2637,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 Database: cars` FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.`country` = 'Europe' ORDER BY T3.`origin` DESC LIMIT 1,-6.76088620945869,21,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 2639,How many complaints from female clients born in the year 2000 were not sent through the web?,SELECT COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T1.year = 2000 AND T2.`Submitted via` != 'Web',SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Web',-3.1455001384298447,14,0,0,27 2640,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 '%/%/20',2.012357160747732,27,1,1,30 2641,"List the name, address, and phone number of companies that supply products for more than thirty dollars per unit.","SELECT T2.CompanyName, T2.Address, T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.UnitPrice > 30","SELECT T3.CompanyName, T4.Address, T5.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.UnitPrice > 10000000",-5.276329012572607,26,0,0,29 2642,Which phone number should I call if I want to reach Nancy Davolio's home?,SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy',SELECT HomePhone FROM Employees WHERE FirstName LIKE 'Nancy%' AND LastName = 'Davolio',3.032539184339088,1,0,0,29 2643,How many orders were made by Corey Roper in 2015?,"SELECT COUNT(T2.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Corey Roper' AND STRFTIME('%Y', T2.`Ship Date`) = '2015'",SELECT SUM(CASE WHEN T2.`Customer Name` = 'Corey Roper' AND Ship LIKE '2015%' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2``,-0.6353688706815882,6,0,0,30 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 2645,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(T1.Quantity) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T2.`FirstName` = 'Michel' AND T3.LastName = 'DeFrance',0.9255066341467139,3,0,0,28 2646,"Among the restaurants located on the street number ranges from 1000 to 2000, what is the percentage of Afghani restaurants are there?","SELECT CAST(SUM(IIF(T2.food_type = 'afghani', 1, 0)) AS REAL) * 100 / COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE 1000 <= T1.street_num <= 2000","SELECT CAST(SUM(CASE WHEN T2.food_type = 'afghani' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id2postal_street_num = T2.`sty_num Database: restaurant` WHERE STRFTIME('%Y', T3.city_city) BETWEEN 1000 AND 2000 AND T1.`street_number` = 'afolis'",-6.228746834331555,26,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 2648,What is the average discount for the parts made by Manufacturer#5?,SELECT AVG(T3.l_discount) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey WHERE T1.p_mfgr = 'Manufacturer#5',"SELECT CAST(SUM(IIF(T1.p_mfgr = 'Manufacturer#5', 1, 0)) AS REAL) * 100 / COUNT(T2.l_discount) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._p_partkey = T2.ps_partsupp",-5.5517550261961555,1,0,0,28 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 2650,"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 T2.`Sales Team` = 'Carl Nguyen' AND T1.ProcuredDate LIKE '%/%/19' 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",-7.789610877918176,8,0,0,29 2651,What is the type of store located in the city with the highest amount of water area?,SELECT CASE WHEN MAX(`Water Area`) THEN Type END FROM `Store Locations`,SELECT Type FROM `Store Locations` WHERE `City Name` = 'City Name' ORDER BY Population DESC LIMIT 1,1.0483722176402663,1,0,0,27 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 2655,What are the countries that belong to Africa?,SELECT T2.n_name FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T1.r_name = 'Africa',SELECT T1.r_name FROM region AS T1 INNER JOIN nation AS T2 ON T1._regionkey = T2.n_regionkey WHERE T2.`n_name` = 'Africa',1.981352601420699,1,0,0,26 2656,Which county and region does the street E. El Camino Real belong to?,"SELECT DISTINCT T2.county, T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'E. El Camino Real'","SELECT county, region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'E. El Camino Real'",-1.4504468246211732,3,0,0,20 2657,Name the shipper which had the most shipments in first quarter of 1998.,"SELECT T1.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia WHERE STRFTIME('%Y', T2.ShippedDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",SELECT T1.CompanyName FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.`ShipperID Database: retail_world` = T2.`ShipVia` WHERE T2.ShippedDate < 1998,-6.54614813395446,28,0,0,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 2660,"How many employees sold over 20,000 quantities of ""Touring-2000 Blue, 50""?","SELECT COUNT(*) FROM ( SELECT SUM(Quantity) FROM Sales WHERE ProductID IN ( SELECT ProductID FROM Products WHERE Name = 'Touring-2000 Blue, 50' ) GROUP BY Quantity, SalesPersonID HAVING SUM(Quantity) > 20000 )","SELECT COUNT(T1.EmployeeID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2ProductID WHERE T2.Name LIKE '%Touring-2000 Blue, 50%'",-3.2585112488522134,7,0,0,30 2661,How many French customers shipped 2 orders which have been cancelled?,SELECT COUNT(T2.country) FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.status = 'Shipped' AND T2.country = 'France' GROUP BY T2.customerNumber HAVING COUNT(T1.status) = 2,SELECT COUNT(T1.orderNumber) FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customernumber WHERE t2.country = 'France' AND t1.status = 'Shipped',3.0004795619494153,1,0,0,20 2662,List all the addresses for the suppliers of the biggest parts.,SELECT T2.s_address FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey ORDER BY T3.p_size DESC LIMIT 1,SELECT T3.p_address FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_sup pkey INNER JOIN part AS T3 ON T2->p_partkey = AVG(T3.num) AS T4 ORDER BY T4.num DESC LIMIT 1,-0.6255326556375312,1,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 2664,Describe Sales Representative names who were hired in 1992 and compare the number of orders among them.,"SELECT T1.FirstName, T1.LastName, COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.Title = 'Sales Representative' AND STRFTIME('%Y', T1.HireDate) = '1992' GROUP BY T1.EmployeeID, T1.FirstName, T1.LastName",SELECT CASE WHEN T1.FirstName = 'Sales Representative' THEN T2.OrderID DESC LIMIT 1,-3.998670941241359,5,0,0,30 2665,Which country produced the most fuel-efficient car?,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 DESC 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,-5.8465211677000815,1,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 2667,List down the product name for products from id 1 to 10.,SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10,SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10,4.723318039666508,1,1,1,26 2668,When was the product with the highest unit price shipped?,SELECT t1.shippedDate FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber ORDER BY t2.priceEach DESC LIMIT 1,SELECT productCode FROM orders ORDER BY priceEach DESC LIMIT 1,-3.732083397950555,3,0,0,25 2669,Provide the engine displacement status of the $37443.85589 car.,SELECT T1.displacement FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '37443.85589',"SELECT CAST(SUM(IIF(T1.displacement = '37443.85589', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",5.737385418427173,1,0,0,28 2670,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.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.label = 'american' AND T3.city = 'san rafael' AND strftime('%Y', T2.`street_name`) = 'Drive Street'",-0.2460438022984241,8,0,0,13 2671,How many female employees are in charge of 3 or more territories?,SELECT COUNT(EID) FROM ( SELECT T1.EmployeeID AS EID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.TitleOfCourtesy IN ('Ms.' OR 'Mrs.') GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) >= 3 ) T1,SELECT COUNT(*) FROM ( SELECT COUNT(EmployeeID) FROM Employees WHERE TitleOfCourtesy = '3' GROUP BY EmployeeID HAVING COUNT(TerritoryID) > 3 ) AS num,-0.07503661632601388,4,0,0,29 2672,"Among the reviews from midwest region, what are the products that received 1 star?",SELECT DISTINCT T3.Product FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN reviews AS T3 ON T2.district_id = T3.district_id WHERE T1.Region = 'Midwest' AND T3.Stars = 1,SELECT T4.Product FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN reviews AS T3 ON Ttrict_id = T3.district_id WHERE T5.Stars = 1,-4.153477790383771,2,0,0,28 2673,Which product of Exotic Liquids company that have the highest reorder levels?,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' ORDER BY T1.ReorderLevel DESC LIMIT 1,SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Exotic Liquids' ORDER BY ReorderLevel DESC LIMIT 1,-5.142674629937487,1,0,0,29 2674,What is the customer names of orders which have unit cost greater than 4000USD?,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 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,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` > 4000 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.1362490814046953,1,1,1,27 2675,State the customer name of orders which has shipped date in 7/8/2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' 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,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.ShipDate = '7/8/18' 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,1.1244883989615702,2,1,1,28 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 2678,"On which date was the part ""burnished seashell gainsboro navajo chocolate"" in order no.1 shipped?",SELECT T1.l_shipdate FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate',"SELECT STRFTIME('%Y', l_shipdate) FROM lineitem WHERE l_orderkey = 1 AND p_name = 'burnished seashell gainsboro navajo chocolate'",-0.17145393920309973,1,0,0,25 2679,Show the origin country of Chevrolet Malibu.,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 = 'chevrolet malibu',SELECT T2.`origin Database: cars` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.country = T4.origin WHERE T3.`country` = 'Chevrolet Malibu',-5.80595470121392,1,0,0,10 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 2681,Please list the top three product names with the highest unit price.,SELECT t1.productName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode ORDER BY t2.priceEach DESC LIMIT 3,SELECT productName FROM products ORDER BY buyPrice DESC LIMIT 3,4.579754235173359,1,0,0,29 2682,"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,27 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 2684,What is the total number of orders made by customers in United States?,SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey INNER JOIN nation AS T3 ON T2.c_nationkey = T3.n_nationkey WHERE T3.n_name = 'UNITED STATES',SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.c_custk INNER JOIN nation AS T3 ON T3.n_name = 'UNITED STATES' AND T2.`c_acctbal` = 1,-3.0047423515603757,13,0,0,16 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 2686,What is the last name of sales person for sales id 100?,SELECT T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.SalesID = 100,"SELECT FirstName, LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE SalesID BETWEEN 100 AND 100",2.796205819808097,6,0,0,30 2687,What are the top 2 countries with the highest number of indebted suppliers?,"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 T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2",SELECT T3.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.N_Nationkey INNER JOIN ( SELECT MAX(s_acctbal) FROM nation ) AS T ORDER BY T.num DESC LIMIT 2,-4.236381966015702,2,0,0,18 2688,"For the order with the total price of 231499.38, what was the discounted price for supplier No. 9397?",SELECT T1.l_extendedprice * (1 - T1.l_discount) AS DISCOUNTERPRICE FROM lineitem AS T1 INNER JOIN orders AS T2 ON T2.o_orderkey = T1.l_orderkey WHERE T1.l_suppkey = 9397 AND T2.o_totalprice = 231499.38,"SELECT T3.o_totalprice FROM lineitem AS T1 INNER JOIN orders AS T2 ON T1.l_orderkey = T2._orderkey WHERE STRFTIME('%Y', T2.`o_orderdate) = '231499.38' AND T2.s_orderpriority = 9397",-1.1283127925355554,6,0,0,29 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 2690,What was the detailed issue did Mr Gunner Omer Fuller complain about?,SELECT T2.`Sub-issue` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Gunner' AND T1.middle = 'Omer' AND T1.last = 'Fuller' AND T1.sex = 'Male',SELECT T1.`sex Database: retail_complains` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-issue` = 'Mr Gunner Omer Fuller' AND T1:middle = 'Gunner',-5.610278792199835,28,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 2692,How many free gifts have customer with id 11782 received?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID = 11782 AND T1.Price = 0,"SELECT CAST(SUM(IIF(T2.CustomerID = 11782, 1, 0)) AS REAL) * 100 / COUNT(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2. ProductID",1.3262662638535543,6,0,0,29 2693,Please list the phone numbers of all the suppliers for the parts ordered in order no.1.,SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 1,SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2->s_supPkey INNER JOIN s_nation AS T3 WHERE T3.n_name = 'COMMUNICATION' AND l_orderkey = 1,-3.4914207298754225,11,0,0,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 2695,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 FirstName, LastName, TitleOfCourtesy, AVG(ages) FROM Employees WHERE BirthDate = '2022' AND City = 'London'",0.5502727605144077,2,0,0,30 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 2697,What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.,SELECT MAX(T1.`Discount Applied`) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Colorado' AND T2.`Land Area` = 111039036,SELECT MAX(`Discount Applied`) FROM `Sales Orders` WHERE T2.State = 'Colorado' AND T2.`Land Area` = 111039036,-3.2806335107118896,7,0,0,26 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 2699,"Among the customers from Houston, Texas, what is the total profit of their orders in the Central region?",SELECT SUM(T2.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.City = 'Houston' AND T1.State = 'Texas' AND T2.Region = 'Central',SELECT CAST(SUM(CASE WHEN T2.Region = 'Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Customer ID) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`CustomerID` INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T1.City = 'Houston' AND T4.Profit,-3.2423147581476317,3,0,0,30 2700,"Among the suppliers for the parts ordered in order no.4, how many of them are in debt?",SELECT COUNT(T1.l_linenumber) FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 4 AND T2.s_acctbal < 0,SELECT COUNT(T1.l_partkey) FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.ls_suppkey = T2.s_supPkey INNER JOIN s_nation AS T3 WHERE T3.n_name = 'DEBT' AND T1 .l_orderkey = 4,-2.313965701061717,2,0,0,28 2701,Calculate the difference between the number of cars that has a horsepower of 130 with the model year 1970 and model year 1976,SELECT SUM(CASE WHEN T2.model_year = 1970 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.model_year = 1976 THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower = 130,"SELECT CAST(SUM(IIF(T1.horsepower = 130, T2.model_year) = '1970' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.`ID` WHERE T1._year = 1976",-3.2525760580539353,26,0,0,30 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 2703,"What is the order ID of the security-Tint Envelopes product ordered on June 3, 2013, in the Central region?",SELECT DISTINCT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Security-Tint Envelopes' AND T1.`Order Date` = '2013-06-03',"SELECT `Order ID` FROM central_superstore WHERE `Product Name` = 'security-Tint Envelopes' AND STRFTIME('%Y', `Order Date`) = '2013-03-03'",0.04533135595603269,1,0,0,20 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 2705,What is the supply cost of large plated tin?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_type = 'large plated tin',"SELECT CAST(SUM(IIF(T1.p_type = 'large plated tin', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",-2.2722874819992267,2,0,0,27 2706,What is the unit cost of order SO - 000103?,"SELECT DISTINCT T FROM ( SELECT IIF(OrderNumber = 'SO - 000103', `Unit Cost`, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL","SELECT DISTINCT T FROM ( SELECT IIF(OrderNumber = 'SO - 000103', `Unit Cost`, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL",1.8283301218179544,2,1,1,29 2707,"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 = t2.s3_nationkey WHERE T_name = 'hot spring dodger dim light' AND T_mfgr = 'Vietnam',-4.677941238714346,2,0,0,22 2708,Which sales team name has the least orders in 2019?,SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) ASC LIMIT 1,SELECT `Sales Team` FROM `Sales Orders` WHERE OrderNumber = '2019%' ORDER BY `Order Quantity` DESC LIMIT 1,1.30144349752251,1,0,0,29 2709,"What is the highest profit order in the East superstore of customers from Houston, Texas?",SELECT T1.`Order ID` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.City = 'Houston' AND T2.State = 'Texas' ORDER BY T1.Profit DESC LIMIT 1,SELECT MAX(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T2.City = 'Houston' AND Texas = 'Texas' ORDER BY T1.Profit DESC LIMIT 1,1.5937389370467754,2,0,0,27 2710,Give the full name of employee who handled the order id 10280.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280","SELECT T1.FirstName, T1.`LastName Database: retail_world` FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderID = 10280",-6.305031961681968,1,0,0,30 2711,Provide the nation and region of the customer with the address of wH55UnX7 VI?,"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_address = 'wH55UnX7 VI'","SELECT T2.c_nationkey, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_name = 'wH55UnX7 VI' AND T2.`c_mktsegment` = 'ASIA'",-1.6150903911105408,6,0,0,23 2712,List the products ordered by customers in Coachella.,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.City = 'Coachella',SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Customer ID Database: superstore` = 'Coachella' THEN T1.`Product Name` ELSE NULL END AS T FROM west_superstore ) WHERE T IS NOT NULL,-5.782256879772661,1,0,0,26 2713,"Write down the call id of clients whose first name start with alphabet ""B"".",SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first LIKE 'B%',SELECT T2.call_id FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE t1.first LIKE 'B%',0.30152543865433756,13,1,1,29 2714,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 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,2.4886936894436262,2,0,0,30 2715,What is the full name of employee who sold 1000 units?,"SELECT DISTINCT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000","SELECT DISTINCT MiddleInitial, LastName FROM Sales AS M1 INNER JOIN Employees AS M2 ON M1.SalesPersonID = M2.EmployeeID WHERE MIN(Quantity) > 1000",2.414428748792062,5,0,0,30 2716,In what years were the clients who demanded more problems with Certificate of deposit born?,SELECT T1.year FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = '(CD) Certificate of deposit' GROUP BY T1.year ORDER BY COUNT(T1.year) DESC LIMIT 1,SELECT MIN(T1.year) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Sub-product` = 'Certificate of deposit born',-0.11455458874360017,1,0,0,27 2717,Calculate the difference between the total sales in the East superstore and the total sales in the West superstore.,SELECT SUM(T1.Sales) - SUM(T2.Sales) AS difference FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT CAST(SUM(CASE WHEN T2.`Sales Database: superstore` = 'East' THEN 1 ELSE 0 END) AS REAL) * 100 - SUM(T1.Sales),-7.31896657872393,1,0,0,28 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 2719,Which is the city where most of the 1 star reviews come from?,SELECT T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 1 GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1,SELECT city FROM reviews WHERE Stars = 1 GROUP BY city ORDER BY COUNT(district_id) DESC LIMIT 1,-0.38339097354237384,5,0,0,29 2720,Which countries do the top 5 highest paying customers in a single payment come from? Indicate their entire address.,"SELECT DISTINCT T2.country, T2.addressLine1, T2.addressLine2 FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber ORDER BY T1.amount DESC LIMIT 5",SELECT T3.country FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customernumber = T2.customerNumber WHERE t1.checkNumber = 5 ORDER BY t2.addressLine1 DESC LIMIT 5,-3.4025681546408757,3,0,0,30 2721,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 WHERE c_acctbal < 0,3.5112123886969506,1,0,0,28 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 2723,"Find and list the full name of employees who are from the territory, Wilton.","SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Wilton'","SELECT DISTINCT T2.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`TerritoryID`",-8.21503652127571,1,0,0,30 2724,"What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region?",SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county',SELECT DISTINCT T4.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.`county` = 'el dorado county' AND T3.region = 'lake tahoe',1.060070759025976,3,0,0,13 2725,"List the products whose supplier is Pavlova, Ltd. Please include the product ID and re-order level.","SELECT T1.ProductName, T1.ProductID, T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'","SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T2.`CompanyName` = 'Pavlova, Ltd'",-7.039446559757029,2,0,0,30 2726,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,30 2727,What are the most popular restaurants in San Francisco among diners?,"SELECT id_restaurant, label FROM generalinfo WHERE city = 'San Francisco' AND review = ( SELECT MAX(review) FROM generalinfo WHERE city = 'San Francisco' )","SELECT id_restaurant, label, review FROM generalinfo WHERE city = 'san francisco' AND label = 'diners'",4.115326367014618,1,0,0,18 2728,Calculate the percentage of customers' accounts in debt.,"SELECT CAST(SUM(IIF(c_acctbal < 0, 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer",SELECT CAST(SUM(CASE WHEN c_acctbal < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(c_custkey) FROM customer,3.570328963192515,1,1,1,24 2729,Who is the customer who purchased the highest number of products in a single order?,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 T1.CompanyName ORDER BY COUNT(T3.ProductID) 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 WHERE T3.OrderID = 1,-6.267458723068905,3,0,0,30 2730,Please list the names of customers who have total orders of over 3 in 2018.,"SELECT DISTINCT IIF(COUNT(T2.CustomerID) > 3, T2.`Customer Names`, NULL) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._CustomerID HAVING COUNT(T2.CustomerID)",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderNumber > 3 THEN T2.`Customer Names` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID ) WHERE T IS NOT NULL,0.7549326546975905,1,0,0,26 2731,Who is the customer from the East region that purchased the order with the highest profit?,SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' ORDER BY T1.Profit DESC LIMIT 1,SELECT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'East' ORDER BY T2.Profit DESC LIMIT 1,3.8211179710776197,1,0,0,30 2732,List out full name of employees who are working in Boston?,"SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Boston'","SELECT firstName, lastName FROM employees AS firstName INNER JOIN offices AS offices ON officeCode = offices.officeCode WHERE city = 'Boston'",0.8386349535296502,3,0,0,19 2733,Which chicken restaurant has the highest review?,SELECT label FROM generalinfo WHERE food_type = 'chicken' ORDER BY review DESC LIMIT 1,SELECT label FROM generalinfo ORDER BY review DESC LIMIT 1,4.988260417689312,1,0,0,29 2734,"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 T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Ordered' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY T DESC LIMIT 1,-0.3859860182523302,5,0,0,26 2735,"If Dragon Souveniers, Ltd. aren't satisfied with their order and want to send a complain e-mail, which e-mail address should they send to?","SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Dragon Souveniers, Ltd.'","SELECT addressLine1, addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'Dragon Souveniers, Ltd.'",1.295743188839116,6,0,0,25 2736,Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.,"SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.SalesTeamID = 18 AND T1.`Sales Channel` = 'In-Store' OR T1.`Sales Channel` = 'Online'","SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team`.SalesTeamID = 18 WHERE T1.OrderNumber = 'In-Store' AND T1._SalesChannel = 'Online'",-1.8446756323616538,12,0,0,28 2737,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 T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Composition ID` WHERE SUBSTR(T1.`Submitted via`) = 'No' AND T1.Timely response? < 0,1.186154257387658,3,0,0,28 2738,List all customer names with orders that are disputed.,"SELECT t3.firstName, t3.lastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = t3.employeeNumber WHERE t1.status = 'Disputed'","SELECT t3.firstName, t4.lastName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2._customerNumber INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = s3.employeeNumber WHERE T1.status = 'Disputed'",-5.548049399564102,2,0,0,16 2739,Calculate the percentage of manufactured parts by Manufacturer#3.,"SELECT CAST(SUM(IIF(p_mfgr = 'Manufacturer#3', 1, 0)) AS REAL) * 100 / COUNT(p_partkey) FROM part",SELECT CAST(SUM(CASE WHEN p_mfgr = 'Manufacturer#3' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(p_partkey) FROM part,4.490644721020928,1,1,1,27 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 2744,How many art products were ordered in 2013 in the east superstore?,"SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'",SELECT COUNT(T2.`Sub-Category`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id` WHERE T1.Region = '2013',0.17068980034513015,8,0,0,27 2745,List out sale rep that has sold 1969 Harley Davidson Ultimate Chopper. List out their names and quantity sold throughout the year.,"SELECT t5.firstName, t5.lastName, SUM(t2.quantityOrdered) 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 INNER JOIN employees AS t5 ON t4.salesRepEmployeeNumber = t5.employeeNumber WHERE t1.productName = '1969 Harley Davidson Ultimate Chopper' GROUP BY t5.lastName, t5.firstName","SELECT t.productName, t.quantityOrdered FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2._productCode INNER JOIN orders AS t3 ON t2.orderLineNumber = t3.orderNumber INNER JOIN employees AS t4 ON t4.salesRepEmployeeNumber = t5.employeeNumber WHERE t2.`customerName` = '1969 Harley Davidson Ultimate Chopper' AND t7.jobTitle = 'Sales Rep'",-3.769340567403741,8,0,0,30 2746,Which county is El Cerrito from?,SELECT county FROM geographic WHERE city = 'el cerrito',SELECT county FROM geographic WHERE city = 'el cerrito',3.911853537969903,1,1,1,27 2747,How many customers have an employee who reports to William Patterson as their sales representitive?,SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'William' AND t2.lastName = 'Patterson',SELECT COUNT(T1.customerNumber) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.lastName = 'William' AND t1.country = 'Patterson',3.0674642305209376,1,0,0,29 2748,How many customers who are in Norway and have credit line under 220000?,SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway',SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Norway',0.9812915847277819,3,1,1,30 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 2750,"Among the calls from California, what percentage are priority 1?",SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T4.State = 'California',"SELECT CAST(SUM(IIF(T2.StateCode = 'California', 1, 0)) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.`district_id Database: retail_complains` INNER JOIN state AS T4 ON T3.State = T4.StateState WHERE T1.state_abbrev = 1",-6.795030336238837,21,0,0,25 2751,"How many orders were shipped by ""Speedy Express""?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2 .CompanyName = 'Speedy Express',3.05884338960716,17,1,1,29 2752,"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(`Sales Database: superstore`) = 'East' AND `Product Name` = 'Sharp AL-1530CS Digital Copier' ) AS REAL) * 100 / COUNT(`Customer ID`) FROM west_superstore,-8.021755488835026,2,0,0,29 2753,Please list the phone numbers of all the suppliers in Germany.,SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'Germany',SELECT T2.n_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'GERMANY',-4.341680941056829,2,0,0,30 2754,Give the full name of the employee who has sold the most quantity.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID ORDER BY T2.Quantity DESC LIMIT 1","SELECT FirstName, MiddleInitial, LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY LastName ORDER BY Quantity DESC LIMIT 1",5.820838310495843,1,0,0,26 2755,"What was the total amount of sales handled by Nancy Davolio in December 1996, excluding discounts?",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.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T2.OrderDate LIKE '1996-12%' AND T3.Discount = 0,"SELECT SUM(UnitPrice * (1 - T2.Quantity) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID INNER JOIN `Order Details` AS T3 WHERE T3.OrderDate BETWEEN '1996-01-01 00:00:00' AND '%Y', 'Nancy Davolio' AND 'December'",-3.832836596012674,1,0,0,29 2756,"Among the clients in Middle Atlantic, how many are them are female and no more than 18 years old?",SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Middle Atlantic' AND T1.sex = 'Female' AND T1.age < 18,SELECT COUNT(CASE WHEN T1.sex = 'Middle Atlantic' AND T2.division = 'Female' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T3.district_id = T1 . district_id WHERE T2.`division Database: retail_complains` LIKE '18%',-6.543586813698002,3,0,0,30 2757,"What is the total profit of ""Memorex Froggy Flash Drive 8 GB in south superstore?",SELECT SUM(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Product Name` = 'Memorix Froggy Flash Drive 8 GB',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'Memorex Froggy Flash Drive 8 GB', 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`",-1.3314221031264664,7,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 2760,"Among the products under the type ""promo brushed steel"", how many of them are manufactured by Manufacturer#5?",SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5',SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5',4.815006456683995,1,1,1,23 2761,Please name any two products that have the highest satisfaction levels among users of Heli Swaren GmbH & Co. KG.,SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Heli Swaren GmbH & Co. KG' ORDER BY T1.ReorderLevel DESC LIMIT 2,SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.`SupplierID Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Heli Swaren GmbH & Co. KG' ORDER BY SUM(T2.ReorderLevel) DESC LIMIT 2,-6.774314784705159,1,0,0,30 2762,How many non-discontinued products are there in the dairy category?,SELECT COUNT(T1.CategoryID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.Discontinued = 0,SELECT COUNT(*) FROM Products WHERE CategoryName = 'Dairy' AND Discontinued = 1,-1.4696034374255444,7,0,0,27 2763,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,21 2764,How many customers are there in the country with the highest number of customers?,SELECT COUNT(CustomerID) FROM Customers GROUP BY Country ORDER BY COUNT(CustomerID) DESC LIMIT 1,SELECT COUNT(*) FROM Customers GROUP BY Country ORDER BY COUNT(CustomerID) DESC LIMIT 1,2.725494886893704,1,0,0,30 2765,"Sum up the number sales ids handled by employees called Morningstar, Heather and Dean.","SELECT SUM(IIF(T2.FirstName = 'Morningstar', 1, 0)) + SUM(IIF(T2.FirstName = 'Heather', 1, 0)) + SUM(IIF(T2.FirstName = 'Dean', 1, 0)) AS num FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID","SELECT SUM(T2.SalesID) FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE FirstName = 'Morningstar, Heather, Dean'",2.8171185908698932,3,0,0,30 2766,"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` WHERE T1.`RequiredDate Database: retail_world` = '1998' AND T2.CustomerID = 3ILMK,-5.4928514162956,29,0,0,30 2767,For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?,SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.ser_time = '2017-03-27',3.1327204406941065,1,0,0,30 2768,What are the cost prices of large burnished copper?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_type = 'LARGE BURNISHED COPPER',"SELECT CAST(SUM(IIF(T1.p_type = 'large burnished copper', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",-0.6390018960448585,1,0,0,29 2769,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._CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.`OrderID Database: retail_world` = T3 WHERE T1.PostalCode = 28023,-5.960124448353303,1,0,0,30 2770,List all the product names and categories of the highest reorder level.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID ORDER BY T2.ReorderLevel DESC LIMIT 1","SELECT ProductName, CategoryName FROM Products ORDER BY ReorderLevel DESC LIMIT 1",-1.1658996664445878,3,0,0,30 2771,The sales of how many territories is Nancy Davolio in charge of?,SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio',SELECT COUNT(TerritoryID) FROM ( SELECT DISTINCT CASE WHEN T1.FirstName = 'Nancy' THEN 1 ELSE 0 END) AS num FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T2.EmployeeID = T1 . EmployeeID,-5.883365643237988,4,0,0,27 2772,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 T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.city = 'Tokyo'",-1.9964120790929714,1,0,0,30 2773,"How many countries are there in the region whose comment description is ""asymptotes sublate after the r.""",SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_comment = 'asymptotes sublate after the r',SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1._regionkey = T2.r_regionkey WHERE T2.`comment description` = 'asymptotes sublate after the r.',-2.175058287787991,2,0,0,30 2774,How many suppliers have their accounts in debt?,SELECT COUNT(s_suppkey) FROM supplier WHERE s_acctbal < 0,SELECT COUNT(s_suppkey) FROM supplier WHERE s_acctbal < 0,4.022997268207655,1,1,1,27 2775,On what date did the customer with the lowest credit limit serviced by sales representative Barry Jones make payments for his/her orders?,SELECT T3.paymentDate FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber WHERE T1.firstName = 'Barry' AND T1.lastName = 'Jones' AND T1.jobTitle = 'Sales Rep' ORDER BY T2.creditLimit ASC LIMIT 1,SELECT T2.`paymentDate` FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T3.customernumber = T4.customerNumber WHERE t2.customerName = 'Barry Jones' AND t3.creditLimit < 0,-1.511035691455611,1,0,0,29 2776,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(T1.weight = 1975, 1, 0)) AS REAL) / COUNT(T2.origin) 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.80170650447471,24,0,0,30 2777,"How many kinds of products are there in the the category of ""dairy products""?",SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products',SELECT CAST(COUNT(CASE WHEN T2.CategoryName = 'Dairy Products' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2 . CategoryID,2.509740548626346,3,0,0,22 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 2779,What are the complaint id of client who were born in 1931?,SELECT T2.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.year = 1931,SELECT T1.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.year = 1931,0.5333489645611111,6,0,0,30 2780,What are the names of the cars worth 20000?,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 20000,SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 WHERE T2.price = 20000,-3.0875480022492385,19,0,0,30 2781,How many 2001 Ferrari Enzo were ordered?,SELECT SUM(t1.orderNumber) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t2.productName = '2001 Ferrari Enzo',SELECT SUM(t.quantityOrdered) FROM orderdetails t WHERE t.productCode = '2001 Ferrari Enzo',0.14292987633857937,2,0,0,30 2782,What is the average price of products that cost between 100 and 200?,SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200,SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200,3.83815416077436,1,1,1,26 2783,"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_supplkey INNER JOIN s_nation AS T4 ON T4._s_s2id = T5._nationkey WHERE T1.`p_type` = 'PROMO BRUSHED STEEL' AND T5 . s_acctbal < 0,-2.1278428117508796,3,0,0,27 2784,"In 2012, how many complaints about Credit card product came from clients in Omaha?","SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Omaha' AND strftime('%Y', T2.`Date received`) = '2012' AND T2.Product = 'Credit card'",SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2012%',3.895548961939772,1,0,0,26 2785,What is the full address of Albert's Café?,"SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'",SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2._id_ restaurant WHERE t1.label = 'albert' AND t2.city = 'café',-1.1228892529165697,3,0,0,19 2786,Identify the name and product category for the most expensive and the least expensive products.,"SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.UnitPrice IN (( SELECT MIN(UnitPrice) FROM Products ), ( SELECT MAX(UnitPrice) FROM Products ))","SELECT T2.ProductName, T3.UnitPrice FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2._CategoryID ORDER BY T2.`UnitPrice` DESC LIMIT 1",-5.835877756997335,11,0,0,30 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 2788,Calculate the average age of clients from the Midwest region.,SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T3.Region) AS average 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',SELECT CAST(SUM(CASE WHEN T2.Region = 'Midwest' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,-7.528658481917615,18,0,0,27 2789,"In the parts shipped by rail, how many are of medium priority?",SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'RAIL' AND T1.o_orderpriority = '3-MEDIUM',"SELECT COUNT(IIF(T2.l_shipmode = 'RAIL', 1, 0)) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey INNER JOIN ( SELECT l_suppkey FROM lineitem WHERE l_discount = 0 AND l_shipinstruct = '1-MEDIUM' ) AS REAL",-0.1975397112350248,9,0,0,27 2790,How many products have been discountinued by New Orleans Cajun Delights?,SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights',SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights',3.592486056943458,2,1,1,28 2791,"Among the suppliers in the European region, what percentage have a below-average account balance?","SELECT CAST(SUM(IIF(T3.s_acctbal < ( SELECT AVG(supplier.s_acctbal) FROM supplier ), 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE'","SELECT CAST(SUM(IIF(T2.r_name = 'European', 1, 0)) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 INNER JOIN region AS T3 ON T1._nationkey = T2.n_regionkey INNER JOIN r_name AS T4 ON T3.r = T4.r _regionkey",-5.264677661542756,3,0,0,30 2792,"List date of the review of the Eagle Capital from Indianapolis, Indiana.",SELECT T2.Date FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Product = 'Eagle Capital' AND T1.city = 'Indianapolis' AND T1.state_abbrev = 'IN',"SELECT T1.`state_abbrev Database: retail_complains` FROM district AS T1 INNER JOIN reviews AS T2 WHERE T2.Product = 'Indianapolis, Indiana' AND T1.city = 'Eagle Capital'",-7.862758322536512,2,0,0,21 2793,"From 1/3/97 to 8/10/97, how many orders were shipped via Federal Shipping?",SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate BETWEEN '1997-03-01 00:00:00' AND '1997-10-08 23:59:59',"SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE SUBSTR(T2.CompanyName, 1, 8) = 'Federal Shipping'",0.4758588517160416,6,0,0,30 2794,List all the order numbers along with its product name for each order under the sales team of 'Douglas Tucker'.,"SELECT DISTINCT T1.ProductID, T1.`Product Name` 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 T3.`Sales Team` = 'Douglas Tucker'",SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T2.`Sales Team` = 'Douglas Tucker' AND T2.SalesTeamID = 1,-2.038403202048143,6,0,0,30 2795,How many orders were shipped in 1994?,"SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994'","SELECT COUNT(l_orderkey) FROM lineitem WHERE strftime('%Y', l_shipdate) = '1994'",0.763628122700934,7,1,1,28 2796,What is the percentage of the increase of complaints filed by the clients from New York from the year 2016 to the year 2017?,"SELECT 100.0 * (SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2017' THEN 1 ELSE 0 END) - SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END)) / SUM(CASE WHEN strftime('%Y', T2.`Date received`) = '2016' THEN 1 ELSE 0 END) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'New York City'","SELECT CAST(SUM(IIF(T1.city = 'New York', 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 '2017%'",-2.7463801915100112,3,0,0,30 2797,How many Japanese cars weigh more than 2000 lbs?,SELECT 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 T3.country = 'Japan' AND T1.weight > 2000,SELECT SUM(CASE WHEN T3.country = 'Japan' THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.`origin Database: cars` = T1 . country INNER JOIN countries AS T4 ON T4.origin = T5.country WHERE T4.`country` = '2000',-5.4431855437386645,30,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 2799,Who was taking charge of orders from Morristown?,"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 = 'Morristown'",SELECT CAST(SUM(CASE WHEN T2.TerritoryDescription = 'Morristown' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`TerritoryID Database: retail_world` = T2 . TerritoryID INNER JOIN Territorie AS T3 ON T3.TID = T4.Tid WHERE T1.LastName = 'Middle',-6.966164262639576,26,0,0,30 2800,How much did customer 103 pay in total?,SELECT SUM(t.amount) FROM payments t WHERE t.customerNumber = '103',SELECT SUM(t.amount) FROM payments t WHERE t.customerNumber = '103',4.085250513239161,3,1,1,27 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 2802,Which product has the highest net profit in 2019?,"SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/19' ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1",SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ProcuredDate LIKE '2019%' ORDER BY T1.`Unit Price` DESC LIMIT 1,1.8496845453835373,1,0,0,29 2803,What is the name of the customer who purchased the product with the highest net profiit?,"SELECT `Customer Names` FROM ( SELECT T1.`Customer Names`, T2.`Unit Price` - T2.`Unit Cost` AS ""net profit"" FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY `net profit` DESC LIMIT 1",SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID ORDER BY T2.`net profiit` DESC LIMIT 1,-0.4282136568314078,1,0,0,24 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 2806,Calculate the total quantity of products purchased by customer called Adrian.,SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Adam',SELECT CAST(SUM(CASE WHEN T1.FirstName = 'Adrian' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T2.CustomerID = T1 .CustomerID,1.873809633663702,5,0,0,24 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 2808,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,1.2546552821978771,3,1,1,30 2809,"What is the difference in order number from ""WARE-MKL1006"" and ""WARE-NBV1002""?","SELECT SUM(IIF(WarehouseCode = 'WARE-MKL1006', 1, 0)) - SUM(IIF(WarehouseCode = 'WARE-NBV1002', 1, 0)) AS difference FROM `Sales Orders`",SELECT CAST(SUM(CASE WHEN OrderNumber = 'WARE-MKL1006' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OrderNumber) FROM `Sales Orders`,2.145573487060982,1,0,0,30 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 2811,What is the name and marketing segment of the customer with the total order price of 199180.63?,"SELECT T2.c_name, T2.c_mktsegment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 199180.63","SELECT T2.c_name, T3.mktsegment FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2._custid WHERE T1.`o_totalprice` = 199180.63",-2.210490978898107,20,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 2813,What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL?,"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.`Date received` = '2017-03-27' AND T2.server = 'MICHAL'",SELECT t3.server FROM client AS t1 INNER JOIN callcenterlogs AS t2 ON t1.client_id = t2.`rand client` WHERE T1.middle = 'MICHAL' AND T2.`Date received` = '2017-03-27',0.1288540852652371,9,0,0,26 2814,How many orders were made by Alan Barnes in 2015 at the Central superstore?,"SELECT COUNT(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` = 'Alan Barnes' AND STRFTIME('%Y', T2.`Order Date`) = '2015'",SELECT SUM(CASE WHEN T1.`Customer Name` = 'Alan Barnes' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`Customer ID = T2.`Customer ID` WHERE T2.Order Date LIKE '2015%',-1.9560366815870323,2,0,0,30 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 2816,What percentage of restaurants are from the Bay Area?,"SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city","SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city",5.860834093080811,1,1,1,28 2817,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,30 2818,List the cities where the product 'Mishi Kobe Niku' were shipped to.,SELECT T1.ShipCity FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.ProductName = 'Mishi Kobe Niku',SELECT CAST(COUNT(CASE WHEN T2.ProductName = 'Mishi Kobe Niku' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID`,-2.864478555931943,4,0,0,30 2819,"What kind of restaurants can be found at ""106 E 25th Ave""?",SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_num = 106 AND T2.street_name = 'e 25th ave',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = '106 E 25th Ave',4.528117285762832,1,0,0,29 2820,"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 ShipVia = 'United Package' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(CompanyName) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID,-1.12908887511121,19,0,0,27 2821,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 FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10979 ORDER BY SUM(T2.UnitPrice) DESC LIMIT 1,-1.3335553270045688,4,0,0,30 2822,"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 AND T2.CustomerID = 'Customer',3.2223925919679752,8,0,0,30 2823,How many customers in the Northeast use Microsoft email?,SELECT COUNT(T1.email) 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 = 'Northeast' AND T1.email LIKE '%@outlook.com',SELECT COUNT(T1.`email Database: retail_complains`) 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 = T3StateCode WHERE T3.Region = 'Northeast' AND T4.StateCode = 'Microsoft',-7.207792322737358,3,0,0,30 2824,"Among the customers with an account balance lower than 4000, what is the percentage of the customers in the US?","SELECT CAST(SUM(IIF(T2.n_name = 'United States', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 4000","SELECT CAST(SUM(IIF(T2.n_name = 'US', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2.N_NATIONkey INNER JOIN ( SELECT MAX(c_acctbal) FROM nation )",1.9683439396742881,5,0,0,23 2825,"Which part is ordered in a bigger amount in order no.1, ""burnished seashell gainsboro navajo chocolate"" or ""salmon white grey tan navy""?","SELECT T.p_name FROM ( SELECT T2.p_name, SUM(T1.l_quantity) AS num FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name IN ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate') GROUP BY T1.l_partkey ) AS T ORDER BY T.num DESC LIMIT 1","SELECT T.p_name FROM ( SELECT IIF(l_orderkey = 1, 1, 0)) AS T ORDER BY T.l_extendedprice * T.quantity DESC LIMIT 1",-1.5902899011407161,2,0,0,29 2826,"What is the total cost of all the ""Road-650, Red, 60"" products that Abraham E. Bennet sold?","SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Abraham' AND T1.MiddleInitial = 'e' AND T1.LastName = 'Bennet' AND T3.Name = 'Road-650 Red, 60'","SELECT CAST(SUM(IIF(T2.Name = 'Abraham', 1, 0)) AS REAL) * 100 / COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 WHERE T3.ProductID = 'E.Bennet'",1.0289182174513263,2,0,0,28 2827,Which is the origin country of the $44274.40748 car?,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 WHERE T1.price = 44274.40748,SELECT T5.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country WHERE T1.`price Database: cars` = '44274.40748',-6.102708380981822,1,0,0,30 2828,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.6891604973320729,3,0,0,28 2829,"What is the average age of clients whose complaint type is ""TT""?",SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT',SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT',1.8048142885668323,1,1,1,27 2830,How many cases of billing dispute issues occurred in the Mountain division?,SELECT COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.Issue = 'Billing disputes' AND T3.division = 'Mountain',SELECT CAST(COUNT(CASE WHEN T2.division = 'Billing disputes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Issue) FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.`client_id`,-4.254446470368129,13,0,0,25 2831,How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?,SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon',"SELECT CAST(SUM(IIF(T3.p_name = 'smoke turquoise purple blue salmon', 1, 0)) AS REAL) * 100 / COUNT(T1.l_linenumber) FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.ls_suppkey = T2.ps_supponpkey INNER JOIN part AS T3 ON T2._ps_partkey = TS_part_key WHERE T1._l_shipdate = '1996-07-07' AND T3.s_supplycost = 1",-4.094114604701565,2,0,0,30 2832,When was the $32650.65157 car introduced to the market? State the year.,SELECT T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '32650.65157',"SELECT CAST(SUM(IIF(T1.model = '32650.65157', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",2.007436152784067,7,0,0,30 2833,"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' AND Country = 'Brazil',1.4586266601456062,1,0,0,27 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 2836,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",-2.7904586981989534,2,0,0,26 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 2838,How many product names have order quantity less than 50? Calculate the percentage of orders less than 50 out of total order quantity.,"SELECT SUM(CASE WHEN T2.Quantity < 50 THEN 1 ELSE 0 END) , CAST(SUM(IF(T2.Quantity < 50, 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID",SELECT CAST(SUM(CASE WHEN T2.Quantity < 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`ProductID Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,-7.371785985985322,2,0,0,30 2839,What is the detailed position of the store which has order SO - 000115?,"SELECT T2.Latitude, T2.Longitude FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderNumber = 'SO - 000115'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderNumber = 'SO - 000115' THEN T2.`City Name` END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,-1.5772538288490812,4,0,0,26 2840,Who is the customer from the West region that received the highest discount?,SELECT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' ORDER BY T1.Discount DESC LIMIT 1,SELECT T3.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Region = 'West' ORDER BY T2.Discount DESC LIMIT 1,3.7695194864265575,1,0,0,29 2841,What is the stock value of every condiments?,SELECT T1.UnitPrice * T1.UnitsInStock FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,"SELECT CAST(SUM(IIF(T2.CategoryID = 'Condiments', 1, 0)) AS REAL) * 100 / COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.Categories = T2.Categories",-6.227244918459764,1,0,0,27 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 2843,"Of the clients whose businesses are located in the city of Boston, calculate which of them has a higher average amount of payment.",SELECT T1.customerNumber FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.city = 'Boston' GROUP BY T1.customerNumber ORDER BY SUM(T2.amount) / COUNT(T2.paymentDate) DESC LIMIT 1,"SELECT CAST(SUM(IIF(T2.city = 'Boston', 1, 0)) AS REAL) * 100 / COUNT(T1.addressLine1) FROM customers AS T1 INNER JOIN payments AS T2 ON T1.salesRepEmployeeNumber = T2.customerNumber WHERE t1.customerName = 'Businesses' AND t2.amount > ( SELECT AVG(amount) FROM payments )",0.7568607915703595,2,0,0,30 2844,How many states are in the Midwest region?,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Region = 'Midwest' THEN State ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL,"SELECT COUNT(DISTINCT T) FROM ( SELECT IIF(Region = 'Midwest', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL",1.3217547339426032,7,1,1,29 2845,Calculate the total payment of orders for Vegie-spread product.,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) AS sum FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Vegie-spread',SELECT SUM(CASE WHEN T2.ProductName = 'Vegie-spread' THEN SUM(UnitPrice * Quantity) THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID,0.3561458983001247,2,0,0,30 2846,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 ( SELECT MAX(Salary) FROM Employees WHERE EmployeeID = 2 GROUP BY T1.EmployeeID ORDER BY COUNT(T2.TerritoryID) DESC LIMIT 2 ),-3.9779282197703494,9,0,0,30 2847,"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,28 2848,List the full name of all employees who work in the Northern region.,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Northern'",SELECT DISTINCT T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID` = T2.`TerritoryID Database: retail_world` INNER JOIN Region AS T3 ON T2.RegionID = T3._RegionID WHERE T1.FirstName = 'Northern',-7.288378578744136,1,0,0,27 2849,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 `Sales Orders` WHERE `Order Quantity` = 4 AND `City Name` = 'Profit' ORDER BY Population DESC LIMIT 4",-0.7215514969816677,3,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 2851,What is the social number of the person who made the most complaints?,SELECT T1.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T1.client_id ORDER BY COUNT(T1.client_id) DESC LIMIT 1,SELECT T4.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID ORDER BY COUNT(T1.social) DESC LIMIT 1,-4.528373763082929,2,0,0,30 2852,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,29 2853,Please give the name of the customer who has made the single order with the highest total price.,SELECT T2.c_name 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 T_name FROM ( SELECT T2.c_name, COUNT(T1.o_orderkey) AS num FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = STRFTIME('%Y', T1) ) AS T ORDER BY T.num DESC LIMIT 1",-6.83089997285062,3,0,0,30 2854,"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,25 2855,List the name of the top ten most ordered product's names in descending order of the number of orders.,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID GROUP BY T3.ProductName ORDER BY COUNT(*) DESC LIMIT 10,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.`OrderID Database: retail_world` ORDER BY T2.Count DESC LIMIT 1,-6.212220994510703,27,0,0,29 2856,"Among the USA employess, how many of them has PhD title of courtesy?",SELECT COUNT(Country) FROM Employees WHERE TitleOfCourtesy = 'Dr.' AND Country = 'USA',SELECT COUNT(*) FROM Employees WHERE Country = 'USA' AND TitleOfCourtesy = 'PhD',2.3689406737320424,1,0,0,22 2857,Give the name and phone number of the customers who have more than 9000 account balance.,"SELECT c_name, c_phone FROM customer WHERE c_acctbal > 9000","SELECT c_name, c_phone FROM customer WHERE c_acctbal > 9000",3.62879618453073,1,1,1,26 2858,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,24 2859,Which product received a review from Indianapolis on 2016/10/7?,SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07',SELECT Product FROM reviews WHERE T1.Date = '2016-10-7' AND T2.city = 'Indianapolis',-4.145538206342118,1,0,0,30 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 2861,What is the number of complaints related to Credit cards came from female clients?,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T2.Product = 'Credit card',SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T3.Product = 'Credit card',-5.375829263345084,23,0,0,25 2862,How much higher is the salary of Andrew Fuller than that of Nancy Davolio?,SELECT ( SELECT Salary FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) - ( SELECT Salary FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' ) AS RESULT,"SELECT ( SELECT Salary FROM Employees WHERE FirstName = 'Andrew' AND LastName IN ('Nancy', 'Davolio') ) AS RESULT",-1.3216871176193825,6,0,0,30 2863,Give the full name of the youngest employee.,"SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM Employees )","SELECT FirstName, LastName FROM Employees WHERE BirthDate = ( SELECT MAX(BirthDate) FROM employees )",3.5186760542029063,12,1,1,29 2864,What was the review context from Jacksonville on 2017/7/22?,SELECT T1.Reviews FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Jacksonville' AND T1.Date = '2017-07-22',"SELECT CAST(SUM(IIF(T2.city = 'Jacksonville', 1, 0)) AS REAL) * 100 / COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.`Date` = '2017-07-22'",-4.546663294494362,6,0,0,28 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 2866,Calculate the average salary per order for Andrew Fuller.,SELECT CAST(SUM(T1.Salary) AS REAL) / COUNT(T2.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller',"SELECT CAST(SUM(IIF(T2.FirstName = 'Andrew' AND Fuller = 'Fuller' , 1, 0)) AS REAL) * 100 / COUNT(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID",-5.314458867396094,2,0,0,27 2867,List the phone number of company named Around the Horn.,SELECT Phone FROM Customers WHERE CompanyName = 'Around the Horn',SELECT Phone FROM Customers WHERE CompanyName = 'Around the Horn',3.318757801366626,1,1,1,25 2868,Which product was ordered the most in 2018?,SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._ProductID ORDER BY COUNT(T1._ProductID) DESC LIMIT 1,SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ProcuredDate LIKE '2018%' ORDER BY T1.`Order Quantity` DESC LIMIT 1,1.8496845453835373,1,0,0,30 2869,Indicate the address of the restaurant with the most popular reviews.,"SELECT T2.street_num, T2.street_name 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_num, T2.`street_name` FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = TO_RESTUAN",-5.503697933593612,22,0,0,30 2870,"How many items shipped by REG AIR were ordered on March 22, 1995?",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 = 'REG AIR' AND T1.o_orderdate = '1995-03-22',"SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipmode = 'REG AIR' AND STRFTIME('%Y', T2.l_shipdate) = '1995' AND T1.o_orderpriority = '2-REPLACE'",0.4819679058404019,5,0,0,30 2871,Find the net profit of the floral products which were delivered in 2021.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.DeliveryDate LIKE '%/%/21' AND T2.`Product Name` = 'Floral'",SELECT DISTINCT T3.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.ProcuredDate LIKE '2021%',0.10136714078796377,3,0,0,30 2872,Provide the name of the contact person who made the orders that shipped to Switzerland.,SELECT T1.ContactName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.ShipCountry = 'Switzerland' GROUP BY T1.ContactName,"SELECT CAST(SUM(IIF(T2.ShipCountry = 'Switzerland', 1, 0)) AS REAL) * 100 / COUNT(T1.ContactName) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2 .CustomerID",1.6001746864401742,9,0,0,26 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 2874,"List the review and label of the restaurants in Mission Blvd., Hayward.","SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd'","SELECT T1.review, T1.`street_name Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T2.id_restaurant = 1 INNER JOIN city AS T3 ON T3.city = T4.city WHERE T3.`city` = 'Mission Blvd' AND T5.review = 'Hayward'",-6.318352947942509,2,0,0,20 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 2876,List line items shipped by truck with delivery time before 1997.,"SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'truck'","SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_discount = 0",-1.820384351336439,7,0,0,25 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 2878,Who is the clerk in charge of handling the item with the highest amount of extended price?,SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T2.l_extendedprice DESC LIMIT 1,SELECT T3.l_suppkey FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey INNER JOIN l_partsupp AS T3 ON T2.ls_partkey = L_DELIVERMODE_LINEITEM ORDER BY T_extendedprice DESC LIMIT 1,-5.84297753791151,12,0,0,29 2879,How many types of restaurants are there in the Yosemite and Mono Lake area?,SELECT COUNT(T2.food_type) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'yosemite and mono lake area',SELECT COUNT(t2.food_type) FROM geographic AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.region = 'yosemite and mono lake area',3.9846145286515617,5,1,1,21 2880,"Give the home phone number of the employee who is in charge of ""Savannah"" territory.",SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Savannah',"SELECT CAST(SUM(IIF(T2.TerritoryDescription = 'Savannah', 1, 0)) AS REAL) * 100 / COUNT(T1.HomePhone) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID",-1.6352386278566313,2,0,0,30 2881,Identify the customer and list down the country with the check number GG31455.,"SELECT t2.customerName, t2.country FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.checkNumber = 'GG31455'","SELECT t2.customerName, t3.country FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2._customerNumber WHERE t1.`checkNumber` = 'GG31455'",-2.3101306110437156,2,0,0,24 2882,"Among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation?","SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2015' AND T2.`Timely response?` = 'Yes' AND T2.`Company response to consumer` = 'Closed with explanation'",SELECT CAST(SUM(CASE WHEN T1.`Date received Database: retail_complains` LIKE '2015%' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 WHERE T2.`Company response to consumer` = 'Cancelled',-8.047605895907626,22,0,0,29 2883,"What is the comment of the product ""burlywood plum powder puff mint""?",SELECT p_comment FROM part WHERE p_name = 'burlywood plum powder puff mint',SELECT p_comment FROM part WHERE p_type = 'burlywood plum powder puff mint',2.3013381203749566,1,0,1,23 2884,How many territory fall into region 1?,SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1,SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1,2.105871600676612,1,1,1,30 2885,How many employees is a UK citizen and are they all covering the same region?,"SELECT COUNT(T1.EmployeeID), T3.RegionID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Country = 'UK' GROUP BY T3.RegionID",SELECT COUNT(*) FROM ( SELECT DISTINCT CASE WHEN T3.RegionID = 'UK' THEN 1 ELSE 0 END) AS num FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.`TerritoryID Database: retail_world` GROUP BY T2.Country HAVING COUNT(T1.Country) == 2,-7.616423867465872,26,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 2888,"What is the address of the client who made a complaint via postal mail on March 14, 2012?","SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2012-03-14' AND T2.`Submitted via` = 'Postal mail'","SELECT T3.address_1 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail' AND strftime('%Y', T1.`Date received`) = '2012'",2.1452275941201613,2,0,0,28 2889,List all the states in the South region.,SELECT state FROM state WHERE Region = 'South',SELECT state FROM state WHERE Region = 'South',0.6118702182052002,1,1,1,20 2890,"How many clients who live in New York City have the complaint outcome as ""AGENT""?",SELECT COUNT(T2.`rand client`) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.city = 'New York City' AND T2.outcome = 'AGENT',SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'AGENT',0.9117418772558709,1,0,0,30 2891,"Please state the segment, the name, the address, and the phone number of customer number 3.","SELECT c_mktsegment, c_name, c_address, c_phone FROM customer WHERE c_custkey = 3","SELECT c_mktsegment , c_address, c_phone FROM customer WHERE c_custkey = 3",0.6506063118499886,1,0,0,24 2892,Calculate the difference in the average retail price of parts shipped via ship and air.,"SELECT (CAST(SUM(IIF(T3.l_shipmode = 'SHIP', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'SHIP', 1, 0))) - (CAST(SUM(IIF(T3.l_shipmode = 'AIR', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'AIR', 1, 0))) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey","SELECT CAST(SUM(IIF(T3.l_shipmode = 'Ship', 1, 0)) AS REAL) * 100 / COUNT(T1.p_partkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T2.ps_partsupp = T1.psupp INNER JOIN lineitem AS T3 ON T1._ps_suppkey = T3.L_superpkey INNER JOIN l_orderkey AS T4 ON T4.ls_linenumber = T5.LLAVE",-6.100944112856051,26,0,0,30 2893,Calculate the average number of complaints received from New Bedford each year which are closed with explanation.,"SELECT STRFTIME('%Y', T3.`Date received`) , CAST(SUM(CASE WHEN T3.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T3.`Complaint ID`) AS average 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.city = 'New Bedford' GROUP BY strftime('%Y', T3.`Date received`)",SELECT CAST(SUM(CASE WHEN T2.`Company response to consumer` = 'Closed with explanation' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client Database: retail_complains` = T2.client_id INNER JOIN events IS NOT NULL,-9.461559887628859,2,0,0,30 2894,Which country has the most restaurants with Italian food?,SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1,SELECT t3.county FROM generalinfo AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city WHERE T1.food_type = 'Italian',-1.6500518151744514,1,0,0,23 2895,How much more is the Florida store's computer product unit price than the Texas store?,SELECT SUM(CASE WHEN T3.State = 'Florida' THEN T2.`Unit Price` ELSE 0 END) - SUM(CASE WHEN T3.State = 'Texas' THEN T2.`Unit Price` ELSE 0 END) 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 T1.`Product Name` = 'Computers',SELECT CAST(SUM(CASE WHEN T2.`City Name` = 'Texas' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.StoreID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID,-0.8213153717523144,2,0,0,24 2896,"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 TID, TerritoryDescription, T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`TerritoryID Database: retail_world` LIKE 'Mrs%' AND T1.LastName = 'Margaret Peacock'",-6.011086441725961,1,0,0,30 2897,How many orders in total have the customers in the household segment made?,SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD',"SELECT SUM(IIF(T2.c_mktsegment = 'HOUSEHOLD', 1, 0)) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey",1.562808558931033,4,0,0,26 2898,How many American food restaurants are unpopular in Carmel?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' ),SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel',4.392452881735614,1,0,0,26 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 2900,List out 3 customer numbers who have highest amount payment,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3,SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3,4.234867299213488,1,1,1,23 2901,"List down the territory IDs, descriptions and region description which are under the in-charge of Nancy Davolio,","SELECT T3.RegionID, 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.LastName = 'Davolio' AND T1.FirstName = 'Nancy'","SELECT TID, TerritoryDescription, T3.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`TerritoryID Database: retail_world` LIKE 'Nancy%' AND T1.LastName = 'Davolio'",-6.385629646230415,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 2903,Indicate the name of the parts without discount.,SELECT T3.p_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 WHERE T2.l_discount = 0.0000,"SELECT T.p_name FROM ( SELECT T1.ps_partkey, T2.l_discount FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1._ps_suppkey = T2._suppepkey ) AS T WHERE T IS NOT NULL",-4.487466812277615,2,0,0,30 2904,"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.5286709337041559,2,0,0,28 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 2906,What percentage of customers from the African region is in the household segment?,"SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD'",SELECT CAST(SUM(CASE WHEN T2.r_name = 'AFRICA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.c_custkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2._regionkey INNER JOIN customer AS T3 ON T3.s_nationkey = t2._cockkey WHERE T3.`c_mktsegment = 'HOUSEHOLD',-1.8754704112512832,3,0,0,28 2907,List any five parts name in Medium Plated Brass.,SELECT p_name FROM part WHERE p_type = 'MEDIUM PLATED BRASS' LIMIT 5,SELECT p_name FROM part WHERE p_type = 'Medium Plated Brass' LIMIT 5,4.767476196887096,1,1,1,20 2908,"Who order from the west region on August 12, 2013, and received a discount of 0.2?",SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order Date` = '2013-08-12' AND T1.Discount = 0.2 AND T1.Region = 'West',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.Discount = 0.2,2.607581230486063,1,0,0,27 2909,What is the total price of Ikura ordered in order no. 10273?,SELECT T2.UnitPrice * T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10273,-0.3254323452750006,1,0,0,30 2910,Indicate the address of the company Eastern Connection whose contact name is Ann Devon.,SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon',SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName == 'Ann Devon',3.536627834455715,5,1,1,29 2911,"In the calls from the mountain division, how many are from teenage clients?",SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain',SELECT COUNT(T1.`age Database: retail_complains`) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.division = 'mountain' AND T1 . age < 19,-8.268275754883064,23,0,0,23 2912,How many different orders with a total price greater than 4000 are cancelled?,SELECT COUNT(DISTINCT T1.orderNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.quantityOrdered * T1.priceEach > 4000 AND T2.status = 'Cancelled',SELECT SUM(CASE WHEN priceEach > 4000 THEN 1 ELSE 0 END) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.ordernumber = T2.orderNumber WHERE t2.status = 'Cancelled',2.209865697917207,4,0,0,25 2913,Compute the total order quantity for Uncle Bob's Organic Dried Pears so far.,SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName LIKE 'Uncle Bob%s Organic Dried Pears',SELECT CAST(SUM(CASE WHEN T1.ProductName = 'Uncle Bob' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.`ProductID` = T2.ProductID,-2.612458619094989,8,0,0,30 2914,Calculate the difference in the average number of low-priority orders shipped by truck in each month of 1995 and 1996.,"SELECT (CAST(SUM(IIF(STRFTIME('%Y', T2.l_shipdate) = 1995, 1, 0)) AS REAL) / 12) - (CAST(SUM(IIF(STRFTIME('%Y', T2.l_shipdate) = 1996, 1, 0)) AS REAL) / 12) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderpriority = '5-LOW' AND T2.l_shipmode = 'TRUCK'","SELECT CAST(SUM(IIF(T2.l_shipmode = 'TRUCK', 1, 0)) AS REAL) / 12 FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2._orderkey WHERE T1._orderdate BETWEEN '1995-01-01' AND '1996-12-31'",-5.428485702132666,2,0,0,30 2915,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',-2.265256409573786,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 2918,"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_mfgr = 'manufacturer3' AND T1.`ps_supplycost` = 1000,-2.2070412497515837,7,0,0,26 2919,How many days was the fastest shipping of Berglunds snabbkp's order?,"SELECT datediff(T2.ShippedDate, T2.OrderDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Berglunds snabbkp' ORDER BY datediff(T2.ShippedDate, T2.OrderDate) LIMIT 1",SELECT ( SELECT COUNT(OrderDate) FROM Orders WHERE CompanyName = 'Berglunds snabbkp' ) AS days FROM Customers,-0.35236962251988824,5,0,0,30 2920,What are the names of the products that were discountinued?,SELECT ProductName FROM Products WHERE Discontinued = 1,SELECT ProductName FROM Products WHERE Discontinued = 1,4.109981628474669,1,1,1,21 2921,"List the first names of the employees who take the orders that ship to the city of ""Reims"".",SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCity = 'Reims',SELECT COUNT(T1.FirstName) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T2.ShipCity = 'Reims',3.5560793506710375,7,0,0,30 2922,To whom does Nancy Davolio report? Please give that employee's full name.,"SELECT FirstName, LastName FROM Employees WHERE EmployeeID = ( SELECT ReportsTo FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' )","SELECT FirstName, LastName FROM Employees WHERE ReportsTo = 'Nancy' AND FirstName = 'Davolio'",4.5226768319117365,1,0,0,28 2923,"What is the discounted price of the part ""burnished seashell gainsboro navajo chocolate"" in order no.1?",SELECT T1.l_extendedprice * (1 - T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate' AND T1.l_orderkey = 1,SELECT T3.p_extendedprice * (1 - T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T2.ps_partkey = T1._partkey WHERE T1.`l_orderkey` = 'burnished seashell gainsboro navajo chocolate',-2.0405339615292597,6,0,0,27 2924,How many orders were shipped by the sales team with the highest amount of shipped orders in 2020? Give the name of the said sales team.,"SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.ShipDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1",SELECT SUM(CASE WHEN T2.`Sales Team` = 'Shipped' AND T1.OrderNumber = 2020 THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team ` AS T2 ON T2.SalesTeamID = T1._Sales TeamID,-1.9794311975897187,11,0,0,25 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 2926,What are the top 2 order keys of the item with the highest amount of extended price?,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2,2.804678555558904,1,1,1,25 2927,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 T3.supplierID FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` ORDER BY T2.suppliers LIMIT 1,-7.051911652039675,29,0,0,29 2928,List all of the restaurant addresses from an unknown region.,SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'unknown',SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 WHERE T1.region = 'unknown',-2.691684400587926,10,0,0,26 2929,Pick 5 clients with 0 priority and write down their last name.,SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5,SELECT T3.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5,1.0467524689851344,1,0,0,30 2930,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,-1.2170429074852793,4,0,0,30 2931,"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 = 'Speedy Express' 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,2.199991808609684,3,0,0,26 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 2933,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 SUM(CASE WHEN T1.`Order Quantity` = 2 AND 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._Sales TeamID,-0.1933380117114509,1,0,0,26 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 2935,Which district did the review on 2018/9/11 come from? Give the name of the city.,"SELECT T2.district_id, T2.city FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Date = '2018-09-11'",SELECT T2.district_id FROM reviews AS T1 INNER JOIN district AS T2 WHERE T1.Date = '2018-09-11',3.6229839631336405,1,0,0,30 2936,"What is the average, highest and lowest annual payments collected between 1/1/2003 to 12/31/2005?","SELECT CAST(SUM(T1.amount) AS REAL) / 3, MAX(T1.amount) , MIN(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate BETWEEN '2003-01-01' AND '2005-12-31'","SELECT CAST(SUM(IIF(T1.paymentDate = '2003-01-01', 1, 0)) AS REAL) / 12, AVG(t1.amount) FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2._customerNumber WHERE t2.customerName = 'Sales Rep'",-3.7878371724095143,1,0,0,29 2937,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 WHERE T2.Quantity = 1,-3.365982375485491,8,0,0,30 2938,Lists the last name of all clients who made a PS-type complaint and were served by TOVA.,SELECT t1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS' AND T2.server = 'TOVA',SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1._client_id = T2.`rand client` WHERE T2.server = 'TOVA',-0.7096963896567167,20,0,0,30 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 2941,"What product was ordered in the Central region on April 26, 2018, and shipped by April 27, 2018?",SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order Date` = '2018-04-26' AND T1.`Ship Date` = '2018-04-27' AND T2.Region = 'Central',"SELECT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T1.Order = 'Central' AND T2.Region = 'April 26, 2018, 27'",1.5302735986398466,2,0,0,30 2942,Which division is Diesel Galloway in?,SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Diesel' AND T1.last = 'Galloway',SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 WHERE T1.first = 'Diesel' AND T1 . last = 'Galloway',2.1192755527327165,13,0,0,26 2943,"Which customer ordered 'Global High-Back Leather Tilter, Burgundy' on 10/13/2013 in 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` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Global High-Back Leather Tilter, Burgundy' AND T1.`Order Date` = '2013-10-13' AND T1.Region = 'East'","SELECT CASE WHEN T1.`Customer Name` = 'Global High-Back Leather Tilter, Burgundy' AND T1.Region = 'East' AND STRFTIME('%Y', T2.`Order Date`) = '2013'",0.5592075243825755,7,0,0,27 2944,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,28 2945,How many clients who live in Kansas City provided a 1-star review?,SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Kansas City' AND T1.Stars = 1,SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.city = 'Kansas City',0.7065216521694689,16,0,0,28 2946,List the top five most costly products in 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.OrderDate LIKE '1998%' ORDER BY T3.UnitPrice + T1.Freight DESC LIMIT 5,SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID INNER JOIN Products AS T3 WHERE T1.Freight = '1998',-6.9595603017927585,27,0,0,30 2947,State the shipping company of order id 10260.,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260,SELECT T4.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.`ShipperID` WHERE T2.OrderID = 10260,-0.8962676017539492,20,0,0,30 2948,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(UnitPrice * Quantity) FROM Orders WHERE OrderDate LIKE '1997%',1.6228526382968775,1,0,0,30 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 2950,Which car in the database provides the best crash protection based on its weight? How much is it?,"SELECT T1.ID, T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.weight DESC LIMIT 1",SELECT T2.`car` FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T3.price DESC LIMIT 1,-4.2871092849504695,11,0,0,30 2951,"State the full name of state code ""GA"".","SELECT T FROM ( SELECT IIF(StateCode = 'GA', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL",SELECT T FROM ( SELECT CASE WHEN StateCode = 'GA' THEN State ELSE NULL END AS T FROM Regions ) WHERE T IS NOT NULL,1.3623138452974015,2,1,1,28 2952,What is the price of the car ID 15?,SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.ID = 15,SELECT CAST(SUM(T2.price) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,0.2085139253604226,8,0,0,30 2953,How many products with the highest expected profits were sold in total?,SELECT SUM(t2.quantityOrdered) FROM orderdetails AS t2 INNER JOIN ( SELECT t1.productCode FROM products AS t1 ORDER BY t1.MSRP - t1.buyPrice DESC LIMIT 1 ) AS t3 ON t2.productCode = t3.productCode,SELECT SUM(MSRP) FROM products ORDER BY quantityOrdered DESC LIMIT 1,2.179008899013895,1,0,0,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 2956,How many Sales Rep who are working in Tokyo? List out email and full name of those employees.,"SELECT T1.firstName, T1.lastName, T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Tokyo' AND T1.jobTitle = 'Sales Rep'","SELECT email, officeCode FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2._officeCode WHERE T2.city = 'Tokyo' AND t1.jobTitle = 'Sales Rep'",-2.6143360660544914,7,0,0,28 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 2958,How many employees have territories in the Eastern region?,SELECT COUNT(DISTINCT T1.FirstName) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern',SELECT COUNT(T1.`FirstName Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2 . EmployeeID INNER JOIN Region AS T3 WHERE T2.RegionDescription = 'Eastern' AND T3.RegionID = 3,-7.592003373447921,26,0,0,29 2959,"List down the company names which supplied products for the order on 14th August, 1996.",SELECT T1.CompanyName 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 INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE date(T4.OrderDate) = '1996-08-14',SELECT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.`SupplierID Database: retail_world` = T2._SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3._ProductID WHERE T3.OrderDate = '1996-08-14',-7.832107132186857,24,0,0,29 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 2961,What is the price and name of the product bought by Erica Xu?,"SELECT T3.Price, T3.Name FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.FirstName = 'Erica' AND T2.LastName = 'Xu'","SELECT CAST(SUM(IIF(T2.FirstName = 'Erica' AND T2.MiddleInitial = 'Xu', 1, 0)) AS REAL) * 100 / COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.`ProductID`",-0.2963562322365328,3,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 2963,"In 1997, how many orders were shipped via mail?","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1997' AND l_shipmode = 'MAIL'","SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1997'",-0.8426600349667056,1,0,0,28 2964,List down the customer ids who placed order with Michael Suyama.,SELECT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama',SELECT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T3.FirstName = 'Michael',-5.3371630310500455,26,0,0,27 2965,Which line item with the highest quantity is shipped by air?,SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'AIR' ORDER BY l_quantity DESC LIMIT 1,SELECT l_linenumber FROM lineitem WHERE l_shipmode = 'AIR' ORDER BY l_quantity DESC LIMIT 1,4.258242642939207,1,1,1,23 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 2967,Please give the name of customers from the West region that bought exactly 8 items in their purchase.,SELECT DISTINCT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Quantity = 8 AND T1.Region = 'West',SELECT DISTINCT T3.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Quantity = 8 AND T2.Region = 'West',2.9020898784705276,1,0,0,29 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 2969,"Among the cars from Asia, list the IDs of cars that were introduced in 1979.",SELECT T1.ID FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Japan' AND T1.model_year = 1979,SELECT CAST(COUNT(T1.ID) AS REAL) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.`country` = 'ASIA',-3.931947721174569,27,0,0,30 2970,How many orders have asked for the product Tofu?,SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Tofu',SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2._ProductID WHERE T2.ProductName = 'Tofu',-1.8155350398081034,8,0,0,25 2971,What is the percentage of complaints about the late fee issue whose priority is 2 in 2017?,"SELECT CAST(SUM(CASE WHEN T1.priority = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2017'","SELECT CAST(SUM(CASE WHEN T1.`priority Database: retail_complains` = '2' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON STRFTIME('%Y', T1.Date received) = '2017' AND T2.priority = 2",-6.271829088534468,26,0,0,30 2972,What is the percentage of restaurants that serve American food in Dublin city?,"SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'","SELECT CAST(SUM(IIF(food_type = 'american', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo",3.9611480402210963,1,0,0,21 2973,At what numbers on 9th Avenue of San Francisco there are restaurants?,SELECT id_restaurant FROM location WHERE City = 'san francisco' AND street_name = '9th avenue',SELECT COUNT(id_restaurant) FROM location WHERE street_name = 'san francisco' AND City = '9th Avenue',2.8082433803178715,1,0,0,21 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 2975,"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 = 2 WHERE T1.`street_name` = 'Sanuki Restaurant'",0.3375802060752131,1,0,0,24 2976,"Among the elderlies, state the last name of whose complaint is handled in server YIFAT?",SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.age > 65 AND T2.server = 'YIFAT',SELECT T5.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'YIFAT',-1.1069580811889554,5,0,0,28 2977,What is the average number of items shipped each day in April of 1994?,SELECT AVG(l_linenumber) FROM lineitem WHERE l_shipdate BETWEEN '1994-01-01' AND '1994-01-30',"SELECT AVG(l_linenumber) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) > '1994'",-0.21093836228077392,2,0,0,30 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 2980,What is the name of the country of the supplier with the highest debt?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_suppkey DESC LIMIT 1,"SELECT T.n_name FROM ( SELECT IIF(T1.s_acctbal < 0, 1, 0)) AS T ORDER BY T.debt DESC LIMIT 1",-3.114773582230331,2,0,0,24 2981,"Compare the number of orders between ""Platters"" and ""Serveware"" products.","SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' THEN 1 ELSE 0 END) AS num1 , SUM(CASE WHEN T2.`Product Name` = 'Serveware' THEN 1 ELSE 0 END) AS num2 FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID",SELECT SUM(CASE WHEN T2.`Product Name` = 'Platters' AND T1.OrderNumber = 'Serveware' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID,2.581172504512851,3,0,0,28 2982,Calculate the percentage of part supply that costs more than 500.,"SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp","SELECT CAST(SUM(IIF(PS_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp",3.603645213563409,1,1,1,18 2983,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 Orders WHERE CompanyName = 'Hanna Moos' AND OrderDate LIKE '1999%',0.0861601498979176,2,0,0,30 2984,How many customers are in the automobile market segment?,SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE',SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE',4.519123996368745,1,1,1,24 2985,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 CAST(SUM(IIF(T1.TerritoryDescription = 'Eastern', 1, 0)) AS REAL) * 100 / COUNT(T2.RegionDescription) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID",1.1134076702100297,8,0,0,24 2986,"How many ""Mountain-500 Black 42"" were sold in total?","SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Mountain-500 Black, 42'","SELECT SUM(IIF(T1.Name = 'Mountain-500 Black 42', 1, 0)) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",-2.3701126980858707,28,0,0,30 2987,How many cars with horsepower greater than 200 were produced in 1975?,SELECT COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower > 200 AND T2.model_year = 1975,SELECT SUM(T1.horsepower) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '200%',-3.8948066562173125,27,0,0,27 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 2989,"List the ID, city, state and region for the store type which is fewer between borough and CDP.","SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.State, T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.Type = 'Borough' OR T2.Type = 'CDP'","SELECT DISTINCT T2.StoreID, T2.`City Name`, T3.`Type` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2._StateCode WHERE T1.`StateCode` BETWEEN 'BORough' AND 'CDP'",0.09475349674558084,1,0,0,22 2990,"Among the orders made by customers in Germany, which one of them has the highest priority in delivery? Please give its order key.",SELECT T3.o_orderkey 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' ORDER BY T3.o_orderdate LIMIT 1,SELECT T3.o_orderkey FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2._custkey INNER JOIN orders AS T3 ON T2.c_name = 'GERMANY',-2.5898828602946686,6,0,0,26 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 2992,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 T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1`Product ID` = T2.`ProductID` WHERE T1.`Ship Date` = '2013',-5.159431893196466,3,0,0,26 2993,What is the discounted price of line item number 1?,SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1,SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1,2.652892691530507,1,1,1,26 2994,"Of the 10 products with the highest unit price, identify by their ID the ones that have generated the least satisfaction.","SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1","SELECT ProductID FROM Products ORDER BY ReorderLevel ASC, UnitPrice DESC LIMIT 1",2.8484145429441825,10,1,1,30 2995,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 T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T2.Country = 'Finland',1.1069541153227727,9,0,0,28 2996,Please list the names of all the suppliers for parts under Brand#55.,SELECT 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 T1.p_brand = 'Brand#55',SELECT T3.s_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partsupp = T2.psupp INNER JOIN supplier AS T3 ON T2->ps_suppkey = T3._supppkey INNER JOIN s_name = 'Brand#55',-1.0892309054893985,1,0,0,29 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 2998,What proportion of suppliers are from Asia?,"SELECT CAST(SUM(IIF(T1.r_name = 'ASIA', 1, 0)) AS REAL) * 100 / COUNT(T1.r_regionkey) 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",SELECT CAST(SUM(CASE WHEN T2.n_name = 'ASIA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.s_nationkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey ++,-1.5119729582124017,1,0,0,28 2999,"Among all customers handled by Innes E. del Castillo, how many have purchased Short-Sleeve Classic Jersey, L?","SELECT 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 = 'Innes' AND T3.LastName = 'del Castillo' AND T1.Name = 'Short-Sleeve Classic Jersey, L' AND T3.MiddleInitial = 'e'","SELECT SUM(CASE WHEN T1.Name = 'Short-Sleeve Classic Jersey, L' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1._ProductID = T2.ProductID INNER JOIN Employees AS T3 ON T3.MiddleInitial = T4.EmployeeID WHERE T2.`CustomerID` = 'Innes E' AND T3.`FirstName` != 'Del Castillo'",-3.017234819743065,9,0,0,23 3000,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 T1.mpg DESC LIMIT 1,-3.0041628850079487,1,0,0,26 3001,What is the name of product with the ID of 77?,SELECT ProductName FROM Products WHERE ProductID = 77,SELECT ProductName FROM Products WHERE ProductID = 77,4.109981628474669,1,1,1,23 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 3004,"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'",2.2596842923273663,2,1,1,30 3005,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 Database: retail_complains`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Complaint ID` WHERE T2.issue = 'ARBITRAND',-6.692540615111923,21,0,0,25 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 3008,How many restaurants have not obtained a minimum of 3 in their reviews?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3,SELECT COUNT(id_restaurant) FROM generalinfo WHERE review < 3,1.8943045553992333,1,1,1,29 3009,State the name of all territories in Northern region.,SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern',SELECT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON TID = T2.RegionID WHERE T3.RegionDescription = 'Northern',-5.2787274376960465,9,0,0,30 3010,On which day was the most verbose complaint received?,SELECT `Date received` FROM callcenterlogs WHERE ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ),SELECT ser_time FROM callcenterlogs WHERE received = 'Date received',2.8740612650930815,1,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 3012,Write the shipping company name with the telephone number of (503) 555-9931.,SELECT CompanyName FROM Shippers WHERE Phone = '(503) 555-9931',SELECT CompanyName FROM Shippers WHERE Phone = '555-9931',-0.17853740024672535,2,0,0,24 3013,How do I contact the President of the company?,SELECT t.email FROM employees t WHERE t.jobTitle = 'President',SELECT t.email FROM employees t WHERE t.jobTitle = 'President',3.65589063220448,2,1,1,28 3014,In which segment does the customer who purchased the product from the east superstore with the highest original price belong?,SELECT T2.Segment 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` = T1.`Product ID` WHERE T1.Region = 'East' ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1,SELECT T3.`Segment Database: superstore` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Region = 'east' ORDER BY T2.Region DESC LIMIT 1,-4.509209114008369,1,0,0,26 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 3016,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 < 16947.7 AND l_returnflag = 'R',2.77001298584903,1,0,0,28 3017,List the names of non-US suppliers that have discontinued.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA',SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.Country = 'US',-3.3149362946358347,27,0,0,30 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 3019,What is the name of the least popular Indian restaurant on Shattuck Avenue in Berkeley?,SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'berkeley' AND T2.street_name = 'shattuck ave' AND T1.food_type = 'Indian restaurant' ORDER BY T1.review LIMIT 1,SELECT MIN(`Indian restaurant`) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id3 WHERE T3.street_name = 'Shattuck Avenue in Berkeley' AND T5.food_type = 'Indian Restaurant' LIMIT 1,1.1837605835012317,2,0,0,23 3020,"What is the name of the supplier that provides the part ""hot spring dodger dim light"" with the lowest supply cost?",SELECT T2.s_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light' ORDER BY T1.ps_supplycost LIMIT 1,"SELECT T.s_name FROM ( SELECT T1.ps_name, T2.p_supplycost FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1._ps_suppkey = T2._s_supponpkey INNER JOIN part AS T3 ON T2[p_partkey='hot spring dodger dim light' LIMIT 1 ) AS T ORDER BY T.size DESC LIMIT 1",-3.519029426796448,1,0,0,30 3021,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.Customer ID WHERE T1.Region = 'West' AND T2.`Ship Mode` = 'Second Class',1.0885333420689454,9,0,0,28 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 3023,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 client WHERE district_id = 'Midwest' GROUP BY city ORDER BY COUNT(district_id) DESC LIMIT 1,2.664505489248376,1,0,0,30 3024,What does the one and only 24-hour diner's name?,SELECT label FROM generalinfo WHERE food_type = '24 hour diner',SELECT label FROM generalinfo WHERE food_type = '24 hour diner',4.341428898147528,1,1,1,25 3025,"Among the listed winery, what is the street number of the winery named ""Tulocay Winery""?",SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery',"SELECT CAST(SUM(IIF(T2.food_type = 'Tulocay Winery', 1, 0)) AS REAL) * 100 + SUM(T1.street_num) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id3 WHERE T3.label = 'winery'",-3.426866184193606,2,0,0,26 3026,How many kinds of products did order No. 10252 contain?,SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252',SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252',4.368543554303919,1,1,1,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 3028,"What is the average supply cost for the part ""hot spring dodger dim light""?",SELECT AVG(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.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_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1._suppkey = T2.s_supponkey",-5.605557070904415,2,0,0,28 3029,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 Database: retail_world` = T2.SupplierID WHERE T1.ProductName = 'Camembert Pierrot',-6.312414497843066,1,0,0,27 3030,List down the territory IDs and descriptions existed in Southern region.,"SELECT T1.TerritoryID, T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern'","SELECT DISTINCT TerritoryID, TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID WHERE T2.RegionDescription = 'Southern'",1.3016334326971237,9,0,0,30 3031,List out the phone number of the shipping company of order id 10296.,SELECT T2.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260,SELECT T3.Phone FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.`ShipperID` WHERE T2.OrderID = 10296,-2.094442666998902,4,0,0,28 3032,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' ),1.7853683217430938,3,0,0,30 3033,"Among the cars introduced in 1977, provide the names and the horse powers of cars from Europe.","SELECT T1.car_name, T1.horsepower 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 = 1977 AND T3.country = 'Europe'","SELECT t1.car_name, t2.horsepower FROM data AS t1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS t3 ON T3.origin = 'Europe' AND t3.country = 'USA'",-2.7390736318036506,21,0,0,26 3034,Please list the id and detailed position of all stores in Birmingham city.,"SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham'","SELECT StoreID, Latitude, Longitude FROM `Store Locations` WHERE `City Name` = 'Birmingham'",2.3106369194595886,1,1,1,25 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 3036,What category does the item ordered by Katherine Murray on 11/4/2018 in the South region belong to?,SELECT DISTINCT T3.Category 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` = 'Katherine Murray' AND T1.`Order Date` = '2018-11-04' AND T2.Region = 'South',SELECT T2.Category FROM south_superstore INNER JOIN people AS T1 INNER JOIN product AS T2 ON T1.`Customer ID` = T2.`Product ID` WHERE T1.Order = 'Katherine Murray on 11/4/2018' AND T3.Region = 'South',0.12528819525812668,4,0,0,29 3037,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 T3.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Issue` = 'Balance transfer',-1.5630698359695399,4,0,0,23 3038,"Among all the orders made by Aimee Bixby, what was the longest shipment time?","SELECT MAX(strftime('%J', `Ship Date`) - strftime('%J', `Order Date`)) AS longestTimeDays FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby'",SELECT MAX(CASE WHEN T1.`Customer Name` = 'Aimee Bixby' THEN 1 ELSE 0 END) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1`.`Customer ID = T2.`Customer ID`,-0.2648606872147669,5,0,0,30 3039,Please list the phone numbers of the top 3 customers that have the highest credit limit and have Leslie Jennings as their sales representitive.,SELECT t1.phone FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Leslie' AND t2.lastName = 'Jennings' ORDER BY t1.creditLimit DESC LIMIT 3,SELECT phone FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.firstName = 'Leslie' ORDER BY t1.creditLimit DESC LIMIT 3,4.96786840555125,1,0,0,30 3040,Name 10 products that were shipped first class from the East region.,SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'First Class' AND T2.Region = 'East' LIMIT 10,SELECT DISTINCT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Region = 'East' ORDER BY T1.Ship Mode DESC LIMIT 10,3.1625686651456877,1,0,0,30 3041,How many suppliers are from UK?,SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK',SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'UK',3.1970396822459666,1,1,1,23 3042,Lists the name of the product and customer who placed an order on 10/21/18 and it was delivered on 11/21/19.,"SELECT T3.`Product Name`, 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 WHERE T2.OrderDate = '10/21/18' AND T2.DeliveryDate = '11/21/19'",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.`Customer Names` = 'Delivery on 10/21/18' THEN T2.`Product Name` ELSE NULL END 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 IS NOT NULL,-3.274738084680363,3,0,0,24 3043,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 DISTINCT T2.FirstName, T3.MiddleInitial, T4.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.`SalesPersonID` = 5",-3.6000964672684757,10,0,0,27 3044,"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.2039261181143077,2,0,0,30 3045,What is the name of the customer number 93697 with the total order price of 191918.92?,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 191918.92 AND T1.o_custkey = 93697,SELECT T3.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T1.`o_totalprice` = 191918.92,1.9603940754107838,1,0,0,29 3046,What is the average annual amount of shipped sales from 1997 to 1998?,SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / 3 FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.ShippedDate BETWEEN '1996-01-01 00:00:00' AND '1998-12-31 23:59:59',SELECT AVG(UnitPrice) FROM Orders WHERE ShippedDate BETWEEN '1997-01-01 00:00:00' AND '1998-12-31 23:59:59',-0.6713609581568171,2,0,0,30 3047,What is the name of the 24 hour diner at San Francisco?,SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco',SELECT label FROM generalinfo WHERE food_type = '24 hour diner' AND city = 'san francisco',2.8487650061513,1,1,1,26 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 3049,What is the most ordered products by customers?,SELECT T1.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY COUNT(*) DESC LIMIT 1,SELECT T2.`ProductID Database: retail_world` FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1. ProductID = T2.ProductID,-6.872334468999083,20,0,0,24 3050,"Customer No.129301 made an order on 1996/7/27, what was the delivery time for the first part of that order?",SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = '129301' AND T1.o_orderdate = '1996-07-27',"SELECT JULIANDAY(T2.l_receiptdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.s_partkey WHERE STRFTIME('%Y', T2.`l_shipdate) = '1996-07-27'",-0.6518080746759252,1,0,0,30 3051,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 WHERE T1.`ShipCountry` = 'America',-2.179209809046133,4,0,0,28 3052,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 )",3.705051389887467,8,1,1,30 3053,"From 2003 to 2004, how many customers have paid more than three times?","SELECT COUNT(customernumber) FROM ( SELECT customernumber FROM payments WHERE STRFTIME('%Y', paymentDate) >= '2003' AND STRFTIME('%Y', paymentDate) <= '2004' GROUP BY customernumber HAVING COUNT(customernumber) > 3 ) T",SELECT COUNT(customerNumber) FROM payments WHERE paymentDate BETWEEN '2003-01-01' AND '2004-04-30',4.844292648597046,1,0,0,28 3054,"Which employee handled the most amount of orders in 1996? Give the full name, title, and address of this employee.","SELECT FirstName, LastName, Title, address FROM Employees WHERE EmployeeID = ( SELECT T1.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderDate BETWEEN '1996-01-01 00:00:00' AND '1997-01-01 00:00:00' GROUP BY T1.EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 )","SELECT Title, Title, address FROM Employees WHERE EmployeeID = ( SELECT MIN(EmployeeID) FROM Orders WHERE OrderDate LIKE '1996%' )",-1.2967379608683427,3,0,0,27 3055,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,30 3056,Give the phone number of the customer with the highest account balance.,SELECT c_phone FROM customer ORDER BY c_acctbal DESC LIMIT 1,SELECT c_phone FROM customer ORDER BY c_acctbal DESC LIMIT 1,4.121762181981593,1,1,1,27 3057,How many labels of the restaurant have an unknown country?,SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown',SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2 . county = 'unknown',3.754517732943925,8,1,1,26 3058,List the supplier company names located in Germany.,SELECT CompanyName FROM Suppliers WHERE Country = 'Germany',SELECT CompanyName FROM Suppliers WHERE Country = 'Germany',4.352833908405115,1,1,1,25 3059,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 T2.`street_name Database: restaurant` FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id2 INNER JOIN geographic AS T3 WHERE T3.county = 'good heavens' AND T4.label = 'tuolumne county',-6.319773678033275,1,0,0,22 3060,How many sales people managed to sell Headlights - Weatherproof?,SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Headlights - Weatherproof',SELECT SUM(CASE WHEN T1.Name = 'Headlights - Weatherproof' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Sales AS T2 ON T2.ProductID = T1 . ProductID,2.0250755833862404,4,0,0,26 3061,"Write down the store IDs and region of the state ""Michigan"".","SELECT DISTINCT T2.StoreID, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'Michigan'","SELECT T2.`StoreID`, T3.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1._StateCode WHERE T1.State = 'Michigan'",0.1634557898597442,7,0,0,30 3062,"List the sales ID of the product with a quantity of 590 and named ""External Lock Washer 7"".",SELECT T1.SalesID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'External Lock Washer 7' AND T1.Quantity = 590,SELECT SalesID FROM Sales WHERE Quantity = 590 AND Name = 'External Lock Washer 7',1.329264663061764,1,0,0,30 3063,How many different clerks have served the customer with the address uFTe2u518et8Q8UC?,SELECT COUNT(T1.o_clerk) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_address = 'uFTe2u518et8Q8UC',"SELECT CAST(SUM(IIF(T2.c_mktsegment = 'UFTe2u518et8Q8UC', 1, 0)) AS REAL) * 100 / COUNT(T1.o_clerk) FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2. c_custk",-4.528458392514319,2,0,0,30 3064,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,29 3065,Name the item ordered by Jonathan Doherty with the highest quantity in the East region.,SELECT T3.`Product Name` 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` = T1.`Product ID` WHERE T2.`Customer Name` = 'Jonathan Doherty' AND T2.Region = 'East' ORDER BY T1.Quantity DESC LIMIT 1,"SELECT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Jonathan Doherty' AND T2.Region = 'East' ORDER BY T1.Quantity DESC LIMIT 1",0.9781505422866783,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 3067,Is (206) 555-1189 the home phone number for Laura Callahan?,SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan',"SELECT FirstName, HomePhone FROM Employees WHERE LastName = 'Laura Callahan'",4.298199345715208,1,0,0,30 3068,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,30 3069,How many female clients are there older than 30?,SELECT COUNT(sex) FROM client WHERE sex = 'Female' AND age > 30,SELECT COUNT(sex) FROM client WHERE sex = 'Female' AND age > 30,2.5920570122251765,1,1,1,25 3070,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.OrderDate LIKE '2016%',-4.923674279787766,8,0,0,30 3071,"Please list the names of all the products under the type ""promo brushed steel"".",SELECT p_name FROM part WHERE p_type = 'PROMO BRUSHED STEEL',SELECT p_name FROM part WHERE p_type = 'PROMO BRUSHED STEEL',4.644831429257246,1,1,1,24 3072,Mention the supplier country of Ipoh Coffee and the order ID which had maximum in total payment.,"SELECT T3.Country, T1.OrderID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Suppliers AS T3 ON T2.SupplierID = T3.SupplierID WHERE T2.ProductName = 'Ipoh Coffee' ORDER BY T1.UnitPrice * T1.Quantity * (1 - T1.Discount) DESC LIMIT 1","SELECT T2.`SupplierID Database: retail_world`, T1.OrderID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1ProductID = T2.ProductID INNER JOIN Suppliers AS T3 WHERE T3.Country = 'Ipoh Coffee' AND T4.ProductName = 'SupplierID' ORDER BY SUM(T2.Quantity) DESC LIMIT 1",-6.907800382865532,26,0,0,29 3073,List street names in San Francisco city.,SELECT street_name FROM location WHERE city = 'San Francisco',SELECT street_name FROM location WHERE city = 'san francisco',3.7378363639173835,1,1,1,27 3074,Complaint about Credit Card mostly came from clients of which age group?,"SELECT SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END), SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adult , SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elder FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'",SELECT DISTINCT T2.`Product Database: retail_complains` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.`age` = '5-Age Group' AND T3.Product = 'Credit Card',-6.108693625167567,19,0,0,22 3075,"Which order has a higher priority, order no. 4 or order no. 36?","SELECT l_orderkey FROM lineitem WHERE l_orderkey IN (4, 36) ORDER BY l_shipdate DESC LIMIT 1",SELECT l_orderkey FROM lineitem WHERE l_discount = 4 AND l_shipinstruct = 36,1.8479901920356567,1,0,0,30 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 3077,What is the region with the most customers?,"SELECT T.r_name FROM ( SELECT T3.r_name, COUNT(T2.c_custkey) AS num 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 GROUP BY T3.r_name ) AS T ORDER BY T.num DESC LIMIT 1",SELECT 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.c_regionkey = ( SELECT MAX(c_acctbal) FROM region ),-3.2920300701848446,2,0,0,27 3078,Which employee has created the least order and please indicates the employee's title?,SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.OrderID) LIMIT 1,SELECT T3.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID ORDER BY T2.OrderID DESC LIMIT 1,-3.1031622085842745,1,0,0,30 3079,How many 2003 Harley-Davidson Eagle Drag Bikes were ordered?,SELECT SUM(t2.quantityOrdered) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productName = '2003 Harley-Davidson Eagle Drag Bike',SELECT COUNT(MSRP) FROM products WHERE productVendor = '2003 Harley-Davidson Eagle Drag Bikes' AND quantityOrdered = 1,3.9376490554194468,1,0,0,29 3080,What is the full address of Andr Fonseca?,"SELECT Address, City, Region, PostalCode, Country FROM Customers WHERE ContactName = 'Andr Fonseca'","SELECT Address, City, Country, Region, ContactName FROM Customers WHERE Country = 'Andr Fonseca'",1.0823534933735277,1,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 3084,"What is the difference in price between HL Mountain Frame - Black, 42 and LL Mountain Frame - Black, 42?","SELECT ( SELECT Price FROM Products WHERE Name = 'HL Mountain Frame - Black, 42' ) - ( SELECT Price FROM Products WHERE Name = 'LL Mountain Frame - Black, 42' ) AS num","SELECT ( SELECT Price - Price) FROM Products WHERE Name = 'HL Mountain Frame - Black, 42'",2.3677047488566285,1,0,0,30 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 3086,Which customer have the biggest purchase in one order and where does this order being ship to?,"SELECT T1.CompanyName, T2.ShipCountry 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 T1.CompanyName, T2.ShipCountry ORDER BY COUNT(T3.ProductID) DESC LIMIT 1","SELECT T4.CompanyName, T3.ShipCountry FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID Database: retail_world` INNER JOIN `Order Details` AS T3 ON T2.OrderID = 3 ORDER BY SUM(T3.ProductID) DESC LIMIT 1",-7.461839152403407,3,0,0,30 3087,"Calculate the revenue produced through sales of HL Road Frame - Red, 56.","SELECT SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'HL Road Frame - Red, 56'","SELECT CAST(SUM(IIF(T1.Name = 'HL Road Frame - Red, 56', 1, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductId",-0.5499218186035933,18,0,0,29 3088,How many checks were issued by Euro+ Shopping Channel in the year 2004?,"SELECT COUNT(T1.checkNumber) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE customerName = 'Euro+ Shopping Channel' AND STRFTIME('%Y', T1.paymentDate) = '2004'",SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2004%' AND customerName = 'Euro+ Shopping Channel',4.824515869777131,1,0,0,23 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 3090,Which sales representatives in New York city whose leader is Anthony Bow with the employee number is 1143? Indicate their employee numbers.,SELECT T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.reportsTo = 1143 AND T2.city = 'NYC',SELECT T1.employeeNumber FROM employees AS T1 INNER JOIN offices AS T2 ON T1._officeCode = T2.officeCode WHERE t2.city = 'New York City' AND t1.reportsTo = 1143,-1.2931041270132566,1,0,0,27 3091,How many companies do ship Northwind's orders?,SELECT COUNT(ShipperID) FROM Shippers,SELECT COUNT(ShipperID) FROM Shippers,4.233836292305277,1,1,1,27 3092,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 T2.p_partkey, T3.s_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = t2.l_sup pkey INNER JOIN part AS T3 ON T2._partkey = T3->p_partsupp INNER JOIN supplier AS T4 ON T3(T4.mfgr) = T5 ORDER BY T4.n_nationkey DESC LIMIT 1",-3.537191646984111,3,0,0,30 3093,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',2.0029301643565813,1,0,0,21 3094,What percentage do items under the category of 'Furniture' make up the total number of items ordered that are shipped as standard in the West region?,SELECT CAST(SUM(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' AND T1.`Ship Mode` = 'Standard Class',SELECT CAST(SUM(CASE WHEN T3.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T1.Ship Mode = 'Standard' AND T2.Region = 'West',-3.1992149342394853,5,0,0,29 3095,In which counties can you find the restaurant with the highest number of branches?,SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1,SELECT MAX(T2.county) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY COUNT(T1.label) DESC LIMIT 1,3.837807344733347,7,0,0,30 3096,"How many of the employees have the last name ""Ringer"" ?",SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer',SELECT COUNT(EmployeeID) FROM Employees WHERE LastName = 'Ringer',5.573354715830862,1,0,0,27 3097,"Among the products, how many of them were discontinued in production?",SELECT COUNT(*) FROM Products WHERE Discontinued = 1,SELECT COUNT(*) FROM Products WHERE Discontinued = 1,3.169412411033504,1,1,1,28 3098,Which country does supplier No.34 come from?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 34,"SELECT T.n_name FROM ( SELECT IIF(T1.s_suppkey = 34, 1, 0)) AS T ORDER BY T.num DESC LIMIT 34",-3.6536339104071147,3,0,0,30 3099,What is the full name of the employees who report to the Sales Manager?,"SELECT FirstName, LastName FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )","SELECT Title, ReportsTo FROM Employees WHERE FirstName = 'Sales Manager'",1.4902795071254626,1,0,0,30 3100,"What is the division of the review of 5 stars received on December 17, 2017 for the product Eagle National Mortgage?",SELECT T1.division FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5 AND T2.Date = '2017-12-17' AND T2.Product = 'Eagle National Mortgage',"SELECT T2.`division Database: retail_complains` FROM district AS T1 INNER JOIN reviews AS T2 ON district_id = T2.district_id WHERE T1.division = 'Eagle National Mortgage' AND strftime('%Y', T1.`Date`) = '2017'",-5.409578781764534,30,0,0,30 3101,Name the customers from the Eastern region whose orders cost above 80000.,SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' AND T1.Sales / (1 - T1.Discount) * T1.Quantity - T1.Profit > 80000,SELECT DISTINCT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.Sales > 80000 AND T2.Region = 'East',2.3410103590925604,1,0,0,29 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 3103,"Among the ""Mountain-500 Black"" product types, which type was purchased the most?","SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Mountain-500 Black%' GROUP BY T2.Quantity, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1",SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Name = 'Mountain-500 Black' THEN T2.Quantity DESC LIMIT 1 ) WHERE T IS NOT NULL,-1.5516756505153713,2,0,0,30 3104,Calculate the percentage salary of employees who handled orders shipped in 1996.,"SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' THEN T1.Salary ELSE 0 END) AS REAL) * 100 / SUM(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID",SELECT CAST(SUM(CASE WHEN T2.ShippedDate LIKE '1996%' 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,4.971881718085221,1,0,0,27 3105,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 T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.` Customer ID` WHERE T1.Order ID = 1,-0.7454593665413578,6,0,0,29 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 3107,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.2705874056800041,4,0,0,24 3108,"How many stores with less need for products, and purchased through a distributor, are located in Washtenaw County?",SELECT SUM(CASE WHEN T1.`Order Quantity` = 1 AND T1.`Sales Channel` = 'Distributor' AND T2.County = 'Washtenaw County' 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` = 'Washtenaw County' THEN 1 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.4017521899157244,3,0,0,29 3109,"Among the cars originated from Japan, what is the name of the car with the highest price?",SELECT T4.car_name 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' ORDER BY T1.price DESC LIMIT 1,SELECT t2.car_name FROM price AS t1 INNER JOIN production AS t2 ON t1.ID = T2.ID INNER JOIN country AS t3 ON t3.origin = t2.`country Database: cars` INNER JOIN data AS t4 ON t4.id = T5.ID WHERE T3.country = 'Japan' ORDER BY T1.price DESC LIMIT 1,-6.010290686791661,1,0,0,23 3110,What is the full address of the office where 4 people work and one of them is Sales Representation?,"SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep'","SELECT addressLine1, addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t2.jobTitle = 'Sales Rep' LIMIT 4",3.5621020931869576,1,0,0,30 3111,What products are no longer sold by Northwind?,SELECT ProductName FROM Products WHERE Discontinued = 1,SELECT ProductName FROM Products WHERE Discontinued = 1,4.109981628474669,1,1,1,29 3112,"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 COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.`district_id Database: retail_complains` = T2 WHERE T2.city = 'Little Rock' AND T1.Date = '2012-04-04',-6.14988787386206,27,0,0,30 3113,How many restaurants in the city of Richmond serve Mediterranean food?,SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond',SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond',4.531202089984032,1,1,1,18 3114,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 3115,Indicate the name of the categories to which the products of order number 10933 belong.,SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T2.OrderID = 10933,SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID LIKE '10933%',-2.7129456010987854,6,0,0,29 3116,What is the average quantity of Ikura ordered in one order?,SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura',SELECT CAST(SUM(CASE WHEN T1.ProductName = 'Ikura' THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.`ProductID` = T2.ProductID,-3.7692452459338996,5,0,0,29 3117,"Which car is the cheapest? Provide its acceleration, number of cylinders, and producing year.","SELECT T1.acceleration, T1.cylinders, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN price AS T3 ON T3.ID = T2.ID ORDER BY T3.price ASC LIMIT 1","SELECT T2.acceleration, T2.`model_year Database: cars` FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2._ID INNER JOIN price AS T3 ON T3.`price` = T4.price WHERE T3.price = 0.01",-6.013901925123429,20,0,0,25 3118,What is the percentage of restaurants in the Bay Area region that scored over 4 for the review rating?,"SELECT CAST(SUM(IIF(T2.review > 4, 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 RIGHT JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area'","SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city",5.860834093080811,1,0,0,28 3119,What is the phone number of all companies where the last name of the contact person starts with the letter M and are not from Germany?,SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany',SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany',0.8713189122432852,4,1,1,21 3120,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 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.c_name = '106936',-4.7438656300750965,13,0,0,28 3121,Through which companies have products been shipped the most times to the city of Aachen?,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCity = 'Aachen' GROUP BY T2.CompanyName ORDER BY COUNT(T1.ShipVia) DESC LIMIT 1,SELECT DISTINCT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`ShipCity` = 'Aachen',-2.2548507996289806,12,0,0,30 3122,"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.` Product ID`",-1.6967071165378371,2,0,0,20 3123,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,3.002682675873511,1,0,0,25 3124,Which company supplies Gula Malacca?,SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gula Malacca',SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T1.ProductName = 'Gula Malacca',0.38427295255284355,8,0,0,29 3125,How many cities are there in Monterey?,SELECT COUNT(DISTINCT city) FROM geographic WHERE region = 'monterey',SELECT COUNT(city) FROM geographic WHERE region = 'monterey',3.1970396822459666,1,0,0,20 3126,How many American cars have an acceleration time of less than 12 seconds?,SELECT 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 T3.country = 'USA' AND T1.acceleration < 12,SELECT SUM(CASE WHEN T1.`acceleration Database: cars` > 12 THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T4.country,-6.754165679744572,3,0,0,27 3127,How many sales orders were processed by the store located in Chandler in 2020?,SELECT SUM(CASE WHEN T2.`City Name` = 'Chandler' AND T1.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.`City Name` = 'Chandler' AND T1.OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T2.StoreID = T1._StoreID,1.788927512266779,19,1,1,28 3128,List all the dates of the urgent orders.,SELECT o_orderdate FROM orders WHERE o_orderpriority = '1-URGENT',SELECT o_orderdate FROM orders WHERE o_custkey = 'URGENT',4.160762766797156,1,0,0,28 3129,Please list all the years in which the car model Chevrolet Impala was introduced in the market.,SELECT DISTINCT T1.model_year FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.car_name = 'chevrolet impala',"SELECT CAST(SUM(IIF(T1.model_year = 'Chevrolet Impala', 1, 0)) AS REAL) * 100 / COUNT(T2.car_name) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID",-0.1143197178291864,12,0,0,12 3130,How many male clients born in the year 1977 were given priority 0 in their complaints?,SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.sex = 'Male' AND T2.priority = 0 AND T1.year = 1997,SELECT COUNT(sex) FROM client WHERE sex = 'Male' AND year = 1977,5.075961513451594,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 3132,"Identify the top customer of the store located in Gilbert, Arizona based on net profit associated with the customer relationship in 2019.","SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Gilbert' AND T2.ProcuredDate LIKE '%/%/19' ORDER BY REPLACE(T2.`Unit Price`, ',', '') - REPLACE(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 WHERE T2.ProcuredDate LIKE '%/%/19' AND T2.`Sales Channel` = 'Net Profit',1.2466195183339865,2,0,0,28 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 3135,"List down the customer IDs and names that start with alphabet ""W"".","SELECT DISTINCT CustomerID, `Customer Names` FROM Customers WHERE `Customer Names` LIKE 'W%' ORDER BY `Customer Names` DESC","SELECT DISTINCT CustomerID, Customer Names FROM Customers WHERE `Customer Names` LIKE 'W%'",2.156687594298648,1,0,0,30 3136,"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%',-4.287150986986426,3,0,0,30 3137,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,29 3138,Count the number of orders made from the store in city with population of 3000000 to 4000000.,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.Population BETWEEN 3000000 AND 4000000,SELECT COUNT(DISTINCT T) FROM ( SELECT CASE WHEN Population > 3000000 AND T2.`City Name` = 'City Name' THEN 1 ELSE 0 END) AS num FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID,-1.932322623221169,7,0,0,30 3139,What are the miles per gallon of the most expensive car?,SELECT T1.mpg FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1,"SELECT CAST(SUM(IIF(T1.mpg = 'gallon', 1, 0)) AS REAL) * 100 / COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",4.673794563252204,1,0,0,30 3140,What was the average unit price of products shipped via United Package in 1997?,SELECT AVG(T2.UnitPrice) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Shippers AS T3 ON T1.ShipVia = T3.ShipperID WHERE T1.OrderDate LIKE '1997%' AND T3.CompanyName = 'United Package',SELECT CAST(SUM(IIF(T2.`UnitPrice Database: retail_world`) = '1997' AND T1.ShipVia = 'United Package' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.CompanyName) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T2.OrderID = T1,-8.479857024189647,21,0,0,27 3141,Provide the product's name of the product with the highest sales in the South region.,SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'South' ORDER BY T1.Sales DESC LIMIT 1,SELECT T3.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T2.Region = 'South' ORDER BY T1.Sales DESC LIMIT 1,3.732993691872847,1,0,0,26 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 3143,Which country has the least number of suppliers?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey GROUP BY T1.s_nationkey ORDER BY COUNT(T1.s_name) LIMIT 1,SELECT T.n_name FROM ( SELECT MIN(s_suppkey) AS num FROM supplier ) AS T ORDER BY T.num LIMIT 1,-2.533206738816838,3,0,0,26 3144,Identify the total number of orders processed by Northwind employee named Andrew Fuller. What percent of those orders was shipped to Austria?,SELECT CAST(COUNT(CASE WHEN T2.ShipCountry = 'Austria' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Andrew' AND T1.LastName = 'Fuller',"SELECT CAST(SUM(IIF(T1.FirstName = 'Andrew', 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T2.ShipCountry = 'Austria'",4.114897028370638,1,0,0,30 3145,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.`Composition ID` WHERE T3.sex = 'Kendall' AND T4.ser_time BETWEEN '1994-01-01 00:00:00',-7.303856923262021,27,0,0,28 3146,What is the name of the product with the lowest quantity?,SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity 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.5550261655201945,3,0,0,27 3147,Calculate the percentage of suppliers in 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 WHERE T1.s_acctbal < 0","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",5.993761377124068,1,0,0,18 3148,How much lower in percentage is the unit price of Ikura in order no. 10273 than its standard unit price?,SELECT CAST((T1.UnitPrice - T2.UnitPrice) AS REAL) * 100 / T1.UnitPrice FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',SELECT CAST(SUM(Ikura) - SUM(UnitPrice) AS REAL) * 100 / COUNT(OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2ProductID WHERE T2.OrderID = 10273,0.6622590455844835,1,0,0,30 3149,What is the fastest car made by Japan?,SELECT T1.car_name 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 T3.country = 'Japan' ORDER BY T1.horsepower DESC LIMIT 1,"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 3150,Please indicate the total price of order key 32.,SELECT o_totalprice FROM orders WHERE o_orderkey = 32,SELECT o_totalprice FROM orders WHERE o_orderkey = 32,3.3453214991348648,1,1,1,27 3151,"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(T1.CustomerID = 'WHITC', 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.`CompanyName` = 'United Package'",0.3270907586187275,1,0,0,27 3152,Find and list the names of districts which has below-average stars for Eagle Capital.,SELECT T2.division FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T1.Stars > ( SELECT AVG(Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id ),SELECT T2.`district_id Database: retail_complains` FROM reviews AS T1 INNER JOIN district AS T2 WHERE T1.Product = 'Eagle Capital' AND T2.division = 'Energy' AND Stars < AVG(stars),-7.078212944111341,21,0,0,26 3153,"What are the names of the sales teams that have served to customer Apotheca, Ltd?","SELECT DISTINCT T3.`Sales Team` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T1.`Customer Names` = 'Apotheca, Ltd'","SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Team` = 'Apotheca, Ltd' 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",0.7359115478792885,3,0,0,27 3154,List the order key of the orders with a total price between 200000 and 300000.,SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000,SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000,2.2469881928827093,1,1,1,27 3155,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) * 100 / COUNT(*) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID",2.624381335086196,3,0,0,28 3156,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 orderNumber INNER JOIN customers AS customers ON customerNumber = customers.customerNumber WHERE status = '10383'",3.392276293078605,1,0,0,30 3157,"Among all the orders made by Aimee Bixby, how many of them chose the slowest delivery speed?",SELECT COUNT(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' AND T2.`Ship Mode` = 'Standard Class',SELECT CAST(COUNT(CASE WHEN T2.`Ship Mode` = 'Aimee Bixby' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.Customer ID,-1.3705279861765722,5,0,0,30 3158,List the name of the customer with the most number of order quantity from 2018 to 2020.,SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.OrderDate LIKE '%/%/18' OR T2.OrderDate LIKE '%/%/19' OR T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Order Quantity` DESC LIMIT 1,SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID WHERE T2.OrderDate LIKE '%/%/18' AND T2.`Sales Channel` = 'PostgreSQL',0.09985615049657981,21,0,0,30 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 3160,When was the latest date the items of order no.1 were shipped?,SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1,SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1,0.670119952358492,2,1,1,27 3161,How many reviews by people between 30 and 50 years include the word 'great'?,SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.age BETWEEN 30 AND 50 AND T1.Reviews LIKE '%great%',SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id WHERE T2.age BETWEEN 30 AND 50 AND 'great',4.4643899471637445,1,0,0,27 3162,How many sales representatives whose salaries are higher than 2000?,SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative',SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative',5.38936943880976,1,1,1,29 3163,How many suppliers from Egypt have a debit balance?,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 = 'EGYPT',SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 WHERE T2.n_name = 'Egypt',5.28343331655218,1,0,0,22 3164,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 T2.ProductID = T1 . ProductID,1.3548641478444603,9,0,0,28 3165,What product have the highest unit price and how many quantity have been being sold?,"SELECT T1.ProductName, T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.UnitPrice DESC LIMIT 1","SELECT ProductName, COUNT(ProductID) FROM Products ORDER BY ProductPrice DESC LIMIT 1",-2.6395965646161867,4,0,0,29 3166,Please list the home phone numbers of the employees who are in charge of the sales in the territories in the Eastern Region.,SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Eastern ' GROUP BY T1.HomePhone,SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`TerritoryID Database: retail_world` = T2.EmployeeID INNER JOIN Region AS T3 WHERE T3.RegionDescription = 'Eastern',-5.381086779264022,1,0,0,28 3167,How many restaurants can you find in Concord?,SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord',SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord',2.709032284535404,1,1,1,20 3168,"Among the cars over 3000lbs, how many of them cost less than $30000?",SELECT COUNT(T1.car_name) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.weight > 3000 AND T2.price < 30000,SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T3.price > 3000lbs,-5.627078172338501,25,0,0,29 3169,List all the customer company names and cities located in Canada.,"SELECT CompanyName, City FROM Customers WHERE Country = 'Canada'","SELECT CompanyName, City FROM Customers WHERE Country = 'Canada'",4.331591136744747,1,1,1,20 3170,What is the social number of the client who has the longest delay in his/her complaint? Calculate the days of delay and state the company's response to the consumer.,"SELECT T1.social , 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`)), T2.`Company response to consumer` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID ORDER BY 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`)) DESC LIMIT 1",SELECT MAX(T1.social) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` > '5-01-01',-4.102975224961659,17,0,0,28 3171,What is the full name of the Vice President of Sales. Give me the URL of his/her photo.,"SELECT FirstName, LastName FROM Employees WHERE Title = 'Vice President, Sales'","SELECT FirstName, LastName FROM Employees WHERE Title = 'Vice President, Sales'",2.0650389611742592,20,1,1,29 3172,How many complaints on credit cards in the year 2016 were filed by male clients?,"SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card'",SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',-0.8249026074120211,10,0,0,29 3173,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,1.9219253883098448,1,0,0,30 3174,List the name of the cars with model year 1975.,SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = 1975,SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 WHERE T2.model_year = 1975,-1.8894405633826532,25,0,0,30 3175,Find the percentage of products that were shipped from Burbank in 2018?,SELECT CAST(SUM(CASE WHEN T3.`City Name` = 'Burbank' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) 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 T2.OrderDate LIKE '%/%/18',SELECT CAST(SUM(CASE WHEN T3.`City Name` = 'Burbank' AND T2.`Order Quantity` = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1,-0.07499521110657757,5,0,0,29 3176,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.3785243778224379,8,0,0,22 3177,From which branch does the sales representative employee who made the most sales in 2005? Please indicates its full address and phone number.,"SELECT T3.addressLine1, T3.addressLine2, T3.phone 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 employees AS T4 ON T3.salesRepEmployeeNumber = T4.employeeNumber INNER JOIN offices AS T5 ON T4.officeCode = T5.officeCode WHERE STRFTIME('%Y', T2.orderDate) = '2005' AND T4.jobTitle = 'Sales Rep' ORDER BY T1.quantityOrdered DESC LIMIT 1","SELECT t1.addressLine1, t2.phone FROM orderdetails AS t1 INNER JOIN orders AS t2 INNER JOIN employees AS t3 ON t3.salesRepEmployeeNumber = t4.employeeNumber INNER JOIN offices AS t4 ON t4._officeCode = t5.officeCode INNER JOIN customerName AS t5 ON t6.customerName = 'Sales Rep' ORDER BY T1.quantityOrdered DESC LIMIT 1",-6.739660506057243,3,0,0,25 3178,Give the model year of the heaviest car.,SELECT 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 T3.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN ( SELECT DISTINCT CASE WHEN T1.`weight Database: cars` = '1.weight' THEN 1 ELSE NULL END AS T FROM production ),-6.099383748801278,1,0,0,30 3179,List out the product name of order which has unit cost of 781.22.,"SELECT T FROM ( SELECT DISTINCT IIF(T1.`Unit Cost` = 781.22, T2.`Product Name`, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Unit Cost` = 781.22 THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL,1.5710356224931565,1,0,0,28 3180,How many employees in total are in charge of the sales in the Eastern Region?,SELECT COUNT(T.EmployeeID) FROM ( SELECT T3.EmployeeID FROM Region AS T1 INNER JOIN Territories AS T2 ON T1.RegionID = T2.RegionID INNER JOIN EmployeeTerritories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.RegionDescription = 'Eastern' GROUP BY T3.EmployeeID ) T,SELECT COUNT(EmployeeID) FROM EmployeeTerritories AS EmployeeID WHERE T2.RegionDescription = 'Eastern',-2.8968491405405152,1,0,0,30 3181,List out the city name of states located in South region.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Region = 'South' THEN T2.`City Name` 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 T2.`City Name` = 'South' THEN T1.`State` ELSE NULL END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1._StateCode ) WHERE T IS NOT NULL,1.7905644975998625,5,0,0,24 3182,What was the issue that the client with the longest server time faced?,SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.ser_time = ( SELECT MAX(ser_time) FROM callcenterlogs ),SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID` WHERE T1.ser_time > T1 . ser_time,-2.773909533036712,5,0,0,27 3183,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,28 3184,List down the quantity per unit for products of Tokyo Traders.,SELECT T1.QuantityPerUnit 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) * 100 / COUNT(T1.QuantityPerUnit) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.Suppliers",-5.951662621342171,7,0,0,30 3185,What is the name of the product with the highest net profit?,"SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1","SELECT T3.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') DESC LIMIT 1",-0.6008300368733872,7,0,0,27 3186,List the name of all the products with order quantities greater than or equal to 10 in the central superstore that has been shipped by the slowest delivery method.,SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'Standard Class' AND T1.Quantity >= 10,SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.Quantity > 10 AND T2.Ship Mode = 'Standard Class',3.3855679887964443,1,0,0,26 3187,"List down the product IDs and names that include the word ""Outdoor"".","SELECT ProductID, T FROM ( SELECT ProductID , CASE WHEN `Product Name` LIKE '%Outdoor%' THEN `Product Name` ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL ORDER BY T DESC","SELECT TID, T Name FROM Products WHERE T1.`Product Name` = 'Outdoor'",0.3303720626032626,1,0,0,30 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 3189,Please indicate total order quantity of product Geitost and calculate the percentage of such product among all the order quantity.,"SELECT SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS sum , CAST(SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID",SELECT CAST(SUM(CASE WHEN T1.ProductName = 'Geitost' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Order Details`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.`ProductID` = T2.ProductID,-1.0377168043890084,5,0,0,29 3190,"In 1996, how many orders were from customers in the UK?","SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1996' AND T1.Country = 'UK'",SELECT COUNT(*) FROM Orders WHERE Country = 'UK' AND OrderDate LIKE '1996%',2.7136673198636334,1,0,0,30 3191,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.1270532971714715,10,0,0,29 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 3196,What is the average actual profit by 1937 Lincoln Berline?,SELECT SUM(T1.priceEach - T2.buyPrice) / COUNT(*) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productName = '1937 Lincoln Berline',"SELECT CAST(SUM(IIF(T1.productName = '1937 Lincoln Berline', 1, 0)) AS REAL) * 100 / COUNT(T2.MSRP) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T2.productCode = T1 .productCode WHERE T1.orderNumber = 1937",-4.440357243297671,3,0,0,30 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 3198,"Which Apollo Ltd customer's order number has the most expensive unit price, indicating the order date?","SELECT T1.OrderNumber, T1.OrderDate FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Apollo Ltd' ORDER BY T1.`Unit Price` 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` = 'Apollo Ltd' ORDER BY T1.`Unit Price` DESC LIMIT 1,3.7158780211919535,1,0,0,30 3199,Indicate the quantity of Blade products sold.,SELECT DISTINCT T2.Quantity FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Blade',"SELECT CAST(SUM(IIF(T1.Name = 'Blade', 1, 0)) AS REAL) * 100 / COUNT(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",2.799059887956628,3,0,0,22 3200,What was the original price of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?,SELECT DISTINCT T2.Sales / (1 - T2.Discount) 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(IIF(T2.`Product Name` = 'Xerox 1952', 1, 0)) AS REAL) * 100 / COUNT(T1.Order) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer Name` INNER JOIN product AS T3 ON T3.Product ID = T4.`Product ID` WHERE T1.Customer Name = 'Aimee Bixby' AND T2.Sales LIKE '2014-10%'",-5.818709527266238,3,0,0,30 3201,In which year did Around the Horn place the most orders?,"SELECT STRFTIME('%Y', T2.OrderDate) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Around the Horn' GROUP BY STRFTIME('%Y', T2.OrderDate) ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",SELECT CASE WHEN T1.CompanyName = 'Around the Horn' THEN T2.OrderDate DESC LIMIT 1,-2.791205686674114,2,0,0,30 3202,How many customers have the first name Abigail?,SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Abigail',SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Abigail',4.44142787490034,1,1,1,27 3203,What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer?,SELECT CAST(SUM(CASE WHEN T2.`Consumer consent provided?` = 'Consent provided' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Consumer consent provided?`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.first = 'Mason' AND T1.middle = 'Javen' AND T1.last = 'Lopez',SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer consent provided?` = 'Javen Lopez',-3.3641198284760874,1,0,0,28 3204,How many Credit Card complaints did Sharon handle?,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Product = 'Credit card' AND T1.server = 'SHARON',SELECT SUM(CASE WHEN T1.`server Database: retail_complains` = 'Sharon' THEN 1 ELSE 0 END) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1`Complaint ID = T2.`Com plaint ID` AND T2.Product = T3.Product,-6.54598638094513,22,0,0,26 3205,Please indicate store id in the state of California that have been applied 20% discount in store.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.State = 'California' AND T1.`Sales Channel` = 'In-Store' AND T1.`Discount Applied` = 0.2 THEN T2.StoreID END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL,SELECT CASE WHEN T2.State = 'California' AND T2.`Discount Applied` < 20 AND T1.`Sales Channel` = 'In-Store',1.6434780100879867,6,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 3207,What is the name of the most expensive car that was produced by the USA?,SELECT T4.car_name 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 DESC LIMIT 1,SELECT T3.car_name 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._country INNER JOIN data AS T4 ON T4.id = T5.ID WHERE T4.`country` = 'USA',-6.3868431442953,5,0,0,28 3208,How much did Petit Auto pay on 2004-08-09?,SELECT t1.amount FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Petit Auto' AND t1.paymentDate = '2004-08-09',SELECT ( SELECT MAX(amount) FROM payments WHERE customerNumber = 'Petit Auto' AND paymentDate LIKE '2004-08-09%' ) AS num FROM customers,3.8805374853045196,1,0,0,29 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 3211,How many times was Ford Maverick introduced to the market?,SELECT COUNT(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 Database: cars` = 'foord maverick',-7.894621802891718,18,0,0,25 3212,"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 T3.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.`CustomerID` WHERE T2.Freight > 20000,-1.0343322433610214,5,0,0,30 3213,"How many customers are there in Berlin, Germany?",SELECT COUNT(City) FROM Customers WHERE Country = 'Germany' AND City = 'Berlin',SELECT COUNT(Country) FROM Customers WHERE City = 'Berlin' AND Country = 'Germany',1.446395066214298,1,0,0,26 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 3215,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_supplycost = ( SELECT AVG(T3.b_brushedsteel) / 3) / 0.1",-3.9442740817673694,28,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 3217,"What is the name of the state that the client with the email ""skylar.ramirez@gmail.com"" lives in?",SELECT T3.state FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T3.email = 'skylar.ramirez@gmail.com',SELECT T2.`StateCode Database: retail_complains` FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 WHERE T3.email = 'skylar.ramirez@gmail.com',-5.381086779264022,1,0,0,26 3218,How many urgent orders did Clerk#000000001 handle in 1997?,"SELECT COUNT(o_orderkey) FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1997' AND o_clerk = 'Clerk#000000001' AND o_orderpriority = '1-URGENT'",SELECT COUNT(o_orderkey) FROM orders WHERE o_clerk = 'Clerk#000000001' AND o_orderdate LIKE '1997%',1.02151843010317,2,0,0,29 3219,"Who is the one representing the company ""Heli Swaren GmbH & Co. KG""?",SELECT ContactName FROM Suppliers WHERE CompanyName = 'Heli Swaren GmbH & Co. KG',SELECT ContactName FROM Suppliers WHERE CompanyName = 'Heli Swaren GmbH & Co. KG',3.338365914293825,1,1,1,26 3220,What is the name of the product that is most sold by sale person id 20?,SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 20 ORDER BY T2.Quantity DESC LIMIT 1,SELECT DISTINCT T3.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID WHERE T2.SalesPersonID = 20 ORDER BY T1.`Price` DESC LIMIT 1,-3.9790629250881473,8,0,0,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 3222,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 first, middle, last, phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` != 'Fax'",-1.9786339309284366,2,0,0,25 3223,Calculate the percentage of countries that belong to the American region.,"SELECT CAST(SUM(IIF(T1.r_name = 'America', 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey",SELECT CAST(SUM(CASE WHEN T1.r_name = 'American' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.n_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1._regionkey = T2. n_regionkey,-4.20670433745149,4,0,0,25 3224,"How many items were shipped on 4th December, 1993?",SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipdate = '1993-12-04',"SELECT COUNT(l_linenumber) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1993'",3.0263026622769997,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 3226,List the order for all in-store sales along with the products sold.,"SELECT DISTINCT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'In-Store'","SELECT DISTINCT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'In-Store'",1.67029871616069,8,1,1,28 3227,In which counties are there A&W Root Beer Restaurants?,SELECT DISTINCT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'a & w root beer',SELECT COUNT(T2.county) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERET1.label = 'A&W Root Beer Restaurants',-3.767905143358273,20,0,0,21 3228,Lists all parts supplied by Supplier#000000034.,SELECT T3.p_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T2.s_name = 'Supplier#000000034',SELECT T3.p_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_supponpkey INNER JOIN part AS T3 ON T2->p_partkey = UA_PART_KEY INNER JOIN s_name = 'Supplier#000000034',-2.780872041150714,3,0,0,30 3229,How many streets with restaurants are there in the Northern California region?,SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.region = 'northern california',SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.`city` = T2.city WHERE T1.region = 'northern california',-0.5324053968243672,6,0,0,10 3230,Calculate the difference in the average age of elderly and middle-aged clients in the Northeast region.,SELECT (CAST(SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age BETWEEN 35 AND 55 THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.age > 65 THEN T1.age ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END)) AS difference 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 = 'Northeast',SELECT CAST(SUM(CASE WHEN T2.Region = 'Northeast' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client 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 T0.age BETWEEN 65 AND 65,-6.376343034849793,12,0,0,30 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 3232,What are the order ids of the orders with freight of over 800?,SELECT OrderID FROM Orders WHERE Freight > 800,SELECT OrderID FROM Orders WHERE Freight > 800,3.885849684795838,1,1,1,29 3233,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 T2.`division Database: retail_complains` FROM client AS T1 INNER JOIN district AS T2 ON T1=T2.district_id WHERE T1.first = 'Noah' AND T2.last = 'Thompson',-7.212142308234047,2,0,0,28 3234,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,-1.7952456838489947,4,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 3236,Give the product's name brought by Aaron Alexander.,SELECT DISTINCT T1.Name 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 T3.FirstName = 'Aaron' AND T3.LastName = 'Alexander',SELECT DISTINCT T3.`FirstName` FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Customers AS T3 ON T2.MiddleInitial = T3._CustomerID WHERE T3.LastName = 'Aaron Alexander',0.33222277461649596,1,0,0,28 3237,Identify the total number of orders placed by the customer 'Laughing Bacchus Wine Cellars' and it's average value.,"SELECT COUNT(T2.OrderID) , SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars'",SELECT CAST(SUM(CASE WHEN T2.CompanyName = 'Laughing Bacchus Wine Cellars' THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2._CustomerID INNER JOIN `Order Details` AS T3 ON T2.`OrderID Database: retail_world` = T3._OrderID WHERE T3.Discount = 0,-7.914907048219384,26,0,0,30 3238,When was the employee who handled order id 10281 hired?,SELECT T1.HireDate FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10281,SELECT IIF(T1.HireDate = '10281' AND T2.OrderID = 10281 ),-1.2118943019658925,1,0,0,27 3239,What is the shipping cost for order number 10692 from the company Alfreds Futterkiste?,SELECT T2.Freight FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10692 AND T1.CompanyName = 'Alfreds Futterkiste',"SELECT CAST(SUM(IIF(T1.CompanyName = 'Alfreds Futterkiste', 1, 0)) AS REAL) * 100 / COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.Freight = 10692",-3.3325426070422135,5,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 3241,List down the issues for complaint with server time of below 10 minutes.,"SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%M', T1.ser_time) < '10'",SELECT T2.Issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID` WHERE T1.ser_time > 10,-0.4971815066384023,4,0,0,28 3242,"Please list any two clients with their full names who have been tagged as ""Older American"" by the company without seeking their permission.","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?` IN (NULL, 'N/A', '') LIMIT 2","SELECT first, middle, last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T3.Tags = 'Older American' AND T2.`Consumer consent provided?` = 'N/A'",0.05564853286644695,6,0,0,28 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 3245,Calculate the average net profit of bar tools which has ordered quantity exceed 5.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5",SELECT AVG(T1.Unit Price * T1.Order Quantity) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5,-2.41351969783258,21,0,0,29 3246,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 3247,"Calculate the order percentage by ""Carlos Miller"" sales team.",SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID,SELECT CAST(SUM(CASE WHEN T2.`Sales Team` = 'Carlos Miller' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team ` AS T2 ON T2.SalesTeamID = T1._Sales TeamID,-1.1212581827192467,3,0,0,29 3248,"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 IIF(T1.ProcuredDate LIKE '2018%' AND T2.`Sales Team` = 'George Lewis', 1, 0)) AS T ORDER BY T DESC LIMIT 1",-1.9434429698051634,1,0,0,21 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 3250,"What is the profit from selling the ""O'Sullivan Living Dimensions 2-Shelf Bookcases""?",SELECT DISTINCT T1.Profit FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'O''Sullivan Living Dimensions 2-Shelf Bookcases',"SELECT CAST(SUM(IIF(T2.`Product Name` = 'O'Sullivan Living Dimensions 2-Shelf Bookcases', 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductId`",-8.270531966156732,6,0,0,28 3251,List down the product id for products with the highest quantity.,SELECT DISTINCT ProductID FROM Sales WHERE Quantity = ( SELECT MAX(Quantity) FROM Sales ),SELECT ProductID FROM Sales ORDER BY Quantity DESC LIMIT 1,4.988260417689312,1,0,0,26 3252,"List the 5 orders with the highest total price, indicating the delivery date.","SELECT T1.o_orderkey, T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 5",SELECT o_orderkey FROM orders ORDER BY o_totalprice DESC LIMIT 5,4.180439146988894,1,0,0,29 3253,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.birthdate FROM client AS T1 INNER JOIN client WHERE T2.`type` = 'youngest',-3.398567984855019,8,0,0,21 3254,Write down the name of products whose sale quantity is more than 950.,SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 950,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.Quantity > 950 THEN T1.Name ELSE 0 END) WHERE T IS NOT NULL,-2.890607471968073,6,0,0,21 3255,Identify the name of the most popular dairy product in terms of reorder quantity.,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 WHERE T1.CategoryID = ( SELECT CategoryID FROM Products ),-0.10068896940310328,20,0,0,30 3256,How many orders have been shipped through 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(IIF(T2.CompanyName = 'United Package', 1, 0)) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID",1.2473128862359033,10,0,0,30 3257,Please list the full names of all the male clients in the Pacific division.,"SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific' AND T1.sex = 'Male'","SELECT first, middle, last, sex FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id WHERE T2.division = 'Pacific'",3.446736655101624,1,0,0,25 3258,What is the price and quantity of the product named Seat Tube?,"SELECT DISTINCT T2.Price, T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Seat Tube'","SELECT CAST(SUM(IIF(T2.Name = 'Seat Tube', 1, 0)) AS REAL) * 100 / COUNT(T1.Quantity) FROM Sales AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1 . ProductID",1.6035732445592368,7,0,0,30 3259,How many orders were shipped in 1998?,"SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'","SELECT COUNT(l_orderkey) FROM lineitem WHERE strftime('%Y', l_shipdate) = '1998'",0.9434118544100469,10,1,1,29 3260,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.4599166229235654,4,0,0,28 3261,"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 via`) FROM events WHERE `Date received` LIKE '2012%',5.709770768212599,1,0,0,30 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 3264,"Please list the names of all the customers who had ordered the product ""Telescoping Adjustable Floor Lamp"".",SELECT 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',SELECT DISTINCT T FROM ( SELECT DISTINCT CASE WHEN T2.`Product Name` = 'Telescoping Adjustable Floor Lamp' THEN T1.`Customer Name` ELSE NULL END AS T FROM people ) WHERE T IS NOT NULL,1.399593252474005,1,0,0,28 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 3266,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 T.horsepower, T.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`car_name` = 'Subaru Dl'",-2.4041129473167646,3,0,0,12 3267,Calculate the percentage of complaints made by Google account client in server ZOHARI.,SELECT CAST(SUM(CASE WHEN T1.email LIKE '%@gmail.com' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.server = 'ZOHARI',SELECT CAST(SUM(CASE WHEN T2.server = 'ZOHARI' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.email) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client`,-3.585654429006415,6,0,0,23 3268,"In the Bay Area, what is the most common type of food served by restaurants?",SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'bay area' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1,"SELECT CAST(SUM(IIF(T2.food_type = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1 .city = T2.city WHERE T1.region = 'restaurant'",0.6059854045520121,11,0,0,27 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 3271,Calculate the average quantity per sales from sales id 20 to 30.,SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30,SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30,1.8021002990699653,1,1,1,29 3272,What territories is the Inside Sales Coordinator in charge of?,SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Title = 'Inside Sales Coordinator',SELECT DISTINCT T2.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Entire Sales Coordinator` ORDER BY T1.Title DESC LIMIT 1,-6.813067735667716,2,0,0,29 3273,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,-4.968673450033971,28,0,0,30 3274,List the country and how many customers are there.,"SELECT country, COUNT(customerNumber) FROM customers GROUP BY country","SELECT country, COUNT(customerNumber) FROM customers GROUP BY country",3.4862355305126824,1,1,1,26 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 3276,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,28 3277,What is the full name of the employee who handled the highest amount of orders?,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.FirstName, T1.LastName ORDER BY COUNT(*) DESC LIMIT 1","SELECT firstName, lastName FROM Employees AS first_name INNER JOIN Orders AS last_name WHERE EmployeeID = ( SELECT MAX(EmployeeID) FROM Orders )",3.3469327000282134,1,0,0,20 3278,"What is the total quantity of ""Telescoping Adjustable Floor Lamp"" ordered from central superstores?",SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Telescoping Adjustable Floor Lamp',SELECT CAST(SUM(CASE WHEN T2.`Product Name` = 'Telescoping Adjustable Floor Lamp' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2` Product ID`,-2.0177840383347596,5,0,0,28 3279,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,3.168358449940633,1,0,0,30 3280,Provide the order comments for at least 5 orders made by customers in the furniture 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 = 'Furniture' LIMIT 5,"SELECT IIF(T2.c_mktsegment = 'FURNITURE' AND T1.o_orderstatus = '1-5-Order' ) AS REAL, NULL, NULL FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.s_custid",-2.6068035417873276,20,0,0,30 3281,Please list the names of all the products ordered in order CA-2011-112326 in superstores in the center.,SELECT DISTINCT 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-112326',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 ID = 'CA-2011-112326',-0.7257427150646728,1,0,0,26 3282,List the store located cities with regions in no water area of California state.,SELECT DISTINCT T2.`City Name` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'California' AND T2.`Water Area` = '0',SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.Region = 'California' THEN T2.`City Name` ELSE NULL END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1._StateCode ) WHERE T IS NOT NULL,0.9229342031243384,1,0,0,27 3283,Please list any three line item numbers that have 10% off.,SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3,SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3,4.39251279768461,1,1,1,30 3284,What is the total value of shipped vintage car orders from 2003-2004?,SELECT SUM(T2.priceEach * T2.quantityOrdered) 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 T3.status = 'Shipped' AND T3.orderDate BETWEEN '2003-01-01' AND '2004-12-31',SELECT SUM(t1.MSRP - t1.buyPrice) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t2.productCode = t1._productCode INNER JOIN orders AS t3 ON t3.orderNumber = t4._orderNumber INNER JOIN customernumber AS t4 ON t4.customernumber = t5.customerNumber WHERE T1.productVendor = '2003-2004' AND T2.status = 'Shipped',-3.2528015663659775,3,0,0,27 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 3286,List down the customer names with a disputed order status.,SELECT t1.customerName FROM customers AS t1 INNER JOIN orders AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.status = 'Disputed',SELECT customerName FROM customers WHERE status = 'Disputed',3.7666909511662094,1,0,0,27 3287,What is the highest total price paid for an order?,SELECT UnitPrice * Quantity * (1 - Discount) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * (1 - Discount) DESC LIMIT 1,SELECT MAX(UnitPrice) FROM `Order Details`,4.657540249829904,1,0,0,28 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 3290,What is the quantity of Ikura ordered in order no. 10273?,SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura',SELECT CAST(SUM(Ikura) AS REAL) * 100 / COUNT(ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10273,-1.2152099918523411,3,0,0,28 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 3293,"Calculate the average monthly order and percentage of warehouse ""WARE-NMK1003"" in 2019. Among them, mention number of orders for floor lamps.","SELECT CAST(SUM(CASE WHEN T2.WarehouseCode = 'WARE-NMK1003' THEN 1 ELSE 0 END) AS REAL) / 12 , CAST(SUM(CASE WHEN T2.WarehouseCode = 'WARE-NMK1003' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.OrderNumber), COUNT(CASE WHEN T1.`Product Name` = 'Floor Lamps' AND T2.WarehouseCode = 'WARE-NMK1003' THEN T2.`Order Quantity` ELSE NULL END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T2.OrderDate LIKE '%/%/19'",SELECT AVG(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'WARE-NMK1003' AND T2.WarehouseCode = '2019',1.581242874685361,3,0,0,30 3294,Give the street number of a bar in Oakland with a 2.7 review.,SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar',SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = 'oakland' AND t2.city = '2.7',0.9190421151547401,9,0,0,20 3295,Which region has the second most clients?,"SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division ORDER BY COUNT(T2.division) DESC LIMIT 1, 1",SELECT T2.`division Database: retail_complains` FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2._division ORDER BY COUNT(T2.division) DESC LIMIT 1,-6.531953750836362,1,0,0,20 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 3297,Please list all the 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',SELECT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 WHERE T2.RegionDescription = 'Eastern',0.11878491713861486,1,0,0,29 3298,Provide the shipping dates and products of the orders by Gene Hale.,"SELECT DISTINCT T2.`Ship Date`, 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` = 'Gene Hale'","SELECT T2.`Ship Date`, 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 = T4.`Product ID` WHERE T5.`Customer Name` = 'Gene Hale'",-3.7771430602798723,3,0,0,24 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 3300,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,29 3301,How many product names does the supplier Exotic Liquids have?,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.942755261588401,2,1,1,25 3302,List the 5 sales teams that have made sales with the highest net profits.,"SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 5","SELECT T FROM ( SELECT CASE WHEN T2.`Sales Team` = 'Net profits' THEN T1.OrderNumber ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team`, T2.SalesTeamID ) WHERE T IS NOT NULL",-1.2826511248809465,5,0,0,30 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 3304,Which product have the highest user satisfaction?,SELECT ProductName FROM Products WHERE ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT ProductName FROM Products WHERE ReorderLevel = ( SELECT MAX(ReorderLevel) FROM products ),3.1158623377994314,12,1,1,30 3305,What sales channels are used the most in the 3 places with the highest median income?,SELECT `Sales Channel` FROM ( SELECT T1.`Sales Channel` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 3 ) GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1,SELECT T FROM ( SELECT CASE WHEN T2.`Median Income` > 3 THEN T1.`Sales Channel` 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.8501820000404763,1,0,0,27 3306,"Give the reorder level for the products from the supplier ""Nord-Ost-Fisch Handelsgesellschaft mbH"".",SELECT T1.ReorderLevel FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH',"SELECT CAST(SUM(IIF(T2.CompanyName = 'Nord-Ost-Fisch Handelsgesellschaft mbH', 1, 0)) AS REAL) * 100 / COUNT(T1.ReorderLevel) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID",0.10517074007387563,18,0,0,29 3307,"Give me the address, home phone and salary of the Sales Manager.","SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'","SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'",2.925369889710495,1,1,1,24 3308,What are the names of the parts that were ordered by customer 110942?,SELECT T3.p_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN part AS T3 ON T2.l_partkey = T3.p_partkey WHERE T1.o_custkey = 110942,SELECT T3.p_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_clerk = T2.l_suppkey INNER JOIN part AS T3 ON T4.ps_partkey = T3._partkey WHERE T_custkey = 110942,-3.939280006090601,2,0,0,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 3310,"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,2.917671583565092,1,0,0,30 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 3312,"Give the contact name of the supplier for the product ""Gudbrandsdalsost"".",SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Gudbrandsdalsost',SELECT T3.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID WHERE T1.`ProductName` = 'Gudbrandsdalsost',-4.404276744610946,19,0,0,30 3313,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 model_year FROM production WHERE ID = ( SELECT ID FROM data WHERE car_name LIKE 'Buick Skylark 320%' ),-0.4298881768991394,17,0,0,19 3314,"Among the products manufactured by manufacturer 5 that have a retail price of no more than 1,000, how many products were shipped via rail?",SELECT 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_mfgr = 'Manufacturer#5' AND T3.p_retailprice < 1000 AND T2.l_shipmode = 'RAIL',SELECT COUNT(T2.p_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_supponkey INNER JOIN part AS T3 ON T3.s_partname = 'manufacturer5' WHERE T4.mfgr = 'RAIL' AND T5.retailprice > 1000,-4.06014524251197,2,0,0,29 3315,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 3316,State the delivery date of cookware.,"SELECT T FROM ( SELECT DISTINCT IIF(T2.`Product Name` = 'Cookware', T1.DeliveryDate, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL","SELECT T FROM ( SELECT IIF(T2.`Product Name` = 'Cookware', T1.DeliveryDate, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL",0.8783436041793196,2,0,0,21 3317,"What was the phone of number of the client who made the complaint call ""CR0100432"" ?",SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432',SELECT T3.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0100432',1.3141370677994584,1,0,0,30 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 3321,Which customer ordered 1939 'Chevrolet Deluxe Coupe' at the highest price?,SELECT t4.customerName 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.productName = '1939 Chevrolet Deluxe Coupe' ORDER BY t2.priceEach DESC LIMIT 1,SELECT t3.customerName 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=t4.customerNumber WHERE t4.productVendor = 'Chevrolet Deluxe Coupe' LIMIT 1,-5.568190144572553,24,0,0,30 3322,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 3323,How many customers from the furniture segments come from Iraq?,SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ',"SELECT SUM(IIF(T1.c_mktsegment = 'FURNITURE' AND T2.n_name = 'IRAQ' , 1, 0)) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2Nationkey",-0.14222792295936526,1,0,0,21 3324,Find the customer who made the highest payment in 2005.,"SELECT t2.customerName FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t1.paymentDate) = '2005' GROUP BY t2.customerNumber, t2.customerName ORDER BY SUM(t1.amount) DESC LIMIT 1",SELECT customerName FROM payments WHERE paymentDate = '2005' ORDER BY amount DESC LIMIT 1,3.1352110447566797,1,0,0,27 3325,"Of the customers who are from Canada, how many used Federal Shipping?",SELECT COUNT(T3.CustomerID) FROM Shippers AS T1 INNER JOIN Orders AS T2 ON T1.ShipperID = T2.ShipVia INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.ShipName = 'Federal Shipping',SELECT COUNT(CustomerID) FROM Customers WHERE ShipName = 'Canada' AND ShipVia = 'Federal Shipping',2.497041508318135,1,0,0,29 3326,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 3327,"For the order from ""HILAA"" on 1997/12/25, what was the total quantity of the products in that order?",SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%',"SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND STRFTIME('%Y', T3.OrderDate) = '1997/12/25'",-5.645866000377785,20,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 3329,"From 2012 to 2015, how many complaints were submitted via email from female clients?","SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2012' AND '2015' AND T2.`Submitted via` = 'Email' AND T1.sex = 'Male'",SELECT COUNT(T1.`sex Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` BETWEEN '2012-03-01' AND 'Female' AND '%Submitted via' = 'Email',-6.561406524859827,24,0,0,27 3330,"List the phone number of the customer who placed orders with a total price of more than $300,000.",SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000,SELECT T3.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T2.`totalprice` > 1000,-2.0528088854557263,13,0,0,29 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 3332,How many sales people are handling all the customers?,SELECT COUNT(EmployeeID) FROM Employees,SELECT COUNT(EmployeeID) FROM Employees,4.281554795135653,1,1,1,28 3333,List the name of all customers who had made orders online.,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,1.8534680781667823,3,1,1,28 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 3335,How much is the part supply cost for the medium metallic grey dodger linen?,SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'medium metallic grey dodger linen',"SELECT CAST(SUM(IIF(T1.p_mfgr = 'medium metallic grey dodger linen', 1, 0)) AS REAL) * 100 / COUNT(T2.ps_suppkey) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2. ps_partkey",-2.95461664775489,2,0,0,30 3336,What are the full names of the top 3 employees who handled the highest number of sales?,"SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 3","SELECT MiddleInitial, LastName FROM Employees AS M1 INNER JOIN Sales AS M2 ON M1.EmployeeID = M2.SalesPersonID ORDER BY Quantity DESC LIMIT 3",2.7485513958834367,8,0,0,30 3337,Give the number of Moroccan customers whose account is in debt.,SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'MOROCCO' AND T1.c_acctbal < 0,SELECT COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'MOROCC',0.8193780898907685,1,0,0,28 3338,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 10",-0.17138586097099942,2,0,0,30 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 3340,In which region can you find the top 4 most popular restaurants?,SELECT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city ORDER BY T1.review DESC LIMIT 4,SELECT T4.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T3.region ORDER BY COUNT(T1.review) DESC LIMIT 4,-4.788905360621675,1,0,0,30 3341,"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,-0.5783125459947941,2,0,0,24 3342,Which country produced the highest number of cars? Calculate the annual average number of cars that the said country produced from the very start to the present.,"SELECT T2.country, CAST(COUNT(T1.ID) AS REAL) / COUNT(DISTINCT T1.model_year) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin GROUP BY T2.country ORDER BY COUNT(T2.country) DESC LIMIT 1",SELECT T3.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin ORDER BY COUNT(T2.country) DESC LIMIT 1,-5.475610704897193,2,0,0,30 3343,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 IIF(T2.n_name = 'USA', 1, 0)) AS T ORDER BY T.num DESC LIMIT 1",-3.2312086821019816,2,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 3345,What product category that Sam Craven ordered from the central and east superstore?,SELECT DISTINCT T3.Category 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` = T1.`Product ID` LEFT JOIN central_superstore AS T4 ON T3.`Product ID` = T4.`Product ID` WHERE T2.`Customer Name` = 'Sam Craven',"SELECT T2.Category FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID Database: superstore`, T2.`Customer Name` = 'Sam Craven' ORDER BY T3.`Category` DESC",-6.610257301353194,25,0,0,28 3346,"Among the seafood products, which product have the highest total production of the production?",SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Seafood' ORDER BY T1.UnitsInStock + T1.UnitsOnOrder DESC LIMIT 1,SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 1,3.7662855592553104,1,0,0,24 3347,What is the name of the product that was ordered recently by Darren Powers?,SELECT 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` = 'Darren Powers' ORDER BY T2.`Order Date` DESC LIMIT 1,"SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Order Date` = '2014-01-01'",-0.13698379444670963,1,0,0,30 3348,How old was the oldest employee at the time he or she was hired?,"SELECT MAX(TIMESTAMPDIFF(YEAR, BirthDate, HireDate)) FROM Employees",SELECT MIN(HireDate) FROM Employees WHERE BirthDate = 'He' AND TIMESTAMPDIFF = 'She',2.426957460865756,2,0,0,29 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 3352,What percentage of clients who sent their complaints by postal mail are age 50 and older?,SELECT CAST(SUM(CASE WHEN T1.age > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail',SELECT CAST(SUM(CASE WHEN T2.`Submitted via` = 'Postal mail' THEN 50 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,-4.383035385935105,9,0,0,30 3353,List every city in San Mateo County.,SELECT city FROM geographic WHERE county = 'san mateo county',SELECT city FROM geographic WHERE county = 'san mateo county',3.8969331317056195,1,1,1,26 3354,Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed?,SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '1/%/20' GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1,SELECT T2.`Sales Channel` FROM `Sales Orders` WHERE T1.OrderNumber = 'January 2020' AND ProcuredDate LIKE '%/%/19',-0.495555632593413,1,0,0,30 3355,What percentage of restaurants in Monterey County have Mexican food?,"SELECT CAST(SUM(IIF(T2.food_type = 'mexican', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'monterey county'","SELECT CAST(SUM(IIF(T1.county = 'monterey county', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city",0.5495257831900703,4,0,0,16 3356,How many Planes orders were there?,SELECT COUNT(T1.productCode) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productLine = 'Planes',SELECT COUNT(MSRP) FROM orderdetails WHERE productCode IN ( SELECT productCode FROM products WHERE productLine = 'Planes' ),4.292116371258537,1,0,0,27 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 3358,List out 3 best seller products during year 2003 with their total quantity sold during 2003.,"SELECT t3.productName, 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 STRFTIME('%Y', t1.orderDate) = '2003' GROUP BY t3.productName ORDER BY SUM(t2.quantityOrdered) DESC LIMIT 3",SELECT T3.productName 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 T4.productLine = '2003' ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 3,-3.732620430863324,1,0,0,28 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 3361,"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 T2.`Issue` = 'Deposits',-1.8801980161080591,5,0,0,26 3362,"How many types of ""HL Touring Frames"" are there?",SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%',SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%',1.4398008508586442,9,1,1,28 3363,Which different vendor has the most amount of orders? Calculate the total estimated earnings.,"SELECT DISTINCT T1.productVendor, T1.MSRP - T1.buyPrice FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T1.productVendor, T1.MSRP, T1.buyPrice ORDER BY COUNT(T2.quantityOrdered) DESC LIMIT 1","SELECT productVendor, MSRP - buyPrice FROM products WHERE productCode = ( SELECT productCode FROM orderdetails WHERE orderNumber = 0 GROUP BY productVendor )",2.00806447295046,1,0,0,30 3364,"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 CAST(SUM(CASE WHEN Name = 'C' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ProductID) FROM Products,2.8327863933735338,1,0,0,25 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 3367,"List the product code of the top five motorcycles, by descending order, the number of quantity in stock.","SELECT productCode, quantityInStock FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5",SELECT productCode FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5,-0.04185380936099816,2,0,0,29 3368,What is the full address of Rattlesnake Canyon Grocery?,"SELECT DISTINCT ShipAddress, ShipCity, ShipRegion, ShipPostalCode, ShipCountry FROM Orders WHERE ShipName = 'Rattlesnake Canyon Grocery'",SELECT ShipAddress FROM Orders WHERE ShipCity = 'Rattlesnake Canyon Grocery',3.4454354358639865,1,0,0,30 3369,Indicate order numbers with an order date after 1/1/2018.,SELECT DISTINCT T FROM ( SELECT CASE WHEN OrderDate > '1/1/18' THEN OrderNumber ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT DISTINCT OrderNumber FROM `Sales Orders` WHERE OrderDate BETWEEN '1/1/2018%',2.8932361608208543,1,0,0,30 3370,How many chainring bolts were sold under sales ID 551971?,SELECT T1.Quantity FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Chainring Bolts' AND T1.SalesID = 551971,SELECT SUM(CASE WHEN T2.Name = 'Chainring Bolts' THEN 1 ELSE 0 END) FROM Sales AS T1 INNER JOIN Products AS T2 WHERE T1.SalesID = 551971,-2.2120791439831686,6,0,0,29 3371,Provide the price and country origin of the car named Ford Maverick.,"SELECT DISTINCT T1.price, 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 INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T4.car_name = 'ford maverick'","SELECT T2.`price`, T3.`origin Database: cars` 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",-6.738648743927835,21,0,0,27 3372,"Who is the customer with an order shipped on March 5, 2013, in the eastern 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.`Ship Date` = '2013-03-05',"SELECT DISTINCT T3.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` WHERE T1.ShipDate = '2013-03-05' AND T2.Customer Name = 'Order shipped on March 5, 2013'",-0.3020601306082042,3,0,0,30 3373,"What are the names of the parts that have a part supply cost of at least 1,000?",SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000,SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1._partkey = T2.ps_partkey INNER JOIN ( SELECT MAX(ps_supplycost) FROM part ),-2.015172635165731,13,0,0,24 3374,Please list all sale team names which had orders on 5/31/2018.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT DISTINCT CASE WHEN T1.OrderDate = '5/31/2018' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team`.SalesTeamID ) WHERE T IS NOT NULL,0.39764257241798295,1,0,0,26 3375,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 SUM(T2.priceEach * T2.quantityOrdered) / COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.`productCode` INNER JOIN orders AS T3 ON T3.orderNumber = T4.ordernumber INNER JOIN customerNumber AS T5 ON T5.productVendor = T6.customerNumber WHERE T7.status = 'Exoto Designs' AND productVendor = '2005',-3.0595245219330502,1,0,0,30 3376,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 3377,What is the nationality of supplier number 1?,SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 1,"SELECT T.n_name FROM ( SELECT IIF(s_suppkey = 1, 1, 0)) AS T ORDER BY T.s_acctbal DESC LIMIT 1",-2.174267051762009,2,0,0,27 3378,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 T1.UnitsOnOrder DESC LIMIT 1,-4.146620530484817,1,0,0,27 3379,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 T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Employees` INNER JOIN Territoried AS T3 ON T2.EerritoryID = T3._TerritoryID WHERE T1.EmployeeName = 'Ms. Laura Callahan' AND T1 . EmployeeID = 1,-7.150096048403849,20,0,0,30 3380,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.Product ID > 3,3.4026836594773378,1,0,0,27 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 3382,What is the largest supplier's account balance?,SELECT MAX(s_acctbal) FROM supplier,SELECT MAX(s_acctbal) FROM supplier,5.447284229782327,1,1,1,23 3383,Calculate the total production for each product which were supplied from Japan,SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan',SELECT CAST(SUM(CASE WHEN T2.Country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,5.637571397663301,1,0,0,29 3384,How many customers share the most common last name?,SELECT COUNT(CustomerID) FROM Customers GROUP BY LastName ORDER BY COUNT(LastName) DESC LIMIT 1,SELECT COUNT(CustomerID) FROM Customers WHERE LastName = 'Last Name',1.2093941783493265,1,0,0,27 3385,Calculate the average net profit of phones which have sales channel of distributor.,"SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Phones' AND T1.`Sales Channel` = 'Distributor'",SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'Phones' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID,-2.469767916750797,2,0,0,30 3386,What are the highest salary earn by the the employee and what is his/her position in the company?,"SELECT Salary, Title FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )","SELECT MAX(Salary) , Title FROM Employees ORDER BY Salary DESC LIMIT 1",1.6305071887708789,1,0,0,27 3387,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(IIF(T1.country = 'Atelier graphique', 1, 0)) AS REAL) * 100 / COUNT(T2.amount) FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2._customerNumber WHERE T2.paymentDate LIKE '2004%'",-2.0281914182341163,1,0,0,26 3388,Indicate the fax of the company Blondesddsl pre et fils in Strasbourg city.,SELECT Fax FROM Customers WHERE CompanyName = 'Blondesddsl pre et fils' AND City = 'Strasbourg',SELECT Fax FROM Customers WHERE CompanyName = 'Blondesddsl pre et fils' AND City = 'Strasbourg',3.338487861355547,1,1,1,28 3389,"List down the customer company names, addresses, phones and faxes which are located in London.","SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London'","SELECT CompanyName, Address, Phone, Fax FROM Customers WHERE City = 'London'",2.955696941005687,1,1,1,22 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 3391,"Calculate the average production rate per year from 1971 to 1980. Among them, name the cars with a weight of fewer than 1800 lbs.",SELECT CAST(COUNT(T1.ID) AS REAL) / 9 FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 UNION ALL SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 AND T2.weight < 1800,SELECT AVG(T2.weight) / 1800 FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T1.`model_year Database: cars` BETWEEN 1971 AND 1980 AND T3.car_name = '1971',-8.282895197690163,30,0,0,30 3392,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.5447210532881175,5,0,0,28 3393,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,27 3394,"In 2019, how many orders were shipped by the sales team with the highest number of orders in the said year? Provide the name of the sales team.","SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' AND T1.ShipDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1","SELECT CAST(COUNT(CASE WHEN T2.`Sales Team` = 'Shipped' 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 WHERE T1.ProcuredDate LIKE '2019%'",-4.90832657933426,9,0,0,29 3395,What was the total price of the products shipped to Rovelli Gifts Distributors Ltd. between 1/1/2003 and 12/31/2003?,"SELECT T3.priceEach * T3.quantityOrdered FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.customerName = 'Rovelli Gifts' AND T2.status = 'Shipped' AND STRFTIME('%Y', T2.shippedDate) = '2003'",SELECT SUM(T2.priceEach * T2.quantityOrdered) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2._customerNumber INNER JOIN orderdetails AS T3 ON T3.ordernumber = T4.orderNumber WHERE t3.status = 'Shipped' AND t2.shippedDate BETWEEN '2003-01-01' AND '12-31-2003',-3.4253797919153772,2,0,0,30 3396,"List the product ID of the top five products, by descending order, the number of quantities in stock.",SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5,SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5,2.933061650491635,1,1,1,29 3397,List all cities in the Northern California Region.,SELECT city FROM geographic WHERE region = 'northern california',SELECT city FROM geographic WHERE region = 'northern california',5.540593934017408,1,1,1,23 3398,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(*) FROM ( SELECT CASE WHEN T1.CategoryName = 'Condiments' THEN 1 ELSE 0 END) AS REAL) * 100 / 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 Database: retail_world` = T3 WHERE T3.OrderDate = '1997-03',-6.9617965701320745,20,0,0,30 3399,In how many counties is there a street called Appian Way?,SELECT COUNT(DISTINCT T2.county) FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_name = 'appian way',SELECT COUNT(t2.county) FROM location AS t1 INNER JOIN geographic AS t2 ON t1.city = t2.city WHERE T1.street_name = 'Appian Way',2.8658747479390017,6,0,0,22 3400,Tell the origin country of car no.382.,SELECT DISTINCT T2.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.ID = 382,SELECT T3.country FROM production AS T1 INNER JOIN country AS T2 ON T1.origin = T2.country WHERE T1.`ID` = 382,-4.256439204559839,14,0,0,27 3401,Please list all first and last names of clients who live in New York city.,"SELECT first, last FROM client WHERE city = 'New York City'","SELECT first, last FROM client WHERE city = 'New York City'",5.523639575703045,1,1,1,22 3402,What is the name of the customer with the highest amount of 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,30 3403,How many more territories are there in than Eastern Region than in the Southern Region?,SELECT ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) - ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu,SELECT SUM(CASE WHEN TerritoryID Database: retail_world LIKE 'Eastern%' THEN 1 ELSE 0 END) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2._RegionID WHERE T2.RegionDescription = 'Southern',-7.053213583975626,3,0,0,29 3404,"Among all the customers, what is the percentage of the customer's nation being Germany?","SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey","SELECT CAST(SUM(IIF(n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_Nationkey",3.8304591745907435,2,0,0,28 3405,"What is the total price of all orders from the customer with the phone number ""627-220-3983""?",SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_phone = '627-220-3983',"SELECT CAST(SUM(IIF(T2.c_phone = '627-220-3983', 1, 0)) AS REAL) * 100 / COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.s_custid WHERE T2.`c_mktsegment = 'CCTBAL'",-3.3026507606570443,3,0,0,30 3406,"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'",-2.9586688510454606,3,0,0,28 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 3408,What is the average unit price of a Cookware product?,"SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Cookware'",SELECT AVG(T2.`Unit Price`) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.`Sales Channel` = 'Cookware',-0.5237414484711269,4,0,0,27 3409,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 WHERE T3.Discount = 1,-5.894575151849637,1,0,0,30 3410,"What was the serve time for the complaint call from client ""C00007127"" on 2017/2/22?",SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22',"SELECT ( SELECT MAX(ser_time) FROM callcenterlogs WHERE `Complaint ID` = 'C00007127' AND strftime('%Y', `Date received`) = '2017-12-22' )",-1.2398640389252868,1,0,0,30 3411,Find the number of customers handled by each of the sales people.,SELECT COUNT(CustomerID) FROM Sales GROUP BY SalesPersonID,SELECT COUNT(CustomerID) FROM Sales GROUP BY SalesPersonID,4.260563302097911,1,1,1,29 3412,"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(c_custkey) FROM customer AS c INNER JOIN nation AS nation WHERE n_name = 'BRAZIL' AND c_acctbal < 1000,4.712600975575555,1,0,0,30 3413,List down the cities with unknown country.,SELECT city FROM geographic WHERE county = 'unknown',SELECT city FROM geographic WHERE county = 'unknown',3.7001976283531595,1,1,1,24 3414,"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 T2.HomePage FROM Products AS T1 INNER JOIN Suppliers AS T2 WHERE T1.ProductName = 'Thringer Rostbratwurst',0.442523775781095,6,0,0,30 3415,How many suppliers are from Japan?,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 = 'JAPAN',SELECT COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'JAPAN',4.166412959028589,1,0,0,30 3416,Which order of Logitech G600 MMO Gaming Mouse has the highest total cost?,SELECT T1.`Order ID` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Logitech G600 MMO Gaming Mouse' GROUP BY T1.`Order ID` ORDER BY SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) 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 T1.Order ID = 'Logitech G600 MMO Gaming Mouse' ORDER BY T2.Discount DESC LIMIT 1,-0.9974890717927031,6,0,0,29 3417,Identify all restaurants in Contra Costa County by id.,SELECT T1.id_restaurant FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'contra costa county',SELECT T3.id_restaurant FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'contra costa county',-1.3057732197490977,7,0,0,15 3418,What is the store id of the store located in the most populous county?,SELECT CASE WHEN MAX(Population) THEN StoreID END FROM `Store Locations`,SELECT StoreID FROM `Store Locations` GROUP BY StoreID ORDER BY Population DESC LIMIT 1,1.8142998132226993,1,0,0,30 3419,"What is the total quantity of the part ""hot spring dodger dim light"" ordered in all orders?",SELECT SUM(T1.p_partkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_name = 'hot spring dodger dim light',"SELECT CAST(SUM(IIF(T1.p_name = 'hot spring dodger dim light', 1, 0)) AS REAL) * 100 / COUNT(T2.l_orderkey) FROM part AS T1 INNER JOIN lineitem AS T2 ON T2.ps_partkey = T1._partkey",-2.729597406590561,1,0,0,30 3420,"Under the in-charge of inside sales coordinator, provide the product lists which were shipped to Mexico in 1996.",SELECT T4.ProductName 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 WHERE T1.Title = 'Inside Sales Coordinator' AND T2.ShippedDate LIKE '1996%' AND T2.ShipCountry = 'Mexico',SELECT T3.ProductName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = 1 INNER JOIN Products AS T4 ON T3.`ProductID` = T4.ProductID WHERE ShipCountry = 'Mexico' AND ShippedDate LIKE '1996%',-2.787513636592564,4,0,0,25 3421,What is the average age of Norwalk clients?,SELECT CAST(SUM(T1.age) AS REAL) / COUNT(T1.age) AS average FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Norwalk',SELECT CAST(SUM(CASE WHEN T2.city = 'Norwalk' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,3.6837671038416593,1,0,0,24 3422,"Clerk#000000936 dealt with a ""Not Specified"" order on 1995/3/13, what was the charge for the part of the order shipped by truck?",SELECT T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax) AS num FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_clerk = 'Clerk#000000936' AND T2.l_shipmode = 'TRUCK' AND T1.o_orderstatus = '4-NOT SPECIFIED' AND T1.o_orderdate = '1995-03-13',"SELECT T1.o_totalprice * (1 - T2.l_discount) AS REAL, 0, 1995/3/13 FROM orders AS T1 INNER JOIN lineitem AS T2 ON STRFTIME('%Y', T2._l_shipdate) = '1995-03-13 00:00:00'",-6.788866366789169,3,0,0,28 3423,"Please list the full name, date of birth, and email id of the elderly clients in descending order of age.","SELECT first, middle, last, year, month , day, email FROM client WHERE age > 65 ORDER BY age DESC","SELECT first, middle, last, email FROM client ORDER BY age DESC LIMIT 1",2.2839686056135395,1,0,0,30 3424,Please indicate the names of the customers whose order with a total price over $300000.,SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice > 300000,SELECT T.c_name FROM ( SELECT DISTINCT CASE WHEN T1.o_totalprice > 300000 THEN 1 ELSE 0 END) AS T FROM orders AS T1 INNER JOIN customer AS T2 ON T1._custkey = T2.s_custid,-2.5842787713153106,2,0,0,30 3425,Calculate ratio between the highest unit cost and the lowest unit cost?,"SELECT ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 ) / ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 ) ORDER BY REPLACE(`Unit Cost`, ',', '') ASC LIMIT 1 )",SELECT CAST(SUM(CASE WHEN Unit Cost = '1-Unit Cost' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(OrderNumber) FROM `Sales Orders`,-0.33192620176081755,2,0,0,30 3426,What percentage of complaints are from the elderly?,SELECT CAST(SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT CAST(SUM(CASE WHEN T2.`age Database: retail_complains` = 'Elderly' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,-6.24708593115879,1,0,0,22 3427,Please list the IDs of the orders with a product whose production is not continuous.,SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1,SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.Discontinued = 1,-4.920392781272115,20,0,0,29 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 3429,List the phone numbers of suppliers from Japan.,SELECT T1.s_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'JAPAN',SELECT T3.n_phone FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_name = 'JAPAN',-4.149156005641145,2,0,0,30 3430,What are the total quantities of the items ordered by customer 101660 on 10/5/1995?,SELECT SUM(T2.l_quantity) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1995-10-05' AND T1.o_custkey = 101660,"SELECT CAST(SUM(IIF(T1.o_orderdate = '1995-01-01', 1, 0)) AS REAL) * 100 / COUNT(T2.l_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON STRFTIME('%Y', T1._orderdate) = '10/5/1995'",-2.0419452433765755,1,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 3432,"Between 8/1/2003 and 8/30/2004, how many checks were issued by Mini Gifts Distributors Ltd.? Please list their check numbers.",SELECT T1.checkNumber FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate >= '2003-08-01' AND T1.paymentDate <= '2004-08-30' AND T2.customerName = 'Mini Gifts Distributors Ltd.',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate BETWEEN '2003-01-01' AND '2004-30-30',4.4393802314104756,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 3434,Calculate the average net profit for bakeware product.,"SELECT AVG(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'","SELECT AVG(REPLACE(T1.`Unit Price`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'",1.0487655471973734,1,0,0,29 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 3436,"How many ""Mountain-100 Silver, 38"" were sold by Stearns MacFeather?","SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Stearns' AND T1.LastName = 'MacFeather' AND T3.Name = 'Mountain-100 Silver, 38'","SELECT COUNT(T1.MiddleInitial) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 WHERE T3.Name = 'Mountain-100 Silver, 38'",3.8266531906071535,1,0,0,28 3437,Which company had the most orders in 1998?,"SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1",SELECT CompanyName FROM Orders WHERE OrderDate LIKE '1998%' GROUP BY CompanyName ORDER BY COUNT(OrderID) DESC LIMIT 1,-1.8943428195822525,11,0,0,29 3438,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 T1.FirstName, T1.`TitleOfCourtesy 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` = 'Mr. Robert King'",-7.624533623082936,2,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 3440,List the quantity and price of the product bought by Abigail Henderson.,"SELECT T2.Quantity, T1.Price 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 T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson'","SELECT CAST(SUM(IIF(T2.FirstName = 'Abigail' AND T2.MiddleInitial = 'Henderson', 1, 0)) AS REAL) * 100 / COUNT(T1.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID INNER JOIN Customers AS T3 ON T3.Customers = T4.CustomerID WHERE T3.`CustomerID` = 'ASIC'",-3.5379339843993707,12,0,0,28 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 3442,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 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 3444,Calculate the swept volume of the $34538.97449 car.,SELECT T1.displacement / T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 34538.97449,"SELECT CAST(SUM(IIF(T2.price = '34538.97449', 1, 0)) AS REAL) * 100 / COUNT(T1.cylinders) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID",0.6930683306861888,13,0,0,28 3445,Mention the first name of employee who took care the order id 10250.,"SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10250",SELECT CASE WHEN T2.OrderID = 10250 THEN 'FirstName' ELSE 'LastName' END FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,0.06059182401217215,3,0,0,29 3446,What percentage of customers engaged in the household segment are from Iran?,"SELECT CAST(SUM(IIF(T2.n_name = 'IRAN', 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD'","SELECT CAST(SUM(IIF(T1.c_mktsegment = 'HOUSEHOLD', 1, 0)) AS REAL) * 100 / COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1. c_nationkey = T2.N_Nationkey WHERE T2._name = 'Iran'",2.3299871944198354,3,0,0,17 3447,"Among the German customers, how many of the them has credit limit of zero?",SELECT COUNT(customerNumber) FROM customers WHERE creditLimit = 0 AND country = 'Germany',SELECT COUNT(customerNumber) FROM customers WHERE creditLimit = 0 AND country = 'Germany',3.0845859245576692,1,1,1,25 3448,What counties are not in the Bay Area Region?,SELECT DISTINCT county FROM geographic WHERE region != 'bay area',SELECT DISTINCT county FROM geographic WHERE region != 'bay area',3.962658208640319,13,1,1,21 3449,Which state has the highest number of clients who gave a 5-star review?,SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) DESC LIMIT 1,SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id ORDER BY COUNT(T1.Stars) DESC LIMIT 5,3.012629785596418,5,0,0,30 3450,Please list any three orders that caused a loss to the company.,SELECT `Order ID` FROM central_superstore WHERE Profit < 0 LIMIT 3,SELECT `Order ID` FROM central_superstore WHERE Profit > 3,3.512569477288966,1,0,0,30 3451,Please name any three products that have been discontinued in the meat or poultry category.,SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.Discontinued = 1 AND T1.CategoryName = 'Meat/Poultry' LIMIT 3,SELECT T3.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1:CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Meat/Poultry' LIMIT 3,-0.6626673167229035,3,0,0,29 3452,Which state has the most cities?,SELECT state_abbrev FROM district GROUP BY state_abbrev ORDER BY COUNT(city) DESC LIMIT 1,SELECT state_abbrev FROM district ORDER BY city DESC LIMIT 1,4.853929977489169,1,0,0,28 3453,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,0,27 3454,What is the total price of the order 10100?,SELECT SUM(t.priceEach * t.quantityOrdered) FROM orderdetails t WHERE t.orderNumber = '10100',SELECT SUM(t.priceEach * t.quantityOrdered) FROM orderdetails t WHERE t.orderNumber = '10100',5.865357261667042,1,1,1,29 3455,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 nation WHERE n_name = 'BRAZIL',5.553556125307874,1,0,0,29 3456,"What is the nationality of ""Customer#000000055""?",SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055',SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'Customer#000000055',4.790260304573829,1,1,1,30 3457,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='Customer#000000008' ] = T3 . r_name",-3.461961305012287,3,0,0,25 3458,"Among the customers of empolyee 1370, who has the highest credit limit?Please list the full name of the contact person.","SELECT t2.contactFirstName, t2.contactLastName FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = t2.salesRepEmployeeNumber WHERE t1.employeeNumber = '1370' ORDER BY t2.creditLimit DESC LIMIT 1","SELECT firstName, lastName FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber WHERE t2.customerName = 'Empolyee 1370' ORDER BY creditLimit DESC LIMIT 1",5.21550909594035,1,0,0,21 3459,When was the order with the highest amount of total price shipped?,SELECT T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 1,SELECT o_orderkey FROM orders ORDER BY o_totalprice DESC LIMIT 1,-1.305164156011443,1,0,0,29 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 3461,Identify all the restaurants in Marin County by their id.,SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'marin county',SELECT T4.id_restaurant FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.`county` = 'marin county',0.0457749959767673,6,0,0,17 3462,What is the comment of the order with the highest total price?,SELECT o_comment FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders ),SELECT o_comment FROM orders ORDER BY o_totalprice DESC LIMIT 1,4.525326082948764,1,0,0,28 3463,Tell the name of the shipper company for the order No.10585.,SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10585,SELECT T3.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.`ShipperID` WHERE T2.OrderID =10585,-1.2532851611954754,12,0,0,27 3464,"For the order paying the highest freight, how many kinds of products does it contain?",SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.Freight = ( SELECT MAX(Freight) FROM Orders ) GROUP BY T1.OrderID,"SELECT CAST(COUNT(CASE WHEN T2.ProductID = 'ProductID' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Freight) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = STRFTIME('%Y', T2.`ProductID`)",-5.169761623104775,11,0,0,30 3465,Which order have the highest unit cost?,"SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Cost`, ',', '') = ( SELECT REPLACE(`Unit Cost`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Cost`, ',', '') DESC LIMIT 1 )",SELECT OrderNumber FROM `Sales Orders` ORDER BY `Unit Cost` DESC LIMIT 1,1.2689414596620465,1,0,0,28 3466,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 T1.`FirstName Database: retail_world` FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID WHERE T2.OrderID = 10274,-7.002721260886591,1,0,0,28 3467,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(COUNT(CASE WHEN T1.City = 'Madrid' 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.828408438336908,25,0,0,30 3468,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 LIKE '%Group%' THEN `Customer Names` END AS T FROM Customers ) WHERE T IS NOT NULL,0.052422784874289606,1,0,0,30 3469,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 CASE WHEN T1.`Product Name` = 'WARE-NMK1003' THEN T2.`Sales Team` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE T IS NOT NULL,-2.450192778214661,5,0,0,28 3470,"Among the teenager clients who use Google account and Microsoft account, which group of client is more than the other?",SELECT CASE WHEN SUM(CASE WHEN email LIKE '%@gmail.com' THEN 1 ELSE 0 END) > SUM(CASE WHEN email LIKE '%@outlook.com' THEN 1 ELSE 0 END) THEN 'Google account' ELSE 'Microsoft account' END FROM client WHERE age BETWEEN 13 AND 19,SELECT email FROM client WHERE age > 12 AND email LIKE '%@gmail.com',1.1423807037229063,1,0,0,30 3471,Please calculate the average total price of shipped orders from German customers.,SELECT SUM(T3.quantityOrdered * T3.priceEach) / COUNT(T2.orderNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T2.status = 'Shipped' AND T1.country = 'Germany',"SELECT CAST(SUM(IIF(T2.status = 'Shipped', 1, 0)) AS REAL) / COUNT(T1.salesRepEmployeeNumber) FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customernumber INNER JOIN orderdetails AS T3 ON STRFTIME('%Y', T3.orderDate) = '19'",0.45557923594734523,2,0,0,29 3472,How much is the salary of the first employee that was hired?,SELECT Salary FROM Employees WHERE HireDate = ( SELECT MIN(HireDate) FROM Employees ),SELECT Salary FROM Employees WHERE HireDate = '1994-01-01',4.160762766797156,1,0,0,30 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 3474,What are the regions with Greek restaurants?,SELECT DISTINCT T1.region FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'greek',SELECT t3.food_type FROM geographic AS t1 INNER JOIN generalinfo AS t2 ON t1.city = t2.city WHERE T1.region = 'greek',-2.8848608532154016,2,0,0,23 3475,"Among all the suppliers providing the part ""hot spring dodger dim light"", how many of them are in Europe?",SELECT COUNT(T1.r_regionkey) 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 T1.r_name = 'EUROPE',SELECT COUNT(T2.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.d_name = 'hot spring dodger dim light' AND T1.`r_name` = 'Europe',-1.8638202256541434,9,0,0,25 3476,"In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?",SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5,"SELECT CAST(SUM(IIF(T1.division = 'East North Central' AND Stars = 5 , 1, 0)) AS REAL) * 100 / COUNT(T2.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district2_id = T2 . district_id WHERE T2.Stars < 5",1.0808603064287672,2,0,0,16 3477,"Among the parts supplied by Supplier#000000018, provide parts names which had supply costs above 900.",SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey INNER JOIN supplier AS T3 ON T1.ps_suppkey = T3.s_suppkey WHERE T1.ps_supplycost > 900 AND T3.s_name = 'Supplier#000000018',SELECT T3.s_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2._partkey INNER JOIN supplier AS T3 ON T2.p_suppkey = AVG(ps_supplycost) WHERE T_size > 900 AND p_name = 'Supplier#000000018',-3.6864850087675993,1,0,0,30 3478,"Among sales teams in Midwest region, which sales team has an order quantity greater than 5?",SELECT DISTINCT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.Region = 'Midwest' AND T1.`Order Quantity` > 5,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.Region = 'Midwest' THEN 1 ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.`Sales TeamID` = T1._SalesTeamID ) WHERE T IS NOT NULL,-1.0914669934796075,4,0,0,23 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 3480,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` = '2014-03-03',2.4028315471482458,1,0,0,25 3481,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 COUNT(T2.n_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_name = 'HOUSEHOLD',3.274265574948044,1,0,0,20 3482,List by ID all sales teams that have sold products at a 10% discount in store.,SELECT DISTINCT T FROM ( SELECT CASE WHEN `Discount Applied` = '0.1' AND `Sales Channel` = 'In-Store' THEN _SalesTeamID ELSE NULL END AS T FROM `Sales Orders` ) WHERE T IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN T2.`Discount Applied` = '10%' THEN T1._SalesTeamID 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.7737634965795807,7,0,0,28 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 3485,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.street_name = 'adeline street' AND T3.city = 'berkeley',-4.210816627876304,1,0,0,28 3486,Describe the ordered products which were the most overdue from required date.,"SELECT DISTINCT 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 DATEDIFF(T1.ShippedDate, T1.RequiredDate) < 0","SELECT T2.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2._OrderID INNER JOIN Products AS T3 ON T2.`ProductID Database: retail_world` = T3.ProductID WHERE REPLACE(T1.RequiredDate, ',', '') = '1-overdue'",-7.740018535584984,2,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 3488,Which products by Plutzer Lebensmittelgromrkte AG were discontinued and what are their price?,SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Plutzer Lebensmittelgromrkte AG' AND T1.Discontinued = 1,"SELECT T4.CompanyName, T3.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2. SupplierID WHERE T1.`Discontinued` = 'Plutzer Lebensmittelgromrkte AG'",-2.3007168274425362,8,0,0,25 3489,What is the address of the Peking Duck restaurant?,SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.label = 'peking duck restaurant',1.7996675129503839,3,0,0,20 3490,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 T1.social, T1.`state Database: retail_complains` FROM client AS T1 INNER JOIN district AS T2 INNER JOIN state AS T3 ON T3.state_abbrev = T2.StateCode WHERE T2.`district_id` = '100-121-8371'",-7.251313405268544,19,0,0,28 3491,"What is the biggest discount among all orders for the part ""burnished seashell gainsboro navajo chocolate""?",SELECT MAX(T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate',SELECT ( SELECT MAX(l_discount) FROM lineitem WHERE l_partkey = 'burnished seashell gainsboro navajo chocolate' ),-1.889374654611843,4,0,0,25 3492,How many customers are located in London?,SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London',SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London',4.575657378806123,1,1,1,24 3493,Which region has the highest number of restaurants?,SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1,SELECT T.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1,-4.191181032496186,9,0,0,27 3494,Calculate the total products that are supplied by Japan suppliers.,SELECT COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan',SELECT CAST(SUM(CASE WHEN T2.Country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,-0.12845705270134433,15,0,0,29 3495,How many male clients are from the state of Massachusetts?,SELECT COUNT(T3.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.state = 'Massachusetts' AND T3.sex = 'Male',SELECT COUNT(T2.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 WHERE T3.sex = 'Male',-2.282431277098678,1,0,0,26 3496,"Among the orders made by Aimee Bixby, how many of them included at least one kind of product under the category ""Furniture""?",SELECT COUNT(DISTINCT T2.`Order ID`) 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.Category = 'Furniture' AND T1.`Customer Name` = 'Aimee Bixby',"SELECT COUNT(T1.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Aimee Bixby' AND T2.Category = 'Furniture' LIMIT 1",-1.7337275129196694,2,0,0,30 3497,"Of all the products ordered in order no. 10248, which product has the highest user satisfaction?",SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1,SELECT T3.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.`ProductID` WHERE T2.OrderID = 10248 ORDER BY SUM(T1.ReorderLevel) DESC LIMIT 1,-1.3369614192445682,5,0,0,30 3498,"Among all asian restaurants in N. Milpitas Blvd., Milpitas, how many of them have restaurant ID greater than 385?",SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385,SELECT SUM(CASE WHEN T2.food_type = 'asian' AND T1.id_restaurant > 385 AND T3.city = 'milpitas',-5.272965601801969,1,0,0,30 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 3500,How many sales transactions were given by the customer named Joe L. Lopez?,SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Joe' AND T2.MiddleInitial = 'L' AND T2.LastName = 'Lopez',SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID WHERE FirstName = 'Joe' AND T2.MiddleInitial = 'L. Lopez',0.3211792495044454,9,0,0,29 3501,"Of the orders with a lower delivery priority, how many have an urgent priority order?",SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' GROUP BY o_orderdate ORDER BY o_orderdate DESC LIMIT 1,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' LIMIT 1,2.5129945755066996,1,0,0,30 3502,Mention the most populated city and median income of the store in Florida state.,"SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1","SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1",2.271395407613762,2,1,1,30 3503,How many orders were shipped by Federal Shipping?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2 .CompanyName = 'Federal Shipping',2.818226737465892,20,1,1,27 3504,Compare the numbers of orders between the Eastern and Western stores in 2015.,"SELECT east, west FROM ( SELECT COUNT(`Order ID`) AS east , ( SELECT COUNT(`Order ID`) FROM west_superstore WHERE `Order Date` LIKE '2015%' ) AS west FROM east_superstore WHERE `Order Date` LIKE '2015%' )",SELECT CAST(COUNT(CASE WHEN T2.country = 'East' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`UNKNOWN Database: superstore`) FROM west_superstore AS T1 INNER JOIN westerns AS T2 ON T1.system = T2.`system`,-7.539504109382582,21,0,0,25 3505,What is the highest amount of order made by the sales representative in Boston? Please give the name of the product and amount.,"SELECT T2.productName, T1.quantityOrdered * T1.priceEach FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T1.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T4.city = 'Boston' AND T4.salesRepEmployeeNumber IN ( SELECT employeeNumber FROM employees WHERE jobTitle = 'Sales Rep' ) ORDER BY T1.quantityOrdered DESC LIMIT 1","SELECT t.productName, t.quantityOrdered * t.amount FROM orderdetails AS t INNER JOIN products AS t1 INNER JOIN orders AS t2 ON t1.productCode = t2._productCode INNER JOIN employees AS t3 ON t2.salesRepEmployeeNumber = t3.employeeNumber INNER JOIN customers AS t4 ON t4.country = 'Boston' WHERE t5.customerName = 'Sales Rep'",-4.568422501647633,24,0,0,30 3506,Who ordered the Bush Mission Pointe Library in the Central Region?,SELECT DISTINCT T2.`Customer Name` FROM central_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` = 'Bush Mission Pointe Library' AND T3.Region = 'Central',"SELECT DISTINCT T3.`Product Name` FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Bush Mission Pointe Library' AND T2.Region = 'Central'",2.6399245465759056,1,0,0,30 3507,"What is the largest quantity of ""Manjimup Dried Apples"" for an order?",SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T2.ProductID = T1.ProductID WHERE T1.ProductName = 'Manjimup Dried Apples' ORDER BY T2.Quantity DESC LIMIT 1,SELECT largest quantity FROM `Order Details` WHERE ProductID = ( SELECT ProductID FROM Products WHERE ProductName = 'Manjimup Dried Apples' ),-3.0071797545264576,3,0,0,30 3508,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 T2.`Tags` = 'Service Member',0.7935554650782183,1,0,0,20 3509,"Between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server DARMON?","SELECT AVG(CAST(SUBSTR(ser_time, 4, 2) AS REAL)) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '2017-04-01'",SELECT AVG(ser_time) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '4/1/2017',3.0603446849767035,1,0,0,30 3510,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 T3.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.N_Nationkey INNER JOIN ( SELECT AVG(c_acctbal) AS REAL) / 80 FROM customer ) AS T3,-7.302651972879475,1,0,0,16 3511,How many suppliers in Australia whose products were discontinued?,SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country = 'Australia',SELECT SUM(CASE WHEN T2.Country = 'Australia' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.'SupplierID',-1.0968322238614256,21,0,0,30 3512,Where are the ship countries of orders placed by Janet Leverling?,SELECT DISTINCT T2.ShipCountry FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Janet' AND T1.LastName = 'Leverling',"SELECT CAST(SUM(IIF(T2.ShipCountry = 'Janet Leverling', 1, 0)) AS REAL) * 100 / COUNT(T1.FirstName) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID",1.0649266184226298,8,0,0,27 3513,How many furniture products were ordered at central superstore?,SELECT COUNT(*) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Furniture',SELECT SUM(CASE WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID Database: superstore` = T2.`Product `Product ID`,-7.2883116544676,2,0,0,20 3514,"Among the cars with an acceleration of over 10 miles per squared hour, how many of them cost more than $20000 and less than $30000?",SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.acceleration > 10 AND T2.price BETWEEN 20000 AND 30000,SELECT COUNT(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.`acceleration Database: cars` > ( SELECT MAX(T1.acceleration) * 1000 FROM data ) / 10,-8.873932963022526,27,0,0,30 3515,How many Sales Manager who are working in Sydney? List out their email.,SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.jobTitle LIKE '%Sales Manager%' AND T2.city = 'Sydney',SELECT email FROM ( SELECT email FROM employees WHERE officeCode = 'Sydney' ) WHERE city = 'Sales Manager',1.1684034597887167,1,0,0,29 3516,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 T1.`UnitPrice Database: retail_world` = 'Chef Anton' AND 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 T2.`CompanyName` LIKE 'CheAnton',-5.638663785774497,21,0,0,30 3517,How many times does the consumer have no dispute over a non-timely response from the company?,SELECT COUNT(`Timely response?`) FROM events WHERE `Timely response?` = 'No' AND `Consumer disputed?` = 'No',SELECT COUNT(Consumer) FROM events WHERE Timely = 'No' AND response = 'Not disputed',3.4007898289626377,2,0,0,27 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 3519,"What is the restaurant's name and ID located at Ocean Avenue, San Francisco?","SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue'","SELECT T2.street_name, T3.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = 'san francisco' WHERE T2.`label` = 'ocean ave'",-3.089668291065969,2,0,0,22 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 3521,How many cities are located in the Bay Area?,SELECT COUNT(city) FROM geographic WHERE region = 'bay area',SELECT COUNT(city) FROM geographic WHERE region = 'bay area',4.8700929185746205,1,1,1,23 3522,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.` Customer ID` WHERE T2.Region = 'East' AND T1.Order ID = 'CA-2011-118976',1.356640273505133,6,0,0,30 3523,How many companies are there in the city of London?,SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London',SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London',4.735663816874709,1,1,1,26 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 3525,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 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 WHERET3.region = 'unknown' LIMIT 3,-3.52534971002044,5,0,0,25 3526,Which product did Cruz & Sons Co. order on 2003/3/3?,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.' AND t2.orderDate = '2003-03-03',SELECT productName FROM orderdetails WHERE orderNumber = '2003-03-03' AND orderDate LIKE '%/%/3%',-3.320408946975679,11,0,0,30 3527,Which item was shipped on 3/4/2013 and scheduled for same day delivery in the South region?,SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2013-03-04' AND T2.Region = 'South' AND T1.`Order Date` = '2013-03-04',SELECT T3.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` WHERE T1.ShipDate = '2013-03-04' AND T2.Region = 'South',1.5302735986398466,2,0,0,30 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 3530,How much is the total quantity of items from the East region shipped on 3/25/2015? Name the products.,"SELECT SUM(T1.Quantity), T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Date` = '2015-03-25' AND T2.Region = 'East'",SELECT SUM(T1.Quantity) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Region = 'East' AND T1.ShipDate = '2015-03-25',1.9808567225450329,3,0,0,30 3531,How many customers in Chicago ordered at least 10 Cardinal EasyOpen D-Ring Binders in a single order?,SELECT COUNT(DISTINCT T1.`Customer ID`) 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` = 'Cardinal EasyOpen D-Ring Binders' AND T2.City = 'Chicago' AND T1.Quantity > 10,SELECT COUNT(`Customer ID`) FROM west_superstore WHERE `Product Name` = 'Cardinal EasyOpen D-Ring Binders' GROUP BY `Customer ID` LIMIT 10,-2.2444416427954064,8,0,0,30 3532,Add the total profit of Patrick Gardner in the Central region.,SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Patrick Gardner' AND T1.Region = 'Central',"SELECT CAST(SUM(IIF(T2.`Customer Name` = 'Patrick Gardner', 1, 0)) AS REAL) * 100 / COUNT(T1.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID`",-2.7676462290525508,20,0,0,28 3533,Please list the full name and region of each employee in alphabetical order.,"SELECT DISTINCT T1.FirstName, T1.LastName, T4.RegionDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID ORDER BY T1.FirstName","SELECT FirstName, LastName, RegionDescription FROM Employees GROUP BY EmployeeID",-5.0888331661323365,29,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 3536,List all the streets with more than 10 restaurants in Alameda county.,SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10,SELECT T3.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T2.`id_restaurant` > 10,-0.798103339336913,6,0,0,29 3537,"Provide order number, warehouse code of customers Elorac, Corp.","SELECT DISTINCT T1.OrderNumber, T1.WarehouseCode FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Elorac, Corp'","SELECT DISTINCT T1.OrderNumber, T2.`Customer Names` FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`WarehouseCode` = 'Elorac, Corp'",3.8963155607672992,1,0,0,28 3538,List the suppliers' names which supplied smoke red pale saddle plum.,SELECT 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 T1.p_name = 'smoke red pale saddle plum',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 = 'smoke red pale saddle plum',-1.4320991730333552,1,0,0,30 3539,Count the total quantity for sales from id 1 to 10.,SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10,SELECT SUM(Quantity) FROM Sales WHERE SalesID BETWEEN 1 AND 10,3.889448638065988,1,1,1,26 3540,What are the names of the suppliers whose products have the highest user satisfaction?,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products ),SELECT T3.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` ORDER BY T2.ReorderLevel DESC LIMIT 1,-6.711317726182812,1,0,0,26 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 3542,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,SELECT T4.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.`OrderID` = 3,-3.5448680916161774,26,0,0,29 3543,Name the part which is most profitable.,"SELECT T.p_name FROM ( SELECT T3.p_name , T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity AS num 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 ) AS T ORDER BY T.num DESC LIMIT 1",SELECT T3.p_name FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_supponpkey INNER JOIN part AS T3 ON T2[p_partkey] = T3,-4.741854987256462,1,0,0,28 3544,"Among all orders shipped, calculate the percentage of orders shipped at least 3 days before the required date.",SELECT COUNT(CASE WHEN JULIANDAY(t1.shippeddate) - JULIANDAY(t1.requireddate) > 3 THEN T1.customerNumber ELSE NULL END) FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.status = 'Shipped',"SELECT CAST(SUM(IIF(T1.status = 'Shipped', 1, 0)) AS REAL) * 100 / COUNT(T2.quantityOrdered) FROM orders AS T1 INNER JOIN orderdetails AS T2 ON T1.orderNumber = T2.ordernumber",5.881437831289339,1,0,0,22 3545,"Which complaint is more urgent, complaint ID CR2400594 or ID CR2405641?",SELECT CASE WHEN SUM(CASE WHEN `Complaint ID` = 'CR2400594' THEN priority END) > SUM(CASE WHEN `Complaint ID` = 'CR2405641' THEN priority END) THEN 'CR2400594' ELSE 'CR2405641' END FROM callcenterlogs,SELECT `Complaint ID` FROM callcenterlogs WHERE priority = '1-URGENT' AND ID = 'CR2400594',-0.684977322961676,2,0,0,30 3546,What are the countries in the region of 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',2.0029301643565813,1,0,0,23 3547,What is the name of the product that Aimee Bixby bought?,SELECT DISTINCT T3.`Product Name` 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` = T1.`Product ID` WHERE T2.`Customer Name` = 'Aimee Bixby',"SELECT DISTINCT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID`, T2.`Customer Name` = 'Aimee Bixby'",-1.9518294886572056,2,0,0,26 3548,"What are the restaurants that are located at ""19th St. Oakland""?",SELECT T1.id_restaurant FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'Oakland' AND T2.street_name = '19th St',SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.city = '19th St. Oakland',4.23702315498893,1,0,0,26 3549,Please calculate the total payment amount of customers who come from the USA.,SELECT SUM(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.country = 'USA',SELECT SUM(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customernumber = T2.customerNumber WHERE t2.country = 'USA',4.190687522972554,2,1,1,17 3550,List by order number the 3 items with the lowest price after applying the discount.,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice * (1 - l_discount) LIMIT 3,SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice * (1 - l_discount) LIMIT 3,2.8717456629879443,1,1,1,29 3551,"Among customers named Kate, who has the highest quantity?","SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Kate' ORDER BY T1.Quantity DESC LIMIT 1","SELECT FirstName, LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID WHERE T2.FirstName = 'Kate' GROUP BY LastName ORDER BY Quantity DESC LIMIT 1",2.8904996917338743,1,0,0,30 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 3553,What is the average price of the orders made by a customer in Germany?,SELECT AVG(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 CAST(SUM(CASE WHEN T2.c_mktsegment = 'GERMANY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.o_orderkey) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2._custkey,-5.725536401190269,1,0,0,30 3554,"What profit can the seller Carousel DieCast Legends make from the sale of the product described as ""The perfect holiday or anniversary gift for executives""?",SELECT SUM(T2.MSRP - T2.buyPrice) FROM productlines AS T1 INNER JOIN products AS T2 ON T1.productLine = T2.productLine WHERE T2.productVendor = 'Carousel DieCast Legends' AND T1.textDescription LIKE '%perfect holiday or anniversary gift for executives%',"SELECT CAST(SUM(IIF(T1.textDescription = 'Perfect holiday or anniversary gift for executives', 1, 0)) AS REAL) * 100 / COUNT(T2.MSRP) FROM productlines AS T1 INNER JOIN products AS T2 ON T1.productLine = T2.productCode WHERE T2.`productVendor` = 'Carousel DieCast Legends'",-1.6441702551056507,1,0,0,30 3555,List down the full name of clients who have disputed the response from company.,"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.`Consumer disputed?` = 'Yes'","SELECT first, middle, last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer disputed?` = 'Yes'",-0.29041658566436807,1,0,0,27 3556,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 T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.`origin Database: cars` = T1.`country` INNER JOIN price AS T4 WHERE T4.model_year = 1970 ORDER BY T5.price ASC LIMIT 1,-7.848596659213616,26,0,0,30 3557,Which region has the most territories?,SELECT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T2.RegionID ORDER BY COUNT(T1.TerritoryID) DESC LIMIT 1,SELECT Region FROM Territories GROUP BY RegionID ORDER BY COUNT(T1.TerritoryID) DESC LIMIT 1,-3.6588791678980663,2,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 3559,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,2.1161224697089236,7,1,1,26 3560,List the phone numbers of customers whose order priority is urgent.,SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderpriority = '1-URGENT',SELECT T3.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.C_Custkey WHERE T2.`c_mktsegment` = 'URGENT',-0.25620299264337126,6,0,0,28 3561,The sales of how many territories in total do the employees in London take charge of?,SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'London',SELECT COUNT(*) FROM ( SELECT COUNT(TerritoryID) FROM Employees WHERE City = 'London' AND TerritoryID = 0 ) AS num,-0.47558735229327714,5,0,0,29 3562,"What is the quantity of the part ""burnished seashell gainsboro navajo chocolate"" ordered in order no.1?",SELECT T1.l_quantity FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate',SELECT AVG(l_quantity) FROM lineitem WHERE l_orderkey = 1 AND p_name = 'burnished seashell gainsboro navajo chocolate',0.9432483508677615,1,0,0,29 3563,"What is the total production of the products from the supplier ""Escargots Nouveaux""?",SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Escargots Nouveaux',SELECT SUM(CASE WHEN T2.CompanyName = 'Escargots Nouveaux' THEN 1 ELSE 0 END) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,6.158040982828438,1,0,0,28 3564,List restaurant ids located in Danville city.,SELECT id_restaurant FROM location WHERE city = 'Danville',SELECT id_restaurant FROM location WHERE city = 'Danville',4.160762766797156,1,1,1,27 3565,List the customer's ID and last name of the customer that purchased a product with a quantity greater than 90% of the average quantity of all listed products.,"SELECT T2.CustomerID, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity > ( SELECT AVG(Quantity) FROM Sales ) * 0.9","SELECT T1.CustomerID, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.`CustomerID` WHERE (SUM(IIF(T2.Quantity > 90, 1, 0)) > 0)",-1.0902491750311074,1,0,0,27 3566,"Among all the suppliers in debt, how many of them are in Europe?",SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE' AND T3.s_acctbal < 0,SELECT COUNT(T3.s_suppkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2._regionkey INNER JOIN supplier AS T3 ON T2.r_name = 'EUROPE',2.957961384790278,2,0,0,28 3567,Calculate the percentage of sold blades in the total number of transactions.,"SELECT CAST(SUM(IIF(T1.Name = 'Blade', 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(IIF(T1.Name = 'Blade', 1, 0)) AS REAL) * 100 / COUNT(T2.SalesID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1. ProductID = T2.ProductID",3.6880397517452397,2,0,0,20 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 3569,Please list the names of all the car models whose origin country is the USA.,SELECT DISTINCT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T2.country = T3.origin WHERE T3.country = 'USA',SELECT COUNT(T1.car_name) 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.830923232392193,6,0,0,26 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 3571,At what Latitude and Longitude is the store that has used the WARE-PUJ1005 warehouse the fewest times?,"SELECT T2.Latitude, T2.Longitude FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.WarehouseCode = 'WARE-PUJ1005' GROUP BY T2.StoreID ORDER BY COUNT(T1.WarehouseCode) ASC LIMIT 1","SELECT Latitude, Longitude FROM `Store Locations` WHERE `Warehouse Code` = 'WARE-PUJ1005' GROUP BY Latitude",-0.2296931110446235,4,0,0,30 3572,Calculate the total price for products from id 400 to 500.,SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500,"SELECT CAST(SUM(IIF(T2.SalesID = 400, 1, 0)) AS REAL) * 100 / COUNT(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID BETWEEN 400 AND 500",1.6789416308972038,5,0,0,28 3573,Please list all the customers that have Steve Patterson as their sales representitive.,SELECT t1.customerName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Steve' AND t2.lastName = 'Patterson',SELECT customerName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE t1.customerName = 'Steve Patterson',3.242689151962863,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 3575,What is the position title for Laura Callahan?,SELECT Title FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan',"SELECT FirstName, LastName FROM Employees WHERE Title = 'Laura Callahan'",3.929401679375086,1,0,0,27 3576,How many clients with the last name Alvarado are from Maryland?,SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T1.state_abbrev = T3.StateCode WHERE T2.last = 'Alvarado' AND T2.state = 'MD',SELECT COUNT(*) FROM district INNER JOIN client AS T1 INNER JOIN state AS T2 ON T1.state_abbrev = T2.StateCode WHERE T2.`last` = 'Maryland',-2.7281212773966597,2,0,0,24 3577,"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 l_shipmode FROM lineitem WHERE SUBSTR(l_shipinstruct, 1, 0) = 'DELIVER IN PERSON'",-1.0090827539596365,5,0,0,29 3578,"Among the employee names, what is the most common middle initial?",SELECT MiddleInitial FROM Employees GROUP BY MiddleInitial ORDER BY COUNT(MiddleInitial) DESC LIMIT 1,SELECT MiddleInitial FROM Employees WHERE FirstName = 'MiddleInitial',2.4107387536517435,1,0,0,30 3579,State the name of employee that manages the order from Victuailles en stock?,"SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.CompanyName = 'Victuailles en stock'",SELECT DISTINCT T3.CompanyName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.`EmployeeID Database: retail_world` = T2.`Employees` INNER JOIN Customers AS T3 ON T2.CustomerID = T3.`CustomerID` WHERE T1.FirstName = 'Victuailles en stock',-7.434028179825788,1,0,0,29 3580,Identify the number of employees in Northern sales region.,SELECT COUNT(T2.EmployeeID) FROM Territories AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Region AS T3 ON T1.RegionID = T3.RegionID WHERE T3.RegionDescription = 'Northern',SELECT CAST(COUNT(CASE WHEN T2.RegionDescription = 'Northern' THEN 1 ELSE 0 END) AS REAL) * 10,-4.317553682206574,1,0,0,30 3581,Find and list the part key of the parts which has an above-average retail price.,SELECT p_partkey FROM part WHERE p_retailprice > ( SELECT AVG(p_retailprice) FROM part ),SELECT p_partkey FROM part WHERE ( SELECT AVG(p_retailprice) FROM part ),2.6003060713218384,1,0,0,27 3582,"Who is the sales representative that made the order which was sent to 25 Maiden Lane, Floor No. 4?","SELECT T2.firstName, T2.lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T1.addressLine1 = '25 Maiden Lane' AND T1.addressLine2 = 'Floor No. 4'",SELECT T1.customerName FROM customers AS T1 INNER JOIN employees AS T2 ON T2.salesRepEmployeeNumber = T3.employeeNumber WHERE t2.lastName = 'Maiden Lane' AND t1.creditLimit = 4,-3.2729452189760826,9,0,0,30 3583,Name of customers who have ordered Cocktail Glasses by online sales channel.,SELECT T FROM ( SELECT DISTINCT CASE WHEN T3.`Product Name` = 'Cocktail Glasses' AND T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` END 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 IS NOT NULL,SELECT T FROM ( SELECT CASE WHEN T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` ELSE NULL END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL,1.8534680781667823,3,0,0,23 3584,List by their ID the complaints received by the company on 25/09/2014 that took the longest.,"SELECT `Complaint ID` FROM events WHERE strftime('%J', `Date sent to company`) - strftime('%J', `Date received`) = ( SELECT MAX(strftime('%J', `Date sent to company`) - strftime('%J', `Date received`)) FROM events WHERE `Date sent to company` = '2014-09-25' ) AND `Date sent to company` = '2014-09-25'","SELECT `Complaint ID` FROM events WHERE strftime('%Y', `Date received`) = '25/09/2014' AND company = '2014-09-25'",2.3829545997566735,1,0,0,30 3585,"Which category does ""tofu"" belong to?",SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu',SELECT CategoryName FROM Categories WHERE CategoryName = 'tofu',2.1669870167006637,1,0,0,20 3586,Give the percentage of Japanese suppliers whose account is in debt.,"SELECT CAST(SUM(IIF(T2.n_name = 'JAPAN', 1, 0)) AS REAL) * 100 / COUNT(T1.s_name) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0","SELECT CAST(SUM(IIF(T2.n_name = 'JAPAN', 1, 0)) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1. s_nationkey = T2. n_name",5.860834093080811,1,0,0,14 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 3588,"Among the products that are no longer in continuous production, how many of them have their supplier in the USA?",SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'USA' AND T1.Discontinued = 1,"SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID Database: retail_world` WHERE T2.Country = 'USA' AND STRFTIME('%Y', T1.`Discountinued`) = 1",-6.810265505634905,18,0,0,28 3589,"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(IIF(T1.State = 'Indiana', 1, 0)) AS REAL) * 100 / COUNT(T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID` WHERE T2.Region = 'Central'",-3.2461132173204077,7,0,0,28 3590,List down all of the product names that were placed by sales person with id 10.,SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 10,SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.SalesPersonID = 10 THEN T1.Name ELSE NULL END AS T FROM Products ) WHERE T IS NOT NULL,-2.6064794780510705,2,0,0,24 3591,"Name the countries that belong in the region with comment description ""furiously express accounts wake sly"".",SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey WHERE T2.r_comment = 'furiously express accounts wake sly',SELECT T1.n_name FROM nation AS T1 INNER JOIN region AS T2 ON T1._regionkey = T2.r_regionkey WHERE T2.`r_comment` = 'furiously express accounts wake sly',-1.5750943459251971,1,0,0,26 3592,How many orders were shipped to GREAL via United Package?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.CustomerID = 'GREAL' AND T2.CompanyName = 'United Package',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.`CompanyName` = 'United Package',-2.052695518947801,4,0,0,29 3593,Make a list of all the territories in the Southern region.,SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern',SELECT COUNT(T1.TerritoryDescription) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2 . RegionID WHERE T2.RegionDescription = 'Southern',0.9735570870411194,9,0,0,29 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 3595,"Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'","SELECT DISTINCT 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 WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied` 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 WHERE T3.`Product Name` = 'Cocktail Glasses' AND T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Discount Applied` DESC LIMIT 1 )",SELECT T FROM ( SELECT DISTINCT CASE WHEN T2.`Sales Channel` = 'Cocktail Glasses' 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,-2.917392482338486,6,0,0,27 3596,"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 T FROM ( SELECT DISTINCT CASE WHEN T2.Quantity > 403 AND T1.SalesID BETWEEN 30 AND 40 THEN T2.`CustomerID` ELSE NULL END AS T FROM Sales ) WHERE T IS NOT NULL,-0.6122235009974227,2,0,0,29 3597,How many employees are there in Sydney?,SELECT COUNT(employeeNumber) FROM employees WHERE officeCode = ( SELECT officeCode FROM offices WHERE city = 'Sydney' ),SELECT COUNT(officeCode) FROM employees WHERE city = 'Sydney',4.575657378806123,1,0,0,22 3598,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 COUNT(T1.TID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2._RegionID WHERE T2.RegionDescription = 'Eastern',-3.8109308433901705,2,0,0,28 3599,How many suppliers does Northwind have in USA?,SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA',SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA',4.535546361480658,1,1,1,26 3600,"Among the customers from Brazil, how many customers are in automobile market segment?",SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'AUTOMOBILE' AND T2.n_name = 'BRAZIL',"SELECT COUNT(IIF(T1.c_mktsegment = 'AUTOMOBILE', 1, 0)) FROM customer AS T1 INNER JOIN nation AS T2 ON T1=T2.n_nationkey INNER JOIN ( SELECT AVG(c_acctbal) AS REAL) * 10",-3.9302476568128166,2,0,0,29 3601,How many Australian customers who have credit line under 220000?,SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Australia',SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Australia',0.3927829349473405,5,1,1,30 3602,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`,1.736666517407575,3,1,1,30 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 3605,"How many products were supplied by Pavlova, Ltd.?","SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Pavlova, Ltd.'","SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.`SupplierID` WHERE T2.CompanyName = 'Pavlova, Ltd.'",-1.5331069727752242,8,0,0,27 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 3608,How many records are in the Sales Orders table?,SELECT COUNT(OrderNumber) FROM `Sales Orders`,SELECT COUNT(OrderNumber) FROM `Sales Orders`,3.9261874356305757,1,1,1,21 3609,List the distinct values of Sales Channel in the Sales Orders table.,SELECT DISTINCT `Sales Channel` FROM `Sales Orders`,SELECT DISTINCT `Sales Channel` FROM `Sales Orders`,2.7848209580947096,1,1,1,23 3610,What is the average _SalesTeamID in the Sales Orders table?,SELECT AVG(_SalesTeamID) FROM `Sales Orders`,SELECT AVG(_SalesTeamID) FROM `Sales Orders`,4.297958644536284,1,1,1,23 3611,What is the total _SalesTeamID in the Sales Orders table?,SELECT SUM(_SalesTeamID) FROM `Sales Orders`,SELECT SUM(_SalesTeamID) FROM `Sales Orders`,5.0814097158861165,1,1,1,23 3612,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 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 3615,Which _CustomerID has the highest _SalesTeamID?,SELECT _CustomerID FROM `Sales Orders` ORDER BY _SalesTeamID DESC LIMIT 1,SELECT _CustomerID FROM `Sales Orders` ORDER BY _SalesTeamID DESC LIMIT 1,4.898225637838208,1,1,1,30 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 3617,How many records are in the Products table?,SELECT COUNT(ProductID) FROM Products,SELECT COUNT(ProductID) FROM Products,4.233836292305277,1,1,1,21 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 3619,"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,21 3620,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 3621,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 T2.ProductID = T1._ProductID,1.2080396042427846,2,0,0,28 3622,What is the average _SalesTeamID for joined Sales Orders and Products records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID,2.7880758779292294,1,1,1,26 3623,"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,26 3624,"For each ProductID, how many Sales Orders records are linked?","SELECT T2.ProductID, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.`ProductID`, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID GROUP BY T2`.`ProductID",-0.3298900965604642,4,0,0,30 3625,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 3626,How many records are in the events table?,SELECT COUNT(`Complaint ID`) FROM events,SELECT COUNT(`Complaint ID`) FROM events,3.2446266442338896,1,1,1,21 3627,List the distinct values of Client_ID in the events table.,SELECT DISTINCT Client_ID FROM events,SELECT DISTINCT Client_ID FROM events,4.508142555656296,1,1,1,16 3628,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Complaint ID`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Complaint ID`) FROM events GROUP BY client_id",-0.0766145268262662,2,1,1,21 3629,How many records in events were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Date received` LIKE '2019%',4.531000601842846,1,1,1,22 3630,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 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 3632,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,22 3633,What is the total p_retailprice in the part table?,SELECT SUM(p_retailprice) FROM part,SELECT SUM(p_retailprice) FROM part,3.9925081370819413,1,1,1,20 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 3636,"For each p_type, what is the average p_retailprice?","SELECT p_type, AVG(p_retailprice) FROM part GROUP BY p_type","SELECT P_type, AVG(p_retailprice) FROM part GROUP BY p_type",3.1066617731926724,1,1,1,29 3637,Which p_name has the highest p_retailprice?,SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,SELECT p_name FROM part ORDER BY p_retailprice DESC LIMIT 1,4.8437841492662725,1,1,1,23 3638,How many records are in the orders table?,SELECT COUNT(o_orderkey) FROM orders,SELECT COUNT(o_orderkey) FROM orders,2.046806108159898,1,1,1,21 3639,List the distinct values of o_orderstatus in the orders table.,SELECT DISTINCT o_orderstatus FROM orders,SELECT DISTINCT o_orderstatus FROM orders,4.732550129264441,1,1,1,16 3640,What is the average o_totalprice in the orders table?,SELECT AVG(o_totalprice) FROM orders,SELECT AVG(o_totalprice) FROM orders,2.961204791621454,1,1,1,20 3641,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,22 3642,What is the highest o_totalprice in the orders table?,SELECT MAX(o_totalprice) FROM orders,SELECT MAX(o_totalprice) FROM orders,3.0436374256045164,1,1,1,20 3643,"For each o_orderstatus, how many records are there in orders?","SELECT o_orderstatus, COUNT(o_orderkey) FROM orders GROUP BY o_orderstatus","SELECT o_Orderstatus, COUNT(o_orderkey) FROM orders GROUP BY o_orderstatus",4.258328108605211,1,1,1,28 3644,"For each o_orderstatus, what is the average o_totalprice?","SELECT o_orderstatus, AVG(o_totalprice) FROM orders GROUP BY o_orderstatus","SELECT o_orderstatus, AVG(o_totalprice) FROM orders GROUP BY o_Orderstatus",1.6320801767541326,4,1,1,28 3645,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 3646,How many records in orders were recorded in 2018?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2018%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2018%',4.775940017408425,1,1,1,22 3647,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 3648,List the distinct values of l_linestatus in the lineitem table.,SELECT DISTINCT l_linestatus FROM lineitem,SELECT DISTINCT l_linestatus FROM lineitem,4.5739967119286575,1,1,1,17 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 3650,What is the total l_discount in the lineitem table?,SELECT SUM(l_discount) FROM lineitem,SELECT SUM(l_discount) FROM lineitem,3.285106842666371,1,1,1,22 3651,What is the highest l_discount in the lineitem table?,SELECT MAX(l_discount) FROM lineitem,SELECT MAX(l_discount) FROM lineitem,3.0436374256045164,1,1,1,20 3652,"For each l_linestatus, how many records are there in lineitem?","SELECT l_linestatus, COUNT(l_orderkey) FROM lineitem GROUP BY l_linestatus","SELECT l_linestatus, COUNT(l_orderkey) FROM lineitem GROUP BY l_linestatus",1.1283732078070061,19,1,1,26 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 3654,Which l_linestatus has the highest l_discount?,SELECT l_linestatus FROM lineitem ORDER BY l_discount DESC LIMIT 1,SELECT l_linestatus FROM lineitem ORDER BY l_discount DESC LIMIT 1,2.7843473276576187,1,1,1,23 3655,How many records in lineitem were recorded in 2018?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2018%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2018%',4.412960505279923,1,1,1,23 3656,How many records are in the Products table?,SELECT COUNT(SupplierID) FROM Products,SELECT COUNT(SupplierID) FROM Products,4.508889799613256,1,1,1,20 3657,How many records are in the Suppliers table?,SELECT COUNT(SupplierID) FROM Suppliers,SELECT COUNT(SupplierID) FROM Suppliers,4.281554795135653,1,1,1,20 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 3659,"For each CompanyName, how many records are there in Suppliers?","SELECT CompanyName, COUNT(SupplierID) FROM Suppliers GROUP BY CompanyName","SELECT CompanyName, COUNT(SupplierID) FROM Suppliers GROUP BY CompanyName",4.720593201875388,1,1,1,18 3660,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.ConsumerID,-2.67654473038037,15,0,0,27 3661,List the distinct CompanyName values linked to Products.,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,7.134667971474412,1,1,1,28 3662,"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.`SupplierID Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2[SupplierID] GROUP BY T2.`CompanyName`)",-7.7373874387632675,26,0,0,30 3663,How many records are in the Employees table?,SELECT COUNT(DIFFERENCE) FROM Employees,SELECT COUNT(DIFFERENCE) FROM Employees,4.281554795135653,1,1,1,23 3664,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 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 3666,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 3667,List the distinct values of c_mktsegment in the customer table.,SELECT DISTINCT c_mktsegment FROM customer,SELECT DISTINCT c_mktsegment FROM customer,4.5739967119286575,1,1,1,18 3668,"For each c_mktsegment, how many records are there in customer?","SELECT c_mktsegment, COUNT(c_custkey) FROM customer GROUP BY c_mktsegment","SELECT c_mktsegment, COUNT(c_custkey) FROM customer GROUP BY c_Mktsegment",1.7835743516782323,3,1,1,30 3669,How many records are in the Shippers table?,SELECT COUNT(CompanyName) FROM Shippers,SELECT COUNT(CompanyName) FROM Shippers,4.281554795135653,1,1,1,19 3670,List the distinct values of CompanyName in the Shippers table.,SELECT DISTINCT CompanyName FROM Shippers,SELECT DISTINCT CompanyName FROM Shippers,4.732550129264441,1,1,1,16 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 3672,How many records in Shippers were recorded in 2017?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2017%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2017%',4.412960505279923,1,1,1,26 3673,List the distinct values of city in the generalinfo table.,SELECT DISTINCT city FROM generalinfo,SELECT DISTINCT city FROM generalinfo,4.508142555656296,1,1,1,18 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 3675,What is the average county in the geographic table?,SELECT AVG(county) FROM geographic,SELECT AVG(county) FROM geographic,1.7238943856944275,1,1,1,22 3676,What is the total county in the geographic table?,SELECT SUM(county) FROM geographic,SELECT SUM(county) FROM geographic,2.0682716902406586,1,1,1,23 3677,What is the highest county in the geographic table?,SELECT MAX(county) FROM geographic,SELECT MAX(county) FROM geographic,1.9042390318031022,1,1,1,22 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 3679,Which city has the highest county?,SELECT city FROM geographic ORDER BY county DESC LIMIT 1,SELECT city FROM geographic ORDER BY county DESC LIMIT 1,4.773174011703834,1,1,1,30 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 3681,List the distinct values of n_regionkey in the nation table.,SELECT DISTINCT n_regionkey FROM nation,SELECT DISTINCT n_regionkey FROM nation,3.64534150430876,1,1,1,18 3682,"For each n_regionkey, how many records are there in nation?","SELECT n_regionkey, COUNT(n_nationkey) FROM nation GROUP BY n_regionkey","SELECT n_regionkey, COUNT(n_nationkey) FROM nation GROUP BY n_Regionkey",2.1985162768669366,3,1,1,25 3683,How many records are in the region table?,SELECT COUNT(r_comment) FROM region,SELECT COUNT(r_comment) FROM region,4.795353829950178,1,1,1,22 3684,List the distinct values of r_regionkey in the region table.,SELECT DISTINCT r_regionkey FROM region,SELECT DISTINCT r_regionkey FROM region,3.64534150430876,1,1,1,18 3685,"For each r_regionkey, how many records are there in region?","SELECT r_regionkey, COUNT(r_comment) FROM region GROUP BY r_regionkey","SELECT r_Regionkey, COUNT(r_comment) FROM region GROUP BY r_regionkey",5.271174303156182,1,1,1,22 3686,How many records are in the east_superstore table?,SELECT COUNT(`Customer ID`) FROM east_superstore,SELECT COUNT(`Customer ID`) FROM east_superstore,-0.6722994221878681,2,1,1,23 3687,List the distinct values of Customer ID in the east_superstore table.,SELECT DISTINCT `Customer ID` FROM east_superstore,SELECT DISTINCT `Customer ID` FROM east_superstore,3.06645068596712,1,1,1,20 3688,"For each Customer ID, how many records are there in east_superstore?","SELECT `Customer ID`, COUNT(`Customer ID`) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Customer ID`) FROM east_superstore GROUP BY `Customer id`",1.498476125909368,8,1,1,26 3689,How many records are in the people table?,SELECT COUNT(`Customer ID`) FROM people,SELECT COUNT(`Customer ID`) FROM people,2.626981045637359,1,1,1,21 3690,List the distinct values of City in the people table.,SELECT DISTINCT City FROM people,SELECT DISTINCT City FROM people,2.269073942246225,1,1,1,20 3691,"For each City, how many records are there in people?","SELECT City, COUNT(`Customer ID`) FROM people GROUP BY City","SELECT City, COUNT(`Customer ID`) FROM people GROUP BY City",3.939587244100999,1,1,1,20 3692,How many east_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID`,-0.6047817528024223,8,0,0,27 3693,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN people AS T2 WHERE T2.City = 'east-superstore',0.24902695528031604,2,0,0,27 3694,"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.567298612019031,22,0,0,28 3695,List the distinct values of EmployeeID in the Employees table.,SELECT DISTINCT EmployeeID FROM Employees,SELECT DISTINCT EmployeeID FROM Employees,4.732550129264441,1,1,1,16 3696,How many records are in the Orders table?,SELECT COUNT(EmployeeID) FROM Orders,SELECT COUNT(EmployeeID) FROM Orders,2.046806108159898,1,1,1,27 3697,List the distinct values of EmployeeID in the Orders table.,SELECT DISTINCT EmployeeID FROM Orders,SELECT DISTINCT EmployeeID FROM Orders,3.7368875748870978,1,1,1,18 3698,"For each EmployeeID, how many records are there in Orders?","SELECT EmployeeID, COUNT(EmployeeID) FROM Orders GROUP BY EmployeeID","SELECT EmployeeID, COUNT(EmployeeID) FROM Orders GROUP BY Employeeid",-0.5693922482175321,11,1,1,19 3699,How many records in Orders were recorded in 2016?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2016%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2016%',4.775940017408425,1,1,1,24 3700,List the distinct EmployeeID values linked to Employees.,SELECT DISTINCT T2.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.employeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,3.295705604506689,15,1,1,28 3701,"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 3702,How many records are in the Sales table?,SELECT COUNT(CustomerID) FROM Sales,SELECT COUNT(CustomerID) FROM Sales,2.3974491566795257,2,1,1,28 3703,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,18 3704,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 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 3708,"For each CustomerID, what is the average SalesID?","SELECT CustomerID, AVG(SalesID) FROM Sales GROUP BY CustomerID","SELECT CustomerID, AVG(SalesID) FROM Sales GROUP BY CustomerID",4.2440370062370105,1,1,1,21 3709,Which CustomerID has the highest SalesID?,SELECT CustomerID FROM Sales ORDER BY SalesID DESC LIMIT 1,SELECT CustomerID FROM Sales ORDER BY SalesID DESC LIMIT 1,4.988260417689312,1,1,1,29 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 3711,What is the total Price in the Products table?,SELECT SUM(Price) FROM Products,SELECT SUM(Price) FROM Products,5.135285213219256,1,1,1,22 3712,What is the highest Price in the Products table?,SELECT MAX(Price) FROM Products,SELECT MAX(Price) FROM Products,4.895887793269589,1,1,1,20 3713,"For each ProductID, what is the average Price?","SELECT ProductID, AVG(Price) FROM Products GROUP BY ProductID","SELECT ProductID, AVG(Price) FROM Products GROUP BY ProductID",4.128019882299922,1,1,1,18 3714,Which ProductID has the highest Price?,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 1,SELECT ProductID FROM Products ORDER BY Price DESC LIMIT 1,4.988260417689312,1,1,1,25 3715,How many Sales records have matching records in Products?,SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2. ProductID,6.8278779059027,1,1,1,20 3716,List the distinct ProductID values linked to Sales.,SELECT DISTINCT T2.ProductID FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.ProductID FROM Sales AS T1 INNER JOIN Products AS T2 WHERE T1.SalesID = ( SELECT DISTINCT Price FROM Products ),2.432198270463363,6,0,0,28 3717,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,3.1231628907297826,3,1,1,23 3718,"For each ProductID, how many Sales records are linked?","SELECT T2.ProductID, COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.`ProductID`, COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2. ProductID GROUP BY T2._ProductID",0.6198574531094436,1,0,0,27 3719,How many records in orders were recorded in 2015?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2015%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2015%',4.775940017408425,1,1,1,21 3720,How many records are in the client table?,SELECT COUNT(middle) FROM client,SELECT COUNT(middle) FROM client,1.842977802856676,1,1,1,26 3721,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,13 3722,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(middle) FROM client GROUP BY client_id","SELECT Client_id, COUNT(middle) FROM client GROUP BY client_id",4.915599430868499,1,1,1,21 3723,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,24 3724,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(Client_ID) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(Client_ID) FROM events GROUP BY client_id",5.657580059238104,1,1,1,19 3725,How many records in events were recorded in 2015?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2015%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2015%',0.9721202878798406,1,1,1,24 3726,How many client records have matching records in events?,SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,7.102778900454914,1,1,1,21 3727,List the distinct Client_ID values linked to client.,SELECT DISTINCT T2.Client_ID FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT DISTINCT T2.Client_ID FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2 . Client_ID,7.322100793293633,1,1,1,24 3728,"In 2016, how many joined records exist between client and events?",SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',SELECT COUNT(T1.middle) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` LIKE '2016%',3.863060732190222,1,1,1,28 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 3730,How many records are in the customers table?,SELECT COUNT(postalCode) FROM customers,SELECT COUNT(postalCode) FROM customers,4.281554795135653,1,1,1,26 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 3732,"For each addressLine1, how many records are there in customers?","SELECT addressLine1, COUNT(postalCode) FROM customers GROUP BY addressLine1","SELECT addressLine1, COUNT(postalCode) FROM customers GROUP BY addressline1",3.716031875750716,4,1,1,28 3733,How many records are in the employees table?,SELECT COUNT(officeCode) FROM employees,SELECT COUNT(officeCode) FROM employees,4.281554795135653,1,1,1,26 3734,List the distinct values of employeeNumber in the employees table.,SELECT DISTINCT employeeNumber FROM employees,SELECT DISTINCT employeeNumber FROM employees,4.22603725091863,1,1,1,16 3735,"For each employeeNumber, how many records are there in employees?","SELECT employeeNumber, COUNT(officeCode) FROM employees GROUP BY employeeNumber","SELECT employeenumber, COUNT(officeCode) FROM employees GROUP BY employeeNumber",5.507473026431465,1,1,1,20 3736,How many records are in the Products table?,SELECT COUNT(UnitsInStock) FROM Products,SELECT COUNT(UnitsInStock) FROM Products,4.472691083849381,1,1,1,19 3737,What is the average UnitPrice in the Products table?,SELECT AVG(UnitPrice) FROM Products,SELECT AVG(UnitPrice) FROM Products,5.250901335507442,1,1,1,21 3738,What is the total UnitPrice in the Products table?,SELECT SUM(UnitPrice) FROM Products,SELECT SUM(UnitPrice) FROM Products,5.643234032997981,1,1,1,22 3739,What is the highest UnitPrice in the Products table?,SELECT MAX(UnitPrice) FROM Products,SELECT MAX(UnitPrice) FROM Products,5.447284229782327,1,1,1,20 3740,Which UnitsInStock has the highest UnitPrice?,SELECT UnitsInStock FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT UnitsInStock FROM Products ORDER BY UnitPrice DESC LIMIT 1,2.74856165942381,1,1,1,21 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 3742,How many records are in the Sales by Category table?,SELECT COUNT(ProductSales) FROM `Sales by Category`,SELECT COUNT(ProductSales) FROM `Sales by Category`,3.251157247000616,1,1,1,24 3743,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,20 3744,What is the average Sales in the Sales by Category table?,SELECT AVG(Sales) FROM `Sales by Category`,SELECT AVG(Sales) FROM `Sales by Category`,4.149153669557308,1,1,1,23 3745,What is the total Sales in the Sales by Category table?,SELECT SUM(Sales) FROM `Sales by Category`,SELECT SUM(Sales) FROM `Sales by Category`,4.932604740907138,1,1,1,23 3746,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 3747,"For each Category, how many records are there in Sales by Category?","SELECT Category, COUNT(ProductSales) FROM `Sales by Category` GROUP BY Category","SELECT Category, COUNT(ProductSales) FROM `Sales by Category` GROUP BY Category",1.1951373301920047,1,1,1,21 3748,"For each Category, what is the average Sales?","SELECT Category, AVG(Sales) FROM `Sales by Category` GROUP BY Category","SELECT Category, AVG(Sales) FROM `Sales by Category` GROUP BY Category",1.8389334169977387,1,1,1,23 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 3752,"For each CustomerID, how many records are there in Customers?","SELECT CustomerID, COUNT(CustomerID) FROM Customers GROUP BY CustomerID","SELECT CustomerID, COUNT(CustomerID) FROM Customers GROUP BY CustomerID",4.914943716569838,1,1,1,23 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 3754,List the distinct CustomerID values linked to Sales Orders.,SELECT DISTINCT T2.CustomerID FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.`Customer ID`,2.2843269942518796,1,0,0,30 3755,What is the average _SalesTeamID for joined Sales Orders and Customers records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID,2.76784154322925,1,1,1,26 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 3757,"For each CustomerID, how many Sales Orders records are linked?","SELECT T2.CustomerID, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.`CustomerID`, COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID GROUP BY T2 `CustomerID`",-3.3169931337755347,6,0,0,30 3758,How many records are in the data table?,SELECT COUNT(ID) FROM data,SELECT COUNT(ID) FROM data,4.474103997787976,1,1,1,20 3759,How many records are in the price table?,SELECT COUNT(ID) FROM price,SELECT COUNT(ID) FROM price,4.474103997787976,1,1,1,20 3760,How many data records have matching records in price?,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN price AS T2 ON T1 . ID = T2.ID,3.309083149735649,4,1,1,24 3761,How many records are in the client table?,SELECT COUNT(age) FROM client,SELECT COUNT(age) FROM client,4.474103997787976,1,1,1,19 3762,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(age) FROM client GROUP BY client_id","SELECT Client_id, COUNT(age) FROM client GROUP BY client_id",5.308929195236603,1,1,1,19 3763,How many client records have matching records in events?,SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,7.188191141256713,1,1,1,23 3764,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.age) 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.`phone 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.184634546434205,1,0,0,24 3765,List the distinct values of Product in the reviews table.,SELECT DISTINCT Product FROM reviews,SELECT DISTINCT Product FROM reviews,3.0429959203251267,1,1,1,15 3766,How many records are in the client table?,SELECT COUNT(district_id) FROM client,SELECT COUNT(district_id) FROM client,4.233836292305277,1,1,1,23 3767,List the distinct values of Customer ID in the people table.,SELECT DISTINCT `Customer ID` FROM people,SELECT DISTINCT `Customer ID` FROM people,4.781764725374198,1,1,1,22 3768,"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`",1.0422201400471491,6,1,1,27 3769,How many records are in the central_superstore table?,SELECT COUNT(`Order ID`) FROM central_superstore,SELECT COUNT(`Order ID`) FROM central_superstore,4.058955478397152,1,1,1,21 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 3771,"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 `Customer ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Customer id`",1.498476125909368,8,1,1,27 3772,How many people records have matching records in central_superstore?,SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Card ID`,0.2173741591403058,5,0,0,29 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 3774,"For each Customer ID, how many people records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Card ID` = T2.`Channel ID` GROUP BY T2._Customer ID",-1.6736202077985356,6,0,0,29 3775,How many records are in the partsupp table?,SELECT COUNT(ps_partkey) FROM partsupp,SELECT COUNT(ps_partkey) FROM partsupp,3.598611489804307,2,1,1,22 3776,What is the average ps_supplycost in the partsupp table?,SELECT AVG(ps_supplycost) FROM partsupp,SELECT AVG(ps_supplycost) FROM partsupp,2.6584466662218316,1,1,1,20 3777,What is the total ps_supplycost in the partsupp table?,SELECT SUM(ps_supplycost) FROM partsupp,SELECT SUM(ps_supplycost) FROM partsupp,3.079553430179709,1,1,1,21 3778,What is the highest ps_supplycost in the partsupp table?,SELECT MAX(ps_supplycost) FROM partsupp,SELECT MAX(ps_supplycost) FROM partsupp,3.803141037258856,1,1,1,18 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 3780,How many records are in the Order Details table?,SELECT COUNT(ProductID) FROM `Order Details`,SELECT COUNT(ProductID) FROM `Order Details`,4.168924784157151,1,1,1,20 3781,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 3782,"For each ProductID, how many records are there in Order Details?","SELECT ProductID, COUNT(ProductID) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, COUNT(ProductID) FROM `Order Details` GROUP BY ProductID",2.205674658790451,1,1,1,22 3783,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,26 3784,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer consent provided?`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer consent provided?`) FROM events GROUP BY client_id",0.6295140576540504,2,1,1,18 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 3786,How many records are in the events table?,SELECT COUNT(`Consumer disputed?`) FROM events,SELECT COUNT(`Consumer disputed?`) FROM events,3.8422359514964475,1,1,1,20 3787,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer disputed?`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer disputed?`) FROM events GROUP BY client_id",0.12310258088170124,2,1,1,22 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 3791,List the distinct values of Segment in the people table.,SELECT DISTINCT Segment FROM people,SELECT DISTINCT Segment FROM people,5.1121551324071595,1,1,1,18 3792,"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,22 3793,How many east_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,-0.17855828915639263,10,1,1,25 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 3795,List the distinct values of Country in the Suppliers table.,SELECT DISTINCT Country FROM Suppliers,SELECT DISTINCT Country FROM Suppliers,3.7368875748870978,1,1,1,18 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 3797,How many records are in the client table?,SELECT COUNT(first) FROM client,SELECT COUNT(first) FROM client,4.474103997787976,1,1,1,26 3798,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(first) FROM client GROUP BY client_id","SELECT Client_id, COUNT(first) FROM client GROUP BY client_id",5.101483010172825,1,1,1,18 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 3800,How many client records have matching records in events?,SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID,4.373624308676881,2,1,1,21 3801,"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 3802,"For each Client_ID, how many client records are linked?","SELECT T2.Client_ID, COUNT(T1.first) 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.`first Database: retail_complains`) FROM client AS T1 INNER JOIN events AS T2 WHERE T2.`Consumer consent provided?` = 'No' GROUP BY T1.client_id",-8.080193719589785,2,0,0,29 3803,How many records in Sales Orders were recorded in 2023?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2023%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2023%',2.5546621231758806,1,1,1,23 3804,List the distinct values of Region in the Sales Team table.,SELECT DISTINCT Region FROM `Sales Team`,SELECT DISTINCT Region FROM `Sales Team`,3.817762749807698,1,1,1,22 3805,What is the average SalesTeamID in the Sales Team table?,SELECT AVG(SalesTeamID) FROM `Sales Team`,SELECT AVG(SalesTeamID) FROM `Sales Team`,4.585379189987882,1,1,1,23 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 3807,What is the highest SalesTeamID in the Sales Team table?,SELECT MAX(SalesTeamID) FROM `Sales Team`,SELECT MAX(SalesTeamID) FROM `Sales Team`,4.872540310247595,1,1,1,23 3808,"For each Region, what is the average SalesTeamID?","SELECT Region, AVG(SalesTeamID) FROM `Sales Team` GROUP BY Region","SELECT Region, AVG(SalesTeamID) FROM `Sales Team` GROUP BY Region",3.7539008754002734,1,1,1,25 3809,Which Region has the highest SalesTeamID?,SELECT Region FROM `Sales Team` ORDER BY SalesTeamID DESC LIMIT 1,SELECT Region FROM `Sales Team` ORDER BY SalesTeamID DESC LIMIT 1,3.8477670436799967,1,1,1,26 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 3811,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.44944313845339956,20,1,1,24 3812,What is the average _SalesTeamID for joined Sales Orders and Sales Team records?,SELECT AVG(T1._SalesTeamID) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T1._SalesTeamID = T2.SalesTeamID,SELECT AVG(_SalesTeamID) FROM `Sales Orders`,4.297958644536284,1,0,0,28 3813,"In 2021, 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 '2021%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2021%',1.23847382220544,26,1,1,30 3814,"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 Team` GROUP BY T2 . Region",-2.2967874160425352,6,0,0,25 3815,How many records are in the generalinfo table?,SELECT COUNT(label) FROM generalinfo,SELECT COUNT(label) FROM generalinfo,2.046806108159898,1,1,1,18 3816,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(label) FROM generalinfo GROUP BY city","SELECT city, COUNT(label) FROM generalinfo GROUP BY city",5.223027939731705,1,1,1,19 3817,How many Products records have matching records in Sales?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2._ProductID,1.9683945007579653,1,0,0,24 3818,List the distinct CustomerID values linked to Products.,SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2 . ProductID,3.858427072429393,3,1,1,23 3819,What is the average Price for joined Products and Sales records?,SELECT AVG(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1 . ProductID = T2.ProductID,3.4381113455820937,4,1,1,24 3820,"For each CustomerID, how many Products records are linked?","SELECT T2.CustomerID, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2->ProductID GROUP BY T2.`CustomerID`",-2.1458217679635645,8,0,0,29 3821,List the distinct values of CategoryID in the Categories table.,SELECT DISTINCT CategoryID FROM Categories,SELECT DISTINCT CategoryID FROM Categories,4.5739967119286575,1,1,1,17 3822,How many records are in the Products table?,SELECT COUNT(ProductName) FROM Products,SELECT COUNT(ProductName) FROM Products,4.281554795135653,1,1,1,19 3823,List the distinct values of CategoryID in the Products table.,SELECT DISTINCT CategoryID FROM Products,SELECT DISTINCT CategoryID FROM Products,3.6114104240234646,1,1,1,15 3824,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(ProductName) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(ProductName) FROM Products GROUP BY CategoryID",4.914943716569838,1,1,1,19 3825,List the distinct ProductName values linked to Categories.,SELECT DISTINCT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2 . CategoryID,4.148467611236144,2,1,1,26 3826,List the distinct values of StateCode in the Regions table.,SELECT DISTINCT StateCode FROM Regions,SELECT DISTINCT StateCode FROM Regions,3.7368875748870978,1,1,1,14 3827,How many records are in the callcenterlogs table?,SELECT COUNT(outcome) FROM callcenterlogs,SELECT COUNT(outcome) FROM callcenterlogs,4.858577923200564,1,1,1,20 3828,How many records are in the south_superstore table?,SELECT COUNT(`Customer ID`) FROM south_superstore,SELECT COUNT(`Customer ID`) FROM south_superstore,4.058955478397152,1,1,1,23 3829,List the distinct values of Customer ID in the south_superstore table.,SELECT DISTINCT `Customer ID` FROM south_superstore,SELECT DISTINCT `Customer ID` FROM south_superstore,3.923274995964464,1,1,1,20 3830,"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,27 3831,How many records are in the product table?,SELECT COUNT(`Product ID`) FROM product,SELECT COUNT(`Product ID`) FROM product,2.626981045637359,1,1,1,22 3832,List the distinct values of Product ID in the product table.,SELECT DISTINCT `Product ID` FROM product,SELECT DISTINCT `Product ID` FROM product,4.781764725374198,1,1,1,21 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 3834,How many south_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Product ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,0.6917368836333889,14,0,0,28 3835,List the distinct Customer ID values linked to south_superstore.,SELECT DISTINCT T2.`Customer ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.4957358249086206,1,0,0,27 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 3837,How many south_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,2.9645695373130807,5,1,1,26 3838,List the distinct Product ID values linked to south_superstore.,SELECT DISTINCT T2.`Product ID` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.`Product ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID,1.4957358249086206,1,0,0,23 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 3840,List the distinct values of RegionID in the Territories table.,SELECT DISTINCT RegionID FROM Territories,SELECT DISTINCT RegionID FROM Territories,4.732550129264441,1,1,1,16 3841,List the distinct values of RegionDescription in the Region table.,SELECT DISTINCT RegionDescription FROM Region,SELECT DISTINCT RegionDescription FROM Region,4.22603725091863,1,1,1,17 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 3843,How many Customers records have matching records in Sales Orders?,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID,0.7262626288841343,9,1,1,30 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 3845,What is the average _SalesTeamID for joined Customers and Sales Orders records?,SELECT AVG(T2._SalesTeamID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,SELECT AVG(T2._SalesTeamID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.CustomerID = T2._CustomerID,2.76784154322925,1,1,1,26 3846,"In 2022, 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 '2022%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2022%',2.7654269137015395,6,1,1,29 3847,"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",-1.9620251506132806,8,0,0,30 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 3849,How many records are in the EmployeeTerritories table?,SELECT COUNT(EmployeeID) FROM EmployeeTerritories,SELECT COUNT(EmployeeID) FROM EmployeeTerritories,0.3305238570680074,2,1,1,26 3850,List the distinct values of TerritoryDescription in the Territories table.,SELECT DISTINCT TerritoryDescription FROM Territories,SELECT DISTINCT TerritoryDescription FROM Territories,4.315921288822575,1,1,1,20 3851,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.EmployeeID = T2 . EmployeeID,0.8910903975723119,21,1,1,30 3852,How many records are in the central_superstore table?,SELECT COUNT(ID) FROM central_superstore,SELECT COUNT(ID) FROM central_superstore,2.2761764794579995,2,1,1,18 3853,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,25 3854,How many records are in the Suppliers table?,SELECT COUNT(CompanyName) FROM Suppliers,SELECT COUNT(CompanyName) FROM Suppliers,4.472691083849381,1,1,1,19 3855,"For each Country, how many records are there in Suppliers?","SELECT Country, COUNT(CompanyName) FROM Suppliers GROUP BY Country","SELECT Country, COUNT(CompanyName) FROM Suppliers GROUP BY Country",4.58756171296914,1,1,1,21 3856,How many records are in the orderdetails table?,SELECT COUNT(orderNumber) FROM orderdetails,SELECT COUNT(orderNumber) FROM orderdetails,4.829372047253272,1,1,1,23 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 3858,What is the average quantityOrdered in the orderdetails table?,SELECT AVG(quantityOrdered) FROM orderdetails,SELECT AVG(quantityOrdered) FROM orderdetails,3.728650270570542,1,1,1,20 3859,What is the total quantityOrdered in the orderdetails table?,SELECT SUM(quantityOrdered) FROM orderdetails,SELECT SUM(quantityOrdered) FROM orderdetails,4.151560844427445,1,1,1,21 3860,What is the highest quantityOrdered in the orderdetails table?,SELECT MAX(quantityOrdered) FROM orderdetails,SELECT MAX(quantityOrdered) FROM orderdetails,3.942002641552742,1,1,1,18 3861,"For each productCode, how many records are there in orderdetails?","SELECT productCode, COUNT(orderNumber) FROM orderdetails GROUP BY productCode","SELECT productCode, COUNT(orderNumber) FROM orderdetails GROUP BY productCode",3.863222952712137,1,1,1,20 3862,"For each productCode, what is the average quantityOrdered?","SELECT productCode, AVG(quantityOrdered) FROM orderdetails GROUP BY productCode","SELECT productCode, AVG(quantityOrdered) FROM products GROUP BY productCode",3.041160148502155,1,0,1,25 3863,Which productCode has the highest quantityOrdered?,SELECT productCode FROM orderdetails ORDER BY quantityOrdered DESC LIMIT 1,SELECT productCode FROM products ORDER BY quantityOrdered DESC LIMIT 1,2.267579984910052,1,0,1,29 3864,How many records are in the orders table?,SELECT COUNT(orderNumber) FROM orders,SELECT COUNT(orderNumber) FROM orders,4.233836292305277,1,1,1,17 3865,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 3866,"For each status, how many records are there in orders?","SELECT status, COUNT(orderNumber) FROM orders GROUP BY status","SELECT status, COUNT(orderNumber) FROM orders GROUP BY status",5.101483010172825,1,1,1,19 3867,How many records in orders were recorded in 2021?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2021%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2021%',4.860603963746542,1,1,1,20 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 3869,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,15 3870,What is the average quantityInStock in the products table?,SELECT AVG(quantityInStock) FROM products,SELECT AVG(quantityInStock) FROM products,4.2263400530524775,1,1,1,19 3871,What is the total quantityInStock in the products table?,SELECT SUM(quantityInStock) FROM products,SELECT SUM(quantityInStock) FROM products,4.62380479920519,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 3874,"For each productCode, what is the average quantityInStock?","SELECT productCode, AVG(quantityInStock) FROM products GROUP BY productCode","SELECT productCode, AVG(quantityInStock) FROM products GROUP BY productCode",3.041160148502155,1,1,1,19 3875,Which productCode has the highest quantityInStock?,SELECT productCode FROM products ORDER BY quantityInStock DESC LIMIT 1,SELECT productCode FROM products ORDER BY quantityInStock DESC LIMIT 1,2.267579984910052,1,1,1,27 3876,How many orderdetails records have matching records in products?,SELECT COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode,SELECT COUNT(T1.orderNumber) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2. productCode,6.9006273124924915,1,1,1,18 3877,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,26 3878,What is the average quantityOrdered for joined orderdetails and products records?,SELECT AVG(T1.quantityOrdered) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode,SELECT AVG(T1.quantityOrdered) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.ProductCode,6.130172956098138,1,1,1,18 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 3880,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,18 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 3882,How many records are in the Orders table?,SELECT COUNT(OrderID) FROM Orders,SELECT COUNT(OrderID) FROM Orders,3.1109523087002167,1,1,1,22 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 3884,How many Orders records have matching records in Order Details?,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID Database: retail_world` = T2.`OrderInfo`,-6.840143485836722,14,0,0,24 3885,"For each EmployeeID, how many records are there in Orders?","SELECT EmployeeID, COUNT(OrderID) FROM Orders GROUP BY EmployeeID","SELECT EmployeeID, COUNT(OrderID) FROM Orders GROUP BY Employeeid",2.0961497771648943,5,1,1,26 3886,How many records in Sales Orders were recorded in 2017?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2017%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2017%',2.5546621231758806,1,1,1,23 3887,"In 2018, 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 '2018%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2018%',3.1390577645048587,5,1,1,29 3888,How many records are in the Employees table?,SELECT COUNT(EmployeeID) FROM Employees,SELECT COUNT(EmployeeID) FROM Employees,4.281554795135653,1,1,1,26 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 3890,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,19 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 3892,How many Employees records have matching records in EmployeeTerritories?,SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT COUNT(T1.`Title Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EemID,-7.326608195042487,20,0,0,26 3893,"For each TerritoryID, how many Employees records are linked?","SELECT T2.TerritoryID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.TerritoryID","SELECT T2.TerritoryID, COUNT(T1.`Title Database: retail_world`) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.' EmployeeID GROUP BY T2 . TerritoryID",-7.876225850322424,1,0,0,26 3894,How many records are in the Employees table?,SELECT COUNT(MiddleInitial) FROM Employees,SELECT COUNT(MiddleInitial) FROM Employees,4.829372047253272,1,1,1,21 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 3896,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 3897,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,20 3898,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`,1.8079745166050127,2,1,1,29 3899,List the distinct values of CompanyName in the Sales Totals by Amount table.,SELECT DISTINCT CompanyName FROM `Sales Totals by Amount`,SELECT DISTINCT CompanyName FROM `Sales Totals by Amount`,3.670609226793579,1,1,1,20 3900,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,22 3901,What is the total Amount in the Sales Totals by Amount table?,SELECT SUM(Amount) FROM `Sales Totals by Amount`,SELECT SUM(Amount) FROM `Sales Totals by Amount`,3.625246724625693,1,1,1,22 3902,What is the highest Amount in the Sales Totals by Amount table?,SELECT MAX(Amount) FROM `Sales Totals by Amount`,SELECT MAX(Amount) FROM `Sales Totals by Amount`,3.251877086718459,1,1,1,25 3903,"For each CompanyName, how many records are there in Sales Totals by Amount?","SELECT CompanyName, COUNT(Totals) FROM `Sales Totals by Amount` GROUP BY CompanyName","SELECT CompanyName, COUNT(Amount) FROM `Sales Totals by Amount` GROUP BY CompanyName",2.1283556155790317,1,0,1,26 3904,"For each CompanyName, what is the average Amount?","SELECT CompanyName, AVG(Amount) FROM `Sales Totals by Amount` GROUP BY CompanyName","SELECT CompanyName, AVG(Amount) FROM `Sales Totals by Amount` GROUP BY CompanyName",2.2835803207605045,1,1,1,19 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 3906,How many records are in the Suppliers table?,SELECT COUNT(HomePage) FROM Suppliers,SELECT COUNT(HomePage) FROM Suppliers,4.233836292305277,1,1,1,18 3907,List the distinct values of City in the Suppliers table.,SELECT DISTINCT City FROM Suppliers,SELECT DISTINCT City FROM Suppliers,5.1121551324071595,1,1,1,18 3908,"For each City, how many records are there in Suppliers?","SELECT City, COUNT(HomePage) FROM Suppliers GROUP BY City","SELECT City, COUNT(HomePage) FROM Suppliers GROUP BY City",5.573540162828874,1,1,1,17 3909,How many records are in the location table?,SELECT COUNT(id_restaurant) FROM location,SELECT COUNT(id_restaurant) FROM location,4.858577923200564,1,1,1,21 3910,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 3911,"For each city, how many records are there in location?","SELECT city, COUNT(id_restaurant) FROM location GROUP BY city","SELECT city, COUNT(id_restaurant) FROM location GROUP BY city",5.101483010172825,1,1,1,18 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 3913,How many records are in the country table?,SELECT COUNT(origin) FROM country,SELECT COUNT(origin) FROM country,3.1109523087002167,1,1,1,21 3914,List the distinct values of country in the country table.,SELECT DISTINCT country FROM country,SELECT DISTINCT country FROM country,3.0429959203251267,1,1,1,17 3915,"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,19 3916,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.978898239721957,5,1,1,24 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 3918,How many district records have matching records in client?,SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T1.division) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,3.467671727586081,11,0,0,23 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 3920,How many records are in the payments table?,SELECT COUNT(checkNumber) FROM payments,SELECT COUNT(checkNumber) FROM payments,4.281554795135653,1,1,1,17 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 3923,What is the total amount in the payments table?,SELECT SUM(amount) FROM payments,SELECT SUM(amount) FROM payments,2.546392017884244,1,1,1,20 3924,What is the highest amount in the payments table?,SELECT MAX(amount) FROM payments,SELECT MAX(amount) FROM payments,2.382359359446688,1,1,1,19 3925,"For each customerNumber, how many records are there in payments?","SELECT customerNumber, COUNT(checkNumber) FROM payments GROUP BY customerNumber","SELECT customerNumber, COUNT(checkNumber) FROM payments GROUP BY customerNumber",5.507473026431465,1,1,1,17 3926,"For each customerNumber, what is the average amount?","SELECT customerNumber, AVG(amount) FROM payments GROUP BY customerNumber","SELECT customerNumber, AVG(amount) FROM payments GROUP BY customerNumber",3.7133769914034245,1,1,1,16 3927,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,24 3928,How many records in payments were recorded in 2016?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2016%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2016%',4.198241534572536,1,1,1,23 3929,How many records in Sales Orders were recorded in 2020?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2020%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2020%',2.5546621231758806,1,1,1,23 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 3932,"For each City, how many records are there in Suppliers?","SELECT City, COUNT(SupplierID) FROM Suppliers GROUP BY City","SELECT City, COUNT(SupplierID) FROM Suppliers GROUP BY City",5.308929195236603,1,1,1,21 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 3935,List the distinct values of rand client in the callcenterlogs table.,SELECT DISTINCT `rand client` FROM callcenterlogs,SELECT DISTINCT `rand client` FROM callcenterlogs,4.376147590469199,1,1,1,20 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 3937,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,23 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 3940,What is the average Discount in the Order Details table?,SELECT AVG(Discount) FROM `Order Details`,SELECT AVG(Discount) FROM `Order Details`,4.585379189987882,1,1,1,23 3941,What is the total Discount in the Order Details table?,SELECT SUM(Discount) FROM `Order Details`,SELECT SUM(Discount) FROM `Order Details`,5.311379135689884,1,1,1,20 3942,What is the highest Discount in the Order Details table?,SELECT MAX(Discount) FROM `Order Details`,SELECT MAX(Discount) FROM `Order Details`,4.872540310247595,1,1,1,20 3943,How many records in Shippers were recorded in 2022?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2022%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2022%',4.412960505279923,1,1,1,27 3944,How many records in orders were recorded in 2023?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2023%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2023%',4.775940017408425,1,1,1,23 3945,List the distinct values of street_name in the location table.,SELECT DISTINCT street_name FROM location,SELECT DISTINCT street_name FROM location,4.732550129264441,1,1,1,19 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 3947,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 3948,How many location records have matching records in generalinfo?,SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.url = T2.url,-3.4260529464932343,4,0,0,27 3949,List the distinct label values linked to location.,SELECT DISTINCT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.4232314236055306,10,1,1,28 3950,How many records are in the central_superstore table?,SELECT COUNT(`Customer ID`) FROM central_superstore,SELECT COUNT(`Customer ID`) FROM central_superstore,3.5370566337888154,1,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 3952,List the distinct values of QuantityPerUnit in the Products table.,SELECT DISTINCT QuantityPerUnit FROM Products,SELECT DISTINCT QuantityPerUnit FROM Products,4.22603725091863,1,1,1,15 3953,"For each QuantityPerUnit, how many records are there in Products?","SELECT QuantityPerUnit, COUNT(UnitsInStock) FROM Products GROUP BY QuantityPerUnit","SELECT QuantityPerUnit, COUNT(UnitsInStock) FROM Products GROUP BY QuantityperUnit",2.6006554639138653,4,1,1,23 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 3957,"For each food_type, how many records are there in generalinfo?","SELECT food_type, COUNT(label) FROM generalinfo GROUP BY food_type","SELECT food_type, COUNT(label) FROM generalinfo GROUP BY Food_TYPE",-0.22100581788699017,20,1,1,27 3958,How many products records have matching records in orderdetails?,SELECT COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode,SELECT COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.ProductCode,6.680563450166989,1,1,1,22 3959,List the distinct productCode values linked to products.,SELECT DISTINCT T2.productCode FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode,SELECT DISTINCT T2.productCode FROM products AS T1 INNER JOIN orderdetails AS T2 WHERE T1.productLine = 'Products',0.6499427938111422,1,0,0,28 3960,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,19 3961,"For each productCode, how many products records are linked?","SELECT T2.productCode, COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode GROUP BY T2.productCode","SELECT T2.`productCode`, COUNT(T1.MSRP) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.ProductCode GROUP BY T2._productCode",1.784149979974237,1,0,0,28 3962,How many records in Sales Orders were recorded in 2021?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2021%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2021%',2.5546621231758806,1,1,1,24 3963,"In 2016, 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 '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2016%',0.6241815132964234,25,1,1,28 3964,How many records are in the Store Locations table?,SELECT COUNT(StoreID) FROM `Store Locations`,SELECT COUNT(StoreID) FROM `Store Locations`,4.168924784157151,1,1,1,19 3965,List the distinct values of Type in the Store Locations table.,SELECT DISTINCT Type FROM `Store Locations`,SELECT DISTINCT Type FROM `Store Locations`,4.623211308038417,1,1,1,21 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 3967,What is the total County in the Store Locations table?,SELECT SUM(County) FROM `Store Locations`,SELECT SUM(County) FROM `Store Locations`,5.311379135689884,1,1,1,23 3968,What is the highest County in the Store Locations table?,SELECT MAX(County) FROM `Store Locations`,SELECT MAX(County) FROM `Store Locations`,4.872540310247595,1,1,1,22 3969,"For each Type, how many records are there in Store Locations?","SELECT Type, COUNT(StoreID) FROM `Store Locations` GROUP BY Type","SELECT Type, COUNT(StoreID) FROM `Store Locations` GROUP BY Type",2.9256675097848137,1,1,1,23 3970,"For each Type, what is the average County?","SELECT Type, AVG(County) FROM `Store Locations` GROUP BY Type","SELECT Type, AVG(County) FROM `Store Locations` GROUP BY Type",3.5457654445587097,1,1,1,19 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 3972,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,27 3973,How many Sales Orders records have matching records in Store Locations?,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID,SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID,0.667419042384811,3,1,1,22 3974,List the distinct Type values linked to Sales Orders.,SELECT DISTINCT T2.Type FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T1._StoreID = T2.StoreID,SELECT DISTINCT T2.Type FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS t2 ON t2.StoreID = t1._StoreID,2.064717912614034,1,0,1,25 3975,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,0.35816723123094885,8,1,1,26 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 3977,"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.5317302943759175,7,0,0,15 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 3979,List the distinct values of s_address in the supplier table.,SELECT DISTINCT s_address FROM supplier,SELECT DISTINCT s_address FROM supplier,3.64534150430876,1,1,1,17 3980,"For each s_address, how many records are there in supplier?","SELECT s_address, COUNT(s_suppkey) FROM supplier GROUP BY s_address","SELECT s_address, COUNT(s_suppkey) FROM supplier GROUP BY S_address",4.107549427355398,1,1,1,22 3981,"For each CustomerID, how many records are there in Orders?","SELECT CustomerID, COUNT(OrderID) FROM Orders GROUP BY CustomerID","SELECT CustomerID, COUNT(OrderID) FROM Orders GROUP BY CustomerID",5.657580059238104,1,1,1,20 3982,List the distinct CustomerID values linked to Employees.,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID,6.76316711712273,1,1,1,28 3983,"For each CustomerID, how many Employees records are linked?","SELECT T2.CustomerID, COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`LastName Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2 . EmployeeID GROUP BY T2.`CustomerID`""",-8.205098574955816,26,0,0,28 3984,How many records are in the callcenterlogs table?,SELECT COUNT(`rand client`) FROM callcenterlogs,SELECT COUNT(`rand client`) FROM callcenterlogs,4.058955478397152,1,1,1,23 3985,List the distinct values of type in the callcenterlogs table.,SELECT DISTINCT type FROM callcenterlogs,SELECT DISTINCT type FROM callcenterlogs,3.6114104240234646,1,1,1,17 3986,"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,21 3987,"In 2019, 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 '2019%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2019%',2.7654269137015395,6,1,1,29 3988,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 3989,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,24 3990,How many records are in the offices table?,SELECT COUNT(officeCode) FROM offices,SELECT COUNT(officeCode) FROM offices,4.233836292305277,1,1,1,18 3991,List the distinct values of city in the offices table.,SELECT DISTINCT city FROM offices,SELECT DISTINCT city FROM offices,3.537048448089766,1,1,1,16 3992,"For each city, how many records are there in offices?","SELECT city, COUNT(officeCode) FROM offices GROUP BY city","SELECT city, COUNT(officeCode) FROM offices GROUP BY city",5.573540162828874,1,1,1,18 3993,How many employees records have matching records in offices?,SELECT COUNT(T1.officeCode) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode,SELECT COUNT(T1.employeeNumber) FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2 . officeCode,2.9206614885541966,4,0,0,21 3994,List the distinct city values linked to employees.,SELECT DISTINCT T2.city FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode,SELECT DISTINCT T2.city FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2 . officeCode,4.517492586728658,2,1,1,21 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 3996,How many records are in the Products table?,SELECT COUNT(Discontinued) FROM Products,SELECT COUNT(Discontinued) FROM Products,4.472691083849381,1,1,1,20 3997,"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,19 3998,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(id_restaurant) FROM generalinfo GROUP BY city","SELECT city, COUNT(id_restaurant) FROM generalinfo GROUP BY city",3.2614040037227507,1,1,1,14 3999,How many generalinfo records have matching records in location?,SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.path = T2.path,-2.9286329812235894,8,0,0,29 4000,List the distinct street_name values linked to generalinfo.,SELECT DISTINCT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2 . id_Restaurant,3.2110652475088455,8,1,1,29 4001,"For each street_name, how many generalinfo records are linked?","SELECT T2.street_name, COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant GROUP BY T2.street_name","SELECT T2.street_name, COUNT(T1.`review Database: restaurant`) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = STRFTIME('%Y', T2.`stereo_name`) GROUP BY T2 . street_name_item",-8.178433611430835,23,0,0,30 4002,How many records are in the Customers table?,SELECT COUNT(MiddleInitial) FROM Customers,SELECT COUNT(MiddleInitial) FROM Customers,4.829372047253272,1,1,1,20 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 4004,How many Customers records have matching records in Sales?,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.customerID = T2.CustomerID,3.2987104338396285,6,1,1,26 4005,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.CustomerID = T2._CustomerID,-0.4372219309871599,1,0,0,28 4006,What is the average SalesID for joined Customers and Sales records?,SELECT AVG(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID,SELECT AVG(T2.SalesID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.customerID = T2.CustomerID,2.7812220118949447,5,1,1,19 4007,"For each CustomerID, how many Customers records are linked?","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.`CustomerID` = T2.`EmployeeID` GROUP BY T2 . CustomerID",-3.1659566056888853,7,0,0,30 4008,How many Customers records have matching records in Employees?,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.MiddleInitial,SELECT COUNT(T1.MiddleInitial) FROM Customers AS T1 INNER JOIN Employees AS T2 ON T1.MiddleInitial = T2.middleInitial,1.901934720155246,18,1,1,29 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 4010,"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",-3.8819369943728352,3,0,0,20 4011,List the distinct CategoryID values linked to Products.,SELECT DISTINCT T2.CategoryID FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.categoryID FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2 . CategoryID,3.622284863501241,11,1,1,22 4012,List the distinct values of ProductName in the Products table.,SELECT DISTINCT ProductName FROM Products,SELECT DISTINCT ProductName FROM Products,4.732550129264441,1,1,1,16 4013,How many records are in the west_superstore table?,SELECT COUNT(`Order ID`) FROM west_superstore,SELECT COUNT(`Order ID`) FROM west_superstore,3.9261874356305757,1,1,1,23 4014,List the distinct values of Customer ID in the west_superstore table.,SELECT DISTINCT `Customer ID` FROM west_superstore,SELECT DISTINCT `Customer ID` FROM west_superstore,3.06645068596712,1,1,1,18 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 4017,"For each State, how many records are there in people?","SELECT State, COUNT(`Customer ID`) FROM people GROUP BY State","SELECT State, COUNT(`Customer ID`) FROM people GROUP BY State",3.5812554675732,1,1,1,20 4018,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`,2.448279108071293,7,1,1,27 4019,List the distinct Product ID values linked to west_superstore.,SELECT DISTINCT T2.`Product ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.`Product ID` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.Customer ID,1.5583132422296788,1,0,0,27 4020,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 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 4022,"For each State, how many west_superstore records are linked?","SELECT T2.State, COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.State","SELECT T2.State, COUNT(T1.`Order ID`) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID` GROUP BY T3.State",0.278075502434042,7,0,0,23 4023,"For each CompanyName, how many records are there in Suppliers?","SELECT CompanyName, COUNT(CompanyName) FROM Suppliers GROUP BY CompanyName","SELECT CompanyName, COUNT(ContactName) FROM Suppliers GROUP BY CompanyName",4.258328108605211,1,0,1,17 4024,How many central_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2.`Product ID`,1.737887350722345,6,1,1,26 4025,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 4026,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer 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.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.9427044204238988,7,0,0,29 4027,How many records in Store Locations were recorded in 2021?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2021%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2021%',4.531000601842846,1,1,1,26 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 4029,How many records in callcenterlogs were recorded in 2022?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2022%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2022%',5.195196781000291,1,1,1,24 4030,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2017%',3.9900040784658684,1,1,1,25 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 4032,List the distinct values of Issue in the events table.,SELECT DISTINCT Issue FROM events,SELECT DISTINCT Issue FROM events,3.537048448089766,1,1,1,15 4033,"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 4034,"For each Issue, how many client records are linked?","SELECT T2.Issue, COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.Issue","SELECTT2.Issue, COUNT(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T2.`Issue`",-1.7488602867837193,13,0,0,29 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 4038,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 4039,"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`",1.5381654342258282,6,1,1,24 4040,List the distinct values of Region in the product table.,SELECT DISTINCT Region FROM product,SELECT DISTINCT Region FROM product,5.1121551324071595,1,1,1,17 4041,"For each Region, how many records are there in product?","SELECT Region, COUNT(`Product ID`) FROM product GROUP BY Region","SELECT Region, COUNT(`Product ID`) FROM product GROUP BY Region",3.634229031461111,1,1,1,20 4042,How many central_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.29397522579761254,18,1,1,22 4043,"For each Region, how many central_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Product ID) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2 . Region",-0.7651882559667936,4,0,0,28 4044,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(outcome) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(outcome) FROM callcenterlogs GROUP BY `rand client`",1.9710576947811465,4,1,1,27 4045,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(`rand client`) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(`rand client`) FROM callcenterlogs GROUP BY `rand client`",2.877465441869129,4,1,1,26 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 4047,What is the average price in the price table?,SELECT AVG(price) FROM price,SELECT AVG(price) FROM price,4.790907908673019,1,1,1,19 4048,What is the total price in the price table?,SELECT SUM(price) FROM price,SELECT SUM(price) FROM price,5.135285213219256,1,1,1,22 4049,What is the highest price in the price table?,SELECT MAX(price) FROM price,SELECT MAX(price) FROM price,4.895887793269589,1,1,1,15 4050,What is the average price for joined data and price records?,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,6.1358290547634615,1,1,1,22 4051,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,20 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 4053,How many offices records have matching records in employees?,SELECT COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode,SELECT COUNT(T1.officeCode) FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.OfficeCode,3.1545960473816805,16,1,1,25 4054,List the distinct employeeNumber values linked to offices.,SELECT DISTINCT T2.employeeNumber FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode,SELECT DISTINCT T2.employeeNumber FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2 . officeCode,3.8652916411987492,4,1,1,21 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 4057,List the distinct values of Product ID in the east_superstore table.,SELECT DISTINCT `Product ID` FROM east_superstore,SELECT DISTINCT `Product ID` FROM east_superstore,4.376147590469199,1,1,1,18 4058,"For each Product ID, how many records are there in east_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM east_superstore GROUP BY `Product id`",2.185669469436978,6,1,1,25 4059,List the distinct values of Category in the product table.,SELECT DISTINCT Category FROM product,SELECT DISTINCT Category FROM product,4.508142555656296,1,1,1,18 4060,"For each Category, how many records are there in product?","SELECT Category, COUNT(`Product ID`) FROM product GROUP BY Category","SELECT Category, COUNT(`Product ID`) FROM product GROUP BY Category",2.389506030421148,1,1,1,19 4061,How many east_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.1704646647218484,14,1,1,22 4062,List the distinct Product ID values linked to east_superstore.,SELECT DISTINCT T2.`Product ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT DISTINCT T2.Product ID FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID`,1.4801312911458482,1,0,0,25 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 4064,"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,21 4065,List the distinct ProductID values linked to Products.,SELECT DISTINCT T2.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.`SupplierID Database: retail_world` = ( SELECT DISTINCT T1.SupplierID AS T3 ORDER BY T3.OrderID DESC),-7.294248552042085,21,0,0,29 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 4067,"For each Address, how many records are there in Customers?","SELECT Address, COUNT(PostalCode) FROM Customers GROUP BY Address","SELECT Address, COUNT(PostalCode) FROM Customers GROUP BY Address",5.657580059238104,1,1,1,20 4068,How many records in lineitem were recorded in 2021?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2021%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2021%',4.412960505279923,1,1,1,21 4069,List the distinct values of city in the district table.,SELECT DISTINCT city FROM district,SELECT DISTINCT city FROM district,1.7909536146026408,1,1,1,18 4070,"For each city, how many records are there in district?","SELECT city, COUNT(district_id) FROM district GROUP BY city","SELECT city, COUNT(district_id) FROM district GROUP BY city",5.308929195236603,1,1,1,19 4071,How many records are in the Customers table?,SELECT COUNT(CompanyName) FROM Customers,SELECT COUNT(CompanyName) FROM Customers,4.472691083849381,1,1,1,20 4072,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 4073,"For each CompanyName, how many records are there in Customers?","SELECT CompanyName, COUNT(CompanyName) FROM Customers GROUP BY CompanyName","SELECT CompanyName, COUNT(CompanyName) FROM Customers GROUP BY CompanyName",4.258328108605211,1,1,1,21 4074,How many records in orders were recorded in 2023?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2023%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2023%',4.860603963746542,1,1,1,22 4075,How many client records have matching records in district?,SELECT COUNT(T1.district_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2 . district_id,6.462366958467268,1,0,0,23 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 4077,How many records are in the Employees table?,SELECT COUNT(Salary) FROM Employees,SELECT COUNT(Salary) FROM Employees,4.795353829950178,1,1,1,22 4078,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(Salary) FROM Employees GROUP BY Country","SELECT Country, COUNT(Salary) FROM Employees GROUP BY Country",5.101483010172825,1,1,1,22 4079,How many records in central_superstore were recorded in 2018?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2018%',1.3761424421645654,1,1,1,25 4080,"In 2020, 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 LIKE '2020%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T2.`Ship Date` LIKE '2020%',-0.34235076061228686,1,0,0,28 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 4082,"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,21 4083,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2015%',4.378280799748311,1,1,1,27 4084,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,21 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 4086,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 id`,0.6917368836333889,14,1,1,27 4087,"For each City, how many west_superstore records are linked?","SELECT T2.City, COUNT(T1.`Customer ID`) FROM west_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 west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Ship ID` = T2.`City` GROUP BY T2 . City",-7.5057669031608665,22,0,0,27 4088,How many records are in the Employees table?,SELECT COUNT(FirstName) FROM Employees,SELECT COUNT(FirstName) FROM Employees,1.942087695388649,2,1,1,24 4089,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 4090,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(FirstName) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(LastName) FROM Employees GROUP BY FirstName",4.107549427355398,1,0,1,24 4091,How many records in events were recorded in 2020?,SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2020%',SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2020%',1.0525531105760992,1,1,1,25 4092,"In 2021, 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.`Timely response?` LIKE '2021%',SELECT COUNT(T1.first) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` LIKE '2021%',3.8497672039645754,1,1,1,26 4093,How many records in lineitem were recorded in 2019?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2019%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2019%',4.412960505279923,1,1,1,22 4094,"For each ProductID, what is the average Discount?","SELECT ProductID, AVG(Discount) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, AVG(Discount) FROM `Order Details` GROUP BY ProductID",2.4057697593944316,1,1,1,21 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 4096,How many customers records have matching records in offices?,SELECT COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode,SELECT COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.city = T2.officeCode,2.56803118143699,3,0,0,27 4097,List the distinct city values linked to customers.,SELECT DISTINCT T2.city FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode,SELECT DISTINCT T3.city FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber,-2.516007343583507,1,0,0,23 4098,"For each city, how many customers records are linked?","SELECT T2.city, COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN offices AS T2 ON T1.postalCode = T2.postalCode GROUP BY T2.city","SELECT T2.city, COUNT(T1.postalCode) FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = t2.employeeNumber GROUP BY T2._city",-3.681073063133547,4,0,0,30 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 4100,How many records are in the Shippers table?,SELECT COUNT(Phone) FROM Shippers,SELECT COUNT(Phone) FROM Shippers,3.1109523087002167,1,1,1,19 4101,"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,18 4102,How many records in Shippers were recorded in 2020?,SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2020%',SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2020%',4.69216415425934,1,1,1,24 4103,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 4104,How many records in Store Locations were recorded in 2022?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2022%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2022%',4.531000601842846,1,1,1,26 4105,List the distinct Type values linked to Regions.,SELECT DISTINCT T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2.StateCode,SELECT DISTINCT T2.`Type` FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T1.StateCode = T2._StateCode,-0.018923913789415873,6,0,0,22 4106,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 4107,How many records in orders were recorded in 2021?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2021%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2021%',4.775940017408425,1,1,1,26 4108,How many records in lineitem were recorded in 2022?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2022%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2022%',4.412960505279923,1,1,1,23 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 4110,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,22 4111,List the distinct CompanyName values linked to Orders.,SELECT DISTINCT T2.CompanyName FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CompanyName FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2 . CustomerID,3.6489211712577148,5,1,1,27 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 4113,List the distinct ProductID values linked to Order Details.,SELECT DISTINCT T2.ProductID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID,SELECT DISTINCT T2.ProductID FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.`ProductID` = T2.`Product ID`,-1.198947050215666,20,0,0,30 4114,"For each ProductID, how many Order Details records are linked?","SELECT T2.ProductID, COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Products AS T2 ON T1.`ProductID Database: retail_world` = T2.`CustomerID` GROUP BY T2[ProductID",-7.645366019281714,21,0,0,27 4115,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(`Complaint ID`) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(`Complaint ID`) FROM callcenterlogs GROUP BY `rand client`",2.282345469839876,5,1,1,27 4116,How many records in events were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2019%',5.2423417437044275,1,1,1,26 4117,How many callcenterlogs records have matching records in events?,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Combo ID`,2.9645695373130807,5,0,0,30 4118,"In 2017, 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 T2.`Timely response?` LIKE '2017%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id WHERE T1.ser_start LIKE '2017%',-1.5802304135110055,6,0,0,28 4119,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.994429136399575,10,0,0,27 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 4121,What is the average SalesID for joined Sales and Customers records?,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT AVG(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.Customerid,3.9474670856453926,17,1,1,28 4122,"For each CustomerID, how many Sales records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.MiddleInitial) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.SalesID = T2._CustomerID GROUP BY T2.`CustomerID`",0.44825848673785246,10,0,0,30 4123,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,3.007029877473542,2,0,0,28 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 4125,"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.1779346244831195,6,0,0,27 4126,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,26 4127,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 4128,"For each ContactTitle, how many records are there in Suppliers?","SELECT ContactTitle, COUNT(SupplierID) FROM Suppliers GROUP BY ContactTitle","SELECT ContactTitle, COUNT(SupplierID) FROM Suppliers GROUP BY ContactTitle",2.7446606686406816,1,1,1,18 4129,"For each food_type, how many records are there in generalinfo?","SELECT food_type, COUNT(id_restaurant) FROM generalinfo GROUP BY food_type","SELECT food_type, COUNT(id_restaurant) FROM generalinfo GROUP BY Food_TYPE",1.1283732078070061,19,1,1,25 4130,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,3.232248937591542,14,1,1,29 4131,"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_resaurant GROUP BY T2 . food_type",-8.490114228468626,2,0,0,23 4132,How many records in Sales Orders were recorded in 2019?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2019%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2019%',2.5546621231758806,1,1,1,27 4133,List the distinct values of country in the production table.,SELECT DISTINCT country FROM production,SELECT DISTINCT country FROM production,3.64534150430876,1,1,1,19 4134,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2017%',0.9715590155654118,27,1,1,29 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 4136,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Consumer complaint narrative`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Consumer complaint narrative`) FROM events GROUP BY client_id",2.323295767256636,1,1,1,18 4137,"For each CategoryID, what is the average UnitPrice?","SELECT CategoryID, AVG(UnitPrice) FROM Products GROUP BY CategoryID","SELECT CategoryID, AVG(UnitPrice) FROM Products GROUP BY CategoryID",3.8676392703737554,1,1,1,16 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 4139,List the distinct CategoryID values linked to Categories.,SELECT DISTINCT T2.CategoryID FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID,SELECT DISTINCT T2.categoryID FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2 . CategoryID,3.672055116594856,14,1,1,26 4140,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,2.934686920244112,2,1,1,20 4141,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,26 4142,How many records in lineitem were recorded in 2015?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2015%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2015%',4.412960505279923,1,1,1,20 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 4145,How many records are in the Customers table?,SELECT COUNT(ContactTitle) FROM Customers,SELECT COUNT(ContactTitle) FROM Customers,4.858577923200564,1,1,1,20 4146,List the distinct values of Country in the Customers table.,SELECT DISTINCT Country FROM Customers,SELECT DISTINCT Country FROM Customers,3.7368875748870978,1,1,1,16 4147,"For each Country, how many records are there in Customers?","SELECT Country, COUNT(ContactTitle) FROM Customers GROUP BY Country","SELECT Country, COUNT(ContactTitle) FROM Customers GROUP BY Country",4.107549427355398,1,1,1,19 4148,How many records in events were recorded in 2016?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2016%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2016%',0.9721202878798406,1,1,1,22 4149,How many records in Orders were recorded in 2017?,SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2017%',SELECT COUNT(OrderID) FROM Orders WHERE ShipCountry LIKE '2017%',5.226797006773571,1,1,1,25 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 4151,List the distinct values of Product ID in the west_superstore table.,SELECT DISTINCT `Product ID` FROM west_superstore,SELECT DISTINCT `Product ID` FROM west_superstore,4.376147590469199,1,1,1,18 4152,"For each Product ID, how many records are there in west_superstore?","SELECT `Product ID`, COUNT(`Product ID`) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Product ID`) FROM west_superstore GROUP BY `Product id`",2.185669469436978,6,1,1,25 4153,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.`product ID`,0.4633335460807577,19,1,1,22 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 4157,How many price records have matching records in data?,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1 . ID = T2.ID,3.304636942622917,8,1,1,25 4158,List the distinct car_name values linked to price.,SELECT DISTINCT T2.car_name FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.car_name FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,4.211148065032614,2,1,1,22 4159,"For each car_name, how many price records are linked?","SELECT T2.car_name, COUNT(T1.ID) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID GROUP BY T2.car_name","SELECT T2.car_name, COUNT(T1.`price Database: cars`) FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = t2.ID GROUP BY T2 . car_name",-7.411502665423601,2,0,0,21 4160,How many records in events were recorded in 2021?,SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2021%',SELECT COUNT(`Consumer consent provided?`) FROM events WHERE `Date received` LIKE '2021%',4.86473858191754,1,1,1,24 4161,How many records are in the Categories table?,SELECT COUNT(Description) FROM Categories,SELECT COUNT(Description) FROM Categories,4.858577923200564,1,1,1,20 4162,"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 4163,How many records in payments were recorded in 2021?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2021%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2021%',4.198241534572536,1,1,1,20 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 4165,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 4166,What is the total Quantity in the Order Details table?,SELECT SUM(Quantity) FROM `Order Details`,SELECT SUM(Quantity) FROM `Order Details`,5.311379135689884,1,1,1,19 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 4168,"For each ProductID, how many records are there in Order Details?","SELECT ProductID, COUNT(Details) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, COUNT(Details) FROM `Order Details` GROUP BY ProductID",2.2163750566524576,1,1,1,25 4169,"For each ProductID, what is the average Quantity?","SELECT ProductID, AVG(Quantity) FROM `Order Details` GROUP BY ProductID","SELECT ProductID, AVG(Quantity) FROM `Order Details` GROUP BY ProductID",2.4057697593944316,1,1,1,18 4170,Which ProductID has the highest Quantity?,SELECT ProductID FROM `Order Details` ORDER BY Quantity DESC LIMIT 1,SELECT ProductID FROM `Order Details` ORDER BY Quantity DESC LIMIT 1,2.751315914611514,1,1,1,26 4171,"For each Product ID, how many records are there in east_superstore?","SELECT `Product ID`, COUNT(Order) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM east_superstore GROUP BY `Product id`",0.4848438078023314,3,1,1,26 4172,How many east_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.6750794579190846,6,1,1,21 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 4174,List the distinct values of City in the Employees table.,SELECT DISTINCT City FROM Employees,SELECT DISTINCT City FROM Employees,5.1121551324071595,1,1,1,19 4175,"For each Country, how many records are there in Customers?","SELECT Country, COUNT(CompanyName) FROM Customers GROUP BY Country","SELECT Country, COUNT(CompanyName) FROM Customers GROUP BY Country",4.58756171296914,1,1,1,19 4176,How many Store Locations records have matching records in Sales Orders?,SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID,SELECT COUNT(T1.StoreID) FROM Store Locations AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`StoreID` = T2._StoreID,0.36484918464718935,4,0,0,26 4177,List the distinct _CustomerID values linked to Store Locations.,SELECT DISTINCT T2._CustomerID FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID,SELECT DISTINCT T2._CustomerID FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS t2 ON t1.StoreID = t2._StoreID,2.2843269942518796,1,1,1,25 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 4180,"For each Sales Channel, how many Store Locations records are linked?","SELECT T2.`Sales Channel`, COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.StoreID = T2._StoreID GROUP BY T2.`Sales Channel`","SELECT T2.`Sales Channel`, COUNT(T1.StoreID) FROM Store Locations AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.`Store Locations` = T2._StoreID GROUP BY T2.SalesChannel",-2.590407000426093,6,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 4182,How many records are in the Customers table?,SELECT COUNT(Phone) FROM Customers,SELECT COUNT(Phone) FROM Customers,0.4565143531634555,1,1,1,20 4183,"For each CompanyName, how many records are there in Customers?","SELECT CompanyName, COUNT(Phone) FROM Customers GROUP BY CompanyName","SELECT CompanyName, COUNT(Phone) FROM Customers GROUP BY CompanyName",5.740830030114313,1,1,1,17 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 4185,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,20 4186,"For each city, how many records are there in location?","SELECT city, COUNT(street_num) FROM location GROUP BY city","SELECT city, COUNT(street_num) FROM location GROUP BY city",5.573540162828874,1,1,1,21 4187,How many price records have matching records in production?,SELECT COUNT(T1.ID) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.id) FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID,0.9000426075877592,24,1,1,27 4188,How many records in lineitem were recorded in 2020?,SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2020%',SELECT COUNT(l_orderkey) FROM lineitem WHERE l_shipdate LIKE '2020%',4.412960505279923,1,1,1,26 4189,List the distinct EmployeeID values linked to Orders.,SELECT DISTINCT T2.EmployeeID FROM Orders AS T1 INNER JOIN Employees AS T2 ON T1.EmployeeID = T2.EmployeeID,SELECT DISTINCT T2.EmployeeID FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID,-4.013571179878338,5,0,0,30 4190,How many records in orders were recorded in 2016?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2016%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2016%',4.775940017408425,1,1,1,22 4191,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(ProductID) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(ProductID) FROM Products GROUP BY CategoryID",5.271174303156182,1,1,1,20 4192,How many Products records have matching records in Categories?,SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.categoryID = T2.CategoryID,-2.210849449136739,4,0,0,23 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 4195,"For each ProductID, how many Products records are linked?","SELECT T2.ProductID, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`UnitPrice Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1[ProductID ] = T2.`ProductID` GROUP BY T2 .ProductID",-7.459140798616294,20,0,0,23 4196,"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 4197,How many production records have matching records in data?,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1 . ID = T2.ID,4.373311515896396,11,1,1,25 4198,List the distinct weight values linked to production.,SELECT DISTINCT T2.weight FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.weight FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,3.745483736263038,3,1,1,28 4199,How many records in west_superstore were recorded in 2015?,SELECT COUNT(`Product ID`) FROM west_superstore WHERE Ship LIKE '2015%',SELECT COUNT(`Product ID`) FROM west_superstore WHERE Ship LIKE '2015%',1.3573268699547099,1,1,1,23 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 4201,How many records in Store Locations were recorded in 2017?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2017%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2017%',4.531000601842846,1,1,1,26 4202,List the distinct review values linked to location.,SELECT DISTINCT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.review FROM location AS T1 INNER JOIN generalinfo AS T2 WHERE T1.id_restaurant = 'location',-0.648377840393861,1,0,0,24 4203,List the distinct values of ContactName in the Suppliers table.,SELECT DISTINCT ContactName FROM Suppliers,SELECT DISTINCT ContactName FROM Suppliers,4.5739967119286575,1,1,1,18 4204,"For each ContactName, how many records are there in Suppliers?","SELECT ContactName, COUNT(SupplierID) FROM Suppliers GROUP BY ContactName","SELECT ContactName, COUNT(SupplierID) FROM Suppliers GROUP BY ContactName",4.720593201875388,1,1,1,17 4205,How many production records have matching records in price?,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT COUNT(T1.ID) FROM production AS T1 INNER JOIN price AS T2 ON T1. ID = T2.ID,3.9923521370090898,11,1,1,27 4206,What is the average price for joined production and price records?,SELECT AVG(T2.price) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,SELECT AVG(T2.price) FROM production AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID,6.571209840254912,1,1,1,24 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 4208,"For each Product ID, how many records are there in west_superstore?","SELECT `Product ID`, COUNT(Order) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM west_superstore GROUP BY `Product id`",1.394592214025158,6,1,1,25 4209,How many records in west_superstore were recorded in 2017?,SELECT COUNT(Order) FROM west_superstore WHERE Ship LIKE '2017%',SELECT COUNT(Order) FROM west_superstore WHERE Ship LIKE '2017%',5.226797006773571,1,1,1,23 4210,How many west_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.6750794579190846,6,1,1,24 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 4212,"For each Region, how many west_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM west_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 west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Region",-1.798131339852449,6,0,0,30 4213,How many records are in the south_superstore table?,SELECT COUNT(`Product ID`) FROM south_superstore,SELECT COUNT(`Product ID`) FROM south_superstore,4.058955478397152,1,1,1,21 4214,List the distinct values of Product ID in the south_superstore table.,SELECT DISTINCT `Product ID` FROM south_superstore,SELECT DISTINCT `Product ID` FROM south_superstore,3.06645068596712,1,1,1,18 4215,"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.8684784083190946,4,1,1,23 4216,How many south_superstore records have matching records in product?,SELECT COUNT(T1.`Product ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Product ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.8017505140733607,9,1,1,21 4217,"For each Product ID, how many south_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product 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.`Product ID`) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.` Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-2.0965868466801383,7,0,0,27 4218,"For each City, how many records are there in Customers?","SELECT City, COUNT(CompanyName) FROM Customers GROUP BY City","SELECT City, COUNT(CompanyName) FROM Customers GROUP BY City",5.319414557497681,1,1,1,16 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 4220,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2015%',1.7299368067526704,3,1,1,24 4221,How many records are in the generalinfo table?,SELECT COUNT(review) FROM generalinfo,SELECT COUNT(review) FROM generalinfo,4.233836292305277,1,1,1,20 4222,"For each city, how many records are there in generalinfo?","SELECT city, COUNT(review) FROM generalinfo GROUP BY city","SELECT city, COUNT(review) FROM generalinfo GROUP BY city",5.573540162828874,1,1,1,18 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 4224,"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.* GROUP BY T2.`city`",-7.145468791028053,17,0,0,28 4225,How many records in orders were recorded in 2020?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2020%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2020%',4.775940017408425,1,1,1,24 4226,How many records are in the client table?,SELECT COUNT(sex) FROM client,SELECT COUNT(sex) FROM client,4.474103997787976,1,1,1,20 4227,"For each client_id, how many records are there in client?","SELECT client_id, COUNT(sex) FROM client GROUP BY client_id","SELECT Client_id, COUNT(sex) FROM client GROUP BY client_id",5.308929195236603,1,1,1,20 4228,How many records are in the events table?,SELECT COUNT(`Submitted via`) FROM events,SELECT COUNT(`Submitted via`) FROM events,0.43016205370890365,2,1,1,24 4229,"For each Client_ID, how many records are there in events?","SELECT Client_ID, COUNT(`Submitted via`) FROM events GROUP BY Client_ID","SELECT Client_ID, COUNT(`Submitted via`) FROM events GROUP BY client_id",2.606365159118271,1,1,1,20 4230,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,25 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 4232,List the distinct values of Address in the Suppliers table.,SELECT DISTINCT Address FROM Suppliers,SELECT DISTINCT Address FROM Suppliers,3.7368875748870978,1,1,1,18 4233,"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 4234,"For each Address, how many Products records are linked?","SELECT T2.Address, COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.Address","SELECT T2.Address, COUNT(T1.`SupplierID Database: retail_world`) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = STRFTIME('%Y', T2.`Address`) GROUP BY T1.`Address`",-7.798372089502709,24,0,0,30 4235,How many records are in the Employees table?,SELECT COUNT(HomePhone) FROM Employees,SELECT COUNT(HomePhone) FROM Employees,4.508889799613256,1,1,1,19 4236,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(HomePhone) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(HomePhone) FROM Employees GROUP BY FirstName",5.740830030114313,1,1,1,18 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 4238,"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 LIKE '2019%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T2.`Ship Date` LIKE '2019%',-0.34235076061228686,1,0,0,29 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 4240,How many records are in the Orders table?,SELECT COUNT(Freight) FROM Orders,SELECT COUNT(Freight) FROM Orders,3.1109523087002167,1,1,1,21 4241,"For each CustomerID, how many records are there in Orders?","SELECT CustomerID, COUNT(Freight) FROM Orders GROUP BY CustomerID","SELECT CustomerID, COUNT(Freight) FROM Orders GROUP BY CustomerID",5.657580059238104,1,1,1,19 4242,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,26 4243,"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.22073208908131747,4,0,0,29 4244,How many records in Employees were recorded in 2017?,SELECT COUNT(FirstName) FROM Employees WHERE HireDate LIKE '2017%',SELECT COUNT(FirstName) FROM Employees WHERE HireDate LIKE '2017%',4.860603963746542,1,1,1,24 4245,How many records in Orders were recorded in 2023?,SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2023%',SELECT COUNT(OrderID) FROM Orders WHERE ShipVia LIKE '2023%',4.875700360326731,1,1,1,24 4246,How many Customers records have matching records in Orders?,SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.`CustomerID`) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2._CustomerID,-0.5160620403672356,1,0,0,28 4247,List the distinct CustomerID values linked to Customers.,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID,SELECT DISTINCT T2.CustomerID FROM Customers AS T1 INNER JOIN Orders AS T2 WHERE T1.Region = 'USA',-0.2457039182159971,1,0,0,28 4248,"For each CustomerID, how many Customers records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`Region Database: retail_world`) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.`CustomerID` = T2.`Customer ID` GROUP BY T2 . CustomerID",-7.591758543396308,14,0,0,29 4249,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 4250,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 4251,"For each Customer ID, how many records are there in central_superstore?","SELECT `Customer ID`, COUNT(Order) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer `, COUNT(Order) FROM central_superstore GROUP BY `Customer ID`",1.5921414731069579,6,0,1,27 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 4253,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.Order) 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.`Customer ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.9427044204238988,7,0,0,28 4254,How many records in Employees were recorded in 2019?,SELECT COUNT(EmployeeID) FROM Employees WHERE HireDate LIKE '2019%',SELECT COUNT(EmployeeID) FROM Employees WHERE HireDate LIKE '2019%',4.775940017408425,1,1,1,28 4255,"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 4256,"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 = STRFTIME('%Y', T2.`street_name`) GROUP BY T2_city",-8.233704693789367,23,0,0,30 4257,List the distinct values of Region in the state table.,SELECT DISTINCT Region FROM state,SELECT DISTINCT Region FROM state,3.537048448089766,1,1,1,16 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 4259,"For each Product, how many records are there in reviews?","SELECT Product, COUNT(district_id) FROM reviews GROUP BY Product","SELECT Product, COUNT(district_id) FROM reviews GROUP BY Product",3.2614040037227507,1,1,1,22 4260,How many district records have matching records in reviews?,SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id,SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.`state_abbrev Database: retail_complains` = T2.`district_dbg`,-7.039949327271934,20,0,0,27 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 4262,"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.182348749957653,2,0,0,22 4263,"In 2023, 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 '2023%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2023%',3.4416734708638548,4,1,1,29 4264,How many records are in the east_superstore table?,SELECT COUNT(`Order ID`) FROM east_superstore,SELECT COUNT(`Order ID`) FROM east_superstore,3.9261874356305757,1,1,1,23 4265,What is the average Profit in the east_superstore table?,SELECT AVG(Profit) FROM east_superstore,SELECT AVG(Profit) FROM east_superstore,3.4321500354297707,1,1,1,18 4266,What is the total Profit in the east_superstore table?,SELECT SUM(Profit) FROM east_superstore,SELECT SUM(Profit) FROM east_superstore,3.8154584555832485,1,1,1,21 4267,What is the highest Profit in the east_superstore table?,SELECT MAX(Profit) FROM east_superstore,SELECT MAX(Profit) FROM east_superstore,3.6592814209018685,1,1,1,20 4268,"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`",1.1175129808030408,4,1,1,25 4269,"For each Product ID, what is the average Profit?","SELECT `Product ID`, AVG(Profit) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Profit) FROM east_superstore GROUP BY `Product id`",2.0492112529486923,9,1,1,28 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 4271,How many east_superstore records have matching records in product?,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,2.448279108071293,7,1,1,26 4272,What is the average Profit for joined east_superstore and product records?,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2.`Product ID`,1.3907899639470112,7,1,1,27 4273,"For each Sub-Category, how many east_superstore records are linked?","SELECT T2.`Sub-Category`, COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Sub-Category`","SELECT T2.Sub-Category, COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2 . Sub-Category",-3.4152814186912934,2,0,0,25 4274,How many records in orders were recorded in 2022?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2022%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2022%',4.775940017408425,1,1,1,22 4275,What is the average Quantity in the central_superstore table?,SELECT AVG(Quantity) FROM central_superstore,SELECT AVG(Quantity) FROM central_superstore,4.6819763872133136,1,1,1,19 4276,What is the total Quantity in the central_superstore table?,SELECT SUM(Quantity) FROM central_superstore,SELECT SUM(Quantity) FROM central_superstore,5.100529480702467,1,1,1,21 4277,What is the highest Quantity in the central_superstore table?,SELECT MAX(Quantity) FROM central_superstore,SELECT MAX(Quantity) FROM central_superstore,4.961034746521523,1,1,1,18 4278,"For each Customer ID, what is the average Quantity?","SELECT `Customer ID`, AVG(Quantity) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Quantity) FROM central_superstore GROUP BY `Customer id`",1.7004284371736567,7,1,1,26 4279,Which Customer ID has the highest Quantity?,SELECT `Customer ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,3.2958196255451435,1,1,1,26 4280,What is the average Quantity for joined people and central_superstore records?,SELECT AVG(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.4368266782895212,7,1,1,26 4281,What is the average Quantity for joined central_superstore and product records?,SELECT AVG(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,0.3070078377045955,10,1,1,26 4282,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 4283,"For each Sub-issue, how many records are there in events?","SELECT `Sub-issue`, COUNT(Client_ID) FROM events GROUP BY `Sub-issue`","SELECT `Sub-issue`, COUNT(Client_ID) FROM events GROUP BY `sub-issue`",-0.10585472286749244,1,1,1,25 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 4285,"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 4286,"In 2015, 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 '2015%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2015%',3.1390577645048587,5,1,1,29 4287,How many records are in the Employees table?,SELECT COUNT(NOW) FROM Employees,SELECT COUNT(NOW) FROM Employees,1.842977802856676,1,1,1,23 4288,"For each City, how many records are there in Employees?","SELECT City, COUNT(NOW) FROM Employees GROUP BY City","SELECT City, COUNT(NOW) FROM Employees GROUP BY City",5.009754053331397,1,1,1,23 4289,How many records in Employees were recorded in 2023?,SELECT COUNT(NOW) FROM Employees WHERE BirthDate LIKE '2023%',SELECT COUNT(NOW) FROM Employees WHERE BirthDate LIKE '2023%',4.5904187201585955,1,1,1,29 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 4291,What is the total Profit in the central_superstore table?,SELECT SUM(Profit) FROM central_superstore,SELECT SUM(Profit) FROM central_superstore,4.39529225528895,1,1,1,20 4292,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,20 4293,Which Customer ID has the highest Profit?,SELECT `Customer ID` FROM central_superstore ORDER BY Profit DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Profit DESC LIMIT 1,4.898225637838208,1,1,1,25 4294,What is the average Profit for joined people and central_superstore records?,SELECT AVG(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`customer ID`,1.1691528607585808,5,1,1,26 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 4297,"In 2018, 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 '2018%',SELECT COUNT(T1.`ID`) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '2018%',-1.1774195073989522,8,0,0,29 4298,How many records in Sales Orders were recorded in 2015?,SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2015%',SELECT COUNT(OrderNumber) FROM `Sales Orders` WHERE ProcuredDate LIKE '2015%',2.5546621231758806,1,1,1,26 4299,"In 2020, 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 '2020%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2020%',1.23847382220544,26,1,1,29 4300,"For each Customer ID, how many records are there in east_superstore?","SELECT `Customer ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(`Order ID`) FROM east_superstore GROUP BY `Customer id`",2.185669469436978,6,1,1,26 4301,How many east_superstore records have matching records in people?,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`Customer ID`,3.1569532886981713,3,1,1,26 4302,"For each City, how many east_superstore records are linked?","SELECT T2.City, COUNT(T1.`Order 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.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID` GROUP BY T2 . City",0.11217690613660931,9,0,0,28 4303,How many records are in the callcenterlogs table?,SELECT COUNT(call_id) FROM callcenterlogs,SELECT COUNT(call_id) FROM callcenterlogs,4.858577923200564,1,1,1,16 4304,"For each rand client, how many records are there in callcenterlogs?","SELECT `rand client`, COUNT(call_id) FROM callcenterlogs GROUP BY `rand client`","SELECT `rand Client`, COUNT(call_id) FROM callcenterlogs GROUP BY `rand client`",1.5921414731069579,6,1,1,27 4305,How many records are in the client table?,SELECT COUNT(client_id) FROM client,SELECT COUNT(client_id) FROM client,2.3974491566795257,2,1,1,23 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 4308,"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.542225424329695,1,0,0,22 4309,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 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 4311,What is the highest Sales in the west_superstore table?,SELECT MAX(Sales) FROM west_superstore,SELECT MAX(Sales) FROM west_superstore,4.134196383558846,1,1,1,19 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 4313,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 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 4315,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.Customer ID FROM east_superstore AS T1 INNER JOIN west_superStore AS T2 ON T1.`Customer ID` = T2.`Card ID`,1.2642776408001093,1,0,0,28 4316,"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 T1.`Customer IDs`",-7.205620083367518,21,0,0,30 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 4320,Which Customer ID has the highest Profit?,SELECT `Customer ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,SELECT `Customer ID` FROM east_superstore ORDER BY Profit DESC LIMIT 1,2.465633925434841,1,1,1,24 4321,What is the average Profit for joined east_superstore and people records?,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Profit) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.6215291294679084,5,1,1,28 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 4323,"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,26 4324,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,24 4325,How many events records have matching records in callcenterlogs?,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT COUNT(T1.`Complaint ID`) FROM events AS T1 INNER JOIN callcenterlogs AS T2 WHERE T2.server = 'unknown',-1.7624735781836705,1,0,0,18 4326,List the distinct server values linked to events.,SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Composition ID` = T2.`Complaint ID`,2.213451783859777,1,0,0,30 4327,"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,24 4328,List the distinct values of EmployeeID in the EmployeeTerritories table.,SELECT DISTINCT EmployeeID FROM EmployeeTerritories,SELECT DISTINCT EmployeeID FROM EmployeeTerritories,4.2340918682410456,1,1,1,20 4329,"For each EmployeeID, how many records are there in EmployeeTerritories?","SELECT EmployeeID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY EmployeeID","SELECT EmployeeID, COUNT(EmployeeID) FROM EmployeeTerritories GROUP BY Employeeid",-0.1294126486406391,8,1,1,24 4330,"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 WHERE T1.LastName = 'Europe/Employee' GROUP BY T2.`EmployeeIDs`",-7.666163280794655,27,0,0,29 4331,List the distinct values of Region in the west_superstore table.,SELECT DISTINCT Region FROM west_superstore,SELECT DISTINCT Region FROM west_superstore,4.5739967119286575,1,1,1,15 4332,"For each Region, how many records are there in west_superstore?","SELECT Region, COUNT(`Product ID`) FROM west_superstore GROUP BY Region","SELECT Region, COUNT(`Product ID`) FROM west_superstore GROUP BY Region",2.606365159118271,1,1,1,19 4333,"For each Sub-Category, how many east_superstore records are linked?","SELECT T2.`Sub-Category`, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` GROUP BY T2.`Sub-Category`","SELECT T2.Sub-Category, COUNT(T1.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2._Sub-Categories",-2.1284406158869675,23,0,0,26 4334,How many records in orders were recorded in 2022?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2022%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2022%',4.860603963746542,1,1,1,21 4335,List the distinct values of State in the state table.,SELECT DISTINCT State FROM state,SELECT DISTINCT State FROM state,2.269073942246225,1,1,1,16 4336,How many records in Shippers were recorded in 2016?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2016%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2016%',4.412960505279923,1,1,1,24 4337,How many west_superstore records have matching records in product?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,3.274764308310278,5,1,1,22 4338,"For each Product ID, how many west_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer 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.`Customer ID Database: superstore`) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product `Product ID` = T2`.Product ID GROUP BY T2.productID",-9.236736687809278,21,0,0,27 4339,"In 2021, 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.OrderDate LIKE '2021%',SELECT COUNT(T1.`EmployeeID Database: retail_world`) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.OrderDate LIKE '2021%',-6.686802445369045,1,0,0,26 4340,"For each CategoryID, how many records are there in Products?","SELECT CategoryID, COUNT(Discontinued) FROM Products GROUP BY CategoryID","SELECT CategoryID, COUNT(Discontinued) FROM Products GROUP BY CategoryID",4.801190791215032,1,1,1,19 4341,"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 4342,How many records in callcenterlogs were recorded in 2018?,SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2018%',SELECT COUNT(`rand client`) FROM callcenterlogs WHERE `Date received` LIKE '2018%',5.5414186337814915,1,1,1,26 4343,How many records are in the Products table?,SELECT COUNT(ReorderLevel) FROM Products,SELECT COUNT(ReorderLevel) FROM Products,4.472691083849381,1,1,1,19 4344,"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,18 4345,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,22 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 4348,"For each country, how many data records are linked?","SELECT T2.country, COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID GROUP BY T2.country","SELECT T2.`country`, COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1. ID = T2.ID GROUP BY T2.'country'",-0.6422097350873044,6,0,0,29 4349,How many records in events were recorded in 2017?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2017%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2017%',0.9721202878798406,1,1,1,21 4350,Which ProductName has the highest UnitPrice?,SELECT ProductName FROM Products ORDER BY UnitPrice DESC LIMIT 1,SELECT ProductName FROM Products ORDER BY UnitPrice DESC LIMIT 1,2.970222456920592,1,1,1,22 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 4352,"In 2022, how many joined records exist between district and reviews?",SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Date LIKE '2022%',SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 WHERE T2.Date LIKE '2022%',3.438223079493648,1,0,0,30 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 4354,List the distinct _CustomerID values linked to Products.,SELECT DISTINCT T2._CustomerID FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,SELECT DISTINCT T2._CustomerID FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID,1.1576630472153995,2,1,1,26 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 4356,"In 2023, 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 '2023%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2023%',1.7579935829204043,8,1,1,27 4357,"For each Sales Channel, how many Products records are linked?","SELECT T2.`Sales Channel`, COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID GROUP BY T2.`Sales Channel`","SELECT T2.`Sales Channel`, COUNT(T1.`ProductID`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.ProductID = T2._ProductID GROUP BY T2.SalesChannel",-2.16339647935909,8,0,0,30 4358,How many records in events were recorded in 2023?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2023%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2023%',0.9721202878798406,1,1,1,24 4359,How many records in payments were recorded in 2015?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2015%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2015%',4.198241534572536,1,1,1,22 4360,"In 2021, 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 '2021%',SELECT COUNT(T1.CustomerID) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.customerID = T2._CustomerID WHERE T2.ProcuredDate LIKE '2021%',3.4416734708638548,4,1,1,29 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 4362,"In 2015, 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 '2015%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2015%',2.188136403580124,10,1,1,29 4363,List the distinct values of Address in the Employees table.,SELECT DISTINCT Address FROM Employees,SELECT DISTINCT Address FROM Employees,3.7368875748870978,1,1,1,17 4364,"For each Address, how many records are there in Employees?","SELECT Address, COUNT(HomePhone) FROM Employees GROUP BY Address","SELECT Address, COUNT(HomePhone) FROM Employees GROUP BY Address",3.2614040037227507,1,1,1,21 4365,How many records in callcenterlogs were recorded in 2022?,SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2022%',SELECT COUNT(server) FROM callcenterlogs WHERE `Date received` LIKE '2022%',1.3761424421645654,1,1,1,23 4366,List the distinct values of Title in the Employees table.,SELECT DISTINCT Title FROM Employees,SELECT DISTINCT Title FROM Employees,3.0429959203251267,1,1,1,19 4367,"For each Title, how many records are there in Employees?","SELECT Title, COUNT(Salary) FROM Employees GROUP BY Title","SELECT Title, COUNT(Salary) FROM Employees GROUP BY Title",5.573540162828874,1,1,1,23 4368,How many records in Shippers were recorded in 2023?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2023%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2023%',4.412960505279923,1,1,1,27 4369,What is the average Discount for joined Products and Order Details records?,SELECT AVG(T2.Discount) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T2.Discount) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.productID,0.21565007241915088,10,1,1,28 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 4371,List the distinct client_id values linked to events.,SELECT DISTINCT T2.client_id FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id,SELECT DISTINCT T2.client_id FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2 . client_id,7.322100793293633,1,1,1,29 4372,"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.`Client_id`",-8.219417575924702,2,0,0,26 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 4374,What is the average Discount in the west_superstore table?,SELECT AVG(Discount) FROM west_superstore,SELECT AVG(Discount) FROM west_superstore,4.2263400530524775,1,1,1,21 4375,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,17 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 4377,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM west_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM west_superstore ORDER BY Discount DESC LIMIT 1,3.1400756888400467,1,1,1,26 4378,What is the average Discount for joined west_superstore and people records?,SELECT AVG(T1.Discount) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Discount) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,0.5806662189934488,9,1,1,27 4379,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_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 west_superstore AS T1 INNER JOIN people AS T2 ON T1.`customer ID` = T2.`CustomerID` GROUP BY T2 . Customer ID",-1.4773185811491831,8,0,0,30 4380,What is the average UnitPrice for joined Products and Categories records?,SELECT AVG(T1.UnitPrice) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT AVG(T1.UnitPrice) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.categoryID,2.934686920244112,2,1,1,20 4381,How many records are in the Employees table?,SELECT COUNT(TitleOfCourtesy) FROM Employees,SELECT COUNT(TitleOfCourtesy) FROM Employees,6.216288690184852,1,1,1,19 4382,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(TitleOfCourtesy) FROM Employees GROUP BY Country","SELECT Country, COUNT(TitleOfCourtesy) FROM Employees GROUP BY Country",4.957144497985576,1,1,1,20 4383,How many records are in the Employees table?,SELECT COUNT(RESULT) FROM Employees,SELECT COUNT(RESULT) FROM Employees,4.795353829950178,1,1,1,19 4384,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(RESULT) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(RESULT) FROM Employees GROUP BY FirstName",5.657580059238104,1,1,1,18 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 4387,How many records are in the Customers table?,SELECT COUNT(ContactName) FROM Customers,SELECT COUNT(ContactName) FROM Customers,4.472691083849381,1,1,1,19 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 4389,"For each ContactName, how many records are there in Customers?","SELECT ContactName, COUNT(ContactName) FROM Customers GROUP BY ContactName","SELECT ContactName, COUNT(ContactName) FROM Customers GROUP BY ContactName",4.258328108605211,1,1,1,18 4390,How many records are in the Orders table?,SELECT COUNT(CustomerID) FROM Orders,SELECT COUNT(CustomerID) FROM Orders,2.046806108159898,1,1,1,24 4391,"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,23 4392,How many records in Orders were recorded in 2023?,SELECT COUNT(CustomerID) FROM Orders WHERE ShipCountry LIKE '2023%',SELECT COUNT(CustomerID) FROM Orders WHERE ShipCountry LIKE '2023%',4.775940017408425,1,1,1,24 4393,How many records in events were recorded in 2019?,SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2019%',SELECT COUNT(Client_ID) FROM events WHERE `Timely response?` LIKE '2019%',1.0525531105760992,1,1,1,27 4394,List the distinct values of Company response to consumer in the events table.,SELECT DISTINCT `Company response to consumer` FROM events,SELECT DISTINCT `Company response to consumer` FROM events,3.719929399566426,1,1,1,22 4395,"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`",1.4622495428273958,3,1,1,27 4396,How many records in events were recorded in 2021?,SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2021%',SELECT COUNT(`Complaint ID`) FROM events WHERE `Timely response?` LIKE '2021%',5.2423417437044275,1,1,1,27 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 4400,What is the total UnitPrice in the Order Details table?,SELECT SUM(UnitPrice) FROM `Order Details`,SELECT SUM(UnitPrice) FROM `Order Details`,5.186631828369567,1,1,1,20 4401,What is the highest UnitPrice in the Order Details table?,SELECT MAX(UnitPrice) FROM `Order Details`,SELECT MAX(UnitPrice) FROM `Order Details`,4.626232883631512,1,1,1,21 4402,"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 4403,Which ProductID has the highest UnitPrice?,SELECT ProductID FROM `Order Details` ORDER BY UnitPrice DESC LIMIT 1,SELECT ProductID FROM `Order Details` ORDER BY UnitPrice DESC LIMIT 1,2.7510811090561593,1,1,1,25 4404,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,23 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 4407,"In 2015, 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 T2.`Date received` LIKE '2015%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 WHERE T2.`Date received` LIKE '2015%',-0.22017744452341104,1,0,0,30 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 4409,"In 2023, 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 '2023%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2023%',1.1638435881992477,5,1,1,27 4410,What is the average Sales in the south_superstore table?,SELECT AVG(Sales) FROM south_superstore,SELECT AVG(Sales) FROM south_superstore,3.4321500354297707,1,1,1,21 4411,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 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 4413,"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.832357634960943,8,1,1,27 4414,Which Customer ID has the highest Sales?,SELECT `Customer ID` FROM south_superstore ORDER BY Sales DESC LIMIT 1,SELECT `Customer ID` FROM south_superstore ORDER BY Sales DESC LIMIT 1,2.465633925434841,1,1,1,28 4415,List the distinct values of Region in the people table.,SELECT DISTINCT Region FROM people,SELECT DISTINCT Region FROM people,1.7909536146026408,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 4417,What is the average Sales for joined south_superstore and people records?,SELECT AVG(T1.Sales) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T1.Sales) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.858689651580863,7,1,1,28 4418,"For each Region, how many south_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Customer ID`) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.Region","SELECT T2.Region, COUNT(T1.Customer ID) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`CustomerID` GROUP BY T2._Region",0.11811723323674184,4,0,0,29 4419,How many west_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID`,1.5560616756382324,6,1,1,28 4420,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.Order) FROM west_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.Order) FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID` GROUP BY T2._Customer ID",-1.4025661394213893,3,0,0,27 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 4422,How many records in orders were recorded in 2019?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2019%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2019%',4.860603963746542,1,1,1,23 4423,How many records in orders were recorded in 2017?,SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2017%',SELECT COUNT(o_orderkey) FROM orders WHERE o_orderdate LIKE '2017%',4.775940017408425,1,1,1,22 4424,"For each FirstName, how many records are there in Employees?","SELECT FirstName, COUNT(Salary) FROM Employees GROUP BY FirstName","SELECT FirstName, COUNT(Salary) FROM Employees GROUP BY FirstName",5.657580059238104,1,1,1,22 4425,How many records in Orders were recorded in 2019?,SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2019%',SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2019%',5.25255107492374,1,1,1,26 4426,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(Discontinued) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(Discontinued) FROM Products GROUP BY ProductName",4.258328108605211,1,1,1,21 4427,How many records in Orders were recorded in 2023?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCity LIKE '2023%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCity LIKE '2023%',5.226797006773571,1,1,1,24 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 4430,"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,22 4431,How many records are in the location table?,SELECT COUNT(street_name) FROM location,SELECT COUNT(street_name) FROM location,4.281554795135653,1,1,1,19 4432,"For each city, how many records are there in location?","SELECT city, COUNT(street_name) FROM location GROUP BY city","SELECT city, COUNT(street_name) FROM location GROUP BY city",5.308929195236603,1,1,1,20 4433,List the distinct Phone values linked to Products.,SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.Phone FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,7.235395858587943,1,1,1,27 4434,How many records are in the client table?,SELECT COUNT(email) FROM client,SELECT COUNT(email) FROM client,4.474103997787976,1,1,1,22 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 4436,"In 2018, 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 LIKE '2018%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T2.`Ship Date` LIKE '2018%',-0.34235076061228686,1,0,0,29 4437,"For each Product ID, how many records are there in central_superstore?","SELECT `Product ID`, COUNT(Order) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(Order) FROM central_superstore GROUP BY `Product id`",1.637299209802356,5,1,1,26 4438,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,21 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 4440,"For each Region, how many central_superstore records are linked?","SELECT T2.Region, COUNT(T1.Order) FROM central_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 central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Region",-1.3604918198435962,7,0,0,30 4441,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.Order) 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.Order) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID GROUP BY T2 `Customer ID`",-2.432147187001251,7,0,0,29 4442,"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 `Product ID` GROUP BY T2.Product ID",-0.13425090639420126,3,0,0,28 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 4444,"For each Country, how many records are there in Employees?","SELECT Country, COUNT(Title) FROM Employees GROUP BY Country","SELECT Country, COUNT(Title) FROM Employees GROUP BY Country",5.319414557497681,1,1,1,21 4445,"For each ProductID, what is the average UnitPrice?","SELECT ProductID, AVG(UnitPrice) FROM Products GROUP BY ProductID","SELECT ProductID, AVG(UnitPrice) FROM `Order Details` GROUP BY ProductID",1.9240616742257457,1,0,1,19 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 4447,How many records in Shippers were recorded in 2015?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2015%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2015%',4.412960505279923,1,1,1,25 4448,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,24 4449,How many records in Orders were recorded in 2019?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2019%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2019%',4.69216415425934,1,1,1,23 4450,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 = T2._ProductID,-1.0459848024686726,8,0,0,30 4451,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderID) FROM `Order Details` AS T1 INNER JOIN Orders AS T2 ON T1.`ProductID Database: retail_world` = T2.ProductID INNER JOIN `Order By` LIKE '2015%',-7.105362220940588,22,0,0,30 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 4453,What is the average Quantity in the west_superstore table?,SELECT AVG(Quantity) FROM west_superstore,SELECT AVG(Quantity) FROM west_superstore,4.2263400530524775,1,1,1,21 4454,What is the total Quantity in the west_superstore table?,SELECT SUM(Quantity) FROM west_superstore,SELECT SUM(Quantity) FROM west_superstore,4.62380479920519,1,1,1,20 4455,What is the highest Quantity in the west_superstore table?,SELECT MAX(Quantity) FROM west_superstore,SELECT MAX(Quantity) FROM west_superstore,4.568769308283359,1,1,1,18 4456,Which Customer ID has the highest Quantity?,SELECT `Customer ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Customer ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,3.1400756888400467,1,1,1,27 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 4458,How many records in callcenterlogs were recorded in 2015?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2015%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2015%',5.195196781000291,1,1,1,25 4459,"In 2016, 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 '2016%',SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 WHERE T1.`Date received` LIKE '2016%',-0.22017744452341104,1,0,0,30 4460,How many records in Orders were recorded in 2020?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2020%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2020%',4.69216415425934,1,1,1,21 4461,How many records in production were recorded in 2023?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2023%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2023%',4.69216415425934,1,1,1,27 4462,"In 2017, 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 '2017%',SELECT COUNT(T1.`ID`) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.`model_year` LIKE '2017%',-0.7091999165242282,7,0,0,29 4463,How many records in central_superstore were recorded in 2015?,SELECT COUNT(`Product ID`) FROM central_superstore WHERE Ship LIKE '2015%',SELECT COUNT(`Product ID`) FROM central_superstore WHERE Ship LIKE '2015%',1.2186519528324635,1,1,1,21 4464,"In 2019, how many joined records exist between central_superstore and product?",SELECT COUNT(T1.`Product 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.`Product ID`) FROM central_superstore AS T1 WHERE T1.`Ship Date` LIKE '2019%',1.1229403246524883,1,0,0,25 4465,"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",0.1770167605692193,5,0,0,30 4466,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(ReorderLevel) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(ReorderLevel) FROM Products GROUP BY ProductID",4.957144497985576,1,1,1,18 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 4468,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,25 4469,"For each issue, how many records are there in events?","SELECT issue, COUNT(`Complaint ID`) FROM events GROUP BY issue","SELECT issue, COUNT(`Complaint ID`) FROM events GROUP BY issue",3.676800518882487,1,1,1,19 4470,List the distinct issue values linked to callcenterlogs.,SELECT DISTINCT T2.issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.issue FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Complaint ID`,2.580690571736428,1,0,0,30 4471,"For each issue, how many callcenterlogs records are linked?","SELECT T2.issue, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` GROUP BY T2.issue","SELECT T2.issue, COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Composition ID` = T2.`Compose ID` GROUP BY T2 . issue",-0.18006500460313554,4,0,0,30 4472,List the distinct values of Region in the east_superstore table.,SELECT DISTINCT Region FROM east_superstore,SELECT DISTINCT Region FROM east_superstore,4.5739967119286575,1,1,1,17 4473,What is the average Discount in the east_superstore table?,SELECT AVG(Discount) FROM east_superstore,SELECT AVG(Discount) FROM east_superstore,4.2263400530524775,1,1,1,20 4474,What is the total Discount in the east_superstore table?,SELECT SUM(Discount) FROM east_superstore,SELECT SUM(Discount) FROM east_superstore,4.62380479920519,1,1,1,19 4475,What is the highest Discount in the east_superstore table?,SELECT MAX(Discount) FROM east_superstore,SELECT MAX(Discount) FROM east_superstore,4.568769308283359,1,1,1,20 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 4477,"For each Region, what is the average Discount?","SELECT Region, AVG(Discount) FROM east_superstore GROUP BY Region","SELECT Region, AVG(Discount) FROM east_superstore GROUP BY Region",5.006882409791407,1,1,1,20 4478,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM east_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM east_superstore ORDER BY Discount DESC LIMIT 1,3.1400756888400467,1,1,1,25 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 4481,What is the average Discount for joined east_superstore and product records?,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Discount) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`product ID` = T2.`Product ID`,1.2430965998421832,5,1,1,23 4482,"For each Product ID, how many east_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Customer ID`) 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.`Customer ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T2 . Product ID",-1.9797795559871658,7,0,0,28 4483,What is the average UnitPrice for joined Products and Order Details records?,SELECT AVG(T2.UnitPrice) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT AVG(T2.UnitPrice) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.productID,-0.2746931863970886,15,1,1,22 4484,"For each Region, how many records are there in west_superstore?","SELECT Region, COUNT(`Customer ID`) FROM west_superstore GROUP BY Region","SELECT Region, COUNT(`Customer ID`) FROM west_superstore GROUP BY Region",2.2163750566524576,1,1,1,20 4485,How many records in Shippers were recorded in 2017?,SELECT COUNT(Phone) FROM Shippers WHERE ShipperID LIKE '2017%',SELECT COUNT(Phone) FROM Shippers WHERE Phone LIKE '2017%',5.133862011464594,1,0,0,26 4486,How many records in Store Locations were recorded in 2015?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2015%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2015%',4.531000601842846,1,1,1,26 4487,How many records are in the Customer and Suppliers by City table?,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City`,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City`,1.4122608396405114,1,1,1,20 4488,List the distinct values of CITY in the Customer and Suppliers by City table.,SELECT DISTINCT CITY FROM `Customer and Suppliers by City`,SELECT DISTINCT CITY FROM `Customer and Suppliers by City`,4.395721130221813,1,1,1,21 4489,"For each CITY, how many records are there in Customer and Suppliers by City?","SELECT CITY, COUNT(Suppliers) FROM `Customer and Suppliers by City` GROUP BY CITY","SELECT CITY, COUNT(Suppliers) FROM `Customer and Suppliers by City` GROUP BY CITY",2.175825649182447,1,1,1,23 4490,How many records in Customer and Suppliers by City were recorded in 2017?,SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City` WHERE Relationship LIKE '2017%',SELECT COUNT(Suppliers) FROM `Customer and Suppliers by City` WHERE Relationship LIKE '2017%',3.67056647466942,1,1,1,24 4491,How many records are in the south_superstore table?,SELECT COUNT(Order) FROM south_superstore,SELECT COUNT(Order) FROM south_superstore,4.858577923200564,1,1,1,22 4492,"For each Customer ID, how many records are there in south_superstore?","SELECT `Customer ID`, COUNT(Order) FROM south_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, COUNT(Order) FROM south_superstore GROUP BY `Customer id`",0.454639757619643,8,1,1,28 4493,How many south_superstore records have matching records in people?,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`customer ID`,0.9254314422500941,7,1,1,26 4494,"For each Region, how many east_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) 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.Product ID) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` GROUP BY T1.Region",-0.9260435947311739,5,0,0,29 4495,What is the average Discount for joined Orders and Order Details records?,SELECT AVG(T2.Discount) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID,SELECT AVG(T2.Discount) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderId,1.2008969059274515,3,1,1,26 4496,How many records in payments were recorded in 2020?,SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2020%',SELECT COUNT(checkNumber) FROM payments WHERE paymentDate LIKE '2020%',4.198241534572536,1,1,1,23 4497,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 4498,What is the average UnitPrice in the Invoices table?,SELECT AVG(UnitPrice) FROM Invoices,SELECT AVG(UnitPrice) FROM Invoices,5.250901335507442,1,1,1,20 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 4500,What is the highest UnitPrice in the Invoices table?,SELECT MAX(UnitPrice) FROM Invoices,SELECT MAX(UnitPrice) FROM Invoices,5.447284229782327,1,1,1,18 4501,"For each Country, what is the average UnitPrice?","SELECT Country, AVG(UnitPrice) FROM Invoices GROUP BY Country","SELECT Country, AVG(UnitPrice) FROM Invoices GROUP BY Country",4.128019882299922,1,1,1,18 4502,Which Country has the highest UnitPrice?,SELECT Country FROM Invoices ORDER BY UnitPrice DESC LIMIT 1,SELECT Country FROM Invoices ORDER BY UnitPrice DESC LIMIT 1,3.477966288850088,1,1,1,25 4503,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 4504,How many records in orders were recorded in 2018?,SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2018%',SELECT COUNT(orderNumber) FROM orders WHERE orderDate LIKE '2018%',4.860603963746542,1,1,1,22 4505,"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,20 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 4507,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,0.3997178635958594,24,1,1,29 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 4509,"For each ProductID, how many Orders records are linked?","SELECT T2.ProductID, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`CustomerID Database: retail_world`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2 . OrderID GROUP BY T2.`ProductID`",-7.492060001432047,20,0,0,29 4510,"For each Product ID, what is the average Quantity?","SELECT `Product ID`, AVG(Quantity) FROM west_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Quantity) FROM west_superstore GROUP BY `Product id`",0.9716123581403018,7,1,1,26 4511,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM west_superstore ORDER BY Quantity DESC LIMIT 1,1.484219125354764,1,1,1,26 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 4514,How many records in reviews were recorded in 2017?,SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2017%',SELECT COUNT(district_id) FROM reviews WHERE Date LIKE '2017%',4.69216415425934,1,1,1,23 4515,"In 2019, how many joined records exist between district and reviews?",SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Date LIKE '2019%',SELECT COUNT(T1.district_id) FROM district AS T1 INNER JOIN reviews AS T2 WHERE T2.Date LIKE '2019%',3.438223079493648,1,0,0,27 4516,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,25 4517,"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`",1.7285150382787038,10,1,1,29 4518,"For each Customer ID, how many east_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Order 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.`Order ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.` Customer ID` GROUP BY T2 . Customer ID",-1.5243265899473921,8,0,0,27 4519,How many records in Store Locations were recorded in 2020?,SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2020%',SELECT COUNT(StoreID) FROM `Store Locations` WHERE `Time Zone` LIKE '2020%',4.531000601842846,1,1,1,26 4520,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 4521,"For each car_name, how many production records are linked?","SELECT T2.car_name, COUNT(T1.ID) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID GROUP BY T2.car_name","SELECT T2.car_name, COUNT(T1.`Price Database: cars`) FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2._ID GROUP BY T2.`Car_name`.",-6.702387742554882,20,0,0,20 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 4523,What is the total Discount in the central_superstore table?,SELECT SUM(Discount) FROM central_superstore,SELECT SUM(Discount) FROM central_superstore,5.100529480702467,1,1,1,19 4524,What is the highest Discount in the central_superstore table?,SELECT MAX(Discount) FROM central_superstore,SELECT MAX(Discount) FROM central_superstore,4.961034746521523,1,1,1,20 4525,"For each Product ID, what is the average Discount?","SELECT `Product ID`, AVG(Discount) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Discount) FROM central_superstore GROUP BY `product ID`",0.461409451663936,6,1,1,28 4526,Which Product ID has the highest Discount?,SELECT `Product ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Product ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,3.7680960726543127,1,1,1,23 4527,What is the average Discount for joined central_superstore and product records?,SELECT AVG(T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT AVG(T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product id`,1.2912847090559747,7,1,1,29 4528,"For each Product ID, how many central_superstore records are linked?","SELECT T2.`Product ID`, COUNT(T1.`Product 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.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product `Product ID` = T2`.Product ID GROUP BY T2.Product ID",-1.342603729204718,8,0,0,25 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 4530,"In 2018, 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 '2018%',SELECT COUNT(T1.`OrderID`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID LIKE '2018%',-5.413996532277993,27,0,0,30 4531,"For each Region, how many south_superstore records are linked?","SELECT T2.Region, COUNT(T1.`Product ID`) 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.Product ID) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.` Product ID` GROUP BY T2._Region",-2.086741940238239,7,0,0,27 4532,Which Mode has the highest Quantity?,SELECT Mode FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT Mode FROM central_superstore ORDER BY Quantity DESC LIMIT 1,2.7843473276576187,1,1,1,22 4533,How many records in central_superstore were recorded in 2021?,SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2021%',SELECT COUNT(ID) FROM central_superstore WHERE Ship LIKE '2021%',4.8266863463398515,1,1,1,24 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 4536,How many records in callcenterlogs were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE ser_time LIKE '2019%',2.652279595238586,1,1,1,24 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 4540,How many records in Shippers were recorded in 2019?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2019%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2019%',4.412960505279923,1,1,1,22 4541,List the distinct acceleration values linked to price.,SELECT DISTINCT T2.acceleration FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,SELECT DISTINCT T2.acceleration FROM price AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID,2.4100335490641602,4,1,1,25 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 4543,How many records in central_superstore were recorded in 2022?,SELECT COUNT(`Order ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2022%',SELECT COUNT(`Order ID`) FROM central_superstore WHERE `Ship Mode` LIKE '2022%',4.69714110864527,1,1,1,21 4544,"In 2022, 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 '2022%',SELECT COUNT(T1.`Customer ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 WHERE T2.`Ship Mode` LIKE '2022%',-0.34235076061228686,1,0,0,30 4545,How many records in production were recorded in 2016?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2016%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2016%',4.69216415425934,1,1,1,25 4546,"In 2018, 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 '2018%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2018%',2.745452202207259,12,1,1,29 4547,"In 2017, 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 '2017%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` as T2 ON T1._StoreID = T2.StoreID WHERE T1.ProcuredDate LIKE '2017%',1.1638435881992477,5,1,1,28 4548,"For each ProductName, how many records are there in Products?","SELECT ProductName, COUNT(ProductName) FROM Products GROUP BY ProductName","SELECT ProductName, COUNT(ProductName) FROM Products GROUP BY ProductName",4.720593201875388,1,1,1,21 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 4550,"In 2022, 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 '2022%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T1._ProductID = T2.ProductID WHERE T1.ProcuredDate LIKE '2022%',3.9900040784658684,1,1,1,24 4551,"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 4552,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM central_superstore ORDER BY Quantity DESC LIMIT 1,3.7680960726543127,1,1,1,26 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 4554,List the distinct values of region in the geographic table.,SELECT DISTINCT region FROM geographic,SELECT DISTINCT region FROM geographic,3.7368875748870978,1,1,1,18 4555,"For each region, how many records are there in geographic?","SELECT region, COUNT(IIF) FROM geographic GROUP BY region","SELECT region, COUNT(IIF) FROM geographic GROUP BY region",1.1378285085880602,2,1,1,28 4556,How many records in Orders were recorded in 2017?,SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2017%',SELECT COUNT(CustomerID) FROM Orders WHERE OrderDate LIKE '2017%',5.25255107492374,1,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 4558,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,0.8450646662152488,5,1,1,22 4559,"In 2022, 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.ShipCountry LIKE '2022%',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.`OrderID` LIKE '2022%',-5.829305512725536,26,0,0,26 4560,"In 2016, 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 '2016%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ProcuredDate LIKE '2016%',4.378280799748311,1,1,1,26 4561,"For each Customer ID, what is the average Discount?","SELECT `Customer ID`, AVG(Discount) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Discount) FROM central_superstore GROUP BY `Customer id`",1.5433487130487573,8,1,1,28 4562,Which Customer ID has the highest Discount?,SELECT `Customer ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,SELECT `Customer ID` FROM central_superstore ORDER BY Discount DESC LIMIT 1,3.2958196255451435,1,1,1,27 4563,What is the average Discount for joined people and central_superstore records?,SELECT AVG(T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT AVG(T2.Discount) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer id`,1.4368266782895212,7,1,1,27 4564,How many records in Orders were recorded in 2022?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2022%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2022%',4.69216415425934,1,1,1,22 4565,List the distinct values of Product in the events table.,SELECT DISTINCT Product FROM events,SELECT DISTINCT Product FROM events,5.1121551324071595,1,1,1,17 4566,"For each Product, how many records are there in events?","SELECT Product, COUNT(`Complaint ID`) FROM events GROUP BY Product","SELECT Product, COUNT(`Complaint ID`) FROM events GROUP BY Product",2.763642992064369,1,1,1,21 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 4571,How many records in production were recorded in 2021?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2021%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2021%',4.69216415425934,1,1,1,25 4572,"In 2023, 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 '2023%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1 . ID = T2.ID WHERE T1.car_name LIKE '2023%',-0.4628179617384907,28,0,0,30 4573,How many records in production were recorded in 2022?,SELECT COUNT(ID) FROM production WHERE model_year LIKE '2022%',SELECT COUNT(ID) FROM production WHERE model_year LIKE '2022%',4.69216415425934,1,1,1,26 4574,List the distinct values of state in the client table.,SELECT DISTINCT state FROM client,SELECT DISTINCT state FROM client,3.537048448089766,1,1,1,17 4575,"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,19 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 4577,"For each state, how many district records are linked?","SELECT T2.state, COUNT(T1.district_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id GROUP BY T2.state","SELECT T2.state, COUNT(T1.`district Database: retail_complains`) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2District.client_id GROUP BY T2._state",-8.417698309256105,25,0,0,25 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 4580,How many records are in the client table?,SELECT COUNT(UNKNOWN) FROM client,SELECT COUNT(UNKNOWN) FROM client,3.1109523087002167,1,1,1,24 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 4582,How many records are in the events table?,SELECT COUNT(Submitted) FROM events,SELECT COUNT(Submitted) FROM events,4.795353829950178,1,1,1,22 4583,How many records in events were recorded in 2021?,SELECT COUNT(Submitted) FROM events WHERE `Date received` LIKE '2021%',SELECT COUNT(Submitted) FROM events WHERE `Date received` LIKE '2021%',0.9721202878798406,1,1,1,23 4584,"In 2021, 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 '2021%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 ON T1 .ID = T2.ID WHERE T1.car_name LIKE '2021%',-0.9400327478220599,23,0,0,29 4585,"In 2015, 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 '2015%',SELECT COUNT(T1.ID) FROM data AS T1 INNER JOIN production AS T2 WHERE T2.model_year LIKE '2015%',-3.090660334452233,13,0,0,30 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 4587,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 4588,List the distinct values of TitleOfCourtesy in the Employees table.,SELECT DISTINCT TitleOfCourtesy FROM Employees,SELECT DISTINCT TitleOfCourtesy FROM Employees,4.142085766784503,1,1,1,15 4589,"For each TitleOfCourtesy, how many records are there in Employees?","SELECT TitleOfCourtesy, COUNT(Salary) FROM Employees GROUP BY TitleOfCourtesy","SELECT TitleOfCourtesy, COUNT(Salary) FROM Employees GROUP BY TitleOfClotesy",-3.689959341250336,2,0,0,28 4590,List the distinct city values linked to generalinfo.,SELECT DISTINCT T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant,SELECT DISTINCT T2.city FROM generalinfo AS T1 INNER JOIN location AS T2 WHERE T1.food_type = 'generalinfo',-1.1762715476737373,1,0,0,29 4591,How many records in central_superstore were recorded in 2022?,SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2022%',SELECT COUNT(`Customer ID`) FROM central_superstore WHERE Ship LIKE '2022%',1.3761424421645654,1,1,1,25 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 4593,"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%',1.23847382220544,26,1,1,29 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 4596,How many records in Orders were recorded in 2022?,SELECT COUNT(CustomerID) FROM Orders WHERE ShipName LIKE '2022%',SELECT COUNT(CustomerID) FROM Orders WHERE ShipName LIKE '2022%',1.5863991773504968,2,1,1,29 4597,How many Orders records have matching records in Customers?,SELECT COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID,SELECT COUNT(T1.`CustomerID`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2._CustomerID,-1.1261958020377707,9,0,0,27 4598,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,26 4599,"In 2017, how many joined records exist between Orders and Customers?",SELECT COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.ShipName LIKE '2017%',SELECT COUNT(T1.`CustomerID`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1._CustomerID = T2.CustomerID WHERE T1.ShipName LIKE '2017%',-0.7071826658956467,5,0,0,30 4600,"For each CustomerID, how many Orders records are linked?","SELECT T2.CustomerID, COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CustomerID","SELECT T2.CustomerID, COUNT(T1.`ShipperID Database: retail_world`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.`CustomerID` = T2.` CustomerID` GROUP BY T2 . CustomerID",-7.187414032189782,21,0,0,29 4601,How many records in events were recorded in 2019?,SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2019%',SELECT COUNT(`Submitted via`) FROM events WHERE `Date received` LIKE '2019%',2.4614983261766845,2,1,1,27 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 4603,How many Products records have matching records in Categories?,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.categoryID,1.5826926217525894,13,1,1,23 4604,"For each CategoryID, how many Products records are linked?","SELECT T2.CategoryID, COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID GROUP BY T2.CategoryID","SELECT T2.CategoryID, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1[CategoryID] = T2.`CategoryID` GROUP BY T1.ProductName",-7.8508676238044455,24,0,0,28 4605,"For each ProductID, how many records are there in Products?","SELECT ProductID, COUNT(UnitsInStock) FROM Products GROUP BY ProductID","SELECT ProductID, COUNT(UnitsInStock) FROM Products GROUP BY ProductID",4.957144497985576,1,1,1,20 4606,How many Products records have matching records in Order Details?,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID,SELECT COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.`ProductID` = T2.ProductID,-1.6702337152031506,8,0,0,25 4607,"For each ProductID, how many Products records are linked?","SELECT T2.ProductID, COUNT(T1.UnitsInStock) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.ProductID","SELECT T2.ProductID, COUNT(T1.`UnitsInStock Database: retail_world`) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1[ProductID ] = T2.`ProductID` GROUP BY T2 .ProductID",-7.222531075240769,21,0,0,28 4608,"For each Customer ID, what is the average Profit?","SELECT `Customer ID`, AVG(Profit) FROM central_superstore GROUP BY `Customer ID`","SELECT `Customer ID`, AVG(Profit) FROM central_superstore GROUP BY `Customer id`",0.6682837574100126,8,1,1,28 4609,How many records in east_superstore were recorded in 2018?,SELECT COUNT(`Customer ID`) FROM east_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Customer ID`) FROM east_superstore WHERE Ship LIKE '2018%',1.2777280467699532,1,1,1,24 4610,"In 2016, how many joined records exist between east_superstore and people?",SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Ship LIKE '2016%',SELECT COUNT(`Customer ID`) FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` LIKE '2016%',0.058110116759074563,7,0,0,28 4611,"In 2015, 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 '2015%',SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS t2 ON T1._SalesTeamID = t2.SalesTeamid WHERE T1.ProcuredDate LIKE '2015%',1.23847382220544,26,1,1,29 4612,List the distinct Country values linked to Products.,SELECT DISTINCT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID,SELECT DISTINCT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2 . SupplierID,6.850182465049296,1,1,1,26 4613,"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.322214051233041,24,0,0,29 4614,How many records are in the Customers table?,SELECT COUNT(Fax) FROM Customers,SELECT COUNT(Fax) FROM Customers,1.842977802856676,1,1,1,20 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 4616,"For each Address, how many records are there in Customers?","SELECT Address, COUNT(Fax) FROM Customers GROUP BY Address","SELECT Address, COUNT(Fax) FROM Customers GROUP BY Address",5.573540162828874,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 4618,"For each city, how many records are there in client?","SELECT city, COUNT(first) FROM client GROUP BY city","SELECT city, COUNT(first) FROM client GROUP BY city",5.009754053331397,1,1,1,21 4619,List the distinct Client_ID values linked to callcenterlogs.,SELECT DISTINCT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID`,SELECT DISTINCT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Composition ID`,1.8929701146144775,1,0,0,27 4620,"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 4621,How many records in callcenterlogs were recorded in 2019?,SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',SELECT COUNT(`Complaint ID`) FROM callcenterlogs WHERE `Date received` LIKE '2019%',5.195196781000291,1,1,1,23 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 4623,"For each Product ID, how many records are there in central_superstore?","SELECT `Product ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Product ID`","SELECT `Product ID`, COUNT(`Order ID`) FROM central_superstore GROUP BY `Product id`",2.8684784083190946,4,1,1,27 4624,How many central_superstore records have matching records in product?,SELECT COUNT(T1.`Order ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.`Order ID`) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.8017505140733607,9,1,1,23 4625,"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.8078898316533725,6,0,0,30 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 4628,"In 2016, 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.ShipCountry LIKE '2016%',SELECT COUNT(T1.`OrderID`) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID LIKE '2016%',-2.398273665090977,1,0,0,30 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 4630,How many records in Orders were recorded in 2016?,SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2016%',SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '2016%',4.69216415425934,1,1,1,20 4631,"For each region, what is the average county?","SELECT region, AVG(county) FROM geographic GROUP BY region","SELECT region, AVG(county) FROM geographic GROUP BY region",4.109136442510689,1,1,1,18 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 4633,List the distinct values of state_abbrev in the district table.,SELECT DISTINCT state_abbrev FROM district,SELECT DISTINCT state_abbrev FROM district,4.5739967119286575,1,1,1,18 4634,"For each state_abbrev, how many records are there in district?","SELECT state_abbrev, COUNT(district_id) FROM district GROUP BY state_abbrev","SELECT state_abbrev, COUNT(district_id) FROM district GROUP BY STATE_ABbrev",2.8792233457210585,1,1,1,27 4635,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 4636,"In 2021, 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 '2021%',SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T1.productID = T2._ProductID WHERE T2.ProcuredDate LIKE '2021%',2.188136403580124,10,1,1,28 4637,How many records in Employees were recorded in 2018?,SELECT COUNT(Salary) FROM Employees WHERE HireDate LIKE '2018%',SELECT COUNT(Salary) FROM Employees WHERE HireDate LIKE '2018%',1.0417914958953383,1,1,1,24 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 4639,How many records in events were recorded in 2022?,SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2022%',SELECT COUNT(Client_ID) FROM events WHERE `Date received` LIKE '2022%',0.9721202878798406,1,1,1,24 4640,How many west_superstore records have matching records in east_superstore?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superStore AS T2 ON T1.` Customer ID` = T2.`CustomerID`,-1.9062557648611356,20,0,0,25 4641,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,30 4642,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`customer ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,28 4643,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,25 4644,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,30 4645,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` GROUP BY T2.`Customer ID`","SELECT T2.Customer ID, COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`customer ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,28 4646,How many west_superstore records have matching records in south_superstore?,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM west_superstore AS T1 INNER JOIN south_superStore AS T2 ON T1.` Customer ID` = T2.`CustomerID`,-1.0524571644552814,20,0,0,26 4647,List the distinct Customer ID values linked to west_superstore.,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,30 4648,"For each Customer ID, how many west_superstore records are linked?","SELECT T2.`Customer ID`, COUNT(T1.`Customer ID`) FROM west_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 west_superstore AS T1 INNER JOIN east_superstores AS T2 ON T1.`Card ID` = T2.`customer ID` GROUP BY T2._Customer ID",-1.0873193635242184,8,0,0,28 4649,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.`Customer id`,1.9833540620807815,6,1,1,25 4650,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,27 4651,"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 central_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 product AS T2 ON T1.`Product ID` LIKE '%/%/19' GROUP BY T2 `Customer ID`",-2.2192704791421187,5,0,0,24 4652,How many east_superstore records have matching records in south_superstore?,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.`Customer ID`) FROM east_superstore AS T1 INNER JOIN south_superStore AS T2 ON T1.` Customer ID` = T2.`CustomerID`,-0.22765898030319104,3,0,0,25 4653,List the distinct Customer ID values linked to east_superstore.,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN south_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.`Customer ID` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.Product ID,1.5583132422296788,1,0,0,27 4654,"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 product AS T2 ON T1.`Product ID` LIKE '%/%/19' GROUP BY T2 `Customer ID`",-2.2192704791421187,5,0,0,24 4655,How many records in Orders were recorded in 2021?,SELECT COUNT(OrderID) FROM Orders WHERE RequiredDate LIKE '2021%',SELECT COUNT(OrderID) FROM Orders WHERE RequiredDate LIKE '2021%',5.25255107492374,1,1,1,22 4656,"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.RequiredDate LIKE '2020%',SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 WHERE T1.RequiredDate LIKE '2020%',-3.3818069301557525,4,0,0,28 4657,List the distinct values of StateCode in the state table.,SELECT DISTINCT StateCode FROM state,SELECT DISTINCT StateCode FROM state,3.0429959203251267,1,1,1,16 4658,"For each City, how many records are there in Customers?","SELECT City, COUNT(CustomerID) FROM Customers GROUP BY City","SELECT City, COUNT(CustomerID) FROM Customers GROUP BY City",5.308929195236603,1,1,1,20 4659,List the distinct sex values linked to district.,SELECT DISTINCT T2.sex FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.sex FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,7.322100793293633,1,1,1,18 4660,How many records in Shippers were recorded in 2018?,SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2018%',SELECT COUNT(CompanyName) FROM Shippers WHERE ShipperID LIKE '2018%',4.412960505279923,1,1,1,25 4661,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 4662,How many central_superstore records have matching records in people?,SELECT COUNT(T1.`Customer ID`) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT COUNT(T1.Customer ID) FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID`,-0.7129365550930942,3,0,0,28 4663,List the distinct Customer ID values linked to central_superstore.,SELECT DISTINCT T2.`Customer ID` FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID`,SELECT DISTINCT T2.Customer ID FROM central_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Card ID`,-0.35717358424261475,2,0,0,27 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 4665,How many records are in the events table?,SELECT COUNT(Tags) FROM events,SELECT COUNT(Tags) FROM events,4.474103997787976,1,1,1,20 4666,"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 4667,How many records in Orders were recorded in 2019?,SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2019%',SELECT COUNT(EmployeeID) FROM Orders WHERE ShipCountry LIKE '2019%',4.775940017408425,1,1,1,26 4668,"In 2020, 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 '2020%',SELECT COUNT(T1.EmployeeID) FROM Employees AS T1 INNER JOIN Orders AS T2 WHERE T2.ShipCountry LIKE '2020%',-1.1800483852755852,5,0,0,30 4669,How many records are in the events table?,SELECT COUNT(Consumer) FROM events,SELECT COUNT(Consumer) FROM events,0.4565143531634555,1,1,1,21 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 4671,"In 2015, 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 '2015%',"SELECT COUNT(T1.StoreID) FROM `Store Locations` AS T1 INNER JOIN `Sales Orders`, T2 ON T1.StateCode = T2._StateCode WHERE T1.`Time Zone` LIKE '2015%'",0.5576686823258492,5,0,0,27 4672,"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,22 4673,"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`",0.7394520442851352,4,1,1,26 4674,How many records in south_superstore were recorded in 2018?,SELECT COUNT(Order) FROM south_superstore WHERE Ship LIKE '2018%',SELECT COUNT(Order) FROM south_superstore WHERE Ship LIKE '2018%',5.25255107492374,1,1,1,23 4675,How many south_superstore records have matching records in product?,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID`,SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`product ID`,1.3827526398306853,4,1,1,21 4676,"In 2016, how many joined records exist between south_superstore and product?",SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.Ship LIKE '2016%',SELECT COUNT(T1.Order) FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`ProductID` WHERE T2.Region = '2016',-0.06863085806523195,7,0,0,21 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 4678,What is the average Quantity in the east_superstore table?,SELECT AVG(Quantity) FROM east_superstore,SELECT AVG(Quantity) FROM east_superstore,4.2263400530524775,1,1,1,20 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 4680,What is the highest Quantity in the east_superstore table?,SELECT MAX(Quantity) FROM east_superstore,SELECT MAX(Quantity) FROM east_superstore,4.568769308283359,1,1,1,19 4681,"For each Product ID, what is the average Quantity?","SELECT `Product ID`, AVG(Quantity) FROM east_superstore GROUP BY `Product ID`","SELECT `Product ID`, AVG(Quantity) FROM east_superstore GROUP BY `Product id`",0.7741791930213742,10,1,1,26 4682,Which Product ID has the highest Quantity?,SELECT `Product ID` FROM east_superstore ORDER BY Quantity DESC LIMIT 1,SELECT `Product ID` FROM east_superstore ORDER BY Quantity DESC LIMIT 1,1.484219125354764,1,1,1,27 4683,How many records in east_superstore were recorded in 2018?,SELECT COUNT(`Product ID`) FROM east_superstore WHERE Ship LIKE '2018%',SELECT COUNT(`Product ID`) FROM east_superstore WHERE Ship LIKE '2018%',1.3573268699547099,1,1,1,24 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 4685,"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` WHERE T2.Region = '2021',-0.2920680823643024,8,0,0,18 4686,"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",1.3583071518391376,6,0,0,24 4687,How many records are in the productlines table?,SELECT COUNT(textDescription) FROM productlines,SELECT COUNT(textDescription) FROM productlines,4.124260722271573,1,1,1,25 4688,List the distinct values of productLine in the productlines table.,SELECT DISTINCT productLine FROM productlines,SELECT DISTINCT productLine FROM productlines,4.22603725091863,1,1,1,16 4689,"For each productLine, how many records are there in productlines?","SELECT productLine, COUNT(textDescription) FROM productlines GROUP BY productLine","SELECT productLine, COUNT(textDescription) FROM productlines GROUP BY productLine",4.374654598322957,1,1,1,19 4690,List the distinct values of RegionID in the Region table.,SELECT DISTINCT RegionID FROM Region,SELECT DISTINCT RegionID FROM Region,3.0429959203251267,1,1,1,15 4691,List the distinct RegionID values linked to Territories.,SELECT DISTINCT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID,SELECT DISTINCT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1. RegionID = T2 . RegionID,1.1430299793565764,21,1,1,26 4692,List the distinct client_id values linked to district.,SELECT DISTINCT T2.client_id FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id,SELECT DISTINCT T2.client_id FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2 . district_id,6.76316711712273,1,1,1,21 4693,"For each CompanyName, how many Orders records are linked?","SELECT T2.CompanyName, COUNT(T1.CustomerID) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T2.CompanyName","SELECT T2.CompanyName, COUNT(T1.`EmployeeID Database: retail_world`) FROM Orders AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.`CustomerID` GROUP BY T2->CompanyName",-7.79869871841629,22,0,0,30 4694,List the distinct values of company in the events table.,SELECT DISTINCT company FROM events,SELECT DISTINCT company FROM events,5.1121551324071595,1,1,1,16 4695,"For each company, how many records are there in events?","SELECT company, COUNT(`Complaint ID`) FROM events GROUP BY company","SELECT company, COUNT(`Complaint ID`) FROM events GROUP BY company",2.763642992064369,1,1,1,19 4696,List the distinct values of Region in the central_superstore table.,SELECT DISTINCT Region FROM central_superstore,SELECT DISTINCT Region FROM central_superstore,3.4486835200729438,1,1,1,16 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