Question: What are the title and director of the films without any schedule?

SELECT title ,  directed_by FROM film WHERE film_id NOT IN (SELECT film_id FROM schedule)

What are the title and director of the films without any schedule ?

O O O B-COLUMN O B-COLUMN O O B-TABLE O O B-TABLE O


Question: Show the id and the product type for all products, order by product name.

SELECT product_id ,  product_type_code FROM Products ORDER BY product_name

Show the i d and the product type for all products , order by product name .

O O O O O O B-COLUMN B-COLUMN O O B-TABLE O O O B-COLUMN I-COLUMN O


Question: List the product reviewed with 1 star on March 14, 2016 from Newton, Massachusetts.

SELECT T2.Product FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T1.city = 'Newton' AND T1.state_abbrev = 'MA' AND T2.Date = '2016-03-14' AND T2.Stars = 1

List the product reviewed with 1 star on March 14 , 2016 from Newton , Massachusetts .

O O B-COLUMN B-TABLE O B-VALUE B-COLUMN O O O O O O B-VALUE O O O


Question: Find the name of the products that are not using the most frequently-used max page size.

SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)

Find the name of the products that are not using the most frequently - used max page size .

O O O O O B-COLUMN O O O O O O O O O B-COLUMN I-COLUMN I-COLUMN O


Question: How many of the customer addresses are inactive?

SELECT COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T1.status_id = T2.status_id WHERE T2.address_status = 'Inactive'

How many of the customer addresses are inactive ?


Question: Among all movies in the list, calculate the percentage of movies that were never been rated?

SELECT CAST(SUM(CASE WHEN T2.movie_id IS NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.movie_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id

Among all movies in the list , calculate the percentage of movies that were never been rated ?

O O B-TABLE B-COLUMN O O O O O O O O O O O O O O


Question: Please list the names of all the car models whose origin country is the USA.

SELECT DISTINCT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T2.country = T3.origin WHERE T3.country = 'USA'

Please list the names of all the car models whose origin country is the USA .

O O O B-COLUMN O O O O O O B-COLUMN B-COLUMN O O B-VALUE O


Question: What is the full name of the sales person who has the the highest commission percent received per sale?

SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM SalesPerson AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.CommissionPct DESC LIMIT 1

What is the full name of the sales person who has the the highest commission percent received per sale ?

O O O O B-COLUMN O O B-TABLE B-TABLE O O O O O B-COLUMN O O O O O


Question: Please list the names of the top three movies in the number of likes related to the critic made by the user rating the movie.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 3

Please list the names of the top three movies in the number of likes related to the critic made by the user rating the movie .

O O O O O O O O B-TABLE B-COLUMN I-COLUMN O O O O O O B-COLUMN O O O O B-TABLE O B-COLUMN O


Question: What are the titles of the films starred by Russell Close?

SELECT T3.title FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.first_name = 'Russell' AND T2.last_name = 'Close'

What are the titles of the films starred by Russell Close ?

O O O B-COLUMN O O B-TABLE O O B-VALUE B-VALUE O


Question: What is the average price of products with more than fifty units in stock?

SELECT SUM(UnitPrice) / COUNT(UnitPrice) FROM Products WHERE UnitsInStock > 50

What is the average price of products with more than fifty units in stock ?

O O O O B-COLUMN O B-TABLE O O O O B-COLUMN I-COLUMN I-COLUMN O


Question: list the names of the companies with more than 200 sales in the descending order of sales and profits.

SELECT name FROM company WHERE Sales_in_Billion  >  200 ORDER BY Sales_in_Billion ,  Profits_in_Billion DESC

list the names of the companies with more than 200 sales in the descending order of sales and profits .

O O B-COLUMN O O B-TABLE O O O B-VALUE B-COLUMN I-COLUMN O O O O O O O O


Question: Find the names of reviewers who had given higher than 3 star ratings.

SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  >  3

Find the names of reviewers who had given higher than 3 star ratings .

O O B-COLUMN O B-TABLE O O O O O B-VALUE B-COLUMN B-TABLE O


Question: What is the average number of terms served for a current legislator that's famous or impact?

SELECT CAST(COUNT(T2.bioguide) AS REAL) / COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL

What is the average number of terms served for a current legislator that 's famous or impact ?

O O O O O O O O O O B-TABLE O O O O O O O


Question: List the names of phones that are not on any market.

SELECT Name FROM phone WHERE Phone_id NOT IN (SELECT Phone_ID FROM phone_market)

List the names of phones that are not on any market .

O O B-COLUMN O B-TABLE O O O O O B-TABLE O


Question: What condition forced Mrs. Joye Homenick to seek medical attention in 2017?

SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Joye' AND T1.last = 'Homenick' AND strftime('%Y', T2.START) = '2017'

What condition forced Mrs. Joye Homenick to seek medical attention in 2017 ?

O B-TABLE O O B-VALUE B-VALUE O O O B-COLUMN O B-VALUE O


Question: What is the name of the customer number 93697 with the total order price of 191918.92?

SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_totalprice = 191918.92 AND T1.o_custkey = 93697

What is the name of the customer number 93697 with the total order price of 191918.92 ?

O O O B-COLUMN O O B-TABLE O B-VALUE O O B-COLUMN B-TABLE B-COLUMN O B-VALUE O


Question: List the names of non-US suppliers that have discontinued.

SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.Discontinued = 1 AND T2.Country != 'USA'

List the names of non - US suppliers that have discontinued .

O O O O O O B-VALUE B-TABLE O O B-COLUMN O


Question: List the names of companies by ascending number of sales.

SELECT Name FROM company ORDER BY Sales_in_Billion ASC

List the names of companies by ascending number of sales .


Question: What are the names of students and their respective departments, ordered by number of credits from least to greatest?

SELECT name ,  dept_name FROM student ORDER BY tot_cred

What are the names of students and their respective departments , ordered by number of credits from least to greatest ?

O O O B-COLUMN O B-TABLE O O O B-COLUMN O O O O O O O O O O O


Question: Count the number of papers Stanford University had between 2000 and 2009.

SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  >=  2000 AND T1.year  <=  2009 AND T3.name LIKE "Stanford University"

Count the number of papers Stanford University had between 2000 and 2009 .

O O B-COLUMN O B-TABLE B-COLUMN I-COLUMN O O B-VALUE O B-VALUE O


Question: Please list the top 3 house-manufactured products with the highest average rating.

SELECT T2.Name FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.MakeFlag = 1 GROUP BY T2.Name ORDER BY SUM(T1.Rating) DESC LIMIT 1

Please list the top 3 house - manufactured products with the highest average rating .

O O O O O O O O B-TABLE O O O O B-COLUMN O


Question: How many different collections are related to the one named 'Best'?

SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID  =  T2.Collection_ID WHERE T2.Collection_Name = "Best";

How many different collections are related to the one named ' Best ' ?

O O B-COLUMN B-TABLE B-COLUMN O O O O O O B-COLUMN O O


Question: In Harvard University, which year recorded the highest number of first-time, full-time, degree-seeking students in the cohort being tracked, minus any exclusions?

SELECT T2.year FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Harvard University' GROUP BY T2.year ORDER BY SUM(T2.grad_cohort) DESC LIMIT 1

In Harvard University , which year recorded the highest number of first - time , full - time , degree - seeking students in the cohort being tracked , minus any exclusions ?

O B-VALUE I-VALUE O O B-COLUMN O O O O O O O O O O O O O O O O O O O B-COLUMN O O O O O O O


Question: What is the id of the instructor who advises of all students from History department?

SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  'History'

What is the i d of the instructor who advises of all students from History department ?

O O O B-COLUMN I-COLUMN O O O O B-TABLE I-TABLE O B-TABLE O B-VALUE B-COLUMN O


Question: How many female representatives served in the state of California for at least 10 years?

SELECT SUM(T3.result) FROM ( SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.`end`) AS int) - CAST(strftime('%Y', T2.start) AS int)) > 10 THEN 1 ELSE 0 END AS result FROM current AS T1 INNER JOIN "current-terms" AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' AND T2.state = 'CA' AND T2.type = 'rep' ) AS T3

How many female representatives served in the state of California for at least 10 years ?

O O O O O O O B-COLUMN B-VALUE O O O O B-VALUE O O


Question: Find the names and publication dates of all catalogs that have catalog level number greater than 5.

SELECT t1.catalog_name ,  t1.date_of_publication FROM catalogs AS t1 JOIN catalog_structure AS t2 ON t1.catalog_id  =  t2.catalog_id WHERE catalog_level_number  >  5

Find the names and publication dates of all catalogs that have catalog level number greater than 5 .

O O O O B-COLUMN O O O B-TABLE B-TABLE O B-COLUMN B-COLUMN I-COLUMN O O B-VALUE O


Question: Which types of questions have 3 or more questions? Return the questions type code.

SELECT Type_of_Question_Code FROM Questions GROUP BY Type_of_Question_Code HAVING count(*)  >=  3

Which types of questions have 3 or more questions ? Return the questions type code .

O B-COLUMN I-COLUMN I-COLUMN O B-VALUE O O O O O O B-TABLE O O O


Question: How many employees sold over 20,000 quantities of "Touring-2000 Blue, 50"?

SELECT COUNT(*) FROM ( SELECT SUM(Quantity) FROM Sales WHERE ProductID IN ( SELECT ProductID FROM Products WHERE Name = 'Touring-2000 Blue, 50' ) GROUP BY Quantity, SalesPersonID HAVING SUM(Quantity) > 20000 )

How many employees sold over 20,000 quantities of " Touring-2000 Blue , 50 " ?

O O O O O B-VALUE B-COLUMN O O B-VALUE I-VALUE I-VALUE I-VALUE O O


Question: How many players were born before 10/16/1975, and have a bowling skill of less than 3?

SELECT COUNT(*) FROM Player WHERE DOB < '1975-10-16' AND Bowling_skill < 3

How many players were born before 10/16/1975 , and have a bowling skill of less than 3 ?

O O B-TABLE O O O O O O O O B-COLUMN I-COLUMN O O O B-VALUE O


Question: Which was the dominant hand for the goaltender who played 32 games for QUN in 1973? Give the full name.

SELECT T2.shootCatch, T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID AND T1.year = 1973 WHERE T1.tmID = 'QUN' AND T1.GP = 32

Which was the dominant hand for the goaltender who played 32 games for QUN in 1973 ? Give the full name .

