Question: Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500.

SELECT T1.ProductID, T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity BETWEEN 400 AND 500 ORDER BY T1.Price DESC LIMIT 1

Give the product ID and name of the product with the highest prices among the quantity ranges from 400 to 500 .

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


Question: Find the titles of items that received any rating below 5.

SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id WHERE T2.rating  <  5

Find the titles of items that received any rating below 5 .

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


Question: What is the genre of the movie title with the lowest revenue generated?

SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id ORDER BY T1.revenue LIMIT 1

What is the genre of the movie title with the lowest revenue generated ?

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


Question: Please indicate the keywords of the title "Double, Double, Boy in Trouble".

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Double, Double, Boy in Trouble';

Please indicate the keywords of the title " Double , Double , Boy in Trouble " .

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


Question: Compute the total amount of payment processed.

SELECT sum(Amount_Payment) FROM Payments

Compute the total amount of payment processed .


Question: In 2009, who among the married patients had undergone a care plan for more than 60 days?

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.marital = 'M' AND strftime('%J', T2.STOP) - strftime('%J', T2.START) > 60

In 2009 , who among the married patients had undergone a care plan for more than 60 days ?

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


Question: Which racetrack hosted the most recent race? Indicate the full location.

SELECT T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T1.circuitId = T2.circuitId ORDER BY T2.date DESC LIMIT 1

Which racetrack hosted the most recent race ? Indicate the full location .

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


Question: Show all states where more than 5 students live.

SELECT T1.state FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.state HAVING count(*)  >  5

Show all states where more than 5 students live .


Question: Find the 5-star business in Ahwatukee, AZ and identify it's business category.

SELECT T1.business_id, T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.city = 'Ahwatukee' AND T1.stars = 5

Find the 5 - star business in Ahwatukee , AZ and identify it 's business category .

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


Question: Please list the country of the movie that stars an actress who acts the worse.

SELECT T3.country FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.a_gender = 'F' AND T1.a_quality = 0

Please list the country of the movie that stars an actress who acts the worse .

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


Question: Show the institution name and the number of staff for each institution founded after 1800.

SELECT T1.institution_name ,  count(*) FROM institution AS T1 JOIN staff AS T2 ON T1.institution_id  =  T2.institution_id WHERE T1.founded  >  1800 GROUP BY T2.institution_id

Show the institution name and the number of staff for each institution founded after 1800 .

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


Question: How many positive comments are there on the list?

SELECT COUNT(id) FROM comments WHERE score > 60

How many positive comments are there on the list ?


Question: Give the name of the manager staff for store No.1.

SELECT T1.first_name, T1.last_name FROM staff AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id WHERE T2.store_id = 1

Give the name of the manager staff for store No.1 .

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


Question: Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies?

SELECT DISTINCT T3.person_name FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T2.character_name = 'Captain Jack Sparrow' AND T1.title LIKE 'Pirates of the Caribbean%'

Who played Captain Jack Sparrow in all of the Pirates of the Caribbean movies ?

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


Question: What is the precise location or coordinate where most of the robberies in Rogers Park occurred?

SELECT T2.latitude, T2.longitude FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T1.community_area_name = 'Rogers Park' AND T3.title = 'Robbery' AND T3.fbi_code_no = 3

What is the precise location or coordinate where most of the robberies in Rogers Park occurred ?

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


Question: How many methods in repository 150 did not have a comment and a summary?

SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 150 AND T2.FullComment IS NULL AND T2.Summary IS NULL

How many methods in repository 150 did not have a comment and a summary ?

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


Question: Find the distinct years when the governor was named "Eliot Spitzer".

SELECT DISTINCT YEAR FROM party WHERE Governor  =  "Eliot Spitzer"

Find the distinct years when the governor was named " Eliot Spitzer " .

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


Question: what is the average number of factories and maximum number of shops for manufacturers that opened before 1990.

SELECT max(num_of_shops) ,  avg(Num_of_Factories) FROM manufacturer WHERE open_year  <  1990

what is the average number of factories and maximum number of shops for manufacturers that opened before 1990 .

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


Question: What number of words are there on revision page 27457362?

SELECT words FROM pages WHERE revision = 27457362

What number of words are there on revision page 27457362 ?

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


Question: Identify the allergy period for Isadora Moen and what triggered it.

SELECT T2.START, T2.STOP, T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Isadora' AND T1.last = 'Moen'

Identify the allergy period for Isadora Moen and what triggered it .

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


Question: What are the first and last names of the 5 customers who purchased something most recently?

SELECT T1.first_name ,  T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id ORDER BY T2.invoice_date DESC LIMIT 5;

What are the first and last names of the 5 customers who purchased something most recently ?

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


Question: For the root beer brand with the most 5 star ratings, what is the name of the brewery?

SELECT T1.BreweryName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 GROUP BY T1.BrandID ORDER BY COUNT(T2.StarRating) DESC LIMIT 1

For the root beer brand with the most 5 star ratings , what is the name of the brewery ?

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


Question: What are the names of races in which drivers 26 or older took part?

SELECT T2.Race_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE T1.Age  >=  26

What are the names of races in which drivers 26 or older took part ?

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


Question: Between the Ivy League Schools, which school's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident?

SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) GROUP BY T1.state ORDER BY SUM(T2.state_appr_value) ASC LIMIT 1

Between the Ivy League Schools , which school 's state have the lowest sate appropriations to higher education in fiscal year 2011 per resident ?

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


Question: What are the names of actors ordered descending by the year in which their musical was awarded?

SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID  =  T2.Musical_ID ORDER BY T2.Year DESC

What are the names of actors ordered descending by the year in which their musical was awarded ?

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


Question: Who played the No.1 character in the credit list of the movie which was released on "2015/10/26"?

SELECT T3.Name 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.`Release Date` = '2015-10-26' AND T2.creditOrder = '1'

Who played the No.1 character in the credit list of the movie which was released on " 2015/10/26 " ?

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


Question: What are the different budget type codes, and how many documents are there for each?

SELECT budget_type_code ,  count(*) FROM Documents_with_expenses GROUP BY budget_type_code

What are the different budget type codes , and how many documents are there for each ?

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


Question: What are the dates that had the top 5 cloud cover rates? Also tell me the cloud cover rate.

SELECT date ,  cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5

What are the dates that had the top 5 cloud cover rates ? Also tell me the cloud cover rate .

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


Question: For each conference id, what are their names, year, and number of participants?

SELECT T1.conference_name ,  T1.year ,  count(*) FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id  =  T2.conference_id GROUP BY T2.conference_id

For each conference i d , what are their names , year , and number of participants ?

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


Question: What apartment type codes and apartment numbers do the buildings managed by "Kyle" have?

SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "Kyle"

What apartment type codes and apartment numbers do the buildings managed by " Kyle " have ?

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


Question: Find the name and email for the users who have more than one follower.

SELECT T1.name ,  T1.email FROM user_profiles AS T1 JOIN follows AS T2 ON T1.uid  =  T2.f1 GROUP BY T2.f1 HAVING count(*)  >  1

Find the name and email for the users who have more than one follower .

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


Question: How many care plans has Mrs. Norman Berge taken?

SELECT COUNT(T2.PATIENT) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Norman' AND T1.last = 'Berge'

How many care plans has Mrs. Norman Berge taken ?

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


Question: How many activities does Mark Giuliano participate in?

SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"

How many activities does Mark Giuliano participate in ?

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


Question: What are the names of customers who never made an order.

SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id

What are the names of customers who never made an order .


Question: List the movies released in 1945.

SELECT title FROM movie WHERE CAST(STRFTIME('%Y', release_date) AS INT) = 1945


Question: Provide the title and total time of the recipe which has the highest possibility of gaining weight.

