Question: Which countries do not have a stadium that was opened after 2006?

SELECT country FROM stadium EXCEPT SELECT country FROM stadium WHERE opening_year  >  2006

Which countries do not have a stadium that was opened after 2006 ?

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


Question: Who are the top 3 players in terms of overall rating?

SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY overall_rating DESC LIMIT 3

Who are the top 3 players in terms of overall rating ?

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


Question: What is the average number of customers per sales person?

SELECT CAST(COUNT(T1.CustomerID) AS REAL) / COUNT(T3.EmployeeID) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Employees AS T3 ON T2.SalesPersonID = T3.EmployeeID

What is the average number of customers per sales person ?

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


Question: Which type of book had the most pre-paid amount?

SELECT type FROM titles ORDER BY advance DESC LIMIT 1

Which type of book had the most pre - paid amount ?


Question: Show all member names who are not in charge of any event.

SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id

Show all member names who are not in charge of any event .

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


Question: Find the average and maximum hours for the students whose tryout decision is yes.

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

Find the average and maximum hours for the students whose tryout decision is yes .

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


Question: List the names of the customers from India.

SELECT T4.first_name, T4.last_name FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id INNER JOIN customer AS T4 ON T3.address_id = T4.address_id WHERE T1.country = 'India'

List the names of the customers from India .

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


Question: How many drivers receive points greater than 150 for each make? Show the make and the count.

SELECT make ,  count(*) FROM driver WHERE points  >  150 GROUP BY make

How many drivers receive points greater than 150 for each make ? Show the make and the count .

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


Question: Name the project titles created by teacher who acquired a doctor degree.

SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_message LIKE 'Donation on behalf of Matt Carpenter because I''m a strong believer in education.'

Name the project titles created by teacher who acquired a doctor degree .

Donation on behalf of Matt Carpenter because I'm a strong believer in education.


Question: How many more people speak English than speak Scottish in United Kingdom?

SELECT T3.Population * (T2.Percentage - T1.Percentage) FROM ethnicGroup AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Country = T2.Country INNER JOIN country AS T3 ON T1.Country = T3.Code WHERE T1.Name = 'Scottish' AND T2.Name = 'English' AND T3.Name = 'United Kingdom'

How many more people speak English than speak Scottish in United Kingdom ?

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


Question: Which recipe is more beneficial in wound healing, "Raspberry Chiffon Pie" or "Fresh Apricot Bavarian"?

SELECT DISTINCT CASE WHEN CASE WHEN T2.title = 'Raspberry Chiffon Pie' THEN T1.vitamin_c END > CASE WHEN T2.title = 'Fresh Apricot Bavarian' THEN T1.vitamin_c END THEN 'Raspberry Chiffon Pie' ELSE 'Fresh Apricot Bavarian' END AS "vitamin_c is higher" FROM Nutrition T1 INNER JOIN Recipe T2 ON T2.recipe_id = T1.recipe_id

Which recipe is more beneficial in wound healing , " Raspberry Chiffon Pie " or " Fresh Apricot Bavarian " ?

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


Question: What is the name of the oldest competitor?

SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id ORDER BY T2.age DESC LIMIT 1

What is the name of the oldest competitor ?


Question: What is the average score for the movie Versailles Rive-Gauche?

SELECT AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Versailles Rive-Gauche'

What is the average score for the movie Versailles Rive - Gauche ?

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


Question: What is the geographic identifier and income of the oldest customer?

SELECT T1.GEOID, T2.INCOME_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID ORDER BY T1.age DESC LIMIT 1

What is the geographic identifier and income of the oldest customer ?


Question: Which party has two or more records?

SELECT Party FROM party GROUP BY Party HAVING COUNT(*)  >=  2


Question: What is the genre of the game "Mario vs. Donkey Kong"?

SELECT T1.genre_name FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id WHERE T2.game_name = 'Mario vs. Donkey Kong'

What is the genre of the game " Mario vs. Donkey Kong " ?

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


Question: What is the average annual revenue of customers who have shipment weight of less than 65000 pounds?

SELECT AVG(T1.annual_revenue) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T2.weight < 65000

What is the average annual revenue of customers who have shipment weight of less than 65000 pounds ?

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


Question: What are the details and id of the project with the most outcomes?

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

What are the details and i d of the project with the most outcomes ?

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


Question: How much sea is around the island where Kerinci Mountain is located?

SELECT COUNT(T4.Sea) FROM mountain AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Mountain INNER JOIN island AS T3 ON T3.Name = T2.Island INNER JOIN islandIn AS T4 ON T4.Island = T3.Name WHERE T1.Name = 'Kerinci'

How much sea is around the island where Kerinci Mountain is located ?

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


Question: Provide the nation and region of the customer with the address of wH55UnX7 VI?

SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_address = 'wH55UnX7 VI'

Provide the nation and region of the customer with the address of wH55UnX7 VI ?

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


Question: How many territories are there in the region with the highest number of territories?

SELECT COUNT(T2.RegionDescription), T1.TerritoryDescription, COUNT(*) AS num FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T1.TerritoryDescription ORDER BY num DESC LIMIT 1

How many territories are there in the region with the highest number of territories ?

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


Question: List all the sales people in the Northwest US.

SELECT T2.BusinessEntityID FROM SalesTerritory AS T1 INNER JOIN SalesPerson AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.Name = 'Northwest' AND T1.CountryRegionCode = 'US'

List all the sales people in the Northwest US .

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


Question: Calculate the average price of products shipped to the UK.

SELECT AVG(UnitPrice) AS avg FROM Invoices WHERE Country = 'UK'

Calculate the average price of products shipped to the UK .


Question: Return the positions of players on the team Ryley Goldner.

SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner"

Return the positions of players on the team Ryley Goldner .

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


Question: What is the area code of the city with the female median age over 32 years old?

SELECT T1.area_code FROM area_code AS T1 INNER JOIN ZIP_Data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.female_median_age > 32 GROUP BY T1.area_code

What is the area code of the city with the female median age over 32 years old ?

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


Question: List package number of packages shipped in Omicron Persei 8 planet or sent by Zapp Brannigan.

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name  =  "Zapp Brannigan" OR T4.Name  =  "Omicron Persei 8";

List package number of packages shipped in Omicron Persei 8 planet or sent by Zapp Brannigan .

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


Question: What are the names of countries that have both players with position forward and players with position defender?

SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"

What are the names of countries that have both players with position forward and players with position defender ?

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


Question: Calculate the percentage of male patients with viral sinusitis condition.