O B-TABLE I-TABLE O O O O O O B-COLUMN B-VALUE B-TABLE O B-VALUE O B-VALUE O O O O B-COLUMN O


Question: What are the full names and department ids for the lowest paid employees across all departments.

SELECT first_name ,  last_name ,  department_id FROM employees WHERE salary IN (SELECT MIN(salary) FROM employees GROUP BY department_id)

What are the full names and department ids for the lowest paid employees across all departments .

O O O O O O B-COLUMN I-COLUMN O O O O B-TABLE O O O O


Question: How many matches were held in 2011?

SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2011%'


Question: Find the number of students whose age is older than the average age for each gender.

SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex

Find the number of students whose age is older than the average age for each gender .

O O O O B-TABLE O B-COLUMN O O O O O O O O O O


Question: What is the location of the plane that was flown by the pilot with the lowest age?

SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T1.age  =  (SELECT min(age) FROM pilotskills)

What is the location of the plane that was flown by the pilot with the lowest age ?

O O O B-COLUMN O O B-COLUMN O O O O O B-TABLE O O O B-COLUMN O


Question: Which product did Cruz & Sons Co. order on 2003/3/3?

SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03'

Which product did Cruz & Sons Co. order on 2003/3/3 ?

O B-TABLE O B-VALUE I-VALUE I-VALUE I-VALUE B-TABLE B-COLUMN B-VALUE O


Question: How many ships are there?


Question: What are the numbers of all flights that can cover a distance of more than 2000?

SELECT flno FROM Flight WHERE distance  >  2000

What are the numbers of all flights that can cover a distance of more than 2000 ?

O O O O O O B-TABLE O O O O B-COLUMN O O O B-VALUE O


Question: What is the ship with the largest amount of tonnage called?

SELECT Name FROM ship ORDER BY Tonnage DESC LIMIT 1

What is the ship with the largest amount of tonnage called ?


Question: What is the name and address of the department with the most students?

SELECT T2.dept_name ,  T2.dept_address FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1

What is the name and address of the department with the most students ?

O O O O O B-COLUMN O O B-COLUMN O O O B-TABLE O


Question: Show the locations shared by shops with open year later than 2012 and shops with open year before 2008.

SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008

Show the locations shared by shops with open year later than 2012 and shops with open year before 2008 .

O O B-COLUMN O O B-TABLE O B-COLUMN I-COLUMN O O B-VALUE O O O O O O B-VALUE O


Question: Find the names of all the catalog entries.

SELECT distinct(catalog_entry_name) FROM catalog_contents

Find the names of all the catalog entries .


Question: What are the name and assets of each company, sorted in ascending order of company name?

SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC

What are the name and assets of each company , sorted in ascending order of company name ?

O O O O O B-COLUMN I-COLUMN O O O O O O O O B-TABLE B-COLUMN O


Question: How many mothers have taken immunization during prenatal visit?

SELECT COUNT(DISTINCT T2.PATIENT) FROM encounters AS T1 INNER JOIN immunizations AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.REASONDESCRIPTION = 'Normal pregnancy' AND T1.DATE = T2.DATE

How many mothers have taken immunization during prenatal visit ?


Question: Show id, first and last names for all customers with at least two cards.

SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2

Show i d , first and last names for all customers with at least two cards .


Question: Find the buildings which have rooms with capacity more than 50.

SELECT DISTINCT building FROM classroom WHERE capacity  >  50

Find the buildings which have rooms with capacity more than 50 .

O O B-COLUMN O O O O B-COLUMN O O B-VALUE O


Question: How long did Elly Koss have to take Acetaminophen 160 MG?

SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND last = 'Koss' AND T2.DESCRIPTION = 'Acetaminophen 160 MG'

How long did Elly Koss have to take Acetaminophen 160 MG ?

O O O B-VALUE B-VALUE O B-COLUMN O B-VALUE I-VALUE I-VALUE O


Question: Tell the number of reviews given by James House.

SELECT COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'James' AND T1.Last = 'House'

Tell the number of reviews given by James House .

O O O B-TABLE I-TABLE O O B-VALUE B-VALUE O


Question: Find the names of all wines produced in 2008.

SELECT Name FROM WINE WHERE YEAR  =  "2008"

Find the names of all wines produced in 2008 .


Question: Name the foreign name of the card that has abzan watermark? List out the type of this card.

SELECT DISTINCT T1.name, T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'abzan'

Name the foreign name of the card that has abzan watermark ? List out the type of this card .

B-COLUMN O B-TABLE O O O B-TABLE O O B-VALUE B-COLUMN O O O O B-COLUMN O O O O


Question: Show the names of people that are on affirmative side of debates with number of audience bigger than 200.

SELECT T3.Name FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Affirmative  =  T3.People_ID WHERE T2.Num_of_Audience  >  200

Show the names of people that are on affirmative side of debates with number of audience bigger than 200 .

O O B-COLUMN O B-TABLE O O O B-COLUMN O O B-TABLE O B-COLUMN I-COLUMN I-COLUMN O O B-VALUE O


Question: For each classroom, show the classroom number and find how many students are using it.

SELECT classroom ,  count(*) FROM list GROUP BY classroom

For each classroom , show the classroom number and find how many students are using it .

O O O O O O B-COLUMN O O O O O O O O B-TABLE O


Question: display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara.

SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara") AND first_name != "Clara"

display the employee name ( first name and last name ) and hire date for all employees in the same department as Clara excluding Clara .

O O O O O B-COLUMN I-COLUMN O B-COLUMN I-COLUMN O O B-COLUMN I-COLUMN O O B-TABLE O O O B-COLUMN O O O B-COLUMN O


Question: What are the details for the staff member with id 100.

SELECT staff_details FROM Staff WHERE staff_id  =  100

What are the details for the staff member with i d 100 .

O O O B-COLUMN O O B-TABLE O O O O B-VALUE O


Question: How many universities have a campus fee higher than average?

SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)

How many universities have a campus fee higher than average ?


Question: What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036.

SELECT MAX(T1.`Discount Applied`) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Colorado' AND T2.`Land Area` = 111039036

What is the highest discount applied by the store located in a city of the state of Colorado whose land area is 111039036 .

O O O O B-COLUMN I-COLUMN O O B-COLUMN B-TABLE I-TABLE O O O O B-COLUMN O B-VALUE O B-COLUMN I-COLUMN O B-VALUE O


Question: How many Thai restaurants can be found in San Pablo Ave, Albany?

SELECT COUNT(T1.id_restaurant) FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.food_type = 'thai' AND T1.city = 'albany' AND T2.street_name = 'san pablo ave'

How many Thai restaurants can be found in San Pablo Ave , Albany ?

O O B-VALUE B-COLUMN O O O O B-VALUE I-VALUE I-VALUE O B-VALUE O


Question: How many types of products have Rodrick Heaney bought in total?

SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id WHERE t1.customer_name  =  "Rodrick Heaney"

How many types of products have Rodrick Heaney bought in total ?

O O O O B-COLUMN O B-COLUMN I-COLUMN O O O O


Question: What are the names of documents that do not have any images?

SELECT document_name FROM documents EXCEPT SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code JOIN document_sections_images AS t3 ON t2.section_id  =  t3.section_id

What are the names of documents that do not have any images ?


Question: Which members of "Bootup Baltimore" major in "600"? Give me their first names and last names.

SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.major  =  "600"

Which members of " Bootup Baltimore " major in " 600 " ? Give me their first names and last names .

O B-TABLE I-TABLE O B-COLUMN I-COLUMN O B-COLUMN O O B-COLUMN O O O O O O B-COLUMN O O B-COLUMN O


Question: Which two countries share the second highest mountain? Give the country code.

SELECT T1.Code FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T2.Mountain = ( SELECT Name FROM mountain ORDER BY Height DESC LIMIT 1, 1 )

Which two countries share the second highest mountain ? Give the country code .

O O O O O O B-COLUMN B-TABLE O O O B-COLUMN B-COLUMN O


Question: What is the theme and artist name for the exhibition with a ticket price higher than the average?

SELECT T1.theme ,  T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id  =  T2.artist_id WHERE T1.ticket_price  >  (SELECT avg(ticket_price) FROM exhibition)

What is the theme and artist name for the exhibition with a ticket price higher than the average ?

O O O B-COLUMN O B-TABLE B-COLUMN O O B-TABLE O O B-COLUMN I-COLUMN O O O O O


Question: Which brewery does the most purchased root beer in 2016 belong to?

SELECT T2.BreweryName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.PurchaseDate BETWEEN '2016-01-01' AND '2016-12-31' GROUP BY T2.BrandID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

Which brewery does the most purchased root beer in 2016 belong to ?

O B-COLUMN O O O B-COLUMN B-TABLE I-TABLE O O O O O


Question: Under which categories is Yelp_Business no. 1?

SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T2.business_id = 1

Under which categories is Yelp_Business no . 1 ?


Question: What is the description of the marketing region China?

SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name  =  "China"

What is the description of the marketing region China ?


Question: How many users who have received a low cool vote have also received at least 1 low cool vote for some of their reviews?

SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id WHERE T1.user_votes_cool = 'Low' AND T2.review_votes_cool = 'Low'

How many users who have received a low cool vote have also received at least 1 low cool vote for some of their reviews ?

O O B-TABLE O O O O O O O O O O O O O B-VALUE O O O O O O B-TABLE O


Question: Which nationality has the most hosts?

SELECT Nationality FROM HOST GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1


Question: Find the first and last name of all the teachers that teach EVELINA BROMLEY.

SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"

Find the first and last name of all the teachers that teach EVELINA BROMLEY .

O O B-COLUMN O B-TABLE B-COLUMN O O O B-TABLE O O B-COLUMN B-COLUMN O


Question: What is the store id of the store located in the most populous county?

SELECT CASE WHEN MAX(Population) THEN StoreID END FROM `Store Locations`

What is the store i d of the store located in the most populous county ?

O O O B-COLUMN I-COLUMN I-COLUMN O O B-TABLE I-TABLE I-TABLE O O B-COLUMN O O


Question: Find the number of students who are older than 18 and do not have allergy to either food or animal.

SELECT count(*) FROM Student WHERE age  >  18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "food" OR T2.allergytype  =  "animal")

Find the number of students who are older than 18 and do not have allergy to either food or animal .

O O O O B-COLUMN O B-COLUMN O O B-VALUE O O O O B-COLUMN O O B-COLUMN O B-COLUMN O


