Question: What is the total number of enrollment of schools that do not have any goalie player?

SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie")

What is the total number of enrollment of schools that do not have any goalie player ?

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


Question: What is the full name of employee who sold 1000 units?

SELECT DISTINCT T2.FirstName, T2.MiddleInitial, T2.LastName FROM Sales AS T1 INNER JOIN Employees AS T2 ON T1.SalesPersonID = T2.EmployeeID WHERE T1.Quantity = 1000

What is the full name of employee who sold 1000 units ?

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


Question: Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank.

SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id WHERE t2.rank  =  'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id WHERE t2.rank  =  'Lieutenant'

Find the name of the ships that are steered by both a captain with Midshipman rank and a captain with Lieutenant rank .

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


Question: Calculate the average duration travelled by subscribers that both started and ended their trip in Mountain View City Hall and indicate the date when the station was first installed.

SELECT AVG(T1.duration), T2.installation_date FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_station_name = 'Mountain View City Hall' AND T1.subscription_type = 'Subscriber' AND T1.end_station_name = 'Mountain View City Hall'

Calculate the average duration travelled by subscribers that both started and ended their trip in Mountain View City Hall and indicate the date when the station was first installed .

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


Question: How many customers have an account?

SELECT count(DISTINCT customer_id) FROM Accounts


Question: Indicate the street numbers where Aux Delices Vietnamese Restaurant are located.

SELECT DISTINCT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'aux delices vietnamese restaurant'

Indicate the street numbers where Aux Delices Vietnamese Restaurant are located .

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


Question: Describe the device user gender and age of the event ID of 15251.

SELECT T1.gender, T1.age FROM gender_age AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T2.event_id = 15251

Describe the device user gender and age of the event ID of 15251 .

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


Question: List the names of products that are not in any event.

SELECT Product_Name FROM Products WHERE Product_ID NOT IN (SELECT Product_ID FROM Products_in_Events)

List the names of products that are not in any event .


Question: List owner's name of businesses with a 100 score.

SELECT DISTINCT T2.owner_name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = 100

List owner 's name of businesses with a 100 score .

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


Question: Who has the most papers co-authored with Mckeown , Kathleen ?

select t4.name from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id join author as t4 on t2.author_id  =  t4.author_id where t3.name = "mckeown ,  kathleen" group by t2.author_id order by count(*) desc limit 1

Who has the most papers co - authored with Mckeown , Kathleen ?

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


Question: How many of the users hold neutral attitude on "10 Best Foods for You" app and what category is this app?

SELECT COUNT(T2.App), T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '10 Best Foods for You' AND T2.Sentiment = 'Neutral'

How many of the users hold neutral attitude on " 10 Best Foods for You " app and what category is this app ?

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


Question: What are the ids of the faculty members who do not advise any student.

SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student

What are the ids of the faculty members who do not advise any student .

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


Question: What are the ids of all students who have advisor number 1121?

SELECT StuID FROM Student WHERE Advisor  =  1121

What are the ids of all students who have advisor number 1121 ?

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


Question: What is the average number of crews for a movie?

SELECT CAST(SUM(CD) AS REAL) / COUNT(movie_id) FROM ( SELECT movie_id, COUNT(person_id) AS CD FROM movie_crew GROUP BY movie_id )

What is the average number of crews for a movie ?


Question: Find out the platform of the game "Final Fantasy XIII-2".

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

Find out the platform of the game " Final Fantasy XIII-2 " .

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


Question: What is the average number of hosts for parties?

What is the average number of hosts for parties ?

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


Question: How many ingredients must be rationed in the recipe "Raspberry Chiffon Pie"?

SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T2.max_qty = T2.min_qty

How many ingredients must be rationed in the recipe " Raspberry Chiffon Pie " ?

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


Question: Among the trains running west, how many trains have no more than one car with an open roof?

SELECT SUM(CASE WHEN T1.direction = 'west' THEN 1 ELSE 0 END)as count FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) FROM cars WHERE roof = 'none' GROUP BY train_id HAVING COUNT(id) = 1 ) AS T2 ON T1.id = T2.train_id

Among the trains running west , how many trains have no more than one car with an open roof ?

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


Question: What instruments did the musician with the last name "Heilo" play in the song "Le Pop"?

SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId JOIN Instruments AS T4 ON T4.songid  =  T3.songid AND T4.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo" AND T3.title  =  "Le Pop"

What instruments did the musician with the last name " Heilo " play in the song " Le Pop " ?

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


Question: Which year has the least number of movies that was released and what is the title of the movie in that year that has the highest number of rating score of 1?

SELECT DISTINCT T1.movie_release_year, T1.movie_title FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_release_year = ( SELECT movie_release_year FROM movies GROUP BY movie_release_year ORDER BY COUNT(movie_id) DESC LIMIT 1 ) AND T2.rating_score = 1

Which year has the least number of movies that was released and what is the title of the movie in that year that has the highest number of rating score of 1 ?

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


Question: Find the name of instructors who didn't teach any courses?

SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches)

Find the name of instructors who did n't teach any courses ?

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


Question: Return the top 3 greatest support rates.

SELECT support_rate FROM candidate ORDER BY support_rate DESC LIMIT 3

Return the top 3 greatest support rates .


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

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

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

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


Question: List down the names of person born in California, USA.

SELECT name FROM Person WHERE birth_region = 'California' AND birth_country = 'USA';

List down the names of person born in California , USA .

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


Question: Which organisation hired the most number of research staff? List the organisation id, type and detail.

SELECT T1.organisation_id ,  T1.organisation_type ,  T1.organisation_details FROM Organisations AS T1 JOIN Research_Staff AS T2 ON T1.organisation_id  =  T2.employer_organisation_id GROUP BY T1.organisation_id ORDER BY count(*) DESC LIMIT 1

Which organisation hired the most number of research staff ? List the organisation i d , type and detail .

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


Question: From which college was the player who won the most award in 1970.

SELECT college FROM players WHERE playerID = ( SELECT playerID FROM awards_players WHERE year = 1970 GROUP BY playerID ORDER BY COUNT(award) DESC LIMIT 1 )

From which college was the player who won the most award in 1970 .

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


Question: State the full name of state code "GA".

SELECT T FROM ( SELECT IIF(StateCode = 'GA', State, NULL) AS T FROM Regions ) WHERE T IS NOT NULL

State the full name of state code " GA " .

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


Question: How many of the orders are shipped to France?

SELECT COUNT(ShipCountry) FROM Orders WHERE ShipCountry = 'France'

How many of the orders are shipped to France ?


Question: What is the capability on research of the student named Alvera McQuillin?

SELECT T2.capability FROM student AS T1 INNER JOIN RA AS T2 ON T1.student_id = T2.student_id WHERE T1.f_name = 'Alvera' AND T1.l_name = 'McQuillin'

What is the capability on research of the student named Alvera McQuillin ?

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


Question: Among the complaints received in year 2015, what is total number of complaints timely response and closed with an explanation?

SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2015' AND T2.`Timely response?` = 'Yes' AND T2.`Company response to consumer` = 'Closed with explanation'

Among the complaints received in year 2015 , what is total number of complaints timely response and closed with an explanation ?

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


Question: What are the names of all races held between 2009 and 2011?

SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011

What are the names of all races held between 2009 and 2011 ?

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


Question: Compute the average population of a region.

Compute the average population of a region .


Question: Please list the current official YouTube usernames of all the current female legislators.

SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.gender_bio = 'F'

Please list the current official YouTube usernames of all the current female legislators .

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


Question: What is the response received date for the document described as Regular that was granted more than 100 dollars?

SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  'Regular' OR T3.grant_amount  >  100

