Question: Which city has the most addresses? List the city name, number of addresses, and city id.

SELECT T2.city ,  count(*) ,  T1.city_id FROM address AS T1 JOIN city AS T2 ON T1.city_id  =  T2.city_id GROUP BY T1.city_id ORDER BY count(*) DESC LIMIT 1

Which city has the most addresses ? List the city name , number of addresses , and city i d.

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


Question: State the highest profit made by Anna Chung's orders in the Central Superstore.

SELECT MAX(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Anna Chung'

State the highest profit made by Anna Chung 's orders in the Central Superstore .

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


Question: How many red boats exist?

SELECT count(*) FROM Boats WHERE color  =  'red'


Question: Find the average age of drivers for each make.

SELECT avg(age) ,  Make FROM driver GROUP BY make

Find the average age of drivers for each make .


Question: What is the PreferredVendorStatus for the company which has the rowguid of "684F328D-C185-43B9-AF9A-37ACC680D2AF"?

SELECT T1.PreferredVendorStatus FROM Vendor AS T1 INNER JOIN BusinessEntity AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.rowguid = '684F328D-C185-43B9-AF9A-37ACC680D2AF'

What is the PreferredVendorStatus for the company which has the rowguid of " 684F328D - C185 - 43B9 - AF9A-37ACC680D2AF " ?

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


Question: Report the first name and last name of all the teachers.

SELECT DISTINCT firstname ,  lastname FROM teachers

Report the first name and last name of all the teachers .

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


Question: Give the distinct department ids of departments in which a manager is in charge of 4 or more employees?

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

Give the distinct department ids of departments in which a manager is in charge of 4 or more employees ?

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


Question: How many non-faculty members are not undergoing the phase of qualifications?

SELECT COUNT(*) FROM person WHERE hasPosition = 0 AND inPhase = 0

How many non - faculty members are not undergoing the phase of qualifications ?


Question: Count the number of citations Mckeown , Kathleen has .

select count(*) from citation as t1 join author_list as t2 on t1.cited_paper_id  =  t2.paper_id join author as t3 on t2.author_id  =  t3.author_id where t3.name = "mckeown ,  kathleen"

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


Question: List the names of all the customers in alphabetical order.

SELECT customer_details FROM customers ORDER BY customer_details

List the names of all the customers in alphabetical order .


Question: List the occupation and income of male customers with an level of education of 4 to 6.

SELECT T1.OCCUPATION, T2.INCOME_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.EDUCATIONNUM >= 4 AND T1.EDUCATIONNUM <= 6 AND T1.SEX = 'Male'

List the occupation and income of male customers with an level of education of 4 to 6 .

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


Question: How many games did the coach who received the first-ever Second Team All-Star award play before receiving such award?

SELECT SUM(T1.g) FROM Coaches AS T1 INNER JOIN ( SELECT coachID, year FROM AwardsCoaches WHERE award = 'Second Team All-Star' ORDER BY year LIMIT 1 ) AS T2 ON T1.coachID = T2.coachID AND T1.year < T2.year

How many games did the coach who received the first - ever Second Team All - Star award play before receiving such award ?

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


Question: List the player's ID of the top five players, by descending order, in terms of bowling skill.

SELECT Player_Id FROM Player ORDER BY Bowling_skill DESC LIMIT 5

List the player 's ID of the top five players , by descending order , in terms of bowling skill .

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


Question: What the the student ids for students not living in the USA?

SELECT StuID FROM Student EXCEPT SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE country  =  "USA"

What the the student ids for students not living in the USA ?


Question: What are the complaint id of client who were born in 1931?

SELECT T2.`Complaint ID` FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.year = 1931

What are the complaint i d of client who were born in 1931 ?

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


Question: Which department offers the most credits all together?

SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1

Which department offers the most credits all together ?


Question: List the type of the book for the order which was sold on 1993/5/29.

SELECT DISTINCT T1.type FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE STRFTIME('%Y-%m-%d', T2.ord_date) = '1993-05-29'

List the type of the book for the order which was sold on 1993/5/29 .

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


Question: Indicate the full name of all customers whose last name begins with the letter K.

SELECT first_name, last_name FROM customer WHERE last_name LIKE 'K%'

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


Question: List the name and price of the bike that is owned by both the cyclists named 'Bradley Wiggins' and the cyclist named 'Antonio Tauler'.

SELECT T3.product_name ,  T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id JOIN bike AS T3 ON T2.bike_id  =  T3.id WHERE T1.name  =  'Bradley Wiggins' INTERSECT SELECT T3.product_name ,  T3.price FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id JOIN bike AS T3 ON T2.bike_id  =  T3.id WHERE T1.name  =  'Antonio Tauler'

List the name and price of the bike that is owned by both the cyclists named ' Bradley Wiggins ' and the cyclist named ' Antonio Tauler ' .

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


Question: Who is the staff manager in store id 2?

SELECT manager_staff_id FROM store WHERE store_id = 2

Who is the staff manager in store i d 2 ?

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


Question: What are the document object ids of the objects owned by Marlin?

SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER  =  'Marlin'

What are the document object ids of the objects owned by Marlin ?

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


Question: If a pair of genes is positively correlated, what is the possibility of it being composed of two genes both with over 10 chromosomes?

SELECT CAST(SUM(IIF(T1.Chromosome > 10 AND T3.Chromosome > 10, 1, 0)) AS REAL) * 100 / COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T2.Expression_Corr > 0

If a pair of genes is positively correlated , what is the possibility of it being composed of two genes both with over 10 chromosomes ?

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


Question: What are the names of all sculptures in gallery 226?

SELECT title FROM sculptures WHERE LOCATION  =  "Gallery 226"

What are the names of all sculptures in gallery 226 ?

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


Question: What are the states of the colleges where students who tried out for the striker position attend?

SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'striker'

What are the states of the colleges where students who tried out for the striker position attend ?

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


Question: List the names of all the producers in the movie "Pirates of the Caribbean: At World's End".

SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title = 'Pirates of the Caribbean: The Curse of the Black Pearl' AND T2.job = 'Producer'

List the names of all the producers in the movie " Pirates of the Caribbean : At World 's End " .

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


Question: List all the card id and artist with unknown power which are legal for commander play format.

SELECT T1.id, T1.artist FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Legal' AND T2.format = 'commander' AND (T1.power IS NULL OR T1.power = '*')

List all the card i d and artist with unknown power which are legal for commander play format .

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


Question: How many drivers from the UN participated in the 2008 Australian Grand Prix?

SELECT COUNT(*) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId INNER JOIN races AS T3 ON T3.raceId = T2.raceId WHERE T3.name = 'Australian Grand Prix' AND T1.nationality = 'British' AND T3.year = 2008

How many drivers from the UN participated in the 2008 Australian Grand Prix ?

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


Question: What is the id of the criteria "Citations Rank"?

SELECT id FROM ranking_criteria WHERE criteria_name = 'Citations Rank'

What is the i d of the criteria " Citations Rank " ?

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


Question: What are the names of the branches that have some members with a hometown in Louisville, Kentucky and also those from Hiram, Goergia?

SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Louisville ,  Kentucky' INTERSECT SELECT T2.name FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id JOIN member AS T3 ON T1.member_id  =  T3.member_id WHERE T3.Hometown  =  'Hiram ,  Georgia'

What are the names of the branches that have some members with a hometown in Louisville , Kentucky and also those from Hiram , Goergia ?

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


Question: What are the maximum and minimum ages for all staff?

What are the maximum and minimum ages for all staff ?


Question: Name the publisher of the Chronicles of the Sword game.

SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Chronicles of the Sword'

Name the publisher of the Chronicles of the Sword game .

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


Question: Among the businesses with a category of Local Services, what is the percentage of the business with less than 3 stars?

SELECT CAST(SUM(CASE WHEN T1.stars < 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.stars) AS "percentage" FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T3.category_name LIKE 'Local Services'

Among the businesses with a category of Local Services , what is the percentage of the business with less than 3 stars ?

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


Question: Provide the names of podcasts in the art category in 2018.

SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts' AND T2.created_at LIKE '2018-%'

Provide the names of podcasts in the art category in 2018 .

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


Question: Name of customers who have ordered Cocktail Glasses by online sales channel.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T3.`Product Name` = 'Cocktail Glasses' AND T2.`Sales Channel` = 'Online' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products T3 ON T3.ProductID = T2._ProductID ) WHERE T IS NOT NULL

Name of customers who have ordered Cocktail Glasses by online sales channel .

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


Question: How many home victories does the Bundesliga division have in more or less than the Premier League division in the 2021 season?

SELECT COUNT(CASE WHEN T2.name = 'Bundesliga' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.name = 'Premier League' THEN 1 ELSE NULL END) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.FTR = 'H'

How many home victories does the Bundesliga division have in more or less than the Premier League division in the 2021 season ?

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


Question: Calculate the percentage of games published by 'Brash Entertainment'?

SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Brash Entertainment' THEN T2.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id

Calculate the percentage of games published by ' Brash Entertainment ' ?

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


Question: Count the members of the club "Tennis Club".

SELECT count(*) 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  =  "Tennis Club"

Count the members of the club " Tennis Club " .

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


Question: What is the title and author ID of paper with conference ID less than 100 in year 2006?

SELECT DISTINCT T1.Title, T2.AuthorId FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2006 AND T1.ConferenceId < 100

What is the title and author ID of paper with conference ID less than 100 in year 2006 ?

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


Question: What percentage of KAM customers pay in euros?

SELECT CAST(SUM(Currency = 'EUR') AS FLOAT) * 100 / COUNT(CustomerID) FROM customers WHERE Segment = 'KAM'

What percentage of KAM customers pay in euros ?


Question: What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students?

SELECT cName FROM College WHERE enr  <  13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr  >  15000 AND state = "LA"

What are the names of colleges in LA that have more than 15,000 students and of colleges in AZ with less than 13,000 students ?

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


Question: How old is the youngest person for each job?

SELECT min(age) ,  job FROM Person GROUP BY job

How old is the youngest person for each job ?


Question: Show the medicine names and trade names that cannot interact with the enzyme with product 'Heme'.

SELECT name ,  trade_name FROM medicine EXCEPT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id JOIN enzyme AS T3 ON T3.id  =  T2.enzyme_id WHERE T3.product  =  'Protoporphyrinogen IX'

Show the medicine names and trade names that can not interact with the enzyme with product ' Heme ' .

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


Question: What are the last names of the students with gender other than "M"?

SELECT Last_Name FROM Students WHERE Gender_MFU != "M"

What are the last names of the students with gender other than " M " ?

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


Question: Provide the dimensions of the bounding box that contains the keyboard that was spotted in image no. 3.

SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 3 AND T2.OBJ_CLASS = 'keyboard'

Provide the dimensions of the bounding box that contains the keyboard that was spotted in image no . 3 .

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


Question: List down the text of tweets posted by unknown gender users.

SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Unknown'

List down the text of tweets posted by unknown gender users .

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


Question: What is the average height of a non-human superhero in Dark Horse Comics?

SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN race AS T3 ON T1.race_id = T3.id WHERE T2.publisher_name = 'Dark Horse Comics' AND T3.race != 'Human'

What is the average height of a non - human superhero in Dark Horse Comics ?

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


Question: Please show the most common nationality of members.

SELECT Nationality ,  COUNT(*) FROM member GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common nationality of members .


Question: What is the latitude of the island on which Mount Andrinjitra is located?

SELECT T1.Latitude FROM island AS T1 INNER JOIN mountainOnIsland AS T2 ON T1.Name = T2.Island WHERE T2.Mountain = 'Andringitra'

What is the latitude of the island on which Mount Andrinjitra is located ?

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


Question: Which two countries have the longest border in the world? Give the full name of the country.

SELECT T2.Country1, T2.Country2 FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 ORDER BY T2.Length DESC LIMIT 1

Which two countries have the longest border in the world ? Give the full name of the country .

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


Question: Count the number of searches made by buyers.

SELECT count(*) FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id  =  T2.user_id WHERE T1.is_buyer  =  1;

Count the number of searches made by buyers .


Question: List the last names of students under the Elementary Education major and include their phone numbers.

SELECT T1.last_name, T1.phone FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T2.major_name = 'Elementary Education'

List the last names of students under the Elementary Education major and include their phone numbers .

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


Question: List down the trips in which their start and end station are similar. Give me their trip IDs and location coordinates.

SELECT T1.id, T2.lat, T2.long FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_station_name = T1.end_station_name

List down the trips in which their start and end station are similar . Give me their trip IDs and location coordinates .

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


Question: Show all official native languages that contain the word "English".

SELECT Official_native_language FROM country WHERE Official_native_language LIKE "%English%"

Show all official native languages that contain the word " English " .

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


Question: List all living goalies who have greater than 50% wins among all games played. State their last name and first name.

SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.deathYear IS NOT NULL GROUP BY T1.playerID HAVING CAST(SUM(T2.Min) AS REAL) / SUM(T2.GP) > 0.5

List all living goalies who have greater than 50 % wins among all games played . State their last name and first name .

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


Question: For each classroom, show the classroom number and count the number of distinct grades that use the room.

SELECT classroom ,  count(DISTINCT grade) FROM list GROUP BY classroom

For each classroom , show the classroom number and count the number of distinct grades that use the room .

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


Question: What is the average age and how many male students are there in each city?

SELECT count(*) ,  avg(age) ,  city_code FROM student WHERE sex  =  'M' GROUP BY city_code

What is the average age and how many male students are there in each city ?

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


Question: Among the players that went to high school in New York and have won the MVP, what is their average height?

SELECT AVG(T1.height) FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' AND T1.birthCity = 'New York'

Among the players that went to high school in New York and have won the MVP , what is their average height ?

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


Question: How many users are there?


Question: How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix?

WITH time_in_seconds AS ( SELECT T1.positionOrder, CASE WHEN T1.positionOrder = 1 THEN (CAST(SUBSTR(T1.time, 1, 1) AS REAL) * 3600) + (CAST(SUBSTR(T1.time, 3, 2) AS REAL) * 60) + CAST(SUBSTR(T1.time, 6) AS REAL) ELSE CAST(SUBSTR(T1.time, 2) AS REAL) END AS time_seconds FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T1.time IS NOT NULL AND T2.year = 2008 ), champion_time AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = 1), last_driver_incremental AS ( SELECT time_seconds FROM time_in_seconds WHERE positionOrder = (SELECT MAX(positionOrder) FROM time_in_seconds) ) SELECT (CAST((SELECT time_seconds FROM last_driver_incremental) AS REAL) * 100) / (SELECT time_seconds + (SELECT time_seconds FROM last_driver_incremental) FROM champion_time)

