Question: List the first names of the students who do not have any answers.

SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers)

List the first names of the students who do not have any answers .

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


Question: State the region id of Japan.

SELECT T.id FROM region AS T WHERE T.region_name = 'Japan'

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


Question: Which department has the highest average instructor salary?

SELECT dept_name FROM instructor GROUP BY dept_name ORDER BY avg(salary) DESC LIMIT 1

Which department has the highest average instructor salary ?


Question: How many films have a duration between 100 to 110 minutes?

SELECT COUNT(film_id) FROM film WHERE length BETWEEN 100 AND 110

How many films have a duration between 100 to 110 minutes ?

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


Question: What are the average values of boxes for each warehouse than has an average value greater than 150?

SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse HAVING avg(value)  >  150

What are the average values of boxes for each warehouse than has an average value greater than 150 ?

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


Question: For country with area greater than 600000, what is agriculture percentage of GDP the country contributes?

SELECT T2.Agriculture FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Area > 600000 AND T2.Agriculture IS NOT NULL

For country with area greater than 600000 , what is agriculture percentage of GDP the country contributes ?

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


Question: What gender of users retweet more than 30 times?

SELECT DISTINCT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.RetweetCount > 30

What gender of users retweet more than 30 times ?

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


Question: What is the location code with the most documents?

SELECT location_code FROM Document_locations GROUP BY location_code ORDER BY count(*) DESC LIMIT 1

What is the location code with the most documents ?


Question: Find the name of tracks which are in both Movies and music playlists.

SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id  =  T2.track_id JOIN playlists AS T3 ON T2.playlist_id  =  T3.id WHERE T3.name  =  'Movies' INTERSECT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id  =  T2.track_id JOIN playlists AS T3 ON T2.playlist_id  =  T3.id WHERE T3.name  =  'Music'

Find the name of tracks which are in both Movies and music playlists .

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


Question: What are the distinct Famous release dates?

SELECT distinct(Famous_Release_date) FROM artist

What are the distinct Famous release dates ?


Question: Compared with the orders happened on 2005-04-08 and two days later, which day's order had a higher value?

SELECT T2.orderDate FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-08' OR STRFTIME('%Y-%m-%d', T2.orderDate) = '2005-04-10' ORDER BY T1.quantityOrdered * T1.priceEach DESC LIMIT 1

Compared with the orders happened on 2005 - 04 - 08 and two days later , which day 's order had a higher value ?

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


Question: For all reviews with the worst rating, state the podcast title as well as the review title and content.

SELECT DISTINCT T1.title, T2.title, T2.content FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 1

For all reviews with the worst rating , state the podcast title as well as the review title and content .

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


Question: List all venues and years for papers ordered by year.

SELECT DISTINCT venue ,  YEAR FROM paper ORDER BY YEAR

List all venues and years for papers ordered by year .

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


Question: How many inspections done by Lisa Tillman ended up with the result of "Out of Business"?

SELECT COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T2.first_name = 'Lisa' AND T2.last_name = 'Tillman' AND T1.results = 'Out of Business'

How many inspections done by Lisa Tillman ended up with the result of " Out of Business " ?

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


Question: List all inspection IDs where the employee named "Rosemary Kennedy" was involved.

SELECT DISTINCT T2.inspection_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.first_name = 'Rosemary' AND T1.last_name = 'Kennedy'

List all inspection IDs where the employee named " Rosemary Kennedy " was involved .

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


Question: Find the first names of all the authors ordered in alphabetical order.

SELECT fname FROM authors ORDER BY fname

Find the first names of all the authors ordered in alphabetical order .


Question: Find the schools that were either founded after 1850 or public.

SELECT school FROM university WHERE founded  >  1850 OR affiliation  =  'Public'

Find the schools that were either founded after 1850 or public .

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


Question: What gender is more prone to 'dander (animal) allergy'?

SELECT T1.gender FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Dander (animal) allergy' GROUP BY T1.gender ORDER BY COUNT(T1.gender) DESC LIMIT 1

What gender is more prone to ' dander ( animal ) allergy ' ?

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


Question: Find the city with the most number of stores.

SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1

Find the city with the most number of stores .


Question: How many Italian patients have the care plan code of 304510005?

SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ethnicity = 'italian' AND T1.CODE = '304510005'

How many Italian patients have the care plan code of 304510005 ?

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


Question: How many orders through distributor were for the minimum quantity?

SELECT SUM(CASE WHEN `Order Quantity` = 1 AND `Sales Channel` = 'Distributor' THEN 1 ELSE 0 END) FROM `Sales Orders`

How many orders through distributor were for the minimum quantity ?

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


Question: What is the total horses record for each farm, sorted ascending?

SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC

What is the total horses record for each farm , sorted ascending ?

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


Question: How many aldermen have "James" as their first name?

SELECT COUNT(*) FROM Ward WHERE alderman_first_name = 'James'

How many aldermen have " James " as their first name ?

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


Question: List all product names under Confections.

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Confections'

List all product names under Confections .


Question: What are the employee ids for employees who make more than the average?

SELECT employee_id FROM employees WHERE salary  >  (SELECT AVG(salary) FROM employees)

What are the employee ids for employees who make more than the average ?

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


Question: How many papers does Stanford University have 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"

How many papers does Stanford University have between 2000 and 2009 ?

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


Question: What is the total population of the districts whose areas are in the top 3?

SELECT sum(population) FROM district ORDER BY area_km DESC LIMIT 3

What is the total population of the districts whose areas are in the top 3 ?

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


Question: Please list the names of all the ingredients needed for the recipe "Raspberry Chiffon Pie" that do not need preprocessing.

SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.preparation IS NULL

Please list the names of all the ingredients needed for the recipe " Raspberry Chiffon Pie " that do not need preprocessing .

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


Question: What are the ids for all sporty students who are on scholarship?

SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'

What are the ids for all sporty students who are on scholarship ?

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


Question: What are the first names and ids for customers who have two or more accounts?

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

What are the first names and ids for customers who have two or more accounts ?

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


Question: Find the name of customer who has the highest amount of loans.

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount) DESC LIMIT 1

Find the name of customer who has the highest amount of loans .

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


Question: Please indicate the street names of restaurants with food type is American.

SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'American'

Please indicate the street names of restaurants with food type is American .

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


Question: Count the number of products.


Question: List all the Jewish current legislators that had served in Florida.

SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Jewish' AND T2.state = 'FL' GROUP BY T1.first_name, T1.last_name

List all the Jewish current legislators that had served in Florida .

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


Question: Which team recorded the most number of road victories in 2005? Indicate the team ID.

SELECT tmID FROM TeamSplits WHERE YEAR = '2005' ORDER BY rW DESC LIMIT 1

Which team recorded the most number of road victories in 2005 ? Indicate the team ID .

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


Question: How many meetings had each meeting outcome?

SELECT meeting_outcome ,  count(*) FROM Meetings GROUP BY meeting_outcome

How many meetings had each meeting outcome ?


Question: How many players were born in the 90s?

SELECT COUNT(Player_Id) AS cnt FROM Player WHERE DOB BETWEEN '1990-01-01' AND '1999-12-31'


Question: Which state was the tweet `tw-685681052912873473` from? Give the state code.

SELECT T2.StateCode FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.TweetID = 'tw-685681052912873473'

Which state was the tweet ` tw-685681052912873473 ` from ? Give the state code .

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


Question: Among the students who took the course Machine Learning Theory, how many of them are undergraduates?

SELECT COUNT(T1.student_id) 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.name = 'Machine Learning Theory' AND T1.type = 'UG'

Among the students who took the course Machine Learning Theory , how many of them are undergraduates ?

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


Question: What is the total balance of savings accounts not belonging to someone with the name Brown?

SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T1.name != 'Brown'

What is the total balance of savings accounts not belonging to someone with the name Brown ?

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


Question: Find the name of rooms booked by some customers whose first name contains ROY.

SELECT T2.roomName FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE firstname LIKE '%ROY%'

Find the name of rooms booked by some customers whose first name contains ROY .

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


Question: List all cities of addresses in alphabetical order.

SELECT city FROM Addresses ORDER BY city

List all cities of addresses in alphabetical order .


Question: What are the degrees conferred in "San Francisco State University" in 2001.

SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001

What are the degrees conferred in " San Francisco State University " in 2001 .

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


Question: Which product has the highest profit on net? State the product name.

SELECT T1.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID ORDER BY T2.LastReceiptCost - T2.StandardPrice DESC LIMIT 1

Which product has the highest profit on net ? State the product name .

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


Question: Write down the email addresses of active customers who rented between 5/25/2005 at 7:37:47 PM and 5/26/2005 at 10:06:49 AM.

SELECT T2.email FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.rental_date BETWEEN '2005-5-25 07:37:47' AND '2005-5-26 10:06:49' AND T2.active = 1

Write down the email addresses of active customers who rented between 5/25/2005 at 7:37:47 PM and 5/26/2005 at 10:06:49 AM .

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


Question: How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card?

SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_campaign_gift_card = 't' AND T1.poverty_level = 'highest poverty'

How many schools with the highest level of poverty have received a portion of a donation included corporate sponsored gift card ?

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


Question: Which students have 2 or more answer records? Give me their first names.

SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID  =  T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*)  >=  2

Which students have 2 or more answer records ? Give me their first names .

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


Question: What are the classes of races that have two or more corresponding races?

SELECT CLASS FROM race GROUP BY CLASS HAVING count(*)  >=  2

What are the classes of races that have two or more corresponding races ?

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


Question: Show name and salary for all employees sorted by salary.

SELECT name ,  salary FROM Employee ORDER BY salary

Show name and salary for all employees sorted by salary .

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


Question: What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong?

SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "Carl Skerlong" INTERSECT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

What are the names of drivers who had both the pole position James Hinchcliffe and the pole position Carl Skerlong ?

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


Question: For all the products sold for more than 3 times, list their id and description.

SELECT T1.product_id ,  T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id GROUP BY T1.product_id HAVING count(*)  >  3

For all the products sold for more than 3 times , list their i d and description .

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


Question: Find the name of product that is produced by both companies Creative Labs and Sony.

SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  'Creative Labs' INTERSECT SELECT T1.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T2.name  =  'Sony'

Find the name of product that is produced by both companies Creative Labs and Sony .

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


Question: How many stations does Mountain View city has?

SELECT COUNT(*) FROM station WHERE city  =  "Mountain View"

How many stations does Mountain View city has ?

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


Question: What's the fastest lap time ever in a race for Lewis Hamilton?

SELECT T2.fastestLapTime FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton' AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapTime ASC LIMIT 1

What 's the fastest lap time ever in a race for Lewis Hamilton ?

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


Question: What is the total number of universities located in Illinois or Ohio?

SELECT count(*) FROM University WHERE state  =  'Illinois' OR state  =  'Ohio'

What is the total number of universities located in Illinois or Ohio ?

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


Question: Give the full name of the employee who has sold the most quantity.

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID ORDER BY T2.Quantity DESC LIMIT 1

Give the full name of the employee who has sold the most quantity .

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


Question: State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM.

SELECT Text FROM comments WHERE CreationDate = '2010-07-19 19:16:14.0'

State the detailed content of the comment which was created on 7/19/2010 7:25:47 PM .

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


Question: What are the low and high estimates of film markets?

SELECT Low_Estimate ,  High_Estimate FROM film_market_estimation

What are the low and high estimates of film markets ?

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


Question: Give the average price for each food type.

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

Give the average price for each food type .


Question: Show all the Store_Name of drama workshop groups.

SELECT Store_Name FROM Drama_Workshop_Groups

Show all the Store_Name of drama workshop groups .

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


Question: What is the relationship between "feathers" and "onion" in image no.2345528?

SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_SAMPLE_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE (T4.OBJ_CLASS = 'feathers' OR T4.OBJ_CLASS = 'onion') AND T2.IMG_ID = 2345528 GROUP BY T1.PRED_CLASS

What is the relationship between " feathers " and " onion " in image no.2345528 ?

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


Question: How many journals have a word "computing" in its full name?

SELECT COUNT(Id) FROM Journal WHERE FullName LIKE '%computing%'

How many journals have a word " computing " in its full name ?

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


Question: How many objects can you spot in image no. 72? What objects may be identified on the same image and within the bounding box represented as (341, 27, 42, 51)?

SELECT SUM(IIF(T1.IMG_ID = 1, 1, 0)), SUM(IIF(T1.X = 341 AND T1.Y = 27 AND T1.W = 42 AND T1.H = 51, 1, 0)) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID

How many objects can you spot in image no . 72 ? What objects may be identified on the same image and within the bounding box represented as ( 341 , 27 , 42 , 51 ) ?

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


Question: Find the ids of the students who participate in Canoeing and Kayaking.

SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Kayaking'

Find the ids of the students who participate in Canoeing and Kayaking .

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


Question: Show the number of male and female assistant professors.

SELECT sex ,  count(*) FROM Faculty WHERE rank  =  "AsstProf" GROUP BY sex

Show the number of male and female assistant professors .


Question: How many businesses from ward 42 have at least 5 failed inspection results between 1/1/2010 to 12/31/2015?

SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_date BETWEEN '2010-01-01' AND '2015-12-31' AND T1.ward = 42 AND T1.license_no IN ( SELECT license_no FROM ( SELECT license_no FROM inspection WHERE results = 'Fail' GROUP BY license_no HAVING COUNT(results) >= 5 ) )

How many businesses from ward 42 have at least 5 failed inspection results between 1/1/2010 to 12/31/2015 ?

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


Question: List the full names of customers who have purchased products in quantity over 600.

SELECT T1.FirstName, T1.LastName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Quantity > 600

List the full names of customers who have purchased products in quantity over 600 .

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


Question: How many items were shipped on 4th December, 1993?

SELECT COUNT(l_linenumber) FROM lineitem WHERE l_shipdate = '1993-12-04'

How many items were shipped on 4th December , 1993 ?


Question: What instrument is used the most?

SELECT instrument FROM instruments GROUP BY instrument ORDER BY count(*) DESC LIMIT 1


Question: Among the competitors with age ranges 24 and below, calculate the difference between the number of competitors who weighed greater than 70 kg and competitors who weighted less than 70 kg.

SELECT COUNT(CASE WHEN T1.weight > 70 THEN 1 ELSE NULL END) - COUNT(CASE WHEN T1.weight < 70 THEN 1 ELSE NULL END) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.age < 24

Among the competitors with age ranges 24 and below , calculate the difference between the number of competitors who weighed greater than 70 kg and competitors who weighted less than 70 kg .

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


Question: For each question type, return its type code and its count of occurrence.

SELECT Type_of_Question_Code ,  COUNT(*) FROM Questions GROUP BY Type_of_Question_Code

For each question type , return its type code and its count of occurrence .


Question: List down application that have not been updated since 2015. What is the percentage of this application having more negative sentiment than positive sentiment?

SELECT CAST((( SELECT COUNT(*) Po FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Positive' ) - ( SELECT COUNT(*) Ne FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' AND T2.Sentiment = 'Negative' )) AS REAL) * 100 / ( SELECT COUNT(*) NUM FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE SUBSTR(T1."Last Updated", -4, 4) > '2015' )

List down application that have not been updated since 2015 . What is the percentage of this application having more negative sentiment than positive sentiment ?

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