What is the response received date for the document described as Regular that was granted more than 100 dollars ?

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


Question: What is the most common object class of image ID 56?

SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 56 GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T2.OBJ_CLASS_ID) DESC LIMIT 1

What is the most common object class of image ID 56 ?

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


Question: How many annual indicators use the Sum aggregation method from 2001 to 2003?

SELECT COUNT(DISTINCT T2.SeriesCode)  FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year IN ('YR2001', 'YR2002', 'YR2003') AND T2.Periodicity = 'Annual' AND T2.AggregationMethod = 'Sum'

How many annual indicators use the Sum aggregation method from 2001 to 2003 ?

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


Question: Give the number of territories in the "Northern" region.

SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern'

Give the number of territories in the " Northern " region .

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


Question: Find the number of games taken place in city Atlanta in 2000.

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

Find the number of games taken place in city Atlanta in 2000 .

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


Question: For which question did the user No.2183 gave the answer "Mood Disorder (Depression, Bipolar Disorder, etc)"?

SELECT T1.AnswerText FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 2183 AND T1.AnswerText = 'Mood Disorder (Depression, Bipolar Disorder, etc)'

For which question did the user No.2183 gave the answer " Mood Disorder ( Depression , Bipolar Disorder , etc ) " ?

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


Question: How many salespersons haven't met quota?

SELECT COUNT(BusinessEntityID) FROM SalesPerson WHERE Bonus = 0

How many salespersons have n't met quota ?


Question: What is the size of the photo of product id No.1?

SELECT T1.ThumbNailPhoto FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T2.ProductID = 1

What is the size of the photo of product i d No.1 ?

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


Question: Count the number of staff who did not attend any meeting.

SELECT count(*) FROM Staff WHERE staff_id NOT IN ( SELECT staff_id FROM Staff_in_meetings )

Count the number of staff who did not attend any meeting .

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


Question: List the codes and descriptions for all staff roles.

SELECT staff_role_code ,  staff_role_description FROM Ref_staff_roles

List the codes and descriptions for all staff roles .

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


Question: Among the cars from Asia, list the IDs of cars that were introduced in 1979.

SELECT T1.ID FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'Japan' AND T1.model_year = 1979

Among the cars from Asia , list the IDs of cars that were introduced in 1979 .

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


Question: Find the name of the organization that has published the largest number of papers.

SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1

Find the name of the organization that has published the largest number of papers .

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


Question: How many players are from each country?

SELECT Country_name ,  COUNT(*) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country GROUP BY T1.Country_name

How many players are from each country ?


Question: How many women have apps from the game-Finding fault category installed on their device?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id INNER JOIN app_events_relevant AS T3 ON T2.event_id = T3.event_id WHERE T1.age < 23 AND T1.gender = 'F' AND T3.is_active = 0 AND T3.is_installed = 1

How many women have apps from the game - Finding fault category installed on their device ?

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


Question: How many rooms have a king bed?

SELECT count(*) FROM Rooms WHERE bedType  =  "King";


Question: What are the different statement ids on accounts, and the number of accounts for each?

SELECT STATEMENT_ID ,  count(*) FROM Accounts GROUP BY STATEMENT_ID

What are the different statement ids on accounts , and the number of accounts for each ?

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


Question: How many app users belong to the category of Securities?

SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T2.label_id = T1.label_id WHERE T2.category = 'Securities'

How many app users belong to the category of Securities ?

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


Question: What is the region where the customer who placed the order id 10276 located?

SELECT T1.Region FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.OrderID = 10276

What is the region where the customer who placed the order i d 10276 located ?

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


Question: How many documents were shipped by USPS?

SELECT count(*) FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";

How many documents were shipped by USPS ?


Question: How many customer ids have purchased Hex Nut 9?