SELECT T1.title, T1.prep_min + T1.cook_min + T1.stnd_min FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id ORDER BY T2.total_fat DESC LIMIT 1

Provide the title and total time of the recipe which has the highest possibility of gaining weight .

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


Question: How many papers are published in total?

How many papers are published in total ?


Question: How many employees are under Gregory Cardenas?

SELECT COUNT(T1.employee_id) FROM employee AS T1 WHERE T1.supervisor = ( SELECT employee_id FROM employee WHERE first_name = 'Gregory' AND last_name = 'Cardenas' )

How many employees are under Gregory Cardenas ?


Question: Please provide the number of stars that the repository of the solution 20 have.

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

Please provide the number of stars that the repository of the solution 20 have .

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


Question: What are the denominations used by both schools founded before 1890 and schools founded  after 1900?

SELECT Denomination FROM school WHERE Founded  <  1890 INTERSECT SELECT Denomination FROM school WHERE Founded  >  1900

What are the denominations used by both schools founded before 1890 and schools founded after 1900 ?

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


Question: What country have the series code of SP.DYN.CBRT.IN?

SELECT T1.ShortName FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'SP.DYN.CBRT.IN'

What country have the series code of SP.DYN.CBRT.IN ?

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


Question: Find names of all colleges whose enrollment is greater than that of all colleges in the FL state.

SELECT cName FROM college WHERE enr  >  (SELECT max(enr) FROM college WHERE state  =  'FL')

Find names of all colleges whose enrollment is greater than that of all colleges in the FL state .

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


Question: What is the age of the artist who had the shortest life?

SELECT deathYear - birthYear FROM artists ORDER BY deathYear - birthYear LIMIT 1

What is the age of the artist who had the shortest life ?


Question: What are the manager and car owner of the team that has at least 2 drivers?

SELECT t1.manager ,  t1.car_owner FROM team AS t1 JOIN team_driver AS t2 ON t1.team_id  =  t2.team_id GROUP BY t2.team_id HAVING count(*)  >=  2

What are the manager and car owner of the team that has at least 2 drivers ?

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


Question: How many accounts have running contracts in Branch location 1?

SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T1.district_id = 1 AND (T3.status = 'C' OR T3.status = 'D')

How many accounts have running contracts in Branch location 1 ?


Question: List the main industry with highest total market value and its number of companies.

SELECT main_industry ,  count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1

List the main industry with highest total market value and its number of companies .

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


Question: Find the the grape whose white color grapes are used to produce wines with scores higher than 90.

SELECT DISTINCT T1.Grape FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "White" AND T2.score  >  90

Find the the grape whose white color grapes are used to produce wines with scores higher than 90 .

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


Question: What is the city of M Chinnaswamy Stadium?

SELECT T1.City_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id WHERE T2.Venue_Name = 'M Chinnaswamy Stadium'

What is the city of M Chinnaswamy Stadium ?

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


Question: Show the names of journalists and the names of the events they reported in ascending order

SELECT T3.Name ,  T2.Name FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID ORDER BY T2.Event_Attendance ASC

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


Question: What is the id and name of the browser that is compatible with the most web accelerators?

SELECT T1.id ,  T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id  =  T2.browser_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What is the i d and name of the browser that is compatible with the most web accelerators ?

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


Question: From 1593 onwards, what is the difference between the number of comedy works and history works?

SELECT SUM(IIF(GenreType = 'Comedy', 1, 0)) - SUM(IIF(GenreType = 'History', 1, 0)) FROM works WHERE Date > 1593

From 1593 onwards , what is the difference between the number of comedy works and history works ?

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


Question: How many footnotes did Aruba got on different series code in the year 2002?

SELECT COUNT(T2.SeriesCode) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Year = 'YR2002'

How many footnotes did Aruba got on different series code in the year 2002 ?

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


Question: Show the names of all the donors except those whose donation amount less than 9.

SELECT donator_name FROM endowment EXCEPT SELECT donator_name FROM endowment WHERE amount  <  9

Show the names of all the donors except those whose donation amount less than 9 .

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


Question: Which sales person made the sale of 1635823.3967 last year? Give the Business Entity ID.

SELECT BusinessEntityID FROM SalesPerson WHERE SalesLastYear = '1635823.3967'

Which sales person made the sale of 1635823.3967 last year ? Give the Business Entity ID .

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


Question: Among the active businesses located at Chandler, AZ, list the category and atrributes of business with a medium review count.

SELECT T3.category_name, T5.attribute_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id INNER JOIN Business_Attributes AS T4 ON T1.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = T5.attribute_id WHERE T1.active LIKE 'TRUE' AND T1.state LIKE 'AZ' AND T1.city LIKE 'Chandler' AND T1.review_count LIKE 'Medium'

Among the active businesses located at Chandler , AZ , list the category and atrributes of business with a medium review count .

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


Question: Show the invoice number and the number of transactions for each invoice.

SELECT invoice_number ,  count(*) FROM Financial_transactions GROUP BY invoice_number

Show the invoice number and the number of transactions for each invoice .

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


Question: Provide the losing team's name in the match ID 336039.

SELECT Team_Name FROM Team WHERE Team_Id = ( SELECT CASE WHEN Team_1 = Match_Winner THEN Team_2 ELSE Team_1 END FROM Match WHERE match_id = 336039 )

Provide the losing team 's name in the match ID 336039 .

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


Question: How many reservations exist for each boat that has more than 1 reservation already?

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

How many reservations exist for each boat that has more than 1 reservation already ?

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


Question: How many sales people managed to sell Headlights - Weatherproof?

