Question: When was the first movie of the director who directed the highest number of movies released and what is the user id of the user who received the highest number of comments related to the critic made by the user rating the movie?

SELECT MIN(movie_release_year) FROM movies WHERE director_name = ( SELECT T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1960 AND 1985 GROUP BY T2.director_name ORDER BY COUNT(T2.director_name) DESC LIMIT 1 )

When was the first movie of the director who directed the highest number of movies released and what is the user i d of the user who received the highest number of comments related to the critic made by the user rating the movie ?

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


Question: How many businesses are opened for 24 hours?

SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'TRUE' AND T1.attribute_name LIKE 'Open 24 Hours'

How many businesses are opened for 24 hours ?

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


Question: Which problems are reported by the staff with last name "Bosco"? Show the ids of the problems.

SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_last_name = "Bosco"

Which problems are reported by the staff with last name " Bosco " ? Show the ids of the problems .

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


Question: How many vendors only consented to move on with the 500 to 15000 piece order in terms of quality?

SELECT COUNT(*) FROM ProductVendor WHERE MinOrderQty > 500 AND MaxOrderQty < 15000

How many vendors only consented to move on with the 500 to 15000 piece order in terms of quality ?

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


Question: Find the name of the ships that have more than one captain.

SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id GROUP BY t2.ship_id HAVING count(*)  >  1

Find the name of the ships that have more than one captain .

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


Question: List down the keyword and crew member's name for episode id S20-E1.

SELECT T1.keyword, T2.person FROM Keyword AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode_id = 'S20-E1';

List down the keyword and crew member 's name for episode i d S20 - E1 .

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


Question: Please give the title of the work of Shakespeare that has the most characters.

SELECT T.Title FROM ( SELECT T1.Title, COUNT(T3.character_id) AS num FROM works T1 INNER JOIN chapters T2 ON T1.id = T2.work_id INNER JOIN paragraphs T3 ON T2.id = T3.chapter_id INNER JOIN characters T4 ON T3.character_id = T4.id GROUP BY T3.character_id, T1.Title ) T ORDER BY T.num DESC LIMIT 1

Please give the title of the work of Shakespeare that has the most characters .

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


Question: Write down the ID, active status and city of the business which are in CA state.

SELECT business_id, active, city FROM Business WHERE state = 'CA' AND active = 'true'

Write down the ID , active status and city of the business which are in CA state .

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


Question: What is the average replacement cost for the movies with a rental rate of 4.99?

SELECT AVG(replacement_cost) FROM film WHERE rental_rate = 4.99

What is the average replacement cost for the movies with a rental rate of 4.99 ?

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


Question: Among the competitors of the 1994 Winter Olympic Game, what is the percentage of those from Finland?

SELECT CAST(COUNT(CASE WHEN T5.region_name = 'Finland' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T3.id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id INNER JOIN person_region AS T4 ON T3.id = T4.person_id INNER JOIN noc_region AS T5 ON T4.region_id = T5.id WHERE T1.games_name = '1994 Winter'

Among the competitors of the 1994 Winter Olympic Game , what is the percentage of those from Finland ?

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


Question: What are the cities that do not have any branches with more than 100 members?

SELECT city FROM branch EXCEPT SELECT city FROM branch WHERE membership_amount  >  100

What are the cities that do not have any branches with more than 100 members ?

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


Question: When did the first staff for the projects started working?

SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1

When did the first staff for the projects started working ?


Question: What is the capital of Australia? Is the capital a headquarter to any organization? Name the organization(s).

SELECT T2.Capital, T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.City = T2.Capital WHERE T2.Name = 'Australia'

What is the capital of Australia ? Is the capital a headquarter to any organization ? Name the organization(s ) .

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


Question: What is the bounding box of the object sample in image no.5 that has a self-relation?

SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.IMG_ID = 5 AND T1.OBJ1_SAMPLE_ID = T1.OBJ2_SAMPLE_ID

What is the bounding box of the object sample in image no.5 that has a self - relation ?

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


Question: Provide the full name of the superhero named Alien.

SELECT full_name FROM superhero WHERE superhero_name = 'Alien'

Provide the full name of the superhero named Alien .

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


Question: Please list the territories whose sales are taken in charge by the employees who report to Andrew Fuller.

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.ReportsTo = ( SELECT EmployeeID FROM Employees WHERE FirstName = 'Andrew' AND LastName = 'Fuller' )

Please list the territories whose sales are taken in charge by the employees who report to Andrew Fuller .

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


Question: How many cars were released in the USA in 1981?

SELECT COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T2.country = 'USA' AND T1.model_year = 1981

How many cars were released in the USA in 1981 ?


Question: What is the total number of routes for each country and airline in that country?

SELECT T1.country ,  T1.name ,  count(*) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid GROUP BY T1.country ,  T1.name

What is the total number of routes for each country and airline in that country ?

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


Question: Find the name and id of accounts whose checking balance is below the maximum checking balance.

SELECT T1.custid ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT max(balance) FROM checking)

Find the name and i d of accounts whose checking balance is below the maximum checking balance .

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


Question: What dates were the Don't Lie To Your Life Coach podcast reviews created?

SELECT created_at FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'Don''t Lie To Your Life Coach' )

What dates were the Do n't Lie To Your Life Coach podcast reviews created ?

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


Question: What are the names of the dishes in the menu sponsored by The Society of Cumberland that was created for the 19th reunion at Grand Pacific Hotel in Chicago, Illinois?

SELECT T4.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id INNER JOIN Dish AS T4 ON T3.dish_id = T4.id WHERE T1.sponsor = 'THE SOCIETY OF THE CUMBERLAND' AND T1.event = '19NTH REUNION' AND T1.place = 'GRAND PACIFIC HOTEL,CHICAGO,ILL'

What are the names of the dishes in the menu sponsored by The Society of Cumberland that was created for the 19th reunion at Grand Pacific Hotel in Chicago , Illinois ?

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


Question: Which club has the most female students as their members? Give me the name of the club.

SELECT t1.clubname 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 t3.sex  =  "F" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Which club has the most female students as their members ? Give me the name of the club .

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


Question: Show the id, the account name, and other account details for all accounts by the customer with first name 'Meaghan'.

SELECT T1.account_id ,  T1.date_account_opened ,  T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  'Meaghan'

Show the i d , the account name , and other account details for all accounts by the customer with first name ' Meaghan ' .

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


Question: Describe category name which had above 10% in comparing with all business and categories.

SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id GROUP BY T2.category_id HAVING COUNT(T2.business_id) > ( SELECT COUNT(T3.business_id) FROM Business_Categories AS T3 ) * 0.1

Describe category name which had above 10 % in comparing with all business and categories .

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


Question: Which character did the "Outstanding Voice-Over Performance" winner voice?

SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award = 'Outstanding Voice-Over Performance' AND T1.result = 'Winner';

Which character did the " Outstanding Voice - Over Performance " winner voice ?

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


Question: What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998-1999 season?

SELECT T3.Rs_G - T4.Pf_G AS diff FROM ( SELECT T2.PlayerName, T1.G AS Rs_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Regular Season' ) AS T3 INNER JOIN ( SELECT T2.PlayerName, T1.G AS Pf_G FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Pavel Brendl' AND T1.SEASON = '1998-1999' AND T1.GAMETYPE = 'Playoffs' ) AS T4 ON T3.PlayerName = T4.PlayerName

What is the difference in the number of goals scored by Pavel Brendl during the regular season versus the playoffs in the 1998 - 1999 season ?

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


Question: Among the patients with prediabetes, how many are female?

SELECT COUNT(DISTINCT T2.patient) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.gender = 'F' AND T1.DESCRIPTION = 'Prediabetes'