Question: In which Olympic Games have the largest number of women participation?

SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.gender = 'F' GROUP BY T1.games_name ORDER BY COUNT(T2.person_id) DESC LIMIT 1

In which Olympic Games have the largest number of women participation ?

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


Question: Find the order detail for the products with price above 2000.

SELECT T1.Other_Item_Details FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_price  >  2000

Find the order detail for the products with price above 2000 .

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


Question: Provide the winning team's name in the match with the point of winning margin of 7 on May 7, 2009.

SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Match_Date = '2009-05-07' AND T2.Win_Margin = 7

Provide the winning team 's name in the match with the point of winning margin of 7 on May 7 , 2009 .

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


Question: List phone number and email address of customer with more than 2000 outstanding balance.

SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;

List phone number and email address of customer with more than 2000 outstanding balance .

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


Question: What are the ids and details of all statements?

SELECT STATEMENT_ID ,  statement_details FROM Statements

What are the ids and details of all statements ?


Question: How many payments do we have?


Question: Show the title and publication dates of books.

SELECT T1.Title ,  T2.Publication_Date FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID  =  T2.Book_ID

Show the title and publication dates of books .

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


Question: How many severe crime incidents were reported at coordinate 41.64820151, -87.54430496?

SELECT SUM(CASE WHEN T1.longitude = '-87.54430496' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.report_no = T2.iucr_no WHERE T2.index_code = 'I' AND T1.latitude = '41.64820251'

How many severe crime incidents were reported at coordinate 41.64820151 , -87.54430496 ?

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


Question: Return the affiliations of instituions that are not in the city of Vancouver.

SELECT Affiliation FROM institution WHERE City != "Vancouver"

Return the affiliations of instituions that are not in the city of Vancouver .

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


Question: Calculate the average duration of absense of female students.

SELECT AVG(T2.month) FROM person AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T1.name = T3.name WHERE T3.name IS NULL

Calculate the average duration of absense of female students .


Question: How many times did Michael Schumacher won from races hosted in Sepang International Circuit?

SELECT SUM(T2.wins) FROM drivers AS T1 INNER JOIN driverStandings AS T2 ON T2.driverId = T1.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId INNER JOIN circuits AS T4 ON T4.circuitId = T3.circuitId WHERE T1.forename = 'Michael' AND T1.surname = 'Schumacher' AND T4.name = 'Sepang International Circuit'

How many times did Michael Schumacher won from races hosted in Sepang International Circuit ?

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


Question: How many customers are active?

SELECT COUNT(customer_id) FROM customer WHERE active = 1


Question: How many businesses in Arizona having an average review less than 3 stars?

SELECT COUNT(business_id) FROM Business WHERE business_id IN ( SELECT DISTINCT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.state = 'AZ' GROUP BY T1.business_id HAVING SUM(T2.review_stars) / COUNT(T2.user_id) < 3 )

How many businesses in Arizona having an average review less than 3 stars ?

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


Question: How many models do not have the wifi function?

SELECT count(*) FROM chip_model WHERE wifi  =  'No'

How many models do not have the wifi function ?


Question: Count the number of customers recorded.

Count the number of customers recorded .


Question: What is the full name of the instructor who has a course named COMPUTER LITERACY?

SELECT T2.Fname ,  T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID WHERE T1.CName  =  "COMPUTER LITERACY"

What is the full name of the instructor who has a course named COMPUTER LITERACY ?

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


Question: List all product name from Australia Bike Retailer order by product ID.

SELECT T3.Name FROM Vendor AS T1 INNER JOIN ProductVendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID WHERE T1.Name = 'Australia Bike Retailer'

List all product name from Australia Bike Retailer order by product ID .

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


Question: Show the average amount of transactions with type code "SALE".

SELECT avg(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "SALE"

Show the average amount of transactions with type code " SALE " .

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


Question: Find the root beer with the most and least amount of profit per unit and list the container types in which these root beers are sold.

SELECT * FROM ( SELECT T1.BrandName, T2.ContainerType FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID ORDER BY T1.CurrentRetailPrice - T1.WholesaleCost DESC LIMIT 1 ) UNION ALL SELECT * FROM ( SELECT T3.BrandName, T4.ContainerType FROM rootbeerbrand AS T3 INNER JOIN rootbeer AS T4 ON T3.BrandID = T4.BrandID ORDER BY T3.CurrentRetailPrice - T3.WholesaleCost ASC LIMIT 1 )

Find the root beer with the most and least amount of profit per unit and list the container types in which these root beers are sold .

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


Question: What is the title of the game that gained the most sales in Japan?

SELECT T.game_name FROM ( SELECT T5.game_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN game AS T5 ON T4.game_id = T5.id WHERE T1.region_name = 'Japan' ORDER BY T2.num_sales DESC LIMIT 1 ) t

What is the title of the game that gained the most sales in Japan ?

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


Question: Please list the account types that are not eligible for loans, and the average income of residents in the district where the account is located exceeds $8000 but is no more than $9000.

SELECT T3.type FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type != 'OWNER' AND T1.A11 BETWEEN 8000 AND 9000

Please list the account types that are not eligible for loans , and the average income of residents in the district where the account is located exceeds $ 8000 but is no more than $ 9000 .

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


Question: Indicate the name of the companies that have freighted products for a value greater than 2,000,000.

SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Freight > 2000000

Indicate the name of the companies that have freighted products for a value greater than 2,000,000 .

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


Question: List the powers of Hunter Zolomon.

SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.full_name = 'Hunter Zolomon'


Question: Show the keywords of the paper that was presented at "International Radar Symposium" in 2012.

SELECT T1.Keyword FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Radar Symposium' AND T1.Year = 2012

Show the keywords of the paper that was presented at " International Radar Symposium " in 2012 .

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


Question: How many crimes had happened in the community area with the most population?

SELECT COUNT(T2.report_no) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no GROUP BY T1.community_area_name ORDER BY T1.population DESC LIMIT 1

How many crimes had happened in the community area with the most population ?

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


Question: Show the region name with at least two storms.

SELECT T1.region_name FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id HAVING count(*)  >=  2

Show the region name with at least two storms .


Question: How many labels of the restaurant have an unknown country?

SELECT COUNT(T1.label) FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'unknown'

How many labels of the restaurant have an unknown country ?

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


Question: What are the names and ids of sailors who reserved red or blue boats?

SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' OR T1.color  =  "blue"

What are the names and ids of sailors who reserved red or blue boats ?

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


Question: Please name all of the cities in California.

SELECT DISTINCT City FROM customers WHERE State = 'CA'

Please name all of the cities in California .


Question: For the goalie whose legendsID is "P196402" , how many games did he play in the league?

SELECT SUM(T1.GP) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.legendsID = 'P196402'

For the goalie whose legendsID is " P196402 " , how many games did he play in the league ?

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


Question: Find the biographical data and event date for students who participated in any events.

SELECT T1.bio_data ,  T2.event_date FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id  =  T2.student_id

Find the biographical data and event date for students who participated in any events .

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


Question: What are the names of players in team 1?

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id WHERE T3.Team_Id = 1 GROUP BY T1.Player_Name

What are the names of players in team 1 ?

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


Question: Among the authors of the paper "Stitching videos streamed by mobile phones in real-time", how many of them are affiliated with Cairo Microsoft Innovation Lab?

SELECT COUNT(T1.AuthorId) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Affiliation = 'University of Tokyo' AND T2.Title = 'FIBER: A Generalized Framework for Auto-tuning Software'

Among the authors of the paper " Stitching videos streamed by mobile phones in real - time " , how many of them are affiliated with Cairo Microsoft Innovation Lab ?

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


Question: What is the percentage of trips that started in San Jose and durations were longer than 800 seconds?

SELECT CAST(SUM(CASE WHEN T1.duration > 800 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Jose'

What is the percentage of trips that started in San Jose and durations were longer than 800 seconds ?

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


Question: What is the document object id with the least number of documents ?

select document_object_id , count(*) from document_subset_members group by document_object_id order by count(*) asc limit 1;

What is the document object i d with the least number of documents ?

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


Question: What are the names of the technicians that are assigned to repair machines with more point values than 70?

SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID WHERE T2.value_points  >  70

What are the names of the technicians that are assigned to repair machines with more point values than 70 ?

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


Question: At which restaurant did the students spend the least amount of time? List restaurant and the time students spent on in total.

SELECT Restaurant.ResName ,  sum(Visits_Restaurant.Spent) FROM Visits_Restaurant JOIN Restaurant ON Visits_Restaurant.ResID = Restaurant.ResID GROUP BY Restaurant.ResID ORDER BY sum(Visits_Restaurant.Spent) ASC LIMIT 1;

At which restaurant did the students spend the least amount of time ? List restaurant and the time students spent on in total .

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


Question: How many object samples in image no.1 are in the class of "man"?

SELECT SUM(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1

How many object samples in image no.1 are in the class of " man " ?

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


Question: What are the id and name of the stations that have ever had more than 12 bikes available?

SELECT DISTINCT T1.id ,  T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  >  12

What are the i d and name of the stations that have ever had more than 12 bikes available ?

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


Question: Find the last names of the students in third grade that are not taught by COVIN JEROME.

SELECT DISTINCT T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  3 AND T2.firstname != "COVIN" AND T2.lastname != "JEROME"

Find the last names of the students in third grade that are not taught by COVIN JEROME .

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


Question: How many different answers did the question "Describe the conversation you had with your previous employer about your mental health, including their reactions and actions taken to address your mental health issue/questions." get?

SELECT COUNT(DISTINCT T1.AnswerText) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Describe the conversation you had with your previous employer about your mental health, including their reactions and actions taken to address your mental health issue/questions.'

How many different answers did the question " Describe the conversation you had with your previous employer about your mental health , including their reactions and actions taken to address your mental health issue / questions . " get ?

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


Question: What is the total number of sales across all regions?

SELECT SUM(T.num_sales) * 100000 FROM region_sales t

What is the total number of sales across all regions ?


Question: What are the names of the businesses that passed with conditions in May 2012?

SELECT DISTINCT T2.dba_name FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T1.inspection_date) = '2012-05' AND T1.results = 'Pass w/ Conditions'

What are the names of the businesses that passed with conditions in May 2012 ?

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


Question: Return the claim start date for the claims whose claimed amount is no more than the average

SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled  <=  ( SELECT avg(Amount_Settled) FROM Claims )

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


Question: What is the name of the movie whose critic received the highest 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 1

What is the name of the movie whose critic received the highest number of likes related to the critic made by the user rating the movie ?

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


Question: What is the longest runtime of all movies?

What is the longest runtime of all movies ?


Question: How many restaurants were inspected on 2015/5/8?

SELECT COUNT(T2.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_date = '2015-05-08' AND T1.facility_type = 'Restaurant'

How many restaurants were inspected on 2015/5/8 ?


Question: What are the years, titles, and publishers for all books, ordered by year descending?

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

What are the years , titles , and publishers for all books , ordered by year descending ?

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


Question: Find the number of settlements each claim corresponds to. Show the number together with the claim id.

SELECT T1.Claim_id ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id

Find the number of settlements each claim corresponds to . Show the number together with the claim i d.

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


Question: List names of all pilot in descending order of age.

SELECT Name FROM pilot ORDER BY Age DESC

List names of all pilot in descending order of age .

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


Question: How many paying subscribers gave a rating to the movie "One Flew Over the Cuckoo's Nest"?

SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN ratings_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'One Flew Over the Cuckoo''s Nest' AND T3.user_has_payment_method = 1

How many paying subscribers gave a rating to the movie " One Flew Over the Cuckoo 's Nest " ?

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


Question: Show the number of staff roles.


Question: Give the name of the director of the movie in which Verna Felton was the voice actor for its character "Aunt Sarah".

SELECT T1.director FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.name WHERE T2.character = 'Aunt Sarah' AND T2.`voice-actor` = 'Verna Felton'

Give the name of the director of the movie in which Verna Felton was the voice actor for its character " Aunt Sarah " .

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


Question: List the top five dishes, by descending order, in terms of highest price.

SELECT name FROM Dish ORDER BY highest_price DESC LIMIT 5

List the top five dishes , by descending order , in terms of highest price .

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


Question: How many businesses in the fashion industry are rated 5 stars?

SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars = 5 AND T3.category_name LIKE 'Fashion'

How many businesses in the fashion industry are rated 5 stars ?

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


Question: Find the name all districts with city area greater than 10 or population larger than 100000

SELECT district_name FROM district WHERE city_area  >  10 OR City_Population  >  100000

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


Question: Identify the display name and location of the user, who was the last to edit the post with ID 183.

SELECT T2.DisplayName, T2.Location FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Id = 183 ORDER BY T1.LastEditDate DESC LIMIT 1

Identify the display name and location of the user , who was the last to edit the post with ID 183 .

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


Question: How many different cities do have some airport in the country of Greenland?

SELECT count(DISTINCT city) FROM airports WHERE country  =  'Greenland'

How many different cities do have some airport in the country of Greenland ?

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


Question: Show the average transaction amount for different transaction types.

SELECT transaction_type_code ,  avg(amount_of_transaction) FROM TRANSACTIONS GROUP BY transaction_type_code

Show the average transaction amount for different transaction types .

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


Question: Provide the facebook ID of the facebook account named "RepWilson".

SELECT facebook_id FROM `social-media` WHERE facebook = 'RepWilson'

Provide the facebook ID of the facebook account named " RepWilson " .

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


Question: How many inspections were done in January 2011?

SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y-%m', inspection_date) = '2011-01'

How many inspections were done in January 2011 ?


Question: How many dishes appear in the right upper corner of the menu page?

SELECT COUNT(*) FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T1.dish_id = T2.id WHERE T1.xpos > 0.75 AND T1.ypos < 0.25

How many dishes appear in the right upper corner of the menu page ?


Question: Which cities have the top 5 lowest enrollment number for students in grades 1 through 12?

SELECT T2.City FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode GROUP BY T2.City ORDER BY SUM(T1.`Enrollment (K-12)`) ASC LIMIT 5

Which cities have the top 5 lowest enrollment number for students in grades 1 through 12 ?

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


Question: Which venues and years did Columbia University have papers ?

select distinct t1.venue ,  t1.year 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 t3.name = "columbia university"

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


Question: Who was the captain-keeper of Rising Pune Supergiants?

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Team AS T3 ON T2.Team_Id = T3.Team_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id WHERE T3.Team_Name = 'Rising Pune Supergiants' AND T4.Role_Desc = 'CaptainKeeper' GROUP BY T1.Player_Name

Who was the captain - keeper of Rising Pune Supergiants ?

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


Question: Which district is the community area Lincoln Square grouped into?

SELECT side FROM Community_Area WHERE community_area_name = 'Lincoln Square'

Which district is the community area Lincoln Square grouped into ?

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


Question: Return the average and minimum ages across artists from the United States.

SELECT avg(age) ,  min(age) FROM artist WHERE country  =  'United States'

Return the average and minimum ages across artists from the United States .

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


Question: What are the start date and end date of the booking that has booked the product named 'Book collection A'?

SELECT T3.booking_start_date ,   T3.booking_end_date FROM Products_for_hire AS T1 JOIN products_booked AS T2 ON T1.product_id  =  T2.product_id JOIN bookings AS T3 ON T2.booking_id  =  T3.booking_id WHERE T1.product_name  =  'Book collection A'

What are the start date and end date of the booking that has booked the product named ' Book collection A ' ?

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


Question: What is the percentage calories protein of Raspberry Chiffon Pie?

SELECT pcnt_cal_prot 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 percentage calories protein of Raspberry Chiffon Pie ?


Question: What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2?

SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_1' AND T2.atom_id2 = 'TR000_2'

What is the type of the bond which is presenting the connection between two atoms TR000_1 and TR000_2 ?

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


Question: Find the name of the stadium that has the maximum capacity.

SELECT name FROM stadium ORDER BY capacity DESC LIMIT 1

Find the name of the stadium that has the maximum capacity .

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


Question: List all the object classes of the images that have a (5,5) coordinate.

SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 5 AND T1.Y = 5

List all the object classes of the images that have a ( 5,5 ) coordinate .

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


Question: Show the most frequently used carrier of the phones.

SELECT Carrier FROM phone GROUP BY Carrier ORDER BY COUNT(*) DESC LIMIT 1

Show the most frequently used carrier of the phones .


Question: List name of all amenities which Anonymous Donor Hall has, and sort the results in alphabetic order.

SELECT T1.amenity_name FROM dorm_amenity AS T1 JOIN has_amenity AS T2 ON T2.amenid  =  T1.amenid JOIN dorm AS T3 ON T2.dormid  =  T3.dormid WHERE T3.dorm_name  =  'Anonymous Donor Hall' ORDER BY T1.amenity_name

List name of all amenities which Anonymous Donor Hall has , and sort the results in alphabetic order .

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


Question: What is the campus fee for San Francisco State University in 1996?

SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND T2.year  =  1996

What is the campus fee for San Francisco State University in 1996 ?

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


Question: What is the journal's short and full names that feature papers on the "Materials" topic?

SELECT T2.ShortName, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Keyword LIKE '%Materials%'

What is the journal 's short and full names that feature papers on the " Materials " topic ?

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


Question: What are the different software platforms for devices, and how many devices have each?

SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform

What are the different software platforms for devices , and how many devices have each ?

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


Question: What are the rank, first name, and last name of the faculty members?

SELECT rank ,  Fname ,  Lname FROM Faculty

What are the rank , first name , and last name of the faculty members ?

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


Question: What are the subjects of series that have a restricted type of license?

SELECT DISTINCT Topic FROM Series WHERE LicenseType = 'Restricted'

What are the subjects of series that have a restricted type of license ?

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


Question: Name the university that had the most students in 2011.

SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 ORDER BY T1.num_students DESC LIMIT 1

Name the university that had the most students in 2011 .

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


Question: List out 3 customer numbers who have highest amount payment

SELECT customerNumber FROM payments ORDER BY amount DESC LIMIT 3

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


Question: Which students that are in the marines have been absent for 6 months?

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'marines' AND T1.`month` = 6

Which students that are in the marines have been absent for 6 months ?

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


Question: Find the name and Citation point of the universities whose reputation points are top 3 and above.

SELECT T1.University_Name ,  T2.Citation_point FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.Reputation_point DESC LIMIT 3

Find the name and Citation point of the universities whose reputation points are top 3 and above .

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


Question: Show the party that has the most people.

SELECT Party FROM people GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1

Show the party that has the most people .


Question: Which Crime film got the lowest average rating?

SELECT T2.movieid FROM u2base AS T2 INNER JOIN movies2directors AS T3 ON T2.movieid = T3.movieid WHERE T3.genre = 'Crime' GROUP BY T2.movieid ORDER BY AVG(T2.rating) LIMIT 1

Which Crime film got the lowest average rating ?


Question: Find the name of the dorm with the largest capacity.

SELECT dorm_name FROM dorm ORDER BY student_capacity DESC LIMIT 1

Find the name of the dorm with the largest capacity .


Question: What is the last name of the staff who has handled the first ever complaint?

SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id ORDER BY t2.date_complaint_raised LIMIT 1

What is the last name of the staff who has handled the first ever complaint ?

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


Question: Which room has the highest rate? List the room's full name, rate, check in and check out date.

SELECT T2.roomName ,  T1.Rate ,  T1.CheckIn ,  T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;

Which room has the highest rate ? List the room 's full name , rate , check in and check out date .

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


Question: What is the last date that a staff member left a project?

SELECT date_to FROM Project_Staff ORDER BY date_to DESC LIMIT 1

What is the last date that a staff member left a project ?


Question: What is the average number of international passengers for an airport?

SELECT avg(International_Passengers) FROM airport

What is the average number of international passengers for an airport ?

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


Question: Show different publishers together with the number of publications they have.

SELECT Publisher ,  COUNT(*) FROM publication GROUP BY Publisher

Show different publishers together with the number of publications they have .


Question: Give the number of inactive customers.

SELECT COUNT(customer_id) FROM customer WHERE active = 0


Question: What are the types of vocals that the musician with the last name "Heilo" played in "Der Kapitan"?

SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid JOIN band AS T3 ON T1.bandmate  =  T3.id WHERE T3.lastname  =  "Heilo" AND T2.title  =  "Der Kapitan"

What are the types of vocals that the musician with the last name " Heilo " played in " Der Kapitan " ?

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


Question: How many establishments have an inspection score of no more than 50?

SELECT COUNT(DISTINCT business_id) FROM inspections WHERE score < 50

How many establishments have an inspection score of no more than 50 ?

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


Question: In romantic movies, how many of them starred by John Travolta?

SELECT COUNT(*) 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.Genre = 'Romance' AND T3.Name = 'John Travolta'

In romantic movies , how many of them starred by John Travolta ?

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


Question: For the team had the biggest power play percentage in 2011, who was their coach that season? Give the full name.

SELECT T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID WHERE T2.year = 2011 ORDER BY CAST(T2.PPG AS REAL) / T2.PPC DESC LIMIT 1

For the team had the biggest power play percentage in 2011 , who was their coach that season ? Give the full name .

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


Question: Among the books ordered by Lucas Wyldbore, how many of them are over 300 pages?

SELECT COUNT(*) 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.first_name = 'Lucas' AND T4.last_name = 'Wyldbore' AND T1.num_pages > 300

Among the books ordered by Lucas Wyldbore , how many of them are over 300 pages ?

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


Question: Give the color description for the product 'catnip'.

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

Give the color description for the product ' catnip ' .

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


Question: Among the coaches who have taught teams from the NHL League, how many of them are from Canada?

SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.lgID = 'NHL' AND T1.birthCountry = 'Canada'

Among the coaches who have taught teams from the NHL League , how many of them are from Canada ?

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


Question: Which employees have clearance in Omega III? List employees' name.

SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name  =  "Omega III";

Which employees have clearance in Omega III ? List employees ' name .

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


Question: How many parts have a jumbo case container?

SELECT COUNT(p_partkey) FROM part WHERE p_container = 'JUMBO CASE'

How many parts have a jumbo case container ?

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


Question: Provide the competitors' names who joined the 2000 Summer.

SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2000 Summer'

Provide the competitors ' names who joined the 2000 Summer .

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


Question: List line items shipped by truck with delivery time before 1997.

SELECT l_linenumber FROM lineitem WHERE STRFTIME('%Y', l_shipdate) < 1997 AND l_shipmode = 'truck'

List line items shipped by truck with delivery time before 1997 .

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


Question: Of the first 60,000 customers' responses to the incentive mailing sent by the marketing department, how many of them are considered a true response?

SELECT COUNT(REFID) custmoer_number FROM Mailings1_2 WHERE RESPONSE = 'true'

Of the first 60,000 customers ' responses to the incentive mailing sent by the marketing department , how many of them are considered a true response ?

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


Question: Find the name and component amount of the least popular furniture.

SELECT name ,  Num_of_Component FROM furniture ORDER BY market_rate LIMIT 1

Find the name and component amount of the least popular furniture .

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


Question: When did the first match that score more than 10 goals happen?

SELECT MIN(Date) FROM matchs WHERE FTHG + FTAG > 10

When did the first match that score more than 10 goals happen ?


Question: In 2012, how many complaints about Credit card product came from clients in Omaha?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Omaha' AND strftime('%Y', T2.`Date received`) = '2012' AND T2.Product = 'Credit card'

In 2012 , how many complaints about Credit card product came from clients in Omaha ?

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


Question: Who is the player who received the man of the match award during the last match of Season 9?

SELECT T1.Player_name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match WHERE T2.Season_Id = 9 ORDER BY T2.Match_Date DESC LIMIT 1

Who is the player who received the man of the match award during the last match of Season 9 ?

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


Question: Find all information of all the products with a price between $60 and $120.

SELECT * FROM products WHERE price BETWEEN 60 AND 120

Find all information of all the products with a price between $ 60 and $ 120 .

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


Question: What are the names of products whose availability equals to 1?

SELECT T2.product_name FROM view_product_availability AS T1 JOIN products_for_hire AS T2 ON T1.product_id  =  T2.product_id WHERE T1.available_yn  =  1

What are the names of products whose availability equals to 1 ?

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


Question: Find the prices of products which has never received a single complaint.

SELECT product_price FROM products WHERE product_id NOT IN (SELECT product_id FROM complaints)

Find the prices of products which has never received a single complaint .


Question: Show all conference names which the staff from Canada attends.

SELECT T1.conference_name FROM conference AS T1 JOIN conference_participation AS T2 ON T1.conference_id = T2.conference_id JOIN staff AS T3 ON T2.staff_id  =  T3.staff_id WHERE T3.nationality  =  "Canada"

Show all conference names which the staff from Canada attends .

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


Question: What is the city name of country ID 3?

SELECT City_Name FROM City WHERE Country_ID = 3

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


Question: What is the id of the artist with the most paintings before 1900?

SELECT T1.artistID FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  <  1900 GROUP BY T1.artistID ORDER BY count(*) DESC LIMIT 1

What is the i d of the artist with the most paintings before 1900 ?

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


Question: What was the job of Dariusz Wolski in the movie "Pirates of the Caribbean: At World's End"?

SELECT T2.job FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T3.person_name = 'Dariusz Wolski'

What was the job of Dariusz Wolski in the movie " Pirates of the Caribbean : At World 's End " ?

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


Question: Which language does the film AIRPORT POLLOCK use? List the language name.

SELECT T2.name FROM film AS T1 JOIN LANGUAGE AS T2 ON T1.language_id  =  T2.language_id WHERE T1.title  =  'AIRPORT POLLOCK'

Which language does the film AIRPORT POLLOCK use ? List the language name .

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


Question: How many different last names do the actors and actresses have?

SELECT count(DISTINCT last_name) FROM actor

How many different last names do the actors and actresses have ?

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


Question: Sort all the customers by the level of membership in ascending order, and return the customer names.

SELECT Name FROM customer ORDER BY Level_of_Membership ASC

Sort all the customers by the level of membership in ascending order , and return the customer names .

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


Question: Name the publisher who published the most books.

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1

Name the publisher who published the most books .


Question: Provide the games that can be played on the SCD platform.

SELECT T4.game_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T2.platform_name = 'SCD'

Provide the games that can be played on the SCD platform .

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


Question: Among the products that get over at least 1 review, how many of them are from the mountain product line?

SELECT SUM(CASE WHEN T2.ProductLine = 'M' THEN 1 ELSE 0 END) FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID HAVING COUNT(T1.ProductReviewID) > 1

Among the products that get over at least 1 review , how many of them are from the mountain product line ?

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


Question: List the position of players and the average number of points of players of each position.

SELECT POSITION ,  avg(Points) FROM player GROUP BY POSITION

List the position of players and the average number of points of players of each position .

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


Question: Find the number and average age of students living in each city.

SELECT count(*) ,  avg(age) ,  city_code FROM student GROUP BY city_code

Find the number and average age of students living in each city .

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


Question: Who is the director of the movie Sex, Drink and Bloodshed?

SELECT director_name FROM movies WHERE movie_title = 'Sex, Drink and Bloodshed'

Who is the director of the movie Sex , Drink and Bloodshed ?

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


Question: How many different locations does the school with code BUS has?

SELECT count(DISTINCT dept_address) FROM department WHERE school_code  =  'BUS'

How many different locations does the school with code BUS has ?

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


Question: Show the id and star rating of each hotel, ordered by its price from low to high.

SELECT hotel_id ,  star_rating_code FROM HOTELS ORDER BY price_range ASC

Show the i d and star rating of each hotel , ordered by its price from low to high .

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


Question: Indicate the name of the products that have been shipped to the city of Paris.

SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.ShipCity = 'Paris'

Indicate the name of the products that have been shipped to the city of Paris .

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


Question: What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly?

SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid WHERE T2.distance  >  5000 GROUP BY T1.aid ORDER BY count(*)  >=  5

What is the name and distance of every aircraft that can cover a distance of more than 5000 and which at least 5 people can fly ?

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


Question: What is the average population of the wards where apartment crimes have been reported without arrests?

SELECT AVG(T2.Population) FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.location_description = 'APARTMENT' AND T1.arrest = 'FALSE'

What is the average population of the wards where apartment crimes have been reported without arrests ?

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


Question: What is the biggest monthly consumption of the customers who use euro as their currency?

SELECT SUM(T2.Consumption) / 12 AS MonthlyConsumption FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY MonthlyConsumption DESC LIMIT 1

What is the biggest monthly consumption of the customers who use euro as their currency ?

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


Question: List out the title of the word have id less than 20.

SELECT DISTINCT T1.title FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid < 20

List out the title of the word have i d less than 20 .

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


Question: List the paragraph number and paragraphs said by the character named "Sir Andrew Aguecheek".

SELECT T2.ParagraphNum, T2.id FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Andrew Aguecheek'

List the paragraph number and paragraphs said by the character named " Sir Andrew Aguecheek " .

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


Question: State the ID number for the attribute named "Accepts Insurance"?

SELECT attribute_id FROM Attributes WHERE attribute_name = 'Accepts Insurance'

State the ID number for the attribute named " Accepts Insurance " ?

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


Question: What is the full address of the customers who, having received a timely response from the company, have dispute about that response?

SELECT T1.address_1, T1.address_2 FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Timely response?` = 'Yes' AND T2.`Consumer disputed?` = 'Yes'

What is the full address of the customers who , having received a timely response from the company , have dispute about that response ?

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


Question: Find and list the full name of customers who bought products above-average quantity.

SELECT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.Quantity HAVING T1.Quantity > ( SELECT AVG(Quantity) FROM Sales )

Find and list the full name of customers who bought products above - average quantity .

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


Question: How many people had filled a role in the episode titled "Cherished", but did not show up in the on-screen credits?

SELECT COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Cherished' AND T2.credited = 'false'

How many people had filled a role in the episode titled " Cherished " , but did not show up in the on - screen credits ?

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


Question: What is the title, credit value, and department name for courses with more than one prerequisite?

SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1

What is the title , credit value , and department name for courses with more than one prerequisite ?

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


Question: Return the names of pilots who are older than any pilot who has flown Piper Cub, ordered alphabetically.

SELECT pilot_name FROM pilotskills WHERE age  >  (SELECT min(age) FROM pilotskills WHERE plane_name  =  'Piper Cub') ORDER BY pilot_name

Return the names of pilots who are older than any pilot who has flown Piper Cub , ordered alphabetically .

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


Question: Provide the customers' names who ordered the Fantasmas.

SELECT T4.first_name, T4.last_name 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 T1.title = 'Fantasmas'

Provide the customers ' names who ordered the Fantasmas .


Question: Identify by their id all the orders that have been cancelled.

SELECT T2.order_id FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Cancelled'

Identify by their i d all the orders that have been cancelled .

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


Question: Among the app users who were not active when event no.2 happened, how many of them belong to the category Property Industry 1.0?

SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id INNER JOIN app_events AS T3 ON T2.app_id = T3.app_id WHERE T3.is_active = 0 AND T1.category = 'Property Industry 1.0' AND T3.event_id = 2

Among the app users who were not active when event no.2 happened , how many of them belong to the category Property Industry 1.0 ?

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


Question: How many medicines have the FDA approval status 'No' ?

SELECT count(*) FROM medicine WHERE FDA_approved  =  'No'

How many medicines have the FDA approval status ' No ' ?

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


Question: What is the lowest sentiment polarity score of the Basketball Stars app for people who dislikes the app pretty much and how many downloads does it have?

SELECT MIN(T2.Sentiment_Polarity), T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Basketball Stars'

What is the lowest sentiment polarity score of the Basketball Stars app for people who dislikes the app pretty much and how many downloads does it have ?

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


Question: Which room has the highest base price?

SELECT RoomId ,  roomName FROM Rooms ORDER BY basePrice DESC LIMIT 1;


Question: What are the distinct ids and product names of the bikes that are purchased after year 2015?

SELECT DISTINCT T1.id ,  T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.bike_id WHERE T2.purchase_year  >  2015

What are the distinct ids and product names of the bikes that are purchased after year 2015 ?

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


Question: List the name of film studio that have the most number of films.

SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1

List the name of film studio that have the most number of films .

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


Question: Please list the short name of countries which have the latest trade data after 2010.

SELECT ShortName FROM Country WHERE LatestTradeData > 2010

Please list the short name of countries which have the latest trade data after 2010 .

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


Question: Compute the run rate at the end of 16 overs of the match ID 335999. Please include the name of the "Man of_the Match".

SELECT CAST(COUNT(CASE WHEN T1.Toss_Name = 'bat' THEN T3.Runs_Scored ELSE NULL END) AS REAL) / SUM(CASE WHEN T1.Toss_Name = 'field' THEN 1 ELSE 0 END) FROM Toss_Decision AS T1 INNER JOIN Match AS T2 ON T1.Toss_Id = T2.Toss_Decide INNER JOIN Batsman_Scored AS T3 ON T2.Match_Id = T3.Match_Id WHERE T2.Match_Id = 335987 AND T2.Match_Date = '2008-04-18' GROUP BY T3.Over_Id HAVING COUNT(T1.Toss_Name = 'field') = 16

Compute the run rate at the end of 16 overs of the match ID 335999 . Please include the name of the " Man of_the Match " .

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


Question: How many class 1 senators belong to the Republican party?

SELECT COUNT(bioguide) FROM `current-terms` WHERE class = 1 AND party = 'Republican'

How many class 1 senators belong to the Republican party ?

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


Question: Indicate the number of authors affiliated with the organization named 'Arizona State University'.

SELECT COUNT(Name) FROM Author WHERE Affiliation = 'Arizona State University'

Indicate the number of authors affiliated with the organization named ' Arizona State University ' .

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


Question: Which city has more Yelp_Business that's more appealing to users, Scottsdale or Anthem?

SELECT city FROM Business ORDER BY review_count DESC LIMIT 1

Which city has more Yelp_Business that 's more appealing to users , Scottsdale or Anthem ?

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


Question: Identify the name and product category for the most expensive and the least expensive products.

SELECT T2.ProductName, T1.CategoryName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.UnitPrice IN (( SELECT MIN(UnitPrice) FROM Products ), ( SELECT MAX(UnitPrice) FROM Products ))

Identify the name and product category for the most expensive and the least expensive products .

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


Question: Give the ids for goods that have Apricot flavor and have a price lower than 5 dollars.

SELECT id FROM goods WHERE flavor  =  "Apricot" AND price  <  5

Give the ids for goods that have Apricot flavor and have a price lower than 5 dollars .

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


Question: Find the name of the department that offers the highest total credits?

SELECT dept_name FROM course GROUP BY dept_name ORDER BY sum(credits) DESC LIMIT 1

Find the name of the department that offers the highest total credits ?


Question: Show the other details for the author Addison Denesik.

SELECT other_details FROM Authors WHERE author_name  =  "Addison Denesik"

Show the other details for the author Addison Denesik .

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


Question: Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992-6-12?

SELECT T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT = 9.0 AND T2.Date = '1992-06-12'

Was the patient a man or a women whose ALT glutamic pylvic transaminase status got 9 on 1992 - 6 - 12 ?

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


Question: Give the name of the venue where the most number of matches are held.

SELECT T2.Venue_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id GROUP BY T2.Venue_Name ORDER BY COUNT(T2.Venue_Id) DESC LIMIT 1

Give the name of the venue where the most number of matches are held .

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


Question: List the height and weight of people in descending order of height.

SELECT Height ,  Weight FROM people ORDER BY Height DESC

List the height and weight of people in descending order of height .

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


Question: How many methods with solutions with path 'maravillas_linq-to-delicious\tasty.sln'?

SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'maravillas_linq-to-delicious\tasty.sln'

How many methods with solutions with path ' maravillas_linq - to - delicious\tasty.sln ' ?

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


Question: What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL?

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.`Date received` = '2017-03-27' AND T2.server = 'MICHAL'

What is the full name of the client whose complaint on 2017/3/27 was received by MICHAL ?

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


Question: List the name of all products that Cindy Stewart ordered in the east superstore.

SELECT T3.`Product Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Cindy Stewart'

List the name of all products that Cindy Stewart ordered in the east superstore .

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


Question: What's the decrease rate of the game plays did David Aebischer after he got traded in 2005?

SELECT CAST((SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) - SUM(CASE WHEN T1.year = 2006 THEN T1.GP ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.year = 2005 THEN T1.GP ELSE 0 END) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.firstName = 'David' AND T2.lastName = 'Aebischer'

What 's the decrease rate of the game plays did David Aebischer after he got traded in 2005 ?

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


Question: Find the SSN and name of scientists who are assigned to the project with the longest hours.

SELECT T3.ssn ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)

Find the SSN and name of scientists who are assigned to the project with the longest hours .

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


Question: Give the title of the paper with the most authors.

SELECT T2.title FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id GROUP BY T2.paper_id ORDER BY count(*) DESC LIMIT 1

Give the title of the paper with the most authors .

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


Question: List down all of the winning teams' IDs that played in St George's Park.

SELECT T2.Match_Winner FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Venue_Name LIKE 'St George%'

List down all of the winning teams ' IDs that played in St George 's Park .

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


Question: Find the female friends of Alice.

SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'female'


Question: From 1975 to 1980, how much is the total amount CO2 emmission in kiloton of the the world? Indicate which year the world recorded its highest CO2 emmissions.

SELECT SUM(T1.Value), T1.Year FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'CO2 emissions (kt)' AND T1.Year >= 1975 AND T1.Year < 1981 AND T1.CountryCode = 'WLD' AND T2.SpecialNotes = 'World aggregate.'

From 1975 to 1980 , how much is the total amount CO2 emmission in kiloton of the the world ? Indicate which year the world recorded its highest CO2 emmissions .

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


Question: What are the names of all pilots 30 years old or young in descending alphabetical order?

SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC

What are the names of all pilots 30 years old or young in descending alphabetical order ?

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


Question: What is the GNP of the least crowded city in the world?

SELECT T2.GNP FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code ORDER BY T1.Population ASC LIMIT 1

What is the GNP of the least crowded city in the world ?

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


Question: Among all superheroes created by George Lucas, identify the percentage of female superheroes.

SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.publisher_name = 'George Lucas'

Among all superheroes created by George Lucas , identify the percentage of female superheroes .

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


Question: What is the full name of the driver who delivered the most shipments to the least populated city?

SELECT T1.first_name, T1.last_name FROM driver AS T1 INNER JOIN shipment AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T3.city_id = T2.city_id GROUP BY T1.first_name, T1.last_name, T3.population HAVING T3.population = MAX(T3.population) ORDER BY COUNT(*) DESC LIMIT 1

What is the full name of the driver who delivered the most shipments to the least populated city ?

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


Question: Show all card type codes and the number of cards in each type.

SELECT card_type_code ,  count(*) FROM Customers_cards GROUP BY card_type_code

Show all card type codes and the number of cards in each type .

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


Question: Among the "Mountain-500 Black" product types, which type was purchased the most?

SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE 'Mountain-500 Black%' GROUP BY T2.Quantity, T1.Name ORDER BY SUM(T2.Quantity) DESC LIMIT 1

Among the " Mountain-500 Black " product types , which type was purchased the most ?

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


Question: Where is Business Entity ID No.4 located at? Give the address down to street.

SELECT AddressLine1, AddressLine2 FROM Address WHERE AddressID IN ( SELECT AddressID FROM BusinessEntityAddress WHERE BusinessEntityID = 4 )

Where is Business Entity ID No.4 located at ? Give the address down to street .

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


Question: When did user 39115684 rate the movie "A Way of Life"?

SELECT T1.rating_score FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684

When did user 39115684 rate the movie " A Way of Life " ?

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


Question: Give the full name and contact number of members who had to spend more than average on each expense.

SELECT DISTINCT T3.first_name, T3.last_name, T3.phone FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id INNER JOIN member AS T3 ON T3.member_id = T1.link_to_member WHERE T1.cost > ( SELECT AVG(T1.cost) FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id INNER JOIN member AS T3 ON T3.member_id = T1.link_to_member )

Give the full name and contact number of members who had to spend more than average on each expense .

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


Question: Show all director names who have a movie in the year 1999 or 2000.

SELECT director FROM movie WHERE YEAR  =  1999 OR YEAR  =  2000

Show all director names who have a movie in the year 1999 or 2000 .

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


Question: How many word appeared 8 times? State the language id of the page.

SELECT COUNT(T2.wid), T1.lid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.occurrences = 8

How many word appeared 8 times ? State the language i d of the page .

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


Question: List the phone brands and models of the users under 10 years of age.

SELECT T2.phone_brand, T2.device_model FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age < 10

List the phone brands and models of the users under 10 years of age .

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


Question: What are the positions of players whose average number of points scored by that position is larger than 20?

SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20

What are the positions of players whose average number of points scored by that position is larger than 20 ?

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


Question: What are the first names, middle initials, last names, and payment methods of all customers?

SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name ,  T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id  =  T2.customer_id

What are the first names , middle initials , last names , and payment methods of all customers ?

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


Question: Find the ids of orders which are shipped after 2000-01-01.

SELECT order_id FROM shipments WHERE shipment_date > "2000-01-01"

Find the ids of orders which are shipped after 2000 - 01 - 01 .

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


Question: Calculate the average runs scored during the first half of all first innings.

SELECT CAST(SUM(CASE WHEN 1 < Over_Id AND Over_Id < 25 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(Runs_Scored) FROM Batsman_Scored WHERE Innings_No = 1

Calculate the average runs scored during the first half of all first innings .

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


Question: Among the male legislators born between 1955 to 1965, what is the percentage of the legislators with an independent party?

SELECT CAST(SUM(CASE WHEN T2.party = 'Independent' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.party) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND strftime('%Y', T1.birthday_bio) BETWEEN '1955' AND '1965'

Among the male legislators born between 1955 to 1965 , what is the percentage of the legislators with an independent party ?

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


Question: List id of documents that in collection named Best but not in document subset Best for 2000.

SELECT DISTINCT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" EXCEPT SELECT DISTINCT T3.Document_Object_ID FROM Document_Subset_Members AS T3 JOIN Document_Subsets AS T4 ON T3.Document_Subset_ID =  T4.Document_Subset_ID WHERE T4.Document_Subset_Name = "Best for 2000"

List i d of documents that in collection named Best but not in document subset Best for 2000 .

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


Question: For the goalkeeper that became a coach than a Hall of Famer, who played for BOS in 1972?

SELECT T2.firstName, T2.lastName , IIF(T1.tmID = 'BOS', 'YES', 'NO') FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 1972 AND T1.tmID = 'BOS' AND T2.coachID IS NOT NULL AND T2.hofID IS NULL

For the goalkeeper that became a coach than a Hall of Famer , who played for BOS in 1972 ?

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


Question: Find the name and position of the head of the department with the least employees.

SELECT T2.name ,  T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head  =  T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;

Find the name and position of the head of the department with the least employees .

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


Question: Show the name for regions and the number of storms for each region.

SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id

Show the name for regions and the number of storms for each region .


Question: What is the family name of the employee who shipped the order 10521 to CACTU?

SELECT T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10521 AND T2.CustomerID = 'CACTU'

What is the family name of the employee who shipped the order 10521 to CACTU ?

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


Question: Find the total hours of all projects.


Question: what are the top 3 highest support rates?

SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3

what are the top 3 highest support rates ?


Question: Find the unique id of the painters who had medium oil paintings exhibited at gallery 240?

SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"

Find the unique i d of the painters who had medium oil paintings exhibited at gallery 240 ?

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


Question: Calculate the total price of books ordered by customer named 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'

Calculate the total price of books ordered by customer named Lucas Wyldbore .

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


Question: Among the establishments that failed the inspection in February 2010, list the names of the employees with a salary greater than 70% of the average salary of all employees.

SELECT DISTINCT T1.employee_id FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Fail' AND strftime('%Y-%m', T2.inspection_date) = '2010-02' AND T1.salary > 0.7 * ( SELECT AVG(salary) FROM employee )

Among the establishments that failed the inspection in February 2010 , list the names of the employees with a salary greater than 70 % of the average salary of all employees .

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


Question: Find the description of the club called "Tennis Club".

SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club"

Find the description of the club called " Tennis Club " .

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


Question: From 1979 to 1982, what was the percentage of united.states albums out of total albums were released?

SELECT CAST(SUM(CASE WHEN T2.tag LIKE 'united.states' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.releaseType) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupYear BETWEEN 1979 AND 1982 AND T1.releaseType LIKE 'album'

From 1979 to 1982 , what was the percentage of united.states albums out of total albums were released ?

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


Question: What is the name of the author with the most papers in 2009?

SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T1.year  =  2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1

What is the name of the author with the most papers in 2009 ?

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


Question: What are the names of the members and branches at which they are registered sorted by year of registration?

SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year

What are the names of the members and branches at which they are registered sorted by year of registration ?

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


Question: List the name of persons who were not included in the credit for the 'How the Test Was Won' episode.

SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.credited = 'false';

List the name of persons who were not included in the credit for the ' How the Test Was Won ' episode .

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


Question: List the season, home team, away team of all the games.

SELECT season ,  home_team ,  away_team FROM game

List the season , home team , away team of all the games .

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


Question: What is the oldest log id and its corresponding problem id?

SELECT problem_log_id ,  problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1

What is the oldest log i d and its corresponding problem i d ?

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