Question: What is the id of the bike that traveled the most in 94002?

SELECT bike_id FROM trip WHERE zip_code  =  94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1

What is the i d of the bike that traveled the most in 94002 ?

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


Question: Which actor voices Akela from The Jungle Book?

SELECT `voice-actor` FROM `voice-actors` WHERE character = 'Akela'

Which actor voices Akela from The Jungle Book ?

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


Question: What is the salary and position of the employee named Turanga Leela?

SELECT Salary ,  POSITION FROM Employee WHERE Name  =  "Turanga Leela";

What is the salary and position of the employee named Turanga Leela ?

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


Question: Find the common personal name of course authors and students.

SELECT personal_name FROM Course_Authors_and_Tutors INTERSECT SELECT personal_name FROM Students

Find the common personal name of course authors and students .

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


Question: What are the average profits of companies?

SELECT avg(Profits_billion) FROM Companies

What are the average profits of companies ?


Question: Find the ids of the departments where any manager is managing 4 or more employees.

SELECT DISTINCT department_id FROM employees GROUP BY department_id ,  manager_id HAVING COUNT(employee_id)  >= 4

Find the ids of the departments where any manager is managing 4 or more employees .

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


Question: What is the average satisfying degree of the course Machine Learning Theory?

SELECT CAST(SUM(T1.sat) AS REAL) / COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T2.name = 'Machine Learning Theory'

What is the average satisfying degree of the course Machine Learning Theory ?

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


Question: in which year costela01 obtained the best balance of games won as a coach?

SELECT year FROM coaches WHERE coachID = 'costela01' ORDER BY CAST(won AS REAL) / (won + lost) DESC LIMIT 1

in which year costela01 obtained the best balance of games won as a coach ?

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


Question: How many captains are in each rank?

SELECT count(*) ,  rank FROM captain GROUP BY rank


Question: What are the names of projects that require between 100 and 300 hours?

SELECT name FROM projects WHERE hours BETWEEN 100 AND 300

What are the names of projects that require between 100 and 300 hours ?

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


Question: List the name of superheroes with flight power.

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Flight'

List the name of superheroes with flight power .


Question: Find the location and all games score of the school that has Clemson as its team name.

SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson'

Find the location and all games score of the school that has Clemson as its team name .

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


Question: Sum up the number of business with "ambience_romantic" attribute.

SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'ambience_romantic' AND T2.attribute_value = 'true'

Sum up the number of business with " ambience_romantic " attribute .

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


Question: Count the number of distinct governors.

SELECT count(DISTINCT Governor) FROM party

Count the number of distinct governors .


Question: Show the reign and days held of wrestlers.

Show the reign and days held of wrestlers .

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


Question: What is all the information about pilots who are younger than 30 ?

select * from pilotskills where age  <  30

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


Question: Please list the departments that are part of the Executive General and Administration group.

SELECT Name FROM Department WHERE GroupName = 'Executive General and Administration'

Please list the departments that are part of the Executive General and Administration group .

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


Question: How many different status codes of things are there?

SELECT count(DISTINCT Status_of_Thing_Code) FROM Timed_Status_of_Things

How many different status codes of things are there ?

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


Question: List all shipment ids for the planet Mars.

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID WHERE T2.Name  =  "Mars";

List all shipment ids for the planet Mars .

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


Question: List the eateries' names and addresses which had reinspection on 2nd February, 2015.

SELECT T2.name, T2.address FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.`date` = '2015-02-02' AND T1.type = 'Reinspection/Followup'

List the eateries ' names and addresses which had reinspection on 2nd February , 2015 .

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


Question: Find the name and budget of departments whose budgets are more than the average budget.

SELECT dept_name ,  budget FROM department WHERE budget  >  (SELECT avg(budget) FROM department)

Find the name and budget of departments whose budgets are more than the average budget .

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


Question: What is the highest average rating for action movies made in the USA?

SELECT AVG(T2.rating) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid INNER JOIN movies2directors AS T3 ON T1.movieid = T3.movieid WHERE T1.country = 'USA' AND T3.genre = 'Action' GROUP BY T1.movieid ORDER BY AVG(T2.rating) DESC LIMIT 1

What is the highest average rating for action movies made in the USA ?

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


Question: Indicate which is the word that is repeated the most times.

SELECT word FROM words WHERE occurrences = ( SELECT MAX(occurrences) FROM words )

Indicate which is the word that is repeated the most times .


Question: Count the number of artists who are older than 46 and joined after 1990.

SELECT count(*) FROM artist WHERE age  >  46 AND year_join  >  1990

Count the number of artists who are older than 46 and joined after 1990 .

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


Question: What is the average salary of employees who have a commission percentage that is not null?

SELECT department_id ,  AVG(salary) FROM employees WHERE commission_pct != "null" GROUP BY department_id

What is the average salary of employees who have a commission percentage that is not null ?

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


Question: Which race has the shortest actual finishing time? Please give the name and year.

SELECT T1.name, T1.year FROM races AS T1 INNER JOIN results AS T2 on T1.raceId = T2.raceId WHERE T2.milliseconds IS NOT NULL ORDER BY T2.milliseconds LIMIT 1

Which race has the shortest actual finishing time ? Please give the name and year .

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


Question: Provide the character name, paragraph number, and plain text of "cousin to the king" description.

SELECT T1.CharName, T2.ParagraphNum, T2.PlainText FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.Description = 'cousin to the king'

Provide the character name , paragraph number , and plain text of " cousin to the king " description .

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


Question: What are the categories of businesses that have opening time on Sunday?

SELECT DISTINCT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T2.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T4.day_of_week = 'Sunday' AND T3.opening_time <> ''

What are the categories of businesses that have opening time on Sunday ?

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


Question: Please provide the full name of the away team that scored the most goals.

SELECT t2.team_long_name FROM Match AS t1 INNER JOIN Team AS t2 ON t1.away_team_api_id = t2.team_api_id ORDER BY t1.away_team_goal DESC LIMIT 1

Please provide the full name of the away team that scored the most goals .

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


Question: From 2010 to 2015, what was the average overall rating of players who are higher than 170?

SELECT CAST(SUM(t2.overall_rating) AS REAL) / COUNT(t2.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 170 AND STRFTIME('%Y',t2.`date`) >= '2010' AND STRFTIME('%Y',t2.`date`) <= '2015'

From 2010 to 2015 , what was the average overall rating of players who are higher than 170 ?

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


Question: How many students have the highest intelligence among those taking a bachelor's degree?

SELECT COUNT(student_id) FROM student WHERE type = 'UG' AND intelligence = ( SELECT MAX(intelligence) FROM student )

How many students have the highest intelligence among those taking a bachelor 's degree ?

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


Question: List all the states in the South region.

SELECT state FROM state WHERE Region = 'South'

List all the states in the South region .


Question: What are the headquarters and industries of all companies?

SELECT Headquarters ,  Industry FROM company

What are the headquarters and industries of all companies ?


Question: What is the affiliation of the author writing in the journal 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'?

SELECT T1.Affiliation FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'A combined search for the standard model Higgs boson at s = 1.96 Â TeV'

What is the affiliation of the author writing in the journal ' A combined search for the standard model Higgs boson at s = 1.96 Â TeV ' ?

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


Question: What is the address of the restaurant Subway?

SELECT Address FROM Restaurant WHERE ResName = "Subway";

What is the address of the restaurant Subway ?


Question: How many students are enrolled in college?

How many students are enrolled in college ?


Question: How much is the price of menu with image ID 4000009194?

SELECT T3.price FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id WHERE T2.image_id = 4000009194

How much is the price of menu with image ID 4000009194 ?

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


Question: List the air carrier's description with arrival time lower than the 40% of the average arrival time of flights that flew to Phoenix.

SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'PHX' AND T2.ARR_TIME < ( SELECT AVG(ARR_TIME) * 0.4 FROM Airlines ) GROUP BY T1.Description

List the air carrier 's description with arrival time lower than the 40 % of the average arrival time of flights that flew to Phoenix .

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


Question: State the year and title of papers written by Barrasa.

SELECT T1.Year, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Barrasa'

State the year and title of papers written by Barrasa .

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


Question: Among the shipments to a customer from Texas, what percentage of the shipments shipped in 2017?

SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.ship_date) = '2017' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'TX'