Among the patients with prediabetes , how many are female ?


Question: Among the projects created by a teacher from New York, how many of them have a donor from the same city?

SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.teacher_ny_teaching_fellow = 't' AND T2.donor_city = 'New York'

Among the projects created by a teacher from New York , how many of them have a donor from the same city ?

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


Question: Find the first names and last names of male (sex is M) faculties who live in building NEB.

SELECT Fname ,  Lname FROM FACULTY WHERE sex  =  "M" AND Building  =  "NEB"

Find the first names and last names of male ( sex is M ) faculties who live in building NEB .

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


Question: What is the point level of "Refrigeration and metal stem thermometers provided and conspicuous"?

SELECT point_level FROM inspection_point WHERE Description = 'Refrigeration and metal stem thermometers provided and conspicuous '

What is the point level of " Refrigeration and metal stem thermometers provided and conspicuous " ?

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


Question: For each city, how many branches opened before 2010?

SELECT city ,  count(*) FROM branch WHERE open_year  <  2010 GROUP BY city

For each city , how many branches opened before 2010 ?

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


Question: List all the course IDs for professional or master/graduate courses.

SELECT course_id FROM course WHERE courseLevel = 'Level_500'

List all the course IDs for professional or master / graduate courses .


Question: What are the names and dates of the exams with subject code that is not "Database"?

SELECT Exam_Date ,  Exam_Name FROM Exams WHERE Subject_Code != 'Database'

What are the names and dates of the exams with subject code that is not " Database " ?

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


Question: List all the customer company names and cities located in Canada.

SELECT CompanyName, City FROM Customers WHERE Country = 'Canada'

List all the customer company names and cities located in Canada .

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


Question: What are the ids and trade names of the medicine that can interact with at least 3 enzymes?

SELECT T1.id ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING COUNT(*)  >=  3

What are the ids and trade names of the medicine that can interact with at least 3 enzymes ?

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


Question: Please list the titles of all the films starring the actor PENELOPE GUINESS.

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

Please list the titles of all the films starring the actor PENELOPE GUINESS .

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


Question: What is the lowest salary in departments with average salary greater than the overall average.

SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)

What is the lowest salary in departments with average salary greater than the overall average .

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


Question: Provide the users' display names and available website URLs of the post with favorite count of more than 150.

SELECT T1.DisplayName, T1.WebsiteUrl FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.FavoriteCount > 150

Provide the users ' display names and available website URLs of the post with favorite count of more than 150 .

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


Question: Show director with the largest number of show times in total.

SELECT T2.directed_by FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T2.directed_by ORDER BY sum(T1.show_times_per_day) DESC LIMIT 1

Show director with the largest number of show times in total .

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


Question: Please list the team names which have at least 3 all-star players.

SELECT T1.tmID FROM players_teams AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID GROUP BY T1.tmID HAVING COUNT(DISTINCT T1.playerID) >= 3

Please list the team names which have at least 3 all - star players .

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


Question: Calculate the percentage of legislators who are Senator and were born in 1964.

