Question: Among the clients born between 1980 and 2000, list the name of male clients who complained through referral.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral'

Among the clients born between 1980 and 2000 , list the name of male clients who complained through referral .

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


Question: Who is the dumbest superhero?

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Intelligence' ORDER BY T2.attribute_value LIMIT 1


Question: Who is the customer from the East region that purchased the order with the highest profit?

SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' ORDER BY T1.Profit DESC LIMIT 1

Who is the customer from the East region that purchased the order with the highest profit ?

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


Question: What are the names of manufacturers with revenue greater than the average of all revenues?

SELECT name FROM manufacturers WHERE revenue  >  (SELECT avg(revenue) FROM manufacturers)

What are the names of manufacturers with revenue greater than the average of all revenues ?

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


Question: What is the title of the course with Differential Geometry as a prerequisite?

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

What is the title of the course with Differential Geometry as a prerequisite ?

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


Question: Which state is Outagamie County in? Give the full name of the state.

SELECT DISTINCT T2.name FROM country AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.county = 'OUTAGAMIE'

Which state is Outagamie County in ? Give the full name of the state .

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


Question: In which year did university ID 1 have the most students?

SELECT year FROM university_year WHERE university_id = 1 ORDER BY num_students DESC LIMIT 1

In which year did university ID 1 have the most students ?

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


Question: List the personal names and family names of all the students in alphabetical order of family name.

SELECT personal_name ,  family_name FROM Students ORDER BY family_name

List the personal names and family names of all the students in alphabetical order of family name .

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


Question: What is the name of the player who has been chosen the most times for 'Man of the Series'?

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

What is the name of the player who has been chosen the most times for ' Man of the Series ' ?

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


Question: Describe the full names, emails and intelligence of the students with the highest capability and salary.

SELECT f_name, l_name, email, intelligence FROM student WHERE student_id IN ( SELECT student_id FROM RA WHERE salary = 'high' AND capability = ( SELECT MAX(capability) FROM RA ) )

Describe the full names , emails and intelligence of the students with the highest capability and salary .

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


Question: Find the name and internet web of the channel that is directed by the most directors.

SELECT t1.name ,  t1.internet FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id  =  t2.channel_id GROUP BY t1.channel_id ORDER BY count(*) DESC LIMIT 1

Find the name and internet web of the channel that is directed by the most directors .

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


Question: How many films in the horror category were included in PG-13-rated?

SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rating = 'PG-13'

How many films in the horror category were included in PG-13 - rated ?

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


Question: Compute the average active time span of contact channels.

SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels

Compute the average active time span of contact channels .


Question: For each zip code, return the average mean temperature of August there.

SELECT zip_code  ,  avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code

For each zip code , return the average mean temperature of August there .

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


Question: What is the page count for menu with page ID of 130?

SELECT T1.page_count FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.id = 130

What is the page count for menu with page ID of 130 ?

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


Question: List down the name of strategy games.

SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Strategy'


Question: Among the players who use the right hand as their batting hand, how many of them were born after 1985?

SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'

Among the players who use the right hand as their batting hand , how many of them were born after 1985 ?

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


Question: Count the number of different parties.

SELECT count(DISTINCT party_name) FROM party


Question: List the object number of railways that do not have any trains.

SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)

List the object number of railways that do not have any trains .

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


Question: What are the names of the ships  that are from either the US or the UK?

SELECT Name FROM ship WHERE Nationality  =  "United States" OR Nationality  =  "United Kingdom"

What are the names of the ships that are from either the US or the UK ?

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


Question: How many assets does each third party company supply? List the count and the company id.

SELECT count(*) ,  T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id  =  T2.supplier_company_id GROUP BY T1.company_id

How many assets does each third party company supply ? List the count and the company i d.

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


Question: What is the year and semester with the most courses?

SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1

What is the year and semester with the most courses ?


Question: What are the names of banks that have loaned money to customers with credit scores below 100?

SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100

What are the names of banks that have loaned money to customers with credit scores below 100 ?

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


Question: What is the largest supplier's account balance?

What is the largest supplier 's account balance ?


Question: Calculate the average production rate per year from 1971 to 1980. Among them, name the cars with a weight of fewer than 1800 lbs.

SELECT CAST(COUNT(T1.ID) AS REAL) / 9 FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 UNION ALL SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 AND T2.weight < 1800

Calculate the average production rate per year from 1971 to 1980 . Among them , name the cars with a weight of fewer than 1800 lbs .

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


Question: Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press.

SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Free Press' AND STRFTIME('%Y', T1.publication_date) BETWEEN '1990' AND '2000' ORDER BY T1.num_pages DESC LIMIT 1

Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press .

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


Question: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.

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

Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance .

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


Question: What are the maximum and minimum points of drivers.

SELECT max(Points) ,  min(Points) FROM driver

What are the maximum and minimum points of drivers .

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


Question: What is the most widely used shipping company in the United States of America?

SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCountry = 'USA' GROUP BY T2.CompanyName ORDER BY COUNT(T2.CompanyName) DESC LIMIT 1

What is the most widely used shipping company in the United States of America ?

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


Question: Please list the IDs of all the images with more than 2 pairs of object samples with the relation "parked on".

SELECT T2.IMG_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.PRED_CLASS = 'parked on' AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID GROUP BY T2.IMG_ID HAVING COUNT(T2.IMG_ID) > 2

Please list the IDs of all the images with more than 2 pairs of object samples with the relation " parked on " .

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


Question: What is the area of Egypt as a percentage of Asia?

SELECT T1.Area * 100 / T3.Area FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent WHERE T3.Name = 'Asia' AND T1.Name = 'Egypt'

What is the area of Egypt as a percentage of Asia ?

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


Question: How many Jewish legislators do not have facebook?

SELECT COUNT(T3.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook IS NULL GROUP BY T1.bioguide_id ) T3

How many Jewish legislators do not have facebook ?


Question: Show the names of regions that have more than one building.

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

Show the names of regions that have more than one building .

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


Question: Please list all display names of users who are adults.

SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65

Please list all display names of users who are adults .

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


Question: How many teachers does the student named CHRISSY NABOZNY have?

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

How many teachers does the student named CHRISSY NABOZNY have ?

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


Question: Which friend of Zach has the longest-lasting friendship?

SELECT friend FROM PersonFriend WHERE name =  'Zach' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')

Which friend of Zach has the longest - lasting friendship ?

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


Question: Give id of the instructor who advises students in the History department.

SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  'History'

Give i d of the instructor who advises students in the History department .

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


Question: How many competitors were there who participated in 2000 Summer with age 31?

SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2000 Summer' AND T2.age = 31

How many competitors were there who participated in 2000 Summer with age 31 ?

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


Question: Based on all user compliments, find the percentage of low number of compliments on all compliments ID.

