Question: In children's movies, which was rented the most?

SELECT T.title FROM ( SELECT T4.title, COUNT(T4.title) AS num FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id INNER JOIN film_category AS T5 ON T4.film_id = T5.film_id INNER JOIN category AS T6 ON T5.category_id = T6.category_id WHERE T6.name = 'Children' GROUP BY T4.title ) AS T ORDER BY T.num DESC LIMIT 1

In children 's movies , which was rented the most ?


Question: Which Production Technician has the highest pay rate?

SELECT T1.BusinessEntityID FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' ORDER BY T2.Rate DESC LIMIT 1

Which Production Technician has the highest pay rate ?


Question: In 2020, what were the total orders of all stores in Maricopa County?

SELECT SUM(CASE WHEN T2.County = 'Maricopa County' AND OrderDate LIKE '%/%/20' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID

In 2020 , what were the total orders of all stores in Maricopa County ?

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


Question: Among the crimes in the ward with the most population, how many of them are cases of domestic violence?

SELECT COUNT(T1.ward_no) AS num FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.domestic = 'TRUE' ORDER BY T1.Population = ( SELECT Population FROM Ward ORDER BY Population DESC LIMIT 1 )

Among the crimes in the ward with the most population , how many of them are cases of domestic violence ?

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


Question: How many rooms have not had any reservation yet?

SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)

How many rooms have not had any reservation yet ?


Question: How many patients have diabetes that started in 1988?

SELECT COUNT(PATIENT) FROM conditions WHERE DESCRIPTION = 'Diabetes' AND strftime('%Y', START) = '1988'

How many patients have diabetes that started in 1988 ?

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


Question: What are the names of Hardware product with prices above the average price of Hardware products.

SELECT product_name FROM Products WHERE product_type_code  =  "Hardware" AND product_price  >  (SELECT avg(product_price) FROM Products WHERE product_type_code  =  "Hardware")

What are the names of Hardware product with prices above the average price of Hardware products .

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


Question: What is the name of the sailors who reserved boat with id 103?

SELECT DISTINCT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T2.bid  =  103

What is the name of the sailors who reserved boat with i d 103 ?

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


Question: For the professor who is working with Harrietta Lydford, how is his popularity?

SELECT T1.popularity FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Harrietta' AND T3.l_name = 'Lydford'

For the professor who is working with Harrietta Lydford , how is his popularity ?

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


Question: What is the highest anti-nucleus antibody concentration level of a patient with a normal creatinine level?

SELECT T2.ANA FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID INNER JOIN Laboratory AS T3 ON T1.ID = T3.ID WHERE T3.CRE < 1.5 ORDER BY T2.ANA DESC LIMIT 1

What is the highest anti - nucleus antibody concentration level of a patient with a normal creatinine level ?

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


Question: What is the longitude of the island on which Mount Olympos is located?

SELECT T3.Longitude FROM mountain AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Mountain INNER JOIN island AS T3 ON T3.Name = T2.Island WHERE T1.Name = 'Olympos'

What is the longitude of the island on which Mount Olympos is located ?

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


Question: How many followers does the list created by the user whose user_avatar_image_url is https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214 have?

SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_avatar_image_url = 'https://assets.mubicdn.net/images/avatars/74983/images-w150.jpg?1523895214'

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


Question: List all different genre types.


Question: What are the average enrollment size of the universities that are founded before 1850?

SELECT avg(enrollment) FROM university WHERE founded  <  1850

What are the average enrollment size of the universities that are founded before 1850 ?

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


Question: In year 2000, who are the coaches with more than 50 games won. List the coachID, team name and number of game won at home game.

SELECT T1.coachID, T2.name, T2.won FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 2000 AND T2.won > 50

In year 2000 , who are the coaches with more than 50 games won . List the coachID , team name and number of game won at home game .

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


Question: Please show the most common publication date.

SELECT Publication_Date FROM publication GROUP BY Publication_Date ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common publication date .


Question: Calculate the increment percentage of elite user for each year since year 2005.

SELECT CAST(COUNT(CASE WHEN year_id < 2014 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(CASE WHEN year_id = 2005 THEN 1.0 ELSE NULL END) AS increment FROM Elite

Calculate the increment percentage of elite user for each year since year 2005 .

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


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

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

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

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


Question: For the coach who won Second Team All-Star in 1933, how many wins did he have that year?

SELECT SUM(T1.W) FROM Coaches AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 1933 AND T2.award = 'Second Team All-Star'

For the coach who won Second Team All - Star in 1933 , how many wins did he have that year ?

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


Question: How many products does the company Exotic Liquids supply?

SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids'

How many products does the company Exotic Liquids supply ?

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


Question: Count the number of cities in Canada.

SELECT count(*) FROM City WHERE country  =  "CANADA"


Question: How big is Africa, and how many nations make up the continent?

SELECT T1.Area, COUNT(T3.Name) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T1.Name = 'Asia' GROUP BY T1.Name, T1.Area

How big is Africa , and how many nations make up the continent ?

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


Question: Find the total, average, and maximum capacity for different locations.

SELECT sum(capacity) ,  avg(capacity) ,  max(capacity) ,  LOCATION FROM warehouses GROUP BY LOCATION

Find the total , average , and maximum capacity for different locations .


Question: Please list the names of all the universities in Australia.

SELECT T1.university_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Australia'

Please list the names of all the universities in Australia .


Question: List out the nation of players who played for the 1997-1998 season .

SELECT DISTINCT T2.nation FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998'

List out the nation of players who played for the 1997 - 1998 season .

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


Question: Write down the top ten companies with the most total sales by amount.

SELECT CompanyName FROM `Sales Totals by Amount` ORDER BY SaleAmount DESC LIMIT 10

Write down the top ten companies with the most total sales by amount .

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


Question: Which movie's song title has the highest total gross?

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

Which movie 's song title has the highest total gross ?

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


Question: Show all account ids and account details.

SELECT account_id ,  account_details FROM Accounts

Show all account ids and account details .

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


Question: Find the driver id and number of races of all drivers who have at most participated in 30 races?

SELECT T1.driverid ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  <=  30

Find the driver i d and number of races of all drivers who have at most participated in 30 races ?

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


Question: Which types of policy are chosen by more than 2 customers? Give me the policy type codes.

SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2

Which types of policy are chosen by more than 2 customers ? Give me the policy type codes .

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


Question: Please list the IDs of all the faculty employees who teaches a basic or medium undergraduate course.

SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T1.courseLevel = 'Level_300' AND T3.hasPosition = 'Faculty_eme'

Please list the IDs of all the faculty employees who teaches a basic or medium undergraduate course .

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


Question: What is the name of the plane that is flown the least often?

SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) LIMIT 1

What is the name of the plane that is flown the least often ?


Question: In which regions are the stores that have shipped products through the WARE-UHY1004 warehouse?

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T3.WarehouseCode = 'WARE-UHY1004' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode INNER JOIN `Sales Orders` T3 ON T3._StoreID = T2.StoreID ) WHERE T IS NOT NULL

In which regions are the stores that have shipped products through the WARE - UHY1004 warehouse ?

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


Question: How many different position for players are listed?

SELECT count(DISTINCT POSITION) FROM player

How many different position for players are listed ?


Question: Taking all the essential genes of the transcription factors class located in the nucleus as a reference, how many of them carry out a genetic-type interaction with another gene? List them.

SELECT T2.GeneID1 FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Localization = 'nucleus' AND T1.Class = 'Transcription factors' AND T1.Essential = 'Essential' AND T2.Expression_Corr != 0

Taking all the essential genes of the transcription factors class located in the nucleus as a reference , how many of them carry out a genetic - type interaction with another gene ? List them .

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