SELECT COUNT(T2.SalesPersonID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Headlights - Weatherproof'

How many sales people managed to sell Headlights - Weatherproof ?

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


Question: Who is the youngest pilot to fly the plane Piper Cub?

SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' ORDER BY age LIMIT 1

Who is the youngest pilot to fly the plane Piper Cub ?

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


Question: Calculate the percentage of sales done at Sac State American River Courtyard.

SELECT CAST(COUNT(CASE WHEN T2.LocationName = 'Sac State American River Courtyard' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID

Calculate the percentage of sales done at Sac State American River Courtyard .

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


Question: How many universities had above 30% of international students in 2013?

SELECT COUNT(*) FROM university_year WHERE pct_international_students > 30 AND year = 2013

How many universities had above 30 % of international students in 2013 ?

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


Question: Find the location of the club "Pen and Paper Gaming".

SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming"

Find the location of the club " Pen and Paper Gaming " .

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


Question: Show ids for all employees with at least 100000 salary.

SELECT eid FROM Employee WHERE salary  >  100000

Show ids for all employees with at least 100000 salary .

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


Question: What is the average height of the male Olympic competitors from Finland?

SELECT AVG(T3.height) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Finland' AND T3.gender = 'M'

What is the average height of the male Olympic competitors from Finland ?


Question: Count the number of affiliations.


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

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

What are the contents of package sent by John Zoidfarb ?

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


Question: Show the names of employees with role name Editor.

SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Editor"

Show the names of employees with role name Editor .

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


Question: How many chapters does the character Demetrius show in the story?

SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Demetrius'

How many chapters does the character Demetrius show in the story ?

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


Question: Identify by conference full name all papers in which a journal was not published but a conference.

SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.ConferenceId != 0 AND T1.JournalId = 0 AND T1.Year != 0

Identify by conference full name all papers in which a journal was not published but a conference .

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


Question: Among posts by Harvey Motulsky and Noah Snyder, which one has higher popularity?

SELECT T1.DisplayName FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'Harvey Motulsky' OR T1.DisplayName = 'Noah Snyder' GROUP BY T1.DisplayName ORDER BY SUM(T3.ViewCount) DESC LIMIT 1

Among posts by Harvey Motulsky and Noah Snyder , which one has higher popularity ?

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


Question: Return the themes, dates, and attendance for exhibitions that happened in 2004.

SELECT T2.theme ,  T1.date ,  T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id  =  T2.exhibition_id WHERE T2.year  =  2004

Return the themes , dates , and attendance for exhibitions that happened in 2004 .

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


Question: What are the name and popularity of participants who have sung a song both in 'Croatian' language and in 'English' language?

SELECT T1.name ,  T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id  =  T1.id JOIN songs AS T3 ON T3.id  =  T2.songs_id WHERE T3.language  =  'Croatian' INTERSECT SELECT T1.name ,  T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id  =  T1.id JOIN songs AS T3 ON T3.id  =  T2.songs_id WHERE T3.language  =  'English'

What are the name and popularity of participants who have sung a song both in ' Croatian ' language and in ' English ' language ?

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


Question: What is the age group of most OPPO users?

SELECT T.`group` FROM ( SELECT T1.`group`, COUNT(T1.`group`) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO' GROUP BY T1.`group` ) AS T ORDER BY T.num DESC LIMIT 1

What is the age group of most OPPO users ?


Question: Please state the reference name of the oldest German driver.

SELECT driverRef FROM drivers WHERE nationality = 'German' ORDER BY JULIANDAY(dob) ASC LIMIT 1

Please state the reference name of the oldest German driver .


Question: State the game publisher IDs of the games with a platform ID of 16.

SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 16

State the game publisher IDs of the games with a platform ID of 16 .

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


Question: State the county for Arecibo City.

SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Arecibo'


Question: How many cards are having future frame version and what are the legality status of these cards?

SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.frameVersion = 'future'

How many cards are having future frame version and what are the legality status of these cards ?

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


Question: Show the denomination of the school that has the most players.

SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1

Show the denomination of the school that has the most players .

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


Question: What is the document status description of the document with id 1?

SELECT Ref_Document_Status.document_status_description FROM Ref_Document_Status JOIN Documents ON Documents.document_status_code = Ref_Document_Status.document_status_code WHERE Documents.document_id = 1;

What is the document status description of the document with i d 1 ?

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


Question: What is the profit on net of the products that have exactly 200 maximum order quantity? Indicate the name of the vendors to which these products were purchased from.

SELECT T1.LastReceiptCost - T1.StandardPrice, T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.MaxOrderQty = 200

What is the profit on net of the products that have exactly 200 maximum order quantity ? Indicate the name of the vendors to which these products were purchased from .

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


Question: List all process ids with a document.

SELECT DISTINCT process_id FROM Documents_processes


Question: Name the account numbers of female clients who are oldest and have lowest average salary?

SELECT T3.account_id FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN account AS T3 ON T2.district_id = T3.district_id INNER JOIN disp AS T4 ON T1.client_id = T4.client_id AND T4.account_id = T3.account_id  WHERE T1.gender = 'F' ORDER BY T1.birth_date ASC, T2.A11 ASC LIMIT 1

Name the account numbers of female clients who are oldest and have lowest average salary ?

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


Question: What is the number of growth population for country with the lowest infant mortality?

SELECT T2.Population_Growth * T1.Population FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Infant_Mortality IS NOT NULL ORDER BY T2.Infant_Mortality ASC LIMIT 1

What is the number of growth population for country with the lowest infant mortality ?

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


Question: What is the salaray and name of the employee that is certified to fly the most planes?

SELECT T1.name ,  T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1

What is the salaray and name of the employee that is certified to fly the most planes ?

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


Question: How many negative comments are there in all the apps with 100,000,000+ installs?

SELECT COUNT(T2.Sentiment) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Installs = '100,000,000+' AND T2.Sentiment = 'Negative'

How many negative comments are there in all the apps with 100,000,000 + installs ?

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


Question: Sort the information about course authors and tutors in alphabetical order of the personal name.

SELECT * FROM Course_Authors_and_Tutors ORDER BY personal_name

Sort the information about course authors and tutors in alphabetical order of the personal name .

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


Question: Among customers with IDs from 1 to 100, what is the highest price of products they purchased?

SELECT T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.CustomerID BETWEEN 1 AND 100 ORDER BY T1.Price DESC LIMIT 1

Among customers with IDs from 1 to 100 , what is the highest price of products they purchased ?

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


Question: State the goalie who has the lowest percentage of goals against among all the shots against recorded. Name the players and season where he played.

SELECT T1.firstName, T1.lastName, T2.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE CAST(T2.GA AS REAL) / T2.SA IS NOT NULL ORDER BY CAST(T2.GA AS REAL) / T2.SA LIMIT 1

State the goalie who has the lowest percentage of goals against among all the shots against recorded . Name the players and season where he played .

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


Question: Among the subscriber, how many of them finished the 2nd at Folsom and Civic Center BART (7th at Market) as their start and end stations respectively for no more than 490 seconds under minimum visibility of 4 miles.

SELECT COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.subscription_type = 'Subscriber' AND T2.min_visibility_miles = 4 AND T1.duration < 490 AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = 'Civic Center BART (7th at Market)'

Among the subscriber , how many of them finished the 2nd at Folsom and Civic Center BART ( 7th at Market ) as their start and end stations respectively for no more than 490 seconds under minimum visibility of 4 miles .

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


Question: Which currency pair's average exchange rate for the day is the highest?

SELECT FromCurrencyCode, ToCurrencyCode FROM CurrencyRate ORDER BY AverageRate DESC LIMIT 1

Which currency pair 's average exchange rate for the day is the highest ?

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


Question: Give the location id of West Sussex State.

SELECT DISTINCT LocationID FROM location WHERE State = 'West Sussex'

Give the location i d of West Sussex State .

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


Question: Find the id and local authority of the station with has the highest average high temperature.

SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id ORDER BY avg(high_temperature) DESC LIMIT 1

Find the i d and local authority of the station with has the highest average high temperature .

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


Question: Tell the number of movies made by Paramount Animation.

SELECT COUNT(T2.movie_id) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id WHERE T1.company_name = 'Paramount Animation'

Tell the number of movies made by Paramount Animation .

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


Question: Sum up the away team goal scored by both Daan Smith and Filipe Ferreira.

SELECT SUM(t2.away_team_goal) FROM Player AS t1 INNER JOIN match AS t2 ON t1.player_api_id = t2.away_player_5 WHERE t1.player_name IN ('Daan Smith', 'Filipe Ferreira')

Sum up the away team goal scored by both Daan Smith and Filipe Ferreira .

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


Question: What percentage was the budget for Parking to the total budget for the "November Speaker"?

SELECT CAST(SUM(CASE WHEN T1.category = 'Parking' THEN T1.amount ELSE 0 END) AS REAL) * 100 / SUM(T1.amount) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Speaker'

What percentage was the budget for Parking to the total budget for the " November Speaker " ?

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


Question: How much did the Student_Club members spend on food in September Meeting?

SELECT T2.spent FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'September Meeting' AND T2.category = 'Food' AND SUBSTR(T1.event_date, 6, 2) = '09'

How much did the Student_Club members spend on food in September Meeting ?

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


Question: Return the names of products in the category 'Spices'.

SELECT product_name FROM products WHERE product_category_code  =  "Spices"

Return the names of products in the category ' Spices ' .

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


Question: What are the names of customers who do not have saving accounts?

SELECT cust_name FROM customer EXCEPT SELECT cust_name FROM customer WHERE acc_type  =  'saving'

What are the names of customers who do not have saving accounts ?


Question: How many products are there under the category "Seeds"?

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

How many products are there under the category " Seeds " ?

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


Question: Name the goalies who are good at left hand and also has become a coach after retirement. Name all teams he had played before.

SELECT DISTINCT firstName, lastName, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T1.lgID = T3.lgID WHERE T1.playerID IS NOT NULL AND T2.coachID IS NOT NULL AND T2.shootCatch = 'L' AND T2.pos = 'G'

Name the goalies who are good at left hand and also has become a coach after retirement . Name all teams he had played before .

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


Question: Calculate the percentage of cars that belong to the USA.

SELECT CAST(SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin

Calculate the percentage of cars that belong to the USA .


Question: In 1994 which title had less order quanty than the average order quantity? Find the title name, type and price.

SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T2.ord_date LIKE '1994%' AND T2.Qty < ( SELECT CAST(SUM(T4.qty) AS REAL) / COUNT(T3.title_id) FROM titles AS T3 INNER JOIN sales AS T4 ON T3.title_id = T4.title_id )

In 1994 which title had less order quanty than the average order quantity ? Find the title name , type and price .

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


Question: Please list all of the character descriptions in paragraph 20.

SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 20

Please list all of the character descriptions in paragraph 20 .

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


Question: Find all the songs performed by artist with last name "Heilo"

SELECT T3.Title FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId WHERE T2.Lastname  =  "Heilo"

Find all the songs performed by artist with last name " Heilo "

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


Question: Find the last names of students studying in room 111.

SELECT lastname FROM list WHERE classroom  =  111

Find the last names of students studying in room 111 .

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


Question: What are the names of entrepreneurs and their corresponding investors, ordered descending by the amount of money requested?

SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested

What are the names of entrepreneurs and their corresponding investors , ordered descending by the amount of money requested ?

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


Question: What is the e-mail address of the employee who switched departments for the most times?

SELECT T2.EmailAddress FROM EmployeeDepartmentHistory AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID GROUP BY T2.BusinessEntityID ORDER BY COUNT(T1.DepartmentID) DESC LIMIT 1

What is the e - mail address of the employee who switched departments for the most times ?

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


Question: What is the average, maximum, and minimum budget for all movies before 2000.

SELECT avg(budget_million) ,  max(budget_million) ,  min(budget_million) FROM movie WHERE YEAR  <  2000

What is the average , maximum , and minimum budget for all movies before 2000 .

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


Question: What is the station station and end station for the trips with the three smallest ids?

SELECT start_station_name ,  end_station_name FROM trip ORDER BY id LIMIT 3

What is the station station and end station for the trips with the three smallest ids ?

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


Question: What are the player api id of 10 heaviest players?

SELECT player_api_id FROM Player ORDER BY weight DESC LIMIT 10

What are the player api i d of 10 heaviest players ?

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


Question: How many active and closed District Community Day Schools are there in the county of Alpine?

SELECT COUNT(School) FROM schools WHERE (StatusType = 'Closed' OR StatusType = 'Active') AND SOC = 69 AND County = 'Alpine'

How many active and closed District Community Day Schools are there in the county of Alpine ?

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


Question: What are the nicknames of institutions, ordered descending by their capacities?

SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Capacity DESC

What are the nicknames of institutions , ordered descending by their capacities ?

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


Question: List down the product name for products from id 1 to 10.

SELECT Name FROM Products WHERE ProductID BETWEEN 1 AND 10

List down the product name for products from i d 1 to 10 .

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


Question: Find the last names of students with major 50.

SELECT LName FROM STUDENT WHERE Major  =  50

Find the last names of students with major 50 .

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


Question: Return the ids of users who have performed two or more searches, as well as their search sequence.

SELECT search_seq ,  user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;

Return the ids of users who have performed two or more searches , as well as their search sequence .

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


Question: Find the average weight of the heroes who are aliens.

SELECT CAST(SUM(T1.weight_kg) AS REAL) / COUNT(T1.id) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'

Find the average weight of the heroes who are aliens .

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


Question: How many stadiums are not in country "Russia"?

SELECT count(*) FROM stadium WHERE country != 'Russia'

How many stadiums are not in country " Russia " ?

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


Question: Name the vendors who provide resources for project 'Lights, Camera, Action!'. List all the item names and unit price for each.

SELECT T1.vendor_name, T1.item_name, T1.item_unit_price FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN essays AS T3 ON T2.projectid = T3.projectid WHERE T3.title = 'Lights, Camera, Action!'

Name the vendors who provide resources for project ' Lights , Camera , Action ! ' . List all the item names and unit price for each .

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


Question: Please list the phone numbers of all the suppliers for the parts ordered in order no.1.

SELECT T2.s_phone FROM lineitem AS T1 INNER JOIN supplier AS T2 ON T1.l_suppkey = T2.s_suppkey WHERE T1.l_orderkey = 1

Please list the phone numbers of all the suppliers for the parts ordered in order no.1 .

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


Question: What is the highest possible discount rate for 'Excess Inventory'?

SELECT DiscountPct FROM SpecialOffer WHERE Type = 'Excess Inventory' ORDER BY DiscountPct DESC LIMIT 1

What is the highest possible discount rate for ' Excess Inventory ' ?

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


Question: How many train stations are there?


Question: How many vehicles exist?


Question: What are the official languages of the country where you can find the city with the least population?

SELECT T2.Language FROM City AS T1 INNER JOIN CountryLanguage AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IsOfficial = 'T' ORDER BY T1.Population ASC LIMIT 1

What are the official languages of the country where you can find the city with the least population ?

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


Question: How many customers have an address in Abu Dhabi city? List those customer names.

SELECT COUNT(T1.city_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Abu Dhabi'

How many customers have an address in Abu Dhabi city ? List those customer names .

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


Question: Among the suppliers from Middle East region, how many suppliers were in debt?

SELECT COUNT(T3.s_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.s_nationkey WHERE T3.s_acctbal < 0 AND T1.r_name = 'MIDDLE EAST'

Among the suppliers from Middle East region , how many suppliers were in debt ?

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


Question: What campuses are located in Northridge, Los Angeles or in San Francisco, San Francisco?

SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"

What campuses are located in Northridge , Los Angeles or in San Francisco , San Francisco ?

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


Question: What are the numbers of paintings created before 1900 in different places?

SELECT count(*) ,  LOCATION FROM paintings WHERE YEAR  <  1900 GROUP BY LOCATION

What are the numbers of paintings created before 1900 in different places ?


Question: What horror movies have a running time of at least 2? Please list movie IDs.

SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.runningtime >= 2 AND T1.genre = 'Horror'

What horror movies have a running time of at least 2 ? Please list movie IDs .

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


Question: Which teams did SC Ganguly join in season year 2008?

SELECT T5.Team_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id INNER JOIN Team AS T5 ON T3.Team_Id = T5.Team_Id WHERE T4.Season_Year = 2008 AND T1.Player_Name = 'SC Ganguly' GROUP BY T5.Team_Name

Which teams did SC Ganguly join in season year 2008 ?

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


Question: Please show the credit card number of David Bradley.

SELECT T3.CardNumber FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'

Please show the credit card number of David Bradley .

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


Question: What is the percentage difference of student badges given during 2010 and 2011?

SELECT CAST(SUM(IIF(STRFTIME('%Y', Date) = '2010', 1, 0)) AS REAL) * 100 / COUNT(Id) - CAST(SUM(IIF(STRFTIME('%Y', Date) = '2011', 1, 0)) AS REAL) * 100 / COUNT(Id) FROM badges WHERE Name = 'Student'

What is the percentage difference of student badges given during 2010 and 2011 ?

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


Question: Show names for all aircrafts of which John Williams has certificates.

SELECT T3.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T1.name  =  "John Williams"

Show names for all aircrafts of which John Williams has certificates .

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


Question: What is the list of building names, sorted by the number of stories of each building in ascending order?

SELECT Name FROM building ORDER BY Number_of_Stories ASC

What is the list of building names , sorted by the number of stories of each building in ascending order ?

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


Question: Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10.

SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id  =  T2.exhibition_id WHERE T1.attendance  >  100 OR T2.ticket_price  <  10

Count the number of exhibitions that have had an attendnance of over 100 or a ticket prices under 10 .

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


Question: Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.

SELECT Country FROM perpetrator WHERE Injured  >  50 INTERSECT SELECT Country FROM perpetrator WHERE Injured  <  20

Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20 .

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


Question: What is the number of documents in the collection named 'Best'?

SELECT count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";

What is the number of documents in the collection named ' Best ' ?

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


Question: Which school in Contra Costa has the highest number of test takers?

SELECT sname FROM satscores WHERE cname = 'Contra Costa' AND sname IS NOT NULL ORDER BY NumTstTakr DESC LIMIT 1

Which school in Contra Costa has the highest number of test takers ?

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


Question: How many strategy games are there?

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


Question: What are the different positions of players from UCLA or Duke colleges?

SELECT DISTINCT POSITION FROM match_season WHERE College  =  "UCLA" OR College  =  "Duke"

What are the different positions of players from UCLA or Duke colleges ?

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


Question: What are the two most common first names among the school administrators? Indicate the district to which they administer.

SELECT DISTINCT T1.AdmFName1, T1.District FROM schools AS T1 INNER JOIN ( SELECT admfname1 FROM schools GROUP BY admfname1 ORDER BY COUNT(admfname1) DESC LIMIT 2 ) AS T2 ON T1.AdmFName1 = T2.admfname1

What are the two most common first names among the school administrators ? Indicate the district to which they administer .

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


Question: Name the event with the highest amount spent on advertisement.

SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' ORDER BY T1.spent DESC LIMIT 1

Name the event with the highest amount spent on advertisement .

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


Question: List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any.

SELECT DISTINCT T1.frameVersion, T1.name , IIF(T2.status = 'Banned', T1.name, 'NO') FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Allen Williams'

List all the frame styles and cards Allen Williams worked on and find any banned cards if there are any .

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


Question: What are the names and coordinates of all planets in alphabetical order by name?

SELECT Name ,  Coordinates FROM Planet ORDER BY Name

What are the names and coordinates of all planets in alphabetical order by name ?

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


Question: Among the user ID with number in compliment of uber on profile, list any 5 user ID and the year when they join Yelp.

SELECT T3.user_id, T3.user_yelping_since_year FROM Compliments AS T1 INNER JOIN Users_Compliments AS T2 ON T1.compliment_id = T2.compliment_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.compliment_type = 'profile' AND T2.number_of_compliments = 'Uber' LIMIT 5

Among the user ID with number in compliment of uber on profile , list any 5 user ID and the year when they join Yelp .

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


Question: What is the name of the oldest person who participated in the Olympic Games?

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

What is the name of the oldest person who participated in the Olympic Games ?

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


Question: What are the names of the activities Mark Giuliano is involved in

SELECT T3.activity_name FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN Activity AS T3 ON T3.actid  =  T2.actid WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"

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


Question: How many female students (sex is F) whose age is below 25?

SELECT count(*) FROM student WHERE sex  =  'F' AND age  <  25

How many female students ( sex is F ) whose age is below 25 ?

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


Question: Which items from store 1 have the highest units sold during rainy day?

SELECT T2.item_nbr FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr AND T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 1 AND T1.codesum LIKE '%' OR 'RA' OR '%' GROUP BY T2.item_nbr ORDER BY T2.units DESC LIMIT 1

Which items from store 1 have the highest units sold during rainy day ?

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


Question: State the number of states in the United Kingdom.

SELECT COUNT(State) AS State_number FROM location WHERE Country = 'United Kingdom'

State the number of states in the United Kingdom .


Question: List the full name of customers who spend more than 50,000 in descending order the amount spend.

SELECT DISTINCT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T2.Quantity * T1.Price > 50000

List the full name of customers who spend more than 50,000 in descending order the amount spend .

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


Question: List down the name of venues in season 2.

SELECT T2.Venue_Name FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id WHERE T1.Season_Id = 2 GROUP BY T2.Venue_Name

List down the name of venues in season 2 .

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


Question: what is the name and age of the youngest winning pilot?

SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot ORDER BY t1.age LIMIT 1

what is the name and age of the youngest winning pilot ?

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


Question: Find the average age of students who live in the city with code "NYC" and have secretary votes in the spring election cycle.

SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"

Find the average age of students who live in the city with code " NYC " and have secretary votes in the spring election cycle .

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


Question: What is the university ID of Harvard University?

SELECT id FROM university WHERE university_name = 'Harvard University'

What is the university ID of Harvard University ?

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


Question: Give the number of male users who use phone branded HTC.

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'M' AND T2.phone_brand = 'HTC'

Give the number of male users who use phone branded HTC .

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


Question: How many different allergy types exist?

SELECT count(DISTINCT allergytype) FROM Allergy_type

How many different allergy types exist ?


Question: What is the name of the shipping agent of the document with id 2?

SELECT Ref_Shipping_Agents.shipping_agent_name FROM Ref_Shipping_Agents JOIN Documents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Documents.document_id = 2;

What is the name of the shipping agent of the document with i d 2 ?

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


Question: How many of the restaurants with the lowest risk level failed the complaint inspection type?

SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = '1' AND T2.inspection_type = 'Complaint' AND T1.facility_type = 'Restaurant' AND T2.results = 'Fail'

How many of the restaurants with the lowest risk level failed the complaint inspection type ?

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


Question: List down the category of businesses whose stars ratings are 5.

SELECT DISTINCT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T1.stars = 5

List down the category of businesses whose stars ratings are 5 .

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


Question: What are the ids of the students who registered course statistics by order of registration date?

SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date

What are the ids of the students who registered course statistics by order of registration date ?

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


Question: Which movie has the keyword 'extremis?'

SELECT T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'extremis'

Which movie has the keyword ' extremis ? '

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


Question: How many accounts are in Bothell as opposed to Kenmore? What is the name of the State that comprises these two cities?

SELECT SUM(IIF(T1.city = 'Bothell', 1, 0)) - SUM(IIF(T1.city = 'Kenmore', 1, 0)) , stateprovincecode FROM Address AS T1 INNER JOIN StateProvince AS T2 ON T1.stateprovinceid = T2.stateprovinceid GROUP BY stateprovincecode

How many accounts are in Bothell as opposed to Kenmore ? What is the name of the State that comprises these two cities ?

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


Question: Show all the distinct president votes made on 08/30/2015.

SELECT DISTINCT PRESIDENT_Vote FROM VOTING_RECORD WHERE Registration_Date  =  "08/30/2015"

Show all the distinct president votes made on 08/30/2015 .

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


Question: Please list the organization names established in the countries where Dutch is spoken.

SELECT T2.Name FROM language AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T1.Name = 'Dutch'

Please list the organization names established in the countries where Dutch is spoken .

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


Question: Among the players who played 72 games, how many are left-shooters?

SELECT COUNT(T2.ELITEID) FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.GP = 72 AND T2.shoots = 'L'

Among the players who played 72 games , how many are left - shooters ?

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


Question: What are the start station's name and id for the one that had the most start trips in August?

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

What are the start station 's name and i d for the one that had the most start trips in August ?

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


Question: How many people from Canada are nominated for an award?

SELECT COUNT(T1.person_id) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T1.birth_country = 'Canada'

How many people from Canada are nominated for an award ?


Question: What percentage of donations are given via a giving or campaign page? List the primary area of those donations.

SELECT CAST(SUM(CASE WHEN T1.via_giving_page = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donation_total), ( SELECT T2.primary_focus_area FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.via_giving_page = 't' GROUP BY T2.primary_focus_area ORDER BY SUM(T1.donation_total) DESC LIMIT 1 ) result FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid

What percentage of donations are given via a giving or campaign page ? List the primary area of those donations .

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


Question: List down the episode ID of episodes aired in 2008 with 5 stars and below.

SELECT DISTINCT T1.episode_id FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008' AND T2.stars < 5;

List down the episode ID of episodes aired in 2008 with 5 stars and below .

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


Question: What is the percentage of cars that was produced by Japan among those that have a sweep volume of no less than 30?

SELECT CAST(SUM(CASE WHEN T3.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.displacement / T1.cylinders > 30

What is the percentage of cars that was produced by Japan among those that have a sweep volume of no less than 30 ?

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


Question: Report the total number of students for each fourth-grade classroom.

SELECT classroom ,  count(*) FROM list WHERE grade  =  "4" GROUP BY classroom

Report the total number of students for each fourth - grade classroom .


Question: Find the name and level of catalog structure with level between 5 and 10.

SELECT catalog_level_name ,  catalog_level_number FROM Catalog_Structure WHERE catalog_level_number BETWEEN 5 AND 10

Find the name and level of catalog structure with level between 5 and 10 .

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


Question: What is the least common element of all carcinogenic molecules?

SELECT T.element FROM ( SELECT T2.element, COUNT(DISTINCT T2.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.label = '+' GROUP BY T2.element ORDER BY COUNT(DISTINCT T2.molecule_id) LIMIT 1 ) t

What is the least common element of all carcinogenic molecules ?


Question: What is the elevation of the city with the alias East Longmeadow?

SELECT T2.elevation FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'East Longmeadow'

What is the elevation of the city with the alias East Longmeadow ?

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


Question: Show the status of the city that has hosted the greatest number of competitions.

SELECT T1.Status FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID ORDER BY COUNT(*) DESC LIMIT 1

Show the status of the city that has hosted the greatest number of competitions .

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


Question: What are the names of the colleges that are larger than at least one college in Florida?

SELECT DISTINCT cName FROM college WHERE enr  >  (SELECT min(enr) FROM college WHERE state  =  'FL')

What are the names of the colleges that are larger than at least one college in Florida ?

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


Question: What are the names of the movies that are played in any theater and the name of the corresponding theater?

SELECT T1.title ,  T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie

What are the names of the movies that are played in any theater and the name of the corresponding theater ?

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


Question: What is the full address of Albert's Café?

SELECT T2.street_num, T2.street_name, T1.city FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'Albert''s Café'

What is the full address of Albert 's Café ?


Question: Find and list the full name of customers who rented more than five types of movies.

SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id GROUP BY T1.first_name, T1.last_name ) AS T WHERE T.num > 5

Find and list the full name of customers who rented more than five types of movies .

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


Question: How many producers does the movie "The Amityville Horror" have?

SELECT COUNT(T2.person_id) FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'The Amityville Horror' AND T2.job = 'Producer'

How many producers does the movie " The Amityville Horror " have ?

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


Question: List names of all teams in the basketball competition, ordered by all home scores in descending order.

SELECT team_name FROM basketball_match ORDER BY All_Home DESC

List names of all teams in the basketball competition , ordered by all home scores in descending order .

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


Question: What is the number of wins the team Boston Red Stockings got in the postseasons each year in history?

SELECT count(*) ,  T1.year FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' GROUP BY T1.year

What is the number of wins the team Boston Red Stockings got in the postseasons each year in history ?

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


Question: How many 35-year-old female users gave the movie 1711133 a rating of 3?

SELECT COUNT(T1.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.rating = 3 AND T2.movieid = '1711133' AND T1.age = 35 AND T1.u_gender = 'F'

How many 35 - year - old female users gave the movie 1711133 a rating of 3 ?

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


Question: How many sales did the store in Remulade make?

SELECT COUNT(T1.ord_num) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T2.city = 'Remulade'

How many sales did the store in Remulade make ?


Question: What are the cards in set 10E with converted mana of 5 have translation and what are the languages?

SELECT id, language FROM set_translations WHERE id = ( SELECT id FROM cards WHERE convertedManaCost = 5 ) AND setCode = '10E'

What are the cards in set 10E with converted mana of 5 have translation and what are the languages ?

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


Question: Among the repositories whose number of stars received are between 6,000 to 9,000, which repository has the highest number of solution paths and many of those solution paths needs to be compiled if user wants to implement it?

SELECT T2.RepoId, COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars BETWEEN 6000 AND 9000 AND T2.WasCompiled = 0 GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1

Among the repositories whose number of stars received are between 6,000 to 9,000 , which repository has the highest number of solution paths and many of those solution paths needs to be compiled if user wants to implement it ?

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


Question: Name the title of the episode that was nominated for Emmy's Outstanding Animated Program 21 times.

SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Primetime Emmy Awards' AND T1.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T1.result = 'Nominee' GROUP BY T1.episode_id HAVING COUNT(T1.episode_id) = 21;

Name the title of the episode that was nominated for Emmy 's Outstanding Animated Program 21 times .

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


Question: How many Japanese suppliers have their accounts in debt?

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 = 'JAPAN'

How many Japanese suppliers have their accounts in debt ?


Question: How many Canadian players, between the ages of 18 and 24 when they initially played their first NHL, had a cumulative goal total of no more than 5? Indicate their complete names, the year, and the team for which they scored the specified amount of goals.

SELECT T2.nameGiven, T2.lastName, T2.birthYear, birthMon, birthDay , T3.tmID FROM Scoring AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T3.tmID = T1.tmID WHERE (T2.firstNHL - T2.birthYear) BETWEEN 18 AND 24 AND T3.G < 5

How many Canadian players , between the ages of 18 and 24 when they initially played their first NHL , had a cumulative goal total of no more than 5 ? Indicate their complete names , the year , and the team for which they scored the specified amount of goals .

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


Question: Provide the zip codes, cities, and locations of the postal points that have Shared Reshipper as a bad alias.

SELECT T1.zip_code, T2.city, T2.latitude, T2.longitude FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Shared Reshipper'

Provide the zip codes , cities , and locations of the postal points that have Shared Reshipper as a bad alias .

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


Question: How many hours does the Yelp business No. "5734" open on Saturday?

SELECT T1.closing_time - T1.opening_time AS "hour" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Saturday' AND T1.business_id = 5734

How many hours does the Yelp business No . " 5734 " open on Saturday ?

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


Question: Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style.

SELECT name FROM cards WHERE frameVersion = 2003 ORDER BY convertedManaCost DESC LIMIT 3

Please list the names of the top 3 cards with the highest converted mana cost and have a 2003 card frame style .

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


Question: State the word ID for "periodograma".

SELECT wid FROM words WHERE word = 'periodograma'

State the word ID for " periodograma " .


Question: What is the education required for David Whitehead to reach his current position?

SELECT T2.educationrequired FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.firstname = 'David' AND T1.lastname = 'Whitehead' AND T1.gender = 'M'

What is the education required for David Whitehead to reach his current position ?

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


Question: Name the neighborhood of the community area in crime with report number 23843?

SELECT T3.neighborhood_name FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T2.report_no = 23778

Name the neighborhood of the community area in crime with report number 23843 ?

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


Question: Describe the employees' full name, positions, located city and office phone number within Colorado state.

SELECT T1.firstname, T1.lastname, T3.positiontitle, T2.locationcity, T2.officephone FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T2.state = 'CO'

Describe the employees ' full name , positions , located city and office phone number within Colorado state .

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


Question: What are the owners of the document objects described as the 'Braeden Collection'?

SELECT OWNER FROM Document_Objects WHERE Description  =  'Braeden Collection'

What are the owners of the document objects described as the ' Braeden Collection ' ?

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


Question: Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.overallby = 'Arizona Coyotes' AND T2.draftyear = 2000 ORDER BY T1.PIM DESC LIMIT 1

Who among the players drafted by Arizona Coyotes in 2000 has committed the highest rule violations ?

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


Question: What are the product id and product type of the cheapest product?

SELECT product_id ,  product_type_code FROM products ORDER BY product_price LIMIT 1

What are the product i d and product type of the cheapest product ?

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


Question: What river has the 17th-longest length overall? Specify it's length.

SELECT Name, Length FROM river ORDER BY Length DESC LIMIT 16, 1

What river has the 17th - longest length overall ? Specify it 's length .

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


Question: What is the status of the orders placed on 04/10/2022?

SELECT DISTINCT T1.status_value FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id WHERE T3.order_date LIKE '2022-04-10%'

What is the status of the orders placed on 04/10/2022 ?


Question: Which company supplies Gula Malacca?

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


Question: Show the status shared by cities with population bigger than 1500 and smaller than 500.

SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500

Show the status shared by cities with population bigger than 1500 and smaller than 500 .

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


Question: Show locations and nicknames of schools.

SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID

Show locations and nicknames of schools .


Question: How many matches were played in the Scottish Premiership division from 2006 to 2008?

SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Scottish Premiership' AND (T1.season BETWEEN 2006 AND 2008)

How many matches were played in the Scottish Premiership division from 2006 to 2008 ?

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


Question: What are the names and flags of ships that do not have a captain with the rank of Midshipman?

SELECT name ,  flag FROM ship WHERE ship_id NOT IN (SELECT ship_id FROM captain WHERE rank  =  'Midshipman')

What are the names and flags of ships that do not have a captain with the rank of Midshipman ?

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


Question: Among the customers of empolyee 1370, who has the highest credit limit?Please list the full name of the contact person.

SELECT t2.contactFirstName, t2.contactLastName FROM employees AS t1 INNER JOIN customers AS t2 ON t1.employeeNumber = t2.salesRepEmployeeNumber WHERE t1.employeeNumber = '1370' ORDER BY t2.creditLimit DESC LIMIT 1

Among the customers of empolyee 1370 , who has the highest credit limit?Please list the full name of the contact person .

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


Question: What are the titles of the top 3 episodes that received no less than 30 votes in its 10-star rating?

SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.votes >= 30 AND T1.stars = 10 ORDER BY T1.votes DESC LIMIT 3

What are the titles of the top 3 episodes that received no less than 30 votes in its 10 - star rating ?

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


Question: What country in Asia has the largest gross national product(GNP)?

SELECT Name FROM Country WHERE Continent = 'Asia' ORDER BY GNP DESC LIMIT 1

What country in Asia has the largest gross national product(GNP ) ?

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


Question: What are the sids for sailors who reserved red or blue boats?

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

What are the sids for sailors who reserved red or blue boats ?

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


Question: Please list the path of the solution that contains files found within the repository most people like.

SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = ( SELECT MAX(Stars) FROM Repo )

Please list the path of the solution that contains files found within the repository most people like .

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


Question: How many different majors are there and how many different city codes are there for each student?

SELECT count(DISTINCT major) ,  count(DISTINCT city_code) FROM student

How many different majors are there and how many different city codes are there for each student ?

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


Question: Give the payment method code and customer number corresponding to the customer named Jeromy.

SELECT payment_method_code ,  customer_number FROM Customers WHERE customer_name  =  "Jeromy"

Give the payment method code and customer number corresponding to the customer named Jeromy .

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


Question: Calculate the average of 2020's population in each zip code.

SELECT CAST(SUM(population_2020) AS REAL) / COUNT(zip_code) FROM zip_data

Calculate the average of 2020 's population in each zip code .

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


Question: What are the names of customers who have both savings and checking accounts?

SELECT cust_name FROM customer WHERE acc_type  =  'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type  =  'checking'

What are the names of customers who have both savings and checking accounts ?

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


Question: Find the number of customers who live in the city called Lake Geovannyton.

SELECT count(*) FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.city  =  "Lake Geovannyton"

Find the number of customers who live in the city called Lake Geovannyton .

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


Question: List the companies of entrepreneurs in descending order of money requested.

SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC

List the companies of entrepreneurs in descending order of money requested .

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


Question: Show the cities and station names of city channels in ascending alphabetical order of station name.

SELECT City ,  Station_name FROM city_channel ORDER BY Station_name ASC

Show the cities and station names of city channels in ascending alphabetical order of station name .

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


Question: Please list top three unknown power cards that have promotional types for arena league in alphabetical order.

SELECT name FROM cards WHERE (power IS NULL OR power LIKE '%*%') AND promoTypes = 'arenaleague' ORDER BY name LIMIT 3

Please list top three unknown power cards that have promotional types for arena league in alphabetical order .

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


Question: What is the word id of the catalan language that was repeated no more than 10 times in the said language?

SELECT wid FROM langs_words WHERE occurrences <= 10

What is the word i d of the catalan language that was repeated no more than 10 times in the said language ?

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


Question: For each airport name, how many routes start at that airport?

SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name

For each airport name , how many routes start at that airport ?

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


Question: List out all the medals won by Lee Chong Wei.

SELECT DISTINCT T1.medal_name FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id INNER JOIN games_competitor AS T3 ON T2.competitor_id = T3.id INNER JOIN person AS T4 ON T3.person_id = T4.id WHERE T4.full_name = 'Lee Chong Wei' AND T2.medal_id <> 4

List out all the medals won by Lee Chong Wei .

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


Question: What is the religion with the most occurrrence of the current legislators?

SELECT religion_bio FROM current GROUP BY religion_bio ORDER BY COUNT(religion_bio) DESC LIMIT 1

What is the religion with the most occurrrence of the current legislators ?


Question: What are the names of the three artists who have produced the most songs, and how many works did they produce?

SELECT T1.artist_name ,  count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name GROUP BY T2.artist_name ORDER BY count(*) DESC LIMIT 3

What are the names of the three artists who have produced the most songs , and how many works did they produce ?

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


Question: Give the states or provinces corresponding to each property.

SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id  =  T2.property_address_id;

Give the states or provinces corresponding to each property .

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


Question: What is the maximum weight of USA all-star players?

SELECT MAX(T1.weight) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCountry = 'USA'

What is the maximum weight of USA all - star players ?

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


Question: How many people reside in the nation's capital city, which is situated in the nation that attained independence on 8/15/1947?

SELECT T3.Population FROM politics AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code INNER JOIN city AS T3 ON T3.Name = T2.Capital WHERE T1.Independence = '1947-08-15'

How many people reside in the nation 's capital city , which is situated in the nation that attained independence on 8/15/1947 ?

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


Question: Who are the advisors for students that live in a city with city code "BAL"?

SELECT Advisor FROM STUDENT WHERE city_code  =  "BAL"

Who are the advisors for students that live in a city with city code " BAL " ?

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


Question: Show the country names and the corresponding number of players.

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

Show the country names and the corresponding number of players .


Question: Who is the villain of the movie "Beauty and the Beast"?

SELECT villian FROM characters WHERE movie_title = 'Beauty and the Beast'

Who is the villain of the movie " Beauty and the Beast " ?

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


Question: Within the year of 2001 to 2010, find the paper published rate of 2001.

SELECT CAST(SUM(CASE WHEN Year = 2001 THEN 1 ELSE 0 END) AS REAL) / COUNT(Id) FROM Paper WHERE Year >= 2001 AND Year < 2011

Within the year of 2001 to 2010 , find the paper published rate of 2001 .

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


Question: What is the only flight destination for flights from Albany?

SELECT DEST FROM Airlines WHERE ORIGIN = 'ABY' GROUP BY DEST

What is the only flight destination for flights from Albany ?


Question: What product was ordered in the Central region on April 26, 2018, and shipped by April 27, 2018?

SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order Date` = '2018-04-26' AND T1.`Ship Date` = '2018-04-27' AND T2.Region = 'Central'

What product was ordered in the Central region on April 26 , 2018 , and shipped by April 27 , 2018 ?

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


Question: Find the top 3 artists who have the biggest number of painting works whose medium is oil?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" GROUP BY T2.painterID ORDER BY count(*) DESC LIMIT 3

Find the top 3 artists who have the biggest number of painting works whose medium is oil ?

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


Question: Count the number of books written by Orson Scott Card.

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 WHERE T3.author_name = 'Orson Scott Card'

Count the number of books written by Orson Scott Card .

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


Question: What is the ratio of female users to male users who uses a vivo device?

SELECT SUM(IIF(T1.gender = 'M', 1, 0)) / SUM(IIF(T1.gender = 'F', 1, 0)) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'

What is the ratio of female users to male users who uses a vivo device ?

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


Question: List all the names of the books written by Danielle Steel.

SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Danielle Steel'

List all the names of the books written by Danielle Steel .

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


Question: What is the full office location address where most of the employees work at?

SELECT T2.address, T2.locationcity, T2.state, T2.zipcode FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID GROUP BY T2.address, T2.locationcity, T2.state, T2.zipcode ORDER BY COUNT(*) DESC LIMIT 1

What is the full office location address where most of the employees work at ?

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


Question: How many accounts are there?


Question: What is the average number of rooms in a property?

What is the average number of rooms in a property ?


Question: How many wins was achieved by the oldest racer? Indicate his/her full name.

SELECT SUM(T1.wins),T2.forename, T2.surname FROM driverStandings AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId ORDER BY T2.dob ASC LIMIT 1

How many wins was achieved by the oldest racer ? Indicate his / her full name .

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


Question: What was the final score for the game Bursaspor vs Denizlispor on 2009/4/26?

SELECT FTHG, FTAG FROM matchs WHERE Date = '2009-04-26' AND HomeTeam = 'Bursaspor' AND AwayTeam = 'Denizlispor'

What was the final score for the game Bursaspor vs Denizlispor on 2009/4/26 ?

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


Question: Which order number has the highest unit price?

SELECT OrderNumber FROM `Sales Orders` WHERE REPLACE(`Unit Price`, ',', '') = ( SELECT REPLACE(`Unit Price`, ',', '') FROM `Sales Orders` ORDER BY REPLACE(`Unit Price`, ',', '') DESC LIMIT 1 )

Which order number has the highest unit price ?

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


Question: State the email of those who are staff of Murphy Diane whose number is 1002 and living in San Francisco

SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.reportsTo = 1002 AND T2.city = 'San Francisco'

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


Question: What are all the distinct states?


Question: Compare and get the difference of the number of businesses that are open in Monday and Tuesday from 10 am to 9 pm.

SELECT SUM(CASE WHEN T3.day_of_week = 'Monday' THEN 1 ELSE 0 END) - SUM(CASE WHEN T3.day_of_week = 'Tuesday' THEN 1 ELSE 0 END) AS DIFF FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.opening_time = '10AM' AND T2.closing_time = '9PM'

Compare and get the difference of the number of businesses that are open in Monday and Tuesday from 10 am to 9 pm .

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


Question: What are the official names of cities that have not hosted a farm competition?

SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)

What are the official names of cities that have not hosted a farm competition ?

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


Question: What are the codes of types of documents of which there are for or more?

SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4

What are the codes of types of documents of which there are for or more ?

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


Question: List the company name and rank for all companies in the decreasing order of their sales.

SELECT company ,  rank FROM company ORDER BY Sales_billion DESC

List the company name and rank for all companies in the decreasing order of their sales .

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


Question: What are the names and total rental hours for each vehicle?

SELECT T2.name ,  sum(T1.total_hours) FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T2.id

What are the names and total rental hours for each vehicle ?

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


Question: List down the titles of the top 3 episodes, from highest to lowest, in terms of their weighted stars.

SELECT T2.title FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id WHERE T1.stars BETWEEN 1 AND 10 GROUP BY T2.title ORDER BY CAST(SUM(T1.stars * T1.percent) AS REAL) / 100 DESC LIMIT 3

List down the titles of the top 3 episodes , from highest to lowest , in terms of their weighted stars .

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


Question: What are the names of enzymes that include the string 'ALA'?

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

What are the names of enzymes that include the string ' ALA ' ?

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


Question: List down the business ID with a low review count in Phoenix.

SELECT business_id FROM Business WHERE city LIKE 'Phoenix' AND review_count LIKE 'Low'

List down the business ID with a low review count in Phoenix .

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


Question: User No. 70271 only has given one tip to the Yelp business, which category was that business belonged to?

SELECT T4.category_name FROM Tips AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.user_id = 70271

User No . 70271 only has given one tip to the Yelp business , which category was that business belonged to ?

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


Question: How many dishes are there in total in the menus with the name "Waldorf Astoria"?

SELECT SUM(CASE WHEN T3.name = 'Waldorf Astoria' THEN 1 ELSE 0 END) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id

How many dishes are there in total in the menus with the name " Waldorf Astoria " ?

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


Question: What is the order price of the book "The Servant Leader" in 2003?

SELECT T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Servant Leader' AND STRFTIME('%Y', T1.publication_date) = '2003'

What is the order price of the book " The Servant Leader " in 2003 ?

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


Question: Find the average unit price for a track.

Find the average unit price for a track .


Question: What is the age of the oldest active user that participated in the event held on 5/6/2016 at coordinates 121, 31?

SELECT T3.age FROM app_events AS T1 INNER JOIN events_relevant AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.device_id = T3.device_id WHERE T1.is_active = 1 AND T2.longitude = 121 AND T2.latitude = 31 AND SUBSTR(T2.timestamp, 1, 10) = '2016-05-06' ORDER BY T3.age DESC LIMIT 1

What is the age of the oldest active user that participated in the event held on 5/6/2016 at coordinates 121 , 31 ?

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


Question: Give the number of solutions that the repository which has 3060 Stars contains.

SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 3060

Give the number of solutions that the repository which has 3060 Stars contains .

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


Question: Compute the average percentage of female students.

SELECT AVG(pct_female_students) FROM university_year

Compute the average percentage of female students .


Question: Find the name of the department which has the highest average salary of professors.

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

Find the name of the department which has the highest average salary of professors .

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


Question: Which client issued his/her card in 1994/3/3, give his/her client id.

SELECT T2.client_id FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T3.issued = '1994-03-03'

Which client issued his / her card in 1994/3/3 , give his / her client i d.

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


Question: List the codes and descriptions for all process status.

SELECT process_status_code ,  process_status_description FROM Process_status

List the codes and descriptions for all process status .


Question: Please name three cities that belong to Algeria.

SELECT T2.city FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'Algeria'

Please name three cities that belong to Algeria .


Question: What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre?

SELECT f_id FROM song WHERE resolution  >  (SELECT avg(resolution) FROM song WHERE genre_is  =  "modern")

What is ids of the songs whose resolution is higher than the average resolution of songs in modern genre ?

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


Question: Tell the origin country of car no.382.

SELECT DISTINCT T2.country FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin WHERE T1.ID = 382


Question: How many interactions did Lorri Simons have with medical professionals between 2010 and 2017? What percentage of encounters are attributed to prenatal visits?

SELECT COUNT(T1.patient) , CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Prenatal visit' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Lorri' AND T1.last = 'Simonis' AND strftime('%Y', T2.DATE) BETWEEN '2010' AND '2017'

How many interactions did Lorri Simons have with medical professionals between 2010 and 2017 ? What percentage of encounters are attributed to prenatal visits ?

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