SELECT CAST(SUM(CASE WHEN T1.gender = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Viral sinusitis (disorder)'

Calculate the percentage of male patients with viral sinusitis condition .

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


Question: What is the birthplace of Aaron Gagnon?

SELECT birthplace FROM PlayerInfo WHERE PlayerName = 'Aaron Gagnon'

What is the birthplace of Aaron Gagnon ?


Question: How many addresses are in the district of California?

SELECT count(*) FROM address WHERE district  =  'California'

How many addresses are in the district of California ?


Question: Among research postgraduate students, give the name of the course with the student satisfaction value of 1.

SELECT T3.name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.sat = 1 AND T1.type = 'RPG'

Among research postgraduate students , give the name of the course with the student satisfaction value of 1 .

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


Question: In businesses with an owner address 500 California St, 2nd Floor of Silicon Valley, list the type of inspection of the business with the highest score.

SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_address = '500 California St, 2nd Floor' AND T2.owner_city = 'SAN FRANCISCO' ORDER BY T1.score DESC LIMIT 1

In businesses with an owner address 500 California St , 2nd Floor of Silicon Valley , list the type of inspection of the business with the highest score .

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


Question: List out sale rep that has sold 1969 Harley Davidson Ultimate Chopper. List out their names and quantity sold throughout the year.

SELECT t5.firstName, t5.lastName, SUM(t2.quantityOrdered) FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode INNER JOIN orders AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN customers AS t4 ON t3.customerNumber = t4.customerNumber INNER JOIN employees AS t5 ON t4.salesRepEmployeeNumber = t5.employeeNumber WHERE t1.productName = '1969 Harley Davidson Ultimate Chopper' GROUP BY t5.lastName, t5.firstName

List out sale rep that has sold 1969 Harley Davidson Ultimate Chopper . List out their names and quantity sold throughout the year .

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


Question: List the person IDs of the second film editors in Movie No. 12.

SELECT person_id FROM movie_crew WHERE movie_id = 12 AND job = 'Second Film Editor'

List the person IDs of the second film editors in Movie No . 12 .

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


Question: What is the difference in percentage between the product descriptions written in Arabic and Thai?

SELECT CAST(SUM(CASE WHEN T1.Name = 'Arabic' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.Name = 'Thai' THEN 1 ELSE 0 END) FROM Culture AS T1 INNER JOIN ProductModelProductDescriptionCulture AS T2 ON T1.CultureID = T2.CultureID

What is the difference in percentage between the product descriptions written in Arabic and Thai ?

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


Question: Rank schools by their average score in Writing where the score is greater than 499, showing their charter numbers.

SELECT CharterNum, AvgScrWrite, RANK() OVER (ORDER BY AvgScrWrite DESC) AS WritingScoreRank FROM schools AS T1  INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T2.AvgScrWrite > 499 AND CharterNum is not null

Rank schools by their average score in Writing where the score is greater than 499 , showing their charter numbers .

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


Question: Find the name and hours of the students whose tryout decision is yes.

SELECT T1.pName ,  T1.HS FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes'

Find the name and hours of the students whose tryout decision is yes .

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


Question: List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range.

SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '-' AND T2.`T-BIL` < 2.0 AND T2.Date LIKE '1991-10-%'

List all patients who were followed up at the outpatient clinic who underwent a laboratory test in October 1991 and had a total blood bilirubin level within the normal range .

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


Question: How many clubs are there?


Question: What are the different owners of documents that are related to ones owned by Braeden?

SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID  =  T2.Document_Object_ID WHERE T2.Owner  =  'Braeden';

What are the different owners of documents that are related to ones owned by Braeden ?

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


Question: Return the publisher that has published the most books.

SELECT publisher FROM book_club GROUP BY publisher ORDER BY count(*) DESC LIMIT 1

Return the publisher that has published the most books .


Question: List the name of the county with the largest population.

SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1

List the name of the county with the largest population .


Question: Find the names of drivers who were in both "James Hinchcliffe" and "Carl Skerlong" pole positions before.

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

Find the names of drivers who were in both " James Hinchcliffe " and " Carl Skerlong " pole positions before .

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


Question: Find the name, age, and job title of persons who are friends with Alice for the longest years.

SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  'Alice' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  'Alice')

Find the name , age , and job title of persons who are friends with Alice for the longest years .

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


Question: List categories that have at least two books after year 1989.

SELECT category FROM book_club WHERE YEAR  >  1989 GROUP BY category HAVING count(*)  >=  2

List categories that have at least two books after year 1989 .

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


Question: Select the codes of all warehouses that are above capacity.

SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity

Select the codes of all warehouses that are above capacity .

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


Question: How many faculty lines are there in the university that conferred the least number of degrees in year 2001?

SELECT T2.faculty FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  t2.campus JOIN degrees AS T3 ON T1.id  =  t3.campus AND t2.year  =  t3.year WHERE t2.year  =  2001 ORDER BY t3.degrees LIMIT 1

How many faculty lines are there in the university that conferred the least number of degrees in year 2001 ?

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


Question: Which services were used by the customer with details "Hardy Kutch"? Give me the service details.

SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t1.customer_details  =  "Hardy Kutch"

Which services were used by the customer with details " Hardy Kutch " ? Give me the service details .

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


Question: Show all invoice status codes and details and the corresponding client id and details and agency id and details.

SELECT T1.invoice_status ,  T1.invoice_details ,  T2.client_id ,  T2.client_details ,  T3.agency_id ,  T3.agency_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id JOIN Agencies AS T3 ON T2.agency_id  =  T3.agency_id

Show all invoice status codes and details and the corresponding client i d and details and agency i d and details .

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


Question: List all book titles which have the lowest sale price .

select title from book order by saleprice asc limit 1

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


Question: Find the titles and studios of the films that are produced by some film studios that contained the word "Universal".

SELECT title ,  Studio FROM film WHERE Studio LIKE "%Universal%"

Find the titles and studios of the films that are produced by some film studios that contained the word " Universal " .

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


Question: What are the first names of the professors who do not play Canoeing or Kayaking as activities?

SELECT lname FROM faculty WHERE rank  =  'Professor' EXCEPT SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'

What are the first names of the professors who do not play Canoeing or Kayaking as activities ?

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


Question: What is the short name for the journal that published the paper "A Case of Unilateral Ashy Dermatosis"?

SELECT T2.ShortName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'A Case of Unilateral Ashy Dermatosis'

What is the short name for the journal that published the paper " A Case of Unilateral Ashy Dermatosis " ?

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


Question: Indicate the creation date of the maximum number of votes.

SELECT CreationDate FROM votes GROUP BY CreationDate ORDER BY COUNT(Id) DESC LIMIT 1

Indicate the creation date of the maximum number of votes .

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


Question: What is the total number of ratings that has more than 3 stars?

SELECT count(*) FROM Rating WHERE stars  >  3

What is the total number of ratings that has more than 3 stars ?

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


Question: Identify whether the chemical compound that contains Calcium is carcinogenic.

SELECT T2.label AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'ca'

Identify whether the chemical compound that contains Calcium is carcinogenic .


Question: Provide a list of titles together with its publisher name for all publishers located in the USA.

SELECT T1.title, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'USA'

Provide a list of titles together with its publisher name for all publishers located in the USA .

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


Question: Please show the different statuses, ordered by the number of cities that have each.

SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC

Please show the different statuses , ordered by the number of cities that have each .

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


Question: List all the server of the phone complaints with a late response from the company.

SELECT DISTINCT T2.server FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T1.`Submitted via` = 'Phone' AND T1.`Timely response?` = 'No'

List all the server of the phone complaints with a late response from the company .

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


Question: Give the name of the country and state of the city with elevation of 1039.

SELECT DISTINCT T1.name, T2.state 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 T3.elevation = 1039

Give the name of the country and state of the city with elevation of 1039 .

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


Question: How many incidents of domestic violence occurred in an abandoned building in 2018?

SELECT SUM(CASE WHEN location_description = 'ABANDONED BUILDING' THEN 1 ELSE 0 END) FROM Crime WHERE date LIKE '%2018%' AND domestic = 'TRUE'

How many incidents of domestic violence occurred in an abandoned building in 2018 ?

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


Question: Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are from a place with more than 30,000 inhabitants?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T3.INHABITANTS_K > 30 AND T2.RESPONSE = 'true'

Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department , how many of them are from a place with more than 30,000 inhabitants ?

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


Question: Indicate the start date of patient Walter Bahringer's care plan.

SELECT DISTINCT T2.start FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Walter' AND T1.last = 'Bahringer'

Indicate the start date of patient Walter Bahringer 's care plan .

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


Question: In reviews for the Eagle National Bank product, how many of the 5 star reviews where from Nashville, Tennessee?

SELECT COUNT(T2.Stars) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T1.city = 'Nashville' AND T1.state_abbrev = 'TN' AND T2.Product = 'Eagle National Mortgage' AND T2.Stars = 5

In reviews for the Eagle National Bank product , how many of the 5 star reviews where from Nashville , Tennessee ?

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


Question: How many different scientists are assigned to any project?

SELECT count(DISTINCT scientist) FROM assignedto

How many different scientists are assigned to any project ?


Question: Calculate the total price for products from id 400 to 500.

SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID BETWEEN 400 AND 500

Calculate the total price for products from i d 400 to 500 .

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


Question: Who played the character named "Chanice Kobolowski"?

SELECT T2.Name FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID WHERE T1.`Character Name` = 'Chanice Kobolowski'

Who played the character named " Chanice Kobolowski " ?

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


Question: What is the repository number for the solution of method "SCore.Poisson.ngtIndex"?

SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'SCore.Poisson.ngtIndex'

What is the repository number for the solution of method " SCore . Poisson.ngtIndex " ?

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


Question: what are the average and maximum attendances of all events?

SELECT avg(Event_Attendance) ,  max(Event_Attendance) FROM event

what are the average and maximum attendances of all events ?


Question: What are the names and revenues of the companies with the highest revenues in each headquarter city?

SELECT name ,  max(revenue) ,  Headquarter FROM manufacturers GROUP BY Headquarter

What are the names and revenues of the companies with the highest revenues in each headquarter city ?

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


Question: Between San Diego and Santa Barbara, which county offers the most number of schools that does not offer physical building? Indicate the amount.

SELECT County, COUNT(Virtual) FROM schools WHERE (County = 'San Diego' OR County = 'Santa Barbara') AND Virtual = 'F' GROUP BY County ORDER BY COUNT(Virtual) DESC LIMIT 1

Between San Diego and Santa Barbara , which county offers the most number of schools that does not offer physical building ? Indicate the amount .

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


Question: What are the white percentages of cities, and the corresponding crime rates of the counties they correspond to?

SELECT T1.White ,  T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID

What are the white percentages of cities , and the corresponding crime rates of the counties they correspond to ?

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


Question: How many customers belong to the household segment in Germany?

SELECT COUNT(T1.c_name) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'GERMANY'

How many customers belong to the household segment in Germany ?

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


Question: Show all countries and the number of people from each country.

SELECT country ,  count(*) FROM people GROUP BY country

Show all countries and the number of people from each country .


Question: Provide the zip codes and the congress representatives' names of the postal points which are affiliated with Readers Digest.

SELECT T1.zip_code, T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.organization = 'Readers Digest'

Provide the zip codes and the congress representatives ' names of the postal points which are affiliated with Readers Digest .

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


Question: Find courses that ran in Fall 2009 and in Spring 2010.

SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010

Find courses that ran in Fall 2009 and in Spring 2010 .

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


Question: What is the average number of bank customers?

What is the average number of bank customers ?


Question: Which car in the database provides the best crash protection based on its weight? How much is it?

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

Which car in the database provides the best crash protection based on its weight ? How much is it ?

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


Question: Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix.

SELECT T1.duration FROM pitStops AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.year = 2011 AND T2.name = 'Australian Grand Prix'

Please list the time each driver spent at the pit stop during the 2011 Australian Grand Prix .

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


Question: What is the ratio between students majored in finance and physics?

SELECT SUM(CASE WHEN major_name = 'Finance' THEN 1 ELSE 0 END) / SUM(CASE WHEN major_name = 'Physics' THEN 1 ELSE 0 END) AS ratio FROM major

What is the ratio between students majored in finance and physics ?

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


Question: Find the name of the movie theaters that are playing the movies whose rating is ‘G’.

SELECT T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T1.rating  =  'G'

Find the name of the movie theaters that are playing the movies whose rating is ‘ G ’ .

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


Question: Which projects created by teachers with Doctor Degree where the project have more than 300 students involved. List down the title of the project.

SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_prefix LIKE 'Dr.' AND T2.students_reached > 300

Which projects created by teachers with Doctor Degree where the project have more than 300 students involved . List down the title of the project .

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


Question: What is the address of Mary Smith?

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


Question: Count the matches that were won by wickets in all season.

SELECT COUNT(T1.Match_Id) FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T2.Win_type = 'wickets'

Count the matches that were won by wickets in all season .

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


Question: How many people were in the Hall of Fame's Builder category?

SELECT COUNT(hofID) FROM HOF WHERE category = 'Builder'

How many people were in the Hall of Fame 's Builder category ?

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


Question: What is the detailed product of the complaint filed by Diesel Galloway on 2014/7/3?

SELECT T2.`Sub-product` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Diesel' AND T1.last = 'Galloway' AND T2.`Date received` = '2014-07-03'

What is the detailed product of the complaint filed by Diesel Galloway on 2014/7/3 ?

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


Question: Which country has least number of students?

SELECT T1.country FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.country ORDER BY count(*) LIMIT 1

Which country has least number of students ?


Question: Which locations have 2 or more cinemas with capacity over 300?

SELECT LOCATION FROM cinema WHERE capacity  >  300 GROUP BY LOCATION HAVING count(*)  >=  2

Which locations have 2 or more cinemas with capacity over 300 ?

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


Question: Find the contents that are stored in both Chicago and New York.

SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'

Find the contents that are stored in both Chicago and New York .

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


Question: What is average number of students enrolled in Florida colleges?

SELECT avg(enr) FROM College WHERE state  =  'FL'

What is average number of students enrolled in Florida colleges ?


Question: Show the name of each county along with the corresponding number of delegates from that county.

SELECT T1.County_name ,  COUNT(*) FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id

Show the name of each county along with the corresponding number of delegates from that county .


Question: Show the company name and the main industry for all companies whose headquarters are not from USA.

SELECT company ,  main_industry FROM company WHERE headquarters != 'USA'

Show the company name and the main industry for all companies whose headquarters are not from USA .

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


Question: What are the order ids and customer ids for orders that have been Cancelled, sorted by their order dates?

SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date

What are the order ids and customer ids for orders that have been Cancelled , sorted by their order dates ?

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


Question: What is the location and number of female students in university ID 23 in 2011?

SELECT T3.country_name, CAST(T2.num_students * T2.pct_female_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2011 AND T1.id = 23

What is the location and number of female students in university ID 23 in 2011 ?

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


Question: What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters?

SELECT DISTINCT T1.name FROM mill AS T1 JOIN architect AS t2 ON T1.architect_id  =  T2.id JOIN bridge AS T3 ON T3.architect_id  =  T2.id WHERE T3.length_meters  >  80

What are the distinct name of the mills built by the architects who have also built a bridge longer than 80 meters ?

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


Question: How many members does the club "Tennis Club" has?

SELECT count(*) 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  =  "Tennis Club"

How many members does the club " Tennis Club " has ?

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


Question: What is the institution's name of american students within the number of degree-seeking students in the cohort that ranges from 1 to 3?

SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.grad_cohort BETWEEN 1 AND 3 AND T2.race = 'Ai'

What is the institution 's name of american students within the number of degree - seeking students in the cohort that ranges from 1 to 3 ?

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


Question: Give the name of the department with the lowest budget.

SELECT dept_name FROM department ORDER BY budget LIMIT 1

Give the name of the department with the lowest budget .


Question: Please list the top ten movies with the most price per day in descending order of price per day.

SELECT title FROM film ORDER BY rental_rate / rental_duration DESC LIMIT 10

Please list the top ten movies with the most price per day in descending order of price per day .


Question: What was the type of inspection Tiramisu Kitchen had on 2014/1/14?

SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2014-01-14' AND T2.name = 'Tiramisu Kitchen'

What was the type of inspection Tiramisu Kitchen had on 2014/1/14 ?

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


Question: What is the mean longitude for all stations that have never had more than 10 bikes available?

SELECT avg(long) FROM station WHERE id NOT IN (SELECT station_id FROM status GROUP BY station_id HAVING max(bikes_available)  >  10)

What is the mean longitude for all stations that have never had more than 10 bikes available ?

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


Question: Which headphone class contains the most headphones?

SELECT CLASS FROM headphone GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1

Which headphone class contains the most headphones ?


Question: Show all driver names in the alphabetical order.

Show all driver names in the alphabetical order .


Question: How many orders which expected profits greater than 100?

SELECT COUNT(T1.productCode) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.MSRP - T2.buyPrice > 100

How many orders which expected profits greater than 100 ?


Question: Find the name of the publisher whose monthly profit is the highest or the lowest.

SELECT name FROM press WHERE Month_Profits_billion  =  (SELECT min(Month_Profits_billion) FROM press) OR Month_Profits_billion  =  (SELECT max(Month_Profits_billion) FROM press)

Find the name of the publisher whose monthly profit is the highest or the lowest .

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


Question: What is the power play chances of New York Rangers in 2009?

SELECT CAST(PPG AS REAL) / PPC FROM Teams WHERE year = 2009 AND name = 'New York Rangers'

What is the power play chances of New York Rangers in 2009 ?

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


Question: What is the total number of residents for the districts with the 3 largest areas?

SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3

What is the total number of residents for the districts with the 3 largest areas ?


Question: What is the average shipment weight carried by the oldest Mack?

SELECT AVG(T2.weight) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T1.make = 'Mack'

What is the average shipment weight carried by the oldest Mack ?

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


Question: Which of the mill names contains the french word 'Moulin'?

SELECT name FROM mill WHERE name LIKE '%Moulin%'

Which of the mill names contains the french word ' Moulin ' ?

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


Question: Find and list the id and geographic ID of the elderly customers with an education level below 3.

SELECT ID, GEOID FROM Customers WHERE EDUCATIONNUM < 3 AND age > 65

Find and list the i d and geographic ID of the elderly customers with an education level below 3 .

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


Question: How many matches were held in the Belgium Jupiler League in April, 2009?

SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Belgium Jupiler League' AND SUBSTR(t2.`date`, 1, 7) = '2009-04'

How many matches were held in the Belgium Jupiler League in April , 2009 ?

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


Question: Which division had the most draft matches in the 2008 season?

SELECT Div FROM matchs WHERE season = 2008 AND FTR = 'D' GROUP BY Div ORDER BY COUNT(FTR) DESC LIMIT 1

Which division had the most draft matches in the 2008 season ?

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


Question: Please list the titles of projects by which schools in Abington was donated.

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

Please list the titles of projects by which schools in Abington was donated .

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


Question: How many stores with less need for products, and purchased through a distributor, are located in Washtenaw County?

SELECT SUM(CASE WHEN T1.`Order Quantity` = 1 AND T1.`Sales Channel` = 'Distributor' AND T2.County = 'Washtenaw County' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID

How many stores with less need for products , and purchased through a distributor , are located in Washtenaw County ?

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


Question: How many books fall into each category?

SELECT category ,  count(*) FROM book_club GROUP BY category

How many books fall into each category ?


Question: List the names of courses in alphabetical order?

SELECT course_name FROM courses ORDER BY course_name

List the names of courses in alphabetical order ?


Question: What are the first name, last name, and phone number of all the female faculty members?

SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'

What are the first name , last name , and phone number of all the female faculty members ?

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


Question: How many customers in the building segments have orders with a total price of no less than 50,000?

SELECT COUNT(T2.c_name) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'BUILDING' AND T1.o_totalprice > 50000

How many customers in the building segments have orders with a total price of no less than 50,000 ?

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


Question: Who was the first ever Disney villain?

SELECT villian FROM characters ORDER BY SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) DESC LIMIT 1


Question: Show the name and prominence of the mountains whose picture is not taken by a lens of brand 'Sigma'.

SELECT name ,  prominence FROM mountain EXCEPT SELECT T1.name ,  T1.prominence FROM mountain AS T1 JOIN photos AS T2 ON T1.id  =  T2.mountain_id JOIN camera_lens AS T3 ON T2.camera_lens_id  =  T3.id WHERE T3.brand  =  'Sigma'

Show the name and prominence of the mountains whose picture is not taken by a lens of brand ' Sigma ' .

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


Question: Return the product type, name, and price for products supplied by supplier 3.

SELECT T2.product_type_code ,  T2.product_name ,  T2.product_price FROM product_suppliers AS T1 JOIN products AS T2 ON T1.product_id  =  T2.product_id WHERE T1.supplier_id  =  3

Return the product type , name , and price for products supplied by supplier 3 .

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


Question: Show other account details for account with name 338.

SELECT other_account_details FROM Accounts WHERE account_name  =  "338"

Show other account details for account with name 338 .

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


Question: How many classes exist for each school?

SELECT count(*) ,  T3.school_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T2.dept_code  =  T3.dept_code GROUP BY T3.school_code

How many classes exist for each school ?


Question: List the ISBN of the book published in Spanish.

SELECT T1.isbn13 FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Spanish'

List the ISBN of the book published in Spanish .


Question: What are the reigns and days held of all wrestlers?

What are the reigns and days held of all wrestlers ?

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


Question: How many drivers have not driven any cars?

SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver )

How many drivers have not driven any cars ?


Question: What's the description of user 85981819's movie list with the most followers?

SELECT T1.list_description 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.user_id = 85981819 ORDER BY T1.list_followers DESC LIMIT 1

What 's the description of user 85981819 's movie list with the most followers ?

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


Question: List the elements of all the triple bonds.

SELECT DISTINCT T3.element FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id INNER JOIN atom AS T3 ON T2.atom_id = T3.atom_id WHERE T1.bond_type = '#'

List the elements of all the triple bonds .


Question: Among the drivers who participated in the French Grand Prix, who has the slowest time in the 3rd lap.

SELECT T1.driverId FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T2.name = 'French Grand Prix' AND T1.lap = 3 ORDER BY T1.time DESC LIMIT 1

Among the drivers who participated in the French Grand Prix , who has the slowest time in the 3rd lap .

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


Question: How many user's compliment in photo has medium in number?

SELECT COUNT(T2.user_id) FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.compliment_type = 'photos' AND T2.number_of_compliments = 'Medium'

How many user 's compliment in photo has medium in number ?

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


Question: Is (206) 555-1189 the home phone number for Laura Callahan?

SELECT CASE WHEN HomePhone = '(206) 555-1189' THEN 'YES' ELSE 'NO' END FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan'

Is ( 206 ) 555 - 1189 the home phone number for Laura Callahan ?

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


Question: How many countries are having their country's footnotes described as "unspecified"? Please provide the full names of any three of those countries.

SELECT COUNT(DISTINCT T1.CountryCode)  FROM Country AS T1 INNER JOIN Footnotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Unspecified' OR T2.Description = 'Not specified' UNION SELECT T1.LongName FROM Country AS T1 INNER JOIN Footnotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Unspecified' OR T2.Description = 'Not specified' LIMIT 4

How many countries are having their country 's footnotes described as " unspecified " ? Please provide the full names of any three of those countries .

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


Question: Please list the products that are out of stock and purchased in house.

SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.MakeFlag = 0 AND (T1.OnOrderQty IS NULL OR T1.OnOrderQty = 0)

Please list the products that are out of stock and purchased in house .


Question: List the number of people injured by perpetrators in ascending order.

SELECT Injured FROM perpetrator ORDER BY Injured ASC

List the number of people injured by perpetrators in ascending order .


Question: How many more sports games than simulation games?

SELECT COUNT(CASE WHEN T1.genre_name = 'Sports' THEN T2.id ELSE NULL END) - COUNT(CASE WHEN T1.genre_name = 'Simulation' THEN T2.id ELSE NULL END) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id

How many more sports games than simulation games ?


Question: Lists all companies by BusinessEntityID that increased their current year sales by more than 60% over last year's sales and have a bonus greater than 3,000.

SELECT BusinessEntityID FROM SalesPerson WHERE SalesYTD > SalesLastYear + SalesLastyear * 0.6 AND Bonus > 3000

Lists all companies by BusinessEntityID that increased their current year sales by more than 60 % over last year 's sales and have a bonus greater than 3,000 .

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


Question: List the first and last name of the students who do not have any food type allergy.

SELECT fname ,  lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "food")

List the first and last name of the students who do not have any food type allergy .

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


Question: How many orders has Aimee Bixby made?

SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby'


Question: What are all details of the students who registered but did not attend any course?

SELECT * FROM student_course_registrations WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)

