Question: List the business ID of shopping business that have 4 stars ratings.

SELECT T1.business_id FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Shopping' AND T1.stars = 4

List the business ID of shopping business that have 4 stars ratings .

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


Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number.

SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%' ORDER BY department_id

display the full name ( first and last ) , hire date , salary , and department number for those employees whose first name does not containing the letter M and make the result set in ascending order by department number .

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


Question: Between 2014 to 2016, what is the average inpsection score of the establishment owned by Yiu Tim Chan in 808 Pacific Ave, San Francisco?

SELECT AVG(T1.score) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) BETWEEN '2014' AND '2016' AND T2.owner_name = 'Yiu Tim Chan' AND T2.address = '808 Pacific Ave' AND T2.city = 'San Francisco'

Between 2014 to 2016 , what is the average inpsection score of the establishment owned by Yiu Tim Chan in 808 Pacific Ave , San Francisco ?

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


Question: List all the films with the word "Lacklusture" in their description.

SELECT title FROM film_text WHERE description LIKE '%Lacklusture%'

List all the films with the word " Lacklusture " in their description .

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


Question: Who is the oldest patient with the highest total cholesterol (T-CHO). State the patient ID and T-CHO index.

SELECT T1.ID, T2.`T-CHO` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID ORDER BY T2.`T-CHO` DESC, T1.Birthday ASC LIMIT 1

Who is the oldest patient with the highest total cholesterol ( T - CHO ) . State the patient ID and T - CHO index .

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


Question: For grants that have descriptions of Regular and Initial Applications, what are their start dates?

SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'

For grants that have descriptions of Regular and Initial Applications , what are their start dates ?

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


Question: Show the detention start time and end time of the detentions.

SELECT datetime_detention_start ,  datetime_detention_end FROM Detention

Show the detention start time and end time of the detentions .

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


Question: What are the prices and sizes of all products whose price is above the mean?

SELECT product_price ,  product_size FROM Products WHERE product_price  >  ( SELECT avg(product_price) FROM Products )

What are the prices and sizes of all products whose price is above the mean ?

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


Question: What is the first name of students who got grade C in any class?

SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE enroll_grade  =  'C'

What is the first name of students who got grade C in any class ?

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


Question: Name the dishes that were on the menu page ID 174.

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

Name the dishes that were on the menu page ID 174 .

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


Question: Sort the names of all counties in ascending order of population.

SELECT County_name FROM county ORDER BY Population ASC

Sort the names of all counties in ascending order of population .


Question: What are the salaries and manager ids for employees who have managers?

SELECT salary ,  manager_id FROM employees WHERE manager_id != "null"

What are the salaries and manager ids for employees who have managers ?

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


Question: Provide case numbers, aldermen's full names, and district names of the crimes that happened in 0000X N FRANCISCO AVE.

SELECT T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no INNER JOIN Ward AS T3 ON T2.ward_no = T3.ward_no WHERE T2.block = '0000X N FRANCISCO AVE' GROUP BY T2.case_number, T3.alderman_first_name, T3.alderman_last_name, T1.district_name

Provide case numbers , aldermen 's full names , and district names of the crimes that happened in 0000X N FRANCISCO AVE .

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


Question: How many instruments does the song "Badlands" use?

SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"

How many instruments does the song " Badlands " use ?

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


Question: List out the birth name of crews who are co-executive producer and higher than 1.60 meters.

SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'co-executive producer' AND T1.height_meters > 1.60;

List out the birth name of crews who are co - executive producer and higher than 1.60 meters .

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


Question: Which student was able to generate income more than $40?

SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T2.amount > 40

Which student was able to generate income more than $ 40 ?


Question: What is the number of graduates in "San Francisco State University" in year 2004?

SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"

What is the number of graduates in " San Francisco State University " in year 2004 ?

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


Question: Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities?

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Feb  >  T2.Jun UNION SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Give me a list of cities whose temperature in Feb is higher than that in Jun or cities that were once host cities ?

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


Question: Find the name and age of pilots who have a plane in Austin.

SELECT T1.pilot_name ,  T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin"

Find the name and age of pilots who have a plane in Austin .

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


Question: For the county represented by Thompson Bennie G, how many bad aliases does it have?

SELECT COUNT(DISTINCT T2.bad_alias) FROM zip_congress AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T1.district = T3.cognress_rep_id WHERE T3.first_name = 'Thompson' AND T3.last_name = 'Bennie G'

For the county represented by Thompson Bennie G , how many bad aliases does it have ?

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


Question: What's Lynn N Tsoflias's job title?

SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Lynn' AND T1.MiddleName = 'N' AND T1.LastName = 'Tsoflias'

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


Question: Which district in Chicago has the most community areas?

SELECT side FROM Community_Area GROUP BY side ORDER BY COUNT(side) DESC LIMIT 1

Which district in Chicago has the most community areas ?


Question: What are the names of all pilots listed by descending age?

SELECT Name FROM pilot ORDER BY Age DESC

What are the names of all pilots listed by descending age ?

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


Question: What is the elevation of the city belonging to Hampden, Massachusetts?

SELECT T3.elevation FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state INNER JOIN zip_data AS T3 ON T2.zip_code = T3.zip_code WHERE T1.name = 'Massachusetts' AND T2.county = 'HAMPDEN' GROUP BY T3.elevation

What is the elevation of the city belonging to Hampden , Massachusetts ?

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


Question: How many of the papers are preprinted?

SELECT COUNT(Id) FROM Paper WHERE ConferenceId = 0 AND JournalId = 0


Question: List the artists who illustrated cards with black borders which are available only in arena.

SELECT DISTINCT artist FROM cards WHERE availability = 'arena' AND BorderColor = 'black'

List the artists who illustrated cards with black borders which are available only in arena .

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


Question: What are the headphone models that cost less than the average price?

SELECT model FROM headphone WHERE price  <  (SELECT avg(price) FROM headphone)

What are the headphone models that cost less than the average price ?

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


Question: When was the first movie released and who directed it?

SELECT movie_release_year, director_name FROM movies WHERE movie_release_year IS NOT NULL ORDER BY movie_release_year ASC LIMIT 1

When was the first movie released and who directed it ?

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


Question: Tell the name of school in "NJ" that could get the bachelor's degree with highest students number.

SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'NJ' AND T1.level = '4-year' AND T1.student_count = ( SELECT MAX(T1.student_count) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'NJ' AND T1.level = '4-year' )

Tell the name of school in " NJ " that could get the bachelor 's degree with highest students number .

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


Question: How many All Star players who played in the 1973 season were black?

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.season_id = 1973 AND T1.race = 'B'

How many All Star players who played in the 1973 season were black ?

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


Question: How many students does each advisor have?

SELECT Advisor ,  count(*) FROM STUDENT GROUP BY Advisor

How many students does each advisor have ?


Question: What are the different conference names?

SELECT DISTINCT conference_name FROM conference

What are the different conference names ?


Question: Among the dishes, how many of them were created between 2011-03-31 at 20:24:46 UTC and 2011-04-15 at 23:09:51 UTC.

