db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
retail_world | 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 | Question: which region has the most territories? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone. Suppli... | which region has the most territories? |
retail_world | select t2.regiondescription from territories as t1 inner join region as t2 on t1.regionid = t2.regionid where t1.territoryid = 2116 | Question: which region does territory id 2116 belong to? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone... | which region does territory id 2116 belong to? |
retail_world | 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 | Question: what percentage of orders were placed by customers in madrid city in 1996? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> S... | what percentage of orders were placed by customers in madrid city in 1996? |
retail_world | select firstname, lastname, title from employees | Question: please list the full names and titles of all employees. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperNa... | please list the full names and titles of all employees. |
retail_world | select firstname, lastname from employees where salary = ( select max(salary) from employees ) | Question: who has the highest salary? please give their first name. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Shipper... | who has the highest salary? please give their first name. |
retail_world | select count(title) from employees where salary > 2000 and title = 'sales representative' | Question: how many sales representatives whose salaries are higher than 2000? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperI... | how many sales representatives whose salaries are higher than 2000? |
retail_world | 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' | Question: in 1996, how many orders were from customers in the uk? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperNa... | in 1996, how many orders were from customers in the uk? |
retail_world | 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 | Question: which company had the most orders in 1998? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone. Su... | which company had the most orders in 1998? |
retail_world | select count(t2.customerid) from customers as t1 inner join orders as t2 on t1.customerid = t2.customerid where strftime('%y', t2.orderdate) = '1996' group by t1.country | Question: please calculate the number of orders from customers by country in 1996. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shi... | please calculate the number of orders from customers by country in 1996. |
retail_world | 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' | Question: how many orders were from hanna moos company in 1999? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName... | how many orders were from hanna moos company in 1999? |
retail_world | 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 | Question: how many days was the fastest shipping of berglunds snabbkp's order? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shipper... | how many days was the fastest shipping of berglunds snabbkp's order? |
retail_world | select t1.companyname from customers as t1 inner join orders as t2 on t1.customerid = t2.customerid where t2.orderid = 10257 | Question: which company placed the order with the id 10257? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Ph... | which company placed the order with the id 10257? |
retail_world | 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 | Question: in which year did around the horn place the most orders? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperN... | in which year did around the horn place the most orders? |
retail_world | select count(employeeid) from employees where reportsto = ( select employeeid from employees where lastname = 'fuller' and firstname = 'andrew' ) | Question: how many employees report to andrew fuller? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone. S... | how many employees report to andrew fuller? |
retail_world | select country from suppliers group by country order by count(supplierid) desc limit 1 | Question: which country are the majority of the suppliers located? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperN... | which country are the majority of the suppliers located? |
retail_world | select firstname, lastname from employees where reportsto = ( select employeeid from employees where title = 'sales manager' ) | Question: what is the full name of the employees who report to the sales manager? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Ship... | what is the full name of the employees who report to the sales manager? |
retail_world | select count(orderid) from orders where orderdate like '1996-08%' group by customerid order by count(orderid) desc limit 1 | Question: in august of 1996, how many orders were placed by the customer with the highest amount of orders? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Phot... | in august of 1996, how many orders were placed by the customer with the highest amount of orders? |
retail_world | select salary from employees where hiredate = ( select min(hiredate) from employees ) | Question: how much is the salary of the first employee that was hired? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Ship... | how much is the salary of the first employee that was hired? |
retail_world | select max(timestampdiff(year, birthdate, hiredate)) from employees | Question: how old was the oldest employee at the time he or she was hired? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ... | how old was the oldest employee at the time he or she was hired? |
retail_world | 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 | Question: what is the total sales amount of all discontinued products? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Ship... | what is the total sales amount of all discontinued products? |
retail_world | select t2.categoryname from products as t1 inner join categories as t2 on t1.categoryid = t2.categoryid where t1.discontinued = 1 group by t2.categoryname order by count(t1.productid) desc limit 1 | Question: what is the category of the product that has the highest number of discontinued products? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes... | what is the category of the product that has the highest number of discontinued products? |
retail_world | 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%' | Question: how many condiments were sold in 1997? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone. Suppli... | how many condiments were sold in 1997? |
retail_world | 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 | Question: who is the customer who purchased the highest number of products in a single order? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Ship... | who is the customer who purchased the highest number of products in a single order? |
retail_world | 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%' | Question: what is the monthly average number of products shipped via federal shipping for the year 1996? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, ... | what is the monthly average number of products shipped via federal shipping for the year 1996? |
retail_world | select t1.productname from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.companyname like 'g%day, mate' | Question: which products are being supplied by 'g'day, mate'? list all of their names. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers ->... | which products are being supplied by 'g'day, mate'? list all of their names. |
retail_world | 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 | Question: how many territories are there in the region with the highest number of territories? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shi... | how many territories are there in the region with the highest number of territories? |
retail_world | 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 ) | Question: what is the company name of the supplier who supplies the product with the highest unit price? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, ... | what is the company name of the supplier who supplies the product with the highest unit price? |
retail_world | 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 | Question: how many female employees are in charge of 3 or more territories? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID,... | how many female employees are in charge of 3 or more territories? |
retail_world | select t2.companyname from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid order by t1.reorderlevel desc limit 8 | Question: who are the top 8 suppliers supplying the products with the highest user satisfaction? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. S... | who are the top 8 suppliers supplying the products with the highest user satisfaction? |
retail_world | 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 | Question: what is the company name of the customer who made the biggest amount of purchase in a single order before discount? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstNam... | what is the company name of the customer who made the biggest amount of purchase in a single order before discount? |
retail_world | 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 | Question: what was the total amount of sales handled by nancy davolio in december 1996, excluding discounts? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Pho... | what was the total amount of sales handled by nancy davolio in december 1996, excluding discounts? |
retail_world | 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%' | Question: what is the total amount of sales made in the year 1997? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperN... | what is the total amount of sales made in the year 1997? |
retail_world | 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' | Question: what is the average annual amount of shipped sales from 1997 to 1998? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shippe... | what is the average annual amount of shipped sales from 1997 to 1998? |
retail_world | select count(orderid) from orders where shipcountry = 'venezuela' and strftime('%y', shippeddate) = '1996' | Question: how many orders were shipped to venezuela in 1996? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, P... | how many orders were shipped to venezuela in 1996? |
retail_world | select categoryid, description from categories where categoryname = 'condiments' | Question: what are the id and description of the condiments category? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Shipp... | what are the id and description of the condiments category? |
retail_world | select productid, orderid, unitprice from `order details` where unitprice * quantity * (1 - discount) > 15000 | Question: list the order ids, product ids and unit price of orders which total payment is greater than 15000. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Ph... | list the order ids, product ids and unit price of orders which total payment is greater than 15000. |
retail_world | select territoryid from employeeterritories where employeeid = 7 | Question: provide the territory ids under employee id of 7. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Ph... | provide the territory ids under employee id of 7. |
retail_world | select companyname, homepage from suppliers where city = 'sydney' | Question: provide the supplier company name in sydney and its homepage address if available. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shipp... | provide the supplier company name in sydney and its homepage address if available. |
retail_world | select firstname, lastname , timestampdiff(year, birthdate, hiredate) as age from employees where title = 'vice president, sales' | Question: write down the full name of vie president of sales and his age when he was hired. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippe... | write down the full name of vie president of sales and his age when he was hired. |
retail_world | select companyname from suppliers where country = 'germany' | Question: list the supplier company names located in germany. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, ... | list the supplier company names located in germany. |
retail_world | select titleofcourtesy, firstname, lastname , timestampdiff(year, birthdate, now()) as ages from employees where city = 'london' | Question: list the employees' full names and ages in 2022 who lived in london. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shipper... | list the employees' full names and ages in 2022 who lived in london. |
retail_world | select companyname, address, phone, fax from customers where city = 'london' | Question: list down the customer company names, addresses, phones and faxes which are located in london. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, ... | list down the customer company names, addresses, phones and faxes which are located in london. |
retail_world | select firstname, lastname, title from employees where reportsto = ( select employeeid from employees where title = 'sales manager' ) | Question: list the full name of employees and titles who have to report to sales manager. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers... | list the full name of employees and titles who have to report to sales manager. |
retail_world | select companyname, city from customers where country = 'canada' | Question: list all the customer company names and cities located in canada. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID,... | list all the customer company names and cities located in canada. |
retail_world | select unitsinstock + unitsonorder, productname from products where quantityperunit = '10 - 500 g pkgs.' | Question: find the total production amount and product names which had '10 - 500 g pkgs.' as quantity per unit. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, ... | find the total production amount and product names which had '10 - 500 g pkgs.' as quantity per unit. |
retail_world | 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 | Question: list all the product names and categories of the highest reorder level. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Ship... | list all the product names and categories of the highest reorder level. |
retail_world | 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 | Question: describe the supplier companies, cities and products which total production amount is more than 120. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, P... | describe the supplier companies, cities and products which total production amount is more than 120. |
retail_world | select t2.contactname, t2.contacttitle, t1.productname from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.companyname = 'escargots nouveaux' | Question: provide the contact person name, title and supplied products by 'escargots nouveaux' company. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, N... | provide the contact person name, title and supplied products by 'escargots nouveaux' company. |
retail_world | 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.la... | Question: list the territory ids, description and region description under the in-charge of mrs. margaret peacock. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDat... | list the territory ids, description and region description under the in-charge of mrs. margaret peacock. |
retail_world | select t1.productname from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.country = 'spain' | Question: what were the products supplied by the company in spain? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperN... | what were the products supplied by the company in spain? |
retail_world | 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' | Question: what products were ordered by the customer id 'wilmk' which were required on 3/26/1998? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. ... | what products were ordered by the customer id 'wilmk' which were required on 3/26/1998? |
retail_world | 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 ) | Question: provide the list of product ids and names under the meat/poultry category. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> S... | provide the list of product ids and names under the meat/poultry category. |
retail_world | select count(t2.orderid) from customers as t1 inner join orders as t2 on t1.customerid = t2.customerid where t1.country = 'ireland' | Question: how many orders were made by the customers in ireland. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperNam... | how many orders were made by the customers in ireland. |
retail_world | 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' | Question: provide the products list which were ordered in 1996 by the company in norway. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers ... | provide the products list which were ordered in 1996 by the company in norway. |
retail_world | 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... | Question: among orders shipping to brazil, mention the supplier company of the order which was done by employee anne dodsworth in december, 1996 . | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeI... | among orders shipping to brazil, mention the supplier company of the order which was done by employee anne dodsworth in december, 1996 . |
retail_world | select t1.firstname, t1.lastname, t1.title, t1.salary , count(t2.orderid) from employees as t1 inner join orders as t2 on t1.employeeid = t2.employeeid where shipcountry = 'usa' group by t1.firstname, t1.lastname, t1.title, t1.salary, t1.birthdate order by t1.birthdate limit 1 | Question: mention the oldest empoyee's full name, title, salary and number of orders which were shipped to usa by him. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, Birt... | mention the oldest empoyee's full name, title, salary and number of orders which were shipped to usa by him. |
retail_world | select t1.territoryid, t1.territorydescription from territories as t1 inner join region as t2 on t1.regionid = t2.regionid where t2.regiondescription = 'southern' | Question: list down the territory ids and descriptions existed in southern region. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shi... | list down the territory ids and descriptions existed in southern region. |
retail_world | 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' | Question: calculate the average payment per product under confections category. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shippe... | calculate the average payment per product under confections category. |
retail_world | 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' | Question: find the total payment of the orders by customers from san francisco. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shippe... | find the total payment of the orders by customers from san francisco. |
retail_world | select sum(t1.unitsinstock + t1.unitsonorder) from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.country = 'japan' | Question: calculate the total production for each product which were supplied from japan | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers ... | calculate the total production for each product which were supplied from japan |
retail_world | 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 | Question: among the supplied products from australia, describe the discontinued products and the category. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo... | among the supplied products from australia, describe the discontinued products and the category. |
retail_world | 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 | Question: mention the supplier country of ipoh coffee and the order id which had maximum in total payment. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo... | mention the supplier country of ipoh coffee and the order id which had maximum in total payment. |
retail_world | 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 | Question: provide the list of products ordered by id 10979 and calculate its total payment. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippe... | provide the list of products ordered by id 10979 and calculate its total payment. |
retail_world | select distinct t1.contactname, t1.contacttitle 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.categoryname = 'grains/cereals' and t1.supplierid between 1 and 10 limit 1 | Question: among the products under grains/cereals category, provide the contact person and title of the supplier with one digit id. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, Fi... | among the products under grains/cereals category, provide the contact person and title of the supplier with one digit id. |
retail_world | 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 | Question: provide speedy express's phone number and number of shipped orders on 30th january, 1998. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes... | provide speedy express's phone number and number of shipped orders on 30th january, 1998. |
retail_world | 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 | Question: describe the ordered products which were the most overdue from required date. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -... | describe the ordered products which were the most overdue from required date. |
retail_world | 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 = 'mexic... | Question: under the in-charge of inside sales coordinator, provide the product lists which were shipped to mexico in 1996. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, ... | under the in-charge of inside sales coordinator, provide the product lists which were shipped to mexico in 1996. |
retail_world | 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 ) | Question: identify the name of the most popular dairy product in terms of reorder quantity. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippe... | identify the name of the most popular dairy product in terms of reorder quantity. |
retail_world | select sum(unitsinstock + unitsonorder) from products where productname = 'mascarpone fabioli' | Question: calculate the production volume of the dairy product 'mascarpone fabioli'. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> S... | calculate the production volume of the dairy product 'mascarpone fabioli'. |
retail_world | 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 )) | Question: identify the name and product category for the most expensive and the least expensive products. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo,... | identify the name and product category for the most expensive and the least expensive products. |
retail_world | 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 | Question: identify the customer, which placed the largest order in terms of value. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> Shi... | identify the customer, which placed the largest order in terms of value. |
retail_world | 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' | Question: identify the number of employees in northern sales region. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Shippe... | identify the number of employees in northern sales region. |
retail_world | select sum(unitprice * quantity * (1 - discount)) / count(orderid) from `order details` | Question: what is the average value of the sales order? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone.... | what is the average value of the sales order? |
retail_world | select cast(count(case when discontinued = 1 then 1 else null end) as real) * 100 / count(productid) from products | Question: find the percentage of discontinued products in northwind's portfolio of products. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shipp... | find the percentage of discontinued products in northwind's portfolio of products. |
retail_world | select t1.firstname, t1.lastname from employees as t1 inner join orders as t2 on t1.employeeid = t2.employeeid where t2.orderid = 10274 | Question: provide the full name of the employee who processed the sales order with id 10274. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shipp... | provide the full name of the employee who processed the sales order with id 10274. |
retail_world | select count(t2.orderid) from customers as t1 inner join orders as t2 on t1.customerid = t2.customerid where t1.companyname = 'grosella-restaurante' | Question: calculate the total number of orders placed by the company 'grosella-restaurante'. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shipp... | calculate the total number of orders placed by the company 'grosella-restaurante'. |
retail_world | 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' a... | Question: name products and their quantity ordered by the company 'grosella-restaurante' in the sales order that was processed by nancy davolio. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID,... | name products and their quantity ordered by the company 'grosella-restaurante' in the sales order that was processed by nancy davolio. |
retail_world | 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' | Question: identify the total number of orders placed by the customer 'laughing bacchus wine cellars' and it's average value. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName... | identify the total number of orders placed by the customer 'laughing bacchus wine cellars' and it's average value. |
retail_world | select count(t2.quantity) from products as t1 inner join `order details` as t2 on t1.productid = t2.productid where t1.productname = 'pavlova' | Question: how many boxes of 'pavlova' did northwind sell? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phon... | how many boxes of 'pavlova' did northwind sell? |
retail_world | select ( select min(salary) from employees where title = 'sales representative' ) as min , ( select max(salary) from employees where title = 'sales representative' ) as max | Question: what is the salary range for sales representative in northwind? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, S... | what is the salary range for sales representative in northwind? |
retail_world | select count(supplierid) from suppliers where country = 'usa' | Question: how many suppliers does northwind have in usa? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone... | how many suppliers does northwind have in usa? |
retail_world | select productname from products where discontinued = 1 | Question: what products are no longer sold by northwind? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone... | what products are no longer sold by northwind? |
retail_world | select contactname from customers where companyname = 'eastern connection' and contacttitle = 'sales agent' | Question: who is the sales agent for the company 'eastern connection'? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Ship... | who is the sales agent for the company 'eastern connection'? |
retail_world | select count(shipperid) from shippers | Question: how many companies do ship northwind's orders? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone... | how many companies do ship northwind's orders? |
retail_world | 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' | Question: identify the total number of orders processed by northwind employee named andrew fuller. what percent of those orders was shipped to austria? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> Empl... | identify the total number of orders processed by northwind employee named andrew fuller. what percent of those orders was shipped to austria? |
retail_world | select categoryname from categories where description = 'soft drinks, coffees, teas, beers, and ales' | Question: indicate category name of soft drinks, coffees, teas, beers, and ales in description list. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Note... | indicate category name of soft drinks, coffees, teas, beers, and ales in description list. |
retail_world | select phone from customers where companyname = 'around the horn' | Question: list the phone number of company named around the horn. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperNa... | list the phone number of company named around the horn. |
retail_world | select fax from customers where companyname = 'blondesddsl pre et fils' and city = 'strasbourg' | Question: indicate the fax of the company blondesddsl pre et fils in strasbourg city. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ... | indicate the fax of the company blondesddsl pre et fils in strasbourg city. |
retail_world | select count(companyname) from customers where city = 'london' | Question: how many companies are there in the city of london? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, ... | how many companies are there in the city of london? |
retail_world | select address from customers where companyname = 'eastern connection' and contactname = 'ann devon' | Question: indicate the address of the company eastern connection whose contact name is ann devon. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. ... | indicate the address of the company eastern connection whose contact name is ann devon. |
retail_world | select companyname from customers where country = 'france' | Question: indicate which company is located in france? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ShipperName, Phone. ... | indicate which company is located in france? |
retail_world | select count(t1.productname) from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.companyname = 'exotic liquids' | Question: how many product names does the supplier exotic liquids have? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, Shi... | how many product names does the supplier exotic liquids have? |
retail_world | 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 ) | Question: what is the name of the company that has the product with the highest unit price? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippe... | what is the name of the company that has the product with the highest unit price? |
retail_world | 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 | Question: which company name in london city has the most stocked products? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -> ShipperID, ... | which company name in london city has the most stocked products? |
retail_world | 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 | Question: which product of exotic liquids company that have the highest reorder levels? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers -... | which product of exotic liquids company that have the highest reorder levels? |
retail_world | 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' | Question: provide the category name of the chef anton's gumbo mix product that new orleans cajun delights company has. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, Birt... | provide the category name of the chef anton's gumbo mix product that new orleans cajun delights company has. |
retail_world | 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' | Question: indicate the name of the country where leka trading supplies ipoh coffee product. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippe... | indicate the name of the country where leka trading supplies ipoh coffee product. |
retail_world | 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 ) | Question: indicate the category name of the product name with the highest units on order. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. Shippers... | indicate the category name of the product name with the highest units on order. |
retail_world | 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.supplieri... | Question: 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. | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Count... | 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. |
retail_world | select t1.productname from products as t1 inner join suppliers as t2 on t1.supplierid = t2.supplierid where t2.companyname like 'cooperativa de quesos%' and t1.unitprice > 20 | Question: which of cooperativa de quesos 'las cabras' products have a unit price greater than 20? | Tables: Categories -> CategoryID, CategoryName, Description. Customers -> CustomerID, CustomerName, ContactName, Address, City, PostalCode, Country. Employees -> EmployeeID, LastName, FirstName, BirthDate, Photo, Notes. ... | which of cooperativa de quesos 'las cabras' products have a unit price greater than 20? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.