SELECT COUNT(T1.CustomerID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Hex Nut 9'

How many customer ids have purchased Hex Nut 9 ?

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


Question: Find the names of all physicians and their primary affiliated departments' names.

SELECT T1.name ,  T3.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T2.PrimaryAffiliation  =  1

Find the names of all physicians and their primary affiliated departments ' names .

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


Question: Which product has the most problems? Give me the number of problems and the product name.

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

Which product has the most problems ? Give me the number of problems and the product name .

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


Question: Return the day Number and stored date for all the documents.

SELECT T2.day_Number ,  T1.Date_Stored FROM All_documents AS T1 JOIN Ref_calendar AS T2 ON T1.date_stored  =  T2.calendar_date

Return the day Number and stored date for all the documents .

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


Question: What are the maximum price and score of wines in each year?

SELECT max(Price) ,  max(Score) ,  YEAR FROM WINE GROUP BY YEAR

What are the maximum price and score of wines in each year ?

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


Question:
What is the difference of the average ball control score between Abdou Diallo and Aaron Appindangoye
?

SELECT CAST(SUM(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Abdou Diallo' THEN t2.id ELSE NULL END) - CAST(SUM(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.ball_control ELSE 0 END) AS REAL) / COUNT(CASE WHEN t1.player_name = 'Aaron Appindangoye' THEN t2.id ELSE NULL END) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id

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


Question: How many companies are there?


Question: What is the proportion of English-speaking citizens in the countries that rely on the United States compared to the total number of citizens in those countries?

SELECT T2.Percentage * T1.Population FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE T3.Dependent = 'USA' AND T2.Name = 'English'

What is the proportion of English - speaking citizens in the countries that rely on the United States compared to the total number of citizens in those countries ?

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


Question: Find the first and last name of artists who have painting but no sculpture work.

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID EXCEPT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID

Find the first and last name of artists who have painting but no sculpture work .

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


Question: Please list the awards the players who died in Arlington have won.

SELECT T2.award FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.deathCity = 'Kemptville'

Please list the awards the players who died in Arlington have won .

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


Question: Provide the genre name of the genre ID 3.

SELECT T.genre_name FROM genre AS T WHERE T.id = 3

Provide the genre name of the genre ID 3 .

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


Question: Which sales team id has the highest number of orders in 2018?

SELECT _SalesTeamID FROM `Sales Orders` WHERE OrderDate LIKE '%/%/18' GROUP BY _SalesTeamID ORDER BY COUNT(_SalesTeamID) DESC LIMIT 1

Which sales team i d has the highest number of orders in 2018 ?

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


Question: How many male patients have elevated total bilirubin count?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`T-BIL` >= 2.0 AND T1.SEX = 'M'

How many male patients have elevated total bilirubin count ?


Question: What percentage of patients born in 'Pembroke MA US' have 'allergy to grass pollen'?

SELECT CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Allergy to grass pollen' THEN 1 ELSE 0 END) AS REL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.birthplace = 'Pembroke MA US'

What percentage of patients born in ' Pembroke MA US ' have ' allergy to grass pollen ' ?

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


Question: Which activity has the most faculty members participating in? Find the activity name.

SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1

Which activity has the most faculty members participating in ? Find the activity name .

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


Question: How many 6-star votes did episode 12 get? Please include the air date and rating.

SELECT T2.air_date, T2.rating FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars = 6 AND T2.episode = 12

How many 6 - star votes did episode 12 get ? Please include the air date and rating .

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


Question: Show the headquarters shared by more than two companies.

SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*)  >  2

Show the headquarters shared by more than two companies .


Question: How many employees whose performance is poor have a salary of over $50,000 per year?

SELECT COUNT(*) FROM employee WHERE performance = 'Poor' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 50000

How many employees whose performance is poor have a salary of over $ 50,000 per year ?

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


Question: What is the name of the institution with no staff in the records?

SELECT institution_name FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM staff)

What is the name of the institution with no staff in the records ?


Question: What is the district address associated with the case JB107731?

SELECT T1.address FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T2.case_number = 'JB107731'

What is the district address associated with the case JB107731 ?

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


Question: List down all paper name that were published in conference "International Conference on Internet Computing".

SELECT T1.Title FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Conference on Internet Computing' AND T1.Title <> ''

List down all paper name that were published in conference " International Conference on Internet Computing " .

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


Question: From all the movies that got more than 13000 popularity number, which one had the least ratings.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_popularity > 13000 ORDER BY T1.rating_score LIMIT 1

From all the movies that got more than 13000 popularity number , which one had the least ratings .

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


Question: Please list any three community areas with a population of more than 50,000.

SELECT community_area_name FROM Community_Area WHERE population > 50000 LIMIT 3

Please list any three community areas with a population of more than 50,000 .

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


Question: What is the number of inhabitants of the place the most customers are from?

SELECT DISTINCT T2.INHABITANTS_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID ORDER BY T2.INHABITANTS_K DESC

What is the number of inhabitants of the place the most customers are from ?

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


Question: Find the brand and name for each camera lens, and sort in descending order of maximum aperture.

SELECT brand ,  name FROM camera_lens ORDER BY max_aperture DESC

Find the brand and name for each camera lens , and sort in descending order of maximum aperture .

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


Question: For each party, find its location and the name of its host. Sort the result in ascending order of the age of the host.

SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age

For each party , find its location and the name of its host . Sort the result in ascending order of the age of the host .

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


Question: Who is the most valuable player in QMJHL league during the 2004-2005 season?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON BETWEEN '2004' AND '2005' AND T1.LEAGUE = 'QMJHL' ORDER BY T1.P DESC LIMIT 1

Who is the most valuable player in QMJHL league during the 2004 - 2005 season ?

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


Question: What is the average fee on a CSU campus in 2005?

SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  2005

What is the average fee on a CSU campus in 2005 ?


Question: How many matches were played in Season 7?

SELECT COUNT(Match_Id) FROM `Match` WHERE Season_Id = 7

How many matches were played in Season 7 ?


Question: Return the average price of products that have each category code.

SELECT avg(product_price) ,  product_category_code FROM products GROUP BY product_category_code

Return the average price of products that have each category code .

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


Question: What is the total amount of money Mary Smith has spent on film rentals?

SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH'

What is the total amount of money Mary Smith has spent on film rentals ?

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


Question: What are the nationalities and ages of journalists?

SELECT Nationality ,  Age FROM journalist

What are the nationalities and ages of journalists ?


Question: What is the name and citation point of the unversities with the top 3 reputation points?

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

What is the name and citation point of the unversities with the top 3 reputation points ?

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


Question: What is the latitude, longitude, and city of the station from which the trip with smallest duration started?

SELECT T1.lat ,  T1.long ,  T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id ORDER BY T2.duration LIMIT 1

What is the latitude , longitude , and city of the station from which the trip with smallest duration started ?

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


Question: What are the cards for set OGW? State the colour for these cards.

SELECT id, colors FROM cards WHERE id IN ( SELECT id FROM set_translations WHERE setCode = 'OGW' )

What are the cards for set OGW ? State the colour for these cards .

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


Question: Lists all types of cards in German.

SELECT T1.subtypes, T1.supertypes FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.subtypes IS NOT NULL AND T1.supertypes IS NOT NULL


Question: What are the descriptions of the short chapters?

SELECT DISTINCT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T1.ParagraphNum < 150

What are the descriptions of the short chapters ?


Question: What are the different grant amounts for documents sent before '1986-08-26 20:49:27' and after the grant ended on '1989-03-16 18:27:16'?

SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id WHERE T2.sent_date  <  '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date  >  '1989-03-16 18:27:16'

What are the different grant amounts for documents sent before ' 1986 - 08 - 26 20:49:27 ' and after the grant ended on ' 1989 - 03 - 16 18:27:16 ' ?

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


Question: Customer No.129301 made an order on 1996/7/27, what was the delivery time for the first part of that order?

SELECT JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_custkey = '129301' AND T1.o_orderdate = '1996-07-27'

Customer No.129301 made an order on 1996/7/27 , what was the delivery time for the first part of that order ?

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


Question: Show all book categories and the number of books in each category.

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

Show all book categories and the number of books in each category .


Question: What is the football player Francois Affolter header's finishing rate on 18/09/2014?

SELECT t2.heading_accuracy FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Francois Affolter' AND SUBSTR(t2.`date`, 1, 10) = '2014-09-18'

What is the football player Francois Affolter header 's finishing rate on 18/09/2014 ?

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


Question: What are the locations that have paintings in the mediums of on panels and on canvas?

SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "panel" INTERSECT SELECT DISTINCT LOCATION FROM paintings WHERE mediumOn  =  "canvas"

What are the locations that have paintings in the mediums of on panels and on canvas ?

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


Question: What position does Amy Wong have?

SELECT POSITION FROM Employee WHERE Name  =  "Amy Wong";


Question: what are the names of people who did not participate in the candidate election.

SELECT name FROM people WHERE people_id NOT IN (SELECT people_id FROM candidate)

what are the names of people who did not participate in the candidate election .

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


Question: What are the  ids of every student who has never attended a course?

SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)

What are the ids of every student who has never attended a course ?

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


Question: What are lines 1 and 2 of the addressed of the customer with the email "vbogisich@example.org"?

SELECT address_line_1 ,  address_line_2 FROM customers WHERE email_address  =  "vbogisich@example.org"

What are lines 1 and 2 of the addressed of the customer with the email " vbogisich@example.org " ?

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


Question: Count the number of countries.

SELECT count(*) FROM county_public_safety


Question: Who is the head of the state where the most crowded city belongs?

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

Who is the head of the state where the most crowded city belongs ?

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


Question: What are the ids of sailors who have not reserved a boat?

SELECT sid FROM Sailors EXCEPT SELECT sid FROM Reserves

What are the ids of sailors who have not reserved a boat ?

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


Question: What is the agency id and details with most number of clients?

SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id GROUP BY T1.agency_id ORDER BY count(*) DESC LIMIT 1

What is the agency i d and details with most number of clients ?

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


Question: Is the donor who donated to school "d4af834b1d3fc8061e1ee1b3f1a77b85" a teacher?

SELECT T2.is_teacher_acct FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = 'd4af834b1d3fc8061e1ee1b3f1a77b85'

Is the donor who donated to school " d4af834b1d3fc8061e1ee1b3f1a77b85 " a teacher ?

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


Question: List the names of members who did not attend any performance.

SELECT Name FROM member WHERE Member_ID NOT IN (SELECT Member_ID FROM member_attendance)

List the names of members who did not attend any performance .

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


Question: List the titles of books in ascending alphabetical order.

SELECT Title FROM book ORDER BY Title ASC

List the titles of books in ascending alphabetical order .


Question: What is the total salary expenses of team Boston Red Stockings in 2010?

SELECT sum(T1.salary) FROM salary AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  = 'Boston Red Stockings' AND T1.year  =  2010

What is the total salary expenses of team Boston Red Stockings in 2010 ?

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


Question: List the names of the production companies that made at least 200 movies.

SELECT T1.company_name FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id GROUP BY T1.company_id HAVING COUNT(T2.movie_id) > 200

List the names of the production companies that made at least 200 movies .

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


Question: List the name of the aircraft that has been named winning aircraft the most number of times.

SELECT T1.Aircraft FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft ORDER BY COUNT(*) DESC LIMIT 1

List the name of the aircraft that has been named winning aircraft the most number of times .

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


Question: In which country does Roberto Almeida?

SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida";