SELECT CAST(SUM(CASE WHEN T2.class IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio LIKE '%1964%'

Calculate the percentage of legislators who are Senator and were born in 1964 .


Question: Which customers do not have any order? Give me the customer names.

SELECT name FROM customer WHERE Customer_ID NOT IN (SELECT Customer_ID FROM customer_order)

Which customers do not have any order ? Give me the customer names .

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


Question: How many books by William Shakespeare were published by Penguin Classics?

SELECT COUNT(*) 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 INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'William Shakespeare' AND T4.publisher_name = 'Penguin Classics'

How many books by William Shakespeare were published by Penguin Classics ?

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


Question: Show all sport name and the number of students.

SELECT sportname ,  count(*) FROM Sportsinfo GROUP BY sportname

Show all sport name and the number of students .


Question: Show names of musicals which have at least three actors.

SELECT T2.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID  =  T2.Musical_ID GROUP BY T1.Musical_ID HAVING COUNT(*)  >=  3

Show names of musicals which have at least three actors .

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


Question: What is the name of the player with the highest number of outstanding player awards in a particular match?

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match GROUP BY T2.Man_of_the_Match ORDER BY COUNT(T2.Man_of_the_Match) DESC LIMIT 1

What is the name of the player with the highest number of outstanding player awards in a particular match ?

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


Question: List at least 10 students who have no payment due and are enlisted in Fire Department organization.

SELECT T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T2.name = T1.name WHERE T1.bool = 'neg' AND T2.organ = 'fire_department' LIMIT 10

List at least 10 students who have no payment due and are enlisted in Fire Department organization .

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


Question: Count the number of female Professors we have.

SELECT count(*) FROM Faculty WHERE Sex  =  'F' AND Rank  =  "Professor"

Count the number of female Professors we have .


Question: Count the number of transactions.

SELECT count(*) FROM Financial_transactions


Question: Find the average and minimum weight for each gender.

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

Find the average and minimum weight for each gender .


Question: Find the name of the theater that is playing the most number of movies.

SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1

Find the name of the theater that is playing the most number of movies .

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


Question: What are the invoice dates for customers with the first name Astrid and the last name Gruber?

SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"

What are the invoice dates for customers with the first name Astrid and the last name Gruber ?

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


Question: For how many times has player no.41 won the "man of the match" award?

SELECT COUNT(Match_Id) FROM `Match` WHERE Man_of_the_Match = 41

For how many times has player no.41 won the " man of the match " award ?

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


Question: What is the percentage of list created by user who was a subscriber when he created the list?

SELECT CAST(SUM(CASE WHEN user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(list_id) FROM lists_users

What is the percentage of list created by user who was a subscriber when he created the list ?

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


Question: Among the releases with the tag "1980s", which one of them is the most downloaded? Please give its title.

SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s' ORDER BY T1.totalSnatched DESC LIMIT 1

Among the releases with the tag " 1980s " , which one of them is the most downloaded ? Please give its title .

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


Question: What is the location id for Debur and Polish?

SELECT LocationID FROM Location WHERE Name = 'Debur and Polish'

What is the location i d for Debur and Polish ?

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


Question: What document types do have more than 10000 total access number.

SELECT document_type_code FROM documents GROUP BY document_type_code HAVING sum(access_count)  >  10000

What document types do have more than 10000 total access number .

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


Question: How many rooms in total are there in the apartments in the building with short name "Columbus Square"?

SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "Columbus Square"

How many rooms in total are there in the apartments in the building with short name " Columbus Square " ?

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


Question: What is the number of different class sections offered in the course ACCT-211?

SELECT count(DISTINCT class_section) FROM CLASS WHERE crs_code  =  'ACCT-211'

What is the number of different class sections offered in the course ACCT-211 ?

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


Question: In how many venues did team 2 win the toss and lose the match?

SELECT SUM(CASE WHEN T1.Team_2 = T1.Match_Winner THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE T1.Team_1 = T1.Toss_Winner

In how many venues did team 2 win the toss and lose the match ?

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


Question: Which cities served as a host city after 2010?

SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id = T2.host_city WHERE T2.year  >  2010

Which cities served as a host city after 2010 ?


Question: display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50.

SELECT email FROM employees WHERE commission_pct  =  "null" AND salary BETWEEN 7000 AND 12000 AND department_id = 50

display the emails of the employees who have no commission percentage and salary within the range 7000 to 12000 and works in that department which number is 50 .

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


Question: List the movie titles and associated songs directed by Ron Clements.

SELECT T1.movie_title, T1.song FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Ron Clements'

List the movie titles and associated songs directed by Ron Clements .

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


Question: Show different builders of railways, along with the corresponding number of railways using each builder.

SELECT Builder ,  COUNT(*) FROM railway GROUP BY Builder

Show different builders of railways , along with the corresponding number of railways using each builder .

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


Question: Show the id of University of Orléans.

SELECT id FROM university WHERE university_name = 'University of Orléans'

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


Question: Please list the names of the Olympic games that were held in London.

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

Please list the names of the Olympic games that were held in London .


Question: How many suppliers from Egypt have a debit balance?

SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 AND T2.n_name = 'EGYPT'

How many suppliers from Egypt have a debit balance ?


Question: How many flights from Dallas to Santa Ana departed on time?

SELECT COUNT(*) FROM Airlines WHERE DEST = 'SNA' AND ORIGIN = 'DFW' AND DEP_DELAY = 0

How many flights from Dallas to Santa Ana departed on time ?


Question: Find the total revenue for each manufacturer.

SELECT sum(revenue) ,  name FROM manufacturers GROUP BY name

Find the total revenue for each manufacturer .


Question: From Year 1995 to 2000, who are the accounts holders from 'east Bohemia'. State the account ID the frequency of statement issuance.

SELECT T1.account_id, T1.frequency FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A3 = 'east Bohemia' AND STRFTIME('%Y', T1.date) BETWEEN '1995' AND '2000'

From Year 1995 to 2000 , who are the accounts holders from ' east Bohemia ' . State the account ID the frequency of statement issuance .

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


Question: How many users have rated the most popular movie?

SELECT COUNT(rating_id) FROM ratings WHERE movie_id = ( SELECT movie_id FROM movies ORDER BY movie_popularity DESC LIMIT 1 )

How many users have rated the most popular movie ?


Question: Please list the names of all the products ordered in order CA-2011-112326 in superstores in the center.

SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'CA-2011-112326'

Please list the names of all the products ordered in order CA-2011 - 112326 in superstores in the center .

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


Question: How many orders were shipped by "Speedy Express"?

SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express'

How many orders were shipped by " Speedy Express " ?

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


Question: Which nation has the smallest population, and where is its capital located?

SELECT Name, Capital FROM country ORDER BY Population ASC LIMIT 1

Which nation has the smallest population , and where is its capital located ?

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


Question: What is the name of the community with the highest population?

SELECT community_area_name FROM Community_Area ORDER BY population DESC LIMIT 1

What is the name of the community with the highest population ?


Question: How many users participated in the mental health survey for 2014?

SELECT COUNT(DISTINCT T1.UserID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2014'

How many users participated in the mental health survey for 2014 ?

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


Question: How many faculty do we have?


Question: Return the weight of the shortest person.

SELECT Weight FROM people ORDER BY Height ASC LIMIT 1

Return the weight of the shortest person .


Question: What are the first name, last name and id of the player with the most all star game experiences? Also list the count.

SELECT T1.name_first , T1.name_last ,  T1.player_id ,   count(*) FROM player AS T1 JOIN all_star AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 1;

What are the first name , last name and i d of the player with the most all star game experiences ? Also list the count .

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


Question: What is the name of the university that has most number of majors with rank 1?

SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1

What is the name of the university that has most number of majors with rank 1 ?

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


Question: For each position, what is the maximum number of  hours for students who spent more than 1000 hours training?

SELECT max(T1.HS) ,  pPos FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T1.HS  >  1000 GROUP BY T2.pPos

For each position , what is the maximum number of hours for students who spent more than 1000 hours training ?

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


Question: How many female students live in Smith Hall?

SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.dorm_name  =  'Smith Hall' AND T1.sex  =  'F'

How many female students live in Smith Hall ?

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


Question: List the professor ID who taught the course ID from 121 to 130 of basic undergraduate courses.

SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300' AND T1.course_id > 121 AND T1.course_id < 130

List the professor ID who taught the course ID from 121 to 130 of basic undergraduate courses .

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


Question: Find the name of accounts whose checking balance is below the average checking balance.

SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T2.balance  <  (SELECT avg(balance) FROM checking)

Find the name of accounts whose checking balance is below the average checking balance .

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


Question: Of all the classic cars, with a product scale of 1:18, which product is the most ordered product by customers?

SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productScale = '1:18' AND T1.productLine = 'Classic Cars' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1

Of all the classic cars , with a product scale of 1:18 , which product is the most ordered product by customers ?

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


Question: What is the scheduled local departure time and the actual departure time of the flight from Philadelphia to Harrisburg with the plane's tail number N627AE on the 13th of August 2018?

SELECT CRS_DEP_TIME, DEP_TIME FROM Airlines WHERE ORIGIN = 'PHL' AND DEST = 'MDT' AND TAIL_NUM = 'N627AE' AND FL_DATE = '2018/8/13'

What is the scheduled local departure time and the actual departure time of the flight from Philadelphia to Harrisburg with the plane 's tail number N627AE on the 13th of August 2018 ?

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


Question: What is the geographic location of Aarhus city? Please provide the answer with the coordinates of the location.

SELECT Longitude, Latitude FROM city WHERE Name = 'Aarhus'

What is the geographic location of Aarhus city ? Please provide the answer with the coordinates of the location .

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


Question: Mention the employee's full name and performance status who got the lowest in salary per year.

SELECT firstname, lastname, performance FROM employee ORDER BY salary ASC LIMIT 1

Mention the employee 's full name and performance status who got the lowest in salary per year .

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


Question: What is the name and age of the customer with the most membership credit?

SELECT name ,  age FROM customers ORDER BY membership_credit DESC LIMIT 1

What is the name and age of the customer with the most membership credit ?

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


Question: Find the name and partition id for users who tweeted less than twice.

SELECT T1.name ,  T1.partitionid FROM user_profiles AS T1 JOIN tweets AS T2 ON T1.uid  =  T2.uid GROUP BY T2.uid HAVING count(*)  <  2

Find the name and partition i d for users who tweeted less than twice .

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


Question: What is the job title of employee who did inspection ID 52269?

SELECT T1.title FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 52269

What is the job title of employee who did inspection ID 52269 ?

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


Question: Return the first names and last names of employees who earn more than 30000 in salary.

SELECT fname ,  lname FROM employee WHERE salary  >  30000

Return the first names and last names of employees who earn more than 30000 in salary .

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


Question: Give the first name and job id for all employees in the Finance department.

SELECT T1.first_name ,  T1.job_id FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T2.department_name  =  'Finance'

Give the first name and job i d for all employees in the Finance department .

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


Question: What are the employee ids of the employees whose role name is "Human Resource" or "Manager"?

SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Human Resource" OR T2.role_name  =  "Manager"

What are the employee ids of the employees whose role name is " Human Resource " or " Manager " ?

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


Question: Indicate the courtesy title of the 3 employees who have the lowest salary.

SELECT TitleOfCourtesy FROM Employees ORDER BY Salary LIMIT 3

Indicate the courtesy title of the 3 employees who have the lowest salary .

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


Question: What is the total pages of Wikipedia in Catalan language?

SELECT pages FROM langs WHERE lang = 'ca'

What is the total pages of Wikipedia in Catalan language ?


Question: Where was the high school of the player who had the most rebounds in the NBA allstar history?

SELECT T2.highSchool FROM player_allstar AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID ORDER BY T1.rebounds DESC LIMIT 1

Where was the high school of the player who had the most rebounds in the NBA allstar history ?

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


Question: What are the names of documents that contain the substring "CV"?

SELECT document_name FROM documents WHERE document_name LIKE "%CV%"

What are the names of documents that contain the substring " CV " ?

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


Question: Give the number of "drive-thru" businesses in "Scottsdale" with business ID number less than "1000".

SELECT 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 T3.business_id < 1000 AND T3.city LIKE 'Scottsdale' AND T1.attribute_name LIKE 'Drive-Thru' AND T2.attribute_value LIKE 'TRUE'

Give the number of " drive - thru " businesses in " Scottsdale " with business ID number less than " 1000 " .

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


Question: What are the claim dates and settlement dates of all the settlements?

SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Settlements

What are the claim dates and settlement dates of all the settlements ?

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


Question: How many colors are there?


Question: What are the full names of the sales person whose bonuses are less than 1,000?

SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM SalesPerson AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Bonus < 1000

What are the full names of the sales person whose bonuses are less than 1,000 ?

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


Question: How many French customers does Gerard Hernandez take care of?

SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.country = 'France' AND t2.firstName = 'Gerard' AND t2.lastName = 'Hernandez'

How many French customers does Gerard Hernandez take care of ?

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


Question: Which institution does "Katsuhiro Ueno" belong to?

SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Katsuhiro" AND t1.lname  =  "Ueno"

Which institution does " Katsuhiro Ueno " belong to ?

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


Question: How many shipments were ordered by S K L Enterprises Inc in 2017?

SELECT COUNT(T2.ship_id) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'S K L Enterprises Inc' AND STRFTIME('%Y', T2.ship_date) = '2017'

How many shipments were ordered by S K L Enterprises Inc in 2017 ?

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


Question: What's the location coordinates of Silverstone Circuit?

SELECT lat, lng FROM circuits WHERE name = 'Silverstone Circuit'

What 's the location coordinates of Silverstone Circuit ?


Question: User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12, was that post well-finished?

SELECT IIF(T2.ClosedDate IS NULL, 'NOT well-finished', 'well-finished') AS resylt FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 23853 AND T1.CreationDate = '2013-07-12 09:08:18.0'

User No.23853 gave a comment to a post at 9:08:18 on 2013/7/12 , was that post well - finished ?

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


Question: What are the districts that belong to the country with the lowest surface area?

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

What are the districts that belong to the country with the lowest surface area ?

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


Question: What's Bruno Senna's Q1 result in the qualifying race No. 354?

SELECT T1.q1 FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 354 AND T2.forename = 'Bruno' AND T2.surname = 'Senna'

What 's Bruno Senna 's Q1 result in the qualifying race No . 354 ?

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


Question: Select the name of each manufacturer along with the name and price of its most expensive product.

SELECT T1.Name ,  max(T1.Price) ,  T2.name FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code GROUP BY T2.name

Select the name of each manufacturer along with the name and price of its most expensive product .

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


Question: List account ID and account opening date for accounts from 'Prachatice'.

SELECT T1.account_id, T1.date FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.A2 = 'Prachatice'

List account ID and account opening date for accounts from ' Prachatice ' .

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


Question: How many male users are active in the events held on 5/1/2016?

SELECT COUNT(T3.gender) FROM app_events AS T1 INNER JOIN events_relevant AS T2 ON T2.event_id = T1.event_id INNER JOIN gender_age AS T3 ON T3.device_id = T2.device_id WHERE T1.is_active = 1 AND T3.gender = 'M' AND T2.timestamp LIKE '2016-05-01%'

How many male users are active in the events held on 5/1/2016 ?

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


Question: Please list the superhero names of all the superheroes that have blue eyes and blond hair.

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Blond'

Please list the superhero names of all the superheroes that have blue eyes and blond hair .

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


Question: How many orders of more than 10 items have been returned?

SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 10 AND l_returnflag = 'R'

How many orders of more than 10 items have been returned ?

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


Question: Find the titles of items whose rating is higher than the average review rating of all items.

SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id WHERE T2.rating  >  (SELECT avg(rating) FROM review)

Find the titles of items whose rating is higher than the average review rating of all items .

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


Question: Show the names of artworks in ascending order of the year they are nominated in.

SELECT T2.Name FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID ORDER BY T3.Year

Show the names of artworks in ascending order of the year they are nominated in .

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


Question: What are the themes of parties ordered by the number of hosts in ascending manner?

SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC

What are the themes of parties ordered by the number of hosts in ascending manner ?

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


Question: Show the details of the top 3 most expensive hotels.

SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3

Show the details of the top 3 most expensive hotels .

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


Question: What is the unique description of every parent document?

SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID

What is the unique description of every parent document ?


Question: How many different roles does the staff with id 3 have?

SELECT count(DISTINCT staff_role_code) FROM Staff_in_processes WHERE staff_id  =  3

How many different roles does the staff with i d 3 have ?


Question: What is the code of the category that the product with the name 'flax' belongs to?

SELECT product_category_code FROM products WHERE product_name  =  "flax"

What is the code of the category that the product with the name ' flax ' belongs to ?

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


Question: How many kinds of products did order No. 10252 contain?

SELECT COUNT(t.productCode) FROM orderdetails t WHERE t.orderNumber = '10252'

How many kinds of products did order No . 10252 contain ?

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


Question: Which country produced the most fuel-efficient car?

SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.mpg DESC LIMIT 1

Which country produced the most fuel - efficient car ?


Question: What are the last names for all scholarship students?

SELECT T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.onscholarship  =  'Y'

What are the last names for all scholarship students ?

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


Question: Calculate the percentage of ordered office supplies products in the central and the south superstore.

SELECT CAST(SUM(CASE  WHEN T3.Category = 'Office Supplies' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Category) 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`

Calculate the percentage of ordered office supplies products in the central and the south superstore .

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


Question: Find the details of the shops that can be reached by walk.

SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk"

Find the details of the shops that can be reached by walk .

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


Question: How many players played as a captain in season year 2008?

SELECT COUNT(T1.Player_Id) FROM Player_Match AS T1 INNER JOIN Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' AND T2.Match_Date LIKE '2008%'

How many players played as a captain in season year 2008 ?

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


Question: Which chapter has the most paragraphs? Give the description of the chapter.

SELECT T1.Description FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id ORDER BY T2.ParagraphNum DESC LIMIT 1

Which chapter has the most paragraphs ? Give the description of the chapter .

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


Question: Count the number of players who were born in USA and have bats information 'R'.

SELECT count(*) FROM player WHERE birth_country = 'USA' AND bats  =  'R';

Count the number of players who were born in USA and have bats information ' R ' .

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


Question: What is the name of the department with an instructure who has a name like 'Soisalon'?

SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'

What is the name of the department with an instructure who has a name like ' Soisalon ' ?

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


Question: Find the city and name of bank branches that provide business loans.

SELECT T1.bname ,  T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.loan_type  =  'Business'

Find the city and name of bank branches that provide business loans .

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


Question: What are the first and last names of people who payed more than the rooms' base prices?

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

What are the first and last names of people who payed more than the rooms ' base prices ?

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


Question: How many percent of points were scored by NBA players who belonged to 'LAL' team and had performed steals movement.

SELECT CAST(SUM(IIF(T2.steals IS NOT NULL AND T1.tmID = 'LAL', 1, 0)) AS REAL) * 100 / COUNT(T1.tmID) FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year

How many percent of points were scored by NBA players who belonged to ' LAL ' team and had performed steals movement .

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


Question: What are the biographical data and student id of the students who either took two or more classes and or have less than two detentions?

SELECT T1.bio_data ,  T1.student_id FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  >=  2 UNION SELECT T1.bio_data ,  T1.student_id FROM Students AS T1 JOIN Detention AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  <  2

What are the biographical data and student i d of the students who either took two or more classes and or have less than two detentions ?

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


Question: What is the short description for the title Future Einsteins Of America?

SELECT short_description FROM essays WHERE title = 'Future Einsteins Of America'

What is the short description for the title Future Einsteins Of America ?

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


Question: For the user who post the list that contained the most number of the movies, is he/she a paying subscriber when creating that list?

SELECT T1.user_has_payment_method FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number = ( SELECT MAX(list_movie_number) FROM lists )

For the user who post the list that contained the most number of the movies , is he / she a paying subscriber when creating that list ?

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


Question: How many regions do we have?


Question: Which country does Ranchi city belong to?

SELECT T2.Country_Name FROM City AS T1 INNER JOIN Country AS T2 ON T1.Country_Id = T2.Country_Id WHERE T1.City_Name = 'Ranchi'

Which country does Ranchi city belong to ?


Question: What is the count of cities with more than 3 airports?

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

What is the count of cities with more than 3 airports ?

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


Question: What is the duration, file size, and song format for every pop song, ordered by title alphabetically?

SELECT T1.duration ,  T1.file_size ,  T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T2.genre_is  =  "pop" ORDER BY T2.song_name

What is the duration , file size , and song format for every pop song , ordered by title alphabetically ?

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


Question: What are the employee ids for those who had two or more jobs.

SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*)  >= 2

What are the employee ids for those who had two or more jobs .

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


Question: Who is the author of the paper titled "Binders Unbound"? Give me the last name.

SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Binders Unbound"

Who is the author of the paper titled " Binders Unbound " ? Give me the last name .

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


Question: Tell me about the information of the French publisher.

SELECT T1.pr_info FROM pub_info AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.country = 'France'

Tell me about the information of the French publisher .


Question: How many albums does Billy Cobham has?

SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "Billy Cobham";


Question: Tell the Id number of the business with the most number of violations.

SELECT business_id FROM violations GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1

Tell the I d number of the business with the most number of violations .

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


Question: List the sources for the Net Migration in South American countries in 2002.

SELECT T2.Source FROM CountryNotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode INNER JOIN Country AS T3 ON T1.Countrycode = T3.CountryCode INNER JOIN SeriesNotes AS T4 ON T2.SeriesCode = T4.Seriescode WHERE T4.Year LIKE '%2002%' AND T2.IndicatorName = 'Net migration'

List the sources for the Net Migration in South American countries in 2002 .

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


Question: Which customer shopped most often? How many times?

SELECT CustomerId ,  count(*) FROM receipts GROUP BY CustomerId ORDER BY count(*) DESC LIMIT 1

Which customer shopped most often ? How many times ?


Question: Show all the distinct districts for elections.

Show all the distinct districts for elections .


Question: What are the names and opening hours of the tourist attractions that can be accessed by bus or walk?

SELECT Name ,  Opening_Hours FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus" OR How_to_Get_There  =  "walk"

What are the names and opening hours of the tourist attractions that can be accessed by bus or walk ?

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


Question: How many patents outcomes were listed for all the projects?

SELECT count(*) FROM Project_outcomes WHERE outcome_code  =  'Patent'

How many patents outcomes were listed for all the projects ?


Question: When did the staff member with first name as Janessa and last name as Sawayn leave the company?

SELECT date_left_staff FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

When did the staff member with first name as Janessa and last name as Sawayn leave the company ?

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


Question: Provide the ID of professors who are teaching high-level or harder undergraduate course.

SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_400'

Provide the ID of professors who are teaching high - level or harder undergraduate course .

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


Question: Which position has the highest amount of poor performing employees?

SELECT T2.positiontitle FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.performance = 'Poor' GROUP BY T2.positiontitle ORDER BY COUNT(T2.positiontitle) DESC LIMIT 1

Which position has the highest amount of poor performing employees ?

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


Question: Which team(s) had 90% games won. List the coach ID for the team and year played.

SELECT DISTINCT T2.name, T1.year, T1.coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE CAST(T2.won AS REAL) * 100 / T2.games > 90

Which team(s ) had 90 % games won . List the coach ID for the team and year played .

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


Question: What South Asian nations have low incomes? Please include the entire names of the nations in your answer.

SELECT LongName FROM Country WHERE IncomeGroup = 'Low income' AND Region = 'South Asia'

What South Asian nations have low incomes ? Please include the entire names of the nations in your answer .

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


Question: Which user has done the most review on a business attributed to delivery?

SELECT T3.user_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Reviews AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name = 'Delivery' GROUP BY T3.user_id ORDER BY COUNT(T2.business_id) DESC LIMIT 1

Which user has done the most review on a business attributed to delivery ?

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


Question: Calculate the average age of people who have apps installed but are not active on their devices.

SELECT AVG(T1.age) 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 T3.is_installed = 1 AND T3.is_active = 0

Calculate the average age of people who have apps installed but are not active on their devices .

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


Question: In the Stanley Cup finals history, how many games did player id "broadpu01" play in 1922?

SELECT GP FROM ScoringSC WHERE playerID = 'broadpu01' AND YEAR = 1922

In the Stanley Cup finals history , how many games did player i d " broadpu01 " play in 1922 ?

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


Question: What is Nancy Edwards's address?

SELECT address FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";


Question: List first name and last name of customers lived in city Lockmanfurt.

SELECT T1.first_name ,  T1.last_name FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T2.city = "Lockmanfurt";

List first name and last name of customers lived in city Lockmanfurt .

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


Question: What is the direction of the train with a diamond-shaped load in its 2nd car?

SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 2 AND T1.shape = 'diamond'

What is the direction of the train with a diamond - shaped load in its 2nd car ?

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


Question: What are the names of the pilots that have not won any matches in Australia?

SELECT name FROM pilot WHERE pilot_id NOT IN (SELECT Winning_Pilot  FROM MATCH WHERE country  =  'Australia')

What are the names of the pilots that have not won any matches in Australia ?

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


Question: How many times is the number of Indian cities than Italian cities?

SELECT CAST(SUM(IIF(T1.country = 'India', 1, 0)) AS REAL) / SUM(IIF(T1.country = 'Italy', 1, 0)) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id

How many times is the number of Indian cities than Italian cities ?

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


Question: Give the gender of the user who made the highest klout tweet on Wednesdays.

SELECT T2.Gender FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Weekday = 'Wednesday' ORDER BY T1.Klout DESC LIMIT 1

Give the gender of the user who made the highest klout tweet on Wednesdays .

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


Question: Show the name of the leader of the club named "Houston".

SELECT T3.Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID WHERE T2.Club_Name  =  "Houston"

Show the name of the leader of the club named " Houston " .

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


Question: List the year in which the most buildings are completed.

SELECT Completed_Year FROM building GROUP BY Completed_Year ORDER BY COUNT(*) DESC LIMIT 1

List the year in which the most buildings are completed .


Question: List the names of all scientists sorted in alphabetical order.

SELECT name FROM scientists ORDER BY name

List the names of all scientists sorted in alphabetical order .


Question: Which order's shipment tracking number is "3452"? Give me the id of the order.

SELECT order_id FROM shipments WHERE shipment_tracking_number = "3452"

Which order 's shipment tracking number is " 3452 " ? Give me the i d of the order .

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


Question: Show the average amount of transactions for different lots, ordered by average amount of transactions.

SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id ORDER BY avg(amount_of_transaction)

Show the average amount of transactions for different lots , ordered by average amount of transactions .

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


Question: How many distinct governors are there?

SELECT count(DISTINCT Governor) FROM party


Question: Provide the Instagram username of the legislator named Benjamin Hawkins.

SELECT T1.instagram FROM `social-media` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Benjamin' AND T2.last_name = 'Hawkins'

Provide the Instagram username of the legislator named Benjamin Hawkins .

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


Question: Give the name of the 4-year public school in "ID" with the lowest graduation 100 value.

SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'ID' AND T1.level = '4-year' AND T1.control = 'Public' GROUP BY T1.chronname ORDER BY SUM(T1.grad_100_value) ASC LIMIT 1

Give the name of the 4 - year public school in " ID " with the lowest graduation 100 value .

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


Question: What is the average amount of donations by people who donated in the project "Recording Rockin' Readers"

SELECT AVG(T3.donation_to_project) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Recording Rockin'' Readers'

What is the average amount of donations by people who donated in the project " Recording Rockin ' Readers "

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


Question: What are the unique names of all race held between 2014 and 2017?

SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017

What are the unique names of all race held between 2014 and 2017 ?

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


Question: How many distinct hometowns did these people have?

SELECT count(DISTINCT Hometown) FROM people

How many distinct hometowns did these people have ?


Question: Which city is the business that got a "medium" length tip with "3" likes located in?

SELECT T1.city FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T2.tip_length = 'Medium' AND T2.likes = 3

Which city is the business that got a " medium " length tip with " 3 " likes located in ?

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


Question: What is the capital of the country where the driver with the most points is from?

SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country ORDER BY T2.Points DESC LIMIT 1

What is the capital of the country where the driver with the most points is from ?

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


Question: List the order numbers and product names which were ordered on 6th June, 2018.

SELECT DISTINCT OrderNumber, `Product Name` FROM ( SELECT IIF(T2.OrderDate = '6/6/18', T2.OrderNumber, NULL) AS "OrderNumber" , IIF(T2.OrderDate = '6/6/18', T1.`Product Name`, NULL) AS "Product Name" FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID ) WHERE OrderNumber IS NOT NULL AND `Product Name` IS NOT NULL

List the order numbers and product names which were ordered on 6th June , 2018 .

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


Question: What are the maximum and minimum number of transit passengers of all aiports.

SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport

What are the maximum and minimum number of transit passengers of all aiports .

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


Question: What is the average amount of money spent by a customer in Italy on a single film rental?

SELECT AVG(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy'

What is the average amount of money spent by a customer in Italy on a single film rental ?

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


Question: Among all the active customers, how many of them live in Arlington?

SELECT COUNT(T2.customer_id) FROM address AS T1 INNER JOIN customer AS T2 ON T1.address_id = T2.address_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.active = 1 AND T3.city = 'Arlington'

Among all the active customers , how many of them live in Arlington ?

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


Question: What is the restaurant's name and ID located at Ocean Avenue, San Francisco?

SELECT T2.label, T1.id_restaurant FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T1.street_name = 'ocean avenue'

What is the restaurant 's name and ID located at Ocean Avenue , San Francisco ?

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


Question: Calculate the average number of disabled female students enrolled in UCI.

SELECT CAST(SUM(IIF(T1.school = 'uci' AND T4.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM enrolled AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name INNER JOIN person AS T3 ON T1.name = T3.name LEFT JOIN male AS T4 ON T3.name = T4.name

Calculate the average number of disabled female students enrolled in UCI .

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


Question: How many stars does the repository of the solution No. 45997 have?

SELECT T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 45997

How many stars does the repository of the solution No . 45997 have ?

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


Question: What are the phones of departments in Room 268?

SELECT DPhone FROM DEPARTMENT WHERE Room  =  268

What are the phones of departments in Room 268 ?

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


Question: How many customers do we have?


Question: Show all transaction ids with transaction code 'PUR'.

SELECT transaction_id FROM TRANSACTIONS WHERE transaction_type_code  =  'PUR'

Show all transaction ids with transaction code ' PUR ' .

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


Question: In the schools donated by the project of the resources provided by ABC School Supply, how many schools are public magnet schools?

SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_magnet = 't' AND T1.vendor_name = 'ABC School Supply'

In the schools donated by the project of the resources provided by ABC School Supply , how many schools are public magnet schools ?

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


Question: How many times did the word number 8 appear?

SELECT occurrences FROM words WHERE wid = 8

How many times did the word number 8 appear ?


Question: What is the newest established organization where Singapore is a member of?

SELECT T3.Name FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country WHERE T1.Name = 'Singapore' ORDER BY T3.Established DESC LIMIT 1

What is the newest established organization where Singapore is a member of ?

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


Question: How many releases are tagged "1980s"?

SELECT COUNT(id) FROM tags WHERE tag LIKE '1980s'

How many releases are tagged " 1980s " ?


Question: What are all the different zip codes that have a maximum dew point that was always below 70?

SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f  >=  70

What are all the different zip codes that have a maximum dew point that was always below 70 ?

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


Question: How many donations from teachers were done in the state of Colorado?

SELECT COUNT(donationid) FROM donations WHERE is_teacher_acct = 't' AND donor_state = 'CO'

How many donations from teachers were done in the state of Colorado ?

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


Question: What is the average price of cars with 8 cylinders?

SELECT AVG(T2.price) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8

What is the average price of cars with 8 cylinders ?

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


Question: List the order key of the orders with a total price between 200000 and 300000.

SELECT o_orderkey FROM orders WHERE o_totalprice BETWEEN 200000 AND 300000

List the order key of the orders with a total price between 200000 and 300000 .

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


Question: What is the rating for "Garden Coloring Book"? List all of its reviews.

SELECT T1.Rating, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Garden Coloring Book'

What is the rating for " Garden Coloring Book " ? List all of its reviews .

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


Question: How many motorcycles have been ordered in 2004?

SELECT SUM(t2.quantityOrdered) FROM orders AS t1 INNER JOIN orderdetails AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN products AS t3 ON t2.productCode = t3.productCode WHERE t3.productLine = 'motorcycles' AND STRFTIME('%Y', t1.orderDate) = '2004'

How many motorcycles have been ordered in 2004 ?

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


Question: List the name of languages in ascending alphabetical order.

SELECT name FROM languages ORDER BY name ASC

List the name of languages in ascending alphabetical order .


Question: Please list the IDs of the universities with a student staff ratio of over 15 in 2011.

SELECT university_id FROM university_year WHERE year = 2011 AND student_staff_ratio > 15

Please list the IDs of the universities with a student staff ratio of over 15 in 2011 .

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


Question: What are names of drivers who did not take part in a race?

SELECT Driver_Name FROM driver WHERE Driver_ID NOT IN (SELECT Driver_ID FROM race)

What are names of drivers who did not take part in a race ?


Question: List down the titles and descriptions of the crimes cases against persons.

SELECT title, description FROM FBI_Code WHERE crime_against = 'Persons'

List down the titles and descriptions of the crimes cases against persons .

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


Question: What is the quantity of Ikura ordered in order no. 10273?

SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'

What is the quantity of Ikura ordered in order no . 10273 ?

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


Question: Count the image numbers that contain the "paint" object.

SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'paint'

Count the image numbers that contain the " paint " object .


Question: How many recipients of the Primetime Emmy Award category that were born in the USA? Find the percentage of Americans in the total number of the country.

SELECT SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS num , CAST(SUM(CASE WHEN T1.birth_country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award_category = 'Primetime Emmy' AND T2.person = 'Dan Castellaneta';

How many recipients of the Primetime Emmy Award category that were born in the USA ? Find the percentage of Americans in the total number of the country .

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


Question: Give the state that the student with first name Linda lives in.

SELECT state FROM Student AS T1 JOIN City AS T2 ON T1.city_code  =  T2.city_code WHERE T1.Fname  =  "Linda"

Give the state that the student with first name Linda lives in .

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


Question: How many orders shipped via ship have a medium priority?

SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'SHIP' AND T1.o_orderpriority = '3-MEDIUM'

How many orders shipped via ship have a medium priority ?

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


Question: Give the name of the movie with a revenue of 559852396.

SELECT title FROM movie WHERE revenue = 559852396

Give the name of the movie with a revenue of 559852396 .

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


Question: How many acting statuses are there?

SELECT count(DISTINCT temporary_acting) FROM management


Question: What brands of beers are manufactured at coordinates 38,566,129, -121,426,432?

SELECT DISTINCT T2.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T3.Latitude = '38.566129' AND T3.Longitude = '-121.426432'

What brands of beers are manufactured at coordinates 38,566,129 , -121,426,432 ?

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


Question: Count the total number of students.


Question: Among the owners from Cameron Park, what is the business name of the business with a score of 100?

SELECT DISTINCT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_city = 'Cameron Park' AND T1.score = 100

Among the owners from Cameron Park , what is the business name of the business with a score of 100 ?

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


Question: Which team does not have drivers?

SELECT Team FROM team WHERE Team_ID NOT IN (SELECT Team_ID FROM team_driver)


Question: What is the average number of bonds the atoms with the element iodine have?

SELECT CAST(COUNT(T2.bond_id) AS REAL) / COUNT(T1.atom_id) FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 'i'

What is the average number of bonds the atoms with the element iodine have ?

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


Question: Please list the last names and first names of all-star players who are higher than 75 inch.

SELECT DISTINCT T1.lastName, T1.firstName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.height > 75

Please list the last names and first names of all - star players who are higher than 75 inch .

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


Question: Which businesses with the category name Accessories have opening hours before 7AM?

SELECT T1.business_id FROM Business_Hours AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Accessories' AND SUBSTR(T1.opening_time, -4, 2) * 1 < 7 AND T1.opening_time LIKE '%AM'

Which businesses with the category name Accessories have opening hours before 7AM ?

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


Question: Which neighborhood does not have any headphone in stock?

SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id

Which neighborhood does not have any headphone in stock ?


Question: What are the different names of the genres?

What are the different names of the genres ?


Question: How many root beers of the Bulldog were purchased in August, 2014?

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

How many root beers of the Bulldog were purchased in August , 2014 ?

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


Question: What is the ratio of professors and students?

SELECT CAST(SUM(CASE  WHEN professor = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE  WHEN student = 1 THEN 1 ELSE 0 END) AS per FROM person

What is the ratio of professors and students ?


Question: Among the episode that get more than 950 votes, how many of the episodes were nominated for the 'Outstanding Voice-Over Performance Award in 2009'? Find the percentage of the episodes.

SELECT CAST(SUM(CASE WHEN T1.award = 'Outstanding Voice-Over Performance' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.episode_id) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 950 AND T1.year = 2009;

Among the episode that get more than 950 votes , how many of the episodes were nominated for the ' Outstanding Voice - Over Performance Award in 2009 ' ? Find the percentage of the episodes .

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


Question: Among the customers in South superstore, which customers ordered more than 3 times in 2015? State the name of the customers.

SELECT DISTINCT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE STRFTIME('%Y', T1.`Order Date`) = '2015' GROUP BY T2.`Customer Name` HAVING COUNT(T2.`Customer Name`) > 3

Among the customers in South superstore , which customers ordered more than 3 times in 2015 ? State the name of the customers .

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


Question: Find the number of routes with destination airports in Italy.

SELECT count(*) FROM routes AS T1 JOIN airports AS T2 ON T1.dst_apid  =  T2.apid WHERE T2.country  =  'Italy'

Find the number of routes with destination airports in Italy .


Question: Identify by publication year in the paper database all journals that don't have short name.

SELECT DISTINCT T2.Year, FullName FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = ''

Identify by publication year in the paper database all journals that do n't have short name .

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


Question: Calculate the percentage of customers' accounts in debt.

SELECT CAST(SUM(IIF(c_acctbal < 0, 1, 0)) AS REAL) * 100 / COUNT(c_custkey) FROM customer

Calculate the percentage of customers ' accounts in debt .


Question: How many reviews made by user whose ID is 3 are long?

SELECT COUNT(review_length) FROM Reviews WHERE user_id = 3 AND review_length LIKE 'Long'

How many reviews made by user whose ID is 3 are long ?

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


Question: What is the salary range of the student with an email of grosellg@hku.hk?

SELECT T1.salary FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.email = 'grosellg@hku.hk'

What is the salary range of the student with an email of grosellg@hku.hk ?

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


Question: Find the name and training hours of players whose hours are below 1500.

SELECT pName ,  HS FROM Player WHERE HS  <  1500

Find the name and training hours of players whose hours are below 1500 .

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


Question: What is the number of states that has some college whose enrollment is larger than the average enrollment?

SELECT count(DISTINCT state) FROM college WHERE enr  >  (SELECT avg(enr) FROM college)

What is the number of states that has some college whose enrollment is larger than the average enrollment ?

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


Question: List out top 3 German drivers who were born from 1980-1990 and have the earliest lap time.

SELECT T2.driverId FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId WHERE T2.nationality = 'German' AND STRFTIME('%Y', T2.dob) BETWEEN '1980' AND '1990' ORDER BY T1.time LIMIT 3

List out top 3 German drivers who were born from 1980 - 1990 and have the earliest lap time .

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


Question: Show the names of people aged either 35 or 36.

SELECT Name FROM  people WHERE Age  =  35 OR Age  =  36

Show the names of people aged either 35 or 36 .

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


Question: How many Yelp_Business falls under the category of "Shopping"?

SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Shopping'

How many Yelp_Business falls under the category of " Shopping " ?


Question: What are the names of students who have taken Statistics courses?

SELECT T3.name FROM course AS T1 JOIN takes AS T2 ON T1.course_id  =  T2.course_id JOIN student AS T3 ON T2.id  =  T3.id WHERE T1.dept_name  =  'Statistics'

What are the names of students who have taken Statistics courses ?

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


Question: What is the percentage of the USA actors that showed up in the credit list of movie "Mrs. Doubtfire"?

SELECT CAST(SUM(CASE WHEN T3.`Birth Country` = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.`Birth Country`) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Mrs. Doubtfire'

What is the percentage of the USA actors that showed up in the credit list of movie " Mrs. Doubtfire " ?

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


Question: Show names of pilots that have more than one record.

SELECT T2.Pilot_name ,  COUNT(*) FROM pilot_record AS T1 JOIN pilot AS T2 ON T1.pilot_ID  =  T2.pilot_ID GROUP BY T2.Pilot_name HAVING COUNT(*)  >  1

Show names of pilots that have more than one record .


Question: Which students never had a detention or student loan ? Find their biographical data .

select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id  =  t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id  =  t2.student_id)

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


Question: At what latitude is the Thomas Kemper brand beer consumed the most?

SELECT T3.Latitude FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN geolocation AS T3 ON T1.LocationID = T3.LocationID WHERE T2.BrandName = 'Thomas Kemper' GROUP BY T3.Latitude ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

At what latitude is the Thomas Kemper brand beer consumed the most ?

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


Question: For different directors who direct well, how many of them have directed an action film?

SELECT COUNT(DISTINCT T2.directorid) FROM movies2directors AS T2 INNER JOIN directors AS T3 ON T2.directorid = T3.directorid WHERE T2.genre = 'Action' AND T3.d_quality = 4

For different directors who direct well , how many of them have directed an action film ?

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


Question: List all the author names.


Question: How many members are there?


Question: What are the name and population of each county?

SELECT County_name ,  Population FROM county

What are the name and population of each county ?


Question: Find the first names and offices of all professors sorted by alphabetical order of their first name.

SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num ORDER BY T2.emp_fname

Find the first names and offices of all professors sorted by alphabetical order of their first name .

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


Question: What is the total number of legislators with "John" as their first name?

SELECT COUNT(*) FROM current WHERE first_name = 'John'

What is the total number of legislators with " John " as their first name ?

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


Question: Find the first names of the faculty members who participate in Canoeing and Kayaking.

SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' INTERSECT SELECT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Kayaking'

Find the first names of the faculty members who participate in Canoeing and Kayaking .

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


Question: What's the percentage of people in Cayman Islands speak English?

SELECT T1.Percentage FROM language AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Cayman Islands' AND T1.Name = 'English'

What 's the percentage of people in Cayman Islands speak English ?

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


Question: What is the gender of the user whose tweet got 535 retweets?

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

What is the gender of the user whose tweet got 535 retweets ?

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


Question: What is the ratio of having the best to worse elite user in 2013?

SELECT CAST(SUM(CASE WHEN T1.user_average_stars = 1 THEN 1 ELSE 0 END) AS REAL) / COUNT(T2.user_id) , SUM(CASE WHEN T1.user_average_stars = 5 THEN 1 ELSE 0 END) * 1.0 / COUNT(T2.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T2.year_id = 2013

What is the ratio of having the best to worse elite user in 2013 ?

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


Question: List the names of clubs that do not have any players.

SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)

List the names of clubs that do not have any players .

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


Question: What are the first and last names of the performer who was in the back stage position for the song "Badlands"?

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

What are the first and last names of the performer who was in the back stage position for the song " Badlands " ?

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


Question: What is the checking balance of the account whose owner’s name contains the substring ‘ee’?

SELECT T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid WHERE T1.name LIKE '%ee%'

What is the checking balance of the account whose owner ’s name contains the substring ‘ ee ’ ?

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


Question: List the name and calculate its profit for product with the highest rating in review.

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

List the name and calculate its profit for product with the highest rating in review .

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


Question: Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth.

SELECT DISTINCT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GPT > 60 ORDER BY T1.Birthday ASC

Please provide the diagnosis of patients with ALT glutamic pylvic transaminase beyond the normal range by ascending order of their date of birth .

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


Question: What is the language for film titled "CHILL LUCK"?

SELECT T2.`name` FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T1.title = 'CHILL LUCK'

What is the language for film titled " CHILL LUCK " ?

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


Question: What are the name, role code, and date of birth of the employee named 'Armani'?

SELECT employee_name ,  role_code ,  date_of_birth FROM Employees WHERE employee_Name  =  'Armani'

What are the name , role code , and date of birth of the employee named ' Armani ' ?

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


Question: Sort the gender codes in descending order of their corresponding number of guests. Return both the gender codes and counts.

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

Sort the gender codes in descending order of their corresponding number of guests . Return both the gender codes and counts .

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


Question: How many distinct allergies are there?

SELECT count(DISTINCT allergytype) FROM Allergy_type


Question: List all product only MOQ of 1,000 and with standard cost more than 17.

SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T1.MaxOrderQty = 1000 AND T2.StandardCost > 17

List all product only MOQ of 1,000 and with standard cost more than 17 .

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


Question: List all address ids and address details.

SELECT address_id ,  address_details FROM Addresses

List all address ids and address details .

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


Question: Provide the shipping dates and products of the orders by Gene Hale.

SELECT DISTINCT T2.`Ship Date`, T3.`Product Name` 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` = 'Gene Hale'

Provide the shipping dates and products of the orders by Gene Hale .

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


Question: What is the code of the area with the largest Asian population?

SELECT T1.zip_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T2.asian_population ORDER BY T2.asian_population DESC LIMIT 1

What is the code of the area with the largest Asian population ?

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


Question: Calculate the percentage of the app user IDs under Industry tag category.

SELECT SUM(IIF(T1.category = 'Industry tag', 1, 0)) * 100 / COUNT(T2.app_id) AS per FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T2.label_id = T1.label_id

Calculate the percentage of the app user IDs under Industry tag category .

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


Question: list all the names of programs, ordering by launch time.

SELECT name FROM program ORDER BY launch

list all the names of programs , ordering by launch time .

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


Question: Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct?

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul OR T2.Mar  >  T2.Oct

Give me a list of cities whose temperature in March is lower than that in July or higher than that in Oct ?

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


Question: Find the names of all instructors in the Art department who have taught some course and the course_id.

SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'

Find the names of all instructors in the Art department who have taught some course and the course_id .

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


Question: Which products are being supplied by "G'day, Mate"? List all of their names.

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName LIKE 'G%day, Mate'

Which products are being supplied by " G'day , Mate " ? List all of their names .

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


Question: Find the death year of all artists who have at most 3 paintings?

SELECT T1.deathYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  <=  3

Find the death year of all artists who have at most 3 paintings ?

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


Question: How many movies have a rating that is not null?

SELECT count(*) ,  rating FROM movies WHERE rating != 'null' GROUP BY rating

How many movies have a rating that is not null ?

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


Question: Where can I find the information about the races held on Sepang International Circuit?

SELECT DISTINCT T1.url FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Sepang International Circuit'

Where can I find the information about the races held on Sepang International Circuit ?

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


Question: Return the average age across all gymnasts.

SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID

Return the average age across all gymnasts .


Question: What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's'?

SELECT staff_id ,  staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*)  >=  1

What are the ids and details of the staff who have attended at least 1 meetings and have the detail with letter 's ' ?

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


Question: Which university had the most students in 2011? Show its name.

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

Which university had the most students in 2011 ? Show its name .

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


Question: What's the Italian name of the set of cards with "Ancestor's Chosen" is in?

SELECT translation FROM set_translations WHERE setCode IN ( SELECT setCode FROM cards WHERE name = 'Ancestor''s Chosen' ) AND language = 'Italian'

What 's the Italian name of the set of cards with " Ancestor 's Chosen " is in ?

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


Question: Which product did Cruz & Sons Co. ask for the biggest amount in a single order?

SELECT t4.productName FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode WHERE t3.customerName = 'Cruz & Sons Co.' ORDER BY t1.priceEach * t1.quantityOrdered DESC LIMIT 1

Which product did Cruz & Sons Co. ask for the biggest amount in a single order ?

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


Question: For each student, find the student id and the total amount of loan he or she has.

SELECT student_id ,  sum(amount_of_loan) FROM Student_Loans GROUP BY student_id

For each student , find the student i d and the total amount of loan he or she has .

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


Question: How many posts have a score less than 20?

SELECT COUNT(id) FROM posts WHERE Score < 20

How many posts have a score less than 20 ?


Question: Among the 'Handgun' weapon used by subject, how many percent were 'Shoot and Miss'?

SELECT CAST(SUM(subject_statuses = 'Shoot and Miss') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE subject_weapon = 'Handgun'

Among the ' Handgun ' weapon used by subject , how many percent were ' Shoot and Miss ' ?

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


Question: How many samples of "wall" are there in image no.2353079?

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

How many samples of " wall " are there in image no.2353079 ?


Question: List all outpatient within normal range of creatinine phosphokinase. Give me the distinct ids.

SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CPK < 250 AND T1.Admission = '-'

List all outpatient within normal range of creatinine phosphokinase . Give me the distinct ids .

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


Question: List down all the person IDs who taught course ID of 18.

SELECT p_id FROM taughtBy WHERE course_id = 18

List down all the person IDs who taught course ID of 18 .

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


Question: How many markets have number of cities smaller than 300?

SELECT count(*) FROM market WHERE Number_cities  <  300

How many markets have number of cities smaller than 300 ?

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


Question: Please list the awards the coaches who are born in Canada have won.

SELECT DISTINCT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthCountry = 'Canada'

Please list the awards the coaches who are born in Canada have won .

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


Question: What is the id of the oldest painting?

SELECT paintingID FROM paintings ORDER BY YEAR LIMIT 1

What is the i d of the oldest painting ?


Question: Which cities have lower temperature in March than in July and have been once host cities?

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Which cities have lower temperature in March than in July and have been once host cities ?

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