How much faster in percentage is the champion than the driver who finished the race last in the 2008 Australian Grand Prix ?

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


Question: Among the employees who are store contacts, how many of them have a title of "Mr."?

SELECT COUNT(BusinessEntityID) FROM Person WHERE PersonType = 'SC' AND Title = 'Mr.'

Among the employees who are store contacts , how many of them have a title of " Mr. " ?

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


Question: What is the names of the physicians who prescribe medication Thesisin?

SELECT DISTINCT T1.name FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.name  =  "Thesisin"

What is the names of the physicians who prescribe medication Thesisin ?

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


Question: What are the unique first names of the artists who had medium oil paintings located in gallery 241?

SELECT DISTINCT T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" AND LOCATION  =  "Gallery 241"

What are the unique first names of the artists who had medium oil paintings located in gallery 241 ?

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


Question: How much does the gross domestic products goes to the industry sector for Singapore?

SELECT T2.GDP * T2.Industry FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Singapore'

How much does the gross domestic products goes to the industry sector for Singapore ?

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


Question: What are the different schools and their nicknames, ordered by their founding years?

SELECT school ,  nickname FROM university ORDER BY founded

What are the different schools and their nicknames , ordered by their founding years ?

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


Question: Give the different reigns of wrestlers who are not located in Tokyo, Japan.