Question: What are the names of the reviewers who have rated a movie more than 3 stars before?

SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  >  3

What are the names of the reviewers who have rated a movie more than 3 stars before ?

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


Question: List the toxicology elements associated with molecule TR001.

SELECT DISTINCT T.element FROM atom AS T WHERE T.molecule_id = 'TR001'

List the toxicology elements associated with molecule TR001 .


Question: List down the rating of episodes that were produced by Jason Bikowski.

SELECT T1.rating FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.person = 'Jason Bikowski';

List down the rating of episodes that were produced by Jason Bikowski .

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


Question: What are the first names for students who have an "a" in their first name?

SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'

What are the first names for students who have an " a " in their first name ?

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


Question: What are the different names and credit scores of customers who have taken a loan?

SELECT DISTINCT T1.cust_name ,  T1.credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id

What are the different names and credit scores of customers who have taken a loan ?

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


Question: Which brand in 2012 has the lowest star rating and contains cane sugar as well as honey?

SELECT DISTINCT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.CaneSugar = 'TRUE' AND T1.Honey = 'TRUE' AND T2.StarRating = 1 AND T2.ReviewDate LIKE '2012%'

Which brand in 2012 has the lowest star rating and contains cane sugar as well as honey ?

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


Question: What is the position title for Laura Callahan?

SELECT Title FROM Employees WHERE FirstName = 'Laura' AND LastName = 'Callahan'

What is the position title for Laura Callahan ?


Question: In books authored by Abraham Lincoln, what is the percentage of the books published in 1992?

SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T1.publication_date) = '1992' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Abraham Lincoln'

In books authored by Abraham Lincoln , what is the percentage of the books published in 1992 ?

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


Question: List the basic of the institution in 2012 with race of all male students.

SELECT DISTINCT T1.basic, T2.race FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.year = 2012 AND T2.gender = 'M' AND t2.race = 'X'

List the basic of the institution in 2012 with race of all male students .

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


Question: What is the total home game attendance of team Boston Red Stockings from 2000 to 2010?

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

What is the total home game attendance of team Boston Red Stockings from 2000 to 2010 ?

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


Question: How many actors are there?


Question: Count the number of distinct instructors who have taught a course.

Count the number of distinct instructors who have taught a course .


Question: How many hall of famers both played and coached in the league?

SELECT COUNT(playerID) FROM Master WHERE hofID IS NOT NULL AND playerID IS NOT NULL AND coachID IS NOT NULL

How many hall of famers both played and coached in the league ?


Question: What is the object id of the document objects?

SELECT Document_Object_ID FROM Document_Objects;

What is the object i d of the document objects ?


Question: How many reservations exist for each boat with an id greater than 50?

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

How many reservations exist for each boat with an i d greater than 50 ?

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


Question: For all the transactions happened during 8:00-9:00 in 2012/8/26, how many happened in CZE?

SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-26' AND T1.Time BETWEEN '08:00:00' AND '09:00:00' AND T2.Country = 'CZE'

For all the transactions happened during 8:00 - 9:00 in 2012/8/26 , how many happened in CZE ?

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


Question: List down the match ID of matches that the "man of the match" award was given to BB McCullum.

SELECT T1.Match_Id FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match WHERE T2.Player_Name = 'BB McCullum'

List down the match ID of matches that the " man of the match " award was given to BB McCullum .

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


Question: How many settlements does each claim correspond to? List the claim id and the number of settlements.

SELECT T1.Claim_id ,  count(*) FROM Claims AS T1 JOIN Settlements AS T2 ON T1.claim_id  =  T2.claim_id GROUP BY T1.claim_id

How many settlements does each claim correspond to ? List the claim i d and the number of settlements .

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


Question: For the customer who gave a 3 star rating to Frostie brand on 2014/4/24, did the user permit the company to send regular emails to him/her?

SELECT CASE WHEN T1.SubscribedToEmailList LIKE 'TRUE' THEN 'YES' ELSE 'NO' END AS result FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T2.BrandID = T3.BrandID WHERE T2.StarRating = 3 AND T3.BrandName = 'Frostie' AND T2.ReviewDate = '2014-04-24'

For the customer who gave a 3 star rating to Frostie brand on 2014/4/24 , did the user permit the company to send regular emails to him / her ?

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


Question: Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture?

SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC, T2.Agriculture ASC LIMIT 1

Which of the top 3 economies by GDP has the lowest proportion of the economy devoted to agriculture ?

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


Question: What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007?

SELECT T2.name_first ,  T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2005 AND T3.name = 'Washington Nationals' INTERSECT SELECT T2.name_first , T2.name_last FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id JOIN team AS T3 ON T3.team_id_br = T1.team_id WHERE T1.year = 2007 AND T3.name = 'Washington Nationals'

What are the first name and last name of the players who were paid salary by team Washington Nationals in both 2005 and 2007 ?

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


Question: What are the total points of gymnasts, ordered by their floor exercise points descending?

SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC

What are the total points of gymnasts , ordered by their floor exercise points descending ?

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


Question: Find the day in which the difference between the max temperature and min temperature was the smallest. Also report the difference.

SELECT date ,  max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1

Find the day in which the difference between the max temperature and min temperature was the smallest . Also report the difference .

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


Question: Please show each completion year and the number of buildings completed in that year.

SELECT Completed_Year ,  COUNT(*) FROM building GROUP BY Completed_Year

Please show each completion year and the number of buildings completed in that year .

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


Question: What are the details for all projects that did not hire any staff in a research role?

SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_Staff WHERE role_code  =  'researcher' )

What are the details for all projects that did not hire any staff in a research role ?

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


Question: List down the movie ID of movie with a budget of 15000000 and a rating between 7 to 8.

SELECT MovieID FROM movie WHERE Rating BETWEEN 7 AND 8 AND Budget = 15000000

List down the movie ID of movie with a budget of 15000000 and a rating between 7 to 8 .

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


Question: Please list the names of all the dishes that appeared on the menu "Zentral Theater Terrace".

SELECT T4.name FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace'

Please list the names of all the dishes that appeared on the menu " Zentral Theater Terrace " .

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


Question: Please provide the path of solution of method whose tokenized name is html parser feed.

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'html parser feed'

Please provide the path of solution of method whose tokenized name is html parser feed .

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


Question: What is the revision ID for the page on Catalan titled "Arqueologia"?

SELECT revision FROM pages WHERE lid = 1 AND title = 'Arqueologia'

What is the revision ID for the page on Catalan titled " Arqueologia " ?

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


Question: Give the name of the brands that brewed their first drink between 1996 and 2000 in the descending order of the date brewed.

SELECT BrandName FROM rootbeerbrand WHERE FirstBrewedYear BETWEEN '1996' AND '2000' ORDER BY FirstBrewedYear DESC

Give the name of the brands that brewed their first drink between 1996 and 2000 in the descending order of the date brewed .

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


Question: List out all the players fullname who won the championship in 1970.

SELECT DISTINCT T3.firstName, T3.middleName, T3.lastName FROM series_post AS T1 INNER JOIN players_teams AS T2 ON T1.tmIDWinner = T2.tmID INNER JOIN players AS T3 ON T3.playerID = T2.playerID WHERE T1.year = 1970 AND T1.round = 'F'

List out all the players fullname who won the championship in 1970 .

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


Question: Find the id of Sailors (sid) that reserved red and blue boat.

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

Find the i d of Sailors ( sid ) that reserved red and blue boat .

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


Question: List out the state of driver who transported the shipment id 1055.

SELECT T2.state FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T1.ship_id = '1055'

List out the state of driver who transported the shipment i d 1055 .

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


Question: How many female customers have a junior credit card?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN card AS T3 ON T2.disp_id = T3.disp_id WHERE T1.gender = 'F' AND T3.type = 'junior'