What are all details of the students who registered but did not attend any course ?

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


Question: Return the ids of all products that were ordered more than three times or supplied more than 80000.

SELECT product_id FROM Order_Items GROUP BY product_id HAVING count(*)  >  3 UNION SELECT product_id FROM Product_Suppliers GROUP BY product_id HAVING sum(total_amount_purchased)  >  80000

Return the ids of all products that were ordered more than three times or supplied more than 80000 .

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


Question: Find the number of all pilots whose age is older than some pilot who has plane Piper Cub.

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

Find the number of all pilots whose age is older than some pilot who has plane Piper Cub .

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


Question: Which countries have more than two members?

SELECT Country FROM member GROUP BY Country HAVING COUNT(*)  >  2

Which countries have more than two members ?


Question: How many zip codes are under Barre, VT?

SELECT COUNT(T2.zip_code) FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Barre, VT'

How many zip codes are under Barre , VT ?

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


Question: List document id of all documents.

SELECT Document_Object_ID FROM Document_Objects;

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


Question: Show all cities where at least one customer lives in but no performer lives in.

SELECT T1.City_Town FROM Addresses AS T1 JOIN Customers AS T2 ON T1.Address_ID  =  T2.Address_ID EXCEPT SELECT T1.City_Town FROM Addresses AS T1 JOIN Performers AS T2 ON T1.Address_ID  =  T2.Address_ID