SELECT SUM(CASE WHEN T2.created_at BETWEEN '2011-03-31 20:24:46 UTC' AND '2011-04-15 23:09:51 UTC' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id

Among the dishes , how many of them were created between 2011 - 03 - 31 at 20:24:46 UTC and 2011 - 04 - 15 at 23:09:51 UTC .

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


Question: Find the year and semester when offers the largest number of courses.

SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1

Find the year and semester when offers the largest number of courses .


Question: For every student who is registered for some course, how many courses are they registered for?

SELECT T1.student_id ,  count(*) FROM students AS T1 JOIN student_course_registrations AS T2 ON T1.student_id = T2.student_id GROUP BY T1.student_id

For every student who is registered for some course , how many courses are they registered for ?

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


Question: Among all the tweets that have a positive sentiment, how many of them are posted on Thursday?

SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Sentiment > 0 AND Weekday = 'Thursday'

Among all the tweets that have a positive sentiment , how many of them are posted on Thursday ?

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


Question: How many climbers are there?


Question: Among the employees in the Manufacturing group in 2007, how many of them are store contacts?

SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Person AS T3 ON T1.BusinessEntityID WHERE T3.PersonType = 'SC' AND T2.GroupName = 'Manufacturing' AND STRFTIME('%Y', T1.EndDate) >= '2007' AND STRFTIME('%Y', T1.StartDate) <= '2007'

Among the employees in the Manufacturing group in 2007 , how many of them are store contacts ?

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


Question: List each test result and its count in descending order of count.

SELECT test_result ,  COUNT(*) FROM Student_Tests_Taken GROUP BY test_result ORDER BY COUNT(*) DESC

List each test result and its count in descending order of count .


Question: What are the names of hosts who did not host any party in our record?

SELECT Name FROM HOST WHERE Host_ID NOT IN (SELECT Host_ID FROM party_host)

What are the names of hosts who did not host any party in our record ?

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


Question: Who are the top 8 suppliers supplying the products with the highest user satisfaction?

SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID ORDER BY T1.ReorderLevel DESC LIMIT 8

Who are the top 8 suppliers supplying the products with the highest user satisfaction ?

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


Question: What year were the first game released?

SELECT T.release_year FROM game_platform AS T ORDER BY T.release_year ASC LIMIT 1

What year were the first game released ?


Question: What is the average age of drivers for each make? Return the average age and make.

SELECT avg(age) ,  Make FROM driver GROUP BY make

What is the average age of drivers for each make ? Return the average age and make .

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


Question: Find the name of spokesmen who do not speak for any district.

SELECT name FROM spokesman WHERE Spokesman_ID NOT IN (SELECT Spokesman_ID FROM spokesman_district)

Find the name of spokesmen who do not speak for any district .

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


Question: What are the first and last names of the top 10 longest-serving employees?

SELECT first_name , last_name FROM employees ORDER BY hire_date ASC LIMIT 10;

What are the first and last names of the top 10 longest - serving employees ?

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


Question: How many games were played in city Atlanta in 2000?

SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year  =  2000 AND T2.city  =  'Atlanta';

How many games were played in city Atlanta in 2000 ?

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


Question: Please indicate which writer has an episode star score greater than 5 in 2009.

SELECT T1.person FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2009' AND T1.role = 'writer' AND T2.votes > 5;

Please indicate which writer has an episode star score greater than 5 in 2009 .

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


Question: Name the main character of Disney's most popular adventure movie based on its inflation-adjusted gross.

SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Adventure' ORDER BY CAST(REPLACE(trim(T1.inflation_adjusted_gross, '$'), ',', '') AS REAL) DESC LIMIT 1

Name the main character of Disney 's most popular adventure movie based on its inflation - adjusted gross .

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


Question: Tell me the reason for Lavelle Vandervort's encounter on 11/20/2013?

SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.DATE = '2013-11-20' AND T1.first = 'Lavelle' AND T1.last = 'Vandervort'

Tell me the reason for Lavelle Vandervort 's encounter on 11/20/2013 ?

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


Question: Where does the customer with the first name Linda live? And what is her email?

SELECT T2.address ,  T1.email FROM customer AS T1 JOIN address AS T2 ON T2.address_id  =  T1.address_id WHERE T1.first_name  =  'LINDA'

Where does the customer with the first name Linda live ? And what is her email ?

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


Question: What are the id and name of the song sung by the most participants?

SELECT T1.id ,  T1.name FROM songs AS T1 JOIN performance_score AS T2 ON T1.id  =  T2.songs_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What are the i d and name of the song sung by the most participants ?

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


Question: What is the customer first, last name and id with least number of accounts.

SELECT T2.customer_first_name ,  T2.customer_last_name ,  T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) ASC LIMIT 1

What is the customer first , last name and i d with least number of accounts .

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


Question: What are the years of film market estimation for the market of Japan, ordered by year descending?

SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan" ORDER BY T1.Year DESC

What are the years of film market estimation for the market of Japan , ordered by year descending ?

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


Question: What is the product category description and unit of measurement of category "Herbs"?

SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"

What is the product category description and unit of measurement of category " Herbs " ?

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


Question: List all the seas with which the deepest sea merges.

SELECT T2.Sea2 FROM sea AS T1 INNER JOIN mergesWith AS T2 ON T1.Name = T2.Sea1 WHERE T1.Name = ( SELECT Name FROM sea ORDER BY Depth DESC LIMIT 1 )

List all the seas with which the deepest sea merges .

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


Question: Among the clients in Middle Atlantic, how many are them are female and no more than 18 years old?

SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Middle Atlantic' AND T1.sex = 'Female' AND T1.age < 18

Among the clients in Middle Atlantic , how many are them are female and no more than 18 years old ?

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


Question: Find the details of the teachers who have taught the student with the earliest transcript issuance.

SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id JOIN Transcripts AS T3 ON T2.student_id  =  T3.student_id ORDER BY T3.date_of_transcript ASC LIMIT 1

Find the details of the teachers who have taught the student with the earliest transcript issuance .

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


Question: How much, in total, did client number 617 pay for all of the transactions in 1998?

SELECT SUM(T3.amount) FROM client AS T1 INNER JOIN disp AS T4 ON T1.client_id = T4.client_id INNER JOIN account AS T2 ON T4.account_id = T2.account_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date)= '1998' AND T1.client_id = 617

How much , in total , did client number 617 pay for all of the transactions in 1998 ?

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


Question: Find the number of employees we have.


Question: In chartered schools with charter number 00D2, what are the names of all the administrators? Include the name of the school and the city to which it belongs

SELECT AdmFName1, AdmLName1, School, City FROM schools WHERE Charter = 1 AND CharterNum = '00D2'

In chartered schools with charter number 00D2 , what are the names of all the administrators ? Include the name of the school and the city to which it belongs

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


Question: What's the avatar image of the user who created the movie list "250 Favourite Films"?

SELECT T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films'

What 's the avatar image of the user who created the movie list " 250 Favourite Films " ?

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


Question: What are the ids of all employees that don't have certificates?

SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate

What are the ids of all employees that do n't have certificates ?

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


Question: In "No Loan Again, Naturally", how many stars received votes of no more than 50?

SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'No Loan Again, Naturally' AND T2.votes < 50;

In " No Loan Again , Naturally " , how many stars received votes of no more than 50 ?

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


Question: What are the top 10 customers' first and last names by total number of orders and how many orders did they make?

SELECT T1.first_name ,  T1.last_name ,  COUNT(*) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 10;

What are the top 10 customers ' first and last names by total number of orders and how many orders did they make ?

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


Question: Who is the director of movie Avatar?

SELECT director FROM Movie WHERE title  = 'Avatar'


Question: What are the names of everybody sorted by age in descending order?

SELECT name FROM Person ORDER BY age DESC

What are the names of everybody sorted by age in descending order ?


Question: How many restaurants have more than 4 star reviews?

SELECT COUNT(id_restaurant) AS cnt FROM generalinfo WHERE review > 4

How many restaurants have more than 4 star reviews ?


Question: In 2014, what are the id and rank of the team that has the largest average number of attendance?

SELECT T2.team_id ,  T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id WHERE T1.year  =  2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;

In 2014 , what are the i d and rank of the team that has the largest average number of attendance ?

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


Question: Give me the brewery and brand names of canned root beer that were purchased before 6/6/2015.

SELECT DISTINCT T2.BreweryName, T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.PurchaseDate < '2015-06-06' AND T1.ContainerType = 'Can'