How many female customers have a junior credit card ?


Question: What is the percentage of historical works that have not fewer than five scenes in the 1500s?

SELECT CAST(( SELECT COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'History' AND T1.DATE BETWEEN 1500 AND 1599 GROUP BY T1.id HAVING COUNT(T2.Scene) >= 5 ) AS REAL) * 100 / COUNT(id) FROM works WHERE GenreType = 'History' AND DATE BETWEEN 1500 AND 1599

What is the percentage of historical works that have not fewer than five scenes in the 1500s ?

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


Question: How many integration platforms are successful?

SELECT count(*) FROM integration_platform WHERE integration_platform_details  =  "Success"

How many integration platforms are successful ?


Question: Where is the hometown state for "Sacha Harrison"?

SELECT T2.state FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'

Where is the hometown state for " Sacha Harrison " ?

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


Question: Among the customers from a place with more than 20,000 and less than 30,000 inhabitants, how many of them are Machine-op-inspcts?

SELECT COUNT(T1.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Machine-op-inspct' AND T2.INHABITANTS_K > 20 AND T2.INHABITANTS_K < 30

Among the customers from a place with more than 20,000 and less than 30,000 inhabitants , how many of them are Machine - op - inspcts ?

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


Question: What nations are considered British Overseas Territories?

SELECT name FROM country WHERE CODE IN ( SELECT country FROM politics WHERE government = 'British Overseas Territories' )

What nations are considered British Overseas Territories ?


Question: Name the vendor who has the shortest average lead time for Product ID 319.

SELECT T1.Name FROM Vendor AS T1 INNER JOIN ProductVendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.ProductID = 319 ORDER BY T2.AverageLeadTime LIMIT 1

Name the vendor who has the shortest average lead time for Product ID 319 .

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


Question: What is the employee's last name at 7211 S Hermitage Ave, Chicago, IL?

SELECT last_name FROM employee WHERE address = '7211 S Hermitage Ave' AND city = 'Chicago' AND state = 'IL'

What is the employee 's last name at 7211 S Hermitage Ave , Chicago , IL ?

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


Question: What are the names of the clubs that have players in the position of "Right Wing"?

SELECT T1.name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T2.Position  =  "Right Wing"

What are the names of the clubs that have players in the position of " Right Wing " ?

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


Question: Show the order ids and the number of invoices for each order.

SELECT order_id ,  count(*) FROM Invoices GROUP BY order_id

Show the order ids and the number of invoices for each order .

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


Question: What is the bad alias of the residential area with the highest average house value?

SELECT T2.bad_alias FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T1.avg_house_value = ( SELECT MAX(avg_house_value) FROM zip_data ) LIMIT 1

What is the bad alias of the residential area with the highest average house value ?

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


Question: What are the names of musicals who have at 3 or more actors?

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

What are the names of musicals who have at 3 or more actors ?

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


Question: What is the list of channel details ordered alphabetically ?

select channel_details from channels order by channel_details


Question: Find the headphone models whose price is below the average price.

SELECT model FROM headphone WHERE price  <  (SELECT avg(price) FROM headphone)

Find the headphone models whose price is below the average price .

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


Question: what is the name of every pilot who is at least 25 years old?

SELECT Name FROM pilot WHERE Age  >=  25

what is the name of every pilot who is at least 25 years old ?

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


Question: How many users from the group "F29-32" who were active in the events on 2016/5/7?

SELECT COUNT(T1.app_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.event_id = T3.device_id WHERE SUBSTR(T2.`timestamp`, 1, 10) = '2016-05-07' AND T1.is_active = '1' AND T3.`group` = 'F29-32'

How many users from the group " F29 - 32 " who were active in the events on 2016/5/7 ?

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


Question: What are the distinct nominees of the musicals with the award that is not "Tony Award"?

SELECT DISTINCT Nominee FROM musical WHERE Award != "Tony Award"

What are the distinct nominees of the musicals with the award that is not " Tony Award " ?

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


Question: What are the date, mean temperature and mean humidity for the top 3 days with the largest max gust speeds?

SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3

What are the date , mean temperature and mean humidity for the top 3 days with the largest max gust speeds ?

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


Question: State the title of papers published in the Ibm Journal of Research and Development.

SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Ibm Journal of Research and Development'

State the title of papers published in the Ibm Journal of Research and Development .

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


Question: Show the id of the game platform with the most sales in region 2.

SELECT T1.game_platform_id FROM ( SELECT T.game_platform_id, SUM(T.num_sales) FROM region_sales AS T WHERE T.region_id = 2 GROUP BY T.game_platform_id ORDER BY SUM(T.num_sales) DESC LIMIT 1 ) T1

Show the i d of the game platform with the most sales in region 2 .

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


Question: What is the complete address of the school with the lowest excellence rate? Indicate the Street, City, Zip and State.

SELECT T2.Street, T2.City, T2.State, T2.Zip FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY CAST(T1.NumGE1500 AS REAL) / T1.NumTstTakr ASC LIMIT 1

What is the complete address of the school with the lowest excellence rate ? Indicate the Street , City , Zip and State .

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


Question: Which region has the largest number of buildings? Show me the capital of the region.

SELECT T2.capital FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID ORDER BY COUNT(*) DESC LIMIT 1

Which region has the largest number of buildings ? Show me the capital of the region .

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


Question: Write down the store IDs and region of the state "Michigan".

SELECT DISTINCT T2.StoreID, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.State = 'Michigan'

Write down the store IDs and region of the state " Michigan " .

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


Question: Which winning drivers of races had pole position that is not "Junior Strous"?

SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'

Which winning drivers of races had pole position that is not " Junior Strous " ?

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


Question: What is the last name of sales person for sales id 100?

SELECT T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.SalesID = 100

What is the last name of sales person for sales i d 100 ?

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


Question: Write all the comments left by users who edited the post titled 'Why square the difference instead of taking the absolute value in standard deviation?'

SELECT T2.Comment FROM posts AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.PostId WHERE T1.Title = 'Why square the difference instead of taking the absolute value in standard deviation?'

Write all the comments left by users who edited the post titled ' Why square the difference instead of taking the absolute value in standard deviation ? '

O O O B-COLUMN O O O O O O B-TABLE B-COLUMN 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 O


Question: Calculate the percentage of account from 'Decin' district for all accounts are opened in 1993.

SELECT CAST(SUM(T1.A2 = 'Decin') AS REAL) * 100 / COUNT(account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) = '1993'

Calculate the percentage of account from ' Decin ' district for all accounts are opened in 1993 .

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


Question: Find the titles of the papers the author "Stephanie Weirich" wrote.

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

Find the titles of the papers the author " Stephanie Weirich " wrote .

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


Question: How much does the dish on page 2 of menu ID 12474 cost?

SELECT T1.price FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T2.id = T1.menu_page_id WHERE T2.menu_id = 12474 AND T2.page_number = 2

How much does the dish on page 2 of menu ID 12474 cost ?

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


Question: Show all customer ids and the number of cards owned by each customer.

SELECT customer_id ,  count(*) FROM Customers_cards GROUP BY customer_id

Show all customer ids and the number of cards owned by each customer .

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


Question: What is the average number of Mubi users who love movies directed by Stanley Kubrick?

SELECT AVG(movie_popularity) FROM movies WHERE director_name = 'Stanley Kubrick'

What is the average number of Mubi users who love movies directed by Stanley Kubrick ?

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


Question: On average, how many papers are under the ML class?

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

On average , how many papers are under the ML class ?

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


Question: What is the average number of extra runs made as noballs?

SELECT AVG(T1.Extra_Runs) FROM Extra_Runs AS T1 INNER JOIN Extra_Type AS T2 ON T1.Extra_Type_Id = T2.Extra_Id WHERE T2.Extra_Name = 'noballs'

What is the average number of extra runs made as noballs ?

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


Question: How many different genders are there in the dorms?

How many different genders are there in the dorms ?


Question: Find all manufacturers' names and their headquarters, sorted by the ones with highest revenue first.

SELECT name ,  headquarter FROM manufacturers ORDER BY revenue DESC

Find all manufacturers ' names and their headquarters , sorted by the ones with highest revenue first .

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


Question: How many Japanese constructors have 0 points in 2 races?

SELECT COUNT(T1.raceId) FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.points = 0 AND T2.nationality = 'Japanese' GROUP BY T1.constructorId HAVING COUNT(raceId) = 2

How many Japanese constructors have 0 points in 2 races ?

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


Question: Which state has the most players selected as all stars?

SELECT T1.birthState FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID GROUP BY T1.birthState ORDER BY COUNT(DISTINCT T1.playerID) DESC LIMIT 1

Which state has the most players selected as all stars ?

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


Question: When was the "Adventure Island" game released?

SELECT T3.release_year FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id WHERE T1.game_name = 'Adventure Island'

When was the " Adventure Island " game released ?

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


Question: Between 1/1/2000 to 12/31/2005, how many directly funded schools opened in the county of Stanislaus?

SELECT COUNT(School) FROM schools WHERE strftime('%Y', OpenDate) BETWEEN '2000' AND '2005' AND County = 'Stanislaus' AND FundingType = 'Directly funded'

Between 1/1/2000 to 12/31/2005 , how many directly funded schools opened in the county of Stanislaus ?

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


Question: What is the name of the artist, for each language, that has the most songs with a higher resolution than 500?

SELECT artist_name FROM song WHERE resolution  >  500 GROUP BY languages ORDER BY count(*) DESC LIMIT 1

What is the name of the artist , for each language , that has the most songs with a higher resolution than 500 ?

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


Question: In which cities were the 1976 winter and summer games held?

SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name IN ('1976 Summer', '1976 Winter')

In which cities were the 1976 winter and summer games held ?

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


Question: Which member names are shared among members in the party with the id 3 and the party with the id 1?

SELECT member_name FROM member WHERE party_id  =  3 INTERSECT SELECT member_name FROM member WHERE party_id  =  1

Which member names are shared among members in the party with the i d 3 and the party with the i d 1 ?

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


Question: Show all game names played by at least 1000 hours.

SELECT gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid GROUP BY T1.gameid HAVING sum(hours_played)  >=  1000

Show all game names played by at least 1000 hours .

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


Question: What are the names of the customers who have made two or less orders?

SELECT T2.customer_name FROM orders AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.customer_id HAVING count(*)  <=  2

What are the names of the customers who have made two or less orders ?

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


Question: How many aircrafts do we have?


Question: For corpus title "Atomium", pick 3 words appear in the title and calculate the total occurence of these words.

SELECT T1.word, T1.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.pid = ( SELECT pid FROM pages WHERE title = 'Atomium' ) LIMIT 3

For corpus title " Atomium " , pick 3 words appear in the title and calculate the total occurence of these words .

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


Question: What are the different fates of the mission that involved ships from the United States?

SELECT DISTINCT T1.Fate FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T2.Nationality  =  "United States"

What are the different fates of the mission that involved ships from the United States ?

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


Question: How many colleges has more than 15000 students?

SELECT count(*) FROM College WHERE enr  >  15000

How many colleges has more than 15000 students ?


Question: Find the most important and most difficult courses.

SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )

Find the most important and most difficult courses .


Question: What is the title for the project that got the donation message as "Donation on behalf of Matt Carpenter because I'm a strong believer in education".

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

What is the title for the project that got the donation message as " Donation on behalf of Matt Carpenter because I 'm a strong believer in education " .

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

O O O B-COLUMN O O B-COLUMN O O O B-COLUMN B-TABLE I-TABLE O B-TABLE 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


Question: Which payment method is most comonly used by the schools in the state of Georgia for the payment of donations?

SELECT T1.payment_method FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_state = 'GA' GROUP BY T2.school_state ORDER BY COUNT(T1.payment_method) DESC LIMIT 1

Which payment method is most comonly used by the schools in the state of Georgia for the payment of donations ?

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


Question: Give the average price and case of wines made from Zinfandel grapes in the year 2009.

SELECT AVG(Price) ,  AVG(Cases) FROM WINE WHERE YEAR  =  2009 AND Grape  =  "Zinfandel"

Give the average price and case of wines made from Zinfandel grapes in the year 2009 .

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


Question: What are the order ids and corresponding order dates for orders with a quantity greater than 6 or consisting of more than 3 products?

SELECT T1.order_date ,  T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id WHERE T2.order_quantity  >  6 UNION SELECT T1.order_date ,  T1.order_id FROM Customer_Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >  3;

What are the order ids and corresponding order dates for orders with a quantity greater than 6 or consisting of more than 3 products ?

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


Question: What are the names of the sea that can be found on the island with the biggest area?

SELECT T2.Name FROM islandIn AS T1 INNER JOIN sea AS T2 ON T2.Name = T1.Sea WHERE T1.Island = ( SELECT Name FROM island ORDER BY Area DESC LIMIT 1 )

What are the names of the sea that can be found on the island with the biggest area ?

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


Question: Who is the commanding officer in the district with the highest number of disorderly conduct?

SELECT T1.commander FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T3.title = 'Disorderly Conduct' AND T2.fbi_code_no = 24 GROUP BY T2.fbi_code_no ORDER BY COUNT(T1.district_no) DESC LIMIT 1

Who is the commanding officer in the district with the highest number of disorderly conduct ?

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


Question: What campuses are located in Chico?

SELECT campus FROM campuses WHERE LOCATION  =  "Chico"

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


Question: How many reviews by people between 30 and 50 years include the word 'great'?

SELECT COUNT(T1.Reviews) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.age BETWEEN 30 AND 50 AND T1.Reviews LIKE '%great%'

How many reviews by people between 30 and 50 years include the word ' great ' ?

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


Question: Please list different customer names with the payment amount of over 50,000.

SELECT DISTINCT T2.customerName FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.amount > 50000

Please list different customer names with the payment amount of over 50,000 .

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


Question: How many part supplies were nearly out of stock?

SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10

How many part supplies were nearly out of stock ?


Question: In 2005, which series codes use the International Monetary Fund, Balance of Payments Statistics Yearbook and data files source?

SELECT T1.Seriescode, T2.Source FROM Footnotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T1.Year LIKE '%2005%' AND T2.Source LIKE 'International Monetary Fund%'

In 2005 , which series codes use the International Monetary Fund , Balance of Payments Statistics Yearbook and data files source ?

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


Question: What is the average height of the players from the college named 'Yale University'?

SELECT avg(T1.height) FROM player AS T1 JOIN player_college AS T2 ON T1.player_id  =  T2.player_id JOIN college AS T3 ON T3.college_id  =  T2.college_id WHERE T3.name_full  =  'Yale University';

What is the average height of the players from the college named ' Yale University ' ?

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


Question: Which countries have zip codes with post office boxes?

SELECT DISTINCT county FROM zip_code WHERE type = 'PO Box' AND county IS NOT NULL

Which countries have zip codes with post office boxes ?


Question: Find the headphone classes that contain both headphones using "Bowls" earpads and headphones using "Comfort Pads" earpads.

SELECT CLASS FROM headphone WHERE earpads  =  'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads  =  'Comfort Pads'

Find the headphone classes that contain both headphones using " Bowls " earpads and headphones using " Comfort Pads " earpads .

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


Question: Find the first names of all professors in the Accounting department who is teaching some course and the class room.

SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Accounting'

Find the first names of all professors in the Accounting department who is teaching some course and the class room .

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


Question: What are the drivers' first, last names and id who had more than 8 pit stops or participated in more than 5 race results?

SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  8 UNION SELECT T1.forename ,  T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5

What are the drivers ' first , last names and i d who had more than 8 pit stops or participated in more than 5 race results ?

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


Question: Please show the names and the players of clubs.

SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID

Please show the names and the players of clubs .


Question: Which Yelp_Business in Arizona gets the most number of reviews?

SELECT T1.user_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' GROUP BY T1.user_id ORDER BY COUNT(T1.user_id) DESC LIMIT 1

Which Yelp_Business in Arizona gets the most number of reviews ?

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


Question: What is the zip code of the hosue of the employee named Janessa Sawayn?

SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

What is the zip code of the hosue of the employee named Janessa Sawayn ?

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


Question: What is the primary type of all single female employees hired between 1/1/2008 to 12/31/2008?

SELECT T2.PersonType FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Gender = 'F' AND T1.MaritalStatus = 'S' AND STRFTIME('%Y-%m-%d', T1.HireDate) BETWEEN '2008-1-1' AND '2008-12-31' GROUP BY T2.PersonType ORDER BY COUNT(T2.PersonType) DESC LIMIT 1

What is the primary type of all single female employees hired between 1/1/2008 to 12/31/2008 ?

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


Question: Please list the genre of the movies that are the newest and is in English.

SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 4 AND T1.isEnglish = 'T'

Please list the genre of the movies that are the newest and is in English .

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


Question: What is the surname suffix of the employee who works as a store contact and has the longest sick leave hours?

SELECT T2.Suffix FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' ORDER BY T1.SickLeaveHours DESC LIMIT 1

What is the surname suffix of the employee who works as a store contact and has the longest sick leave hours ?

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


Question: On average, how old are the members in the club "Hopkins Student Enterprises"?

SELECT avg(t3.age) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Hopkins Student Enterprises"

On average , how old are the members in the club " Hopkins Student Enterprises " ?

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


Question: What is the city with the most customers?

SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;

What is the city with the most customers ?


Question: What are the venues and years where Columbia University had papers ?

select distinct t1.venue ,  t1.year from paper as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id join affiliation as t3 on t2.affiliation_id  =  t3.affiliation_id where t3.name = "columbia university"

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


Question: What is the customer names of orders which have unit cost greater than 4000USD?

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.`Unit Cost` > 4000 THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL

What is the customer names of orders which have unit cost greater than 4000USD ?

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


Question: What are the names of players whose training hours is between 500 and 1500?

SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500

What are the names of players whose training hours is between 500 and 1500 ?

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


Question: Find the name and checking balance of the account with the lowest savings balance.

SELECT T1.name ,  T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T3.balance LIMIT 1

Find the name and checking balance of the account with the lowest savings balance .

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


Question: In geographic identifier from 20 to 50, how many of them has a number of inhabitants below 20?

SELECT COUNT(GEOID) FROM Demog WHERE INHABITANTS_K < 20 AND GEOID >= 20 AND GEOID <= 50

In geographic identifier from 20 to 50 , how many of them has a number of inhabitants below 20 ?

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


Question: Where do you have paintings that were created before 1885 that are not on canvas?

SELECT DISTINCT LOCATION FROM paintings WHERE YEAR  <  1885 AND mediumOn != "canvas"

Where do you have paintings that were created before 1885 that are not on canvas ?

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


Question: Which titles has above average royalty rate? Give those title's name, type and price?

SELECT DISTINCT T1.title, T1.type, T1.price FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id WHERE T2.royalty > ( SELECT CAST(SUM(royalty) AS REAL) / COUNT(title_id) FROM roysched )

Which titles has above average royalty rate ? Give those title 's name , type and price ?

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


Question: What is the total number of Afro-Asian people in the most populous Asian country governed by a monarchy?

SELECT T5.Percentage * T6.Population FROM ethnicGroup AS T5 INNER JOIN country AS T6 ON T5.Country = T6.Code WHERE Country = ( SELECT T3.Code FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN politics AS T4 ON T4.Country = T3.Code WHERE T4.Government = 'monarchy' AND T1.Name = 'Asia' ORDER BY T3.Population DESC LIMIT 1 ) AND T5.Name = 'Afro-Asian'

What is the total number of Afro - Asian people in the most populous Asian country governed by a monarchy ?

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


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

SELECT avg(campusfee) FROM csu_fees WHERE YEAR  =  1996

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

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


Question: Among the movies starring Tom Cruise, which one of them has the best quality?

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

Among the movies starring Tom Cruise , which one of them has the best quality ?

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


Question: How many teams have played more than 3800 points and have player with "Most Valuable Player" award?

SELECT COUNT(DISTINCT T4.name) FROM ( SELECT T1.name, SUM(T2.points) FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN awards_players AS T3 ON T2.playerID = T3.playerID WHERE T3.award = 'Most Valuable Player' GROUP BY T1.name HAVING SUM(T2.points) >= 3800 ) AS T4

How many teams have played more than 3800 points and have player with " Most Valuable Player " award ?

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


Question: Find the name of customers who have more than one loan.

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING count(*)  >  1

Find the name of customers who have more than one loan .


Question: What was the average temperature differences during May 2012 for store number 6 and 7?

SELECT ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr AND T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 6 ) - ( SELECT CAST(SUM(tavg) AS REAL) / COUNT(`date`) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` LIKE '%2012-05%' AND T2.store_nbr = 7 )

What was the average temperature differences during May 2012 for store number 6 and 7 ?

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


Question: Find the city the store named "FJA Filming" is in.

SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Store_Name  =  "FJA Filming"

Find the city the store named " FJA Filming " is in .

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


Question: Show the ids of all employees who have either destroyed a document or made an authorization to do this.

SELECT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed UNION SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed

Show the ids of all employees who have either destroyed a document or made an authorization to do this .

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


Question: What are the names of all songs in English?

SELECT song_name FROM song WHERE languages  =  "english"

What are the names of all songs in English ?


Question: For each distinct product name, show its average product price.

SELECT Product_Name ,  avg(Product_Price) FROM PRODUCTS GROUP BY Product_Name

For each distinct product name , show its average product price .

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


Question: What is the total word of title "Adam" and "Acampada"?

SELECT SUM(words) FROM pages WHERE title IN ('Adam', 'Acampada')

What is the total word of title " Adam " and " Acampada " ?

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


Question: Find the name of bank branches that provided some loans.

SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id

Find the name of bank branches that provided some loans .

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


Question: What is the Percent (%) Eligible Free (K-12) in the school administered by an administrator whose first name is Alusine. List the district code of the school.

SELECT T1.`Free Meal Count (K-12)` * 100 / T1.`Enrollment (K-12)`, T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.AdmFName1 = 'Alusine'

What is the Percent ( % ) Eligible Free ( K-12 ) in the school administered by an administrator whose first name is Alusine . List the district code of the school .

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


Question: Name the book title of the bestseller.

SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id GROUP BY T1.title ORDER BY COUNT(T1.title) DESC LIMIT 1


Question: What is the eye clolour of the heaviest superhero?

SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id ORDER BY T1.weight_kg DESC LIMIT 1

What is the eye clolour of the heaviest superhero ?


Question: How many customers are there in Berlin, Germany?

SELECT COUNT(City) FROM Customers WHERE Country = 'Germany' AND City = 'Berlin'

How many customers are there in Berlin , Germany ?


Question: Who played the No.2 character in the credit list of the movie "American Hustle"?

SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'American Hustle' AND T2.creditOrder = '2'

Who played the No.2 character in the credit list of the movie " American Hustle " ?

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


Question: What is the tax source system code related to the benefits and overpayments? List the code and the benifit id, order by benifit id.

SELECT T1.source_system_code ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Benefits_Overpayments AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id ORDER BY T2.council_tax_id

What is the tax source system code related to the benefits and overpayments ? List the code and the benifit i d , order by benifit i d.

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


Question: What are the average prices of goods with blackberry or blueberry flavor?

SELECT avg(price) FROM goods WHERE flavor  =  "Blackberry" OR flavor  =  "Blueberry"

What are the average prices of goods with blackberry or blueberry flavor ?

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


Question: What is the total number of ranking criteria under the ranking system called Shanghai Ranking?

SELECT COUNT(*) FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Shanghai Ranking'

What is the total number of ranking criteria under the ranking system called Shanghai Ranking ?

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


Question: State the final station of bike id 13. Which city was it at?

SELECT T2.end_station_id, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T1.name = T2.end_station_name WHERE T2.bike_id = 13 ORDER BY T2.end_date DESC LIMIT 1

State the final station of bike i d 13 . Which city was it at ?

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


Question: What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape?

SELECT AVG(Price) ,  AVG(Cases) FROM WINE WHERE YEAR  =  2009 AND Grape  =  "Zinfandel"

What are the average prices and cases of wines produced in the year of 2009 and made of Zinfandel grape ?

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


Question: List down the dba name of restaurants that were inspected due to license.

SELECT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T2.inspection_type = 'License'

List down the dba name of restaurants that were inspected due to license .

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


Question: What is the name and age of the pilot younger than 30 who has won the most number of times?

SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot WHERE t1.age  <  30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1

What is the name and age of the pilot younger than 30 who has won the most number of times ?

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


Question: How many product ids have the lowest price?

SELECT COUNT(DISTINCT ProductID) FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )

How many product ids have the lowest price ?


Question: Among the universities in Australia, how many of them have a student staff ratio of over 15 in 2011?

SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Australia' AND T2.student_staff_ratio > 15 AND T2.year = 2011

Among the universities in Australia , how many of them have a student staff ratio of over 15 in 2011 ?

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


Question: Calculate the difference between the number of shipments shipped by the truck with the model year 2005 and model year 2006.

SELECT SUM(CASE WHEN T1.model_year = '2005' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.model_year = '2006' THEN 1 ELSE 0 END) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id

Calculate the difference between the number of shipments shipped by the truck with the model year 2005 and model year 2006 .

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


Question: List different constructors and the number of drivers that use each constructor.

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

List different constructors and the number of drivers that use each constructor .


Question: What are the invoice ids and statuses for invoices without a payment?

SELECT invoice_id ,  invoice_status FROM Invoices EXCEPT SELECT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id

What are the invoice ids and statuses for invoices without a payment ?

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


Question: In which regions are there no African food restaurants?

SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type != 'african'

In which regions are there no African food restaurants ?


Question: How many samples of animal objects are there in image no.660?

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 = 'animal' AND T1.IMG_ID = 660

How many samples of animal objects are there in image no.660 ?

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


Question: List the educationnum and response of customers within the age of 20 to 30 that has the highest number of inhabitants among the group.

SELECT T1.EDUCATIONNUM, T2.RESPONSE FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.age >= 20 AND T1.age <= 30 ORDER BY T3.INHABITANTS_K DESC LIMIT 1

List the educationnum and response of customers within the age of 20 to 30 that has the highest number of inhabitants among the group .

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


Question: Please list top two bonds that happened with the molecule TR006 in alphabetical order.

SELECT DISTINCT T2.bond_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.molecule_id = 'TR006' ORDER BY T2.bond_id LIMIT 2

Please list top two bonds that happened with the molecule TR006 in alphabetical order .

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


Question: List the author's and publisher's name of the book published on July 10, 1997.

SELECT T3.author_name, 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 T1.publication_date = '1997-07-10'

List the author 's and publisher 's name of the book published on July 10 , 1997 .

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


Question: Calculate the total net profit of the store located in highest median income city.

SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 1

Calculate the total net profit of the store located in highest median income city .

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


Question: Find the most common result in the behavioral monitoring details. What are the count and the details of this result?

SELECT count(DISTINCT student_id) ,  behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1

Find the most common result in the behavioral monitoring details . What are the count and the details of this result ?

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


Question: List all the official and unofficial languages used by the country that declared its independence in 1830.

SELECT T2.Language, T2.IsOfficial FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.IndepYear = 1830 GROUP BY T2.Language, T2.IsOfficial

List all the official and unofficial languages used by the country that declared its independence in 1830 .

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


Question: Find the id and rank of the team that has the highest average attendance rate in 2014.

SELECT T2.team_id ,  T2.rank FROM home_game AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id WHERE T1.year  =  2014 GROUP BY T1.team_id ORDER BY avg(T1.attendance) DESC LIMIT 1;

Find the i d and rank of the team that has the highest average attendance rate in 2014 .

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


Question: Indicate the quantity of Blade products sold.

SELECT DISTINCT T2.Quantity FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Blade'

Indicate the quantity of Blade products sold .


Question: How many gold medals has the club with the most coaches won?

SELECT T1.club_id ,  T1.gold FROM match_result AS T1 JOIN coach AS T2 ON T1.club_id  =  T2.club_id GROUP BY T1.club_id ORDER BY count(*) DESC LIMIT 1

How many gold medals has the club with the most coaches won ?

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


Question: Find the name of students who took some course offered by Statistics department.

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

Find the name of students who took some course offered by Statistics department .

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


Question: List the name and cost of all procedures sorted by the cost from the highest to the lowest.

SELECT name ,  cost FROM procedures ORDER BY cost DESC

List the name and cost of all procedures sorted by the cost from the highest to the lowest .

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


Question: What are the average and minimum price (in Euro) of all products?

SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents

What are the average and minimum price ( in Euro ) of all products ?

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


Question: How many percent of LAM customer consumed more than 46.73?

SELECT CAST(SUM(IIF(T2.Consumption > 46.73, 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM'

How many percent of LAM customer consumed more than 46.73 ?

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


Question: How many domestic violence cases were brought in the ward that uses "ward13@cityofchicago.org"?

SELECT SUM(CASE WHEN T2.domestic = 'TRUE' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no WHERE T1.ward_email = 'ward13@cityofchicago.org'

How many domestic violence cases were brought in the ward that uses " ward13@cityofchicago.org " ?

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


Question: How many cyclists did not purchase any bike after year 2015?

SELECT count(*) FROM cyclist WHERE id NOT IN ( SELECT cyclist_id FROM cyclists_own_bikes WHERE purchase_year  >  2015 )

How many cyclists did not purchase any bike after year 2015 ?

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


Question: How many different female users have rated movies from France?

SELECT COUNT(DISTINCT T2.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T3.country = 'France'

How many different female users have rated movies from France ?


Question: Among the race of all students, what is the control of institution and level of institution with highest number of students?

SELECT DISTINCT T1.control, T1.level FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.race = 'X' AND T1.student_count = ( SELECT MAX(T1.student_count) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T2.race = 'X' )

Among the race of all students , what is the control of institution and level of institution with highest number of students ?

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


Question: Which trip had the shortest duration and started at the station that can hold 15 bikes?

SELECT T1.id FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.dock_count = 15 AND T1.duration = ( SELECT MIN(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.dock_count = 15 )

Which trip had the shortest duration and started at the station that can hold 15 bikes ?

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


Question: How many devices are there?


Question: Please list the full names of the employees who are working as a Trainee.

SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'

Please list the full names of the employees who are working as a Trainee .

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


Question: What are the items with chocolate flavor that were purchased at most 10 times.

SELECT DISTINCT T1.item FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Chocolate" GROUP BY item HAVING count(*)  <=  10

What are the items with chocolate flavor that were purchased at most 10 times .

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


Question: What are the shipment IDs of every delivery managed by Phillip J Fry?

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID WHERE T2.Name = "Phillip J. Fry";

What are the shipment IDs of every delivery managed by Phillip J Fry ?

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


Question: Give the names of wines with prices above any wine produced in 2006.

SELECT Name FROM WINE WHERE Price  >  (SELECT max(Price) FROM WINE WHERE YEAR  =  2006)

Give the names of wines with prices above any wine produced in 2006 .

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


Question: How many territory fall into region 1?

SELECT COUNT(TerritoryID) FROM Territories WHERE RegionID = 1


Question: What are the names of the different customers who have taken out a loan, ordered by the total amount that they have taken?

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name ORDER BY sum(T2.amount)

What are the names of the different customers who have taken out a loan , ordered by the total amount that they have taken ?

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


Question: What is the zip code of the district represented by Steven A King?

SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'King' AND T1.last_name = 'Steven A'

What is the zip code of the district represented by Steven A King ?

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


Question: List the full names of customers who have paid more than 10$.

SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.amount > 10


Question: What is the first and last name of all students who are younger than average?

SELECT fname ,  lname FROM student WHERE age  <  (SELECT avg(age) FROM student)

What is the first and last name of all students who are younger than average ?

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


Question: Find the checking balance of the accounts whose savings balance is higher than the average savings balance.

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

Find the checking balance of the accounts whose savings balance is higher than the average savings balance .

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


Question: Please list the names of all the characters played by Tom Cruise.

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

Please list the names of all the characters played by Tom Cruise .

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


Question: How much money did Lucas Mancini spend?

SELECT sum(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T1.id = T2.customer_id WHERE T1.first_name = "Lucas" AND T1.last_name = "Mancini";

How much money did Lucas Mancini spend ?


Question: List the name and location of events that underspend its budget.

SELECT DISTINCT T1.event_name, T1.location FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T2.remaining > 0

List the name and location of events that underspend its budget .

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


Question: What counties are not in the Bay Area Region?

SELECT DISTINCT county FROM geographic WHERE region != 'bay area'

What counties are not in the Bay Area Region ?

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


Question: What is the percentage ratio between positive sentiments and negative sentiments that are in Fate/Grand Order? Also indicate the current version.

SELECT CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Sentiment = 'Negative' THEN 1 ELSE 0 END), T1.`Current Ver` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Fate/Grand Order (English)' AND T1.`Current Ver` = '1.18.0'

What is the percentage ratio between positive sentiments and negative sentiments that are in Fate / Grand Order ? Also indicate the current version .

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


Question: What campus has the most faculties in 2003?

SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2003 ORDER BY T2.faculty DESC LIMIT 1

What campus has the most faculties in 2003 ?


Question: Calculate the average height in centimeter of all players who played in Acadie-Bathurst Titan during regular season.

SELECT CAST(SUM(T1.height_in_cm) AS REAL) / COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height INNER JOIN SeasonStatus AS T3 ON T2.ELITEID = T3.ELITEID WHERE T3.TEAM = 'Acadie-Bathurst Titan' AND T3.GAMETYPE = 'Regular Season'

Calculate the average height in centimeter of all players who played in Acadie - Bathurst Titan during regular season .

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


Question: How many suppliers from Germany have left a comment with 'carefully regular packages'?

SELECT COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T2.n_name = 'GERMANY' AND T1.s_comment LIKE '%carefully regular packages%'

How many suppliers from Germany have left a comment with ' carefully regular packages ' ?

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


Question: What are the names of all stations that have more than 10 bikes available and are not located in San Jose?

SELECT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id GROUP BY T2.station_id HAVING avg(bikes_available)  >  10 EXCEPT SELECT name FROM station WHERE city  =  "San Jose"

What are the names of all stations that have more than 10 bikes available and are not located in San Jose ?

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


Question: Please list the titles of the paper whose authors include Klaus Zimmermann.

SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Klaus Zimmermann'

Please list the titles of the paper whose authors include Klaus Zimmermann .

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


Question: What is the maximum and mininum number of stars a rating can receive?

SELECT max(stars) ,  min(stars) FROM Rating

What is the maximum and mininum number of stars a rating can receive ?

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


Question: List down the name of players who are 35 years old and above.

SELECT player_name FROM Player WHERE CAST((JULIANDAY('now') - JULIANDAY(birthday)) AS REAL) / 365 >= 35

List down the name of players who are 35 years old and above .


Question: Name the most recent movie directed by Chris Buck. Which of his movies was more successful in terms of grossing? Use the current gross for comparison.

SELECT T1.movie_title, MAX(T1.release_date), MAX(T1.inflation_adjusted_gross) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Chris Buck'

Name the most recent movie directed by Chris Buck . Which of his movies was more successful in terms of grossing ? Use the current gross for comparison .

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


Question: Find the number of users who did not write any review.

SELECT count(*) FROM useracct WHERE u_id NOT IN (SELECT u_id FROM review)

Find the number of users who did not write any review .


Question: What is the runtime of the movie starred by Jackie Chan with a rating greater than 7?

SELECT T1.Runtime FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Name = 'Jackie Chan' AND T1.Rating > 7

What is the runtime of the movie starred by Jackie Chan with a rating greater than 7 ?

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


Question: Which student failed the course Intro to Database 2? Please give his or her full name.

SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.grade IS NULL AND T3.name = 'Intro to Database 2'

Which student failed the course Intro to Database 2 ? Please give his or her full name .

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


Question: Which customer come from a place with more inhabitants, customer no.0 or customer no.1?

SELECT T1.ID FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.ID = 0 OR T1.ID = 1 ORDER BY INHABITANTS_K DESC LIMIT 1

Which customer come from a place with more inhabitants , customer no.0 or customer no.1 ?

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


Question: Indicate the name of the country with a population greater than 10000 in 2010.

SELECT DISTINCT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.population_2010 > 10000

Indicate the name of the country with a population greater than 10000 in 2010 .

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


Question: Show all movie titles, years, and directors, ordered by budget.

SELECT title ,  YEAR ,  director FROM movie ORDER BY budget_million

Show all movie titles , years , and directors , ordered by budget .

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


Question: What is the percentage of Forks to Stars of repository for solution "104086"?

SELECT CAST(T1.Forks AS REAL) * 100 / T1.Stars FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 104086

What is the percentage of Forks to Stars of repository for solution " 104086 " ?

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


Question: What is the list ID that was first created by user 85981819?

SELECT list_id FROM lists_users WHERE user_id = 85981819 ORDER BY list_creation_date_utc ASC LIMIT 1

What is the list ID that was first created by user 85981819 ?

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


Question: What is the number of distinct cities the stations are located at?

SELECT count(DISTINCT city) FROM station

What is the number of distinct cities the stations are located at ?


Question: What is the total donation amount made for projects whose main subject area are Literacy & Language?

SELECT SUM(T2.dollar_amount) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.primary_focus_area = 'Literacy & Language'

What is the total donation amount made for projects whose main subject area are Literacy & Language ?

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


Question: What is the class of the product with the most reviews?

SELECT T2.Class FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T2.Class ORDER BY COUNT(T1.ProductReviewID) DESC LIMIT 1

What is the class of the product with the most reviews ?

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


Question: Find the name of the customer that has been involved in the most policies.

SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t2.customer_details ORDER BY count(*) DESC LIMIT 1

Find the name of the customer that has been involved in the most policies .

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


Question: Among the area code 787, list the country of the cities with a postal point type of unique postal office.

SELECT DISTINCT T2.county FROM area_code AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code INNER JOIN zip_data AS T3 ON T1.zip_code = T3.zip_code WHERE T1.area_code = '787' AND T3.type = 'Unique Post Office'

Among the area code 787 , list the country of the cities with a postal point type of unique postal office .

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


Question: In 2015, what percentage of trips that had the subscription type was Customer and ended on a rainy day?

SELECT CAST(SUM(CASE WHEN T2.events = 'Rain' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2015' AND T1.subscription_type = 'Customer'

In 2015 , what percentage of trips that had the subscription type was Customer and ended on a rainy day ?

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


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

SELECT Title FROM book ORDER BY Issues ASC

List the titles of the books in ascending order of issues .

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


Question: What are the different contents of boxes, ordered alphabetically?

SELECT DISTINCT CONTENTS FROM boxes ORDER BY CONTENTS

What are the different contents of boxes , ordered alphabetically ?


Question: List all pilot names in ascending alphabetical order.

SELECT Name FROM pilot ORDER BY Name ASC

List all pilot names in ascending alphabetical order .


Question: What is the weight of the player with the longest time on ice in the player’s first 7 years of NHL career in kilograms?

SELECT T2.weight_in_kg FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.sum_7yr_TOI = ( SELECT MAX(t.sum_7yr_TOI) FROM PlayerInfo t )

What is the weight of the player with the longest time on ice in the player ’s first 7 years of NHL career in kilograms ?

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


Question: Among the Yelp_Businesses in Arizona, how many of them are still running?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'True'

Among the Yelp_Businesses in Arizona , how many of them are still running ?

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


Question: What is the first name and last name of the student who have most number of sports?

SELECT T2.Fname ,  T2.Lname FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID GROUP BY T1.StuID ORDER BY count(*) DESC LIMIT 1

What is the first name and last name of the student who have most number of sports ?

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


Question: List the name of the phone model launched in year 2002 and with the highest RAM size.

SELECT T2.Hardware_Model_name FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T1.Launch_year = 2002 ORDER BY T1.RAM_MiB DESC LIMIT 1;

List the name of the phone model launched in year 2002 and with the highest RAM size .

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


Question: Count the number of actors.


Question: The actor Dan Harris played in a 77 minute film with replacement cost of 9.99, what was the rating for that film?

SELECT T3.rating 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 = 'DAN' AND T1.last_name = 'HARRIS' AND T3.length = 77 AND T3.replacement_cost = '9.99'

The actor Dan Harris played in a 77 minute film with replacement cost of 9.99 , what was the rating for that film ?

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


Question: List all statement ids and statement details.

SELECT STATEMENT_ID ,  statement_details FROM Statements

List all statement ids and statement details .

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


Question: Count the number of films whose title contains the word 'Dummy'.

SELECT count(*) FROM film WHERE title LIKE "%Dummy%"

Count the number of films whose title contains the word ' Dummy ' .

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


Question: How many orders was handled by employees who reported to employee id 5?

SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.ReportsTo = 5

How many orders was handled by employees who reported to employee i d 5 ?

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


Question: Did the project 'I Can't See It...Can You Help Me???' get the tip for the donation?

SELECT T2.donation_included_optional_support FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'I Can''t See It...Can You Help Me???'

Did the project ' I Ca n't See It ... Can You Help Me ? ? ? ' get the tip for the donation ?

O O B-COLUMN 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 O O O O B-TABLE O


Question: List the names and ages of all sailors sorted by rating in descending order.

SELECT name ,  age FROM Sailors ORDER BY rating DESC

List the names and ages of all sailors sorted by rating in descending order .

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


Question: How many action games are there in total?

SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Action'

How many action games are there in total ?


Question: In which Formula_1 race did Lewis Hamilton rank the highest?

SELECT name FROM races WHERE raceId IN ( SELECT raceId FROM results WHERE rank = 1 AND driverId = ( SELECT driverId FROM drivers WHERE forename = 'Lewis' AND surname = 'Hamilton' ) )

In which Formula_1 race did Lewis Hamilton rank the highest ?

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


Question: Calculate the average age of clients whose response is "Closed with relief".

SELECT AVG(T1.age) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Company response to consumer` = 'Closed with relief'

Calculate the average age of clients whose response is " Closed with relief " .

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


Question: Which 4-year private for-profit school in "KY" has the highest graudation 150 value? Give the ID for the school.

SELECT T1.chronname, T1.unitid FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'KY' AND T1.level = '4-year' AND T1.control = 'Private for-profit' GROUP BY T1.chronname ORDER BY SUM(T1.grad_150_value) DESC LIMIT 1

Which 4 - year private for - profit school in " KY " has the highest graudation 150 value ? Give the ID for the school .

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


Question: What are the census rankings of cities that do not have the status "Village"?

SELECT Census_Ranking FROM city WHERE Status !=  "Village"

What are the census rankings of cities that do not have the status " Village " ?

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


Question: What is all the information about employees with D or S in their first name, ordered by salary descending?

SELECT * FROM employees WHERE first_name LIKE '%D%' OR first_name LIKE '%S%' ORDER BY salary DESC

What is all the information about employees with D or S in their first name , ordered by salary descending ?

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


Question: Among the players who have won the All-Rookie award, how many of them have died?

SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.deathYear IS NOT NULL

Among the players who have won the All - Rookie award , how many of them have died ?

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


Question: Find the names of all the tracks that contain the word "you".

SELECT Name FROM TRACK WHERE Name LIKE '%you%'

Find the names of all the tracks that contain the word " you " .

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


Question: Name the director of Disney's lowest grossing movie.

SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name ORDER BY CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) ASC LIMIT 1