Show all cities where at least one customer lives in but no performer lives in .

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


Question: Find the phone number and email address of customer "Harold".

SELECT Customer_Phone ,  Customer_Email_Address FROM CUSTOMERS WHERE Customer_Name  =  "Harold"

Find the phone number and email address of customer " Harold " .

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


Question: How many courses does the department of Computer Information Systmes offer?

SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"

How many courses does the department of Computer Information Systmes offer ?

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


Question: Among the employees with poor performance, provide the managers' full names, location city, address and its zip code.

SELECT T1.firstname, T1.lastname, T2.locationcity, T2.address, T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Manager' AND T1.performance = 'Poor'

Among the employees with poor performance , provide the managers ' full names , location city , address and its zip code .

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


Question: How many climbers are from each country?

SELECT Country ,  COUNT(*) FROM climber GROUP BY Country

How many climbers are from each country ?


Question: What is the name of the supplier that provides the part "hot spring dodger dim light" with the lowest supply cost?

SELECT T2.s_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light' ORDER BY T1.ps_supplycost LIMIT 1

What is the name of the supplier that provides the part " hot spring dodger dim light " with the lowest supply cost ?

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


Question: What are the names of members who are not in charge of any events?

SELECT member_name FROM member EXCEPT SELECT T1.member_name FROM member AS T1 JOIN party_events AS T2 ON T1.member_id  =  T2.member_in_charge_id