Question: How many clients who live in Kansas City provided a 1-star review?

SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Kansas City' AND T1.Stars = 1

How many clients who live in Kansas City provided a 1 - star review ?

O O O O O O B-VALUE B-COLUMN O O B-VALUE O B-COLUMN B-TABLE O


Question: Please list the businesses along with their numbers that have their accounts located in Duvall.

SELECT T2.BusinessEntityID FROM Address AS T1 INNER JOIN BusinessEntityAddress AS T2 ON T1.AddressID = T2.AddressID WHERE T1.City = 'Duvall'

Please list the businesses along with their numbers that have their accounts located in Duvall .

O O O B-COLUMN O O O O O O O O O O B-VALUE O


Question: What are the customer ids for customers who do not have an account?

SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts

What are the customer ids for customers who do not have an account ?

O O O B-COLUMN I-COLUMN O B-TABLE O O O O O B-TABLE O


Question: What are the name, height and prominence of mountains which do not belong to the range 'Aberdare Range'?

SELECT name ,  height ,  prominence FROM mountain WHERE range != 'Aberdare Range'

What are the name , height and prominence of mountains which do not belong to the range ' Aberdare Range ' ?

O O O B-COLUMN O B-COLUMN O B-COLUMN O B-TABLE O O O O O O O O B-VALUE B-COLUMN O O


Question: List the first name and last name of customers have the amount of outstanding between 1000 and 3000.

SELECT first_name ,  last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;

List the first name and last name of customers have the amount of outstanding between 1000 and 3000 .

O O B-COLUMN I-COLUMN O B-COLUMN I-COLUMN O B-TABLE O O B-COLUMN I-COLUMN I-COLUMN O B-VALUE O B-VALUE O


Question: Give the type and start date of the term of the legislator born on November 26, 1727.

SELECT T2.type, T2.start FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = '1727-11-26'

Give the type and start date of the term of the legislator born on November 26 , 1727 .

O O B-COLUMN O B-COLUMN O O O O O O O O O O O O O O


Question: What are the date stamps and property names for each item of property history, ordered by date stamp?

SELECT T1.datestamp ,  T2.property_name FROM User_Property_History AS T1 JOIN Properties AS T2 ON T1.property_id  =  T2.property_id ORDER BY datestamp;

What are the date stamps and property names for each item of property history , ordered by date stamp ?

O O O O O O B-COLUMN B-COLUMN O O O O B-TABLE B-TABLE O O O B-COLUMN I-COLUMN O


Question: Of all the teams coached by the winner of the 1994 NBA Coach of the Year award, which team has lost the most times playing at home?

SELECT T3.tmID FROM awards_coaches AS T1 INNER JOIN coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T1.year = 1994 AND T1.award = 'NBA Coach of the Year' GROUP BY T3.tmID ORDER BY SUM(T3.homeLost) DESC LIMIT 1

Of all the teams coached by the winner of the 1994 NBA Coach of the Year award , which team has lost the most times playing at home ?

O O O B-TABLE B-COLUMN O O O O O B-VALUE B-VALUE I-VALUE I-VALUE I-VALUE B-COLUMN B-COLUMN O O O O B-COLUMN O O O O O O O


Question: Among the transactions, what percentage is done by using a visa card?

SELECT CAST(COUNT(CASE WHEN CreditCardType = 'Visa' THEN TransactionID ELSE NULL END) AS REAL) * 100 / COUNT(TransactionID) FROM `transaction`

Among the transactions , what percentage is done by using a visa card ?


Question: What is the difference in the average GPA of students who took the hardest and easiest courses?

SELECT AVG(T1.gpa) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.diff IN (2, 1) GROUP BY T3.diff

What is the difference in the average GPA of students who took the hardest and easiest courses ?

O O O O O O O B-COLUMN O B-TABLE O O O O O O B-TABLE O


Question: What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12?