Give me the brewery and brand names of canned root beer that were purchased before 6/6/2015 .

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


Question: Among the working days from Monday to Saturday, which businesses with the category names work the most days?

SELECT T2.category_name FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id GROUP BY T2.category_name ORDER BY COUNT(T3.day_id) DESC LIMIT 1

Among the working days from Monday to Saturday , which businesses with the category names work the most days ?

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


Question: What is the highest profit on net for a product?

SELECT LastReceiptCost - StandardPrice FROM ProductVendor ORDER BY LastReceiptCost - StandardPrice DESC LIMIT 1

What is the highest profit on net for a product ?


Question: For the patients with an abnormal Ig M level, what is the most common disease they are diagnosed with?

SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGM NOT BETWEEN 40 AND 400 GROUP BY T1.Diagnosis ORDER BY COUNT(T1.Diagnosis) DESC LIMIT 1

For the patients with an abnormal Ig M level , what is the most common disease they are diagnosed with ?

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


Question: List the id of the player who won the Orange Cap for 2 consecutive seasons.

SELECT Orange_Cap FROM Season GROUP BY Orange_Cap HAVING COUNT(Season_Year) > 1

List the i d of the player who won the Orange Cap for 2 consecutive seasons .

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


Question: List the ids of all paintings that are taller than the longest painting created after 1900.

SELECT paintingID FROM paintings WHERE height_mm  >   (SELECT max(height_mm) FROM paintings WHERE YEAR  >  1900)

List the ids of all paintings that are taller than the longest painting created after 1900 .

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


Question: What is the total number of people who have no friends living in Austin?

SELECT count(DISTINCT name) FROM PersonFriend WHERE friend NOT IN (SELECT name FROM person WHERE city  =  'Austin')

What is the total number of people who have no friends living in Austin ?

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


Question: What was the quantity of Xerox 1952 ordered by Aimee Bixby on 2014/9/10?

SELECT SUM(T2.Quantity) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952' AND T2.`Order Date` = '2014-09-10'

What was the quantity of Xerox 1952 ordered by Aimee Bixby on 2014/9/10 ?

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


Question: For each customer who has at least two orders, find the customer name and number of orders made.

SELECT T2.customer_name ,  count(*) FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  >=  2

For each customer who has at least two orders , find the customer name and number of orders made .

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


Question: Which industry has the most companies?

SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1


Question: For the teacher who wrote the project 'ABC Read', which city was he/she in?

SELECT T2.school_city FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'ABC Read'

For the teacher who wrote the project ' ABC Read ' , which city was he / she in ?

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


Question: Which teams have had a player awarded the Purple Cap and another with the Orange Cap in the same season?

SELECT T5.Team_Name, T1.Orange_Cap, T1.Purple_Cap FROM Season AS T1 INNER JOIN Match AS T2 ON T1.Season_Id = T2.Season_Id INNER JOIN Player_Match AS T3 ON T2.Match_Id = T3.Match_Id INNER JOIN Player AS T4 ON T3.Player_Id = T4.Player_Id INNER JOIN Team AS T5 ON T3.Team_Id = T5.Team_Id GROUP BY T5.Team_Name, T1.Orange_Cap, T1.Purple_Cap

Which teams have had a player awarded the Purple Cap and another with the Orange Cap in the same season ?

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


Question: Find the first and last names of people who payed more than the rooms' base prices.

SELECT T1.firstname ,  T1.lastname FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T1.Rate - T2.basePrice  >  0

Find the first and last names of people who payed more than the rooms ' base prices .

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


Question: How many French customers shipped 2 orders which have been cancelled?

SELECT COUNT(T2.country) FROM orders AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.status = 'Shipped' AND T2.country = 'France' GROUP BY T2.customerNumber HAVING COUNT(T1.status) = 2

How many French customers shipped 2 orders which have been cancelled ?

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


Question: What is the name of the team that won the most number of matches in season 1?

SELECT Team_Name FROM Team WHERE Team_Id = ( SELECT Match_Winner FROM `Match` WHERE season_Id = 1 GROUP BY Match_Winner ORDER BY COUNT(Match_Winner) DESC LIMIT 1 )

What is the name of the team that won the most number of matches in season 1 ?

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


Question: List all the devices' brands and models of events on 5/7/2016 at 6:03:22 AM.

SELECT T1.phone_brand, T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T2.timestamp = '2016-05-07 06:03:22'

List all the devices ' brands and models of events on 5/7/2016 at 6:03:22 AM .

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


Question: What is the total shipments in each planet? List the planet name and total shipments.

SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;

What is the total shipments in each planet ? List the planet name and total shipments .

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


Question: What is Mary Smith's rental ID?

SELECT T2.rental_id FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'MARY' AND T1.last_name = 'SMITH'

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


Question: Show all the distinct product names with price higher than the average.

SELECT DISTINCT Product_Name FROM PRODUCTS WHERE Product_Price  >  (SELECT avg(Product_Price) FROM PRODUCTS)

Show all the distinct product names with price higher than the average .


Question: Show all student IDs who have at least two allergies.

SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*)  >=  2

Show all student IDs who have at least two allergies .


Question: How many of Gary Trousdale's movies are adventure movies?