Name the director of Disney 's lowest grossing movie .


Question: Please list any three criminal sexual assault cases against persons where the criminals have been arrested.

SELECT T2.case_number FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.title = 'Criminal Sexual Assault' AND T2.arrest = 'TRUE' AND T1.crime_against = 'Persons' LIMIT 3

Please list any three criminal sexual assault cases against persons where the criminals have been arrested .

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


Question: For the player who had the most rebounds throughout his allstar appearances, what was his weight and height?

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

For the player who had the most rebounds throughout his allstar appearances , what was his weight and height ?

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


Question: Calculate the 2016 gap between the average revenue for Indian and American films.

SELECT AVG(CASE WHEN T3.COUNTry_name = 'United States of America' THEN T1.revenue END) - AVG(CASE WHEN T3.COUNTry_name = 'India' THEN T1.revenue END) AS CALCULATE FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 2016

Calculate the 2016 gap between the average revenue for Indian and American films .

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


Question: Find the customer who made the highest payment in 2005.

SELECT t2.customerName FROM payments AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t1.paymentDate) = '2005' GROUP BY t2.customerNumber, t2.customerName ORDER BY SUM(t1.amount) DESC LIMIT 1

Find the customer who made the highest payment in 2005 .

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


Question: List name and parking info for the stores in the Tarzana neighborhood.

SELECT name ,  parking FROM store WHERE neighborhood  =  'Tarzana'

List name and parking info for the stores in the Tarzana neighborhood .

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


Question: Please show the most common affiliation for city channels.

SELECT Affiliation FROM city_channel GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common affiliation for city channels .


Question: Show name, type of powertrain, and annual fuel cost for all vehicles with model year 2013 or 2014.

SELECT name ,  type_of_powertrain ,  annual_fuel_cost FROM vehicles WHERE model_year  =  2013 OR model_year  =  2014

Show name , type of powertrain , and annual fuel cost for all vehicles with model year 2013 or 2014 .

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


Question: Return the id of the store with the most customers.

SELECT store_id FROM customer GROUP BY store_id ORDER BY count(*) DESC LIMIT 1

Return the i d of the store with the most customers .