Among the shipments to a customer from Texas , what percentage of the shipments shipped in 2017 ?

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


Question: Find the number of rooms for each bed type.

SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;

Find the number of rooms for each bed type .


Question: Find the id and name of the channel that is not directed by Hank Baskett.

SELECT t1.name ,  t1.channel_id FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id  =  t2.channel_id JOIN director AS t3 ON t2.director_id  =  t3.director_id WHERE t3.name != "Hank Baskett"

Find the i d and name of the channel that is not directed by Hank Baskett .

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


Question: For the orders with any produts, how many products does each orders contain ? List the order id, status and the number.

SELECT T1.order_id ,  T1.order_status_code ,  count(*) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id

For the orders with any produts , how many products does each orders contain ? List the order i d , status and the number .

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


Question: For the owner user of post No. 65041, what is his/her reputation points?

SELECT T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Id = 65041

For the owner user of post No . 65041 , what is his / her reputation points ?

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


Question: How many courses are provided in each semester and year?

SELECT count(*) ,  semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR

How many courses are provided in each semester and year ?


Question: How many patients have the most prevalent conditions?

SELECT COUNT(DISTINCT T2.patient) FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON lower(T1.ITEM) = lower(T2.DESCRIPTION) ORDER BY T1."PREVALENCE RATE" DESC LIMIT 1

How many patients have the most prevalent conditions ?


Question: What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg? List the names of the movies and their corresponding popularity.

SELECT movie_title, movie_popularity FROM movies WHERE movie_release_year = 2021 AND director_name = 'Steven Spielberg'

What are the movie popularity of the movies released in 2021 that were directed by Steven Spielberg ? List the names of the movies and their corresponding popularity .

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


Question: Show the company of the tallest entrepreneur.

SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Height DESC LIMIT 1

Show the company of the tallest entrepreneur .


Question: Who are the owners of the programs that broadcast both in the morning and at night?

SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Night"

Who are the owners of the programs that broadcast both in the morning and at night ?

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


Question: What is the name of the artist who produced the shortest song?

SELECT T1.artist_name FROM song AS T1 JOIN files AS T2 ON T1.f_id  =  T2.f_id ORDER BY T2.duration LIMIT 1

What is the name of the artist who produced the shortest song ?


Question: Find the parties associated with the delegates from district 1 or 2. Who served as comptrollers of the parties?

SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2

Find the parties associated with the delegates from district 1 or 2 . Who served as comptrollers of the parties ?

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


Question: What are the names of the songs whose rating is below the rating of all songs in English?

SELECT song_name FROM song WHERE rating  <   (SELECT min(rating) FROM song WHERE languages  =  'english')

What are the names of the songs whose rating is below the rating of all songs in English ?

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


Question: List the name of students that have attended more than 7 events.

SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN attendance AS T2 ON T1.member_id = T2.link_to_member GROUP BY T2.link_to_member HAVING COUNT(T2.link_to_event) > 7

List the name of students that have attended more than 7 events .

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


Question: How many matches were held at the venue named "Newlands"?