SELECT DISTINCT Reign FROM wrestler WHERE LOCATION != "Tokyo , Japan"

Give the different reigns of wrestlers who are not located in Tokyo , Japan .

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


Question: Count the number of courses.


Question: How many badges has the user csgillespie obtained?

SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'csgillespie'

How many badges has the user csgillespie obtained ?


Question: Show the times of elimination by "Punk" or "Orton".

SELECT TIME FROM elimination WHERE Eliminated_By  =  "Punk" OR Eliminated_By  =  "Orton"

Show the times of elimination by " Punk " or " Orton " .

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


Question: Please list the first names of the coaches whose team played in 1922's Stanley Cup finals.

SELECT T3.firstName FROM Coaches AS T1 INNER JOIN TeamsSC AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.year = 1922

Please list the first names of the coaches whose team played in 1922 's Stanley Cup finals .

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


Question: Find the number of scientists who are not assigned to any project.

SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)

Find the number of scientists who are not assigned to any project .

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


Question: What are the states of businesses with attribute of beer and wine located?

SELECT DISTINCT T2.state FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.attribute_value = 'beer_and_wine'

What are the states of businesses with attribute of beer and wine located ?

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


Question: How many different time zones are there in the Northeast region?

SELECT COUNT(DISTINCT T2.`Time Zone`) FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T1.Region = 'Northeast'

How many different time zones are there in the Northeast region ?

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


Question: Among the users who use OPPO, calculate the percentage of those who are under 50 years old.