What are the names of members who are not in charge of any events ?

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


Question: What are the names of all of Alice's friends of friends?

SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  'Alice' AND T4.name != 'Alice'

What are the names of all of Alice 's friends of friends ?

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


Question: Which home team had lost the fewest matches in the 2016 season?

SELECT teamDetails.team_long_name FROM Match AS matchData INNER JOIN Team AS teamDetails ON matchData.home_team_api_id = teamDetails.team_api_id WHERE matchData.season = '2015/2016' AND matchData.home_team_goal - matchData.away_team_goal < 0 GROUP BY matchData.home_team_api_id ORDER BY COUNT(*) ASC LIMIT 1

Which home team had lost the fewest matches in the 2016 season ?

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


Question: In 2016, which city has the highest number of establishments with the highest health and safety hazards?

SELECT T2.city FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T1.risk_category = 'High Risk' GROUP BY T2.city ORDER BY COUNT(T2.city) DESC LIMIT 1

In 2016 , which city has the highest number of establishments with the highest health and safety hazards ?

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


Question: What are the names of all aircrafts that can cover more distances than average?

SELECT name FROM Aircraft WHERE distance  >  (SELECT avg(distance) FROM Aircraft)

What are the names of all aircrafts that can cover more distances than average ?

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


Question: get the details of employees who manage a department.

SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T1.employee_id  =  T2.manager_id

get the details of employees who manage a department .


Question: List all the cities where Shawn Torres sells Audio products.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T4.`Product Name` = 'Audio' AND T3.`Sales Team` = 'Shawn Torres' THEN T1.`City Name` ELSE NULL END AS T FROM `Store Locations` T1 INNER JOIN `Sales Orders` T2 ON T2._StoreID = T1.StoreID INNER JOIN `Sales Team` T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products T4 ON T4.ProductID = T2._ProductID ) WHERE T IS NOT NULL

List all the cities where Shawn Torres sells Audio products .

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


Question: Among the countries with a GDP of over 1000000, how many of them have mountains higher than 1000?

SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country INNER JOIN economy AS T3 ON T3.Country = T1.Code INNER JOIN mountain AS T4 ON T4.Name = T2.Mountain WHERE T3.GDP > 1000000 AND T4.Height > 1000

Among the countries with a GDP of over 1000000 , how many of them have mountains higher than 1000 ?

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


Question: How many customers did not have any event?

SELECT count(*) FROM customers WHERE customer_id NOT IN ( SELECT customer_id FROM customer_events )

How many customers did not have any event ?


Question: Return the investor who have invested in the greatest number of entrepreneurs.

SELECT Investor FROM entrepreneur GROUP BY Investor ORDER BY COUNT(*) DESC LIMIT 1

Return the investor who have invested in the greatest number of entrepreneurs .


Question: Name all the categories for podcast titled 'I Heart My Life Show'.

SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'I Heart My Life Show'

Name all the categories for podcast titled ' I Heart My Life Show ' .

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


Question: Which organization does student 313 belong to?

SELECT organ FROM enlist WHERE name = 'studenT113'

Which organization does student 313 belong to ?


Question: What are the elements of the toxicology and label of molecule TR060?

SELECT DISTINCT T1.element, T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.molecule_id = 'TR060'

What are the elements of the toxicology and label of molecule TR060 ?

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


Question: What are the top 10 products with the highest net profit?

SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID GROUP BY T1._ProductID ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 10

What are the top 10 products with the highest net profit ?

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


Question: What type of game is Call of Destiny?

SELECT gtype FROM Video_games WHERE gname  =  "Call of Destiny"

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


Question: What are the distinct ages of students who have secretary votes in the fall election cycle?

SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "Fall"

What are the distinct ages of students who have secretary votes in the fall 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: Return the top speed and power of the vehicle that was built in the year 1996.

SELECT top_speed ,  power FROM vehicle WHERE build_year  =  1996

Return the top speed and power of the vehicle that was built in the year 1996 .

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


Question: What are the package contents of all those sent by John Zoidfarb?

SELECT T1.Contents FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "John Zoidfarb";

What are the package contents of all those sent by John Zoidfarb ?

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


Question: How many white patients whose birth year is 1935 have a stroke?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.patient WHERE strftime('%Y', T1.birthdate) = '1935' AND T1.race = 'white' AND T2.DESCRIPTION = 'Stroke'

How many white patients whose birth year is 1935 have a stroke ?

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


Question: For the coach who co-coached with Dave Lewis in 1998, where was his birth place?

SELECT T1.birthCountry FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 1998 AND T2.notes = 'co-coach with Dave Lewis'

For the coach who co - coached with Dave Lewis in 1998 , where was his birth place ?

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


Question: What are the official languages used in Greece?

SELECT T1.Language FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.IsOfficial = 'T' AND T2.name = 'Greece'

What are the official languages used in Greece ?


Question: Who is the youngest competitor that participated in 2014 Winter?

SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '2014 Winter' ORDER BY T2.age LIMIT 1

Who is the youngest competitor that participated in 2014 Winter ?


Question: What is the average amount due for all the payments?

What is the average amount due for all the payments ?

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


Question: Count the number of products in the category 'Seeds'.

SELECT count(*) FROM products WHERE product_category_code  =  "Seeds"

Count the number of products in the category ' Seeds ' .

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


Question: Did Maya Mclean attend the 'Women's Soccer' event?