SELECT SUM(CASE WHEN T2.Venue_Name = 'Newlands' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id

How many matches were held at the venue named " Newlands " ?

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


Question: Among all the citation, what is the percentage of paper ID under the Agents classification?

SELECT CAST(COUNT(CASE WHEN class_label = 'Agents' THEN paper_id ELSE NULL END) AS REAL) * 100 / COUNT(paper_id) FROM paper

Among all the citation , what is the percentage of paper ID under the Agents classification ?

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


Question: What is the percentage of subject who are female used the Vehicle as weapon?

SELECT CAST(SUM(T1.subject_weapon = 'Vehicle') AS REAL) * 100 / COUNT(T1.case_number) FROM incidents T1 INNER JOIN subjects T2 ON T1.case_number = T2.case_number WHERE T2.gender = 'F'

What is the percentage of subject who are female used the Vehicle as weapon ?

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


Question: What is the rank, company, and market value of every comapny in the banking industry ordered by sales and profits?

SELECT rank ,  company ,  market_value FROM company WHERE main_industry  =  'Banking' ORDER BY sales_billion ,  profits_billion

What is the rank , company , and market value of every comapny in the banking industry ordered by sales and profits ?

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


Question: How many users answered "Yes" to the question "Have you had a mental health disorder in the past?" in 3 consecutive years starting from 2016?

SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID IN (2016, 2017, 2018) AND T1.questiontext LIKE 'Have you had a mental health disorder in the past?' AND T2.AnswerText = 'Yes'

How many users answered " Yes " to the question " Have you had a mental health disorder in the past ? " in 3 consecutive years starting from 2016 ?

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


Question: List out the id number of client who choose statement of issuance after transaction are Disponent?

SELECT T2.client_id FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T1.frequency = 'POPLATEK PO OBRATU' AND T2.type = 'DISPONENT'

List out the i d number of client who choose statement of issuance after transaction are Disponent ?

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


Question: Find the name of the airport in the city of Goroka.

SELECT name FROM airports WHERE city  =  'Goroka'

Find the name of the airport in the city of Goroka .

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


Question: List the name of all New Zealand umpires.

SELECT T1.Umpire_Name FROM Umpire AS T1 INNER JOIN Country AS T2 ON T1.Umpire_Country = T2.Country_Id WHERE T2.Country_Name = 'New Zealand'

List the name of all New Zealand umpires .


Question: Who is the author of the document with id 4?

SELECT author_name FROM Documents WHERE document_id  =  4

Who is the author of the document with i d 4 ?

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


Question: Show the number of transactions with transaction type code "SALE" for different investors if it is larger than 0.

SELECT investor_id ,  COUNT(*) FROM TRANSACTIONS WHERE transaction_type_code  =  "SALE" GROUP BY investor_id

Show the number of transactions with transaction type code " SALE " for different investors if it is larger than 0 .

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


Question: Count the number of departments which offer courses.

SELECT count(DISTINCT dept_name) FROM course

Count the number of departments which offer courses .


Question: Show all game ids and the number of hours played.

SELECT gameid ,  sum(hours_played) FROM Plays_games GROUP BY gameid

Show all game ids and the number of hours played .

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


Question: What are the naems of all the projects, and how many scientists were assigned to each of them?

SELECT count(*) ,  T1.name FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T1.name

What are the naems of all the projects , and how many scientists were assigned to each of them ?

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


Question: For which product was there a problem reported by Christop Berge, with closure authorised by Ashley Medhurst? Return the product ids.

SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley" AND T2.staff_last_name = "Medhurst"

For which product was there a problem reported by Christop Berge , with closure authorised by Ashley Medhurst ? Return the product ids .

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


Question: Among the English comedy movies produced in the UK, how many movies with a running time of 3 was rated the highest by users between the age 45-50? Indicate the movie names.

SELECT DISTINCT T1.movieid FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid INNER JOIN u2base AS T3 ON T1.movieid = T3.movieid INNER JOIN users AS T4 ON T3.userid = T4.userid WHERE T1.country = 'UK' AND T2.genre = 'Comedy' AND T1.runningtime = 3 AND T3.rating = 5 AND T4.age BETWEEN 45 AND 50 AND T1.isEnglish = 'T'

Among the English comedy movies produced in the UK , how many movies with a running time of 3 was rated the highest by users between the age 45 - 50 ? Indicate the movie names .

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


Question: Please list the title of games with platforms that have market district in Asia or USA.

SELECT T1.Title FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID  =  T2.Platform_ID WHERE T2.Market_district  =  "Asia" OR T2.Market_district  =  "USA"

Please list the title of games with platforms that have market district in Asia or USA .

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


Question: What are the names of the tracks that are Rock or Jazz songs?

SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"

What are the names of the tracks that are Rock or Jazz songs ?

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


Question: Please list the capital cities of the countries with an inflation rate under 2.

SELECT T1.Capital FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T2.Inflation < 2

Please list the capital cities of the countries with an inflation rate under 2 .

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


Question: Name the coin and date of transactions with the greatest decline in percent change in 1 hour.

SELECT T1.name, T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.percent_change_1h = ( SELECT MIN(percent_change_1h) FROM historical )

Name the coin and date of transactions with the greatest decline in percent change in 1 hour .

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


Question: What proportion of single bonds are carcinogenic? Please provide your answer as a percentage with five decimal places.

SELECT ROUND(CAST(COUNT(CASE WHEN T2.label = '+' THEN T1.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T1.bond_id),5) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '-'

What proportion of single bonds are carcinogenic ? Please provide your answer as a percentage with five decimal places .

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


Question: What is the name of the supplier number 1492?

SELECT NAME FROM Vendor WHERE BusinessEntityID = 1492

What is the name of the supplier number 1492 ?


Question: What is the product ID of the most frequently ordered item on invoices?

SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1

What is the product ID of the most frequently ordered item on invoices ?

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


Question: What are all the details of the organisations described as 'Sponsor'? Sort the result in an ascending order.

SELECT organisation_details FROM Organisations AS T1 JOIN organisation_Types AS T2 ON T1.organisation_type  =  T2.organisation_type WHERE T2.organisation_type_description  =  'Sponsor' ORDER BY organisation_details

What are all the details of the organisations described as ' Sponsor ' ? Sort the result in an ascending order .

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


Question: What are the names of cities with at least three students?

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

What are the names of cities with at least three students ?


Question: What is the weight in kilograms of the player with the highest number of goal differential of all time?

SELECT T3.weight_in_kg FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T2.weight = T3.weight_id ORDER BY T1.PLUSMINUS DESC LIMIT 1

What is the weight in kilograms of the player with the highest number of goal differential of all time ?

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


Question: What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns?

SELECT DISTINCT T1.first_name ,  T1.last_name FROM staff AS T1 JOIN rental AS T2 ON T1.staff_id  =  T2.staff_id JOIN customer AS T3 ON T2.customer_id  =  T3.customer_id WHERE T3.first_name  =  'APRIL' AND T3.last_name  =  'BURNS'

What is the full name of the staff member who has rented a film to a customer with the first name April and the last name Burns ?

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


Question: What is the title of the films in which Cuba Allen acted?

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

What is the title of the films in which Cuba Allen acted ?

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


Question: What is the title of the course that is a prerequisite for Mobile Computing?

SELECT title FROM course WHERE course_id IN (SELECT T1.prereq_id FROM prereq AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.title  =  'Mobile Computing')

What is the title of the course that is a prerequisite for Mobile Computing ?

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


Question: Find the titles of papers whose first author is affiliated with an institution in the country "Japan" and has last name "Ohori"?

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"

Find the titles of papers whose first author is affiliated with an institution in the country " Japan " and has last name " Ohori " ?

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


Question: Which actor acted in the most films?

SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, SUM(T1.film_id) AS num FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1


Question: Count the active businesses that has an attribute of BYOB with high review count.

SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T3.attribute_name = 'BYOB' AND T1.review_count = 'High' AND T1.active = 'true'

Count the active businesses that has an attribute of BYOB with high review count .

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


Question: What is the name of the ship that is commanded by the youngest captain?

SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id ORDER BY t2.age LIMIT 1

What is the name of the ship that is commanded by the youngest captain ?

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


Question: Show the client names and their total amounts of books ordered.

SELECT T2.name ,  sum(T3.amount) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient JOIN Books_Order AS T3 ON T3.idOrder  =  T1.idOrder GROUP BY T1.idClient

Show the client names and their total amounts of books ordered .

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


Question: Which city does the school that project "iMath" donated to in?

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

Which city does the school that project " iMath " donated to in ?

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


Question: Please list any three events that happened on the 1st of May 2016 that have the same latitude of 31.

SELECT event_id FROM events WHERE timestamp LIKE '2016-05-01%' AND latitude = 31 LIMIT 3

Please list any three events that happened on the 1st of May 2016 that have the same latitude of 31 .

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


Question: Who were the comptrollers of the parties associated with the delegates from district 1 or district 2?

SELECT T2.Comptroller FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.District  =  1 OR T1.District  =  2

Who were the comptrollers of the parties associated with the delegates from district 1 or district 2 ?

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


Question: What is the total price of all orders from the customer with the phone number "627-220-3983"?

SELECT SUM(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_phone = '627-220-3983'

What is the total price of all orders from the customer with the phone number " 627 - 220 - 3983 " ?

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


Question: Find the name of persons who are friends with Bob.

SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Bob'

Find the name of persons who are friends with Bob .

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


Question: What is the total production of the products from the supplier “Escargots Nouveaux”?

SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Escargots Nouveaux'

What is the total production of the products from the supplier “ Escargots Nouveaux ” ?

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


Question: How many different projects are there?

SELECT count(DISTINCT name) FROM projects


Question: Find the first name, last name and id for the top three players won the most player awards.

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

Find the first name , last name and i d for the top three players won the most player awards .

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


Question: Provide the names of the products with a profit greater than 98% of the average profit of all products in the East region.

SELECT DISTINCT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'East' AND T1.Profit > ( SELECT AVG(Profit) * 0.98 FROM east_superstore )

Provide the names of the products with a profit greater than 98 % of the average profit of all products in the East region .

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


Question: For each classroom report the grade that is taught in it. Report just the classroom number and the grade number.

SELECT DISTINCT classroom ,  grade FROM list

For each classroom report the grade that is taught in it . Report just the classroom number and the grade number .

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


Question: What is the name of the team that won the first ever match?

SELECT T1.Team_Name FROM team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Season_Id = 1 ORDER BY T2.Match_Date LIMIT 1

What is the name of the team that won the first ever match ?

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


Question: Please list the IDs of the orders with a product whose production is not continuous.

SELECT T2.OrderID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1

Please list the IDs of the orders with a product whose production is not continuous .

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


Question: How many songs have vocals of type lead?

SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "lead"

How many songs have vocals of type lead ?

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


Question: How many votes were made in 2010?

SELECT COUNT(id) FROM votes WHERE STRFTIME('%Y', CreationDate) = '2010'


Question: How many pages are there in the "Emil Kuehn" menu?

SELECT SUM(CASE WHEN T1.name = 'Emil Kuehn' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id

How many pages are there in the " Emil Kuehn " menu ?

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


Question: List street names in San Francisco city.

SELECT street_name FROM location WHERE city = 'San Francisco'

List street names in San Francisco city .

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


Question: Identify the cost difference between Priority and Express shipping methods.

SELECT SUM(CASE WHEN method_name = 'Priority' THEN cost ELSE 0 END) - SUM(CASE WHEN method_name = 'Express' THEN cost ELSE 0 END) FROM shipping_method

Identify the cost difference between Priority and Express shipping methods .

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


Question: What are the ids, flavors, and food types of goods, ordered by price?

SELECT id ,  flavor ,  food FROM goods ORDER BY price

What are the ids , flavors , and food types of goods , ordered by price ?

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


Question: What is the percentage of the cost for the meeting events?

SELECT SUM(CASE WHEN T1.type = 'Meeting' THEN T3.cost ELSE 0 END) * 100 / SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget

What is the percentage of the cost for the meeting events ?

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


Question: Show all product ids, product type codes, and product name.

SELECT product_id ,  product_type_code ,  product_name FROM Products

Show all product ids , product type codes , and product name .

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


Question: In Movie No. 19, how many people are there in Department No. 7? Please give me their job.

SELECT COUNT(DISTINCT job) FROM movie_crew WHERE movie_id = 19 AND department_id = 7

In Movie No . 19 , how many people are there in Department No . 7 ? Please give me their job .

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


Question: How many products were not included in any order?

SELECT count(*) FROM products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

How many products were not included in any order ?


Question: List down the owner's name with a zip code 94104.

SELECT DISTINCT owner_name FROM businesses WHERE owner_zip = '94104'

List down the owner 's name with a zip code 94104 .

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


Question: What is the language of the book with ISBN 23755004321?

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

What is the language of the book with ISBN 23755004321 ?

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


Question: Show the number of customers.


Question: List document id of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS.

SELECT document_id FROM Documents WHERE document_status_code  =  "done" AND document_type_code = "Paper" INTERSECT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";

List document i d of documents status is done and document type is Paper and the document is shipped by shipping agent named USPS .

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


Question: How many winners have been awarded a Television award by the "American Bar Association Silver Gavel Awards for Media and the Arts"?

SELECT COUNT(award_id) FROM Award WHERE result = 'Winner' AND award = 'Television' AND organization = 'American Bar Association Silver Gavel Awards for Media and the Arts'

How many winners have been awarded a Television award by the " American Bar Association Silver Gavel Awards for Media and the Arts " ?

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


Question: When did the creator of the list "250 Favourite Films" last updated a movie list?

SELECT T2.list_update_date_utc FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.list_title = '250 Favourite Films' ORDER BY T2.list_update_date_utc DESC LIMIT 1

When did the creator of the list " 250 Favourite Films " last updated a movie list ?

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


Question: Show the statement detail and the corresponding document name for the statement with detail 'Private Project'.

SELECT T1.statement_details ,  T2.document_name FROM Statements AS T1 JOIN Documents AS T2 ON T1.statement_id  =  T2.document_id WHERE T1.statement_details  =  'Private Project'

Show the statement detail and the corresponding document name for the statement with detail ' Private Project ' .

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


Question: Which 3 wineries produce the most wines made from white grapes?

SELECT T2.Winery FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.GRAPE  =  T2.GRAPE WHERE T1.Color  =  "White" GROUP BY T2.Winery ORDER BY count(*) DESC LIMIT 3

Which 3 wineries produce the most wines made from white grapes ?

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


Question: What are the names of body builders whose total score is higher than 300?

SELECT T2.Name FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Total  >  300

What are the names of body builders whose total score is higher than 300 ?

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


Question: What is the average and oldest age for each gender of student?

SELECT avg(age) ,  max(age) ,  sex FROM student GROUP BY sex

What is the average and oldest age for each gender of student ?


Question: List the names and emails of customers who payed by Visa card.

SELECT customer_email ,  customer_name FROM customers WHERE payment_method  =  'Visa'

List the names and emails of customers who payed by Visa card .


Question: Please name any three comedic works.

SELECT Title FROM works WHERE GenreType = 'comedy' LIMIT 3


Question: Which object in image 8 is the widest? State its object sample ID.

SELECT OBJ_SAMPLE_ID FROM IMG_OBJ WHERE IMG_ID = 8 ORDER BY W DESC LIMIT 1

Which object in image 8 is the widest ? State its object sample ID .

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


Question: What is the pay frequency of the oldest employee?

SELECT T1.PayFrequency FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.BirthDate ASC LIMIT 1

What is the pay frequency of the oldest employee ?


Question: Which customers never used any services ? Give me the customer details .

select customer_details from customers where customer_id not in (select customer_id from customers_and_services)

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


Question: List the bond type and the bond ID of the atom 45.

SELECT T1.bond_type, T1.bond_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE SUBSTR(T2.atom_id, 7, 2) = '45'

List the bond type and the bond ID of the atom 45 .

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


Question: How long did it take for bike id 426 to reach 2nd at South Park from Market at 4th on 8/29/2013? Indicate the duration in minutes.

SELECT CAST(duration AS REAL) / 60  FROM trip WHERE bike_id = 426 AND end_station_name = '2nd at South Park' AND start_station_name = 'Market at 4th' AND start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%'

How long did it take for bike i d 426 to reach 2nd at South Park from Market at 4th on 8/29/2013 ? Indicate the duration in minutes .

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


Question: When did all the detentions start?

SELECT datetime_detention_start FROM Detention


Question: How many cities are there in the country with the surface area of 652090?

SELECT T2.Name, COUNT(T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.SurfaceArea = 652090 GROUP BY T2.Name

How many cities are there in the country with the surface area of 652090 ?

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


Question: List all the scientists' names, their projects' names, and the hours worked by that scientist on each project, in alphabetical order of project name, and then scientist name.

SELECT T1.Name ,  T3.Name ,  T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name ,  T1.Name

List all the scientists ' names , their projects ' names , and the hours worked by that scientist on each project , in alphabetical order of project name , and then scientist name .

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


Question: Show all information on the airport that has the largest number of international passengers.

SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1

Show all information on the airport that has the largest number of international passengers .

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


Question: How many penalty minutes did the Montreal Canadiens have on average in the Stanley Cup Finals?

SELECT CAST(SUM(T2.PIM) AS REAL) / COUNT(T2.PIM) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'

How many penalty minutes did the Montreal Canadiens have on average in the Stanley Cup Finals ?

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


Question: How many patients of Irish ethnicity take medication for 'myocardial infarction'?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Myocardial Infarction' AND T1.ethnicity = 'irish'

How many patients of Irish ethnicity take medication for ' myocardial infarction ' ?

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


Question: Return the ids and details of staff who have attended at least 1 meeting and have an s in their staff details?

SELECT staff_id ,  staff_details FROM staff WHERE staff_details LIKE "%s%" GROUP BY staff_id HAVING count(*)  >=  1

Return the ids and details of staff who have attended at least 1 meeting and have an s in their staff details ?

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


Question: Which regions have more than one building? Give me the names of the regions.

SELECT T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID HAVING COUNT(*)  >  1

Which regions have more than one building ? Give me the names of the regions .

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


Question: What platform is the game 3Xtreme available on?

SELECT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = '3Xtreme'

What platform is the game 3Xtreme available on ?


Question: List the codes of all courses that take place in room KLR209.

SELECT class_code FROM CLASS WHERE class_room  =  'KLR209'

List the codes of all courses that take place in room KLR209 .


Question: What is the total money requested by entrepreneurs with height more than 1.85?

SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85

What is the total money requested by entrepreneurs with height more than 1.85 ?

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


Question: What is the  unconverted mana do all the cards created by Rob Alexander cost in total?

SELECT manaCost FROM cards WHERE artist = 'Rob Alexander'

What is the unconverted mana do all the cards created by Rob Alexander cost in total ?

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


Question: What is the batting hand of MK Pandey?

SELECT T2.Batting_hand FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T1.Player_Name = 'MK Pandey'

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


Question: Which state has most number of students?

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

Which state has most number of students ?


Question: List the countries that have more than one mountain.

SELECT Country FROM mountain GROUP BY Country HAVING COUNT(*)  >  1

List the countries that have more than one mountain .


Question: How many movie lists with over 100 movies had user 85981819 created when he or she was a paying subscriber?

SELECT COUNT(*) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 85981819 AND T1.list_movie_number > 100 AND T2.user_has_payment_method = 1

How many movie lists with over 100 movies had user 85981819 created when he or she was a paying subscriber ?

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


Question: What is the current status of the order with the highest shipping cost?

SELECT Status FROM SalesOrderHeader ORDER BY Freight DESC LIMIT 1

What is the current status of the order with the highest shipping cost ?


Question: What are the number of rooms for each bed type?

SELECT bedType ,  count(*) FROM Rooms GROUP BY bedType;

What are the number of rooms for each bed type ?

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


Question: What is the name of all the customers who have ever given a 5-star review?

SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5

What is the name of all the customers who have ever given a 5 - star review ?

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


Question: What is the name of the most expensive car that was produced by the USA?

SELECT T4.car_name FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T3.country = 'USA' ORDER BY T1.price DESC LIMIT 1

What is the name of the most expensive car that was produced by the USA ?

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


Question: List Package Number of all package sent by Leo Wong?

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

List Package Number of all package sent by Leo Wong ?

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


Question: Find the distinct first names of the students who have class senator votes.

SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_Senator_VOTE

Find the distinct first names of the students who have class senator votes .

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


Question: Among the accounts who have approved loan date in 1997, list out the accounts that have the lowest approved amount and choose weekly issuance statement.

SELECT T2.account_id FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1997' AND T2.frequency = 'POPLATEK TYDNE' ORDER BY T1.amount LIMIT 1

Among the accounts who have approved loan date in 1997 , list out the accounts that have the lowest approved amount and choose weekly issuance statement .

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


Question: Return the number of stories for each building in the region named "Abruzzo".

SELECT T1.Number_of_Stories FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID WHERE T2.Name  =  "Abruzzo"

Return the number of stories for each building in the region named " Abruzzo " .

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


Question: Please list all of the contact information for the police district Near West.

SELECT phone, fax, tty, twitter FROM District WHERE district_name = 'Near West'

Please list all of the contact information for the police district Near West .

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


Question: Among the postal points in Texas, provide the zip codes and cities of postal points which have total beneficiaries of above 10000.

SELECT T2.zip_code, T2.city FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Texas' AND T2.total_beneficiaries > 10000

Among the postal points in Texas , provide the zip codes and cities of postal points which have total beneficiaries of above 10000 .

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


Question: How many female students were there at Stanford University in 2011?

SELECT CAST(T1.num_students * T1.pct_female_students AS REAL) / 100 FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Stanford University'

How many female students were there at Stanford University in 2011 ?

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


Question: Find the country of all appelations who have at most three wines.

SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation GROUP BY T2.Appelation HAVING count(*)  <=  3

Find the country of all appelations who have at most three wines .

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


Question: What is detail of collection subset with name 'Top collection'?

SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = "Top collection";

What is detail of collection subset with name ' Top collection ' ?

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


Question: What are the "en" methods with solutions from repository "1093"

SELECT DISTINCT T2.id FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 1093 AND T2.Lang = 'en'

What are the " en " methods with solutions from repository " 1093 "

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


Question: How many items that were shipped via air were returned in 1994?

SELECT COUNT(l_linenumber) FROM lineitem WHERE l_returnflag = 'R' AND l_shipmode = 'AIR' AND STRFTIME('%Y', l_shipdate) = '1994'

How many items that were shipped via air were returned in 1994 ?

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


Question: Return the name and number of reservations made for each of the rooms.

SELECT T2.roomName ,  count(*) ,  T1.Room FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room

Return the name and number of reservations made for each of the rooms .

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


Question: Where is Amy Firth's hometown?

SELECT T2.city, T2.county, T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Amy' AND T1.last_name = 'Firth'


Question: What are the denomination more than one school have?

SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*)  >  1

What are the denomination more than one school have ?


Question: What is the id and salary of the employee named Mark Young?

SELECT eid ,  salary FROM Employee WHERE name  =  'Mark Young'

What is the i d and salary of the employee named Mark Young ?

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


Question: What locations have works painted before 1885 or after 1930?

SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  < 1885 OR YEAR  >  1930

What locations have works painted before 1885 or after 1930 ?

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


Question: What are the case burdens of counties, ordered descending by population?

SELECT Case_burden FROM county_public_safety ORDER BY Population DESC

What are the case burdens of counties , ordered descending by population ?

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


Question: What is the reviewer id of Daniel Lewis?

SELECT rID FROM Reviewer WHERE name  =  "Daniel Lewis"

What is the reviewer i d of Daniel Lewis ?

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


Question: Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle.

SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"

Find the number of students whose city code is NYC and who have class senator votes in the spring election cycle .

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


Question: Find the titles of all movies that have no ratings.

SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)

Find the titles of all movies that have no ratings .

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


Question: What is the total amount of donations in 2012.

SELECT SUM(donation_total) FROM donations WHERE donation_timestamp LIKE '2012%'

What is the total amount of donations in 2012 .


Question: What are the numbers of wines for different grapes?

SELECT count(*) ,  Grape FROM WINE GROUP BY Grape

What are the numbers of wines for different grapes ?


Question: Provide the names of voice actors for the characters of films directed by Wolfgang Reitherman.

SELECT T2.hero, T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T3.name = T2.movie_title WHERE T3.director = 'Wolfgang Reitherman'

Provide the names of voice actors for the characters of films directed by Wolfgang Reitherman .

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


Question: How many boxes are there with each warehouse ?

select warehouse ,  count(*) from boxes group by warehouse


Question: Give the id of the event "Shooting Mixed Skeet".

SELECT id FROM event WHERE event_name = 'Shooting Mixed Skeet'

Give the i d of the event " Shooting Mixed Skeet " .

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


Question: What are the names and addressed of all clients?

What are the names and addressed of all clients ?


Question: How many orders in 1998 had a total price under 950?

SELECT COUNT(o_orderkey) AS countorders FROM orders WHERE STRFTIME('%Y', o_orderdate) = '1998' AND o_totalprice < 950

How many orders in 1998 had a total price under 950 ?

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


Question: How many patients born after 1980/1/1 have an abnormal fibrinogen level?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T1.Birthday > '1980-01-01'

How many patients born after 1980/1/1 have an abnormal fibrinogen level ?

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


Question: Which district has the least area?

SELECT district_name FROM district ORDER BY city_area ASC LIMIT 1


Question: What genres are the games published by 'Agatsuma Entertainment'?

SELECT T4.genre_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T1.publisher_name = 'Agatsuma Entertainment'

What genres are the games published by ' Agatsuma Entertainment ' ?

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


Question: List the names of all songs that have 4 minute duration or are in English.

SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "4:%" UNION SELECT song_name FROM song WHERE languages  =  "english"

List the names of all songs that have 4 minute duration or are in English .

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


Question: Show the minimum, average, maximum price for all products.

SELECT min(product_price) ,  avg(product_price) ,  max(product_price) FROM Products

Show the minimum , average , maximum price for all products .


Question: Which SME customer consumed the least in June 2012?

SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201206' AND T1.Segment = 'SME' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) ASC LIMIT 1

Which SME customer consumed the least in June 2012 ?

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


Question: List the name of ships whose nationality is not "United States".

SELECT Name FROM ship WHERE Nationality != "United States"

List the name of ships whose nationality is not " United States " .

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


Question: Among all universities, how many female students were there in 2011?

SELECT SUM(CAST(num_students * pct_female_students AS REAL) / 100) FROM university_year WHERE year = 2011

Among all universities , how many female students were there in 2011 ?

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


Question: List all the distinct student answer texts to which comments "Normal" were given?

SELECT DISTINCT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal"

List all the distinct student answer texts to which comments " Normal " were given ?

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


Question: How many stars did most of the voters give in star score for the episode Lost Verizon?

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

How many stars did most of the voters give in star score for the episode Lost Verizon ?

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


Question: What are the colors of cards from ID 1-20? What are the format of these cards?

SELECT T1.colors, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.id BETWEEN 1 AND 20

What are the colors of cards from ID 1 - 20 ? What are the format of these cards ?

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


Question: In reviews of product with 5 stars, what is the percentage of the reviews coming from the division of East North Central?

SELECT CAST(SUM(CASE WHEN T1.division = 'East North Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.division) FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5

In reviews of product with 5 stars , what is the percentage of the reviews coming from the division of East North Central ?

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


Question: Find the total number of king beds available.

SELECT sum(beds) FROM Rooms WHERE bedtype  =  'King';

Find the total number of king beds available .


Question: How many reviews does "Planet Money" have?

SELECT COUNT(T2.podcast_id) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Planet Money'

How many reviews does " Planet Money " have ?


Question: List down the business ID with a star range from 3 to 5, located at Chandler.

SELECT business_id FROM Business WHERE stars >= 3 AND stars < 6 AND city = 'Chandler'

List down the business ID with a star range from 3 to 5 , located at Chandler .

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


Question: To whom does Steve Patterson report? Please give his or her full name.

SELECT t2.firstName, t2.lastName FROM employees AS t1 INNER JOIN employees AS t2 ON t2.employeeNumber = t1.reportsTo WHERE t1.firstName = 'Steve' AND t1.lastName = 'Patterson'

To whom does Steve Patterson report ? Please give his or her full name .

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


Question: What is the total actual profit gained from orders made by American customers from 2003-01-06 to 2005-05-09?

SELECT SUM(T2.priceEach - T1.buyPrice) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T3.orderDate > '2003-01-05' AND T3.orderDate < '2005-05-10'

What is the total actual profit gained from orders made by American customers from 2003 - 01 - 06 to 2005 - 05 - 09 ?

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


Question: How many emplyees have a good job performance?

SELECT COUNT(*) FROM employee WHERE performance = 'Good'

How many emplyees have a good job performance ?


Question: Find the names of the clubs that have at least a member from the city with city code "HOU".

SELECT DISTINCT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.city_code  =  "HOU"

Find the names of the clubs that have at least a member from the city with city code " HOU " .

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


Question: What are the order ids of the orders with freight of over 800?

SELECT OrderID FROM Orders WHERE Freight > 800

What are the order ids of the orders with freight of over 800 ?

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


Question: What is the title that have at least 10% royalty without minimum range amount.

SELECT T1.title FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.lorange = 0 AND T2.royalty >= 10

What is the title that have at least 10 % royalty without minimum range amount .

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


Question: What is the total number of senators New Jersey have?

SELECT COUNT(type) FROM `historical-terms` WHERE state = 'NJ' AND type = 'rep'

What is the total number of senators New Jersey have ?


Question: In 1950, how many players whose teams have the losing rate less than 20%?

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE CAST(T3.lost AS REAL) * 100 / (T3.lost + T3.won) < 20

In 1950 , how many players whose teams have the losing rate less than 20 % ?

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


Question: What is the most requested item under the resource type "Supplies" for projects whose main subject area is Literacy & Language?

SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area = 'Literacy & Language' AND T1.project_resource_type = 'Supplies' ORDER BY T1.item_quantity DESC LIMIT 1

What is the most requested item under the resource type " Supplies " for projects whose main subject area is Literacy & Language ?

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


Question: What is the country of the player with the highest earnings among players that have more than 2 win counts?

SELECT Country FROM player WHERE Wins_count  >  2 ORDER BY Earnings DESC LIMIT 1

What is the country of the player with the highest earnings among players that have more than 2 win counts ?

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


Question: State all countries with border greater than 4,000. List the full country name.

SELECT T1.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 WHERE T2.Length > 4000

State all countries with border greater than 4,000 . List the full country name .

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


Question: What are the names of the chairs of festivals, sorted in ascending order of the year held?

SELECT Chair_Name FROM festival_detail ORDER BY YEAR ASC

What are the names of the chairs of festivals , sorted in ascending order of the year held ?

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


Question: What are the models which have not been driven by any drivers?

SELECT model FROM vehicle EXCEPT SELECT T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id

What are the models which have not been driven by any drivers ?


Question: list names of all departments ordered by their names.

SELECT dept_name FROM department ORDER BY dept_name

list names of all departments ordered by their names .


Question: How many sales transactions were given by the customer named Joe L. Lopez?

SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Joe' AND T2.MiddleInitial = 'L' AND T2.LastName = 'Lopez'

How many sales transactions were given by the customer named Joe L. Lopez ?

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


Question: What is the current payrate of Rob Walters? Calculate the percentage increment from his previous payrate.

SELECT T2.Rate , (MAX(T2.Rate) - MIN(T2.Rate)) * 100 / MAX(T2.Rate) FROM Person AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Rob' AND T1.LastName = 'Walters'

What is the current payrate of Rob Walters ? Calculate the percentage increment from his previous payrate .

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


Question: What are the 5 best books in terms of sale amount? Give me their titles and release dates.

SELECT title ,  release_date FROM book ORDER BY sale_amount DESC LIMIT 5

What are the 5 best books in terms of sale amount ? Give me their titles and release dates .

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


Question: Return the name of the document that has the most sections.

SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1

Return the name of the document that has the most sections .

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


Question: Calculate the average period of Mr. Wesley Lemke's care plans.

SELECT CAST(SUM(strftime('%J', T2.STOP) - strftime('%J', T2.START)) AS REAL) / COUNT(T1.patient) FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mr.' AND T1.first = 'Wesley' AND T1.last = 'Lemke'

Calculate the average period of Mr. Wesley Lemke 's care plans .

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


Question: How many images have "keyboard" as their object class?

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

How many images have " keyboard " as their object class ?

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


Question: List the names of all the cast members in the series.

SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.category = 'Cast'

List the names of all the cast members in the series .


Question:
List all the method name of the solution path "graffen_NLog.Targets.Syslog\src\NLog.Targets.Syslog.sln
".

SELECT DISTINCT T2.Name FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'graffen_NLog.Targets.SyslogsrcNLog.Targets.Syslog.sln'

List all the method name of the solution path " graffen_NLog . Targets . Syslog\src\NLog . Targets . Syslog.sln " .

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


Question: Indicates the title of all podcasts in the fiction category.

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

Indicates the title of all podcasts in the fiction category .

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


Question: What is the detailed description of the age category code 'Over 60'?

SELECT age_category_description FROM Ref_Age_Categories WHERE age_category_code  =  'Over 60';

What is the detailed description of the age category code ' Over 60 ' ?

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


Question: Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte? Give me the ids of the problems.

SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  <  ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte" )

Which problems were reported before the date of any problem reported by the staff Lysanne Turcotte ? Give me the ids of the problems .

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


Question: Check the invoices record and compute the average quantities ordered with the payment method "MasterCard".

SELECT avg(Order_Quantity) FROM Invoices WHERE payment_method_code  =  "MasterCard"

Check the invoices record and compute the average quantities ordered with the payment method " MasterCard " .

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


Question: Show the names of products that are in at least two events in ascending alphabetical order of product name.

SELECT T1.Product_Name FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name HAVING COUNT(*)  >=  2 ORDER BY T1.Product_Name

Show the names of products that are in at least two events in ascending alphabetical order of product name .

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


Question: What is the average price for wines not produced in Sonoma county?

SELECT avg(price) FROM wine WHERE Appelation NOT IN (SELECT T1.Appelation FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  'Sonoma')

What is the average price for wines not produced in Sonoma county ?

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


Question: What is the average number of stars that each reviewer awards for a movie?

SELECT T2.name ,  avg(T1.stars) FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T2.name

What is the average number of stars that each reviewer awards for a movie ?

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


Question: Which card name in the set 'Journey into Nyx Hero's Path' has the highest converted mana cost.

SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Journey into Nyx Hero''s Path' ORDER BY T1.convertedManaCost DESC LIMIT 1

Which card name in the set ' Journey into Nyx Hero 's Path ' has the highest converted mana cost .

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


Question: What are the solution path of the tokenized name "matrix multiply"?

SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'matrix multiply'

What are the solution path of the tokenized name " matrix multiply " ?

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


Question: What is the overall rating of the football player Gabriel Tamas in year 2011?

SELECT t2.overall_rating FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Gabriel Tamas' AND strftime('%Y', t2.date) = '2011'

What is the overall rating of the football player Gabriel Tamas in year 2011 ?

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


Question: In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set?

WITH fastest_lap_times AS ( SELECT T1.raceId, T1.FastestLapTime, (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) as time_in_seconds FROM results AS T1 WHERE T1.FastestLapTime IS NOT NULL ) SELECT T2.name FROM races AS T2 INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId INNER JOIN results AS T1 on T2.raceId = T1.raceId INNER JOIN ( SELECT MIN(fastest_lap_times.time_in_seconds) as min_time_in_seconds FROM fastest_lap_times INNER JOIN races AS T2 on fastest_lap_times.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T2.name = 'Austrian Grand Prix') AS T4 ON (CAST(SUBSTR(T1.FastestLapTime, 1, INSTR(T1.FastestLapTime, ':') - 1) AS REAL) * 60) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, ':') + 1, INSTR(T1.FastestLapTime, '.') - INSTR(T1.FastestLapTime, ':') - 1) AS REAL)) + (CAST(SUBSTR(T1.FastestLapTime, INSTR(T1.FastestLapTime, '.') + 1) AS REAL) / 1000) = T4.min_time_in_seconds WHERE T2.name = 'Austrian Grand Prix'

In which Formula_1 race was the lap record for the Austrian Grand Prix Circuit set ?

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


Question: How many reshared tweets are there in Texas?

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.State = 'Texas' AND T1.IsReshare = 'TRUE'

How many reshared tweets are there in Texas ?

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


Question: How many students does KAWA GORDON teaches?

SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "KAWA" AND T2.lastname  =  "GORDON"

How many students does KAWA GORDON teaches ?


Question: Who was the actor that played in the movie "Batman" with the longest screentime?

SELECT T2.Name FROM characters AS T1 INNER JOIN actor AS T2 ON T1.ActorID = T2.ActorID INNER JOIN movie AS T3 ON T3.MovieID = T1.MovieID WHERE T3.Title = 'Batman' ORDER BY T1.screentime DESC LIMIT 1

Who was the actor that played in the movie " Batman " with the longest screentime ?

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


Question: What is the average price of the products being ordered?

SELECT avg(T1.product_price) FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id

What is the average price of the products being ordered ?


Question: Calculate the percentage of medium tip length in the list. List out the time when users of medium tip length join Yelp.

SELECT CAST(SUM(CASE WHEN T1.tip_length = 'Medium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.tip_length), T2.user_yelping_since_year FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id

Calculate the percentage of medium tip length in the list . List out the time when users of medium tip length join Yelp .

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


Question: Which publisher published Barry Eisler's book?

SELECT T4.publisher_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN publisher AS T4 ON T4.publisher_id = T1.publisher_id WHERE T3.author_name = 'Barry Eisler'

Which publisher published Barry Eisler 's book ?

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


Question: How many borderless cards are illustrated in Russian?

SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.borderColor = 'borderless' AND T2.language = 'Russian'

How many borderless cards are illustrated in Russian ?


Question: Calculate the number of female students at Arizona State University in 2014.

SELECT CAST(T2.num_students * T2.pct_female_students AS REAL) / 100 FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'Arizona State University' AND T2.year = 2014

Calculate the number of female students at Arizona State University in 2014 .

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


Question: What proportion of Sub-Saharan Africa's countries have lower middle incomes?

SELECT SUM(CASE WHEN IncomeGroup = 'Lower middle income' THEN 1 ELSE 0 END) * 100.0 / COUNT(CountryCode) persentage FROM Country WHERE Region = 'Sub-Saharan Africa'

What proportion of Sub - Saharan Africa 's countries have lower middle incomes ?

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


Question: In Act 1 Scene 2 of the Twelfth Night, what is the total number of of lines said by Viola?

SELECT COUNT(T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T2.Act = 1 AND T2.Scene = 2 AND T4.id = 1238 AND T4.CharName = 'Viola' AND T1.Title = 'Twelfth Night'

In Act 1 Scene 2 of the Twelfth Night , what is the total number of of lines said by Viola ?

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


Question: What is the highest overall rating received by Dorlan Pabon?

SELECT MAX(t2.overall_rating) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Dorlan Pabon'

What is the highest overall rating received by Dorlan Pabon ?

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


Question: How many solutions contain files found within the repository most people like?

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

How many solutions contain files found within the repository most people like ?


Question: Find the total and average amount paid in claim headers.

SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers

Find the total and average amount paid in claim headers .

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


Question: Compute the average score of the university located in Brazil.

SELECT AVG(T2.score) FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Brazil'

Compute the average score of the university located in Brazil .

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


Question: Provide the institute name with less than 200 graduate cohort of all races and genders in 2013. Also, please state the total number of full-time equivalent undergraduates for the institute.

SELECT T1.chronname, T2.grad_cohort FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T2.gender = 'B' AND T2.race = 'X' AND T2.grad_cohort < 200

Provide the institute name with less than 200 graduate cohort of all races and genders in 2013 . Also , please state the total number of full - time equivalent undergraduates for the institute .

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


Question: What instruments did the musician with the last name "Heilo" play in "Badlands"?

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

What instruments did the musician with the last name " Heilo " play in " Badlands " ?

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


Question: Please include the full name of the patient who received a lung transplant.

SELECT T2.first, T2.last FROM procedures AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Transplant of lung (procedure)'

Please include the full name of the patient who received a lung transplant .

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


Question: What are the id of all the objects belonging to the transportation class?

SELECT OBJ_CLASS_ID FROM OBJ_CLASSES WHERE OBJ_CLASS IN ('bus', 'train', 'aeroplane', 'car', 'etc')

What are the i d of all the objects belonging to the transportation class ?

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


Question: Show all hardware type products in ascending order of price.

SELECT product_name FROM Products WHERE product_type_code  =  "Hardware" ORDER BY product_price ASC

Show all hardware type products in ascending order of price .

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


Question: How many boats are there?


Question: What is the average revenue made by Latin movies?

SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id WHERE T3.language_name = 'Latin'

What is the average revenue made by Latin movies ?


Question: How many airlines are there?


Question: Indicate the patient's full name with the lowest body mass index in kg/m2.

SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Body Mass Index' AND T2.UNITS = 'kg/m2' ORDER BY T2.VALUE LIMIT 1

Indicate the patient 's full name with the lowest body mass index in kg / m2 .

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


Question: What is the average number of reviews of all the root beer brands from "CA" State?

SELECT CAST(COUNT(*) AS REAL) / COUNT(DISTINCT T1.BrandID) AS avgreview FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.State = 'CA'

What is the average number of reviews of all the root beer brands from " CA " State ?

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


Question: How many patients with a normal RF don't have thrombosis?

SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND T1.Thrombosis = 0

How many patients with a normal RF do n't have thrombosis ?


Question: Among students that gave satisfaction of value 4 for the course named "Statistical Learning", how many of them have a gpa of 3.8?

SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Statistical learning' AND T2.sat = 4 AND T1.gpa = 3.8

Among students that gave satisfaction of value 4 for the course named " Statistical Learning " , how many of them have a gpa of 3.8 ?

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


Question: Which locations contains both shops that opened after the year 2012 and shops that opened before 2008?

SELECT LOCATION FROM shop WHERE Open_Year  >  2012 INTERSECT SELECT LOCATION FROM shop WHERE Open_Year  <  2008

Which locations contains both shops that opened after the year 2012 and shops that opened before 2008 ?

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


Question: Show the names of editors of age either 24 or 25.

SELECT Name FROM editor WHERE Age  =  24 OR Age  =  25

Show the names of editors of age either 24 or 25 .

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


Question: What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix?

SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Australian Grand Prix" EXCEPT SELECT T3.forename ,  T3.surname FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid = T3.driverid WHERE T1.name = "Chinese Grand Prix"

What are the first and last names of all drivers who participated in the Australian Grand Prix but not the Chinese Grand Prix ?

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


Question: What is the subset id, name, and number of different documents for each subset?

SELECT T1.Document_Subset_ID ,  T2.Document_Subset_Name , count(DISTINCT T1.Document_Object_ID) FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID =  T2.Document_Subset_ID GROUP BY T1.Document_Subset_ID;

What is the subset i d , name , and number of different documents for each subset ?

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


Question: Count the number of different drivers who have driven vehicles built in 2012.

SELECT count(DISTINCT T1.driver_id) FROM vehicle_driver AS T1 JOIN vehicle AS T2 ON T1.vehicle_id  =  T2.vehicle_id WHERE T2.build_year  =  2012

Count the number of different drivers who have driven vehicles built in 2012 .

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


Question: Which institution is the author "Matthias Blume" belong to? Give me the name of the institution.

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

Which institution is the author " Matthias Blume " belong to ? Give me the name of the institution .

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


Question: Which day in the month of November, 2014 have a foggy weather in the zip code 94301 and in total, how many bikes were borrowed by subscribers from all of the stations in the said day?

SELECT T2.date, COUNT(T1.start_station_name) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '11/%/2014%' AND T2.zip_code = 94301 AND T2.events = 'Fog' AND T1.subscription_type = 'Subscriber'

Which day in the month of November , 2014 have a foggy weather in the zip code 94301 and in total , how many bikes were borrowed by subscribers from all of the stations in the said day ?

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


Question: What is the three most popular goods in this bakery?

SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3

What is the three most popular goods in this bakery ?


Question: How many teachers have made some type of donation for projects in Chicago?

SELECT COUNT(DISTINCT T2.teacher_acctid) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.is_teacher_acct = 't' AND T2.school_city = 'Chicago'

How many teachers have made some type of donation for projects in Chicago ?

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


Question: How many invoices were billed from Chicago, IL?

SELECT COUNT(*) FROM invoices WHERE billing_city  =  "Chicago" AND billing_state  =  "IL";

How many invoices were billed from Chicago , IL ?


Question: What are the accounts that have gold credit cards?

SELECT T2.account_id FROM disp AS T2  INNER JOIN card AS T1 ON T1.disp_id = T2.disp_id  WHERE T1.type = 'gold'

What are the accounts that have gold credit cards ?


Question: How many flights of Alaska Airlines were delayed on 2018/8/2?

SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/2' AND T2.Description = 'Alaska Airlines Inc.: AS' AND T1.DEP_DELAY > 0

How many flights of Alaska Airlines were delayed on 2018/8/2 ?

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


Question: List down the film titles performed by Emily Dee.

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

List down the film titles performed by Emily Dee .

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


Question: How many biword pairs contain the word "base" as the second word?

SELECT COUNT(w1st) FROM biwords WHERE w2nd = ( SELECT wid FROM words WHERE word = 'base' )

How many biword pairs contain the word " base " as the second word ?

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


Question: How old was the oldest employee at the time he or she was hired?

SELECT MAX(TIMESTAMPDIFF(YEAR, BirthDate, HireDate)) FROM Employees

How old was the oldest employee at the time he or she was hired ?

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


Question: What is the start date of the care plan of the patient whose maiden name is Adams?

SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.maiden = 'Adams'

What is the start date of the care plan of the patient whose maiden name is Adams ?

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


Question: What is the age group of users who use phone brand of vivo?

SELECT T1.`group` 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 age group of users who use phone brand of vivo ?

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


Question: Please show the songs that have result "nominated" at music festivals.

SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T1.Result  =  "Nominated"

Please show the songs that have result " nominated " at music festivals .

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


Question: What is the character that won the award in Primetime Emmy 2009?

SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award_category = 'Primetime Emmy' AND T1.year = 2009 AND T1.result = 'Winner';

What is the character that won the award in Primetime Emmy 2009 ?

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


Question: Show the guest first names, start dates, and end dates of all the apartment bookings.

SELECT T2.guest_first_name ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id

Show the guest first names , start dates , and end dates of all the apartment bookings .

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


Question: Find the title and score of the movie with the lowest rating among all movies directed by each director.

SELECT T2.title ,  T1.stars ,  T2.director ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T2.director

Find the title and score of the movie with the lowest rating among all movies directed by each director .

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


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

SELECT product_name FROM Products ORDER BY product_price DESC

List all product names in descending order of price .


Question: Show the name of the shop that have the largest quantity of devices in stock.

SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY SUM(T1.quantity) DESC LIMIT 1

Show the name of the shop that have the largest quantity of devices in stock .

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


Question: Count the total number of apartment bookings.

Count the total number of apartment bookings .


Question: List the movie titles and character names by Bill Thompson.

SELECT movie, character FROM `voice-actors` WHERE 'voice-actor' = 'Bill Thompson'

List the movie titles and character names by Bill Thompson .

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


Question: List the name of all collections.

SELECT Collection_Name FROM Collections;


Question: List the movie titles directed by Jack Kinney.

SELECT name FROM director WHERE director = 'Jack Kinney'

List the movie titles directed by Jack Kinney .


Question: Among the members who incurred expenses in more than one event, who paid the most amount?

SELECT T2.member_id FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN budget AS T3 ON T1.link_to_budget = T3.budget_id INNER JOIN event AS T4 ON T3.link_to_event = T4.event_id GROUP BY T2.member_id HAVING COUNT(DISTINCT T4.event_id) > 1 ORDER BY SUM(T1.cost) DESC LIMIT 1

Among the members who incurred expenses in more than one event , who paid the most amount ?

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


Question: What is the number of sales in region ID 2 with game platform ID 9615?

SELECT T.num_sales * 100000 FROM region_sales AS T WHERE T.region_id = 2 AND T.game_platform_id = 9615

What is the number of sales in region ID 2 with game platform ID 9615 ?

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


Question: How many paragraphs are there in "Ay, surely, mere the truth: I know his lady."?

SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'Ay, surely, mere the truth: I know his lady.'

How many paragraphs are there in " Ay , surely , mere the truth : I know his lady . " ?

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


Question: Which apartment type code appears the most often?

SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1

Which apartment type code appears the most often ?


Question: What is the projected sales quota amount in 2013 and sales YTD amount for sales person with business entity ID 275?

SELECT SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.BusinessEntityID = 275 AND STRFTIME('%Y', QuotaDate) = '2013'

What is the projected sales quota amount in 2013 and sales YTD amount for sales person with business entity ID 275 ?

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


Question: How many official social media does Mark Warner have?

SELECT CASE WHEN T1.facebook IS NOT NULL THEN 1 END + CASE WHEN T1.instagram IS NOT NULL THEN 1 END + CASE WHEN T1.twitter IS NOT NULL THEN 1 END + CASE WHEN T1.youtube IS NOT NULL THEN 1 END AS COUNTSOCIAL FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Mark' AND T2.last_name = 'Warner'

How many official social media does Mark Warner have ?

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


Question: Show ids of students who don't play video game.

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games

Show ids of students who do n't play video game .

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