SELECT CAST(SUM(CASE WHEN number_of_compliments = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(user_id) FROM Users_compliments

Based on all user compliments , find the percentage of low number of compliments on all compliments ID .

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


Question: What are the details of the project that is producing both patents and papers as outcomes?

SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  'Patent'

What are the details of the project that is producing both patents and papers as outcomes ?

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


Question: Which major has between 2 and 30 number of students? List major and the number of students.

SELECT Major ,  count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 30;

Which major has between 2 and 30 number of students ? List major and the number of students .

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


Question: Show the first year and last year of parties with theme "Spring" or "Teqnology".

SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "Spring" OR Party_Theme  =  "Teqnology"

Show the first year and last year of parties with theme " Spring " or " Teqnology " .

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


Question: What is the age of the tallest person?

SELECT Age FROM people ORDER BY Height DESC LIMIT 1


Question: How many students are from each city, and which cities have more than one cities?

SELECT count(*) ,  city_code FROM student GROUP BY city_code HAVING count(*)  >  1

How many students are from each city , and which cities have more than one cities ?

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


Question: What is the last name of the musician that have produced the most number of songs?

SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1

What is the last name of the musician that have produced the most number of songs ?

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


Question: List all the name of customers who have orders that are still processing.

SELECT t2.customerName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.status = 'In Process'

List all the name of customers who have orders that are still processing .

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


Question: What are the paper IDs of papers presented in conferences has a homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/"?

SELECT T1.Id FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%'

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


Question: Calculate the percentage of female students.

SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name

Calculate the percentage of female students .


Question: What is the organization(s) that has 'National Society' as member type.

SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T2.Type = 'National Society'

What is the organization(s ) that has ' National Society ' as member type .

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


Question: What is the postal code of the address 692 Joliet Street?

SELECT postal_code FROM address WHERE address = '692 Joliet Street'

What is the postal code of the address 692 Joliet Street ?

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


Question: Show the name and the nationality of the oldest host.

SELECT Name ,  Nationality FROM HOST ORDER BY Age DESC LIMIT 1

Show the name and the nationality of the oldest host .

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


Question: How many orders has each gender of customers placed?

SELECT T1.gender_code ,  count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.gender_code

How many orders has each gender of customers placed ?


Question: In which streets of the city of San Francisco are there restaurants that serve seafood?

SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.city = 'san francisco' AND T2.food_type = 'seafood' AND street_name IS NOT NULL

In which streets of the city of San Francisco are there restaurants that serve seafood ?

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


Question: What is the average and maximum number of total passengers for train stations in London or Glasgow?

SELECT avg(total_passengers) ,  max(total_passengers) FROM station WHERE LOCATION  =  'London' OR LOCATION  =  'Glasgow'

What is the average and maximum number of total passengers for train stations in London or Glasgow ?

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


Question: What kind of expenses incurred by members who have X-Large in size of tee shirt?

SELECT T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.t_shirt_size = 'X-Large'

What kind of expenses incurred by members who have X - Large in size of tee shirt ?

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


Question: What time did the the 2010's Formula_1 race took place on the Abu Dhabi Circuit?

SELECT T2.date, T2.time FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2010 AND T2.name = 'Abu Dhabi Grand Prix'

What time did the the 2010 's Formula_1 race took place on the Abu Dhabi Circuit ?

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


Question: What is the phone number of address No.72?

SELECT phone FROM address WHERE address_id = '72'

What is the phone number of address No.72 ?


Question: What is the document type name for the document with name "How to read a book"?

SELECT T2.document_type_name FROM All_documents AS T1 JOIN Ref_document_types AS T2 ON T1.document_type_code  =  T2.document_type_code WHERE T1.document_name  =  "How to read a book"

What is the document type name for the document with name " How to read a book " ?

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


Question: How much is the minimum salary given to the position with the most complex work?

SELECT minsalary FROM position ORDER BY educationrequired DESC LIMIT 1

How much is the minimum salary given to the position with the most complex work ?

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


Question: Provide the match IDs which were held on 18th April 2015.

SELECT Match_Id FROM Match WHERE Match_Date LIKE '%2015-04-18%'

Provide the match IDs which were held on 18th April 2015 .


Question: What is the proportion of action movies directors who are called 'box office success paradox'?

SELECT CAST(SUM(IIF(T2.avg_revenue > T2.d_quality, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN directors AS T2 ON T1.directorid = T2.directorid WHERE T1.genre = 'Action'

What is the proportion of action movies directors who are called ' box office success paradox ' ?

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


Question: List the name, nationality and id of all male architects ordered by their names lexicographically.

SELECT name ,  nationality ,  id FROM architect WHERE gender  =  'male' ORDER BY name

List the name , nationality and i d of all male architects ordered by their names lexicographically .

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


Question: Show different types of ships and the average tonnage of ships of each type.

SELECT TYPE ,  avg(Tonnage) FROM ship GROUP BY TYPE

Show different types of ships and the average tonnage of ships of each type .

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


Question: How many root beers did Tom Hanks purchase between 2015 to 2016?

SELECT COUNT(T2.RootBeerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Tom' AND T1.Last = 'Hanks' AND T2.TransactionDate BETWEEN '2015-01-01' AND '2016-12-31'

How many root beers did Tom Hanks purchase between 2015 to 2016 ?

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


Question: What was the most common answer for the question "What country do you work in?"?

SELECT T1.AnswerText FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext = 'What country do you work in?' GROUP BY T1.AnswerText ORDER BY COUNT(T1.AnswerText) DESC LIMIT 1

What was the most common answer for the question " What country do you work in ? " ?

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


Question: Select the warehouse code and the average value of the boxes in each warehouse.

SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse

Select the warehouse code and the average value of the boxes in each warehouse .

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


Question: What's the nickname for Dan Castellaneta?

SELECT nickname FROM Person WHERE name = 'Dan Castellaneta';

What 's the nickname for Dan Castellaneta ?


Question: Find the name of projects that require between 100 and 300 hours of work.

SELECT name FROM projects WHERE hours BETWEEN 100 AND 300

Find the name of projects that require between 100 and 300 hours of work .

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


Question: For each headquarter, what are the headquarter and how many companies are centered there?

SELECT headquarters ,  count(*) FROM company GROUP BY headquarters

For each headquarter , what are the headquarter and how many companies are centered there ?

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


Question: For what grade was the project "Too Close for Comfort" for?

SELECT T1.grade_level FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Too Close for Comfort'

For what grade was the project " Too Close for Comfort " for ?

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


Question: What are the types and nationalities of every ship?

What are the types and nationalities of every ship ?


Question: How many work orders with quantities ranging from 100 to 250 have a reorder point of no more than 375?

SELECT COUNT(T1.TransactionID) FROM TransactionHistory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Quantity BETWEEN 100 AND 250 AND T2.ReorderPoint <= 375

How many work orders with quantities ranging from 100 to 250 have a reorder point of no more than 375 ?

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


Question: What is the most common type of weapon that causes death?

SELECT subject_weapon FROM incidents WHERE subject_statuses = 'Deceased' GROUP BY subject_weapon ORDER BY COUNT(case_number) DESC LIMIT 1

What is the most common type of weapon that causes death ?

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


Question: Return the dates of ceremony corresponding to music festivals that had the category "Best Song" and result "Awarded".

SELECT Date_of_ceremony FROM music_festival WHERE Category  =  "Best Song" AND RESULT  =  "Awarded"

Return the dates of ceremony corresponding to music festivals that had the category " Best Song " and result " Awarded " .

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


Question: What is the total number of students enrolled in schools without any goalies?

SELECT sum(enr) FROM college WHERE cName NOT IN (SELECT cName FROM tryout WHERE pPos  =  "goalie")

What is the total number of students enrolled in schools without any goalies ?

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


Question: What is highest rating between sailors?

What is highest rating between sailors ?


Question: What are the ids of Cookies whose price is lower than any Croissant?

SELECT id FROM goods WHERE food  =  "Cookie" AND price  <  (SELECT min(price) FROM goods WHERE food  =  'Croissant')

What are the ids of Cookies whose price is lower than any Croissant ?

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


Question: Find all the building full names containing the word "court".

SELECT building_full_name FROM Apartment_Buildings WHERE building_full_name LIKE "%court%"

Find all the building full names containing the word " court " .

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


Question: From 1962 to 2011, how many coaches received both NBA and ABA awards?

SELECT COUNT(DISTINCT coachID) FROM awards_coaches WHERE year BETWEEN 1962 AND 2011 AND award = 'ABA Coach of the Year' AND coachID IN ( SELECT coachID FROM awards_coaches WHERE year BETWEEN 1962 AND 2011 AND award = 'NBA Coach of the Year' )

From 1962 to 2011 , how many coaches received both NBA and ABA awards ?

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


Question: Write down the region and name of the sale team ID of 18 and compare their orders between in-store and online.

SELECT T2.Region, T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.SalesTeamID = 18 AND T1.`Sales Channel` = 'In-Store' OR T1.`Sales Channel` = 'Online'

Write down the region and name of the sale team ID of 18 and compare their orders between in - store and online .

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


Question: What are the names of the courses in alphabetical order?

SELECT course_name FROM courses ORDER BY course_name

What are the names of the courses in alphabetical order ?


Question: Find the average and total capacity of all warehouses.

SELECT avg(capacity) ,  sum(capacity) FROM warehouses

Find the average and total capacity of all warehouses .


Question: What's the unconverted mana cost of the card "Ancestor's Chosen"?

SELECT DISTINCT manaCost FROM cards WHERE name = 'Ancestor''s Chosen'

What 's the unconverted mana cost of the card " Ancestor 's Chosen " ?

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


Question: What is the category for the "Moist Boys" podcast?

SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Moist Boys' )

What is the category for the " Moist Boys " podcast ?

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


Question: Return the id of the department with the fewest staff assignments.

SELECT department_id FROM staff_department_assignments GROUP BY department_id ORDER BY count(*) LIMIT 1

Return the i d of the department with the fewest staff assignments .

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


Question: Among the calls from California, what percentage are priority 1?

SELECT CAST(SUM(CASE WHEN T1.priority = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.priority) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id INNER JOIN state AS T4 ON T3.state_abbrev = T4.StateCode WHERE T4.State = 'California'

Among the calls from California , what percentage are priority 1 ?

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


Question: In complaints about the credit card product, list the phone number of the oldest client.

SELECT T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card' ORDER BY T1.age DESC LIMIT 1

In complaints about the credit card product , list the phone number of the oldest client .

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


Question: What is the credit card number for the sales order "45793"?

SELECT T2.CardNumber FROM SalesOrderHeader AS T1 INNER JOIN CreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID WHERE T1.SalesOrderID = 45793

What is the credit card number for the sales order " 45793 " ?

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


Question: List out which business category that are most likely to have average good review in Arizona?

SELECT DISTINCT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T2.state LIKE 'AZ' AND T1.review_stars >= 3

List out which business category that are most likely to have average good review in Arizona ?

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


Question: How many different instruments are used in the song "Badlands"?

SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Badlands"

How many different instruments are used in the song " Badlands " ?

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


Question: How many rooms have king beds? Report the number for each decor type.

SELECT decor ,  count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;

How many rooms have king beds ? Report the number for each decor type .

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


Question: What is the average number of points for players from the "AIB" club?

SELECT avg(T2.Points) FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID WHERE T1.name  =  "AIB"

What is the average number of points for players from the " AIB " club ?

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


Question: What is the shortest trip made starting from Franklin at Maple and what is the maximum wind speed at that date?

SELECT MIN(T1.duration), MAX(T2.max_wind_Speed_mph) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.start_station_name = 'Franklin at Maple' AND T2.date = '9/4/2013'

What is the shortest trip made starting from Franklin at Maple and what is the maximum wind speed at that date ?

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


Question: What are the states with colleges that have enrollments less than the some other college?

SELECT DISTINCT state FROM college WHERE enr  <  (SELECT max(enr) FROM college)

What are the states with colleges that have enrollments less than the some other college ?

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


Question: Return the phone number of the customer who filed the complaint that was raised most recently.

SELECT t1.phone_number FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.date_complaint_raised DESC LIMIT 1

Return the phone number of the customer who filed the complaint that was raised most recently .

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


Question: How many settlements are there in total?

How many settlements are there in total ?


Question: Provide the number of events participated by the device users at coordinates of (80,37).

SELECT COUNT(event_id) FROM events WHERE longitude = 80 AND latitude = 37

Provide the number of events participated by the device users at coordinates of ( 80,37 ) .

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


Question: List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15.

SELECT DISTINCT T2.Hardware_Model_name , T2.Company_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.used_kb BETWEEN 10 AND 15;

List the phone hardware model and company name for the phones whose screen usage in kb is between 10 and 15 .

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


Question: How many performances have a stage presence score less than 7 or higher than 9?

SELECT count(*) FROM performance_score WHERE stage_presence  <  7 OR stage_presence  >  9

How many performances have a stage presence score less than 7 or higher than 9 ?

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


Question: Return the total number of championships of institutions that have a Public affiliation.

SELECT sum(T1.Number_of_Championships) FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T2.Affiliation  =  "Public"

Return the total number of championships of institutions that have a Public affiliation .

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


Question: Tell the country name of the supplier for "Scottish Longbreads".

SELECT T2.Country FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Scottish Longbreads'

Tell the country name of the supplier for " Scottish Longbreads " .

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


Question: Which country has the most restaurants with Italian food?

SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'Italian' GROUP BY T2.county ORDER BY COUNT(T1.id_restaurant) DESC LIMIT 1

Which country has the most restaurants with Italian food ?

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


Question: Count the number of coutries.

SELECT count(DISTINCT country) FROM City


Question: Count the number of products of the type Hardware.

SELECT count(*) FROM Products WHERE product_type_code  =  "Hardware"

Count the number of products of the type Hardware .


Question: How many organizations are established after 1999/1/1 in a country whose GDP is under 500000?

SELECT T1.Country, COUNT(T1.Country) FROM economy AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T1.GDP < 500000 AND STRFTIME('%Y', T2.Established) < '1999' GROUP BY T1.Country

How many organizations are established after 1999/1/1 in a country whose GDP is under 500000 ?

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


Question: From the total amount of donation to projects, what is the percentage of the amount is for school projects located in the rural area?

SELECT CAST(SUM(CASE WHEN T2.school_metro = 'rural' THEN T1.donation_to_project ELSE 0 END) AS REAL) * 100 / SUM(donation_to_project) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid

From the total amount of donation to projects , what is the percentage of the amount is for school projects located in the rural area ?

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


Question: Among the flights with air carrier described as Asap Air Inc.: ASP, what is the tail number of the flight with the longest departure delay?

SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Asap Air Inc.: ASP' ORDER BY T2.DEP_DELAY DESC LIMIT 1

Among the flights with air carrier described as Asap Air Inc. : ASP , what is the tail number of the flight with the longest departure delay ?

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


Question: What are the names of customers with checking balances lower than the average checking balance?

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

What are the names of customers with checking balances lower than the average checking balance ?

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


Question: Show the names of products that are in at least two events.

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

Show the names of products that are in at least two events .


Question: How many ratings on the movie "A Way of Life" are made after the year 2011?

SELECT COUNT(T1.rating_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.rating_timestamp_utc >= '2012-01-01'

How many ratings on the movie " A Way of Life " are made after the year 2011 ?

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


Question: Identify the number of movies rented by Maria Miller.

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

Identify the number of movies rented by Maria Miller .


Question: What is the postal code of the street address of the account that is latest updated?

SELECT PostalCode FROM Address ORDER BY ModifiedDate DESC LIMIT 1

What is the postal code of the street address of the account that is latest updated ?

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


Question: What are the total number of students who are living in a male dorm?

SELECT count(*) FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.gender  =  'M'

What are the total number of students who are living in a male dorm ?

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


Question: In episode nominated in Annie Awards, how many of the episodes have a percent greater than 6?

SELECT COUNT(*) FROM Award AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.organization = 'Annie Awards' AND T1.result = 'Nominee' AND T2.percent > 6;

In episode nominated in Annie Awards , how many of the episodes have a percent greater than 6 ?

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


Question: What is the ratio of male to female patients among all those with abnormal uric acid counts?

SELECT CAST(SUM(CASE WHEN T2.UA <= 8.0 AND T1.SEX = 'M' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.UA <= 6.5 AND T1.SEX = 'F' THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID

What is the ratio of male to female patients among all those with abnormal uric acid counts ?

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


Question: What is the highest price of the dish "Chicken gumbo" on a menu page?

SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Chicken gumbo' ORDER BY T2.price DESC LIMIT 1

What is the highest price of the dish " Chicken gumbo " on a menu page ?

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


Question: What is the name of the publisher that published the most books?

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1

What is the name of the publisher that published the most books ?

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


Question: What are the bond type for atoms with element Tin?

SELECT DISTINCT T3.bond_type FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T3.bond_id = T2.bond_id WHERE T1.element = 'sn'

What are the bond type for atoms with element Tin ?

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


Question: What is the language used most often in the songs?

SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1

What is the language used most often in the songs ?


Question: What's the description of the series code SM.POP.TOTL for Aruba?

SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'SM.POP.TOTL'

What 's the description of the series code SM.POP.TOTL for Aruba ?

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


Question: Calculate the average score of Emory University from 2011 to 2016.

SELECT AVG(T1.score) FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Emory University' AND T1.year BETWEEN 2011 AND 2016

Calculate the average score of Emory University from 2011 to 2016 .

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


Question: List the names of pilots in ascending order of rank.

SELECT Pilot_name FROM pilot ORDER BY Rank ASC

List the names of pilots in ascending order of rank .

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


Question: What is the gender of the youngest user?

SELECT gender FROM gender_age WHERE age = ( SELECT MIN(age) FROM gender_age )

What is the gender of the youngest user ?


Question: What is the name of the list that was updated most recently?

SELECT list_title FROM lists WHERE list_update_timestamp_utc = ( SELECT list_update_timestamp_utc FROM lists ORDER BY list_update_timestamp_utc DESC LIMIT 1 )

What is the name of the list that was updated most recently ?


Question: How many disabled students have never been absent from school?

SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` = 0

How many disabled students have never been absent from school ?

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


Question: Return the minimum and maximum crime rates across all counties.

SELECT min(Crime_rate) ,  max(Crime_rate) FROM county_public_safety

Return the minimum and maximum crime rates across all counties .

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


Question: Which document has the most draft copies? List its document id and number of draft copies.

SELECT document_id , count(copy_number) FROM Draft_Copies GROUP BY document_id ORDER BY count(copy_number) DESC LIMIT 1;

Which document has the most draft copies ? List its document i d and number of draft copies .

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


Question: How many book clubs are there?


Question: What is the most common analytical layer type code?

SELECT analytical_layer_type_code FROM analytical_layer GROUP BY analytical_layer_type_code ORDER BY count(*) DESC LIMIT 1

What is the most common analytical layer type code ?

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


Question: What are the names of all the teams in the basketball competition, sorted by all home scores in descending order?

SELECT team_name FROM basketball_match ORDER BY All_Home DESC

What are the names of all the teams in the basketball competition , sorted by all home scores in descending order ?

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


Question: How many drivers managed to finish the race in the 2008 Australian Grand Prix?

SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.name = 'Australian Grand Prix' AND T1.year = 2008 AND T2.time IS NOT NULL

How many drivers managed to finish the race in the 2008 Australian Grand Prix ?

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


Question: In what year was the artist who created a painting in 1884 born?

SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  =  1884 AND mediumOn  =  "canvas"

In what year was the artist who created a painting in 1884 born ?

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


Question: Which part fault requires the most number of skills to fix? List part id and name.

SELECT T1.part_id ,  T1.part_name FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id  =  T2.part_id JOIN Skills_Required_To_Fix AS T3 ON T2.part_fault_id  =  T3.part_fault_id GROUP BY T1.part_id ORDER BY count(*) DESC LIMIT 1

Which part fault requires the most number of skills to fix ? List part i d and name .

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


Question: How many tracks are in each genre?

SELECT count(*) ,  T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;


Question: Provide the allergen of the Dominican patient named Dirk Languish.

SELECT T1.DESCRIPTION FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Dirk' AND T2.last = 'Langosh' AND T2.ethnicity = 'dominican'

Provide the allergen of the Dominican patient named Dirk Languish .

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


Question: Find the average number of customers in all banks of Utah state.

SELECT avg(no_of_customers) FROM bank WHERE state  =  'Utah'

Find the average number of customers in all banks of Utah state .

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


Question: How much would be the total sales profit for shopping cart ID 20621 ?

SELECT SUM((T1.ListPrice - T1.StandardCost) * T2.Quantity) FROM Product AS T1 INNER JOIN ShoppingCartItem AS T2 ON T1.ProductID = T2.ProductID WHERE T2.ShoppingCartID = 20621

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


Question: How many tweets are posted by male users in Argentina?

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T1.UserID = T3.UserID WHERE T3.Gender = 'Male' AND T2.Country = 'Argentina'

How many tweets are posted by male users in Argentina ?

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


Question: How many Yelp businesses are opened 24 hours?

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

How many Yelp businesses are opened 24 hours ?

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


Question: How many courses were taught by more than 4 people?

SELECT COUNT(*) FROM ( SELECT COUNT(course_id) FROM taughtBy GROUP BY course_id HAVING COUNT(course_id) > 4 )

How many courses were taught by more than 4 people ?

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


Question: What is the title of the film that has the highest high market estimation.

SELECT t1.title FROM film AS T1 JOIN film_market_estimation AS T2  ON T1.Film_ID  =  T2.Film_ID ORDER BY high_estimate DESC LIMIT 1

What is the title of the film that has the highest high market estimation .

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


Question: How many questions did user No.5 answer?

SELECT COUNT(QuestionID) FROM Answer WHERE UserID = 5

How many questions did user No.5 answer ?

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


Question: What is the biggest discount among all orders for the part "burnished seashell gainsboro navajo chocolate"?

SELECT MAX(T1.l_discount) FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name = 'burnished seashell gainsboro navajo chocolate'

What is the biggest discount among all orders for the part " burnished seashell gainsboro navajo chocolate " ?

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


Question: Among the products ordered in order no. 10248, which product has the biggest ratio of units on order to units in stock?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.UnitsOnOrder / T1.UnitsInStock DESC LIMIT 1

Among the products ordered in order no . 10248 , which product has the biggest ratio of units on order to units in stock ?

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


Question: Find the first names and last names of the authors whose institution affiliation is "Google".

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

Find the first names and last names of the authors whose institution affiliation is " Google " .

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


Question: For each grant id, how many documents does it have, and which one has the most?

SELECT grant_id ,  count(*) FROM Documents GROUP BY grant_id ORDER BY count(*) DESC LIMIT 1

For each grant i d , how many documents does it have , and which one has the most ?

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


Question: What is the total installs of apps with content rating of adults only 18+ and what are the translated reviews of it?

SELECT SUM(T1.Installs), T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1."Content Rating" = 'Adults only 18+'

What is the total installs of apps with content rating of adults only 18 + and what are the translated reviews of it ?

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


Question: List the names of all distinct nurses ordered by alphabetical order?

SELECT DISTINCT name FROM nurse ORDER BY name

List the names of all distinct nurses ordered by alphabetical order ?


Question: Please list any three line item numbers that have 10% off.

SELECT l_linenumber FROM lineitem WHERE l_discount = 0.1 LIMIT 3

Please list any three line item numbers that have 10 % off .

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


Question: Return the different nominees of musicals that have an award that is not the Tony Award.

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

Return the different nominees of musicals that have an award that is not the Tony Award .

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


Question: What are the names and ages of editors?

What are the names and ages of editors ?


Question: Give the full name of the legislators with an independent party.

SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name

Give the full name of the legislators with an independent party .

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


Question: What is the name and country of origin of the artist who released a song that has "love" in its title?

SELECT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.song_name LIKE "%love%"

What is the name and country of origin of the artist who released a song that has " love " in its title ?

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


Question: On average, how many players from each country bat with their right hand?

SELECT CAST(SUM(CASE WHEN T1.Batting_hand = 'Right-hand bat' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Country_Name) FROM Batting_Style AS T1 INNER JOIN Player AS T2 ON T1.Batting_id = T2.Batting_hand

On average , how many players from each country bat with their right hand ?

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


Question: Return the elimination movies of wrestlers on Team Orton.

SELECT Elimination_Move FROM Elimination WHERE Team  =  "Team Orton"

Return the elimination movies of wrestlers on Team Orton .


Question: Give the distinct headquarters of manufacturers.

SELECT DISTINCT headquarter FROM manufacturers

Give the distinct headquarters of manufacturers .


Question: For each submission, show the author and their affiliated college.

SELECT Author ,  College FROM submission

For each submission , show the author and their affiliated college .

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


Question: How many students are enrolled in some classes that are taught by an accounting professor?

SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN department AS T4 ON T3.dept_code  =  T4.dept_code WHERE T4.dept_name  =  'Accounting'

How many students are enrolled in some classes that are taught by an accounting professor ?

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


Question: How many cups of almonds do you need for a chicken pocket sandwich?

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 = 'Chicken Pocket Sandwich' AND T3.name = 'almonds' AND T2.unit = 'cup(s)'

How many cups of almonds do you need for a chicken pocket sandwich ?

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


Question: Among the badges obtained by csgillespie, how many of them were obtained in the year 2011?

SELECT COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE STRFTIME('%Y', T1.Date) = '2011' AND T2.DisplayName = 'csgillespie'

Among the badges obtained by csgillespie , how many of them were obtained in the year 2011 ?

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


Question: Show the authors of submissions and the acceptance results of their submissions.

SELECT T2.Author ,  T1.Result FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID

Show the authors of submissions and the acceptance results of their submissions .

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


Question: Return the name and max speed of the storm that affected the most regions.

SELECT T1.name ,  T1.max_speed FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id ORDER BY count(*) DESC LIMIT 1

Return the name and max speed of the storm that affected the most regions .

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


Question: For the male patients that have a normal prothrombin time, what is their average prothrombin time?

SELECT AVG(T2.PT) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PT < 14 AND T1.SEX = 'M'

For the male patients that have a normal prothrombin time , what is their average prothrombin time ?

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


Question: What are the different names and ages of every friend of either Dan or alice?

SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' OR T2.friend  =  'Alice'

What are the different names and ages of every friend of either Dan or alice ?

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


Question: List the studios of each film and the number of films produced by that studio.

SELECT Studio ,  COUNT(*) FROM film GROUP BY Studio

List the studios of each film and the number of films produced by that studio .

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


Question: What is the first and last name of the youngest student with a GPA above 3, and what is their GPA?

SELECT stu_fname ,  stu_lname ,  stu_gpa FROM student WHERE stu_gpa  >  3 ORDER BY stu_dob DESC LIMIT 1

What is the first and last name of the youngest student with a GPA above 3 , and what is their GPA ?

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


Question: On which day was the order placed whose shipment tracking number is 3452?

SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.shipment_tracking_number = 3452

On which day was the order placed whose shipment tracking number is 3452 ?

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


Question: Who is the oldest player?

SELECT Player_Name FROM Player ORDER BY DOB ASC LIMIT 1


Question: Show the organizer and name for churches that opened between 1830 and 1840.

SELECT organized_by ,  name FROM church WHERE open_date BETWEEN 1830 AND 1840

Show the organizer and name for churches that opened between 1830 and 1840 .

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


Question: Between 8/1/2003 and 8/30/2004, how many checks were issued by Mini Gifts Distributors Ltd.? Please list their check numbers.

SELECT T1.checkNumber FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate >= '2003-08-01' AND T1.paymentDate <= '2004-08-30' AND T2.customerName = 'Mini Gifts Distributors Ltd.'

Between 8/1/2003 and 8/30/2004 , how many checks were issued by Mini Gifts Distributors Ltd. ? Please list their check numbers .

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


Question: Which teachers teach the student named EVELINA BROMLEY? Give me the first and last name  of the teachers.

SELECT T2.firstname ,  T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "EVELINA" AND T1.lastname  =  "BROMLEY"

Which teachers teach the student named EVELINA BROMLEY ? Give me the first and last name of the teachers .

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


Question: List down the business ID and attribute value of the attribute name of "payment_types_visa".

SELECT T2.business_id, T2.attribute_value FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name = 'payment_types_visa'

List down the business ID and attribute value of the attribute name of " payment_types_visa " .

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


Question: Show the customer name, customer address city, date from, and date to for each customer address history.

SELECT T2.customer_name ,  T3.city ,  T1.date_from ,  T1.date_to FROM customer_address_history AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id JOIN addresses AS T3 ON T1.address_id  =  T3.address_id

Show the customer name , customer address city , date from , and date to for each customer address history .

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


Question: List out the organization joined and school enrolled by student27, student17 and student101?

SELECT T1.school, T2.organ FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.`name` IN ('student27,student17,studetn101')

List out the organization joined and school enrolled by student27 , student17 and student101 ?

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


Question: What are the dates of the earliest order and the dates of all orders with more than 1 item?

SELECT min(date_order_placed) FROM Orders UNION SELECT T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >  1

What are the dates of the earliest order and the dates of all orders with more than 1 item ?

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


Question: What are the apartment number and the room count of each apartment?

SELECT apt_number ,  room_count FROM Apartments

What are the apartment number and the room count of each apartment ?


Question: Count the number of regions.


Question: How many books did David Foster Wallace write?

SELECT COUNT(T1.title) FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'David Foster Wallace'

How many books did David Foster Wallace write ?

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


Question: List all the mythic rarity print cards banned in gladiator format.

SELECT DISTINCT T1.id FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.format = 'gladiator' AND T2.status = 'Banned' AND T1.rarity = 'mythic'

List all the mythic rarity print cards banned in gladiator format .

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


Question: In businesses with a category of food, how many of them have a star rating below 3?

SELECT COUNT(DISTINCT T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T2.category_id = T3.category_id WHERE T3.category_name = 'Food' AND T1.stars < 3

In businesses with a category of food , how many of them have a star rating below 3 ?

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


Question: Find the name of the customer who made an order most recently.

SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.order_date DESC LIMIT 1

Find the name of the customer who made an order most recently .

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


Question: What are the names and countries of members?

What are the names and countries of members ?


Question: Please check is "limbo dancing" the keyword for title "Dangerous Curves"?

SELECT CASE WHEN T2.Keyword = 'limbo dancing' THEN 'Yes' ELSE 'No' END AS result FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Dangerous Curves';

Please check is " limbo dancing " the keyword for title " Dangerous Curves " ?

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


Question: what are all shipment tracking numbers and shipment dates?

SELECT shipment_tracking_number ,  shipment_date FROM Shipments

what are all shipment tracking numbers and shipment dates ?

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


Question: What are the names of the 3 departments with the most courses?

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

What are the names of the 3 departments with the most courses ?


Question: Name the tallest superhero.

SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1


Question: What percentage do items under the category of 'Furniture' make up the total number of items ordered that are shipped as standard in the West region?

SELECT CAST(SUM(CASE  WHEN T2.Category = 'Furniture' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'West' AND T1.`Ship Mode` = 'Standard Class'

What percentage do items under the category of ' Furniture ' make up the total number of items ordered that are shipped as standard in the West region ?

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


Question: Show the author name and details for the document "Travel to China".

SELECT T2.author_name ,  T2.other_details FROM Documents AS T1 JOIN Authors AS T2 ON T1.author_name  =  T2.author_name WHERE document_name  =  "Travel to China"

Show the author name and details for the document " Travel to China " .

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


Question: Show the first names and last names of all the guests that have apartment bookings with status code "Confirmed".

SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "Confirmed"

Show the first names and last names of all the guests that have apartment bookings with status code " Confirmed " .

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


Question: Compute the average number of hosts for parties.

Compute the average number of hosts for parties .

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


Question: What is "the date in location from" and "the date in location to" for the document with name "Robin CV"?

SELECT T1.date_in_location_from ,  T1.date_in_locaton_to FROM Document_locations AS T1 JOIN All_documents AS T2 ON T1.document_id  =  T2.document_id WHERE T2.document_name  =  "Robin CV"

What is " the date in location from " and " the date in location to " for the document with name " Robin CV " ?

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


Question: What is the name of the team that won match ID 336000?

SELECT T2.Team_Name FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Match_Winner WHERE T1.Match_Id = 336000

What is the name of the team that won match ID 336000 ?

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


Question: How many different roles are there on the project staff?

SELECT count(DISTINCT role_code) FROM Project_Staff

How many different roles are there on the project staff ?

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


Question: What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there?

SELECT Document_Object_ID , count(*) FROM Document_Subset_Members GROUP BY Document_Object_ID HAVING count(*) BETWEEN 2 AND 4;

What are the ids of the dcouments that have between 2 and 4 related documents and how many related items are there ?

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


Question: What are the footnote description of Finland in year 2000?

SELECT DISTINCT T2.Description FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.TableName = 'Finland' AND T2.Year = 'YR2000'

What are the footnote description of Finland in year 2000 ?

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


Question: How many images have less than 15 object samples?

SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_SAMPLE_ID < 15

How many images have less than 15 object samples ?

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


Question: What is the paragraph number with plain text "This is Illyria, lady"?

SELECT ParagraphNum FROM paragraphs WHERE PlainText = 'This is Illyria, lady.'

What is the paragraph number with plain text " This is Illyria , lady " ?

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


Question: List the names of people that have not been on the affirmative side of debates.

SELECT Name FROM people WHERE People_id NOT IN (SELECT Affirmative FROM debate_people)

List the names of people that have not been on the affirmative side of debates .

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


Question: Find the number of students who is older than 20 in each dorm.

SELECT count(*) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T1.age  >  20 GROUP BY T3.dorm_name

Find the number of students who is older than 20 in each dorm .


Question: List out the names of the awarded character in the awards held in 2009.

SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009;

List out the names of the awarded character in the awards held in 2009 .

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


Question: List the first name of all employees with job code PROF ordered by their date of birth.

SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' ORDER BY emp_dob

List the first name of all employees with job code PROF ordered by their date of birth .

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


Question: Provide the full names of employees earning more than the employee with id 163.

SELECT first_name ,  last_name FROM employees WHERE salary  >  (SELECT salary FROM employees WHERE employee_id = 163 )

Provide the full names of employees earning more than the employee with i d 163 .

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


Question: For the professor who advised student no.6, please list the IDs of the courses he or she teaches.

SELECT T2.course_id FROM taughtBy AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id INNER JOIN advisedBy AS T3 ON T3.p_id = T1.p_id WHERE T1.p_id = 9

For the professor who advised student no.6 , please list the IDs of the courses he or she teaches .

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


Question: What are the names and addressed of customers who have both New and Pending orders?

SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "New" INTERSECT SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending"

What are the names and addressed of customers who have both New and Pending orders ?

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


Question: For each city, what is the the city code and sum of distances from each?

SELECT city1_code ,  sum(distance) FROM Direct_distance GROUP BY city1_code

For each city , what is the the city code and sum of distances from each ?

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


Question: For all the club members from "Business" major, how many of them wear medium size t-shirt?

SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Business' AND T1.t_shirt_size = 'Medium'

For all the club members from " Business " major , how many of them wear medium size t - shirt ?

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


Question: What is the percentage of users who experienced event number 6 who have the app installed but do not use the app?

SELECT SUM(IIF(is_installed = 1 AND is_active = 0, 1, 0)) / COUNT(app_id) AS perrcent FROM app_events WHERE event_id = 6

What is the percentage of users who experienced event number 6 who have the app installed but do not use the app ?

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


Question: What is the percentage more for the rental payment for store No.2 than store No.1?

SELECT CAST((SUM(IIF(T2.store_id = 2, T1.amount, 0)) - SUM(IIF(T2.store_id = 1, T1.amount, 0))) AS REAL) * 100 / SUM(IIF(T2.store_id = 1, T1.amount, 0)) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id INNER JOIN store AS T3 ON T2.store_id = T3.store_id

What is the percentage more for the rental payment for store No.2 than store No.1 ?

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


Question: What is the discounted price of line item number 1?

SELECT l_extendedprice * (1 - l_discount) FROM lineitem WHERE l_linenumber = 1

What is the discounted price of line item number 1 ?

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


Question: What are the number of different course codes?

SELECT count(DISTINCT crs_code) FROM CLASS

What are the number of different course codes ?


Question: What are the details of all sales and purchases?

SELECT sales_details FROM sales UNION SELECT purchase_details FROM purchases

What are the details of all sales and purchases ?


Question: To which categories do the podcasts of the reviewer whose id is EFB34EAC8E9397C belong?

SELECT DISTINCT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'EFB34EAC8E9397C'

To which categories do the podcasts of the reviewer whose i d is EFB34EAC8E9397C belong ?

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


Question: What is the name and capacity of the dorm with the fewest amount of amenities?

SELECT T1.dorm_name ,  T1.student_capacity FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid GROUP BY T2.dormid ORDER BY count(*) LIMIT 1

What is the name and capacity of the dorm with the fewest amount of amenities ?

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


Question: What percentage of students who enlisted in the navy make up the number of students enrolled in OCC?

SELECT CAST(SUM(IIF(T1.school = 'occ', 1.0, 0)) AS REAL) * 100 / COUNT(T1.name) FROM enrolled AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'navy'

What percentage of students who enlisted in the navy make up the number of students enrolled in OCC ?

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


Question: What is id about sailors who do not have boat reservations?

SELECT sid FROM Sailors EXCEPT SELECT T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid

What is i d about sailors who do not have boat reservations ?


Question: What is the order priority of the order with the highest total price?

SELECT o_orderpriority FROM orders WHERE o_totalprice = ( SELECT MAX(o_totalprice) FROM orders )

What is the order priority of the order with the highest total price ?

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


Question: Give the coordinate position for Abu Dhabi Grand Prix.

SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Abu Dhabi Grand Prix'

Give the coordinate position for Abu Dhabi Grand Prix .

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


Question: What is the season of the game where a competitor who weighted 73 kg and 180 cm tall, participated?

SELECT DISTINCT T1.season FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.height = 180 AND T3.weight = 73

What is the season of the game where a competitor who weighted 73 kg and 180 cm tall , participated ?

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


Question: How many parks does Atlanta city have?

SELECT count(*) FROM park WHERE city = 'Atlanta';


Question: What are the affiliations of the author "Mark A. Musen" written on and off paper?

SELECT T1.Affiliation FROM PaperAuthor AS T1 INNER JOIN Author AS T2 ON T1.AuthorId = T2.Id WHERE T2.Name = 'Mark A. Musen'

What are the affiliations of the author " Mark A. Musen " written on and off paper ?

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


Question: Among the employees, give me the full names of those who have less than 4 territories.

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.EmployeeID < 4

Among the employees , give me the full names of those who have less than 4 territories .

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


Question: List all the football player with the highest balance score and potential score of 61.

SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.potential = '61' ORDER BY t2.balance DESC LIMIT 1

List all the football player with the highest balance score and potential score of 61 .

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


Question: Name the coin under the token category that gives the highest max profit.

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.category = 'token' ORDER BY T2.high - T2.low DESC LIMIT 1

Name the coin under the token category that gives the highest max profit .

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


Question: For the order has the most product ordered, name the customer who placed the order.

SELECT T2.firstName, T2.lastName FROM offices AS T1 INNER JOIN employees AS T2 ON T1.officeCode = T2.officeCode WHERE T2.employeeNumber = ( SELECT MAX(employeeNumber) FROM employees )

For the order has the most product ordered , name the customer who placed the order .

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


Question: What are the student IDs and middle names of the students enrolled in at most two courses?

SELECT T1.student_id ,  T2.middle_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  <=  2

What are the student IDs and middle names of the students enrolled in at most two courses ?

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


Question: Was the user who created the "World War 2 and Kids" list eligible for trial when he created the list? Indicate how many followers does the said list has.

SELECT T2.user_eligible_for_trial, T1.list_followers FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T1.user_id AND T1.list_id = T2.list_id WHERE T1.list_title = 'World War 2 and Kids'

Was the user who created the " World War 2 and Kids " list eligible for trial when he created the list ? Indicate how many followers does the said list has .

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


Question: List all the films that Karl Berr starred in and rated as PG.

SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'KARL' AND T1.last_name = 'BERRY' AND T3.rating = 'PG'

List all the films that Karl Berr starred in and rated as PG .

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


Question: How much is the size of Browser 4G and how many users have a pretty positive favorability on it?

SELECT T1.Size, COUNT(T1.App) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Browser 4G' AND T2.Sentiment_Polarity >= 0.5

How much is the size of Browser 4 G and how many users have a pretty positive favorability on it ?

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


Question: What is the display name of the user who acquired the highest amount of badges?

SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId GROUP BY T1.DisplayName ORDER BY COUNT(T1.Id) DESC LIMIT 1

What is the display name of the user who acquired the highest amount of badges ?

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


Question: State the employee who are born in or after 1970 and with the least sick leave hour.

SELECT T2.FirstName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T1.BirthDate) > '1970' ORDER BY T1.SickLeaveHours LIMIT 1

State the employee who are born in or after 1970 and with the least sick leave hour .

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


Question: List all words cited in the AI class label.

SELECT DISTINCT T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'AI'

List all words cited in the AI class label .

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


Question: Which cities hosted at least 3 Olympic games?

SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id GROUP BY T2.id HAVING COUNT(T1.games_id) >= 3

Which cities hosted at least 3 Olympic games ?


Question: What is the rating of each restaurant reviews on Atlantic Ave?

SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'atlantic ave'

What is the rating of each restaurant reviews on Atlantic Ave ?

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


Question: What is the average and maximum number of hours students who made the team practiced?

SELECT avg(T1.HS) ,  max(T1.HS) FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes'

What is the average and maximum number of hours students who made the team practiced ?


Question: How much is the Peugeot 505s Turbo Diesel?

SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'peugeot 505s turbo diesel'

How much is the Peugeot 505s Turbo Diesel ?

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


Question: Find the average prices of all products from each manufacture, and list each company's name.

SELECT avg(T1.price) ,  T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.name

Find the average prices of all products from each manufacture , and list each company 's name .

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


Question: What are the names and buying prices of all the products?

SELECT product_name ,  typical_buying_price FROM products

What are the names and buying prices of all the products ?

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


Question: What are the names of wines made from red grapes?

SELECT DISTINCT T2.Name FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape WHERE T1.Color  =  "Red"

What are the names of wines made from red grapes ?

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


Question: What are the names of players in ascending order of wins count?

SELECT Name FROM player ORDER BY Wins_count ASC

What are the names of players in ascending order of wins count ?


Question: What is the average account balance of customers with credit score below 50 for the different account types?

SELECT avg(acc_bal) ,  acc_type FROM customer WHERE credit_score  <  50 GROUP BY acc_type

What is the average account balance of customers with credit score below 50 for the different account types ?

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


Question: From the 'Injured' statuses of the subject, what is the ratio of weapons used are knife against handgun?

SELECT CAST(SUM(T1.subject_weapon = 'Knife') AS REAL) * 100 / SUM(T1.subject_weapon = 'Handgun') FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Injured'

From the ' Injured ' statuses of the subject , what is the ratio of weapons used are knife against handgun ?

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


Question: What is the tag of the album with the highest amount of downloads?

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

What is the tag of the album with the highest amount of downloads ?

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


Question: List id of documents that in document subset Best for 2000 or in collection named Best.

SELECT DISTINCT T1.Document_Object_ID FROM Document_Subset_Members AS T1 JOIN Document_Subsets AS T2 ON T1.Document_Subset_ID =  T2.Document_Subset_ID JOIN Documents_in_Collections AS T3 ON T1.Document_Object_ID  =  T3.Document_Object_ID JOIN Collections AS T4 ON T3.Collection_ID  =  T4.Collection_ID WHERE T2.Document_Subset_Name = "Best for 2000" OR T4.Collection_Name = "Best";

List i d of documents that in document subset Best for 2000 or in collection named Best .

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


Question: Find all the distinct visit dates.


Question: Count the number of cities in Australia.

SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'

Count the number of cities in Australia .


Question: For artifact type of cards that do not have multiple faces on the same card, state its legalities status for vintage play format.

SELECT DISTINCT T2.status FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.type = 'Artifact' AND T2.format = 'vintage' AND T1.side IS NULL

For artifact type of cards that do not have multiple faces on the same card , state its legalities status for vintage play format .

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


Question: Find the number of albums by the artist "Metallica".

SELECT COUNT(*) FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "Metallica"

Find the number of albums by the artist " Metallica " .

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


Question: Identify by their ID all the overs in which the player with ID 7 was on strike.

SELECT DISTINCT Over_Id FROM Ball_by_Ball WHERE Striker = 7

Identify by their ID all the overs in which the player with ID 7 was on strike .

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


Question: What are the status codes and dates placed for all of the orders?

SELECT order_status_code ,  date_order_placed FROM Orders

What are the status codes and dates placed for all of the orders ?

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


Question: What is the maximum and minimum age of all staff from the United States?

What is the maximum and minimum age of all staff from the United States ?

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


Question: Find the emails of the user named "Mary".

SELECT email FROM user_profiles WHERE name  =  'Mary'

Find the emails of the user named " Mary " .

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


Question: How many movies are playing in theaters?

SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie

How many movies are playing in theaters ?


Question: What are the names of players who participated in season year 2008?

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008 GROUP BY T1.Player_Name

What are the names of players who participated in season year 2008 ?

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


Question: What is the highest eligible free rate for K-12 students in the schools in Alameda County?

SELECT `Free Meal Count (K-12)` / `Enrollment (K-12)` FROM frpm WHERE `County Name` = 'Alameda' ORDER BY (CAST(`Free Meal Count (K-12)` AS REAL) / `Enrollment (K-12)`) DESC LIMIT 1

What is the highest eligible free rate for K-12 students in the schools in Alameda County ?

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


Question: How many players received Rookie of the Year award from 1969 to 2010?

SELECT COUNT(playerID) FROM awards_players WHERE year BETWEEN 1969 AND 2010 AND award = 'Rookie of the Year'

How many players received Rookie of the Year award from 1969 to 2010 ?

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


Question: What is the average price range of five star hotels that allow pets?

SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  1

What is the average price range of five star hotels that allow pets ?

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


Question: Write down the notes of employee with the highest salary.

SELECT Notes FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )

Write down the notes of employee with the highest salary .

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


Question: What was the potiential for Francesco Parravicini on 2010/8/30?

SELECT t2.potential FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t2.`date`, 1, 10) = '2010-08-30' AND t1.player_name = 'Francesco Parravicini'

What was the potiential for Francesco Parravicini on 2010/8/30 ?

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


Question: Count the number of devices.


Question: How many different cities have these stations?

SELECT count(DISTINCT city) FROM station

How many different cities have these stations ?


Question: Which catalog content has the smallest capacity? Return the catalog entry name.

SELECT catalog_entry_name FROM catalog_contents ORDER BY capacity ASC LIMIT 1

Which catalog content has the smallest capacity ? Return the catalog entry name .

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


Question: What is Aaron Lennox's total crossing score?

SELECT SUM(t2.crossing) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Aaron Lennox'

What is Aaron Lennox 's total crossing score ?


Question: Show names for all aircraft with at least two flights.

SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid GROUP BY T1.aid HAVING count(*)  >= 2

Show names for all aircraft with at least two flights .

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


Question: Find the total balance across checking accounts.

Find the total balance across checking accounts .


Question: What is the model year of the truck used in shipment id 1003?

SELECT T1.model_year FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T2.ship_id = '1003'

What is the model year of the truck used in shipment i d 1003 ?

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


Question: For the biwords pair that appears "116430" times, what is the second word of the pair?

SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w2nd WHERE T2.occurrences = 116430

For the biwords pair that appears " 116430 " times , what is the second word of the pair ?

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


Question: What is the average number of gold medals for clubs?

What is the average number of gold medals for clubs ?


Question: What is the average rating stars and title for the oldest movie?

SELECT avg(T1.stars) ,  T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT min(YEAR) FROM Movie)

What is the average rating stars and title for the oldest movie ?

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


Question: What is the average number of movies added to the lists of user 8516503? Give the user profile image URL on Mubi.

SELECT AVG(T1.list_movie_number), T2.user_avatar_image_url FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T2.user_id = 8516503

What is the average number of movies added to the lists of user 8516503 ? Give the user profile image URL on Mubi .

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


Question: What is the id of the event with the most participants?

SELECT Event_ID FROM Participants_in_Events GROUP BY Event_ID ORDER BY count(*) DESC LIMIT 1

What is the i d of the event with the most participants ?

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


Question: What is the percentage of complaints about the late fee issue whose priority is 2 in 2017?

SELECT CAST(SUM(CASE WHEN T1.priority = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE strftime('%Y', T1.`Date received`) = '2017'

What is the percentage of complaints about the late fee issue whose priority is 2 in 2017 ?

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


Question: List the official full names of all the legislators that served 13 district for 26 consecutive years.

SELECT DISTINCT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 26 THEN T1.official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide GROUP BY T1.official_full_name, T2.district HAVING COUNT(T1.official_full_name) = 13

List the official full names of all the legislators that served 13 district for 26 consecutive years .

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


Question: Find the name of players whose card is yes in the descending order of training hours.

SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC

Find the name of players whose card is yes in the descending order of training hours .

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


Question: In sales with a quantity of 60, how many of them have a price not greater than 500?

SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.quantity = 60 AND T1.Price <= 500

In sales with a quantity of 60 , how many of them have a price not greater than 500 ?

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


Question: List the business' name and risk category of businesses with a score greater than the 80% of average score of all businesses.

SELECT DISTINCT T1.name, T3.risk_category FROM businesses AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN violations AS T3 ON T1.business_id = T3.business_id WHERE T2.score > 0.8 * ( SELECT AVG(score) FROM inspections )

List the business ' name and risk category of businesses with a score greater than the 80 % of average score of all businesses .

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


Question: How many institutions are there?


Question: Find the first name and age of the students who are playing both Football and Lacrosse.

SELECT fname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName  =  "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName  =  "Lacrosse")

Find the first name and age of the students who are playing both Football and Lacrosse .

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


Question: For each gender, return gender and the average age of authors.

SELECT avg(age) ,  gender FROM author GROUP BY gender

For each gender , return gender and the average age of authors .

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


Question: What is the starting year of the oldest technicians?

SELECT Starting_Year FROM technician ORDER BY Age DESC LIMIT 1

What is the starting year of the oldest technicians ?


Question: Who is the oldest player who played for Avangard Omsk during the regular season in 2000-2001?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.GAMETYPE = 'Regular Season' AND T1.TEAM = 'Avangard Omsk' ORDER BY T2.birthdate ASC LIMIT 1

Who is the oldest player who played for Avangard Omsk during the regular season in 2000 - 2001 ?

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


Question: Provide the ISBN and price of the book with book ID 7160.

SELECT T1.isbn13, T2.price FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.book_id = 6503

Provide the ISBN and price of the book with book ID 7160 .

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


Question: What are the names, ages, and membership credits for all customers?

SELECT name ,  age ,  membership_credit FROM customers

What are the names , ages , and membership credits for all customers ?

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


Question: Give me the address, home phone and salary of the Sales Manager.

SELECT Address, HomePhone, Salary FROM Employees WHERE Title = 'Sales Manager'

Give me the address , home phone and salary of the Sales Manager .

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


Question: Among the patients who have a normal platelet level, how many of them have other symptoms observed?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT > 100 AND T2.PLT < 400 AND T1.Diagnosis IS NOT NULL

Among the patients who have a normal platelet level , how many of them have other symptoms observed ?

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


Question: Show the studios that have produced films with director "Nicholas Meyer" and "Walter Hill".

SELECT Studio FROM film WHERE Director  =  "Nicholas Meyer" INTERSECT SELECT Studio FROM film WHERE Director  =  "Walter Hill"

Show the studios that have produced films with director " Nicholas Meyer " and " Walter Hill " .

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


Question: How many songs have 4 minute duration?

SELECT count(*) FROM files WHERE duration LIKE "4:%"


Question: What are the names of products that have a price above the average for all products.

SELECT product_name FROM Products WHERE product_price  >  (SELECT avg(product_price) FROM Products)

What are the names of products that have a price above the average for all products .

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


Question: How many courses are offered by the Computer Info. Systems department?

SELECT count(*) FROM department AS T1 JOIN course AS T2 ON T1.dept_code  =  T2.dept_code WHERE dept_name  =  "Computer Info. Systems"

How many courses are offered by the Computer Info . Systems department ?

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