SELECT CASE WHEN T3.event_name = 'Women''s Soccer' THEN 'YES' END AS result FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member INNER JOIN event AS T3 ON T2.link_to_event = T3.event_id WHERE T1.first_name = 'Maya' AND T1.last_name = 'Mclean'

Did Maya Mclean attend the ' Women 's Soccer ' event ?

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


Question: Which apps have not been updated since year 2015 and what kind of sentiment users hold on it?

SELECT DISTINCT App, Sentiment FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE CAST(SUBSTR('Last Updated', -4, 4) AS INTEGER) < 2015 )

Which apps have not been updated since year 2015 and what kind of sentiment users hold on it ?

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


Question: How many stores are in weather station 12?

SELECT SUM(store_nbr) FROM relation WHERE station_nbr = 12

How many stores are in weather station 12 ?


Question: Please list the titles of any two papers that Jundu has written.

SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name LIKE 'Jun du%' LIMIT 2

Please list the titles of any two papers that Jundu has written .

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


Question: What is the university ID with the most students in 2011?

SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1

What is the university ID with the most students in 2011 ?

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


Question: How many Bangladeshi artists are listed?

SELECT count(*) FROM artist WHERE country  =  "Bangladesh"

How many Bangladeshi artists are listed ?


Question: Which business in fashion category has the most review?

SELECT T3.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 INNER JOIN Reviews AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name LIKE 'Fashion' AND T1.category_id = 7 GROUP BY T3.business_id ORDER BY COUNT(T4.user_id) DESC LIMIT 1

Which business in fashion category has the most review ?

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


Question: Find the names of all races held in 2017.

SELECT name FROM races WHERE YEAR = 2017

Find the names of all races held in 2017 .


Question: List all product names in ascending order of price.

SELECT Product_Name FROM Products ORDER BY Product_Price ASC

List all product names in ascending order of price .


Question: List all cities in the Northern California Region.

SELECT city FROM geographic WHERE region = 'northern california'

List all cities in the Northern California Region .

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


Question: Which enzyme names have the substring "ALA"?

SELECT name FROM enzyme WHERE name LIKE "%ALA%"

Which enzyme names have the substring " ALA " ?


Question: Show all member names and registered branch names sorted by register year.

SELECT T3.name ,  T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id ORDER BY T1.register_year

Show all member names and registered branch names sorted by register year .

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


Question: What are the ids, names and genders of the architects who built two bridges or one mill?

SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  2 UNION SELECT T1.id ,  T1.name ,  T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  =  1

What are the ids , names and genders of the architects who built two bridges or one mill ?

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


Question: What are the tags of the release "sugarhill gang"?

SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'sugarhill gang'

What are the tags of the release " sugarhill gang " ?

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


Question: What are the names of all the stores located in Khanewal District?

SELECT t1.store_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 t3.district_name  =  "Khanewal District"

What are the names of all the stores located in Khanewal District ?

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


Question: How many documents have a process?

SELECT count(DISTINCT document_id) FROM Documents_processes


Question: Please list the actor IDs whose movies have the newest published date.

SELECT T1.actorid FROM movies2actors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.year = 4

Please list the actor IDs whose movies have the newest published date .

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


Question: Who is the oldest person?

SELECT name FROM Person WHERE age  =  (SELECT max(age) FROM person)


Question: How many students have never been absent in school?

SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 0

How many students have never been absent in school ?


Question: What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010?

SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 INTERSECT SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010

What are the ids for courses that were offered in both Fall of 2009 and Spring of 2010 ?

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


Question: Give the code of sets have expansion commander type?

SELECT T2.setCode FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.type = 'commander'

Give the code of sets have expansion commander type ?

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


Question: How many transaction does account with name 337 have?

SELECT count(*) FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id WHERE T2.account_name  =  "337"

How many transaction does account with name 337 have ?

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


Question: What is the heaviest package sent by the clients which 'John' is part of their name? List package number and weight.