Question: What are the names of artists that have not had any exhibitions?

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

What are the names of artists that have not had any exhibitions ?

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


Question: Among the salable products from the mountain product line, how many of them have the most reviews?

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

Among the salable products from the mountain product line , how many of them have the most reviews ?

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


Question: What are the patient's diagnosis for those who has lower red blood blood cell? State their ID and age.

SELECT DISTINCT T1.Diagnosis, T1.ID , STRFTIME('%Y', CURRENT_TIMESTAMP) -STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RBC < 3.5

What are the patient 's diagnosis for those who has lower red blood blood cell ? State their ID and age .

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


Question: What is the name of the first book written by J.K Rowling?

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

What is the name of the first book written by J.K Rowling ?

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


Question: What percentage of films are made in the US?

SELECT CAST(COUNT(CASE WHEN T3.COUNTry_iso_code = 'US' THEN T1.movie_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id

What percentage of films are made in the US ?


Question: What are the names of the top 3 affiliations that have the most papers in year 2009?

SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T1.year  =  2009 GROUP BY T2.affiliation_id ORDER BY count(*) DESC LIMIT 3

What are the names of the top 3 affiliations that have the most papers in year 2009 ?

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


Question: What is the number of committed crimes in 1995 in the district of the account with the id 532?

SELECT T1.A15 FROM district AS T1 INNER JOIN `account` AS T2 ON T1.district_id = T2.district_id WHERE T2.account_id = 532

What is the number of committed crimes in 1995 in the district of the account with the i d 532 ?

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


Question: How many players with left-hand batting style are from India?

SELECT SUM(CASE WHEN T1.Batting_hand = 'Left-hand bat' THEN 1 ELSE 0 END) AS cnt FROM Batting_Style AS T1 INNER JOIN Player AS T2 ON T1.Batting_Id = T2.Batting_hand INNER JOIN Country AS T3 ON T2.Country_Name = T3.Country_Id WHERE T3.Country_Name = 'India'

How many players with left - hand batting style are from India ?

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


Question: How many drivers use each constructor?

SELECT CONSTRUCTOR ,  COUNT(*) FROM driver GROUP BY CONSTRUCTOR


Question: Which country has the biggest percentage of the albanian ethnic group?

SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Albanian' ORDER BY T2.Percentage DESC LIMIT 1

Which country has the biggest percentage of the albanian ethnic group ?

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


Question: What is the description of the product category with the code 'Spices'?

SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"

What is the description of the product category with the code ' Spices ' ?

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


Question: Find the titles of all movies sorted by their ratings.

SELECT title FROM movies ORDER BY rating

Find the titles of all movies sorted by their ratings .

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


Question: Give the player id of the player who was at the non-striker end for the most number of balls in the match 501219.

SELECT Ball_Id FROM Ball_by_Ball WHERE Non_Striker = Ball_Id ORDER BY Ball_Id DESC LIMIT 1

Give the player i d of the player who was at the non - striker end for the most number of balls in the match 501219 .

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


Question: For each content, what is the total value and number of boxes?

SELECT sum(value) ,  count(*) ,  CONTENTS FROM boxes GROUP BY CONTENTS

For each content , what is the total value and number of boxes ?

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


Question: How many students are affected by cat allergies?

SELECT count(*) FROM Has_allergy WHERE Allergy  =  "Cat"

How many students are affected by cat allergies ?


Question: Identify all restaurants in Contra Costa County by id.

SELECT T1.id_restaurant FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'contra costa county'

Identify all restaurants in Contra Costa County by i d.

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


Question: For each party, return the name of the party and the number of delegates from that party.

SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party

For each party , return the name of the party and the number of delegates from that party .

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


Question: Show all opening years and the number of churches that opened in that year.

SELECT open_date ,  count(*) FROM church GROUP BY open_date

Show all opening years and the number of churches that opened in that year .

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


Question: how many airports are there in each country?

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

how many airports are there in each country ?


Question: How many sports do we have?

SELECT count(DISTINCT sportname) FROM Sportsinfo


Question: Among the customers not subscribed to the mailing list, what percentage has given three or more stars in a review?

SELECT CAST(COUNT(CASE WHEN T2.StarRating > 3 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'FALSE'

Among the customers not subscribed to the mailing list , what percentage has given three or more stars in a review ?

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


Question: What is the average winning rate of the Montreal Canadiens in the Stanley Cup finals?

SELECT SUM(T2.W / T2.G) / SUM(T2.G + T2.W) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'

What is the average winning rate of the Montreal Canadiens in the Stanley Cup finals ?

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


Question: What are the titles of papers published by "Jeremy Gibbons"?

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Jeremy" AND t1.lname  =  "Gibbons"

What are the titles of papers published by " Jeremy Gibbons " ?

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


Question: How many horror movies are there?

SELECT COUNT(T1.movie_id) FROM movie_genres AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.genre_id WHERE T2.genre_name = 'Horror'


Question: How many architects haven't built a mill before year 1850?

SELECT count(*) FROM architect WHERE id NOT IN ( SELECT architect_id FROM mill WHERE built_year  <  1850 );

How many architects have n't built a mill before year 1850 ?

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


Question: List details of all the channel in alphabetical order .

select channel_details from channels order by channel_details


Question: Find the name of the program that is broadcast most frequently.

SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id GROUP BY t2.program_id ORDER BY count(*) DESC LIMIT 1

Find the name of the program that is broadcast most frequently .

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


Question: Among the Yelp_Businesses in Arizona, how many of them do not provide alcohol?

SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name LIKE 'Alcohol' AND T2.attribute_value LIKE 'none' AND T3.state LIKE 'AZ'

Among the Yelp_Businesses in Arizona , how many of them do not provide alcohol ?

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


Question: Which employee has the lowest job level. State the first name, last name and when he /she was hired.

SELECT fname, lname, hire_date FROM employee ORDER BY job_lvl LIMIT 1

Which employee has the lowest job level . State the first name , last name and when he /she was hired .

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


Question: List the names of the disabled students who were absent from school for more than 5 months.

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.month > 5

List the names of the disabled students who were absent from school for more than 5 months .

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


Question: State the number of male students who do not have payment due.

SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN male AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos'

State the number of male students who do not have payment due .

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


Question: How many patients with an Ig G higher than normal?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T2.IGG >= 2000

How many patients with an Ig G higher than normal ?

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


Question: What are the ids of customers who spend more than 5 on average for each good?

SELECT T3.CustomerId 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.CustomerId HAVING avg(T1.price)  >  5

What are the ids of customers who spend more than 5 on average for each good ?

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


Question: Please list the names of the movies that user 94978 scored as 5.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 AND T1.user_id = 94978

Please list the names of the movies that user 94978 scored as 5 .

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


Question: Among the employees in Adventure Works, calculate the percentage of them working as sales representatives.

SELECT CAST(SUM(CASE WHEN JobTitle = 'Sales Representative' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(BusinessEntityID) FROM Employee

Among the employees in Adventure Works , calculate the percentage of them working as sales representatives .

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


Question: How many countries have no GNP?

SELECT COUNT(*) FROM Country WHERE GNP = 0


Question: Tell the number of flights that landed at Lake Charles Regional Airport on 2018/8/15.

SELECT COUNT(T1.Code) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/15' AND T1.Description = 'Lake Charles, LA: Lake Charles Regional'

Tell the number of flights that landed at Lake Charles Regional Airport on 2018/8/15 .

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


Question: Among the countries that officially use the English language, what country has the highest capital?

SELECT T1.Code FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T' ORDER BY T1.Capital DESC LIMIT 1

Among the countries that officially use the English language , what country has the highest capital ?

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


Question: How many ratings of 5 have been given to the podcast "Please Excuse My Dead Aunt Sally"?

SELECT COUNT(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally' AND T2.rating = 5

How many ratings of 5 have been given to the podcast " Please Excuse My Dead Aunt Sally " ?

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


Question: How many American food restaurants are unpopular in Carmel?

SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' AND review = ( SELECT MIN(review) FROM generalinfo WHERE food_type = 'american' AND city = 'carmel' )

How many American food restaurants are unpopular in Carmel ?

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


Question: Which division is Diesel Galloway in?

SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Diesel' AND T1.last = 'Galloway'


Question: How many churches have a wedding in year 2016?

SELECT COUNT (DISTINCT church_id) FROM wedding WHERE YEAR  =  2016

How many churches have a wedding in year 2016 ?

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


Question: What was the release date for the set which card "Evacuation" in it?

SELECT T2.releaseDate FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Evacuation'

What was the release date for the set which card " Evacuation " in it ?

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


Question: What is the name of the actors born in the USA?

SELECT name FROM Person WHERE birth_country = 'USA'

What is the name of the actors born in the USA ?


Question: What is the average fee for a CSU campus in the year of 2005?

SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  2005

What is the average fee for a CSU campus in the year of 2005 ?

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


Question: Identify the number of adult users who have cast over 5000 upvotes.

SELECT COUNT(Id) FROM users WHERE Age BETWEEN 19 AND 65 AND UpVotes > 5000

Identify the number of adult users who have cast over 5000 upvotes .

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


Question: Which school is student829 enrolled in?

SELECT school FROM enrolled WHERE name = 'student829'

Which school is student829 enrolled in ?


Question: Please list the exact dates on which a Formula_1 race took place on the Barcelona-Catalunya circuit.

SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Circuit de Barcelona-Catalunya'

Please list the exact dates on which a Formula_1 race took place on the Barcelona - Catalunya circuit .

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


Question: Find the location of businesses that has business hours from 9 am to 9 pm every Saturday.

SELECT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.closing_time LIKE '9PM' AND T2.opening_time LIKE '9AM' AND T3.day_of_week LIKE 'Saturday' GROUP BY T1.city

Find the location of businesses that has business hours from 9 am to 9 pm every Saturday .

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


Question: In students with a grade of B, how many of them have an intellegence level of 3?

SELECT COUNT(T1.student_id) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.grade = 'B' AND T2.intelligence = 3

In students with a grade of B , how many of them have an intellegence level of 3 ?

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


Question: How many flights depart to Hartsfield-Jackson Atlanta International from Chicago O'Hare International?

SELECT COUNT(FL_DATE) FROM Airlines WHERE ORIGIN = ( SELECT T2.ORIGIN FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T1.Description = 'Chicago, IL: Chicago O''Hare International' ) AND DEST = ( SELECT T4.DEST FROM Airports AS T3 INNER JOIN Airlines AS T4 ON T3.Code = T4.DEST WHERE T3.Description = 'Atlanta, GA: Hartsfield-Jackson Atlanta International' )

How many flights depart to Hartsfield - Jackson Atlanta International from Chicago O'Hare International ?

Chicago, IL: Chicago O'Hare International

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


Question: List the most common type of engine used by drivers.

SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1

List the most common type of engine used by drivers .


Question: What territories is the Inside Sales Coordinator in charge of?

SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Title = 'Inside Sales Coordinator'

What territories is the Inside Sales Coordinator in charge of ?

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


Question: How many players are Indians?

SELECT COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE T2.Country_Name = 'India'


Question: Show the location name and code with the least documents.

SELECT T2.location_name ,  T1.location_code FROM Document_locations AS T1 JOIN Ref_locations AS T2 ON T1.location_code  =  T2.location_code GROUP BY T1.location_code ORDER BY count(*) ASC LIMIT 1

Show the location name and code with the least documents .

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


Question: List at least 10 films that the customers can rent for more than 5 days.

SELECT T.title FROM ( SELECT T1.title, COUNT(T3.customer_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE T1.rental_duration > 5 GROUP BY T1.title ) AS T WHERE T.num > 10

List at least 10 films that the customers can rent for more than 5 days .

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


Question: Among the Most improved Players awarded from 1985-1990, how many player whose country is USA?

SELECT COUNT(DISTINCT T2.playerID) FROM awards_players AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.award = 'Most Improved Player' AND T2.birthCountry = 'USA' AND T1.year BETWEEN 1985 AND 1990

Among the Most improved Players awarded from 1985 - 1990 , how many player whose country is USA ?

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


Question: What is the number of aircraft?


Question: Which courses were taught by a professor who is not a faculty member?

SELECT DISTINCT T2.course_id FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id WHERE T1.professor = 1 AND T1.hasPosition = 0

Which courses were taught by a professor who is not a faculty member ?

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


Question: Which regions have online sales channels that have the most discounts?

SELECT T2.Region FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.`Sales Channel` = 'Online' ORDER BY T1.`Discount Applied` DESC LIMIT 1

Which regions have online sales channels that have the most discounts ?

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


Question: For the document Control Assistant who was born on 1975/12/25, how many private documents did he/she have?

SELECT COUNT(T2.BusinessEntityID) FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Assistant' AND T2.BirthDate = '1975-12-25' AND T1.DocumentSummary IS NULL

For the document Control Assistant who was born on 1975/12/25 , how many private documents did he / she have ?

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


Question: What is the description of the club named "Tennis Club"?

SELECT clubdesc FROM club WHERE clubname  =  "Tennis Club"

What is the description of the club named " Tennis Club " ?

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


Question: What is the total and minimum enrollment of all schools?

SELECT sum(enrollment) ,  min(enrollment) FROM university

What is the total and minimum enrollment of all schools ?


Question: What are the top 5 nations of suppliers with the lowest account balance?

SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_acctbal LIMIT 1

What are the top 5 nations of suppliers with the lowest account balance ?

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


Question: What are the names of teams from universities that have a below average enrollment?

SELECT t2.team_name FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE enrollment  <  (SELECT avg(enrollment) FROM university)

What are the names of teams from universities that have a below average enrollment ?

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


Question: Find the first name and last name for the "CTO" of the club "Hopkins Student Enterprises"?

SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Hopkins Student Enterprises" AND t2.position  =  "CTO"

Find the first name and last name for the " CTO " of the club " Hopkins Student Enterprises " ?

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


Question: List the atom ID of the carcinogenic molecule that contains oxygen?

SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'o' AND T2.label = '+'

List the atom ID of the carcinogenic molecule that contains oxygen ?

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


Question: What is the last name and office of the professor from the history department?

SELECT T1.emp_lname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T2.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History'

What is the last name and office of the professor from the history department ?

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


Question: List down the product name, reviewer name, rating and comments for product under the road line.

SELECT T1.Name, T2.ReviewerName, T2.Rating, T2.Comments FROM Product AS T1 INNER JOIN ProductReview AS T2 USING (productID) WHERE T1.ProductLine = 'R'

List down the product name , reviewer name , rating and comments for product under the road line .

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


Question: Among the patients with a normal blood glucose, how many of them don't have thrombosis?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.GLU < 180 AND T3.Thrombosis = 0

Among the patients with a normal blood glucose , how many of them do n't have thrombosis ?

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


Question: What is the description about the ruling of card "Condemn"?

SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Condemn'

What is the description about the ruling of card " Condemn " ?

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


Question: return the smallest salary for every departments.

SELECT MIN(salary) ,  department_id FROM employees GROUP BY department_id

return the smallest salary for every departments .


Question: Find the first names of faculties of rank Professor in alphabetic order.

SELECT Fname FROM FACULTY WHERE Rank  =  "Professor" ORDER BY Fname

Find the first names of faculties of rank Professor in alphabetic order .

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


Question: When was the employee who handled order id 10281 hired?

SELECT T1.HireDate FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10281

When was the employee who handled order i d 10281 hired ?

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


Question: Who is the patient with a body weight of 61.97 kg?

SELECT T2.first, T2.last FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Body Weight' AND T1.UNITS = 'kg' AND T1.VALUE = 61.97

Who is the patient with a body weight of 61.97 kg ?

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


Question: How many distinct kinds of camera lenses are used to take photos of mountains in the country 'Ethiopia'?

SELECT count(DISTINCT T2.camera_lens_id) FROM mountain AS T1 JOIN photos AS T2 ON T1.id  =  T2.mountain_id WHERE T1.country  =  'Ethiopia'

How many distinct kinds of camera lenses are used to take photos of mountains in the country ' Ethiopia ' ?

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


Question: What percentage of sell orders on 04/04/2020 were for the state of New York?

SELECT CAST(SUM(CASE WHEN T2.State = 'New York' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate = '4/4/20'

What percentage of sell orders on 04/04/2020 were for the state of New York ?

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


Question: How many distinct movies in English stars a male actor who acts the best?

SELECT COUNT(DISTINCT T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T3.isEnglish = 'T' AND T1.a_gender = 'M' AND T1.a_quality = 5

How many distinct movies in English stars a male actor who acts the best ?

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


Question: What is the full name of ABEDA and when was it established?

SELECT Name, Established FROM organization WHERE Abbreviation = 'ABEDA'

What is the full name of ABEDA and when was it established ?

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


Question: List the address in Texas in the ascending order of city id.

SELECT address FROM address WHERE district = 'Texas' AND city_id = ( SELECT MIN(city_id) FROM address WHERE district = 'Texas' )

List the address in Texas in the ascending order of city i d.

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


Question: Show the card type codes and the number of transactions.

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

Show the card type codes and the number of transactions .

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


Question: Who belong to the institution "University of Oxford"? Show the first names and last names.

SELECT DISTINCT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Oxford"

Who belong to the institution " University of Oxford " ? Show the first names and last names .

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


Question: Show the ids of all employees who have authorized destruction.

SELECT DISTINCT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed

Show the ids of all employees who have authorized destruction .


Question: What is the image ID with a predicted class of "parked on"?

SELECT DISTINCT T1.IMG_ID FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.PRED_CLASS = 'parked on'

What is the image ID with a predicted class of " parked on " ?

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


Question: How many ingredients are there in Apricot Yogurt Parfaits?

SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Apricot Yogurt Parfaits'

How many ingredients are there in Apricot Yogurt Parfaits ?


Question: How many different students play games?

SELECT count(DISTINCT StuID) FROM Plays_games

How many different students play games ?


Question: What is the phone number of the customer who has filed the most recent complaint?

SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1

What is the phone number of the customer who has filed the most recent complaint ?

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


Question: List the company names of customers from the city with the most customers.

SELECT CompanyName FROM `Customer and Suppliers by City` WHERE CITY = ( SELECT City FROM `Customer and Suppliers by City` GROUP BY City ORDER BY COUNT(Relationship) DESC LIMIT 1 )

List the company names of customers from the city with the most customers .

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


Question: What are the different software platforms for devices, ordered by frequency descending?

SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC

What are the different software platforms for devices , ordered by frequency descending ?

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


Question: What are the total per assembly quantity for unit measure code EA, IN and OZ respectively? What are the name of these 3 code?

SELECT SUM(T1.PerAssemblyQty), T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.UnitMeasureCode IN ('EA', 'IN', 'OZ') GROUP BY T2.Name

What are the total per assembly quantity for unit measure code EA , IN and OZ respectively ? What are the name of these 3 code ?

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


Question: Sort the customer names in alphabetical order.

SELECT customer_details FROM customers ORDER BY customer_details

Sort the customer names in alphabetical order .


Question: Among the universities in Australia, how many of them have more than 15000 students in 2011?

SELECT COUNT(*) 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 T3.country_name = 'Australia' AND T2.year = 2011 AND T2.num_students > 15000

Among the universities in Australia , how many of them have more than 15000 students in 2011 ?

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


Question: List out all the credit names for episode 9.

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

List out all the credit names for episode 9 .

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


Question: What is the cmi cross reference id that is related to at least one council tax entry? List the cross reference id and source system code.

SELECT T1.cmi_cross_ref_id ,  T1.source_system_code FROM CMI_Cross_References AS T1 JOIN Council_Tax AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T1.cmi_cross_ref_id HAVING count(*)  >=  1

What is the cmi cross reference i d that is related to at least one council tax entry ? List the cross reference i d and source system code .

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


Question: List the most common type of artworks.

SELECT TYPE FROM artwork GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1


Question: Count the number of posts with a tag specified as 'careers'.

SELECT COUNT(Id) FROM tags WHERE TagName = 'careers'

Count the number of posts with a tag specified as ' careers ' .


Question: Show the name of each party and the corresponding number of delegates from that party.

SELECT T2.Party ,  COUNT(*) FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party

Show the name of each party and the corresponding number of delegates from that party .

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


Question: How many matches are there in 2008?

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


Question: Which legislators are woman?

SELECT first_name, last_name FROM historical WHERE gender_bio = 'F'


Question: How many orders purchased by Aaron Bergman have been delivered with the slowest shipping speed?

SELECT COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aaron Bergman' AND T2.`Ship Mode` = 'Standard Class'

How many orders purchased by Aaron Bergman have been delivered with the slowest shipping speed ?

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


Question: Who placed the order with the id 32423?

SELECT T3.client_id FROM `order` AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T4 ON T4.account_id = T2.account_id  INNER JOIN client AS T3 ON T4.client_id = T3.client_id WHERE T1.order_id = 32423

Who placed the order with the i d 32423 ?


Question: In widowed male customers ages from 40 to 60, how many of them has an income ranges from 3000 and above?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.age >= 40 AND T1.age <= 60 AND T1.MARITAL_STATUS = 'Widowed' AND T1.SEX = 'Male' AND T2.INCOME_K >= 2000 AND T2.INCOME_K <= 3000

In widowed male customers ages from 40 to 60 , how many of them has an income ranges from 3000 and above ?

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


Question: Find the names of females who are friends with Zach

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

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


Question: What is the name of the film playing at the most number of theaters?

SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie GROUP BY T1.title ORDER BY count(*) DESC LIMIT 1

What is the name of the film playing at the most number of theaters ?

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


Question: Give the title of the paper which cites most number of papers?

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

Give the title of the paper which cites most number of papers ?


Question: What is the review length of user 60776 to business with business ID 1?

SELECT review_length FROM Reviews WHERE user_id = 60776 AND business_id = 1

What is the review length of user 60776 to business with business ID 1 ?

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


Question: What is the first name of each student enrolled in class ACCT-211?

SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'

What is the first name of each student enrolled in class ACCT-211 ?

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


Question: Is molecule TR151 carcinogenic?

SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR151'


Question: What is the average units sold in millions of the games that are not developed by Nintendo?

SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo'

What is the average units sold in millions of the games that are not developed by Nintendo ?

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


Question: What is the highest grossing movie without a song?

SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T2.movie_title = T1.movie_title WHERE T2.song IS NULL ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1

What is the highest grossing movie without a song ?


Question: What is the full name of the Vice President of Sales. Give me the URL of his/her photo.

SELECT FirstName, LastName FROM Employees WHERE Title = 'Vice President, Sales'

What is the full name of the Vice President of Sales . Give me the URL of his / her photo .

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


Question: What is the description of the film Artist Coldblooded?

SELECT description FROM film WHERE title = 'ARTIST COLDBLOODED'

What is the description of the film Artist Coldblooded ?

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


Question: Which player, born in Winter Haven, played 12 minutes per season during the 1980s in the All-Stars?

SELECT DISTINCT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCity = 'Winter Haven' AND T2.season_id BETWEEN 1980 AND 1989 AND T2.minutes = 12

Which player , born in Winter Haven , played 12 minutes per season during the 1980s in the All - Stars ?

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


Question: Among the coaches who have gotten in the Hall of Fame, how many of them have a weight of over 195?

SELECT COUNT(DISTINCT T1.coachID) FROM Master AS T1 INNER JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.weight > 195

Among the coaches who have gotten in the Hall of Fame , how many of them have a weight of over 195 ?

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


Question: What is the average ratio between female and male actors in a movie?

SELECT CAST(COUNT(CASE WHEN T2.gender = 'Female' THEN T1.person_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Male' THEN T1.person_id ELSE NULL END) FROM movie_cast AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.gender_id

What is the average ratio between female and male actors in a movie ?

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


Question: How many staff live in state Georgia?

SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";


Question: How many businesses in the city of Scottsdale open on Sunday at 12PM?

SELECT COUNT(DISTINCT T2.business_id) FROM Business AS T1 INNER JOIN Business_hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Scottsdale' AND T3.day_of_week = 'Sunday' AND T2.opening_time = '12PM'

How many businesses in the city of Scottsdale open on Sunday at 12PM ?

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


Question: How many grocery stores paid $250 fine upon their inspection?

SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Grocery Store' AND T3.fine = 250

How many grocery stores paid $ 250 fine upon their inspection ?

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


Question: Find the countries in which there are both drivers with make "Dodge" and drivers with make "Chevrolet".

SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Chevrolet"

Find the countries in which there are both drivers with make " Dodge " and drivers with make " Chevrolet " .

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


Question: What are the names of all female candidates in alphabetical order (sex is F)?

SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t1.sex  =  'F' ORDER BY t1.name

What are the names of all female candidates in alphabetical order ( sex is F ) ?

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


Question: Name 10 users with the badge name 'Necromancer.'

SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Necromancer' LIMIT 10

Name 10 users with the badge name ' Necromancer . '

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


Question: Give the number of watchers that the repository of the solution No. 338082 have.

SELECT T1.Watchers FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 338082

Give the number of watchers that the repository of the solution No . 338082 have .

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


Question: What role was Julia Roberts nominated for?

SELECT T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.Result = 'Nominee' AND T1.name = 'Julia Roberts'

What role was Julia Roberts nominated for ?

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


Question: What is the last name of the musician who was in the most songs?

SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1

What is the last name of the musician who was in the most songs ?

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


Question: List the names and decor of rooms that have a king bed. Sort the list by their price.

SELECT roomName ,  decor FROM Rooms WHERE bedtype  =  'King' ORDER BY basePrice;

List the names and decor of rooms that have a king bed . Sort the list by their price .

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


Question: Which school county in the state of New York has a high number of low poverty levels?

SELECT school_county FROM projects WHERE poverty_level = 'low poverty' AND school_state = 'NY' GROUP BY school_state ORDER BY COUNT(poverty_level) DESC LIMIT 1

Which school county in the state of New York has a high number of low poverty levels ?

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


Question: Describe the paper title, published year, conference's short name and included author names in the paper ID of 15.

SELECT DISTINCT T1.Title, T1.Year, T3.ShortName, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T1.Id = 15

Describe the paper title , published year , conference 's short name and included author names in the paper ID of 15 .

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


Question: How many transactions were made at Sac State Union?

SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State Union'

How many transactions were made at Sac State Union ?

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


Question: Find the names of stadiums that the most swimmers have been to.

SELECT t3.name FROM record AS t1 JOIN event AS t2 ON t1.event_id  =  t2.id JOIN stadium AS t3 ON t3.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1

Find the names of stadiums that the most swimmers have been to .

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


Question: List the names of technicians in ascending order of age.

SELECT Name FROM technician ORDER BY Age ASC

List the names of technicians in ascending order of age .

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


Question: What are the last names of faculty in building Barton, sorted by last name?

SELECT Lname FROM FACULTY WHERE Building  =  "Barton" ORDER BY Lname

What are the last names of faculty in building Barton , sorted by last name ?

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


Question: Describe the average income per month and yearly income of the geographic ID in which customer of ID "209556" and "290135".

SELECT T2.INCOME_K, T2.INHABITANTS_K * T2.INCOME_K * 12 FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.ID = 209556 OR T1.ID = 290135

Describe the average income per month and yearly income of the geographic ID in which customer of ID " 209556 " and " 290135 " .

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


Question: What was the expansion type for the set which card "Samite Pilgrim" in it?

SELECT type FROM sets WHERE code IN ( SELECT setCode FROM cards WHERE name = 'Samite Pilgrim' )

What was the expansion type for the set which card " Samite Pilgrim " in it ?

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


Question: How many languages are there in the country where Tocantins district belongs?

SELECT COUNT(DISTINCT T2.Language) FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.District = 'Tocantins'

How many languages are there in the country where Tocantins district belongs ?

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


Question: Which alderman represents the ward with the most number of crimes in January, 2018? Please give his or her full name.

SELECT T1.ward_no, T1.alderman_first_name, T1.alderman_last_name, T1.alderman_name_suffix FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE SUBSTR(T2.date, 1, 1) = '1' AND SUBSTR(T2.date, 5, 4) = '2018' GROUP BY T1.ward_no ORDER BY COUNT(T1.ward_no) DESC LIMIT 1

Which alderman represents the ward with the most number of crimes in January , 2018 ? Please give his or her full name .

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


Question: Among the superheroes with the race of god/eternal, how many of them are male

SELECT COUNT(*) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN gender AS T3 ON T3.id = T1.gender_id WHERE T1.race_id = 21 AND T1.gender_id = 1

Among the superheroes with the race of god / eternal , how many of them are male

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


Question: What is the homepage link for the company that supplies the product "Thringer Rostbratwurst"?

SELECT T2.HomePage FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Thringer Rostbratwurst'

What is the homepage link for the company that supplies the product " Thringer Rostbratwurst " ?

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


Question: Which group does age 24 belong to?

SELECT `group` FROM gender_age WHERE age = '24'


Question: Among the products sold in Maricopa County, which was the least sold?

SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.County = 'Maricopa County' ORDER BY T2.`Order Quantity` ASC LIMIT 1

Among the products sold in Maricopa County , which was the least sold ?

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


Question: What are the genres of games published by the publisher with an ID of 464?

SELECT DISTINCT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id INNER JOIN game_publisher AS T3 ON T1.id = T3.game_id WHERE T3.publisher_id = 464

What are the genres of games published by the publisher with an ID of 464 ?

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


Question: Please list the awards won by coaches who taught the NHL League and have already died.

SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.deathYear IS NOT NULL AND T2.lgID = 'NHL'

Please list the awards won by coaches who taught the NHL League and have already died .

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


Question: What are teh names of the different products, as well as the number of customers who have ordered each product.

SELECT T2.product_name ,  count(*) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id JOIN Orders AS T3 ON T3.order_id  =  T1.order_id GROUP BY T2.product_name

What are teh names of the different products , as well as the number of customers who have ordered each product .

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


Question: What is the author of the submission with the highest score?

SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1

What is the author of the submission with the highest score ?

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


Question: Please give the personal information of the married employee who has the highest pay rate.

SELECT T2.Demographics FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeePayHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.MaritalStatus = 'M' ORDER BY T3.Rate DESC LIMIT 1

Please give the personal information of the married employee who has the highest pay rate .

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


Question: How many patients with severe thrombosis have a normal prothrombin time?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.PT < 14 AND T3.Thrombosis < 3 AND T3.Thrombosis > 0

How many patients with severe thrombosis have a normal prothrombin time ?


Question: What is the staff id of the staff who attended the least meetings but attended some meeting?

SELECT staff_id ,  count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;

What is the staff i d of the staff who attended the least meetings but attended some meeting ?

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


Question: What is the short name and full name of conference uses the homepage "http://www.informatik.uni-trier.de/~ley/db/conf/ices/index.html"?

SELECT ShortName, FullName FROM Conference WHERE HomePage = 'http://www.informatik.uni-trier.de/~ley/db/conf/ices/index.html'

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


Question: What is the id of the order which has the most items?

SELECT T1.order_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id GROUP BY T1.order_id ORDER BY count(*) DESC LIMIT 1

What is the i d of the order which has the most items ?


Question: When did Chennai Super Kings play its first match?

SELECT Match_Date FROM `Match` WHERE team_1 = ( SELECT Team_Id FROM Team WHERE Team_Name = 'Chennai Super Kings' ) OR Team_2 = ( SELECT Team_Id FROM Team WHERE Team_Name = 'Chennai Super Kings' ) ORDER BY Match_Date ASC LIMIT 1

When did Chennai Super Kings play its first match ?

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


Question: Count the number of rooms in Lamberton with capacity lower than 50.

SELECT count(*) FROM classroom WHERE building  =  'Lamberton' AND capacity  <  50

Count the number of rooms in Lamberton with capacity lower than 50 .

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


Question: Show me the number of parks the state of NY has.

SELECT count(*) FROM park WHERE state  =  'NY';

Show me the number of parks the state of NY has .

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


Question: What is the element of toxicology for the atom with the ID of TR000_1?

SELECT T.element FROM atom AS T WHERE T.atom_id = 'TR000_1'

What is the element of toxicology for the atom with the ID of TR000_1 ?

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


Question: How many female users over the age of 50 are there?

SELECT COUNT(gender) FROM gender_age WHERE age > 50 AND gender = 'F'

How many female users over the age of 50 are there ?

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


Question: Which headquarter locations are used by more than 2 companies?

SELECT Headquarters FROM Companies GROUP BY Headquarters HAVING COUNT(*)  >  2

Which headquarter locations are used by more than 2 companies ?

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


Question: Find the most prominent max page size among all the products.

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

Find the most prominent max page size among all the products .

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


Question: Which are the courses with the most number of professors? State the course ID and the level of the course.

SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id GROUP BY T1.course_id, T1.courseLevel ORDER BY COUNT(T1.course_id) DESC LIMIT 1

Which are the courses with the most number of professors ? State the course ID and the level of the course .

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


Question: List all channel names ordered by their rating in percent from big to small.

SELECT name FROM channel ORDER BY rating_in_percent DESC

List all channel names ordered by their rating in percent from big to small .

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


Question: What is the average fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?

SELECT avg(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"

What is the average fastest lap speed in race named ' Monaco Grand Prix ' in 2008 ?

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


Question: List the name of events with less than average parking cost.

SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T2.category = 'Parking' AND T3.cost < (SELECT AVG(cost) FROM expense)

List the name of events with less than average parking cost .

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


Question: For the goalie whose last name is "Young", how many teams did he play in?

SELECT COUNT(DISTINCT T1.tmID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastName = 'Young'

For the goalie whose last name is " Young " , how many teams did he play in ?

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


Question: Which conference has the least number of total enrollment?

SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1

Which conference has the least number of total enrollment ?


Question: Which artists have the most paintings in oil?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3

Which artists have the most paintings in oil ?


Question: What is the oldest age of male clients?

SELECT MAX(age) FROM client WHERE sex = 'Male'

What is the oldest age of male clients ?


Question: Which product received the most complaints from elder clients?

SELECT T2.Product FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age > 65 ORDER BY T1.client_id DESC LIMIT 1

Which product received the most complaints from elder clients ?


Question: List all Planets' names and coordinates in alphabetical order of name.

SELECT Name ,  Coordinates FROM Planet ORDER BY Name

List all Planets ' names and coordinates in alphabetical order of name .

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


Question: List each make with the number of drivers with that make.

SELECT Make ,  COUNT(*) FROM driver GROUP BY Make

List each make with the number of drivers with that make .


Question: What is the reviewer name, film title, movie rating, and rating date  for every movie ordered by reviewer name, movie title, then finally rating?

SELECT T3.name ,  T2.title ,  T1.stars ,  T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID ORDER BY T3.name ,  T2.title ,  T1.stars

What is the reviewer name , film title , movie rating , and rating date for every movie ordered by reviewer name , movie title , then finally rating ?

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


Question: Which students not enrolled in any course? Find their personal names.

SELECT personal_name FROM Students EXCEPT SELECT T1.personal_name FROM Students AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.student_id  =  T2.student_id

Which students not enrolled in any course ? Find their personal names .

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


Question: On image no. 20, identify the attribute ID that is composed of the highest number of objects.

SELECT ATT_CLASS_ID FROM IMG_OBJ_ATT WHERE IMG_ID = 20 GROUP BY ATT_CLASS_ID ORDER BY COUNT(ATT_CLASS_ID) DESC LIMIT 1

On image no . 20 , identify the attribute ID that is composed of the highest number of objects .

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


Question: Show the ids of the investors who have at least two transactions.

SELECT T2.investor_id FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id HAVING COUNT(*)  >=  2

Show the ids of the investors who have at least two transactions .


Question: Among the students that have been absent from school for more than 5 months, how many of them are male?

SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` >= 5

Among the students that have been absent from school for more than 5 months , how many of them are male ?

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


Question: As of the present, what is the full name of the youngest racer? Indicate her nationality and the name of the race to which he/she first joined.

SELECT T1.forename, T1.surname, T1.nationality, T3.name FROM drivers AS T1 INNER JOIN driverStandings AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T2.raceId = T3.raceId ORDER BY JULIANDAY(T1.dob) DESC LIMIT 1

As of the present , what is the full name of the youngest racer ? Indicate her nationality and the name of the race to which he / she first joined .

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


Question: What's the long name of the country that got 3000000 on the indicator Arms exports in 1960?

SELECT T1.LongName FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Arms exports (SIPRI trend indicator values)' AND T2.Year = 1960 AND T2.Value = 3000000

What 's the long name of the country that got 3000000 on the indicator Arms exports in 1960 ?

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


Question: Show the country name and capital of all countries.

SELECT Country_name ,  Capital FROM country

Show the country name and capital of all countries .


Question: Among the employees who handled orders to Brazil, who has the highest salary and calculate the average salary of them.

SELECT T1.FirstName, T1.LastName, AVG(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.ShipCountry = 'Brazil' GROUP BY T1.FirstName, T1.LastName ORDER BY SUM(T1.Salary) DESC LIMIT 1

Among the employees who handled orders to Brazil , who has the highest salary and calculate the average salary of them .

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


Question: Find the number of rooms with more than 50 capacity for each building.

SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building

Find the number of rooms with more than 50 capacity for each building .

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


Question: What are the distinct titles of every painting that has a greater height than some painting on canvas?

SELECT DISTINCT title FROM paintings WHERE height_mm  >  (SELECT min(height_mm) FROM paintings WHERE mediumOn  =  "canvas")

What are the distinct titles of every painting that has a greater height than some painting on canvas ?

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