SELECT COUNT(T.name) FROM ( SELECT T1.name FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Gary Trousdale' AND T2.genre = 'Adventure' GROUP BY T1.name ) T

How many of Gary Trousdale 's movies are adventure movies ?

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


Question: Find the nationality and card credit of each customer.

SELECT Nationality ,  Card_Credit FROM customer

Find the nationality and card credit of each customer .

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


Question: Name all the trip on the days when it rained. State the duration of the trip

SELECT T1.id, T1.duration FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T2.events LIKE '%Rain%' OR T2.events LIKE '%rain%'

Name all the trip on the days when it rained . State the duration of the trip

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


Question: In the year 2000, what is the campus fee for San Francisco State University?

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

In the year 2000 , what is the campus fee for San Francisco State University ?

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


Question: What are the names of teams that do no have match season record?

SELECT Name FROM team WHERE Team_id NOT IN (SELECT Team FROM match_season)

What are the names of teams that do no have match season record ?

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


Question: Return the official native languages of countries who have players from Maryland or Duke colleges.

SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke"

Return the official native languages of countries who have players from Maryland or Duke colleges .

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


Question: List the titles and air dates of episodes that were produced by Billy Fox.

SELECT T1.title, T1.air_date FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T2.category = 'Produced by' AND T2.role = 'producer' AND T3.name = 'Billy Fox'

List the titles and air dates of episodes that were produced by Billy Fox .

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


Question: In which province and country does Moldoveanu located? State its height.

SELECT T2.Province, T2.Country, T1.Height FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain WHERE T1.Name = 'Moldoveanu'

In which province and country does Moldoveanu located ? State its height .

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


Question: Show the three official languages that are most commonly spoken.

SELECT T2.name FROM official_languages AS T1 JOIN languages AS T2 ON T1.language_id  =  T2.id GROUP BY T2.id ORDER BY COUNT(*) DESC LIMIT 3

Show the three official languages that are most commonly spoken .


Question: What is the location with the most cinemas opened in year 2010 or later?

SELECT LOCATION FROM cinema WHERE openning_year  >=  2010 GROUP BY LOCATION ORDER BY count(*) DESC LIMIT 1

What is the location with the most cinemas opened in year 2010 or later ?

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


Question: What is the Twitter ID of Emanuel Cleaver?

SELECT T1.twitter_id FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Emanuel' AND T2.last_name = 'Cleaver'

What is the Twitter ID of Emanuel Cleaver ?

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


Question: What is the percentage of the object samples in the class of "man" in image no.1?

SELECT CAST(COUNT(CASE WHEN T1.OBJ_CLASS = 'man' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.OBJ_CLASS_ID) 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

What is the percentage of the object samples in the class of " man " in image no.1 ?

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


Question: Return the managers and captains of all clubs.

Return the managers and captains of all clubs .


Question: How many students have each different allergy?

SELECT Allergy ,  count(*) FROM Has_allergy GROUP BY Allergy

How many students have each different allergy ?


Question: Please list any three OPPO device models.

SELECT device_model FROM phone_brand_device_model2 WHERE phone_brand = 'OPPO' LIMIT 3

Please list any three OPPO device models .


Question: How many Indian restaurants are there in the Los Angeles area?

SELECT COUNT(T1.city) FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'indian' AND T1.region = 'los angeles area'

How many Indian restaurants are there in the Los Angeles area ?

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


Question: How many books do not have reviews?

SELECT count(*) FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM review)


Question: How many different cities are they from?

How many different cities are they from ?


Question: Find the settlement amount of the claim with the largest claim amount. Show both the settlement amount and claim amount.

SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Claimed DESC LIMIT 1

Find the settlement amount of the claim with the largest claim amount . Show both the settlement amount and claim amount .

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


Question: Show order ids and the total quantity in each order.

SELECT order_id ,  sum(product_quantity) FROM Order_items GROUP BY order_id

Show order ids and the total quantity in each order .

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


Question: Return the full name and id of the actor or actress who starred in the greatest number of films.

SELECT T2.first_name ,  T2.last_name ,  T2.actor_id FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id ORDER BY count(*) DESC LIMIT 1

Return the full name and i d of the actor or actress who starred in the greatest number of films .

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


Question: Find the title of course that is provided by Statistics but not Psychology departments.

SELECT title FROM course WHERE dept_name  =  'Statistics' EXCEPT SELECT title FROM course WHERE dept_name  =  'Psychology'

Find the title of course that is provided by Statistics but not Psychology departments .

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


Question: How many crimes against society happened in the Wentworth district according to the FBI?

SELECT SUM(CASE WHEN T1.crime_against = 'Society' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T2.fbi_code_no = T1.fbi_code_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T3.district_name = 'Wentworth'

How many crimes against society happened in the Wentworth district according to the FBI ?

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


Question: What is the average length in feet of the bridges?

What is the average length in feet of the bridges ?

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


Question: Calculate the percentage of shipping done through Speedy Express.

SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID

Calculate the percentage of shipping done through Speedy Express .


Question: What are the price ranges of hotels?


Question: How many movies has the highest networth actor acted in?

SELECT COUNT(*) FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE CAST(REPLACE(REPLACE(T2.NetWorth, ',', ''), '$', '') AS REAL) = ( SELECT MAX(CAST(REPLACE(REPLACE(NetWorth, ',', ''), '$', '') AS REAL)) FROM actor)

How many movies has the highest networth actor acted in ?


Question: What is the full name of the second oldest person in the company at the time he was hired?

SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY STRFTIME('%Y', T1.HireDate) - STRFTIME('%Y', T1.BirthDate) DESC LIMIT 1, 1

What is the full name of the second oldest person in the company at the time he was hired ?

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


Question: Among the root beer brands that do not advertise on Twitter, how many of them have root beers sold in August, 2014?

SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2014-08%' AND T3.Twitter IS NULL

Among the root beer brands that do not advertise on Twitter , how many of them have root beers sold in August , 2014 ?

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


Question: Which episode got the most 1 star votes? Give its title.

SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 1 ORDER BY T1.votes DESC LIMIT 1

Which episode got the most 1 star votes ? Give its title .

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


Question: Which is Business Entity ID No.13626's phone number type?

SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 USING (PhoneNumberTypeID) WHERE T1.BusinessEntityID = 13626

Which is Business Entity ID No.13626 's phone number type ?

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


Question: Calculate the total winning match for Deccan Chargers.

SELECT SUM(T2.Match_Winner) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T1.Team_Name = 'Deccan Chargers'

Calculate the total winning match for Deccan Chargers .


Question: How many tracks does each genre have and what are the names of the top 5?

SELECT T1.name ,  COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;

How many tracks does each genre have and what are the names of the top 5 ?

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


Question: How many trains are running west?

SELECT COUNT(id) FROM trains WHERE direction = 'west'


Question: What are the maximum height and width of paintings for each year?

SELECT max(height_mm) ,  max(width_mm) ,  YEAR FROM paintings GROUP BY YEAR ORDER BY YEAR

What are the maximum height and width of paintings for each year ?

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


Question: Which campus was opened between 1935 and 1939?

SELECT campus FROM campuses WHERE YEAR  >=  1935 AND YEAR  <=  1939

Which campus was opened between 1935 and 1939 ?


Question: List all the names of podcasts under the 'true crime' category.

SELECT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'

List all the names of podcasts under the ' true crime ' category .

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


Question: Give the full name of legislators who have accounts on OpenSecrets.org.

SELECT COUNT(*) FROM current WHERE opensecrets_id IS NOT NULL AND opensecrets_id <> ''

Give the full name of legislators who have accounts on OpenSecrets.org .


Question: Show the number of games which were released on X360 in 2010.

SELECT COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'X360' AND T2.release_year = 2010

Show the number of games which were released on X360 in 2010 .

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


Question: When did the project "Photojournalists Want to Exhibit Their Best Works" go live?

SELECT T1.date_posted FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Photojournalists Want to Exhibit Their Best Works'

When did the project " Photojournalists Want to Exhibit Their Best Works " go live ?

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


Question: Which project made the most number of outcomes? List the project details and the project id.

SELECT T1.project_details ,  T1.project_id FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) DESC LIMIT 1

Which project made the most number of outcomes ? List the project details and the project i d.

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


Question: What are the allergies the girl named Lisa has? And what are the types of them? Order the result by allergy names.

SELECT T1.Allergy ,  T1.AllergyType FROM Allergy_type AS T1 JOIN Has_allergy AS T2 ON T1.Allergy  =  T2.Allergy JOIN Student AS T3 ON T3.StuID  =  T2.StuID WHERE T3.Fname  =  "Lisa" ORDER BY T1.Allergy

What are the allergies the girl named Lisa has ? And what are the types of them ? Order the result by allergy names .

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


Question: What are the names of the songs that do not have back vocals?

SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "back"

What are the names of the songs that do not have back vocals ?

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


Question: Please list the cities of the Yelp_Businesses that have gotten a 5 in the Elitestar rating.

SELECT city FROM Business WHERE stars = 5 GROUP BY city

Please list the cities of the Yelp_Businesses that have gotten a 5 in the Elitestar rating .

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


Question: Among the menus that include milk, what is the menu page id of the menu that has the highest price?

SELECT T1.menu_page_id FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.name = 'Milk' ORDER BY T1.price DESC LIMIT 1

Among the menus that include milk , what is the menu page i d of the menu that has the highest price ?

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


Question: What are the ids and details for all organizations that have grants of more than 6000 dollars?

SELECT T2.organisation_id ,  T2.organisation_details FROM Grants AS T1 JOIN Organisations AS T2 ON T1.organisation_id  =  T2.organisation_id GROUP BY T2.organisation_id HAVING sum(T1.grant_amount)  >  6000

What are the ids and details for all organizations that have grants of more than 6000 dollars ?

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


Question: How many times longer is the longest border in the United States than the shortest?

SELECT MAX(T2.Length) / MIN(T2.Length) FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country2 WHERE T1.Name = 'United States'

How many times longer is the longest border in the United States than the shortest ?

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


Question: What is the name of the department with the most credits?

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

What is the name of the department with the most credits ?


Question: What is the address of the location "UK Gallery"?

SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"

What is the address of the location " UK Gallery " ?

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


Question: Please give the title of the oldest book published by publisher "Thomas Nelson".

SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Thomas Nelson' ORDER BY T1.publication_date ASC LIMIT 1

Please give the title of the oldest book published by publisher " Thomas Nelson " .

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


Question: For each submission, find its author and acceptance result.

SELECT T2.Author ,  T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID

For each submission , find its author and acceptance result .

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


Question: Show all team names.


Question: What is the game name that was held in Beijing in 2008?

SELECT T3.games_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Beijing' AND T3.games_year = 2008

What is the game name that was held in Beijing in 2008 ?

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


Question: Please list the order number of the customer whose credit card has a limit of 45300.

SELECT t1.orderNumber FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.creditLimit = 45300

Please list the order number of the customer whose credit card has a limit of 45300 .

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


Question: What is the average level employees working as Managing Editor are at? How many levels are there between the average level and the highest level?

SELECT AVG(T2.job_lvl), T1.max_lvl - AVG(T2.job_lvl) FROM jobs AS T1 INNER JOIN employee AS T2 ON T1.job_id = T2.job_id WHERE T1.job_desc = 'Managing Editor' GROUP BY T2.job_id, T1.max_lvl

What is the average level employees working as Managing Editor are at ? How many levels are there between the average level and the highest level ?

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


Question: Find the first name of students who are living in the Smith Hall.

SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.dorm_name  =  'Smith Hall'

Find the first name of students who are living in the Smith Hall .

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


Question: Show all product sizes.

SELECT DISTINCT product_size FROM Products


Question: What is the average absence period of a student?

SELECT AVG(month) FROM longest_absense_from_school

What is the average absence period of a student ?


Question: Compute the average laps of drivers under the age of 20.

SELECT avg(Laps) FROM driver WHERE age  <  20

Compute the average laps of drivers under the age of 20 .

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


Question: How many cities does congressman Pierluisi Pedro represent?

SELECT COUNT(DISTINCT T1.city) FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Pierluisi' AND T3.last_name = 'Pedro'

How many cities does congressman Pierluisi Pedro represent ?

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


Question: Provide the account ID, district and region for loan amount greater than USD300,000.

SELECT T1.account_id, T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.amount > 300000

Provide the account ID , district and region for loan amount greater than USD300,000 .

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


Question: Among the customers who come from the place with 25746 inhabitants, how many of them are male?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INHABITANTS_K = 25.746 AND T1.SEX = 'Male'

Among the customers who come from the place with 25746 inhabitants , how many of them are male ?

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


Question: Name the countries' long name with national accounts base year prior to 1980.

SELECT LongName FROM Country WHERE NationalAccountsBaseYear < '1980' AND NationalAccountsBaseYear != ''

Name the countries ' long name with national accounts base year prior to 1980 .

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


Question: Provide the ID of cars from Japan worth greater than 35000 and have an acceleration of 14.

SELECT T4.ID FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'Japan' AND T1.price > 3500 AND T4.acceleration = 14

Provide the ID of cars from Japan worth greater than 35000 and have an acceleration of 14 .

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


Question: List the title name, type, and price of the titles published by New Moon Books. Arrange the list in ascending order of price.

SELECT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'New Moon Books' ORDER BY T1.price

List the title name , type , and price of the titles published by New Moon Books . Arrange the list in ascending order of price .

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


Question: How many students are not involved in any behavior incident?

SELECT count(*) FROM STUDENTS WHERE student_id NOT IN ( SELECT student_id FROM Behavior_Incident )

How many students are not involved in any behavior incident ?


Question: What are the names of customers with a higher checking balance than savings balance?

SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance

What are the names of customers with a higher checking balance than savings balance ?

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


Question: Count the number of tourists who did not visit any place.

SELECT count(*) FROM Visitors WHERE Tourist_ID NOT IN ( SELECT Tourist_ID FROM Visits )

Count the number of tourists who did not visit any place .


Question: Please give more detailed information about the first three books that sell the best.

SELECT T1.notes FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id ORDER BY T2.qty DESC LIMIT 3

Please give more detailed information about the first three books that sell the best .


Question: Please provide the full name of the customer at 692 Joliet Street.

SELECT T2.first_name, T2.last_name FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id WHERE T1.address = '692 Joliet Street'

Please provide the full name of the customer at 692 Joliet Street .

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


Question: How many papers are "Atsushi Ohori" the author of?

SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"

How many papers are " Atsushi Ohori " the author of ?

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


Question: Find the id and name of customers whose address contains WY state and do not use credit card for payment.

SELECT customer_id ,  customer_name FROM customers WHERE customer_address LIKE "%WY%" AND payment_method_code != "Credit Card"

Find the i d and name of customers whose address contains WY state and do not use credit card for payment .

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


Question: Count the number of races.


Question: Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent (%) Eligible FRPM (Ages 5-17)?

SELECT T2.School, T1.`FRPM Count (Ages 5-17)` * 100 / T1.`Enrollment (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.County = 'Los Angeles' AND T2.GSserved = 'K-9'

Which schools served a grade span of Kindergarten to 9th grade in the county of Los Angeles and what is its Percent ( % ) Eligible FRPM ( Ages 5 - 17 ) ?

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


Question: What is the total sales of furniture products in the east superstore in the year 2016.

SELECT SUM(T1.Sales) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE STRFTIME('%Y', T1.`Order Date`) = '2016' AND T2.Category = 'Furniture'

What is the total sales of furniture products in the east superstore in the year 2016 .

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


Question: What is the difference in number of unit price from Chef Anton's Cajun Seasoning product and Chef Anton's Gumbo Mix product of New Orleans Cajun Delights company.

SELECT ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Cajun Seasoning' ) - ( SELECT T1.UnitPrice FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'New Orleans Cajun Delights' AND T1.ProductName LIKE 'Chef Anton%s Gumbo Mix' ) AS calu

What is the difference in number of unit price from Chef Anton 's Cajun Seasoning product and Chef Anton 's Gumbo Mix product of New Orleans Cajun Delights company .

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


Question: Find all the stores in the district with the most population.

SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id WHERE district_id  =  (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)

Find all the stores in the district with the most population .

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


Question: What document type codes do we have?

SELECT document_type_code FROM Ref_Document_Types;


Question: Find the official names of cities with population bigger than 1500 or smaller than 500.

SELECT Official_Name FROM city WHERE Population  >  1500 OR Population  <  500

Find the official names of cities with population bigger than 1500 or smaller than 500 .

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


Question: How many tweets have a klout of over 50?

SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Klout > 50

How many tweets have a klout of over 50 ?


Question: How many bike trips started on the days in September, 2013 with the hottest temperature over 70 degrees Fahrenheit in the area where the zip code is 94107?

SELECT COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '9/%/2013' AND T2.zip_code = 94107 AND T2.max_temperature_f > 70

How many bike trips started on the days in September , 2013 with the hottest temperature over 70 degrees Fahrenheit in the area where the zip code is 94107 ?

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


Question: Find the names of districts where have both city mall and village store type stores.

SELECT t3.District_name 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 WHERE t1.Type  =  "City Mall" INTERSECT SELECT t3.District_name 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 WHERE t1.Type  =  "Village Store"

Find the names of districts where have both city mall and village store type stores .

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


Question: What is the average score in writing for the schools that were opened after 1991 or closed before 2000? List the school names along with the score. Also, list the communication number of the schools if there is any.

SELECT T2.School, T1.AvgScrWrite, T2.Phone FROM schools AS T2 LEFT JOIN satscores AS T1 ON T2.CDSCode = T1.cds WHERE strftime('%Y', T2.OpenDate) > '1991' OR strftime('%Y', T2.ClosedDate) < '2000'

What is the average score in writing for the schools that were opened after 1991 or closed before 2000 ? List the school names along with the score . Also , list the communication number of the schools if there is any .

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


Question: What are the cards that only available in paper and Japanese language?

SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.availability = 'paper' AND T2.language = 'Japanese'

What are the cards that only available in paper and Japanese language ?

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


Question: On what date did the customers who live at number 460 of their respective streets place their orders?

SELECT T1.order_date FROM cust_order AS T1 INNER JOIN address AS T2 ON T1.dest_address_id = T2.address_id WHERE T2.street_number = 460

On what date did the customers who live at number 460 of their respective streets place their orders ?

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


Question: What was the gender of the first AORTITIS diagnosed patient?

SELECT SEX FROM Patient WHERE Diagnosis = 'AORTITIS' AND `First Date` IS NOT NULL ORDER BY `First Date` ASC LIMIT 1

What was the gender of the first AORTITIS diagnosed patient ?

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


Question: Please list any three devices that are owned by female users.

SELECT device_id FROM gender_age WHERE gender = 'F' LIMIT 3

Please list any three devices that are owned by female users .


Question: Find and list the names of sets which doesn't have Japanese translation but have Korean translation.

SELECT name FROM sets WHERE code IN ( SELECT setCode FROM set_translations WHERE language = 'Korean' AND language NOT LIKE '%Japanese%' )

Find and list the names of sets which does n't have Japanese translation but have Korean translation .

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


Question: List the title and audio length for all the books in descending order of the number of readers.

SELECT T1.Title ,  T1.audio FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T2.Readers_in_Million DESC

List the title and audio length for all the books in descending order of the number of readers .

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


Question: How many orders were made by the customers in Ireland.

SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Country = 'Ireland'

How many orders were made by the customers in Ireland .


Question: Show all flight numbers with aircraft Airbus A340-300.

SELECT T1.flno FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T2.name  =  "Airbus A340-300"

Show all flight numbers with aircraft Airbus A340 - 300 .

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


Question: What is the id of the patient who has the longest allergy period?

SELECT PATIENT FROM allergies WHERE STOP IS NOT NULL GROUP BY PATIENT ORDER BY CASE WHEN SUBSTR(STOP, -2, 1) != '9' THEN SUBSTR(STOP, LENGTH(STOP) - 1) + 2000 END - CASE WHEN SUBSTR(START, -2, 1) = '9' THEN SUBSTR(START, LENGTH(START) - 1) + 1900 ELSE SUBSTR(START, LENGTH(START) - 1) + 2000 END LIMIT 1

What is the i d of the patient who has the longest allergy period ?

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


Question: How many players were born in 1970?

SELECT COUNT(Player_Name) FROM Player WHERE DOB LIKE '1970%'


Question: In total, how many shipments were transported to Olympic Camper Sales Inc?

SELECT COUNT(T2.ship_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'Olympic Camper Sales Inc'

In total , how many shipments were transported to Olympic Camper Sales Inc ?

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


Question: List the document id of all documents in collection named Best.

SELECT 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";

List the document i d of all documents in collection named Best .

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


Question: List all the driver names in descending order of points.

SELECT Driver FROM driver ORDER BY Points DESC

List all the driver names in descending order of points .


Question: What are the apps that users pretty like this app and how many installs amount of these apps?

SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity > 0

What are the apps that users pretty like this app and how many installs amount of these apps ?

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


Question: What are the names and ids of the different categories, and how many films are in each?

SELECT T2.name ,  T1.category_id ,  count(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id  =  T2.category_id GROUP BY T1.category_id

What are the names and ids of the different categories , and how many films are in each ?

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


Question: What is the profit of a single product that received the highest rating from John Smith? List the product/s' names.

SELECT T1.ListPrice - T1.StandardCost, T1.Name FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID WHERE T2.ReviewerName = 'John Smith' ORDER BY T2.Rating DESC LIMIT 1

What is the profit of a single product that received the highest rating from John Smith ? List the product / s ' names .

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


Question: Find the top 2 earpads that are mostly used.

SELECT earpads FROM headphone GROUP BY earpads ORDER BY count(*) DESC LIMIT 2

Find the top 2 earpads that are mostly used .


Question: What are the nations that have more than two ships?

SELECT Nationality FROM ship GROUP BY Nationality HAVING COUNT(*)  >  2

What are the nations that have more than two ships ?

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


Question: Show the origin country of Chevrolet Malibu.

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

Show the origin country of Chevrolet Malibu .

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


Question: What is the cost and the product number of product with the id "888"?

SELECT T2.StandardCost, T2.ProductNumber FROM ProductCostHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 888

What is the cost and the product number of product with the i d " 888 " ?

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


Question: Show each gender code and the corresponding count of guests sorted by the count in descending order.

SELECT gender_code ,  COUNT(*) FROM Guests GROUP BY gender_code ORDER BY COUNT(*) DESC

Show each gender code and the corresponding count of guests sorted by the count in descending order .

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


Question: Return ids of all the products that are supplied by supplier id 2 and are more expensive than the average price of all products.

SELECT T1.product_id FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  2 AND T2.product_price  >  (SELECT avg(product_price) FROM products)

Return ids of all the products that are supplied by supplier i d 2 and are more expensive than the average price of all products .

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


Question: List the full names of 10 legislators who only have a Facebook account.

SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE (T1.youtube IS NULL OR T1.youtube = '') AND (T1.instagram IS NULL OR T1.instagram = '') AND (T1.twitter IS NULL OR T1.twitter = '') AND T1.facebook IS NOT NULL AND T1.facebook != ''

List the full names of 10 legislators who only have a Facebook account .


Question: What are the names of the physician who prescribed the highest dose?

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

What are the names of the physician who prescribed the highest dose ?

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


Question: Which department has the most disabled students?

SELECT T2.organ, COUNT(T1.name) FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` GROUP BY T2.organ ORDER BY COUNT(T1.name) DESC LIMIT 1

Which department has the most disabled students ?


Question: Show all city codes and the total distance to all other cities.

SELECT city1_code ,  sum(distance) FROM Direct_distance GROUP BY city1_code

Show all city codes and the total distance to all other cities .

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


Question: What are the names of artists who have not released any albums?

SELECT Name FROM ARTIST EXCEPT SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId

What are the names of artists who have not released any albums ?

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


Question: Give me the theme and location of each party.

SELECT Party_Theme ,  LOCATION FROM party

Give me the theme and location of each party .


Question: Which 3 products are produced in greater quantity?

SELECT ProductName FROM Products ORDER BY UnitsInStock + UnitsOnOrder DESC LIMIT 3

Which 3 products are produced in greater quantity ?


Question: List all goalies with more lost than won games for two seasons or more. State the name of the player and team he played.

SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.pos = 'G' AND T2.L > T2.W GROUP BY T1.firstName, T1.lastName, T3.name HAVING COUNT(T3.year) > 2

List all goalies with more lost than won games for two seasons or more . State the name of the player and team he played .

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


Question: How many students were there in university ID 1 in 2011?

SELECT num_students FROM university_year WHERE year = 2011 AND university_id = 1

How many students were there in university ID 1 in 2011 ?

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


Question: What are the products by the company "Bigfoot Breweries"?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Bigfoot Breweries'

What are the products by the company " Bigfoot Breweries " ?

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


Question: List the locations of schools in ascending order of enrollment.

SELECT LOCATION FROM school ORDER BY Enrollment ASC

List the locations of schools in ascending order of enrollment .

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


Question: What are the names of the establishments that met all of the required standards in 2013?

SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2013' AND T1.score = 100

What are the names of the establishments that met all of the required standards in 2013 ?

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


Question: What are all the distinct franchises?


Question: Please list the businesses name with a rating less than 5 whose category name is men's clothing.

SELECT T2.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name LIKE 'Men''s Clothing' AND T3.stars < 5

Please list the businesses name with a rating less than 5 whose category name is men 's clothing .

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


Question: Find the department name that is in Building "Mergenthaler".

SELECT DName FROM DEPARTMENT WHERE Building  =  "Mergenthaler"

Find the department name that is in Building " Mergenthaler " .

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


Question: What are the distinct student answer texts that received comments "Normal"?

SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal"

What are the distinct student answer texts that received comments " Normal " ?

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


Question: Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts? List the company id and name.

SELECT T1.company_id ,  T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Engineers AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id HAVING count(*)  >=  2 UNION SELECT T3.company_id ,  T3.company_name FROM Third_Party_Companies AS T3 JOIN Maintenance_Contracts AS T4 ON T3.company_id  =  T4.maintenance_contract_company_id GROUP BY T3.company_id HAVING count(*)  >=  2

Which third party companies have at least 2 maintenance engineers or have at least 2 maintenance contracts ? List the company i d and name .

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


Question: What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range?

SELECT CAST(SUM(CASE WHEN UA <= 6.5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Laboratory WHERE `U-PRO` > 0 AND `U-PRO` < 30

What percentage of patients with a proteinuria level within the normal range have a uric acid level below the normal range ?

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


Question: Which teacher teaches the most students? Give me the first name and last name of the teacher.

SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom GROUP BY T2.firstname ,  T2.lastname ORDER BY count(*) DESC LIMIT 1

Which teacher teaches the most students ? Give me the first name and last name of the teacher .

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


Question: What are all locations that have hosted at least two conferences?

SELECT LOCATION FROM conference GROUP BY LOCATION HAVING count(*)  >=  2

What are all locations that have hosted at least two conferences ?


Question: Among all goalies who are still alive, whose first season in NHL in before 1950. List the team names they were in.

SELECT DISTINCT T3.name FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.lgID = T3.lgID AND T2.year = T3.year WHERE T1.deathYear IS NOT NULL AND T1.firstNHL < 1950

Among all goalies who are still alive , whose first season in NHL in before 1950 . List the team names they were in .

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


Question: Provide the text of the latest 10 comments to the post with the title 'Analysing wind data with R' and the display name of the user who left it.

SELECT T3.Text, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T2.Id = T3.PostId WHERE T2.Title = 'Analysing wind data with R' ORDER BY T1.CreationDate DESC LIMIT 10

Provide the text of the latest 10 comments to the post with the title ' Analysing wind data with R ' and the display name of the user who left it .

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


Question: How many superheroes were published by Dark Horse Comics?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'Dark Horse Comics'

How many superheroes were published by Dark Horse Comics ?

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


Question: Return the low and high estimates for all film markets.

SELECT Low_Estimate ,  High_Estimate FROM film_market_estimation

Return the low and high estimates for all film markets .

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


Question: How many followers does each user have?

How many followers does each user have ?


Question: Give me a list of store names, sorted by store open date.

SELECT name FROM store ORDER BY date_opened

Give me a list of store names , sorted by store open date .

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


Question: State the average period of Ms. Angelena Kertzmann's several normal pregnancies.

SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Angelena' AND T1.last = 'Kertzmann' AND T2.description = 'Normal pregnancy'

State the average period of Ms. Angelena Kertzmann 's several normal pregnancies .

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


Question: What is the name, city, and country of the airport with the highest elevation?

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

What is the name , city , and country of the airport with the highest elevation ?

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


Question: Find the types and details for all premises and order by the premise type.

SELECT premises_type ,  premise_details FROM premises ORDER BY premises_type

Find the types and details for all premises and order by the premise type .

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


Question: What is the team name and acc regular season score of the school that was founded for the longest time?

SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1

What is the team name and acc regular season score of the school that was founded for the longest time ?

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


Question: Find the number of rooms with price higher than 120 for different decor.

SELECT decor , count(*) FROM Rooms WHERE basePrice  >  120 GROUP BY decor;

Find the number of rooms with price higher than 120 for different decor .

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


Question: How many times was Ford Maverick introduced to the market?

SELECT COUNT(T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'

How many times was Ford Maverick introduced to the market ?

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


Question: List the names of buildings with at least 200 feet of height and with at least 20 floors.

SELECT name FROM building WHERE height_feet  >=  200 AND floors  >=  20

List the names of buildings with at least 200 feet of height and with at least 20 floors .

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


Question: What is the name of the vendors serving material for projects for grades 9-12?

SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.grade_level = 'Grades 9-12'

What is the name of the vendors serving material for projects for grades 9 - 12 ?

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


Question: What is the release date for the set "Ola de frío"?

SELECT T1.releaseDate FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Ola de frío'

What is the release date for the set " Ola de frío " ?

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


Question: Give the number of documentary films.

SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Documentary'


Question: Show different teams in eliminations and the number of eliminations from each team.

SELECT Team ,  COUNT(*) FROM elimination GROUP BY Team

Show different teams in eliminations and the number of eliminations from each team .

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


Question: How many languages are used in Cyprus?

SELECT SUM(CASE WHEN T1.Name = 'Cyprus' THEN 1 ELSE 0 END) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode


Question: What was the rating of the episodes that Jace Alexander worked on?

SELECT T1.rating FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T3.name = 'Jace Alexander'

What was the rating of the episodes that Jace Alexander worked on ?

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


Question: Under the vote type of 8, provide the display names and websites URLs of the user who got the highest bounty amount.

SELECT DisplayName, WebsiteUrl FROM users WHERE Id = ( SELECT UserId FROM votes WHERE VoteTypeId = 8 ORDER BY BountyAmount DESC LIMIT 1 )

Under the vote type of 8 , provide the display names and websites URLs of the user who got the highest bounty amount .

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


Question: Return the id of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff.

SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to  <  (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code  =  'Clerical Staff')

Return the i d of the staff whose Staff Department Assignment was earlier than that of any Clerical Staff .

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


Question: Which two Asian countries share a border that is 1,782 kilometers long?

SELECT T4.Country1, T4.Country2 FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN borders AS T4 ON T4.Country1 = T3.Code WHERE T1.Name = 'Asia' AND T4.Length = 1782

Which two Asian countries share a border that is 1,782 kilometers long ?

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


Question: Which start station had the most trips starting from August? Give me the name and id of the station.

SELECT start_station_name ,  start_station_id FROM trip WHERE start_date LIKE "8/%" GROUP BY start_station_name ORDER BY COUNT(*) DESC LIMIT 1

Which start station had the most trips starting from August ? Give me the name and i d of the station .

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


Question: Find the name of the candidates whose oppose percentage is the lowest for each sex.

SELECT t1.name ,  t1.sex ,  min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex

Find the name of the candidates whose oppose percentage is the lowest for each sex .

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


Question: Return the most common first name among all actors.

SELECT first_name FROM actor GROUP BY first_name ORDER BY count(*) DESC LIMIT 1

Return the most common first name among all actors .


Question: List the number of invoices from the US, grouped by state.

SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "USA" GROUP BY billing_state;

List the number of invoices from the US , grouped by state .


Question: What is the average price of wines produced in appelations in Sonoma County?

SELECT AVG(T2.Price) FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Sonoma"

What is the average price of wines produced in appelations in Sonoma County ?

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


Question: Return the text of tweets about the topic 'intern'.

SELECT text FROM tweets WHERE text LIKE '%intern%'

Return the text of tweets about the topic ' intern ' .

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


Question: In how many atoms is there no bromine?

SELECT COUNT(DISTINCT T.atom_id) FROM atom AS T WHERE T.element <> 'br'


Question: What is the average weight of the competitors who won a silver medal?

SELECT AVG(T1.weight) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Silver'

What is the average weight of the competitors who won a silver medal ?

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


Question: Determine the number of action movies available for rent.

SELECT COUNT(T2.film_id) FROM category AS T1 INNER JOIN film_category AS T2 ON T1.category_id = T2.category_id WHERE T1.name = 'Action'

Determine the number of action movies available for rent .


Question: Show all client ids and the number of invoices for each client.

SELECT client_id ,  count(*) FROM Invoices GROUP BY client_id

Show all client ids and the number of invoices for each client .

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


Question: What is the first and last name of the artist who performed back stage for the song "Der Kapitan"?

SELECT T2.firstname ,  T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId WHERE T3.Title  =  "Der Kapitan" AND T1.StagePosition  =  "back"

What is the first and last name of the artist who performed back stage for the song " Der Kapitan " ?

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


Question: Find the team that attended the least number of home games in 1980.

SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;

Find the team that attended the least number of home games in 1980 .

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


Question: What are the names and decor of rooms with a king bed? Sort them by their price

SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  'King' ORDER BY basePrice;

What are the names and decor of rooms with a king bed ? Sort them by their price

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


Question: Show the names of players and names of their coaches.

SELECT T3.Player_name ,  T2.coach_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID

Show the names of players and names of their coaches .

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


Question: Who served as an advisor for students who have treasurer votes in the spring election cycle?

SELECT DISTINCT T1.Advisor FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Treasurer_Vote WHERE T2.Election_Cycle  =  "Spring"

Who served as an advisor for students who have treasurer votes in the spring election cycle ?

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


Question: Please list the case numbers of all the crimes with no arrest made in Central Chicago.

SELECT COUNT(*) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T2.district_name = 'Central' AND T1.arrest = 'FALSE'

Please list the case numbers of all the crimes with no arrest made in Central Chicago .

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


Question: Provide the body weight of Elly Koss in every observation.

SELECT T2.DESCRIPTION, T2.VALUE, T2.UNITS FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.DESCRIPTION = 'Body Weight'

Provide the body weight of Elly Koss in every observation .

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


Question: What is the last name of the musician that have produced the most songs?

SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1

What is the last name of the musician that have produced the most songs ?

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


Question: What are the names of all the circuits that are in the UK or Malaysia?

SELECT name FROM circuits WHERE country = "UK" OR country = "Malaysia"

What are the names of all the circuits that are in the UK or Malaysia ?

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


Question: Find all the female members of club "Bootup Baltimore". Show the first name and last name.

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

Find all the female members of club " Bootup Baltimore " . Show the first name and last name .

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


Question: Return the maximum and minimum enrollment across all institutions.

SELECT max(Enrollment) ,  min(Enrollment) FROM institution

Return the maximum and minimum enrollment across all institutions .


Question: Who was the driver that got the best lap time in the race No. 348? Give his full name.

SELECT T2.forename, T2.surname FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 348 ORDER BY T1.time ASC LIMIT 1

Who was the driver that got the best lap time in the race No . 348 ? Give his full name .

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


Question: What are names and savings balances of the three accounts with the highest savings balances?

SELECT T1.name ,  T2.balance FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T2.balance DESC LIMIT 3

What are names and savings balances of the three accounts with the highest savings balances ?

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


Question: Among the male patients, list down 5 birth dates of patients taking the medication "Penicillin V Potassium 250 MG".

SELECT DISTINCT T2.birthdate FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Penicillin V Potassium 250 MG' AND T2.gender = 'M' LIMIT 5

Among the male patients , list down 5 birth dates of patients taking the medication " Penicillin V Potassium 250 MG " .

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


Question: How many members are not living in Hartford?

SELECT count(*) FROM member WHERE address != 'Hartford'

How many members are not living in Hartford ?


Question: As of 12/31/2011, how long has the employee assigned to all pending for approval papers been working in the company from the date he was hired?

SELECT 2011 - STRFTIME('%Y', T2.HireDate) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T1.Status = 1

As of 12/31/2011 , how long has the employee assigned to all pending for approval papers been working in the company from the date he was hired ?

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


Question: List all the members who attended the event "October Meeting".

SELECT DISTINCT T3.member_id FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'October Meeting'

List all the members who attended the event " October Meeting " .

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


Question: What are the staff roles of the staff who

SELECT role_code FROM Project_Staff WHERE date_from  >  '2003-04-19 15:06:20' AND date_to  <  '2016-03-15 00:33:18'

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


Question: For all the users who have been asked "Have you ever been diagnosed with a mental health disorder?", how many of them said "Yes"?

SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Have you ever been diagnosed with a mental health disorder?' AND T1.AnswerText = 'Yes'

For all the users who have been asked " Have you ever been diagnosed with a mental health disorder ? " , how many of them said " Yes " ?

O O O B-COLUMN O O O O O B-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 O O O O B-VALUE O O


Question: Show the id and details for the investors who have the top 3 number of transactions.

SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 3

Show the i d and details for the investors who have the top 3 number of transactions .

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


Question: In which city is the European Bank for Reconstruction and Development's headquarters? Please include the city and province where the headquarters are located in your answer.

SELECT City, Province FROM organization WHERE Name = 'European Bank for Reconstruction and Development'

In which city is the European Bank for Reconstruction and Development 's headquarters ? Please include the city and province where the headquarters are located in your answer .

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


Question: Name the dishes that cost 180,000.

SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.price = 180000


Question: How many male stuents do not have payment due?

SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg'

How many male stuents do not have payment due ?


Question: Show all distinct location names.

SELECT DISTINCT Location_Name FROM LOCATIONS


Question: Show the names of all the activities Mark Giuliano participates in.

SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"

Show the names of all the activities Mark Giuliano participates in .

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


Question: Among the rides during the rainy days, which ride was the longest? List the start station, end station, and duration of this ride.

SELECT T1.start_station_name, T1.end_station_name, T1.duration FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.events = 'Rain' OR T2.events = 'rain' ORDER BY T1.duration DESC LIMIT 1

Among the rides during the rainy days , which ride was the longest ? List the start station , end station , and duration of this ride .

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


Question: What is the percentage of blue female superheroes among all female superheroes?

SELECT CAST(COUNT(CASE WHEN T3.colour = 'Blue' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T2.gender = 'Female'

What is the percentage of blue female superheroes among all female superheroes ?

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


Question: What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980?

SELECT CAST(COUNT(School) AS REAL) / 12 FROM schools WHERE DOC = 52 AND County = 'Alameda' AND strftime('%Y', OpenDate) = '1980'

What is the monthly average number of schools that opened in Alameda County under the jurisdiction of the Elementary School District in 1980 ?

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


Question: What percentage of films with a length of less than 100 belong to the Drama category?

SELECT CAST(SUM(IIF(T2.length < 100 AND T3.name = 'Drama', 1, 0)) AS REAL) * 100 / COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN film AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T1.category_id = T3.category_id

What percentage of films with a length of less than 100 belong to the Drama category ?

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


Question: How many artists are there?


Question: what is the address of history department?

SELECT dept_address FROM department WHERE dept_name  =  'History'

what is the address of history department ?


Question: Among the players who won an award in the year 1983, how many of them play the position of goalie?

SELECT COUNT(playerID) FROM AwardsPlayers WHERE pos = 'G' AND year = 1983

Among the players who won an award in the year 1983 , how many of them play the position of goalie ?

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


Question: What is the average number of inspections carried out in the year 2010 by a sanitarian whose salary is over 70000?

SELECT CAST(SUM(CASE WHEN T2.inspection_date LIKE '2010%' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.salary > 70000 THEN 1 ELSE 0 END) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id

What is the average number of inspections carried out in the year 2010 by a sanitarian whose salary is over 70000 ?

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


Question: What is the marital status of the customer ages 62 with an level of education of 7?

SELECT DISTINCT MARITAL_STATUS FROM Customers WHERE EDUCATIONNUM = 7 AND age = 62

What is the marital status of the customer ages 62 with an level of education of 7 ?

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