db_id stringlengths 4 31 | SQL stringlengths 18 1.45k | input_sequence stringlengths 148 11k | question stringlengths 16 325 |
|---|---|---|---|
superstore | 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' a... | Question: calculate the total cost of the orders by brad thomas in 2016. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Cust... | calculate the total cost of the orders by brad thomas in 2016. |
superstore | select distinct t2.`customer name`, t2.city, t2.country 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` = 'plantronics single ear headset' | Question: provide the names, cities, and countries of the customers who ordered the plantronics single ear headset. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order... | provide the names, cities, and countries of the customers who ordered the plantronics single ear headset. |
superstore | 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' | Question: provide the shipping dates and products of the orders by gene hale. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode,... | provide the shipping dates and products of the orders by gene hale. |
superstore | select count(t1.`order id`) from south_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`ship mode` = 'first class' and t2.category = 'furniture' | Question: how many orders in the south superstore with the fastest delivery are items of furniture? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date,... | how many orders in the south superstore with the fastest delivery are items of furniture? |
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' | Question: how many office supply orders were made by cindy stewart in the south superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Da... | how many office supply orders were made by cindy stewart in the south superstore? |
superstore | select t2.category from south_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` order by t1.profit desc limit 1 | Question: what product category got the highest profit in the south superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mod... | what product category got the highest profit in the south superstore? |
superstore | select t3.`product 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 t2.`customer name` = 'cindy stewart' | Question: list the name of all products that cindy stewart ordered in the east superstore. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Dat... | list the name of all products that cindy stewart ordered in the east superstore. |
superstore | 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%' | Question: list the name of all products in the west superstore that customers chose for same-day shipment in the year 2013. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row I... | list the name of all products in the west superstore that customers chose for same-day shipment in the year 2013. |
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' | Question: what product category that sam craven ordered from the central and east superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship ... | what product category that sam craven ordered from the central and east superstore? |
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' | Question: what is the total quantity that cindy stewart order 'lexmark x 9575 professional all-in-one color printer' in the south superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_s... | what is the total quantity that cindy stewart order 'lexmark x 9575 professional all-in-one color printer' in the south superstore? |
superstore | 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 | Question: 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. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category,... | 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. |
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 | Question: what product category got the least sales in the west superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, C... | what product category got the least sales in the west superstore? |
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' | Question: what is the total profit of 'memorex froggy flash drive 8 gb in south superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Da... | what is the total profit of 'memorex froggy flash drive 8 gb in south superstore? |
superstore | 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' | Question: what is the total sales of furniture products in the east superstore in the year 2016. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Sh... | what is the total sales of furniture products in the east superstore in the year 2016. |
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' | Question: calculate the average sales of ''sharp al-1530cs digital copier in the east and the west superstore. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, ... | calculate the average sales of ''sharp al-1530cs digital copier in the east and the west superstore. |
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` | Question: calculate the percentage of ordered office supplies products in the central and the south superstore. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID,... | calculate the percentage of ordered office supplies products in the central and the south superstore. |
superstore | 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 | Question: what is the ratio between customers who live in texas and customers who live in indiana? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, ... | what is the ratio between customers who live in texas and customers who live in indiana? |
superstore | 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 | Question: among the orders in central superstore, which art product were ordered the most? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Dat... | among the orders in central superstore, which art product were ordered the most? |
superstore | select distinct t2.`customer name` from south_superstore as t1 inner join people as t2 on t1.`customer id` = t2.`customer id` where strftime('%y', t1.`order date`) = '2015' group by t2.`customer name` having count(t2.`customer name`) > 3 | Question: among the customers in south superstore, which customers ordered more than 3 times in 2015? state the name of the customers. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_supersto... | among the customers in south superstore, which customers ordered more than 3 times in 2015? state the name of the customers. |
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' | Question: state the highest profit made by anna chung's orders in the central superstore. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date... | state the highest profit made by anna chung's orders in the central superstore. |
superstore | 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' | Question: how many orders were made by corey roper in 2015? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer ID, Regi... | how many orders were made by corey roper in 2015? |
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` | Question: calculate the difference between the total sales in the east superstore and the total sales in the west superstore. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row... | calculate the difference between the total sales in the east superstore and the total sales in the west superstore. |
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 | Question: what are the names of the ordered products that have profit deficiency in central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order D... | what are the names of the ordered products that have profit deficiency in central superstore? |
superstore | 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 | Question: in west superstore, what is the name and the shipping mode of the product that was ordered with the shortest shipment time? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstor... | in west superstore, what is the name and the shipping mode of the product that was ordered with the shortest shipment time? |
superstore | select count(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` = 'o''sullivan plantations 2-door library in landvery oak' and t2.region = 'central' and t1.`ship mode` = 'first class' | Question: how many orders of o'sullivan plantations 2-door library in landvery oak in central superstore were shipped through the shipping mode with the fastest delivery speed? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Catego... | how many orders of o'sullivan plantations 2-door library in landvery oak in central superstore were shipped through the shipping mode with the fastest delivery speed? |
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 | Question: what is the name of the corporate customer from rhode island who had the highest number of orders in 2016 from the east superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_s... | what is the name of the corporate customer from rhode island who had the highest number of orders in 2016 from the east superstore? |
superstore | 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' | Question: among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in california? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_supe... | among the orders with sales value of no less than 5,000 in west superstore, how many were bought by the customers in california? |
superstore | 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 | Question: in which segment does the customer who purchased the product from the east superstore with the highest original price belong? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superst... | in which segment does the customer who purchased the product from the east superstore with the highest original price belong? |
superstore | select distinct strftime('%j', `ship date`) - strftime('%j', `order date`) as duration from central_superstore where `order id` = 'ca-2011-134103' | Question: what is the shipment duration for order number ca-2011-134103? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Cust... | what is the shipment duration for order number ca-2011-134103? |
superstore | select count(distinct `order id`) from central_superstore where quantity > 5 and `ship mode` = 'first class' | Question: how many orders with a quantity greater than 5 have been shipped by the fastest delivery method? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Orde... | how many orders with a quantity greater than 5 have been shipped by the fastest delivery method? |
superstore | select `order id` from central_superstore where profit < 0 limit 3 | Question: please list any three orders that caused a loss to the company. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Cus... | please list any three orders that caused a loss to the company. |
superstore | 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' | Question: which product did phillina ober buy? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer ID, Region, Product I... | which product did phillina ober buy? |
superstore | 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 | Question: who was the customer in the south region superstore who bought the most hon multipurpose stacking arm chairs'? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, ... | who was the customer in the south region superstore who bought the most hon multipurpose stacking arm chairs'? |
superstore | 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' | Question: what is the profit from selling the 'o'sullivan living dimensions 2-shelf bookcases'? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Shi... | what is the profit from selling the 'o'sullivan living dimensions 2-shelf bookcases'? |
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' | Question: how many of the 'hon pagoda stacking chairs' have been sold in total in the west superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Da... | how many of the 'hon pagoda stacking chairs' have been sold in total in the west superstore? |
superstore | 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' | Question: how many orders purchased by aaron bergman have been delivered with the slowest shipping speed? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order... | how many orders purchased by aaron bergman have been delivered with the slowest shipping speed? |
superstore | 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' | Question: what is the original price of the 'black avery flip-chart easel binder'? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship ... | what is the original price of the 'black avery flip-chart easel binder'? |
superstore | 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' | Question: what is the name of the product that aimee bixby bought? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Customer I... | what is the name of the product that aimee bixby bought? |
superstore | 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' | Question: indicate the profit of product sauder camden county barrister bookcase, planked cherry finish. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order ... | indicate the profit of product sauder camden county barrister bookcase, planked cherry finish. |
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' | Question: how many furniture products had been shipped by standard class in the east superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Sh... | how many furniture products had been shipped by standard class in the east superstore? |
superstore | 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 | Question: what is the highest profit order in the east superstore of customers from houston, texas? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date,... | what is the highest profit order in the east superstore of customers from houston, texas? |
superstore | select count(*) from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t2.category = 'furniture' | Question: how many furniture products were ordered at central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Cus... | how many furniture products were ordered at central superstore? |
superstore | select distinct t2.`product name` from central_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where strftime('%y-%m', t1.`ship date`) = '2013-03' | Question: what are the names of the products that had been shipped in march 2013 at central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order D... | what are the names of the products that had been shipped in march 2013 at central superstore? |
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' | Question: how many orders were made by customers who live in texas at the central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship ... | how many orders were made by customers who live in texas at the central superstore? |
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' | Question: how many orders were made by alan barnes in 2015 at the central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Sh... | how many orders were made by alan barnes in 2015 at the central superstore? |
superstore | select distinct t2.`product name` from east_superstore as t1 inner join product as t2 on t1.`product id` = t2.`product id` where t1.`order id` = 'ca-2011-141817' | Question: what is the product name of order ca-2011-115791 in the east superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship ... | what is the product name of order ca-2011-115791 in the east superstore? |
superstore | select cast(sum(case when t2.discount = 0.2 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 t1.state = 'texas' | Question: what is the percentage of orders with 0.2 discount in the central superstore were purchased by customers who live in texas? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstor... | what is the percentage of orders with 0.2 discount in the central superstore were purchased by customers who live in texas? |
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' | Question: what is the percentage of furniture orders that were shipped through first class in 2013 at the central superstore? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row... | what is the percentage of furniture orders that were shipped through first class in 2013 at the central superstore? |
superstore | 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' | Question: who order from the west region on august 12, 2013, and received a discount of 0.2? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship D... | who order from the west region on august 12, 2013, and received a discount of 0.2? |
superstore | 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' | Question: what is the order id of the security-tint envelopes product ordered on june 3, 2013, in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Ord... | what is the order id of the security-tint envelopes product ordered on june 3, 2013, in the central region? |
superstore | 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' | Question: list the product's name bought by the customer named bill shonely from the central region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date... | list the product's name bought by the customer named bill shonely from the central region. |
superstore | 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' | Question: please give the name of customers from the west region that bought exactly 8 items in their purchase. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID,... | please give the name of customers from the west region that bought exactly 8 items in their purchase. |
superstore | 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' | Question: among the customers from houston, texas, what is the total profit of their orders in the central region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ... | among the customers from houston, texas, what is the total profit of their orders in the central region? |
superstore | 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' | Question: who is the customer with an order shipped on march 5, 2013, in the eastern region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship D... | who is the customer with an order shipped on march 5, 2013, in the eastern region? |
superstore | 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 | Question: among the orders from 2016 in the central region, what is the product with the lowest profit? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order D... | among the orders from 2016 in the central region, what is the product with the lowest profit? |
superstore | 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' | Question: who ordered the order id ca-2011-118976 from the east region? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship Mode, Custo... | who ordered the order id ca-2011-118976 from the east region? |
superstore | 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 | Question: provide the product's name of the product with the highest sales in the south region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Shi... | provide the product's name of the product with the highest sales in the south region. |
superstore | 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' | Question: list down the sales, profit, and subcategories of the product ordered in the order id us-2011-126571 in the east region. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -... | list down the sales, profit, and subcategories of the product ordered in the order id us-2011-126571 in the east region. |
superstore | select t2.`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.quantity desc limit 1 | Question: what is the product's name in the highest quantity in a single purchase? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore -> Row ID, Order ID, Order Date, Ship Date, Ship ... | what is the product's name in the highest quantity in a single purchase? |
superstore | 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 | Question: 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. | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Reg... | 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. |
superstore | 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' | Question: among the customers from indiana, what is the percentage of their purchased orders in the central region with no discount? | Tables: people -> Customer ID, Customer Name, Segment, Country, City, State, Postal Code, Region. product -> Product ID, Product Name, Category, Sub-Category, Region. central_superstore... | among the customers from indiana, what is the percentage of their purchased orders in the central region with no discount? |
shooting | select cast(sum(iif(race = 'w', 1, 0)) as real) * 100 / count(case_number) from officers where gender = 'm' | Question: among all the male officers, what is the percentage of them are white? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_n... | among all the male officers, what is the percentage of them are white? |
shooting | select cast(sum(iif(officer_count > 3, 1, 0)) as real) * 100 / count(case_number) from incidents where strftime('%y', date) between '2010' and '2015' | Question: what is the percentage of the cases involved more than 3 officers from year 2010 to 2015? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, r... | what is the percentage of the cases involved more than 3 officers from year 2010 to 2015? |
shooting | select strftime('%y', date) from incidents where subject_weapon = 'handgun' group by strftime('%y', date) order by count(case_number) desc limit 1 | Question: in which year has the greatest number of cases where handgun was used as weapon? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gend... | in which year has the greatest number of cases where handgun was used as weapon? |
shooting | select cast(sum(subject_statuses = 'injured') as real) * 100 / count(case_number) from incidents where grand_jury_disposition = 'no bill' | Question: among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. s... | among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured? |
shooting | select sum(iif(strftime('%y', date) = '2007', 1, 0)) - sum(iif(strftime('%y', date) = '2008', 1, 0)) from incidents where subject_weapon = 'vehicle' | Question: did the number of cases with vehicle as subject weapon increase or decrease from year 2007 to 2008. state the difference. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_... | did the number of cases with vehicle as subject weapon increase or decrease from year 2007 to 2008. state the difference. |
shooting | select cast(sum(subject_statuses = 'shoot and miss') as real) * 100 / count(case_number) from incidents where subject_weapon = 'handgun' | Question: among the 'handgun' weapon used by subject, how many percent were 'shoot and miss'? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, g... | among the 'handgun' weapon used by subject, how many percent were 'shoot and miss'? |
shooting | select t2.last_name, t2.gender from incidents as t1 inner join officers as t2 on t1.case_number = t2.case_number where t1.grand_jury_disposition = 'no bill' | Question: who are the officers involved in cases that are voted as 'no bill'. list their last name and gender. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> cas... | who are the officers involved in cases that are voted as 'no bill'. list their last name and gender. |
shooting | select t1.case_number, t1.subject_statuses, t1.subject_weapon from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t2.gender = 'f' | Question: which are the cases where the subject are female. list the case number, subject status and weapon. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_... | which are the cases where the subject are female. list the case number, subject status and weapon. |
shooting | select t1.case_number, t1.location, t1.subject_statuses from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t2.gender = 'm' | Question: from the cases where the subject are male, list the case number and the location and subject status. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> cas... | from the cases where the subject are male, list the case number and the location and subject status. |
shooting | select t1.case_number, t1.grand_jury_disposition from incidents as t1 inner join officers as t2 on t1.case_number = t2.case_number where t2.first_name = 'george' and t2.last_name = 'evenden' | Question: for case(s) where officer 'evenden, george' is in charged, state the case number and the grand jury disposition? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. sub... | for case(s) where officer 'evenden, george' is in charged, state the case number and the grand jury disposition? |
shooting | select t2.last_name, t1.subject_statuses from incidents as t1 inner join officers as t2 on t1.case_number = t2.case_number where t1.case_number = '134472-2015' | Question: for case number '134472-2015', list the last name of the officers involved and state the subject statuses. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects ... | for case number '134472-2015', list the last name of the officers involved and state the subject statuses. |
shooting | select t2.last_name, t2.gender, t2.race, t2.case_number from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t1.subject_statuses = 'deceased' | Question: from the cases where the subject were deceased, list the subject's last name, gender, race and case number. | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects... | from the cases where the subject were deceased, list the subject's last name, gender, race and case number. |
shooting | select cast(sum(t1.subject_weapon = 'vehicle') as real) * 100 / count(t1.case_number) from incidents t1 inner join subjects t2 on t1.case_number = t2.case_number where t2.gender = 'f' | Question: what is the percentage of subject who are female used the vehicle as weapon? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, ... | what is the percentage of subject who are female used the vehicle as weapon? |
shooting | select cast(sum(t1.subject_weapon = 'knife') as real) * 100 / sum(t1.subject_weapon = 'handgun') from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t1.subject_statuses = 'injured' | Question: from the 'injured' statuses of the subject, what is the ratio of weapons used are knife against handgun? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects ->... | from the 'injured' statuses of the subject, what is the ratio of weapons used are knife against handgun? |
shooting | select case_number from incidents where strftime('%y', date) > '2011' and subject_statuses = 'deceased' | Question: list all cases from the year 2012 in which the subject was deceased | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_name... | list all cases from the year 2012 in which the subject was deceased |
shooting | select cast(sum(race = 'b') as real) * 100 / count(case_number) from officers where gender = 'm' | Question: of all male officers, what percentage are black officers? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_name, first_na... | of all male officers, what percentage are black officers? |
shooting | select count(t1.case_number) from incidents as t1 inner join officers as t2 on t1.case_number = t2.case_number where t1.subject_weapon = 'vehicle' and t2.gender = 'f' | Question: how many incidents in which the subject's weapon was a vehicle were investigated by a female officer? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> ca... | how many incidents in which the subject's weapon was a vehicle were investigated by a female officer? |
shooting | select count(t1.case_number) from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t2.gender = 'f' and t1.subject_statuses = 'deceased' | Question: in how many cases where the subject was a female was the subject's status listed as deceased? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_numbe... | in how many cases where the subject was a female was the subject's status listed as deceased? |
shooting | select count(t1.case_number) from officers as t1 inner join incidents as t2 on t2.case_number = t1.case_number where t1.race = 'b' and t2.date between '2010-01-01' and '2015-12-31' | Question: of the black officers, how many of them investigated cases between the years 2010 and 2015? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number,... | of the black officers, how many of them investigated cases between the years 2010 and 2015? |
shooting | select count(case_number) from incidents where date between '2015-06-01' and '2015-06-30' | Question: how many instances were found in june 2015? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_name, first_name, full_name.... | how many instances were found in june 2015? |
shooting | select count(location) from incidents where subject_weapon = 'handgun' and subject_statuses = 'injured' and date between '2006-01-01' and '2013-12-31' | Question: how many people were injured between 2006 and 2014 as a result of a handgun? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, ... | how many people were injured between 2006 and 2014 as a result of a handgun? |
shooting | select subject_weapon from incidents where subject_statuses = 'deceased' group by subject_weapon order by count(case_number) desc limit 1 | Question: what is the most common type of weapon that causes death? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_name, first_na... | what is the most common type of weapon that causes death? |
shooting | select cast(sum(gender = 'm') as real) / sum(gender = 'f') from officers where race = 'w' | Question: what is the proportion of white males and females in the police force? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_n... | what is the proportion of white males and females in the police force? |
shooting | select sum(race = 'b') - sum(race = 'w') from subjects where gender = 'f' | Question: how many more black female victims than white female victims were discovered? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender,... | how many more black female victims than white female victims were discovered? |
shooting | select cast(sum(subject_statuses = 'deceased') as real) * 100 / count(case_number) from incidents where subject_weapon = 'rifle' | Question: what percentage of deaths were caused by rifles? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race, gender, last_name, first_name, full_... | what percentage of deaths were caused by rifles? |
shooting | select t1.subject_weapon, t2.race, t2.gender from incidents as t1 inner join subjects as t2 on t1.case_number = t2.case_number where t1.case_number = '031347-2015' | Question: which type of weapon was used to attack the victim in the record number 031347-2015? what is the victim's race and gender? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full... | which type of weapon was used to attack the victim in the record number 031347-2015? what is the victim's race and gender? |
shooting | select t1.case_number, t3.race, t3.gender from incidents as t1 inner join officers as t2 on t1.case_number = t2.case_number inner join subjects as t3 on t1.case_number = t3.case_number where t2.first_name = 'fredirick' and t2.last_name = 'ruben' | Question: which near-death incident did a policeman by the name of ruben fredirick look into? what is the victim in this incident's race and gender? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, ... | which near-death incident did a policeman by the name of ruben fredirick look into? what is the victim in this incident's race and gender? |
shooting | select cast(sum(t2.gender = 'm') as real) * 100 / count(t1.case_number) from incidents t1 inner join officers t2 on t1.case_number = t2.case_number where t1.subject_statuses = 'injured' | Question: what proportion of male police officers looked into events where people were injured? | Tables: incidents -> case_number, date, location, subject_statuses, subject_weapon, subjects, subject_count, officers. officers -> case_number, race, gender, last_name, first_name, full_name. subjects -> case_number, race,... | what proportion of male police officers looked into events where people were injured? |
genes | select t1.chromosome from genes as t1 inner join classification as t2 on t1.geneid = t2.geneid where t2.localization = 'plasma membrane' | Question: for the genes that are located in the plasma membrane, please list their number of chromosomes. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: ... | for the genes that are located in the plasma membrane, please list their number of chromosomes. |
genes | select count(t1.geneid) from genes as t1 inner join classification as t2 on t1.geneid = t2.geneid where t2.localization = 'nucleus' and t1.essential = 'non-essential' | Question: how many non-essential genes are located in the nucleus? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: Genes.GeneID = Classification.GeneID, I... | how many non-essential genes are located in the nucleus? |
genes | select count(t1.geneid) from genes as t1 inner join classification as t2 on t1.geneid = t2.geneid where t2.localization = 'vacuole' and t1.phenotype = 'nucleic acid metabolism defects' | Question: among the genes with nucleic acid metabolism defects, how many of them can be found in the vacuole? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joi... | among the genes with nucleic acid metabolism defects, how many of them can be found in the vacuole? |
genes | select t2.localization from genes as t1 inner join classification as t2 on t1.geneid = t2.geneid order by t1.chromosome desc limit 1 | Question: please list the location of the genes that have the most chromosomes. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: Genes.GeneID = Classificat... | please list the location of the genes that have the most chromosomes. |
genes | select t2.expression_corr from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 inner join genes as t3 on t3.geneid = t2.geneid2 where t1.localization = 'nucleus' and t3.localization = 'nucleus' order by t2.expression_corr desc limit 1 | Question: among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expressio... | among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score? |
genes | select t1.function from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 order by t2.expression_corr asc limit 1 | Question: what are the functions of the pair of genes that have the lowest expression correlation score?a | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: ... | what are the functions of the pair of genes that have the lowest expression correlation score?a |
genes | select count(t1.geneid) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t2.expression_corr < 0 and t1.class = 'motorproteins' | Question: among the pairs of genes that are not from the class of motorproteins, how many of them are negatively correlated? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Express... | among the pairs of genes that are not from the class of motorproteins, how many of them are negatively correlated? |
genes | select t2.expression_corr from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.chromosome = 6 or t1.chromosome = 8 order by t2.expression_corr desc limit 1 | Question: for the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes, what is the highest expression correlation score? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1... | for the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes, what is the highest expression correlation score? |
genes | select t2.geneid1, t2.geneid2 from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.localization = 'cytoplasm' and t1.chromosome = 7 | Question: please list the motif of the genes that are located in the cytoplasm and have 7 chromosomes. | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: Gen... | please list the motif of the genes that are located in the cytoplasm and have 7 chromosomes. |
genes | select count(t1.geneid) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t1.localization != 'cytoplasm' and t1.function = 'transcription' and t1.essential = 'non-essential' | Question: for the non-essential genes whose functions are transcription, how many of them are not located in the cytoplasm? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expressi... | for the non-essential genes whose functions are transcription, how many of them are not located in the cytoplasm? |
genes | select count(t2.geneid2) from genes as t1 inner join interactions as t2 on t1.geneid = t2.geneid1 where t2.expression_corr > 0 and t1.essential = 'non-essential' | Question: how many pairs of positively correlated genes are both non-essential? | Tables: Classification -> GeneID, Localization. Genes -> GeneID, Essential, Class, Complex, Phenotype, Motif, Chromosome, Function, Localization. Interactions -> GeneID1, GeneID2, Type, Expression_Corr. | Joins: Genes.GeneID = Classificat... | how many pairs of positively correlated genes are both non-essential? |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.