SELECT CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)` FROM frpm ORDER BY `Enrollment (K-12)` DESC LIMIT 9, 2

What is the eligible free rate of the 10th and 11th schools with the highest enrolment for students in grades 1 through 12 ?

O O O O O O O O O O O O O O O B-COLUMN O O O O O O O O


Question: What is the average price of the bikes made of material 'Carbon CC'?

SELECT avg(price) FROM bike WHERE material  =  'Carbon CC'

What is the average price of the bikes made of material ' Carbon CC ' ?

O O O O B-COLUMN O O B-TABLE O O B-COLUMN O B-VALUE I-VALUE O O


Question: How many customers are still active?

SELECT COUNT(customer_id) FROM customer WHERE active = 1


Question: How much is the popularity of the movie that has the highest popularity between 1920 to 1929 and when did the movie received its first rating score of 1 from the users who were a paying subscriber when they rated the movie ?

SELECT MAX(T2.movie_popularity), MIN(T1.rating_timestamp_utc) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1920 AND 1929 AND T1.rating_score = 1 AND T1.user_has_payment_method = 1

O O O O B-COLUMN O O B-COLUMN O O O O O O B-VALUE O B-VALUE O O O O B-TABLE O O O B-TABLE B-COLUMN O B-VALUE O O O O O O O O O O O O O O


Question: Was the patient with the number 57266's uric acid within a normal range?

SELECT CASE WHEN (T1.SEX = 'F' AND T2.UA > 6.5) OR (T1.SEX = 'M' AND T2.UA > 8.0) THEN true ELSE false END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID = 57266

Was the patient with the number 57266 's uric acid within a normal range ?

O O B-TABLE O O O B-VALUE O O B-COLUMN O B-COLUMN O O O


Question: Find the names of schools that have some players in the mid position but not in the goalie position.

SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie'

Find the names of schools that have some players in the mid position but not in the goalie position .

O O B-COLUMN O O O O O O O O B-VALUE O O O O O B-VALUE O O


Question: Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200.

SELECT Country FROM mountain WHERE Height  >  5600 INTERSECT SELECT Country FROM mountain WHERE Height  <  5200

Show the countries that have mountains with height more than 5600 stories and mountains with height less than 5200 .

O O B-COLUMN O O B-TABLE O O O O B-VALUE O O O O B-COLUMN O O B-VALUE O


Question: What are the names of authors who have exactly 1 paper?

SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  =  1

What are the names of authors who have exactly 1 paper ?

O O O B-COLUMN O B-TABLE O O O B-VALUE O O


Question: How many SMC's students that absent for 7 months?

SELECT COUNT(T1.name) FROM enrolled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name WHERE T1.school = 'smc' AND T2.month = 7

How many SMC 's students that absent for 7 months ?

O O B-VALUE O O O O O B-VALUE B-COLUMN O


Question: Return the average enrollment of universities founded before 1850.

SELECT avg(enrollment) FROM university WHERE founded  <  1850

Return the average enrollment of universities founded before 1850 .

O O O B-COLUMN O B-TABLE B-COLUMN O B-VALUE O


Question: Among the cities belonging to the country named Arroyo, calculate the percentage of increase in the population in these cities from 2010 to 2020.

SELECT CAST((SUM(T2.population_2020) - SUM(T2.population_2010)) AS REAL) * 100 / SUM(T2.population_2010) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arroyo'

Among the cities belonging to the country named Arroyo , calculate the percentage of increase in the population in these cities from 2010 to 2020 .

O O B-COLUMN O O O B-TABLE O B-VALUE O O O O O O O O B-COLUMN O O O O O O O O


Question: What is the maximum dew point in Fahrenheit degree on 7/15/2014 in the area with a zip code of 94301?

SELECT DISTINCT CASE WHEN date = '7/15/2014' AND zip_code = 94301 THEN max_dew_point_f END FROM weather

What is the maximum dew point in Fahrenheit degree on 7/15/2014 in the area with a zip code of 94301 ?

O O B-TABLE B-COLUMN I-COLUMN I-COLUMN O O O O B-VALUE O O O O O B-COLUMN I-COLUMN O B-VALUE O


Question: Return complaint status codes have more than 3 corresponding complaints?

SELECT complaint_status_code FROM complaints GROUP BY complaint_status_code HAVING count(*)  >  3

Return complaint status codes have more than 3 corresponding complaints ?

O B-COLUMN I-COLUMN I-COLUMN O O O B-VALUE O B-TABLE O


Question: When did the United States of America attained it's Independence?

SELECT T1.Independence FROM politics AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'United States'

When did the United States of America attained it 's Independence ?

O O O B-VALUE I-VALUE O O O O O B-COLUMN O


Question: What is the temperature of "Shanghai" city in January?

SELECT T2.Jan FROM city AS T1 JOIN temperature AS T2 ON T1.city_id = T2.city_id WHERE T1.city = "Shanghai"

What is the temperature of " Shanghai " city in January ?

O O O B-TABLE O O B-COLUMN O B-COLUMN O B-COLUMN O


Question: How many overs were there in each innings of match ID "336011"?

SELECT SUM(CASE WHEN Innings_No = 1 THEN 1 ELSE 0 END) AS IN1 , SUM(CASE WHEN Innings_No = 2 THEN 1 ELSE 0 END) AS IN2 FROM Ball_by_Ball WHERE Match_Id = 336011

How many overs were there in each innings of match ID " 336011 " ?

O O O O O O O B-COLUMN O B-COLUMN I-COLUMN O B-VALUE O O


Question: Which winery is the wine that has the highest score from?

SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1

Which winery is the wine that has the highest score from ?

O B-COLUMN O O B-TABLE O O O O B-COLUMN O O


Question: List out full name and email of employees who are working in Paris?

SELECT T1.firstName, T1.lastName, T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Paris'

List out full name and email of employees who are working in Paris ?

O O O B-COLUMN O B-COLUMN O B-TABLE O O O O B-VALUE O


Question: How many seasons did Pune Warriors participate in?

SELECT COUNT(T.Season_Year) FROM ( SELECT T4.Season_Year FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Pune Warriors' GROUP BY T4.Season_Year ) T

How many seasons did Pune Warriors participate in ?

O O B-TABLE B-COLUMN B-VALUE I-VALUE O O O


Question: Who is the youngest player who is still living. State the given name and date of birth.

SELECT nameGiven , nameGiven , birthYear, birthMon, birthDay FROM Master WHERE deathYear IS NULL ORDER BY birthYear DESC, birthMon DESC, birthday DESC LIMIT 1

Who is the youngest player who is still living . State the given name and date of birth .

O O O O O O O O O O O O B-COLUMN O O B-TABLE O B-COLUMN O


Question: How many no.9 items from store no.11 were sold on 2012/12/7?

SELECT units FROM sales_in_weather WHERE `date` = '2012-12-07' AND store_nbr = 11 AND item_nbr = 9

How many no.9 items from store no.11 were sold on 2012/12/7 ?

O O O B-COLUMN O B-COLUMN O O O O B-VALUE O


Question: In how many different states are banks located?

In how many different states are banks located ?


Question: Which membership card has more than 5 members?

SELECT Membership_card FROM member GROUP BY Membership_card HAVING count(*)  >  5

Which membership card has more than 5 members ?

O B-COLUMN I-COLUMN O O O B-VALUE B-TABLE O


Question: What is the unsaturated fat content in the recipe "Raspberry Chiffon Pie"?

SELECT T2.total_fat - T2.sat_fat FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie'

What is the unsaturated fat content in the recipe " Raspberry Chiffon Pie " ?

O O O O B-COLUMN O O O B-TABLE O B-VALUE I-VALUE I-VALUE O O


Question: What are the addresses of the course authors or tutors with personal name "Cathrine"

SELECT address_line_1 FROM Course_Authors_and_Tutors WHERE personal_name	 =  "Cathrine"

What are the addresses of the course authors or tutors with personal name " Cathrine "

O O O B-COLUMN O O B-TABLE I-TABLE I-TABLE I-TABLE O B-COLUMN I-COLUMN O B-COLUMN O


Question: Among the times Mary Smith had rented a movie, how many of them happened in June, 2005?

SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' AND STRFTIME('%Y',T1.payment_date) = '2005' AND STRFTIME('%Y', T1.payment_date) = '6'

Among the times Mary Smith had rented a movie , how many of them happened in June , 2005 ?

O O O B-VALUE B-VALUE O O O O O O O O O O O O O B-VALUE O


Question: What is the number of NBA titles that Ray Allen has won throughout his NBA career?

SELECT COUNT(T1.playerID) FROM player_allstar AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE first_name = 'Ray' AND last_name = 'Allen'

What is the number of NBA titles that Ray Allen has won throughout his NBA career ?

O O O O O O O O B-VALUE B-VALUE O O O O O O O


Question: Find the name, city, and country of the airport that has the lowest altitude.

SELECT name ,  city ,  country FROM airports ORDER BY elevation LIMIT 1

Find the name , city , and country of the airport that has the lowest altitude .

O O B-COLUMN O B-COLUMN O O B-COLUMN O O B-TABLE O O O O O O


Question: What is the average number of inspections did risk level 3 taverns have?

SELECT CAST(COUNT(T2.inspection_id) AS REAL) / COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 3 AND T1.facility_type = 'TAVERN'

What is the average number of inspections did risk level 3 taverns have ?

O O O O O O B-TABLE B-COLUMN B-COLUMN I-COLUMN B-VALUE B-VALUE O O


Question: List all the product names and categories of the highest reorder level.

SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID ORDER BY T2.ReorderLevel DESC LIMIT 1

List all the product names and categories of the highest reorder level .

O O O B-TABLE B-COLUMN O B-COLUMN O O O B-COLUMN I-COLUMN O


Question: Find the number of different product types.

SELECT count(DISTINCT product_type_code) FROM products

Find the number of different product types .


Question: What is the region with the most customers?

SELECT T.r_name FROM ( SELECT T3.r_name, COUNT(T2.c_custkey) AS num FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey GROUP BY T3.r_name ) AS T ORDER BY T.num DESC LIMIT 1

What is the region with the most customers ?


Question: List all shipment ids for the planet Mars and under the management of Turanga Leela.

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" AND T3.Name = "Turanga Leela";

List all shipment ids for the planet Mars and under the management of Turanga Leela .

O O B-TABLE B-COLUMN O O B-COLUMN B-COLUMN O O O B-COLUMN O B-COLUMN I-COLUMN O


Question: Who is the sales agent of the customer who has made the highest payment? Include the full names of employee and his/her supervisor.

SELECT T1.firstName, T1.lastName, T1.reportsTo FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber ORDER BY T3.amount DESC LIMIT 1

Who is the sales agent of the customer who has made the highest payment ? Include the full names of employee and his / her supervisor .

O O O O O O O B-TABLE O O O O O B-COLUMN O O O O B-COLUMN O B-TABLE O O O O O O


Question: Find the distinct names of wines produced before the year of 2000 or after the year of 2010.

SELECT DISTINCT Name FROM WINE WHERE YEAR  <  2000 OR YEAR  >  2010

Find the distinct names of wines produced before the year of 2000 or after the year of 2010 .

O O O B-COLUMN O B-TABLE O O O B-COLUMN O B-VALUE O O O O O B-VALUE O


Question: How many payments were made throughout the month of August 2005?

SELECT SUM(amount) FROM payment WHERE payment_date LIKE '2005-08%'

How many payments were made throughout the month of August 2005 ?

O O B-TABLE O O O O B-COLUMN O O B-VALUE O


Question: Please list the directions in which the trains with at least one empty-loaded car run.

SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.load_num = 0

Please list the directions in which the trains with at least one empty - loaded car run .

O O O B-COLUMN O O O B-TABLE O O O O O O O B-TABLE O O


Question: What is the description of the restaurant type Sandwich?

SELECT ResTypeDescription FROM Restaurant_Type WHERE ResTypeName = "Sandwich";

What is the description of the restaurant type Sandwich ?

O O B-COLUMN I-COLUMN O O B-TABLE I-TABLE B-COLUMN O


Question: Show the outcome code of mailshots along with the number of mailshots in each outcome code.

SELECT outcome_code ,  count(*) FROM mailshot_customers GROUP BY outcome_code

Show the outcome code of mailshots along with the number of mailshots in each outcome code .

O O B-COLUMN I-COLUMN O O O O O O O B-TABLE O O O O O


Question: Show the years, book titles, and publishers for all books, in descending order by year.

SELECT YEAR ,  book_title ,  publisher FROM book_club ORDER BY YEAR DESC

Show the years , book titles , and publishers for all books , in descending order by year .

O O O O B-TABLE B-COLUMN O O B-COLUMN O O O O O O O O B-COLUMN O


Question: Who is the founders of companies whose first letter is S?

SELECT founder FROM manufacturers WHERE name LIKE 'S%'

Who is the founders of companies whose first letter is S ?


Question: How many business have low check-in on Sunday at 10AM?

SELECT COUNT(T2.business_id) FROM Days AS T1 INNER JOIN Checkins AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday' AND T2.label_time_10 = 'Low'

How many business have low check - in on Sunday at 10AM ?

O O B-COLUMN O B-VALUE B-TABLE I-TABLE I-TABLE O B-TABLE O O O


Question: Among the coaches who was never a player, who has highest percentage of game winning? Provide the given name of the coach and team he coached.

SELECT T2.nameGiven, T3.name FROM Coaches AS T1 INNER JOIN Master AS T2 ON T2.coachID = T1.coachID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.coachID IS NOT NULL ORDER BY CAST(T1.w AS REAL) / T1.g DESC LIMIT 1

Among the coaches who was never a player , who has highest percentage of game winning ? Provide the given name of the coach and team he coached .

O O B-TABLE O O O O O O O O O O O O O O O O B-COLUMN B-COLUMN O O O O B-TABLE O B-COLUMN O


Question: What are the names of all the people who worked on episode 19 of season 9?

SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.episode = 19 AND T1.season = 9

What are the names of all the people who worked on episode 19 of season 9 ?

O O O B-COLUMN O O O O O O O B-COLUMN B-VALUE O B-COLUMN B-VALUE O


Question: List the height and net worth of actors starred in Three Men and a Little Lady.

SELECT T3.`Height (Inches)`, T3.NetWorth FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Three Men and a Little Lady'

List the height and net worth of actors starred in Three Men and a Little Lady .

O O B-COLUMN I-COLUMN B-COLUMN I-COLUMN O B-TABLE O O B-VALUE I-VALUE I-VALUE I-VALUE B-COLUMN B-VALUE O


Question: In the most populated ward, how many incidents of domestic violence were reported in a bar or tavern?

SELECT COUNT(T2.report_no) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.domestic = 'TRUE' AND T2.location_description = 'BAR OR TAVERN' ORDER BY T1.Population DESC LIMIT 1

In the most populated ward , how many incidents of domestic violence were reported in a bar or tavern ?

O O O B-COLUMN B-TABLE O O O O O B-COLUMN O O B-COLUMN O O B-VALUE I-VALUE I-VALUE O


Question: Which are the years that character Mr. Burns won an award?

SELECT DISTINCT T1.year FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.character = 'Mr. Burns';

Which are the years that character Mr. Burns won an award ?

O O O B-COLUMN O B-COLUMN B-VALUE I-VALUE O O B-TABLE O


Question: List down the ISBN of the books purchased by the customer with an email of fsier3e@ihg.com.

SELECT T1.isbn13 FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.email = 'fsier3e@ihg.com'

List down the ISBN of the books purchased by the customer with an email of fsier3e@ihg.com .

O O O B-COLUMN O O B-TABLE O O O B-TABLE O O B-COLUMN O B-VALUE O


Question: What is the tail number of the flight with air carrier named Iscargo Hf: ICQ and arrival time of 1000 and below?

SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ARR_TIME <= 1000 AND T1.Description = 'Iscargo Hf: ICQ'

What is the tail number of the flight with air carrier named Iscargo Hf : ICQ and arrival time of 1000 and below ?

O O O B-COLUMN I-COLUMN O O O O B-TABLE I-TABLE B-COLUMN B-VALUE I-VALUE I-VALUE I-VALUE O B-COLUMN I-COLUMN O B-VALUE O O O


Question: What is the percentage of loan amount that has been fully paid with no issue.

SELECT (CAST(SUM(CASE WHEN status = 'A' THEN amount ELSE 0 END) AS REAL) * 100) / SUM(amount) FROM loan

What is the percentage of loan amount that has been fully paid with no issue .

O O O O O B-TABLE B-COLUMN B-COLUMN O O O O O O O O


Question: Who is the illustrator that illustrated the least amount of cards? List the format of play of the cards that he/she illustrated.

SELECT T1.artist, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid GROUP BY T1.artist ORDER BY COUNT(T1.id) ASC LIMIT 1

Who is the illustrator that illustrated the least amount of cards ? List the format of play of the cards that he / she illustrated .

O O O O O O O O O O O O B-COLUMN O B-COLUMN O O O O B-TABLE O O O O O O


Question: Find the origins from which more than 1 train starts.

SELECT origin FROM train GROUP BY origin HAVING count(*)  >  1

Find the origins from which more than 1 train starts .

O O B-COLUMN O O O O B-VALUE B-TABLE O O


Question: How many users who created a list in the February of 2016 were eligible for trial when they created the list? Indicate the user id of the user who has the most number of followers in his list in February of 2016.

SELECT T1.list_followers FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id AND T1.list_id = T2.list_id WHERE T2.list_creation_date_utc BETWEEN '2016-02-01' AND '2016-02-29' AND T2.user_eligible_for_trial = 1

How many users who created a list in the February of 2016 were eligible for trial when they created the list ? Indicate the user i d of the user who has the most number of followers in his list in February of 2016 .

O O O O O O B-TABLE O O O O O O B-COLUMN I-COLUMN I-COLUMN O O O O O O O O B-COLUMN I-COLUMN I-COLUMN O O O O O O O O O B-COLUMN O O B-COLUMN O O O O O


Question:
Who authored the paper titled "Testing timed automata
"?

SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Testing timed automata'

Who authored the paper titled " Testing timed automata " ?

O B-TABLE O B-TABLE B-COLUMN O B-VALUE I-VALUE I-VALUE O O O


Question: How many patients with care plan for 'concussion with loss of consciousness' are married?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'M' AND T2.REASONDESCRIPTION = 'Concussion with loss of consciousness'

How many patients with care plan for ' concussion with loss of consciousness ' are married ?

O O B-COLUMN O B-TABLE I-TABLE O O B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O O O O


Question: What is the most populated city of the 12th highest density country?

SELECT T2.Name FROM country AS T1 INNER JOIN city AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY CAST(Population AS REAL) / Area LIMIT 11, 1 ) ORDER BY T2.Population DESC LIMIT 1

What is the most populated city of the 12th highest density country ?

O O O O B-COLUMN B-TABLE O O O O O B-COLUMN O


Question: What are the ids of all reviewers who did not give 4 stars?

SELECT rID FROM Rating EXCEPT SELECT rID FROM Rating WHERE stars  =  4

What are the ids of all reviewers who did not give 4 stars ?

O O O O O O O O B-COLUMN O O B-VALUE B-COLUMN O


Question: What percentage of carcinogenic-type molecules does not contain fluorine?

SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element <> 'f' THEN T2.molecule_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'

What percentage of carcinogenic - type molecules does not contain fluorine ?


Question: Name the youngest player who ever won "Rookie of the Year".

SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' ORDER BY T1.birthDate DESC LIMIT 1

Name the youngest player who ever won " Rookie of the Year " .

B-COLUMN O O B-TABLE O O O O B-VALUE I-VALUE I-VALUE I-VALUE O O


Question: Calculate the percentage of superheroes with blue eyes.

SELECT CAST(COUNT(CASE WHEN T2.colour = 'Blue' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id

Calculate the percentage of superheroes with blue eyes .


Question: What are the distinct secretary votes in the fall election cycle?

SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "Fall"

What are the distinct secretary votes in the fall election cycle ?

O O O O B-COLUMN I-COLUMN O O B-COLUMN B-COLUMN I-COLUMN O


Question: List out the title of Catalan language Wikipedia page that has wikipedia revision page id as 106601.

SELECT title FROM pages WHERE revision = 106601

List out the title of Catalan language Wikipedia page that has wikipedia revision page i d as 106601 .

O O O B-COLUMN O O O O B-TABLE O O O B-COLUMN O O O O B-VALUE O


Question: Which island is city Balikpapan located on? How big is the island?

SELECT T3.Name, T3.Area FROM city AS T1 INNER JOIN locatedOn AS T2 ON T1.Name = T2.City INNER JOIN island AS T3 ON T3.Name = T2.Island WHERE T1.Name = 'Balikpapan'

Which island is city Balikpapan located on ? How big is the island ?

O B-COLUMN O B-COLUMN B-VALUE B-TABLE I-TABLE O O O O O O O


Question: Which country and state does staff with first name as Janessa and last name as Sawayn lived?

SELECT T1.country ,  T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

Which country and state does staff with first name as Janessa and last name as Sawayn lived ?

O B-COLUMN O O O B-TABLE O B-COLUMN I-COLUMN O B-COLUMN O B-COLUMN I-COLUMN O B-COLUMN O O


Question: What is the gender of the majority of Vivo phone users?

SELECT T.gender FROM ( SELECT T2.gender, COUNT(T2.gender) AS num FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'vivo' GROUP BY T2.gender ) AS T ORDER BY T.num DESC LIMIT 1

What is the gender of the majority of Vivo phone users ?

O O O B-COLUMN O O O O B-VALUE B-COLUMN O O


Question: What is the full name of the actor who has the highest number of restricted films?

SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'R' GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1

What is the full name of the actor who has the highest number of restricted films ?

O O O O B-COLUMN O O B-TABLE O O O O B-COLUMN O O B-TABLE O


Question: On which date did some customer buy a good that costs more than 15 dollars?

SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  15

On which date did some customer buy a good that costs more than 15 dollars ?

O O B-COLUMN B-COLUMN O O O O B-TABLE O O O O B-VALUE O O


Question: Which kind of part has the least number of faults? List the part name.

SELECT T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id  =  T2.part_id GROUP BY T1.part_name ORDER BY count(*) ASC LIMIT 1

Which kind of part has the least number of faults ? List the part name .

O O O B-TABLE O O O O O B-TABLE O O O B-COLUMN I-COLUMN O


Question: Give the id, name, phone, and email corresponding to the customer who made the most orders.

SELECT T1.customer_id ,  T2.customer_name ,  T2.customer_phone ,  T2.customer_email FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1

Give the i d , name , phone , and email corresponding to the customer who made the most orders .

O O O O O O O O O O O O O O B-TABLE B-COLUMN O O O O O


Question: When is the highest price of Terracoin?

SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Terracoin' ORDER BY T2.price DESC LIMIT 1

When is the highest price of Terracoin ?


Question: What is the title of the first book that was written by A.J. Ayer?

SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'A.J. Ayer' ORDER BY T1.publication_date ASC LIMIT 1

What is the title of the first book that was written by A.J. Ayer ?

O O O B-COLUMN O O O B-TABLE B-TABLE O O O B-VALUE I-VALUE O


Question: What is the percentage of player who won "All-Defensive First Team" from 1980 - 2000 is from 'NY'.

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T1.birthState = 'NY' AND T2.award = 'All-Defensive First Team' AND T2.year BETWEEN 1980 AND 2000

What is the percentage of player who won " All - Defensive First Team " from 1980 - 2000 is from ' NY ' .

O O O O O B-COLUMN O O O B-VALUE I-VALUE I-VALUE B-COLUMN I-COLUMN O O B-VALUE O B-VALUE O O O B-VALUE O O


Question: Which country produced the most number of hockey players? Identify which year was most of the hockey players are born.

SELECT DISTINCT birthCountry, birthYear FROM Master GROUP BY birthCountry, birthYear ORDER BY COUNT(birthCountry) DESC LIMIT 1

Which country produced the most number of hockey players ? Identify which year was most of the hockey players are born .

O B-COLUMN O O B-TABLE O O O O O O B-COLUMN I-COLUMN O O O O O O O O O


Question: Count the number of regions.


Question: What is the name of the state in which there have been the largest number of complaints with priority 0?

SELECT T2.state FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T1.priority = 0 GROUP BY T2.state ORDER BY COUNT(T2.state) DESC LIMIT 1

What is the name of the state in which there have been the largest number of complaints with priority 0 ?

O O O O O O B-TABLE O O O O O O O O O B-TABLE O B-COLUMN B-VALUE O


Question: For all patient born in 1982, state if their albumin is within normal range.

SELECT CASE WHEN T2.ALB >= 3.5 AND T2.ALB <= 5.5 THEN 'normal' ELSE 'abnormal' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1982'

For all patient born in 1982 , state if their albumin is within normal range .

O B-COLUMN B-TABLE O O B-VALUE O O O O O O O B-VALUE O O


Question: What is the percentage difference of River City sale compare to Frostie?

SELECT CAST((SUM(CASE WHEN T3.BrandName = 'River City' THEN T2.PurchasePrice ELSE 0 END) - SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T3.BrandName = 'Frostie' THEN T2.PurchasePrice ELSE 0 END) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID

What is the percentage difference of River City sale compare to Frostie ?

O O O O O O B-VALUE I-VALUE O O O B-VALUE O


Question: Where is the headquarter of the company founded by James?

SELECT headquarter FROM manufacturers WHERE founder  =  'James'

Where is the headquarter of the company founded by James ?

O O O B-COLUMN O O O B-COLUMN O B-VALUE O


Question: Which summer Olympic have the highest and lowest number of participants?

SELECT ( SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' GROUP BY T1.games_year ORDER BY COUNT(T2.person_id) DESC LIMIT 1 ) AS HIGHEST , ( SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer' GROUP BY T1.games_year ORDER BY COUNT(T2.person_id) LIMIT 1 ) AS LOWEST

Which summer Olympic have the highest and lowest number of participants ?


Question: How many students exist?


Question: What are the names of members and their corresponding parties?

SELECT T1.member_name ,  T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id

What are the names of members and their corresponding parties ?

O B-COLUMN I-COLUMN I-COLUMN O B-TABLE O O O B-TABLE O


Question: Show names for artists without any exhibition.

SELECT name FROM artist WHERE artist_id NOT IN (SELECT artist_id FROM exhibition)

Show names for artists without any exhibition .


Question: Among the clients who did receive a timely response for their complaint, how many of them are from New York?

SELECT COUNT(T1.city) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'No' AND T1.city = 'New York City'

Among the clients who did receive a timely response for their complaint , how many of them are from New York ?

O O B-TABLE O O O O B-COLUMN I-COLUMN O O O O O O O O O O B-VALUE I-VALUE O


Question: Are there any post-production movies in Nederlands?

SELECT DISTINCT CASE WHEN T1.movie_status = 'Post Production' THEN 'YES' ELSE 'NO' END AS YORN FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Nederlands'

Are there any post - production movies in Nederlands ?

O O O B-VALUE I-VALUE I-VALUE B-TABLE B-COLUMN B-VALUE O


Question: What are the main industries of the companies without gas stations and what are the companies?

SELECT company ,  main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)

What are the main industries of the companies without gas stations and what are the companies ?

O O O B-COLUMN I-COLUMN O O B-COLUMN O O B-TABLE I-TABLE O O O B-COLUMN O


Question: Find the top 3 products which have the largest number of problems?

SELECT T2.product_name FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_name ORDER BY count(*) DESC LIMIT 3

Find the top 3 products which have the largest number of problems ?


Question: What are the city addresses of the customers located in the United States of America?

SELECT DISTINCT T2.city FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'United States of America'

What are the city addresses of the customers located in the United States of America ?

O O O B-COLUMN B-TABLE O O O O O O B-VALUE I-VALUE I-VALUE I-VALUE O


Question: What are the document subset names?

SELECT Document_Subset_Name FROM Document_Subsets;


Question: What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers?

SELECT T2.Website FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.NumTstTakr BETWEEN 2000 AND 3000 AND T2.County = 'Los Angeles'

What are the webpages for the Los Angeles County school that has between 2,000 and 3,000 test takers ?

O O O O O O B-VALUE I-VALUE B-COLUMN B-TABLE O O O B-VALUE O B-VALUE B-COLUMN I-COLUMN O


Question: How many lakes in the Canary Islands cover an area of over 1000000?

SELECT COUNT(T2.Name) FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T1.Province = 'Canary Islands' AND T2.Area > 1000000

How many lakes in the Canary Islands cover an area of over 1000000 ?

O O B-COLUMN O O B-VALUE I-VALUE O O B-COLUMN O O B-VALUE O


Question: Count the total number of available services.

Count the total number of available services .


Question: When is the birthday of the actor who played "Sully"?

SELECT T2.`Date of Birth` FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Sully'

When is the birthday of the actor who played " Sully " ?

O O B-COLUMN I-COLUMN O O B-TABLE O O O B-VALUE O O


Question: How many bands are there?


Question: Describe the post title which got positive comments and display names of the users who posted those comments.

SELECT T1.Title, T2.UserDisplayName FROM posts AS T1 INNER JOIN comments AS T2 ON T2.PostId = T2.Id WHERE T1.Score > 60

Describe the post title which got positive comments and display names of the users who posted those comments .

B-COLUMN O B-TABLE B-COLUMN O O O O O B-COLUMN I-COLUMN O O O O B-COLUMN O B-TABLE O


Question: What is the average rating of all the movies starring Tom Cruise?

SELECT AVG(T1.Rating) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Name = 'Tom Cruise'

What is the average rating of all the movies starring Tom Cruise ?

O O O O B-COLUMN O O O B-TABLE O B-VALUE I-VALUE O


Question: What are the average, minimum and maximum prices for each food?

SELECT food ,  avg(price) ,  max(price) ,  min(price) FROM goods GROUP BY food

What are the average , minimum and maximum prices for each food ?


Question: List all titles with sales of quantity more than 20 and store located in the CA state.

SELECT T1.title, T2.qty FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T2.stor_id = T3.stor_id WHERE T2.qty > 20 AND T3.state = 'CA'

List all titles with sales of quantity more than 20 and store located in the CA state .

O O B-COLUMN O B-TABLE O O O O B-VALUE O B-TABLE O O O B-VALUE B-COLUMN O


Question: What is the number of employees that have a salary between 100000 and 200000?

SELECT count(*) FROM Employee WHERE salary BETWEEN 100000 AND 200000

What is the number of employees that have a salary between 100000 and 200000 ?

O O O O O B-TABLE O O O B-COLUMN O B-VALUE O B-VALUE O


Question: List all information about courses sorted by credits in the ascending order.

List all information about courses sorted by credits in the ascending order .


Question: What are the names of products with 'white' as their color description?

SELECT t1.product_name FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t2.color_description  =  "white"

What are the names of products with ' white ' as their color description ?

O O O O O B-TABLE O O B-COLUMN O O O B-COLUMN B-COLUMN O


Question: For each staff id, what is the description of the role that is involved with the most number of projects?

SELECT T1.role_description ,  T2.staff_id FROM Staff_Roles AS T1 JOIN Project_Staff AS T2 ON T1.role_code  =  T2.role_code JOIN Project_outcomes AS T3 ON T2.project_id  =  T3.project_id GROUP BY T2.staff_id ORDER BY count(*) DESC LIMIT 1

For each staff i d , what is the description of the role that is involved with the most number of projects ?

O O B-COLUMN I-COLUMN I-COLUMN O O O O B-COLUMN O O B-COLUMN O O O O O O O O B-COLUMN O


Question: Calculate the total atoms with triple-bond molecules containing the element phosphorus or bromine.

SELECT COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T1.element IN ('p', 'br')

Calculate the total atoms with triple - bond molecules containing the element phosphorus or bromine .

O O O B-TABLE O O O B-TABLE B-TABLE O O B-COLUMN O O O O


Question: How much is her GDP in agriculture for the country with the least area?

SELECT T2.GDP * T2.Agriculture FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T1.Area ASC LIMIT 1

How much is her GDP in agriculture for the country with the least area ?

O O O O B-COLUMN O B-COLUMN O O B-COLUMN O O O B-COLUMN O


Question: State the number of female legislators in the list.

SELECT COUNT(*) FROM current WHERE gender_bio = 'F'

State the number of female legislators in the list .


Question: List down all universities that scored below 50.

SELECT DISTINCT T2.university_name FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.score < 50

List down all universities that scored below 50 .


Question: Who is the customer from the West region that received the highest discount?

SELECT T2.`Customer Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'West' ORDER BY T1.Discount DESC LIMIT 1