SELECT T1.PackageNumber ,  max(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name LIKE "John";

What is the heaviest package sent by the clients which ' John ' is part of their name ? List package number and weight .

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


Question: What are the ids of all the employees who have destroyed documents?

SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed

What are the ids of all the employees who have destroyed documents ?


Question: On what dates did the bakery sell more than 100 dollars worth of goods in total?

SELECT T3.date FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.date HAVING sum(T1.price)  >  100

On what dates did the bakery sell more than 100 dollars worth of goods in total ?

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


Question: Find the names of spokesmen who have served some district before 2004.

SELECT t1.name FROM spokesman AS t1 JOIN spokesman_district AS t2 ON t1.Spokesman_ID  =  t2.Spokesman_ID WHERE t2.start_year  <  2004

Find the names of spokesmen who have served some district before 2004 .

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


Question: Which of the root beer brand have the lowest purchase?

SELECT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID GROUP BY T2.BrandID ORDER BY COUNT(T1.BrandID) LIMIT 1

Which of the root beer brand have the lowest purchase ?

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


Question: What are the average and minimum weights for people of each sex?

SELECT avg(weight) ,  min(weight) ,  sex FROM people GROUP BY sex

What are the average and minimum weights for people of each sex ?

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


Question: Which customers have nationality "England" or "Australia"? Give me their names.

SELECT Name FROM customer WHERE Nationality  =  "England" OR Nationality  =  "Australia"

Which customers have nationality " England " or " Australia " ? Give me their names .

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


Question: Please name any three root beer brands that have the highest market evaluation and acceptance.

SELECT DISTINCT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 LIMIT 3

Please name any three root beer brands that have the highest market evaluation and acceptance .

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


Question: List the brands of root beer produced by Dr Pepper Snapple Group and calculate their percentage of purchases between 2014 to 2016.

SELECT T1.BrandName , CAST(SUM(CASE WHEN T2.PurchaseDate >= '2014-01-01' AND T2.PurchaseDate <= '2016-12-31' THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.BrandID) AS purchase FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID WHERE T1.BreweryName = 'Dr Pepper Snapple Group' GROUP BY T2.BrandID

List the brands of root beer produced by Dr Pepper Snapple Group and calculate their percentage of purchases between 2014 to 2016 .

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


Question: List the name of ships that are not involved in any mission

SELECT Name FROM ship WHERE Ship_ID NOT IN (SELECT Ship_ID FROM mission)

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


Question: From which country does the most umpires are from? How many of them are from the mentioned country?

SELECT T2.Country_Id, COUNT(T1.Umpire_Id) FROM Umpire AS T1 INNER JOIN Country AS T2 ON T2.Country_Id = T1.Umpire_Country GROUP BY T2.Country_Id ORDER BY COUNT(T1.Umpire_Id) DESC LIMIT 1

From which country does the most umpires are from ? How many of them are from the mentioned country ?

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


Question: How many hours do the players train on average?

How many hours do the players train on average ?


Question: Show the ids for projects with at least 2 documents.

SELECT project_id FROM Documents GROUP BY project_id HAVING count(*)  >=  2

Show the ids for projects with at least 2 documents .

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


Question: How many unemployed students are enlisted in the navy organization?

SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'navy'

How many unemployed students are enlisted in the navy organization ?

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


Question: Find the level name of the catalog with the lowest price (in USD).

SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1

Find the level name of the catalog with the lowest price ( in USD ) .

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


Question: Write the contents of comments with a score of 17.

SELECT Text FROM comments WHERE Score = 17

Write the contents of comments with a score of 17 .

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


Question: What are the names of the different bank branches, and what are their total loan amounts?

SELECT sum(amount) ,  T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname

What are the names of the different bank branches , and what are their total loan amounts ?

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


Question: Give the percentage of "Automotive" businesses among all the Yelp businesses.

SELECT CAST(SUM(CASE WHEN T2.category_name LIKE 'Automotive' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) AS "percentage" FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id

Give the percentage of " Automotive " businesses among all the Yelp businesses .

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


Question: Show all artist name, age, and country ordered by the yeared they joined.

SELECT name ,  age ,  country FROM artist ORDER BY Year_Join

Show all artist name , age , and country ordered by the yeared they joined .

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


Question: Which job level is O'Rourke at?

SELECT job_lvl FROM employee WHERE lname = 'O''Rourke'


Question: Identify the heaviest superhero in DC Comics.

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics' ORDER BY T1.weight_kg DESC LIMIT 1

Identify the heaviest superhero in DC Comics .


Question: How many brands of root beers are available in cans and contain corn syrup and artificial sweeteners?

SELECT COUNT(BrandID) FROM rootbeerbrand WHERE CornSyrup = 'TRUE' AND ArtificialSweetener = 'TRUE' AND AvailableInCans = 'TRUE'

How many brands of root beers are available in cans and contain corn syrup and artificial sweeteners ?

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


Question: What are the names of all tracks that are on playlists titled Movies?

SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id = T2.track_id JOIN playlists AS T3 ON T3.id = T2.playlist_id WHERE T3.name = "Movies";

What are the names of all tracks that are on playlists titled Movies ?

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


Question: Please show the employee last names that serves no more than 20 customers.

SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20

Please show the employee last names that serves no more than 20 customers .

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


Question: What is the name and id of the staff who recorded the fault log but has not contacted any visiting engineers?

SELECT T1.staff_name ,  T1.staff_id FROM Staff AS T1 JOIN Fault_Log AS T2 ON T1.staff_id  =  T2.recorded_by_staff_id EXCEPT SELECT T3.staff_name ,  T3.staff_id FROM Staff AS T3 JOIN Engineer_Visits AS T4 ON T3.staff_id  =  T4.contact_staff_id

What is the name and i d of the staff who recorded the fault log but has not contacted any visiting engineers ?

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


Question: Which constructor scored most points from Monaco Grand Prix between 1980 and 2010? List the score, name and nationality of this team.

SELECT SUM(T1.points), T2.name, T2.nationality FROM constructorResults AS T1 INNER JOIN constructors AS T2 ON T1.constructorId = T2.constructorId INNER JOIN races AS T3 ON T3.raceid = T1.raceid WHERE T3.name = 'Monaco Grand Prix' AND T3.year BETWEEN 1980 AND 2010 GROUP BY T2.name ORDER BY SUM(T1.points) DESC LIMIT 1

Which constructor scored most points from Monaco Grand Prix between 1980 and 2010 ? List the score , name and nationality of this team .

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


Question: Describe the birth country, height and person name who were not included in credit list with category of casting.

SELECT T1.birth_country, T1.height_meters, T1.name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Cast' AND T2.credited = 'false';

Describe the birth country , height and person name who were not included in credit list with category of casting .

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


Question: How many songs were released for each format?

SELECT count(*) ,  formats FROM files GROUP BY formats

How many songs were released for each format ?


Question: Which customers have the substring "Diana" in their names? Return the customer details.

SELECT customer_details FROM customers WHERE customer_details LIKE "%Diana%"

Which customers have the substring " Diana " in their names ? Return the customer details .

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


Question: How many students who have never been absent from school?

SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 0

How many students who have never been absent from school ?


Question: What is the FBI code and definition of Gambling?

SELECT fbi_code_no, description FROM FBI_Code WHERE title = 'Gambling'

What is the FBI code and definition of Gambling ?

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


Question: From which countries are players who make more than 1200000 from?

SELECT DISTINCT Country FROM player WHERE Earnings  >  1200000

From which countries are players who make more than 1200000 from ?

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


Question: Find the start and end dates of detentions of teachers with last name "Schultz".

SELECT T1.datetime_detention_start ,  datetime_detention_end FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schultz"

Find the start and end dates of detentions of teachers with last name " Schultz " .

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


Question: What was the contact name for the check "NR157385"?

SELECT t2.contactFirstName, t2.contactLastName FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.checkNumber = 'NR157385'

What was the contact name for the check " NR157385 " ?

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


Question: How much is HL Grip Tape's profit ratio?

SELECT (T1.LastReceiptCost - T1.StandardPrice) / T1.StandardPrice FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'HL Grip Tape'

How much is HL Grip Tape 's profit ratio ?

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


Question: Find the names of movies whose rating is ‘G’.

SELECT title FROM movies WHERE rating  =  'G'

Find the names of movies whose rating is ‘ G ’ .

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


Question: Which NHL award was most frequently won by the coach with the most wins?

SELECT award FROM Teams AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.lgID = T2.lgID WHERE T1.lgID = 'NHL' GROUP BY T2.coachID, T2.award ORDER BY COUNT(T2.award) DESC LIMIT 1

Which NHL award was most frequently won by the coach with the most wins ?

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


Question: Which menu page of "Ritz Carlton" has the biggest height?

SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.name = 'Ritz Carlton' ORDER BY T1.full_height DESC LIMIT 1

Which menu page of " Ritz Carlton " has the biggest height ?

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


Question: Count the number of rooms that are not in the Lamberton building.

SELECT count(*) FROM classroom WHERE building != 'Lamberton'

Count the number of rooms that are not in the Lamberton building .


Question: Calculate the average amount of payments made by customers during the first half of 2004.

SELECT AVG(amount) FROM payments WHERE paymentDate BETWEEN '2004-01-01' AND '2004-06-30'

Calculate the average amount of payments made by customers during the first half of 2004 .

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


Question: Find the number of reservations for each boat with id greater than 50.

SELECT bid ,  count(*) FROM Reserves GROUP BY bid HAVING bid  >  50

Find the number of reservations for each boat with i d greater than 50 .

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


Question: How many patients have a normal anti-DNA level, yet their data are not recorded.

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA < 8 AND T1.Description IS NULL

How many patients have a normal anti - DNA level , yet their data are not recorded .

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


Question: What is the average winning margin of all the matches SC Ganguly has played in?

SELECT CAST(SUM(T3.Win_Margin) AS REAL) / COUNT(*) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id WHERE T1.Player_Name = 'SC Ganguly'

What is the average winning margin of all the matches SC Ganguly has played in ?

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


Question: What are the distinct driver names who have driven vehicles with power more than 5000 ?

select distinct t1.name from driver as t1 join vehicle_driver as t2 on t1.driver_id  =  t2.driver_id join vehicle as t3 on t2.vehicle_id  =  t3.vehicle_id where t3.power  >  5000

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


Question: Which race was Alex Yoong in when he was in track number less than 20?

SELECT T1.name FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Alex' AND T3.surname = 'Yoong' AND T2.position < 20

Which race was Alex Yoong in when he was in track number less than 20 ?

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


Question: What is the average balance in checking accounts?

What is the average balance in checking accounts ?


Question: return the unique ids of sailors who are older than any sailors.

SELECT DISTINCT sid FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors);

return the unique ids of sailors who are older than any sailors .

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


Question: Which college has the most authors with submissions?

SELECT College FROM submission GROUP BY College ORDER BY COUNT(*) DESC LIMIT 1

Which college has the most authors with submissions ?


Question: Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261.

SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'CIS-220' INTERSECT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num WHERE crs_code  =  'QM-261'

Find the first name of the professor who is teaching two courses with code CIS-220 and QM-261 .

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


Question: State the name of the city where Jose Rodriguez works.

SELECT T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.firstname = 'Jose' AND T1.lastname = 'Rodriguez'

State the name of the city where Jose Rodriguez works .

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


Question: List the cities which have more than one airport and number of airports.

SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1

List the cities which have more than one airport and number of airports .

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


Question: What type of restaurant is most common in Monterey county?

SELECT T2.food_type FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.county = 'Monterey' GROUP BY T2.food_type ORDER BY COUNT(T2.food_type) DESC LIMIT 1

What type of restaurant is most common in Monterey county ?

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


Question: What are the different card types, and how many transactions have been made with each?

SELECT T2.card_type_code ,  count(*) FROM Financial_transactions AS T1 JOIN Customers_cards AS T2 ON T1.card_id  =  T2.card_id GROUP BY T2.card_type_code

What are the different card types , and how many transactions have been made with each ?

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


Question: What is the gross of a comedy movie with a rating lower than 7 and starred by an actor with a net worth greater than $375,000,000.00?

SELECT SUM(T1.Gross) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) > 375000000 AND T1.Rating < 7 AND T1.Genre = 'Comedy'

What is the gross of a comedy movie with a rating lower than 7 and starred by an actor with a net worth greater than $ 375,000,000.00 ?

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


Question: Which services have been used more than twice in first notification of loss? Return the service name.

SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id  =  t2.service_id GROUP BY t1.service_id HAVING count(*)  >  2

Which services have been used more than twice in first notification of loss ? Return the service name .

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


Question: Which orders are made by the customer named "Jeramie"? Give me the order ids and status.

SELECT T2.order_id ,  T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"

Which orders are made by the customer named " Jeramie " ? Give me the order ids and status .

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


Question: What is the percentage of under $500 thefts among all cases that happened in West Englewood?

SELECT CAST(SUM(CASE WHEN T2.secondary_description = '$500 AND UNDER' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.case_number) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no INNER JOIN Community_Area AS T3 ON T1.community_area_no = T3.community_area_no WHERE T2.primary_description = 'THEFT' AND T3.community_area_name = 'West Englewood'

What is the percentage of under $ 500 thefts among all cases that happened in West Englewood ?

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


Question: How many of the worst actors are men and how many of the worst actors are women? Indicate your answer in ratio form.

SELECT CAST(SUM(IIF(a_gender = 'M', 1, 0)) AS REAL) / SUM(IIF(a_gender = 'F', 1, 0)) FROM actors WHERE a_quality = 0

How many of the worst actors are men and how many of the worst actors are women ? Indicate your answer in ratio form .

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


Question: Which player ID are left winger and weight more than 200?

SELECT DISTINCT playerID FROM Master WHERE pos LIKE '%L%' AND weight > 200 AND playerID IS NOT NULL AND pos = 'L'

Which player ID are left winger and weight more than 200 ?

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


Question: What is the inventory ID of the films starred by Russell Close with a duration between 110 to 150 minutes?

SELECT T4.inventory_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T3.length BETWEEN 110 AND 150 AND T1.first_name = 'Russell' AND T1.last_name = 'Close'

What is the inventory ID of the films starred by Russell Close with a duration between 110 to 150 minutes ?

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


Question: Give the client ID of the complaint received on April 16, 2014 and submitted through fax.

SELECT T2.Client_ID FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Fax' AND T1.`Date received` = '2014-04-16'

Give the client ID of the complaint received on April 16 , 2014 and submitted through fax .

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


Question: What is the number of games sold in Europe for game platform ID 26?

SELECT T2.num_sales * 100000 AS nums_eur FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T2.game_platform_id = 26 AND T1.region_name = 'Europe'

What is the number of games sold in Europe for game platform ID 26 ?

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


Question: Find the names of all English songs.

SELECT song_name FROM song WHERE languages  =  "english"


Question: List the ID, city, state and region for the store type which is fewer between borough and CDP.

SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.State, T2.Type FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.Type = 'Borough' OR T2.Type = 'CDP'

List the ID , city , state and region for the store type which is fewer between borough and CDP .

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


Question: How many courses that do not have prerequisite?

SELECT count(*) FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)

How many courses that do not have prerequisite ?


Question: How many Summer games were held in Stockholm?

SELECT COUNT(T3.id) 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 = 'Stockholm' AND T3.season = 'Summer'

How many Summer games were held in Stockholm ?


Question: Which city and state has the bad alias of Lawrenceville?

SELECT T2.city, T2.state FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Lawrenceville' GROUP BY T2.city, T2.state

Which city and state has the bad alias of Lawrenceville ?

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


Question: Among the teams whose shorthanded goals are between 1 to 5, which player is the most trustworthy in the critical moment?

SELECT T2.nameGiven, T2.lastName FROM Scoring AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.SHG BETWEEN 1 AND 5 ORDER BY T1.GWG DESC LIMIT 1

Among the teams whose shorthanded goals are between 1 to 5 , which player is the most trustworthy in the critical moment ?

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


Question: What is the capital of the 3rd most populated country in Asia and what is the capital city's ratio in percentage (%) against the overall population of the country?

SELECT T4.Capital, CAST(T3.Population AS REAL) * 100 / T4.Population FROM city AS T3 INNER JOIN ( SELECT T1.Capital , T1.Population FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country WHERE T2.Continent = 'Asia' ORDER BY T1.Population DESC LIMIT 2, 1 ) AS T4 ON T3.Name = T4.Capital

What is the capital of the 3rd most populated country in Asia and what is the capital city 's ratio in percentage ( % ) against the overall population of the country ?

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


Question: What are the names of all staff members who are older than average?

SELECT name FROM staff WHERE age  >  (SELECT avg(age) FROM staff)

What are the names of all staff members who are older than average ?

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


Question: Tell me the payment method used by the customer who ordered the least amount of goods in total.

SELECT t1.payment_method FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) LIMIT 1