SELECT SUM(IIF(T1.age < 50, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'OPPO'

Among the users who use OPPO , calculate the percentage of those who are under 50 years old .

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


Question: What are the actors that have the same forename as Johnny? Please include in your answer the full names of these actors.

SELECT first_name, last_name FROM actor WHERE first_name = 'Johnny'

What are the actors that have the same forename as Johnny ? Please include in your answer the full names of these actors .

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


Question: What is the name of the legislator with the ID of W000059?

SELECT first_name, last_name FROM historical WHERE bioguide_id = 'W000059'

What is the name of the legislator with the ID of W000059 ?

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


Question: Among the listed cities, provide the area code of the city with the largest water area.

SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.water_area = ( SELECT MAX(water_area) FROM zip_data )

Among the listed cities , provide the area code of the city with the largest water area .

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


Question: Find the percentage of 5 stars rated business.

SELECT CAST(SUM(CASE WHEN stars = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(stars) FROM Business

Find the percentage of 5 stars rated business .


Question: List the ranking criteria under the Shanghai Ranking system.

SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Shanghai Ranking'

List the ranking criteria under the Shanghai Ranking system .

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


Question: What percentage of players have a strength and stamina score of more than 80?

SELECT CAST(COUNT(CASE WHEN strength > 80 AND stamina > 80 THEN id ELSE NULL END) AS REAL) * 100 / COUNT(id) FROM Player_Attributes t

What percentage of players have a strength and stamina score of more than 80 ?

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


Question: What is the name of the customer of ship ID 1147?

SELECT T2.cust_name FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1147'

What is the name of the customer of ship ID 1147 ?

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


Question: In which state is the college that Charles attends?

SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName JOIN player AS T3 ON T2.pID  =  T3.pID WHERE T3.pName  =  'Charles'

In which state is the college that Charles attends ?


Question: There's one customer spent 214582.17 in the June of 2013, which currency did he/she use?

SELECT T2.Currency FROM yearmonth AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '201306' AND T1.Consumption = 214582.17

There 's one customer spent 214582.17 in the June of 2013 , which currency did he / she use ?

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


Question: What are the majors of male (sex is M) students?

SELECT Major FROM STUDENT WHERE Sex  =  "M"

What are the majors of male ( sex is M ) students ?

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


Question: What are the type of questions and their counts?

SELECT Type_of_Question_Code ,  COUNT(*) FROM Questions GROUP BY Type_of_Question_Code

What are the type of questions and their counts ?


Question: Show the countries that have both managers of age above 50 and managers of age below 46.

SELECT Country FROM manager WHERE Age  >  50 INTERSECT SELECT Country FROM manager WHERE Age  <  46

Show the countries that have both managers of age above 50 and managers of age below 46 .

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


Question: Show the number of document types.


Question: How many institutions are there?


Question: List the date the claim was made, the date it was settled and the amount settled for all the claims which had exactly one settlement.

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

List the date the claim was made , the date it was settled and the amount settled for all the claims which had exactly one settlement .

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


Question: What are the first and last names of the artists who have not only medium oil paintings but also paintings with the lithographic medium?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.medium  =  "oil" INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID WHERE T4.medium  =  "lithograph"

What are the first and last names of the artists who have not only medium oil paintings but also paintings with the lithographic medium ?

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


Question: What is the total number of active businesses in AZ with a low review count?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'True' AND review_count LIKE 'low'

What is the total number of active businesses in AZ with a low review count ?

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


Question: Return the ids and details corresponding to projects for which there are more than two documents.

SELECT T1.project_id ,  T1.project_details FROM Projects AS T1 JOIN Documents AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id HAVING count(*)  >  2

Return the ids and details corresponding to projects for which there are more than two documents .

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


Question: How much salary did the top 3 well-paid players get in 2001?

SELECT salary FROM salary WHERE YEAR  =  2001 ORDER BY salary DESC LIMIT 3;

How much salary did the top 3 well - paid players get in 2001 ?

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


Question: List all directors along with the number of films directed by each director.

SELECT directed_by ,  count(*) FROM film GROUP BY directed_by

List all directors along with the number of films directed by each director .

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


Question: Give the name of the tallest athlete from Sweden.

SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Sweden' ORDER BY T3.height DESC LIMIT 1

Give the name of the tallest athlete from Sweden .


Question: Return the name of each physician and the number of patients he or she treats.

SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid

Return the name of each physician and the number of patients he or she treats .

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


Question: List the types of engines that are used by at least two drivers.

SELECT Engine FROM driver GROUP BY Engine HAVING COUNT(*)  >=  2

List the types of engines that are used by at least two drivers .

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


Question: Find the number of universities that have over a 20000 enrollment size for each affiliation type.

SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation

Find the number of universities that have over a 20000 enrollment size for each affiliation type .

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


Question: In 1997, how many loss did the coach have who temporary coached Tampa Bay Lightning? Indicate his/her coach ID.

SELECT SUM(T1.l), T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.notes = 'interim' AND T1.year = '1997' AND T2.name = 'Tampa Bay Lightning' GROUP BY T1.coachID

In 1997 , how many loss did the coach have who temporary coached Tampa Bay Lightning ? Indicate his / her coach ID .

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


Question: Find the number of students taught by the teacher KAWA GORDON.

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

Find the number of students taught by the teacher KAWA GORDON .

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


Question: What is the name of the root beer brand with the lowest unit profit available to wholesalers?

SELECT BrandName FROM rootbeerbrand ORDER BY CurrentRetailPrice - WholesaleCost LIMIT 1

What is the name of the root beer brand with the lowest unit profit available to wholesalers ?

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


Question: List the city of the business where they open from 1 pm to 6 pm on Saturday.

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

List the city of the business where they open from 1 pm to 6 pm on Saturday .

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


Question: Identify the number of posts and comments left by the user, who has the latest created user account.

SELECT COUNT(T2.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId INNER JOIN comments AS T3 ON T3.PostId = T2.Id ORDER BY T1.CreationDate DESC LIMIT 1

Identify the number of posts and comments left by the user , who has the latest created user account .

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


Question: How many of the countries do not have special notes? List the long name.

SELECT COUNT(LongName) FROM Country WHERE SpecialNotes = '' UNION SELECT longname FROM country WHERE specialnotes = ''

How many of the countries do not have special notes ? List the long name .

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


Question: Name the team in which the coach won the title 'NBA Coach of the Year' in 2010.

SELECT DISTINCT T1.tmID FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = 2010 AND T2.award = 'NBA Coach of the Year'

Name the team in which the coach won the title ' NBA Coach of the Year ' in 2010 .

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


Question: Please list the users' display names whose posts had over 20000 views in 2011.

SELECT T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2011' AND T2.ViewCount > 20000

Please list the users ' display names whose posts had over 20000 views in 2011 .

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


Question: Which community has the highest number of neighborhoods?

SELECT T1.community_area_name FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no ORDER BY T2.community_area_no DESC LIMIT 1

Which community has the highest number of neighborhoods ?


Question: What percentage of non-domestic crimes have occurred in the Jefferson Park district?

SELECT CAST(COUNT(CASE WHEN T2.domestic = 'FALSE' THEN T2.case_number END) AS REAL) * 100 / COUNT(T2.case_number) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.district_name = 'Jefferson Park'

What percentage of non - domestic crimes have occurred in the Jefferson Park district ?

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


Question: What is the name and city of the airport that the most routes end at?

SELECT T1.name ,  T1.city ,  T2.dst_apid FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid GROUP BY T2.dst_apid ORDER BY count(*) DESC LIMIT 1

What is the name and city of the airport that the most routes end at ?

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


Question: Count the number of clubs.


Question: Among the shipments shipped to Cicero, Illinois, how many shipments weighed between 9,000 to 15,000?

SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'Cicero' AND T2.state = 'Illinois' AND T1.weight BETWEEN 9000 AND 15000

Among the shipments shipped to Cicero , Illinois , how many shipments weighed between 9,000 to 15,000 ?

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


Question: Among the titles with royalty percentage, which title has the greatest royalty percentage. State it's minimum range to enjoy this royalty percentage.

SELECT T1.title, T2.lorange FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id ORDER BY T2.royalty DESC LIMIT 1

Among the titles with royalty percentage , which title has the greatest royalty percentage . State it 's minimum range to enjoy this royalty percentage .

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


Question: What is the url for repository that has the longest processed time solution?

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

What is the url for repository that has the longest processed time solution ?

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


Question: What is the mail date of the document with id 7?

SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7;

What is the mail date of the document with i d 7 ?

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


Question: What are the descriptions and names of the courses that have student enrollment bigger than 2?

SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2

What are the descriptions and names of the courses that have student enrollment bigger than 2 ?

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


Question: What are the student ids for female students in the state of PA?

SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE T1.state  =  "PA"  AND T2.sex  =  'F'

What are the student ids for female students in the state of PA ?

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


Question: What are the unique names of races that held after 2000 and the circuits were in Spain?

SELECT DISTINCT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2000

What are the unique names of races that held after 2000 and the circuits were in Spain ?

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


Question: List the names of the games held in Paris.

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

List the names of the games held in Paris .


Question: Calculate the total payment amount of customers in Nagasaki district.

SELECT SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id WHERE T3.district = 'Nagasaki'

Calculate the total payment amount of customers in Nagasaki district .

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


Question: How many employees are there in Sydney?

SELECT COUNT(employeeNumber) FROM employees WHERE officeCode = ( SELECT officeCode FROM offices WHERE city = 'Sydney' )

How many employees are there in Sydney ?


Question: Which product cost the least in 2013?

SELECT ProductID FROM ProductCostHistory WHERE StartDate LIKE '2013%' ORDER BY StandardCost LIMIT 1


Question: What is the average total price of the transactions taken place in January, 2012?

SELECT AVG(Amount) FROM transactions_1k WHERE Date LIKE '2012-01%'

What is the average total price of the transactions taken place in January , 2012 ?

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


Question: Which users have posted the most comments. List out the user's badge?

SELECT Name FROM badges AS T1 INNER JOIN comments AS T2 ON T1.UserId = t2.UserId GROUP BY T2.UserId ORDER BY COUNT(T2.UserId) DESC LIMIT 1

Which users have posted the most comments . List out the user 's badge ?

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


Question: Find the names of authors who published some paper on NAACL and ACL in the year 2009.

SELECT name FROM Author WHERE author_id IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL" AND T2.year  =  2009 INTERSECT SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "NAACL" AND T2.year  =  2009)

Find the names of authors who published some paper on NAACL and ACL in the year 2009 .

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


Question: Find the address of the location named "UK Gallery".

SELECT Address FROM LOCATIONS WHERE Location_Name  =  "UK Gallery"

Find the address of the location named " UK Gallery " .

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


Question: Give me a list of all the service names sorted alphabetically.

SELECT service_name FROM services ORDER BY service_name

Give me a list of all the service names sorted alphabetically .


Question: How many ingredients are required to make the Raspberry Chiffon Pie?

SELECT COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry Chiffon Pie'

How many ingredients are required to make the Raspberry Chiffon Pie ?

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


Question: Find the total and average population of the districts which have some spokesman.

SELECT sum(population) ,  avg(population) FROM district WHERE district_id IN (SELECT district_id FROM spokesman_district)

Find the total and average population of the districts which have some spokesman .

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


Question: What is the description of the color used by least products?

SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1

What is the description of the color used by least products ?

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


Question: In which city is the lake located at coordinates longitude -85.35 and latitude 11.6?

SELECT T2.City FROM lake AS T1 INNER JOIN located AS T2 ON T1.Name = T2.Lake INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN city AS T4 ON T4.Province = T3.Name WHERE T1.Longitude = -85.35 AND T1.Latitude = 11.6

In which city is the lake located at coordinates longitude -85.35 and latitude 11.6 ?

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


Question: What were the max gust speed and cloud clover when the customer using bike no. 10 recorded the 386 seconds duration of the trip from MLK Library to San Salvador at 1st?

SELECT T2.max_gust_speed_mph, T2.cloud_cover FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T1.bike_id = 10 AND T2.mean_temperature_f > 62 AND T1.subscription_type = 'Customer' AND T1.start_station_name = 'MLK Library' AND T1.end_station_name = 'San Salvador at 1st' AND T1.duration = 386

What were the max gust speed and cloud clover when the customer using bike no . 10 recorded the 386 seconds duration of the trip from MLK Library to San Salvador at 1st ?

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


Question: Which type of weapon was used to attack the victim in the record number 031347-2015? What is the victim's race and gender?

SELECT T1.subject_weapon, T2.race, T2.gender FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.case_number = '031347-2015'

Which type of weapon was used to attack the victim in the record number 031347 - 2015 ? What is the victim 's race and gender ?

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


Question: Please indicate the full name of actor id 5.

SELECT first_name, last_name FROM actor WHERE actor_id = 5

Please indicate the full name of actor i d 5 .

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


Question: How many male clients in 'Hl.m. Praha' district?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A2 = 'Hl.m. Praha'

How many male clients in ' Hl.m . Praha ' district ?

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


Question: What are the names and dates created for all sculptures not located in gallery 226?

SELECT title ,  YEAR FROM sculptures WHERE LOCATION != "Gallery 226"

What are the names and dates created for all sculptures not located in gallery 226 ?

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


Question: When is the latest patient's medical data recorded? This patient should have an abnormal level of lactate dehydrogenase.

SELECT T1.`First Date` FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.LDH >= 500 ORDER BY T1.`First Date` DESC LIMIT 1

When is the latest patient 's medical data recorded ? This patient should have an abnormal level of lactate dehydrogenase .

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


Question: Show the names of members and the dates of performances they attended in descending order of attendance of the performances.

SELECT T2.Name ,  T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID ORDER BY T3.Attendance DESC

Show the names of members and the dates of performances they attended in descending order of attendance of the performances .

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


Question: What are all the friends of Alice who are female?

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

What are all the friends of Alice who are female ?

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


Question: How many organizations are founded in countries with a population of under 1000000?

SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Population < 1000000

How many organizations are founded in countries with a population of under 1000000 ?

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


Question: Show the names of people who have been on the negative side of debates at least twice.

SELECT T2.Name FROM debate_people AS T1 JOIN people AS T2 ON T1.Negative  =  T2.People_ID GROUP BY T2.Name HAVING COUNT(*)  >=  2

Show the names of people who have been on the negative side of debates at least twice .

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


Question: Which tourist attraction is associated with the photo "game1"? Return its name.

SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T1.Name  =  "game1"

Which tourist attraction is associated with the photo " game1 " ? Return its name .

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


Question: How many matches did team Kings XI Punjab win in season year 2008?

SELECT COUNT(DISTINCT T2.Match_Id) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T1.Team_Name = 'Kings XI Punjab' AND T4.Season_Year = 2008

How many matches did team Kings XI Punjab win in season year 2008 ?

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


Question: Among the matches held in Mumbai, how many percent of them were held in Wankhede Stadium?

SELECT CAST(SUM(CASE WHEN T2.Venue_Name = 'Wankhede Stadium' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Match_Id) FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id INNER JOIN Match AS T3 ON T3.Venue_Id = T2.Venue_Id WHERE T1.City_Name = 'Mumbai'

Among the matches held in Mumbai , how many percent of them were held in Wankhede Stadium ?

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


Question: Which location sold more bottles of beer?

SELECT T2.LocationName FROM rootbeer AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.ContainerType = 'Bottle' GROUP BY T2.LocationID ORDER BY COUNT(T1.LocationID) DESC LIMIT 1

Which location sold more bottles of beer ?


Question: what is the name of the country that participated in the most tournament competitions?

SELECT country FROM competition WHERE competition_type  =  'Tournament' GROUP BY country ORDER BY count(*) DESC LIMIT 1

what is the name of the country that participated in the most tournament competitions ?

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


Question: List the industry shared by the most companies.

SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC LIMIT 1

List the industry shared by the most companies .


Question: How many events did the device ID "3915082290673130000" join?

SELECT COUNT(event_id) FROM events WHERE device_id = 3915082290673130000

How many events did the device ID " 3915082290673130000 " join ?

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


Question: What are the model names and build year of the cars with 'DJ' in its model name?

SELECT model ,  build_year FROM vehicle WHERE model LIKE '%DJ%'

What are the model names and build year of the cars with ' DJ ' in its model name ?

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


Question: What are the names of the boats booked by people between age 20 and 30?

SELECT T3.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T1.age BETWEEN 20 AND 30

What are the names of the boats booked by people between age 20 and 30 ?

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


Question: How many games were released in 2001?

SELECT COUNT(T.id) FROM game_platform AS T WHERE T.release_year = 2001


Question: How many film are there?


Question: What are the details of all products?

SELECT DISTINCT product_details FROM products


Question: Among the cars produced in 1975, provide IDs, names, and producing countries of the cars with the maximum number of cylinders.

SELECT T1.ID, T1.car_name, T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year = 1975 ORDER BY T1.cylinders DESC LIMIT 1

Among the cars produced in 1975 , provide IDs , names , and producing countries of the cars with the maximum number of cylinders .

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


Question: Calculate the total carcinogenic molecules for molecule id from TR000 to TR030.

SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.molecule_id BETWEEN 'TR000' AND 'TR030' AND T.label = '+'

Calculate the total carcinogenic molecules for molecule i d from TR000 to TR030 .

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


Question: What form of governance does the least prosperous nation in the world have?

SELECT T3.Government FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE T2.GDP IS NOT NULL ORDER BY T2.GDP ASC LIMIT 1

What form of governance does the least prosperous nation in the world have ?


Question: What are the home conferences that have an average university enrollment above 2000?

SELECT home_conference FROM University GROUP BY home_conference HAVING avg(enrollment)  >  2000

What are the home conferences that have an average university enrollment above 2000 ?

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


Question: Identify the full name of the customer, who has the following email address: SHEILA.WELLS@sakilacustomer.org.

SELECT first_name, last_name FROM customer WHERE email = 'SHEILA.WELLS@sakilacustomer.org'

Identify the full name of the customer , who has the following email address : SHEILA.WELLS@sakilacustomer.org .

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


Question: How many letters are there in Catherine Ward's e-mail account passwords?

SELECT LENGTH(T2.PasswordHash) FROM Person AS T1 INNER JOIN Password AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Catherine' AND T1.LastName = 'Ward'

How many letters are there in Catherine Ward 's e - mail account passwords ?

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


Question: Please provide top five football players' IDs who are among the lowest potential players and prefer to use the right foot when attacking.

SELECT id FROM Player_Attributes WHERE preferred_foot = 'right' ORDER BY potential DESC LIMIT 5

Please provide top five football players ' IDs who are among the lowest potential players and prefer to use the right foot when attacking .

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


Question: Give the title of the episode won in Primetime Emmy Awards 2009.

SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.organization = 'Primetime Emmy Awards' AND T1.year = 2009 AND T1.result = 'Winner';

Give the title of the episode won in Primetime Emmy Awards 2009 .

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


Question: Return all the distinct secretary votes made in the fall election cycle.

SELECT DISTINCT Secretary_Vote FROM VOTING_RECORD WHERE ELECTION_CYCLE  =  "Fall"

Return all the distinct secretary votes made in the fall election cycle .

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


Question: List the name of rooms with king or queen bed.

SELECT roomName FROM Rooms WHERE bedType  =  "King" OR bedType  =  "Queen";

List the name of rooms with king or queen bed .

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


Question: Find the checking balance and saving balance in the Brown’s account.

SELECT T2.balance ,  T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T1.name  =  'Brown'

Find the checking balance and saving balance in the Brown ’s account .

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


Question: What are the visit date and details of the visitor whose detail is 'Vincent'?

SELECT T2.Visit_Date ,  T2.Visit_Details FROM VISITORS AS T1 JOIN VISITS AS T2 ON T1.Tourist_ID  =  T2.Tourist_ID WHERE T1.Tourist_Details  =  "Vincent"

What are the visit date and details of the visitor whose detail is ' Vincent ' ?

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


Question: What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions?

SELECT T2.invoice_number ,  T2.invoice_date FROM Financial_transactions AS T1 JOIN Invoices AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number ORDER BY count(*) DESC LIMIT 1

What is the invoice number and invoice date corresponding to the invoice with the greatest number of transactions ?

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


Question: How many heads of the departments are older than 56 ?

SELECT count(*) FROM head WHERE age  >  56

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


Question: Return the id of the vehicle that has been driven the fewest times.

SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1

Return the i d of the vehicle that has been driven the fewest times .


Question: Identify the race of the superhero who weighed 169 kg.

SELECT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 169

Identify the race of the superhero who weighed 169 kg .

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


Question: What is the percentage of male clients complaining about their credit cards?

SELECT CAST(SUM(CASE WHEN T1.sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'

What is the percentage of male clients complaining about their credit cards ?

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


Question: What city has the highest population?

SELECT Name FROM City ORDER BY Population DESC LIMIT 1


Question: Provide the zip codes and the alias of Greeneville.

SELECT T2.zip_code, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Greeneville'

Provide the zip codes and the alias of Greeneville .

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


Question: What is the most populated city in California?

SELECT city_name FROM city WHERE state = 'California' AND population = ( SELECT MAX(population) FROM city WHERE state = 'California' )

What is the most populated city in California ?


Question: How many of the line items have been shipped by rail with a quantity less than 30?

SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity < 30 AND l_shipmode = 'RAIL'

How many of the line items have been shipped by rail with a quantity less than 30 ?

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


Question: What is the attribute data type of the attribute with name "Green"?

SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name  =  "Green"

What is the attribute data type of the attribute with name " Green " ?

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


Question: What are the different names of mountains ascended by climbers from the country of West Germany?

SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"

What are the different names of mountains ascended by climbers from the country of West Germany ?

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


Question: Show the number of stories of buildings in the region with name "Abruzzo".

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

Show the number of stories of buildings in the region with name " Abruzzo " .

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


Question: Which course author teaches the "advanced database" course? Give me his or her login name.

SELECT T1.login_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T2.course_name  =  "advanced database"

Which course author teaches the " advanced database " course ? Give me his or her login name .

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


Question: Among all the female current legislators, how many of them have served for more than 4 terms?

SELECT COUNT(CID) FROM ( SELECT T1.bioguide_id AS CID FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'F' GROUP BY T2.bioguide HAVING COUNT(T2.bioguide) > 4 )

Among all the female current legislators , how many of them have served for more than 4 terms ?

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


Question: How many times do seedless red grapes appear in the recipes?

SELECT COUNT(*) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id WHERE T1.name = 'seedless red grapes'

How many times do seedless red grapes appear in the recipes ?

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


Question: What is the average price for flights from LA to Honolulu?

SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"

What is the average price for flights from LA to Honolulu ?

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


Question: What is the ship date of the order by the customer named Ann Chong in the central region?

SELECT T2.`Ship Date` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Ann Chong' AND T1.Region = 'Central'

What is the ship date of the order by the customer named Ann Chong in the central region ?

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


Question: Show the maximum and minimum share count of different transaction types.

SELECT transaction_type_code ,  max(share_count) ,  min(share_count) FROM TRANSACTIONS GROUP BY transaction_type_code

Show the maximum and minimum share count of different transaction types .

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


Question: What are the names of the courses taught by the tutor whose personal name is "Julio"?

SELECT T2.course_name FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id WHERE T1.personal_name  =  "Julio"

What are the names of the courses taught by the tutor whose personal name is " Julio " ?

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


Question: How many total credits are offered by each department?

SELECT sum(credits) ,  dept_name FROM course GROUP BY dept_name

How many total credits are offered by each department ?


Question: In which country does the most populated university in 2014 located ?

SELECT T2.country_id FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2014 ORDER BY T1.num_students DESC LIMIT 1

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


Question: Find the countries that have never participated in any competition with Friendly type.

SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'

Find the countries that have never participated in any competition with Friendly type .

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


Question: What is the country location of the employee who handled order id 10257?

SELECT T1.Country FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10257

What is the country location of the employee who handled order i d 10257 ?

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


Question: Show the names of customers and names of dishes they order, in descending order of the quantity of dish.

SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID ORDER BY T2.Quantity DESC

Show the names of customers and names of dishes they order , in descending order of the quantity of dish .

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


Question: What is the item number of the product with the highest number of units sold in store number 1 on 1/1/2012?

SELECT item_nbr FROM sales_in_weather WHERE `date` = '2012-01-01' AND store_nbr = 1 ORDER BY units DESC LIMIT 1

What is the item number of the product with the highest number of units sold in store number 1 on 1/1/2012 ?

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


Question: Show the names of editors and the theme of journals for which they serve on committees.

SELECT T2.Name ,  T3.Theme FROM journal_committee AS T1 JOIN editor AS T2 ON T1.Editor_ID  =  T2.Editor_ID JOIN journal AS T3 ON T1.Journal_ID  =  T3.Journal_ID

Show the names of editors and the theme of journals for which they serve on committees .

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


Question: What is the local name of Ukraine that they are also known for?

SELECT LocalName FROM Country WHERE Name = 'Ukraine'

What is the local name of Ukraine that they are also known for ?

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


Question: What is the average absence period of a disabled student?

SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name

What is the average absence period of a disabled student ?


Question: How many female users belong to the age group of 27 to 28?

SELECT COUNT(device_id) FROM gender_age WHERE `group` = 'F27-28' AND gender = 'F'

How many female users belong to the age group of 27 to 28 ?

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


Question: How old is the doctor named Zach?

SELECT age FROM Person WHERE job  =  'doctor' AND name  =  'Zach'


Question: List the campuses in Los Angeles county.

SELECT campus FROM campuses WHERE county  =  "Los Angeles"

List the campuses in Los Angeles county .

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


Question: Give the name of the person who was responsible for case No.JB524952.

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

Give the name of the person who was responsible for case No . JB524952 .


Question: In 2011, which university got the lowest score in teaching criteria?

SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 ORDER BY T2.score ASC LIMIT 1

In 2011 , which university got the lowest score in teaching criteria ?

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


Question: Show the name and country for all people whose age is smaller than the average.

SELECT name ,  country FROM people WHERE age  <  (SELECT avg(age) FROM people)

Show the name and country for all people whose age is smaller than the average .

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


Question: Find the names of the top 3 departments that provide the largest amount of courses?

SELECT dept_name FROM course GROUP BY dept_name ORDER BY count(*) DESC LIMIT 3

Find the names of the top 3 departments that provide the largest amount of courses ?

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


Question: State the full name of conference for paper "The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure".

SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'The Dissimilarity Representation as a Tool for Three-Way Data Classification: A 2D Measure'

State the full name of conference for paper " The Dissimilarity Representation as a Tool for Three - Way Data Classification : A 2D Measure " .

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


Question: Among the trains that have at least one non-regular shaped car, what is the percentage of it running in the east direction?

SELECT CAST(COUNT(DISTINCT CASE WHEN T2.direction = 'east' THEN T1.train_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T1.train_id) FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.shape IN ('bucket', 'ellipse')

Among the trains that have at least one non - regular shaped car , what is the percentage of it running in the east direction ?

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


Question: How many followers did the user who posted the list "Non-American Films about World War II" have?

SELECT SUM(T2.list_followers) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Non-American Films about World War II'

How many followers did the user who posted the list " Non - American Films about World War II " have ?

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


Question: How many heroes have the highest attribute value in strength?

SELECT COUNT(T1.hero_id) FROM hero_attribute AS T1 INNER JOIN attribute AS T2 ON T1.attribute_id = T2.id WHERE T2.attribute_name = 'Strength' AND T1.attribute_value = ( SELECT MAX(attribute_value) FROM hero_attribute )

How many heroes have the highest attribute value in strength ?

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


Question: How many users participated in the Survey No.2016?

SELECT COUNT(DISTINCT UserID) FROM Answer WHERE SurveyID LIKE 2016

How many users participated in the Survey No.2016 ?

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


Question: List the player's name who played as a captain.

SELECT T2.Player_Name FROM Player_Match AS T1 INNER JOIN Player AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Captain' GROUP BY T2.Player_Name

List the player 's name who played as a captain .

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


Question: Which employee has been in the Engineering Department the longest? Please give his or her firstname and lastname.

SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' ORDER BY T2.EndDate - T2.StartDate DESC LIMIT 1

Which employee has been in the Engineering Department the longest ? Please give his or her firstname and lastname .

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


Question: State the number of violations did Royal Thai Cuisine has during the 2015/5/8 inspection.

SELECT COUNT(T3.point_id) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T2.inspection_date = '2015-05-08' AND T1.dba_name = 'ROYAL THAI CUISINE'

State the number of violations did Royal Thai Cuisine has during the 2015/5/8 inspection .

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


Question: Return the name of the wrestler who had the lowest number of days held.

SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1

Return the name of the wrestler who had the lowest number of days held .

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


Question: Which state has the highest number of clients who gave a 5-star review?

SELECT T2.state_abbrev FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Stars = 5 GROUP BY T2.state_abbrev ORDER BY COUNT(T2.state_abbrev) DESC LIMIT 1

Which state has the highest number of clients who gave a 5 - star review ?

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


Question: Count the number of addressed in the California district.

SELECT count(*) FROM address WHERE district  =  'California'

Count the number of addressed in the California district .


Question: What is the precise location of zip code 95819?

SELECT T2.Latitude, T2.Longitude FROM location AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.ZipCode = 95819

What is the precise location of zip code 95819 ?

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


Question: Find the total quantity of products associated with the orders in the "Cancelled" status.

SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id  =  t2.order_id WHERE t1.order_status  =  "Cancelled"

Find the total quantity of products associated with the orders in the " Cancelled " status .

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


Question: Write the address and phone number of Margaret Peacock.

SELECT Address, HomePhone FROM Employees WHERE FirstName = 'Margaret' AND LastName = 'Peacock'

Write the address and phone number of Margaret Peacock .

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


Question: What are the names of planes that the pilot Jones who is 32 has?

SELECT plane_name FROM pilotskills WHERE pilot_name  =  'Jones'  AND age  =  32

What are the names of planes that the pilot Jones who is 32 has ?

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


Question: Tell the weight of Dagfinn Sverre Aarskog.

SELECT weight FROM person WHERE full_name = 'Dagfinn Sverre Aarskog'

Tell the weight of Dagfinn Sverre Aarskog .

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


Question: What is the monthly average number of products shipped via Federal Shipping for the year 1996?

SELECT CAST(SUM(T1.ShipVia) AS REAL) / 12 FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate LIKE '1996%'

What is the monthly average number of products shipped via Federal Shipping for the year 1996 ?

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


Question: Who are the account holder identification numbers whose who have transactions on the credit card with the amount is less than the average, in 1998?

SELECT T1.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE STRFTIME('%Y', T1.date) = '1998' AND T1.operation = 'VYBER KARTOU' AND T1.amount < (SELECT AVG(amount) FROM trans WHERE STRFTIME('%Y', date) = '1998')

Who are the account holder identification numbers whose who have transactions on the credit card with the amount is less than the average , in 1998 ?

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


Question: List the last names of all customers in an alphabetical order.

SELECT DISTINCT LastName FROM customers ORDER BY LastName

List the last names of all customers in an alphabetical order .

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


Question: What are the top five most popular episodes?

SELECT episode_id FROM Episode ORDER BY votes DESC LIMIT 5;

What are the top five most popular episodes ?


Question: How frequently did the words 1 and 25 appear together?

SELECT occurrences FROM biwords WHERE w1st = 1 AND w2nd = 25

How frequently did the words 1 and 25 appear together ?


Question: How many dishes do not have correct data for the year in which it appeared first?

SELECT COUNT(*) FROM Dish WHERE first_appeared < 1851 OR first_appeared > 2012

How many dishes do not have correct data for the year in which it appeared first ?

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


Question: How many biwords pairs are there whose second word is "grec"?

SELECT COUNT(T2.w1st) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w2nd WHERE T1.word = 'grec'

How many biwords pairs are there whose second word is " grec " ?

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


Question: Show the name of customer with at least two renting history records.

SELECT T2.name FROM renting_history AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.id GROUP BY T2.id HAVING count(*)  >=  2

Show the name of customer with at least two renting history records .

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


Question: How many films did Åke Sandgren direct?

SELECT COUNT(movie_title) FROM movies WHERE director_name = 'Åke Sandgren'

How many films did Åke Sandgren direct ?


Question: Who are the players played both in NHL and WHA. List the given name and first year they were in NHL and first year in WHA.

SELECT nameGiven, firstNHL, firstWHA FROM Master WHERE firstNHL IS NOT NULL AND firstWHA IS NOT NULL

Who are the players played both in NHL and WHA . List the given name and first year they were in NHL and first year in WHA .

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


Question: How many crew members who were born in the USA were nominated for the Outstanding Animated Program (For Programming Less Than One Hour) award in 2009?

SELECT COUNT(*) FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.birth_country = 'USA' AND T2.result = 'Nominee' AND T2.award = 'Outstanding Animated Program (For Programming Less Than One Hour)' AND T2.year = 2009;

How many crew members who were born in the USA were nominated for the Outstanding Animated Program ( For Programming Less Than One Hour ) award in 2009 ?

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


Question: How many games are puzzle genre?

SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Puzzle'


Question: How much did the KAM customers consume in total in May 2013?

SELECT SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.Date = '201305' AND T1.Segment = 'KAM'

How much did the KAM customers consume in total in May 2013 ?

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


Question: What is the division of the review of 5 stars received on December 17, 2017 for the product Eagle National Mortgage?

SELECT T1.division FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Stars = 5 AND T2.Date = '2017-12-17' AND T2.Product = 'Eagle National Mortgage'

What is the division of the review of 5 stars received on December 17 , 2017 for the product Eagle National Mortgage ?

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


Question: How many female representatives are there in Michigan?

SELECT COUNT(T.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'MI' AND T1.gender_bio = 'F' GROUP BY T1.bioguide_id ) T

How many female representatives are there in Michigan ?


Question: How many customers are from California?

SELECT count(*) FROM customers WHERE state = "CA";

How many customers are from California ?


Question: What is the total number of students?


Question: From 5/30/2005 at 3:43:54 AM to 7/31/2005 at 10:08:29 PM, how many times did Susan Wilson pay for film rentals?

SELECT COUNT(T1.customer_id) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T1.payment_date BETWEEN '2005-05-30 03:43:54' AND '2005-07-31 10:08:29'

From 5/30/2005 at 3:43:54 AM to 7/31/2005 at 10:08:29 PM , how many times did Susan Wilson pay for film rentals ?

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


Question: How many football divisions does England have?

SELECT COUNT(division) FROM divisions WHERE country = 'England'

How many football divisions does England have ?


Question: Among the beverages, which product has the highest customer satisfaction?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Beverages' ORDER BY T1.ReorderLevel DESC LIMIT 1

Among the beverages , which product has the highest customer satisfaction ?


Question: For the country that has notes on the indicator Inflation, consumer prices, in which region is it in?

SELECT T1.Region FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T3.IndicatorName = 'Inflation, consumer prices (annual %)'

For the country that has notes on the indicator Inflation , consumer prices , in which region is it in ?

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


Question: Which claims had exactly one settlement? For each, tell me the the date the claim was made, the date it was settled and the amount settled.

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

Which claims had exactly one settlement ? For each , tell me the the date the claim was made , the date it was settled and the amount settled .

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


Question: Compute the average number of sales in region ID 3.

SELECT AVG(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 3

Compute the average number of sales in region ID 3 .

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


Question: Find the total revenue of companies of each founder.

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

Find the total revenue of companies of each founder .


Question: How many territories are there in the Eastern Region?

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

How many territories are there in the Eastern Region ?


Question: How many rental IDs belong to Eleanor Hunt?

SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Eleanor' AND T2.last_name = 'Hunt'

How many rental IDs belong to Eleanor Hunt ?

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


Question: How many British drivers who were born in 1980?

SELECT COUNT(driverId) FROM drivers WHERE nationality = 'British' AND STRFTIME('%Y', dob) = '1980'

How many British drivers who were born in 1980 ?


Question: what is the phone number of employees whose salary is in the range of 8000 and 12000?

SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000

what is the phone number of employees whose salary is in the range of 8000 and 12000 ?

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


Question: List down the page numbers for menu with dishes on the right upper corner.

SELECT T2.page_number FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id INNER JOIN MenuItem AS T3 ON T2.id = T3.menu_page_id WHERE T3.xpos > 0.75 AND T3.ypos < 0.25

List down the page numbers for menu with dishes on the right upper corner .

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


Question: What is the original price of the "Black Avery Flip-Chart Easel Binder"?

SELECT T1.Sales / (1 - T1.Discount) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Blackstonian Pencils'

What is the original price of the " Black Avery Flip - Chart Easel Binder " ?


Question: Describe the hero, director, and the release date of Mulan.

SELECT T1.hero, T2.director, T1.release_date FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T1.movie_title = 'Mulan'

Describe the hero , director , and the release date of Mulan .

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


Question: Describe the ID, city and region of the stores which are in Allen country.

SELECT DISTINCT T2.StoreID, T2.`City Name`, T1.Region FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode WHERE T2.County = 'Allen County'

Describe the ID , city and region of the stores which are in Allen country .

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


Question: What is the type of education offered in the school who scored the highest average in Math?

SELECT T2.EdOpsName FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.AvgScrMath DESC LIMIT 1

What is the type of education offered in the school who scored the highest average in Math ?

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


Question: What are the order ids for orders that include both Pride and Prejudice and The Little Prince?

SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "The Little Prince"

What are the order ids for orders that include both Pride and Prejudice and The Little Prince ?

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


Question: Calculate percentage of household segment in Indonesia.

SELECT CAST(SUM(IIF(T1.c_mktsegment = 'HOUSEHOLD', 1, 0)) AS REAL) * 100 / COUNT(T1.c_mktsegment) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'INDONESIA'

Calculate percentage of household segment in Indonesia .


Question: What are the name of pilots aged 25 or older?

SELECT Name FROM pilot WHERE Age  >=  25

What are the name of pilots aged 25 or older ?

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


Question: Return the device carriers that do not have Android as their software platform.

SELECT Carrier FROM device WHERE Software_Platform != 'Android'

Return the device carriers that do not have Android as their software platform .

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


Question: What is the title of Michael Suyama?

SELECT Title FROM Employees WHERE FirstName = 'Michael' AND LastName = 'Suyama'


Question: How many canned A&W were purchased in 2016?

SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T1.ContainerType = 'Can' AND T2.BrandName = 'A&W' AND T1.PurchaseDate LIKE '2016%'

How many canned A&W were purchased in 2016 ?

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


Question: List the name of staff who has been assigned multiple jobs.

SELECT T1.staff_name FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T2.staff_id HAVING COUNT (*)  >  1

List the name of staff who has been assigned multiple jobs .


Question: State description of medication taken by Joe Homenick.

SELECT T1.DESCRIPTION FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Joye' AND T2.last = 'Homenick'

State description of medication taken by Joe Homenick .

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


Question: What are the id of students who registered courses or attended courses?

SELECT student_id FROM student_course_registrations UNION SELECT student_id FROM student_course_attendance

What are the i d of students who registered courses or attended courses ?

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


Question: What is the percentage of cards whose language is French among the Story Spotlight cards?

SELECT CAST(SUM(CASE WHEN T2.language = 'French' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.isStorySpotlight = 1

What is the percentage of cards whose language is French among the Story Spotlight cards ?

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


Question: Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range.

SELECT DISTINCT T1.ID, STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.ID IN ( SELECT ID FROM Laboratory WHERE HCT >= 52 GROUP BY ID HAVING COUNT(ID) >= 2 )

Name the ID and age of patient with two or more laboratory examinations which show their hematoclit level exceeded the normal range .

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


Question: For each document object id, how many collections does it belong to?

SELECT count(*) ,  T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID GROUP BY T2.Document_Object_ID

For each document object i d , how many collections does it belong to ?

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


Question: List 5 github address that the solutions can be implemented without the need of compilation.

SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.WasCompiled = 1 LIMIT 5

List 5 github address that the solutions can be implemented without the need of compilation .


Question: What is the comment of the order with the highest total price?

SELECT o_comment FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders )

What is the comment of the order with the highest total price ?

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


Question: What is the percentage of flights from Los Angeles International airport that were cancelled due to a type C cancellation code?

SELECT CAST(SUM(CASE WHEN T2.CANCELLATION_CODE = 'C' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE = '2018/8/15' AND T2.CANCELLATION_CODE IS NOT NULL AND T1.Description = 'Los Angeles, CA: Los Angeles International'

What is the percentage of flights from Los Angeles International airport that were cancelled due to a type C cancellation code ?

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


Question: What is the title of the post with the oldest post link?

SELECT T1.Title FROM posts AS T1 INNER JOIN postLinks AS T2 ON T2.PostId = T1.Id ORDER BY T1.CreaionDate LIMIT 1

What is the title of the post with the oldest post link ?

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


Question: How many child collection does the collection named Best has?

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

How many child collection does the collection named Best has ?

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


Question: What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010?

SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  'Chandler' AND semester  =  'Fall' AND YEAR  =  2010

What is the title of the course that was offered at building Chandler during the fall semester in the year of 2010 ?

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


Question: How many different football events are there?

SELECT COUNT(T2.event_name) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Football'

How many different football events are there ?


Question: How many cities are located in South Africa?

SELECT SUM(CASE WHEN T2.Country_Name = 'South Africa' THEN 1 ELSE 0 END) FROM City AS T1 INNER JOIN Country AS T2 ON T2.Country_Id = T1.Country_id

How many cities are located in South Africa ?


Question: Who is the customer who purchased the highest number of products in a single order?

SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T1.CompanyName ORDER BY COUNT(T3.ProductID) DESC LIMIT 1

Who is the customer who purchased the highest number of products in a single order ?

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


Question: Among HTC Butterfly phone users, list any five devices' IDs used by females.

SELECT T2.device_id FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.device_model = 'Butterfly' AND T2.gender = 'F' AND T1.phone_brand = 'HTC' LIMIT 5

Among HTC Butterfly phone users , list any five devices ' IDs used by females .

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


Question: What is the total number of campuses?


Question: Of the orders with a lower delivery priority, how many have an urgent priority order?

SELECT COUNT(o_orderkey) FROM orders WHERE o_orderpriority = '1-URGENT' GROUP BY o_orderdate ORDER BY o_orderdate DESC LIMIT 1

Of the orders with a lower delivery priority , how many have an urgent priority order ?

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


Question: List all patients who first came to the hospital after year 1992 with prothrombin time (PT) level that are normal.

SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.`First Date`) > '1992' AND T2.PT < 14

List all patients who first came to the hospital after year 1992 with prothrombin time ( PT ) level that are normal .

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


Question: Provide the platform where the Panzer Tactics can be played.

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

Provide the platform where the Panzer Tactics can be played .


Question: Among all the devices with event no.2 happening, what is the percentage of the device being a vivo phone?

SELECT SUM(IIF(T2.phone_brand = 'vivo', 1, 0)) / COUNT(T1.device_id) AS per FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE T1.event_id = '2'

Among all the devices with event no.2 happening , what is the percentage of the device being a vivo phone ?

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


Question: How many person have a projected yearly sales of no more than 50,000?

SELECT COUNT(BusinessEntityID) FROM SalesPersonQuotaHistory WHERE SalesQuota < 500000

How many person have a projected yearly sales of no more than 50,000 ?

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


Question: How many courses does the student with id 171 actually attend?

SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171

How many courses does the student with i d 171 actually attend ?

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


Question: Find the percentage of restaurant in Napa Valley.

SELECT CAST(SUM(IIF(region = 'Napa Valley', 1, 0)) AS REAL) * 100 / COUNT(region) FROM geographic

Find the percentage of restaurant in Napa Valley .


Question: Among the movie in which Dariusz Wolski works as the director of photography, what is the title of the one with the highest average vote?

SELECT T1.title FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography' ORDER BY T1.vote_average DESC LIMIT 1

Among the movie in which Dariusz Wolski works as the director of photography , what is the title of the one with the highest average vote ?

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


Question: What is the average occurrence of the word "grec" on each Wikipedia page that has this word?

SELECT CAST(SUM(T2.occurrences) AS REAL) / COUNT(T1.wid) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'grec'

What is the average occurrence of the word " grec " on each Wikipedia page that has this word ?

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