Who is the customer from the West region that received the highest discount ?

O O O B-COLUMN B-COLUMN O B-VALUE B-COLUMN O O O O B-COLUMN O


Question: Find the white grape used to produce wines with scores above 90.

SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White" AND T2.score  >  90

Find the white grape used to produce wines with scores above 90 .

O O B-COLUMN B-COLUMN O O O B-TABLE O B-COLUMN O B-VALUE O


Question: How many papers cite paper with id A00-1002?

SELECT count(*) FROM Citation WHERE cited_paper_id  =  "A00-1002"

How many papers cite paper with i d A00 - 1002 ?

O O O B-COLUMN I-COLUMN O O O B-COLUMN I-COLUMN I-COLUMN O


Question: Which city in the Midwest region has the least number of clients?

SELECT T2.city FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Midwest' GROUP BY T2.city ORDER BY COUNT(T2.city) LIMIT 1

Which city in the Midwest region has the least number of clients ?

O B-COLUMN O O B-VALUE B-COLUMN O O O O O B-TABLE O


Question: Find the names of all patients who have an undergoing treatment and are staying in room 111.

SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111

Find the names of all patients who have an undergoing treatment and are staying in room 111 .

O O B-COLUMN O O B-COLUMN O O O B-TABLE O O O B-COLUMN O B-COLUMN B-VALUE O