Tell me the payment method used by the customer who ordered the least amount of goods in total .

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


Question: How many different items were reviewed by some users?

How many different items were reviewed by some users ?


Question: How many wins did the Philadelphia Flyers have over the Boston Bruins in 1985?

SELECT T1.W FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1985 AND T1.tmID = ( SELECT DISTINCT tmID FROM Teams WHERE name = 'Philadelphia Flyers' ) AND T1.oppID = ( SELECT DISTINCT tmID FROM Teams WHERE name = 'Boston Bruins' )

How many wins did the Philadelphia Flyers have over the Boston Bruins in 1985 ?

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


Question: What is the name of the nurse has the most appointments?

SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1

What is the name of the nurse has the most appointments ?

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


Question: What are the words that were paired with "John", list down 10 of them.

SELECT w2nd FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'john' ) LIMIT 10

What are the words that were paired with " John " , list down 10 of them .

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


Question: When did the staff member with first name as Janessa and last name as Sawayn join the company?

SELECT date_joined_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

When did the staff member with first name as Janessa and last name as Sawayn join the company ?

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


Question: Which team won by wickets in match ID 335993?

SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Win_By AS T4 ON T2.Win_Type = T4.Win_Id WHERE T2.Match_Id = '335993' GROUP BY T1.Team_Name

Which team won by wickets in match ID 335993 ?

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


Question: How many students have had at least one "B" grade?

SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade  =  "B"

How many students have had at least one " B " grade ?

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


Question: Find the name of authors who publish their books in both "MM" and "LT" series.

SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'MM' INTERSECT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'LT'

Find the name of authors who publish their books in both " MM " and " LT " series .

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


Question: How many tags does the release "city funk" have？

SELECT COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.groupName = 'city funk'

How many tags does the release " city funk " have ？

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


Question: What are the different room sizes, and how many of each are there?

SELECT room_size ,  count(*) FROM Rooms GROUP BY room_size

What are the different room sizes , and how many of each are there ?

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


Question: In comments with 0 score, how many of the posts have view count lower than 5?

SELECT COUNT(T1.Id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.ViewCount < 5 AND T2.Score = 0

In comments with 0 score , how many of the posts have view count lower than 5 ?

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


Question: What is the first name of the author with last name "Ueno"?

SELECT fname FROM authors WHERE lname  =  "Ueno"

What is the first name of the author with last name " Ueno " ?

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


Question: How many nominations have Billy Kimball received in 2010 for The simpson 20s: Season 20?

SELECT COUNT(award_id) FROM Award WHERE person = 'Billy Kimball' AND SUBSTR(year, 1, 4) = '2010' AND result = 'Nominee';

How many nominations have Billy Kimball received in 2010 for The simpson 20s : Season 20 ?

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


Question: Find the names of all modern rooms with a base price below $160 and two beds.

SELECT roomName FROM Rooms WHERE basePrice  <  160 AND beds =  2 AND decor  =  'modern';

Find the names of all modern rooms with a base price below $ 160 and two beds .

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