Question: Give the address location of Heather Morris.

SELECT T1.address FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T2.first_name = 'HEATHER' AND T2.last_name = 'MORRIS'

Give the address location of Heather Morris .


Question: State the name of dbas with verified quality.

SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.results LIKE '%Pass%'

State the name of dbas with verified quality .


Question: List the first names of customers who have purchased products from sale person id 1.

SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.SalesPersonID = 1

List the first names of customers who have purchased products from sale person i d 1 .

O O B-COLUMN I-COLUMN O B-TABLE O O O O O B-TABLE B-COLUMN I-COLUMN I-COLUMN B-VALUE O


Question: What is the percentage of reviews added each year of the total reviews added?

SELECT CAST((SUM(CASE WHEN run_at LIKE '2022-%' THEN reviews_added ELSE 0 END) - SUM(CASE WHEN run_at LIKE '2021-%' THEN reviews_added ELSE 0 END)) AS REAL) * 100 / SUM(reviews_added) OR '%' "percentage" FROM runs

What is the percentage of reviews added each year of the total reviews added ?

O O O O O O O O O O O O B-COLUMN I-COLUMN O


Question: What are the ids and names of department stores with both marketing and managing departments?

SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "marketing" INTERSECT SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "managing"

What are the ids and names of department stores with both marketing and managing departments ?

O O O O O O O B-COLUMN B-COLUMN O O B-COLUMN O B-COLUMN B-TABLE O


Question: What are the locations that have works painted before 1885 and after 1930?

SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  >  1930

What are the locations that have works painted before 1885 and after 1930 ?

O O O B-COLUMN O O O B-TABLE O B-VALUE O O B-VALUE O


Question: Order all of the oil paintings by date of creation and list their ids, locations, and titles.

SELECT paintingID ,  title ,  LOCATION FROM paintings WHERE medium  =  "oil" ORDER BY YEAR

Order all of the oil paintings by date of creation and list their ids , locations , and titles .

O O O O B-COLUMN B-TABLE O O O O O O O O O B-COLUMN O O B-COLUMN O


Question: Which team did player Id "roypa01" play in 1992? Give the team id.

SELECT tmID FROM Goalies WHERE playerID = 'roypa01' AND year = 1992

Which team did player I d " roypa01 " play in 1992 ? Give the team i d.

O O O B-COLUMN B-COLUMN I-COLUMN O B-VALUE O O O B-VALUE O O O B-COLUMN I-COLUMN I-COLUMN


Question: To which country does the address '1386 Nakhon Sawan Boulevard' belong?

SELECT T1.country FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id WHERE T3.address = '1386 Nakhon Sawan Boulevard'

To which country does the address ' 1386 Nakhon Sawan Boulevard ' belong ?

O O B-TABLE O O B-COLUMN O B-VALUE I-VALUE I-VALUE I-VALUE O O O


Question: Find the average hours for the students whose tryout decision is no.

SELECT avg(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'no'

Find the average hours for the students whose tryout decision is no .

O O O O O O O O B-TABLE B-COLUMN O B-VALUE O


Question: How many translations are there for the set of cards with "Angel of Mercy" in it?

SELECT COUNT(DISTINCT translation) FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Angel of Mercy' ) AND translation IS NOT NULL

How many translations are there for the set of cards with " Angel of Mercy " in it ?

O O B-COLUMN O O O O B-COLUMN I-COLUMN B-TABLE O O B-VALUE I-VALUE I-VALUE O O O O


Question: Provide the type and end date of the term of the legislator named John Vining.

SELECT T2.type, T2.end FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'John' AND T1.last_name = 'Vining'

Provide the type and end date of the term of the legislator named John Vining .

O O B-COLUMN O B-COLUMN O O O O O O O O B-VALUE B-VALUE O


Question: Which transportation method is used the most often to get to tourist attractions?

SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1

Which transportation method is used the most often to get to tourist attractions ?


Question: How many people teaches course no.11?

SELECT COUNT(*) FROM taughtBy WHERE course_id = 11


Question: When was the first movie released?

SELECT MIN(release_date) FROM movie WHERE movie_status = 'Released'


Question: What is the name of the country with the smallest population, and what is its gross domestic product?

SELECT T1.Name, T2.GDP FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T1.Population ASC LIMIT 1

What is the name of the country with the smallest population , and what is its gross domestic product ?

O O O B-COLUMN O O B-COLUMN O O O B-COLUMN O O O O O O O O O


Question: Which closed/not running Yelp business in "Sun City" has got the most reviews? Give the business id.

SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Sun City' AND T1.active LIKE 'FALSE' GROUP BY T1.business_id ORDER BY COUNT(T2.review_length) DESC LIMIT 1

Which closed / not running Yelp business in " Sun City " has got the most reviews ? Give the business i d.

O O O O O O B-TABLE O O B-VALUE B-COLUMN O O O O O B-TABLE B-COLUMN B-COLUMN B-COLUMN B-COLUMN I-COLUMN I-COLUMN


Question: Provide the zip code, city, and congress representative's full names of the area which has highest population in 2020.

SELECT T1.zip_code, T1.city, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id GROUP BY T2.district ORDER BY T1.population_2020 DESC LIMIT 1

Provide the zip code , city , and congress representative 's full names of the area which has highest population in 2020 .

O O B-COLUMN I-COLUMN O B-COLUMN O O B-TABLE O O O O O O O O O O B-COLUMN I-COLUMN I-COLUMN O


Question: Return the cities with more than 3 airports in the United States.

SELECT city FROM airports WHERE country  =  'United States' GROUP BY city HAVING count(*)  >  3

Return the cities with more than 3 airports in the United States .

O O B-COLUMN O O O B-VALUE B-TABLE O O B-VALUE I-VALUE O


Question: How many languages are in these films?

SELECT count(DISTINCT language_id) FROM film


Question: What is the area of the destination city of shipment No.1346?

SELECT T2.area FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1346'

What is the area of the destination city of shipment No.1346 ?

O O O B-COLUMN O O O B-TABLE O B-TABLE B-VALUE O


Question: Which advisors have more than two students?

SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2

Which advisors have more than two students ?


Question: Which region do most of the athletes are from?

SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1

Which region do most of the athletes are from ?


Question: Which region has the lowest number of countries?

SELECT T.r_name FROM ( SELECT T1.r_name, COUNT(T2.n_name) AS num FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey GROUP BY T1.r_name ) AS T ORDER BY T.num LIMIT 1

Which region has the lowest number of countries ?


Question: Which behavior category does user number 5902120154267990000 belong to?

SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 5902120154267990000

Which behavior category does user number 5902120154267990000 belong to ?


Question: Find the phone numbers of customers using the most common policy type among the available policies.

SELECT customer_phone FROM available_policies WHERE policy_type_code  =  (SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1)

Find the phone numbers of customers using the most common policy type among the available policies .

O O O O O B-COLUMN O O O O B-COLUMN I-COLUMN O O B-TABLE I-TABLE O


Question: Among the drivers that finished the race in the 2008 Chinese Grand Prix, how many of them have participated in Formula_1 races?

SELECT COUNT(*) FROM ( SELECT T1.driverId FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'Chinese Grand Prix' AND T2.year = 2008 AND T1.time IS NOT NULL GROUP BY T1.driverId HAVING COUNT(T2.raceId) > 0 )

Among the drivers that finished the race in the 2008 Chinese Grand Prix , how many of them have participated in Formula_1 races ?

O O B-COLUMN O O O B-COLUMN O O B-VALUE B-VALUE I-VALUE I-VALUE O O O O O O O O O B-TABLE O


Question: What is the number of products that have not been ordered yet?

SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

What is the number of products that have not been ordered yet ?


Question: What is the average number of students who registered for the courses with a difficulty of 4?

SELECT CAST(COUNT(T1.student_id) AS REAL) / COUNT(DISTINCT T2.course_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.diff = 4

What is the average number of students who registered for the courses with a difficulty of 4 ?

O O O O O O B-COLUMN O B-TABLE O O B-TABLE O O O O B-VALUE O


Question: What is the total number of comments of all the posts owned by csgillespie?

SELECT SUM(T1.CommentCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'

What is the total number of comments of all the posts owned by csgillespie ?

O O O O O O B-COLUMN O O O B-TABLE B-COLUMN O B-VALUE O


Question: Find the physician who prescribed the highest dose. What is his or her name?

SELECT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician ORDER BY T2.dose DESC LIMIT 1

Find the physician who prescribed the highest dose . What is his or her name ?

O O B-COLUMN O B-TABLE O O B-COLUMN O O O O O O B-COLUMN O


Question: What is the party of the oldest legislator?

SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide ORDER BY T2.birthday_bio LIMIT 1

What is the party of the oldest legislator ?


Question: Among the patients who have an abnormal level of glutamic oxaloacetic transaminase, when was the youngest of them born?

SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GOT >= 60 ORDER BY T1.Birthday DESC LIMIT 1

Among the patients who have an abnormal level of glutamic oxaloacetic transaminase , when was the youngest of them born ?

O O B-TABLE O O O O O O O O O O O O O O O O O O


Question: List distinct receipt numbers for which someone bought a good that costs more than 13 dollars.

SELECT DISTINCT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  13

List distinct receipt numbers for which someone bought a good that costs more than 13 dollars .

O O B-COLUMN B-COLUMN O O O O O B-TABLE O O O O B-VALUE O O


Question: Between 1/1/2017 and 4/1/2017, what is the average server time of calls under the server DARMON?

SELECT AVG(CAST(SUBSTR(ser_time, 4, 2) AS REAL)) FROM callcenterlogs WHERE `Date received` BETWEEN '2017-01-01' AND '2017-04-01'

Between 1/1/2017 and 4/1/2017 , what is the average server time of calls under the server DARMON ?

O O O O O O O O O B-COLUMN I-COLUMN O O O O O O O


Question: Which party had the most hosts? Give me the party location.

SELECT LOCATION FROM party ORDER BY Number_of_hosts DESC LIMIT 1

Which party had the most hosts ? Give me the party location .


Question: What are the miles per gallon of the most expensive car?

SELECT T1.mpg FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

What are the miles per gallon of the most expensive car ?


Question: What are the id, sic code and agency id of the client who has attended 1 meeting and has any invoice.

SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id HAVING count(*)  =  1 INTERSECT SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id

What are the i d , sic code and agency i d of the client who has attended 1 meeting and has any invoice .

O O O O O O B-COLUMN I-COLUMN O B-COLUMN I-COLUMN I-COLUMN O O B-TABLE O O O B-VALUE B-TABLE O O O B-TABLE O


Question: List the character names and descriptions of chapter ID 18710.

SELECT DISTINCT T1.CharName, T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.Chapter_id = 18710

List the character names and descriptions of chapter ID 18710 .

O O B-COLUMN O O B-COLUMN O B-COLUMN B-COLUMN B-VALUE O


Question: What is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed?

SELECT T2.lat, T2.long FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration = ( SELECT MAX(T1.duration) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name )

What is the location coordinates of the bike station from which the bike for the trip that last the longest was borrowed ?

O O O O O O O O B-TABLE O O O O O O B-TABLE O B-COLUMN O B-COLUMN O O O


Question: Where does the driver of ship ID 1127 live?

SELECT T2.address FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1127'

Where does the driver of ship ID 1127 live ?

O O O B-TABLE O B-COLUMN I-COLUMN B-VALUE O O


Question: List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019.

SELECT DISTINCT T1.email FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE date(SUBSTR(T2.expense_date, 1, 10)) BETWEEN '2019-09-10' AND '2019-11-19' AND T2.cost > 20

List emails of people who paid more than 20 dollars from 9/10/2019 to 11/19/2019 .

O B-COLUMN O O O O O O B-VALUE O O O O O O


Question: Please list the top three product names with the highest unit price.

SELECT t1.productName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode ORDER BY t2.priceEach DESC LIMIT 3

Please list the top three product names with the highest unit price .

O O O O O B-TABLE B-COLUMN O O O O B-COLUMN O


Question: How many distinct FDA approval statuses are there for the medicines?

SELECT count(DISTINCT FDA_approved) FROM medicine

How many distinct FDA approval statuses are there for the medicines ?

O O O B-COLUMN I-COLUMN O O O O O B-TABLE O


Question: How many times did other regions make positive sales in DS platform?

SELECT COUNT(DISTINCT T2.id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id WHERE T1.platform_name = 'DS' AND T4.region_name = 'Other' AND T3.num_sales > 0

How many times did other regions make positive sales in DS platform ?

O O O B-COLUMN B-VALUE B-TABLE B-COLUMN O B-COLUMN O B-VALUE B-TABLE O


Question: What are the names of all directors who made one movie?

SELECT director FROM Movie GROUP BY director HAVING count(*)  =  1

What are the names of all directors who made one movie ?


Question: Provide the menu page ids of all the menu that includes mashed potatoes.

SELECT T2.menu_page_id FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Mashed potatoes'

Provide the menu page ids of all the menu that includes mashed potatoes .

O O B-COLUMN I-COLUMN B-COLUMN O O O B-TABLE O O B-VALUE I-VALUE O


Question: In which city do the most employees live and how many of them live there?

SELECT T1.city ,  count(*) FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id GROUP BY T1.city ORDER BY count(*) DESC LIMIT 1;

In which city do the most employees live and how many of them live there ?


Question: List all of the College of Humanities and Social Sciences' departments.

SELECT department FROM major WHERE college = 'College of Humanities and Social Sciences'

List all of the College of Humanities and Social Sciences ' departments .

O O O O B-COLUMN B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O B-COLUMN O


Question: Identify by their id all the apps that belong to the game-stress reliever category.

SELECT T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-stress reliever'

Identify by their i d all the apps that belong to the game - stress reliever category .

O O O O O O O B-COLUMN O O O O B-VALUE I-VALUE I-VALUE I-VALUE B-COLUMN O


Question: What are the name and level of catalog structure with level number between 5 and 10

SELECT catalog_level_name ,  catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10

O O O O O O O B-TABLE I-TABLE O B-COLUMN I-COLUMN O B-VALUE O B-VALUE


Question: Find the name and id of the team that won the most times in 2008 postseason.

SELECT T2.name ,  T1.team_id_winner FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner  =  T2.team_id_br WHERE T1.year  =  2008 GROUP BY T1.team_id_winner ORDER BY count(*) DESC LIMIT 1;

Find the name and i d of the team that won the most times in 2008 postseason .

O O B-COLUMN O O O O O B-TABLE O O O O O O B-VALUE B-TABLE O


Question: What is the difference between average glucose reading for patients in the 20s and 50s?

SELECT SUM(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 20 AND 30 THEN T2.VALUE ELSE 0 END) / COUNT(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 20 AND 30 THEN T2.PATIENT END) - SUM(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.VALUE ELSE 0 END) / COUNT(CASE WHEN ROUND((strftime('%J', T2.DATE) - strftime('%J', T1.birthdate)) / 365) BETWEEN 50 AND 60 THEN T2.PATIENT END) AS difference FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Glucose'

What is the difference between average glucose reading for patients in the 20s and 50s ?

O O O O O O B-VALUE O B-TABLE B-COLUMN O O B-VALUE O B-VALUE O


Question: What is the party of the youngest people?

SELECT Party FROM people ORDER BY Age ASC LIMIT 1

What is the party of the youngest people ?


Question: What are the bad aliases of the postal points from East Setauket?

SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'East Setauket'

What are the bad aliases of the postal points from East Setauket ?

O O O B-COLUMN I-COLUMN O O O O O B-VALUE I-VALUE O


Question: How many films were released in 2007?

SELECT COUNT(*) FROM movies WHERE movie_release_year = 2007


Question: How many times does the word "heròdot" appear in the Wikipedia page?

SELECT COUNT(T2.occurrences) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'heròdot'

How many times does the word " heròdot " appear in the Wikipedia page ?

O O O O O B-COLUMN O B-VALUE O O O O O O O


Question: Which date has the most ordered quantity? What is the total order quantity on that day?

SELECT ord_date, SUM(qty) FROM sales GROUP BY ord_date ORDER BY SUM(qty) DESC LIMIT 1

Which date has the most ordered quantity ? What is the total order quantity on that day ?

O B-COLUMN O O O O O O O O O O O O O O O O


Question: Provide the sponsor and event of the menu which includes Cerealine with Milk.

SELECT T3.name, T3.event FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T4.name = 'Cerealine with Milk'

Provide the sponsor and event of the menu which includes Cerealine with Milk .

O O O O B-COLUMN O O B-TABLE O O B-VALUE I-VALUE I-VALUE O


Question: How many instructors teach a course in the Spring of 2010?

SELECT COUNT (DISTINCT ID) FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010

How many instructors teach a course in the Spring of 2010 ?

O O O B-TABLE O O O O B-VALUE O B-VALUE O


Question: When did 'Bulgaria' gain independence?

SELECT T2.Independence FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Bulgaria'

When did ' Bulgaria ' gain independence ?


Question: What is the total price of all the books ordered by Lucas Wyldbore?

SELECT SUM(T1.price) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Lucas' AND T3.last_name = 'Wyldbore'

What is the total price of all the books ordered by Lucas Wyldbore ?

O O O O B-COLUMN O O O O B-COLUMN O B-VALUE B-VALUE O


Question: What is the company's second highest salary per hour for employees who are paid monthly?

SELECT Rate FROM EmployeePayHistory WHERE PayFrequency = 1 ORDER BY Rate DESC LIMIT 1, 1

What is the company 's second highest salary per hour for employees who are paid monthly ?


Question: Among the independent countries, how many of them has a GDP per capita of over 5000?

SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN economy AS T3 ON T3.Country = T2.Country WHERE T2.Independence IS NOT NULL AND T3.GDP > 5000

Among the independent countries , how many of them has a GDP per capita of over 5000 ?

O O B-COLUMN B-COLUMN O O O O O O O B-COLUMN O O O O B-VALUE O


Question: Among the patients with acute bronchitis, what is the percentage of Asian women?

SELECT CAST(SUM(CASE WHEN T2.gender = 'F' AND T2.race = 'asian' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.gender) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Acute bronchitis (disorder)'

Among the patients with acute bronchitis , what is the percentage of Asian women ?

O O B-COLUMN O B-COLUMN B-TABLE O O O O O B-VALUE B-VALUE O O


Question: What are the names of the countries, as well as the names of their official langauges?

SELECT T1.name ,  T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id

What are the names of the countries , as well as the names of their official langauges ?

O O O B-COLUMN O O B-TABLE O O O O O O O O B-TABLE B-TABLE O


Question: What is the average number of casts of movies that are from the USA?

SELECT AVG(T2.cast_num) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA'

What is the average number of casts of movies that are from the USA ?

O O O O O O B-COLUMN O B-TABLE B-TABLE O O O B-VALUE O


Question: List active business ids with opening times of 7AM and closing times of 8PM.

SELECT DISTINCT T4.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Business AS T4 ON T3.business_id = T4.business_id WHERE T4.active = 'true' AND T3.opening_time = '7AM' AND T3.closing_time = '8PM'

List active business ids with opening times of 7AM and closing times of 8PM .

O B-COLUMN B-TABLE B-COLUMN O B-COLUMN I-COLUMN O B-VALUE O B-COLUMN I-COLUMN O B-VALUE O


Question: Which documents have more than 1 draft copies? List document id and number of draft copies.

SELECT document_id , count(*) FROM Draft_Copies GROUP BY document_id HAVING count(*)  >  1;

Which documents have more than 1 draft copies ? List document i d and number of draft copies .

O O O O O B-VALUE O O O O B-COLUMN I-COLUMN I-COLUMN O O O B-TABLE I-TABLE O


Question: List the hosts of performances in ascending order of attendance.

SELECT HOST FROM performance ORDER BY Attendance ASC

List the hosts of performances in ascending order of attendance .

O O B-COLUMN O B-TABLE O O O O B-COLUMN O


Question: Which country has the 5th highest infant mortality rate?

SELECT T2.Name FROM population AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code ORDER BY T1.Infant_Mortality DESC LIMIT 4, 1

Which country has the 5th highest infant mortality rate ?

O B-COLUMN O O O O B-COLUMN I-COLUMN O O


Question: Among the suppliers providing parts under the type "promo brushed steel", how many of them are in debt?

SELECT COUNT(T3.s_name) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T3.s_acctbal < 0 AND T1.p_type = 'PROMO BRUSHED STEEL'

Among the suppliers providing parts under the type " promo brushed steel " , how many of them are in debt ?

O O B-TABLE O B-TABLE O O B-COLUMN O B-VALUE I-VALUE I-VALUE O O O O O O O O O O


Question: Who from The simpson 20s: Season 20 cast and crew was born in October 29, 1957 in Chicago, Illinois?

SELECT name FROM Person WHERE birthdate = '1957-10-29' AND birth_place = 'Chicago' AND birth_region = 'Illinois';

Who from The simpson 20s : Season 20 cast and crew was born in October 29 , 1957 in Chicago , Illinois ?

O O O O O O B-TABLE O O O O O O O O O O O O B-VALUE O B-VALUE O


Question: Show the name for regions not affected.

SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)

Show the name for regions not affected .


Question: Indicate the profit of product Sauder Camden County Barrister Bookcase, Planked Cherry Finish.

SELECT DISTINCT T1.Profit FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Sauder Camden County Barrister Bookcase, Planked Cherry Finish'

Indicate the profit of product Sauder Camden County Barrister Bookcase , Planked Cherry Finish .

O O B-COLUMN O B-TABLE B-COLUMN B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O


Question: What is the id, forename, and number of races for all drivers that have participated in at least 2 races?

SELECT T1.driverid ,  T1.forename ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  >=  2

What is the i d , forename , and number of races for all drivers that have participated in at least 2 races ?

O O O O O O B-COLUMN O O O O O O O B-TABLE O O O O O O B-VALUE B-TABLE O


Question: Provide the name of artists who released at least two bootlegs in 2016.

SELECT artist FROM torrents WHERE groupYear = 2016 AND releaseType LIKE 'bootleg' GROUP BY artist HAVING COUNT(releaseType) > 2

Provide the name of artists who released at least two bootlegs in 2016 .

O O O O B-COLUMN O B-COLUMN O O O B-VALUE O B-VALUE O


Question: Among the low quality product, which product has the highest line total? List the product name and its line total?

SELECT T1.Name, T2.LineTotal FROM Product AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE Class = 'L' ORDER BY OrderQty * UnitPrice DESC LIMIT 1

Among the low quality product , which product has the highest line total ? List the product name and its line total ?

O O O O O O O B-TABLE O O O O O O O O B-COLUMN B-COLUMN O O B-COLUMN I-COLUMN O


Question: Return the name of the heaviest entrepreneur.

SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Weight DESC LIMIT 1

Return the name of the heaviest entrepreneur .


Question: which pilot is in charge of the most number of flights?

SELECT pilot FROM flight GROUP BY pilot ORDER BY count(*) DESC LIMIT 1

which pilot is in charge of the most number of flights ?


Question: How many faculty members do we have for each faculty rank?

SELECT rank ,  count(*) FROM Faculty GROUP BY rank

How many faculty members do we have for each faculty rank ?


Question: How many device users are male?

SELECT COUNT(device_id) FROM gender_age WHERE gender = 'M'


Question: How many countries have country note description as "Sources: UN Energy Statistics (2014)"? List the currency of these countries.

SELECT COUNT(DISTINCT T1.Countrycode) FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Sources: UN Energy Statistics (2014)' UNION SELECT DISTINCT t1.CurrencyUnit FROM country AS t1 INNER JOIN countrynotes AS t2 ON t1.CountryCode = t2.Countrycode WHERE t2.Description = 'Sources: UN Energy Statistics (2014)'

How many countries have country note description as " Sources : UN Energy Statistics ( 2014 ) " ? List the currency of these countries .

O O O O B-TABLE B-TABLE B-COLUMN O O B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O O O O B-COLUMN O O O O