Question: What are the distinct buildings with capacities of greater than 50?

SELECT DISTINCT building FROM classroom WHERE capacity  >  50

What are the distinct buildings with capacities of greater than 50 ?

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


Question: What are the student ids for students over 20 years old?

SELECT StuID FROM Student WHERE age  >  20

What are the student ids for students over 20 years old ?

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


Question: Please list any three customers with debt.

SELECT c_name FROM customer WHERE c_acctbal < 0 LIMIT 3

Please list any three customers with debt .


Question: Find the dates of the tests taken with result "Pass".

SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "Pass"

Find the dates of the tests taken with result " Pass " .

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


Question: How many nations in East Asia and the Pacific have completed their external debt reporting on time?

SELECT COUNT(CountryCode)  FROM Country WHERE Region = 'East Asia & Pacific' AND ExternalDebtReportingStatus = 'Estimate'

How many nations in East Asia and the Pacific have completed their external debt reporting on time ?

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


Question: How many reviewers are there?


Question: What are the names of all employees who have a salary greater than average or more than 5000?

SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)

What are the names of all employees who have a salary greater than average or more than 5000 ?

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


Question: Provide the product's name of the product with the highest sales in the South region.

SELECT T2.`Product Name` FROM south_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'South' ORDER BY T1.Sales DESC LIMIT 1

Provide the product 's name of the product with the highest sales in the South region .

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


Question: What is the number of pages of the book in the order ID 1167?

SELECT T1.num_pages FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.order_id = 1167

What is the number of pages of the book in the order ID 1167 ?

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


Question: Return the city with the customer type code "Good Credit Rating" that had the fewest customers.

SELECT town_city FROM customers WHERE customer_type_code  =  "Good Credit Rating" GROUP BY town_city ORDER BY count(*) LIMIT 1

Return the city with the customer type code " Good Credit Rating " that had the fewest customers .

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


Question: Find the last name of the first ever contact person of the organization with the highest UK Vat number.

SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.uk_vat_number  =  (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1

Find the last name of the first ever contact person of the organization with the highest UK Vat number .

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


Question: What is the ID of the image with the most number of object samples?

SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1

What is the ID of the image with the most number of object samples ?

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


Question: What is the average price for a dating application?

SELECT AVG(Price) FROM playstore WHERE Genres = 'Dating'

What is the average price for a dating application ?


Question: List the names of all players from Avangard Omsk that have played for playoffs in season 2000-2001.

SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk' AND T1.GAMETYPE = 'Playoffs'

List the names of all players from Avangard Omsk that have played for playoffs in season 2000 - 2001 .

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


Question: How many 2001 Ferrari Enzo were ordered?

SELECT SUM(t1.orderNumber) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t2.productName = '2001 Ferrari Enzo'

How many 2001 Ferrari Enzo were ordered ?

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


Question: Which directors had a movie in either 1999 or 2000?

SELECT director FROM movie WHERE YEAR  =  1999 OR YEAR  =  2000

Which directors had a movie in either 1999 or 2000 ?

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


Question: Name the most expensive ordered? Who, when was it ordered?

SELECT T2.OrderNumber, T1.`Customer Names`, T2.OrderDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID ORDER BY T2.`Unit Cost` DESC LIMIT 1

Name the most expensive ordered ? Who , when was it ordered ?

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


Question: State the number of positive tweets from Ha Noi.

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Sentiment > 0 AND T2.State = 'Ha Noi'

State the number of positive tweets from Ha Noi .

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


Question: What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix?

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

What are the forenames and surnames of drivers who participated in the races named Australian Grand Prix but not the races named Chinese Grand Prix ?

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


Question: Show the total number of rooms of the apartments in the building with short name "Columbus Square".

SELECT sum(T2.room_count) FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_short_name  =  "Columbus Square"

Show the total number of rooms of the apartments in the building with short name " Columbus Square " .

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


Question: Find the Char cells, Pixels and Hardware colours for the screen of the phone whose hardware model name is "LG-P760".

SELECT T1.Char_cells ,  T1.Pixels ,  T1.Hardware_colours FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T2.Hardware_Model_name = "LG-P760";

Find the Char cells , Pixels and Hardware colours for the screen of the phone whose hardware model name is " LG - P760 " .

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


Question: What is the average rating of podcasts in comedy category?

SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'comedy'

What is the average rating of podcasts in comedy category ?

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


Question: Who was the man of the series in 2013? Give the full name.

SELECT T2.Player_Name FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id WHERE T1.Season_Year = 2013

Who was the man of the series in 2013 ? Give the full name .

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


Question: List down the author ID of authors with a name of "Peter".

SELECT AuthorId FROM PaperAuthor WHERE Name = 'Peter'

List down the author ID of authors with a name of " Peter " .

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


Question: List all of the award winners' birth dates.

SELECT T1.birthdate FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner';

List all of the award winners ' birth dates .

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


Question: How many more followers in percentage are there for the repository used by solution ID 18 than solution ID19?

SELECT CAST((SUM(CASE WHEN T2.Id = 18 THEN T1.Forks ELSE 0 END) - SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 19 THEN T1.Forks ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId

How many more followers in percentage are there for the repository used by solution ID 18 than solution ID19 ?

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


Question: What are the papers published under the institution "Indiana University"?

SELECT DISTINCT t1.title FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "Indiana University"

What are the papers published under the institution " Indiana University " ?

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


Question: display job Title, the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000.

SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000

display job Title , the difference between minimum and maximum salaries for those jobs which max salary within the range 12000 to 18000 .

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


Question: List down the report number of crimes associated with the district commander named Jill M. Stevens.

SELECT SUM(CASE WHEN T1.commander = 'Jill M. Stevens' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no

List down the report number of crimes associated with the district commander named Jill M. Stevens .

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


Question: List out the name of the game that the people participated in games id 13.

SELECT DISTINCT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T2.games_id = 13

List out the name of the game that the people participated in games i d 13 .

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


Question: What are the location and medium type of paintings that are created by the artist whose first name is Pablo?

SELECT T2.location ,   T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Pablo"

What are the location and medium type of paintings that are created by the artist whose first name is Pablo ?

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


Question: What percentage of projects that have not received a cash donation have received a portion of a donation included corporate sponsored giftcard?

SELECT CAST(SUM(CASE WHEN payment_included_campaign_gift_card = 't' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(donationid) FROM donations WHERE payment_method = 'no_cash_received'

What percentage of projects that have not received a cash donation have received a portion of a donation included corporate sponsored giftcard ?

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


Question: List the review and label of the restaurants in Mission Blvd., Hayward.

SELECT T2.review, T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'hayward' AND T1.street_name = 'mission blvd'

List the review and label of the restaurants in Mission Blvd . , Hayward .

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


Question: What are the names of pilots who have planes in both Austin and Boston?

SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.LOCATION  =  "Boston"

What are the names of pilots who have planes in both Austin and Boston ?

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


Question: How many cities are there in each country?

SELECT country ,  count(*) FROM City GROUP BY country

How many cities are there in each country ?


Question: Find the total access count of all documents in the most popular document type.

SELECT sum(access_count) FROM documents GROUP BY document_type_code ORDER BY count(*) DESC LIMIT 1

Find the total access count of all documents in the most popular document type .

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


Question: What are the distinct address type codes for all customer addresses?

SELECT DISTINCT address_type_code FROM customer_addresses

What are the distinct address type codes for all customer addresses ?

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


Question: What are the entry names of catalog with the attribute possessed by most entries.

SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.attribute_value  =  (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)

What are the entry names of catalog with the attribute possessed by most entries .

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


Question: Which students live in the city with code "NYC" and have class senator votes in the spring election cycle? Count the numbers.

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

Which students live in the city with code " NYC " and have class senator votes in the spring election cycle ? Count the numbers .

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


Question: Find the names of sailors who reserved boat with the name Melon.

SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.name  =  'Melon'

Find the names of sailors who reserved boat with the name Melon .

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


Question: From which hometowns did both people older than 23 and younger than 20 come from?

SELECT Hometown FROM people WHERE Age  >  23 INTERSECT SELECT Hometown FROM people WHERE Age  <  20

From which hometowns did both people older than 23 and younger than 20 come from ?

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


Question: What is the average rating score of the movie "The Crowd" and who was its director?

SELECT AVG(T2.rating_score), T1.director_name FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Crowd'

What is the average rating score of the movie " The Crowd " and who was its director ?

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


Question: Which district has highest active loan?

SELECT T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.status IN ('C', 'D') GROUP BY T2.A3 ORDER BY SUM(T3.amount) DESC LIMIT 1

Which district has highest active loan ?


Question: Calculate the percentage of women who have participated in Equestrianism Mixed Three-Day Event, Individual.

SELECT CAST(COUNT(CASE WHEN T1.gender = 'F' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN event AS T4 ON T3.event_id = T4.id WHERE T4.event_name = 'Equestrianism Mixed Three-Day Event, Individual'

Calculate the percentage of women who have participated in Equestrianism Mixed Three - Day Event , Individual .

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


Question: Show all home conferences with average enrollment of universities above 2000.

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

Show all home conferences with average enrollment of universities above 2000 .

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


Question: Give the name of the alien superheroes.

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Alien'

Give the name of the alien superheroes .


Question: State all of 3-D Man's attributes along with their values.

SELECT T3.attribute_name, T2.attribute_value 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 T1.superhero_name = '3-D Man'

State all of 3 - D Man 's attributes along with their values .

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


Question: Show each student's first name and last name.

SELECT DISTINCT firstname ,  lastname FROM list

Show each student 's first name and last name .

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


Question: What are the last names of the teachers who teach the student called GELL TAMI?

SELECT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "GELL" AND T1.lastname  =  "TAMI"

What are the last names of the teachers who teach the student called GELL TAMI ?

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


Question: For the 3-credit course with the easiest difficulty, how many students get an "A" in that course?

SELECT COUNT(T1.student_id) FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.credit = '3' AND T2.diff = 1

For the 3 - credit course with the easiest difficulty , how many students get an " A " in that course ?

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


Question: Find the number of distinct products Rodrick Heaney has bought so far.

SELECT count(DISTINCT t3.product_id) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id WHERE t1.customer_name  =  "Rodrick Heaney"

Find the number of distinct products Rodrick Heaney has bought so far .

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


Question: If I'm from the Muscle Machine Inc, to which e-mail adress should I write a letter if I want to reach the superior of my sales representitive?

SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'

If I 'm from the Muscle Machine Inc , to which e - mail adress should I write a letter if I want to reach the superior of my sales representitive ?

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


Question: What is the sum of favourite count gained by user ID 686 in 2011?

SELECT SUM(DISTINCT FavoriteCount) FROM posts WHERE Id IN ( SELECT PostId FROM postHistory WHERE UserId = 686 AND STRFTIME('%Y', CreationDate) = '2011' )

What is the sum of favourite count gained by user ID 686 in 2011 ?

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


Question: Find the major that is studied by the largest number of students.

SELECT Major FROM STUDENT GROUP BY major ORDER BY count(*) DESC LIMIT 1

Find the major that is studied by the largest number of students .


Question: Among divergent movies that got the highest rating, how many of them are from the UK?

SELECT COUNT(DISTINCT T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T1.rating = 5

Among divergent movies that got the highest rating , how many of them are from the UK ?

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


Question: Which client segment consumed the least in September 2013?

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

Which client segment consumed the least in September 2013 ?


Question: Find the number of students who participate in the tryout for each college ordered by descending count.

SELECT count(*) ,  cName FROM tryout GROUP BY cName ORDER BY count(*) DESC

Find the number of students who participate in the tryout for each college ordered by descending count .

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


Question: Please list all business IDs in Mesa city that review stars of over 3.

SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Mesa' AND T2.review_stars > 3 GROUP BY T1.business_id

Please list all business IDs in Mesa city that review stars of over 3 .

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


Question: What is the stadium of the institution with the largest enrollment?

SELECT Stadium FROM institution ORDER BY Enrollment DESC LIMIT 1

What is the stadium of the institution with the largest enrollment ?

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


Question: What is the name of the organization that was formed most recently?

SELECT organization_name FROM organizations ORDER BY date_formed DESC LIMIT 1

What is the name of the organization that was formed most recently ?


Question: Show the id, name of each editor and the number of journal committees they are on.

SELECT T1.editor_id ,  T1.Name ,  COUNT(*) FROM editor AS T1 JOIN journal_committee AS T2 ON T1.Editor_ID  =  T2.Editor_ID GROUP BY T1.editor_id

Show the i d , name of each editor and the number of journal committees they are on .

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


Question: Among the HTC users, calculate the percentage of female users who are over 80.

SELECT SUM(IIF(T1.gender = 'F' AND T1.age > 80, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'HTC'

Among the HTC users , calculate the percentage of female users who are over 80 .

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


Question: Which professor taught the least amount of courses?

SELECT p_id FROM taughtBy GROUP BY p_id ORDER BY COUNT(course_id) ASC LIMIT 1

Which professor taught the least amount of courses ?


Question: What is the description of Act 1, Scene 2 in Twelfth Night?

SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night' AND T2.Act = 1 AND T2.Scene = 2

What is the description of Act 1 , Scene 2 in Twelfth Night ?

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


Question: List circuits in USA which hosted f1 races in 2006. State the name and location of circuit and the name of the race it hosted.

SELECT T1.name, T1.location, T2.name FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.country = 'USA' AND T2.year = 2006

List circuits in USA which hosted f1 races in 2006 . State the name and location of circuit and the name of the race it hosted .

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


Question: What are the titles and paper ids for papers that have Mckeown, Kathleen or Rambow, Owen in their author list?

SELECT DISTINCT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE  T3.name LIKE "%Mckeown ,  Kathleen%" OR T3.name LIKE "%Rambow ,  Owen%"

What are the titles and paper ids for papers that have Mckeown , Kathleen or Rambow , Owen in their author list ?

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


Question: Show names and phones of customers who do not have address information.

SELECT customer_name ,  customer_phone FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM customer_address_history)

Show names and phones of customers who do not have address information .


Question: Calculate the total cost of the orders by Brad Thomas in 2016.

SELECT SUM((T1.Sales / (1 - T1.Discount)) * T1.Quantity - T1.Profit) AS cost FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T1.`Product ID` = T3.`Product ID` AND T1.Region = T3.Region WHERE T1.Region = 'East' AND T2.`Customer Name` = 'Brad Thomas' AND strftime('%Y', T1.`Order Date`) = '2016'

Calculate the total cost of the orders by Brad Thomas in 2016 .

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


Question: Identify the players who weigh 120 kg.

SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T1.weight_in_kg = 120


Question: Wolfgang Reitherman has directed several Disney movies, which one has the highest grossing after accounting for inflation?

SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' ORDER BY CAST(REPLACE(SUBSTR(inflation_adjusted_gross, 2), ',', '') AS REAL) DESC LIMIT 1

Wolfgang Reitherman has directed several Disney movies , which one has the highest grossing after accounting for inflation ?

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


Question: Show the locations that have at least two performances.

SELECT LOCATION FROM performance GROUP BY LOCATION HAVING COUNT(*)  >=  2

Show the locations that have at least two performances .


Question: What are the first and last names of the first-grade students who are NOT taught by teacher OTHA MOYER?

SELECT DISTINCT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.grade  =  1 EXCEPT SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

What are the first and last names of the first - grade students who are NOT taught by teacher OTHA MOYER ?

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


Question: What is the percentage of the customers who used EUR in 2012/8/25?

SELECT CAST(SUM(IIF(T2.Currency = 'EUR', 1, 0)) AS FLOAT) * 100 / COUNT(T1.CustomerID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-25'

What is the percentage of the customers who used EUR in 2012/8/25 ?

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


Question: Calculate the quantity percentage of the gift products in the total trading quantity.

SELECT CAST(SUM(IIF(T1.Price = 0, T2.Quantity, 0)) AS REAL) * 100 / SUM(T2.Quantity)FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID

Calculate the quantity percentage of the gift products in the total trading quantity .

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


Question: List the full name of the professors who advised students with intelligence 1.

SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.intelligence = 1

List the full name of the professors who advised students with intelligence 1 .

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


Question: Find the total population of the districts where the area is bigger than the average city area.

SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)

Find the total population of the districts where the area is bigger than the average city area .

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


Question: Show first name and last name for all students.

Show first name and last name for all students .


Question: Provide the destination city of the shipment shipped by January 16, 2017.

SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_date = '2017-01-16'

Provide the destination city of the shipment shipped by January 16 , 2017 .

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


Question: Calculate the average rate of renting the film that Lucille Tracy got starred.

SELECT AVG(T3.rental_rate) 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 = 'LUCILLE' AND T1.last_name = 'TRACY'

Calculate the average rate of renting the film that Lucille Tracy got starred .

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


Question: Among all European Grand Prix races, what is the percentage of the races were hosted in Germany?

SELECT CAST(COUNT(CASE WHEN T1.country = 'Germany' THEN T2.circuitID END) AS REAL) * 100 / COUNT(T2.circuitId) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'European Grand Prix'

Among all European Grand Prix races , what is the percentage of the races were hosted in Germany ?

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


Question: Tell the number of cases with arrests in North Lawndale community.

SELECT SUM(CASE WHEN T1.community_area_name = 'North Lawndale' THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T2.arrest = 'TRUE'

Tell the number of cases with arrests in North Lawndale community .

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


Question: Calculate the population density of the city as the destination of shipment no.1369.

SELECT T2.area / T2.population FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1369'

Calculate the population density of the city as the destination of shipment no.1369 .

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


Question: How long was Kendall Allen's complaint about her credit card?

SELECT T3.ser_time FROM events AS T1 INNER JOIN client AS T2 ON T1.Client_ID = T2.client_id INNER JOIN callcenterlogs AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.first = 'Kendall' AND T2.last = 'Allen' AND T2.sex = 'Female' AND T1.Product = 'Credit card'

How long was Kendall Allen 's complaint about her credit card ?

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


Question: What is the name of party with most number of members?

SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1

What is the name of party with most number of members ?


Question: Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.

SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count  >  100 OR amount_of_transaction  >  1000

Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000 .

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


Question: In which country does Polish found least in?

SELECT T2.Name FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'Polish' GROUP BY T2.Name, T1.Percentage ORDER BY T1.Percentage ASC LIMIT 1

In which country does Polish found least in ?


Question: What is the document type code with most number of documents?

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

What is the document type code with most number of documents ?

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


Question: Find the first and last name of students who are not in the largest major.

SELECT fname ,  lname FROM student WHERE major != (SELECT major FROM student GROUP BY major ORDER BY count(*) DESC LIMIT 1)

Find the first and last name of students who are not in the largest major .

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


Question: What are the names of the artists who sang the shortest song?

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

What are the names of the artists who sang the shortest song ?


Question: To which group does the department with the least amount of workers belong to? Indicate the name of the department as well.

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

To which group does the department with the least amount of workers belong to ? Indicate the name of the department as well .

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


Question: What are the titles, years, and directors of all movies, ordered by budget in millions?

SELECT title ,  YEAR ,  director FROM movie ORDER BY budget_million

What are the titles , years , and directors of all movies , ordered by budget in millions ?

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


Question: When did Carole Bernhard first become a customer?

SELECT date_became_customer FROM Customers WHERE first_name = "Carole" AND last_name = "Bernhard";

When did Carole Bernhard first become a customer ?

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


Question: What is the average capability of students with less than a 2.5 GPA?

SELECT CAST(SUM(T1.capability) AS REAL) / COUNT(T1.student_id) FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.gpa < 2.5

What is the average capability of students with less than a 2.5 GPA ?

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


Question: How many rainy days were recorded in Mountain View?

SELECT SUM(IIF(zip_code = 94041 AND events = 'Rain', 1, 0)) FROM weather

How many rainy days were recorded in Mountain View ?


Question: What is the average age of female (sex is F) students?

SELECT avg(Age) FROM STUDENT WHERE Sex  =  "F"

What is the average age of female ( sex is F ) students ?

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


Question: What is the department name of the students with lowest gpa belongs to?

SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1

What is the department name of the students with lowest gpa belongs to ?

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


Question: What are the budget category of the events located at MU 215 and a guest speaker type with a 0 budget spent?

SELECT DISTINCT T2.category, T1.type FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215' AND T2.spent = 0 AND T1.type = 'Guest Speaker'

What are the budget category of the events located at MU 215 and a guest speaker type with a 0 budget spent ?

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


Question: Who is the CBSA officer of the post point in the area with the highest number of employees?

SELECT T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.employees = ( SELECT MAX(employees) FROM zip_data )

Who is the CBSA officer of the post point in the area with the highest number of employees ?

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


Question: What are the symptoms observed by the youngest patient to ever did a medical examination? Identify their diagnosis.

SELECT T2.Symptoms, T1.Diagnosis FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Symptoms IS NOT NULL ORDER BY T1.Birthday DESC LIMIT 1

What are the symptoms observed by the youngest patient to ever did a medical examination ? Identify their diagnosis .

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


Question: Describe the award title, person and character name of the award ID 326.

SELECT DISTINCT T1.award, T1.person, T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T2.award_id = 326;

Describe the award title , person and character name of the award ID 326 .

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


Question: Select the name of all movie theaters that are not currently showing a movie.

SELECT DISTINCT name FROM MovieTheaters WHERE Movie  =  'null'

Select the name of all movie theaters that are not currently showing a movie .

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


Question: List the names of closed event as "game" that was closed from 3/15/2019 to 3/20/2020.

SELECT DISTINCT event_name FROM event WHERE type = 'Game' AND date(SUBSTR(event_date, 1, 10)) BETWEEN '2019-03-15' AND '2020-03-20' AND status = 'Closed'

List the names of closed event as " game " that was closed from 3/15/2019 to 3/20/2020 .

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


Question: How many games are free of injury accidents?

SELECT count(*) FROM game WHERE id NOT IN ( SELECT game_id FROM injury_accident )

How many games are free of injury accidents ?


Question: List the top five most costly products in 1998.

SELECT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.OrderDate LIKE '1998%' ORDER BY T3.UnitPrice + T1.Freight DESC LIMIT 5

List the top five most costly products in 1998 .


Question: Tell the name of the county which is represented by Hartzler Vicky.

SELECT T1.county FROM country AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T3.first_name = 'Hartzler' AND T3.last_name = 'Vicky' GROUP BY T1.county

Tell the name of the county which is represented by Hartzler Vicky .

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


Question: For the third largest country, which ethinic group has the most population?

SELECT T2.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT Name FROM country ORDER BY Area DESC LIMIT 2, 1 ) GROUP BY T2.Name ORDER BY T2.Percentage * T1.Population DESC LIMIT 1

For the third largest country , which ethinic group has the most population ?

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


Question: What are the distinct names of customers with an order status of Pending, sorted by customer id?

SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending" ORDER BY T2.customer_id

What are the distinct names of customers with an order status of Pending , sorted by customer i d ?

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


Question: What is the title and director for the movie with highest worldwide gross in the year 2000 or before?

SELECT title ,  director FROM movie WHERE YEAR  <=  2000 ORDER BY gross_worldwide DESC LIMIT 1

What is the title and director for the movie with highest worldwide gross in the year 2000 or before ?

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


Question: How much are the minimum orders of the vendors that are no longer used by the company?

SELECT T2.MinOrderQty FROM Vendor AS T1 INNER JOIN ProductVendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.ActiveFlag = 0 ORDER BY T2.MinOrderQty LIMIT 1

How much are the minimum orders of the vendors that are no longer used by the company ?

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


Question: What are the descriptions for the aircrafts?

What are the descriptions for the aircrafts ?


Question: What percentage of users rated the movie "Patti Smith: Dream of Life" by more than 3?

SELECT CAST(SUM(CASE WHEN T1.rating_score > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title LIKE 'Patti Smith: Dream of Life'

What percentage of users rated the movie " Patti Smith : Dream of Life " by more than 3 ?

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


Question: Please list any two films that Penelope Guiness acted in.

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 = 'Penelope' AND T1.last_name = 'Guiness' LIMIT 2

Please list any two films that Penelope Guiness acted in .

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


Question: Show all distinct positions of matches.

SELECT DISTINCT POSITION FROM match_season

Show all distinct positions of matches .


Question: What is the customer id of the customer with the most accounts, and how many accounts does this person have?

SELECT customer_id ,  count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1

What is the customer i d of the customer with the most accounts , and how many accounts does this person have ?

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


Question: What is the average salary of all intern jobs?

SELECT avg(Salary) FROM Employee WHERE POSITION  =  "Intern";

What is the average salary of all intern jobs ?


Question: Among the supplied products from Australia, describe the discontinued products and the category.

SELECT T2.ProductName, T3.CategoryName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T1.Country = 'Australia' AND T2.Discontinued = 1

Among the supplied products from Australia , describe the discontinued products and the category .

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


Question: Return the name of the party with the most members.

SELECT T2.party_name FROM Member AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id ORDER BY count(*) DESC LIMIT 1

Return the name of the party with the most members .


Question: What is the most expensive item that was spent in support of club events?

SELECT expense_description FROM expense ORDER BY cost DESC LIMIT 1

What is the most expensive item that was spent in support of club events ?

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


Question: Which nation has the highest GDP? Please give the nation's full name.

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

Which nation has the highest GDP ? Please give the nation 's full name .

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


Question: Calculate the average age of the competitors who participated in the 1924 Winter.

SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1924 Winter'

Calculate the average age of the competitors who participated in the 1924 Winter .

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


Question: What are the booking start and end dates of the apartments with more than 2 bedrooms?

SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  2

What are the booking start and end dates of the apartments with more than 2 bedrooms ?

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


Question: How many users have more than 100 followers in the list created by users in 2009?

SELECT COUNT(T1.user_id) FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_followers > 100 AND T1.list_creation_date_utc LIKE '2009%'

How many users have more than 100 followers in the list created by users in 2009 ?

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


Question: What is the average number of less severe crimes reported a day in February of 2018?

SELECT CAST(COUNT(T2.case_number) AS REAL) / 28 FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no WHERE T2.date LIKE '2/%/2018%' AND T1.index_code = 'N'

What is the average number of less severe crimes reported a day in February of 2018 ?

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


Question: List the average room count of the properties with gardens.

SELECT avg(T3.room_count) FROM Property_Features AS T1 JOIN Features AS T2 ON T1.feature_id  =  T2.feature_id JOIN Properties AS T3 ON T1.property_id  =  T3.property_id WHERE T2.feature_name  =  'garden';

List the average room count of the properties with gardens .

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


Question: State the delivery date of cookware.

SELECT T FROM ( SELECT DISTINCT IIF(T2.`Product Name` = 'Cookware', T1.DeliveryDate, NULL) AS T FROM `Sales Orders` T1 INNER JOIN Products T2 ON T2.ProductID = T1._ProductID ) WHERE T IS NOT NULL


Question: Count the number of authors of age below 30.

SELECT count(*) FROM author WHERE age  <  30

Count the number of authors of age below 30 .


Question: What are the names of all the games that have been played for at least 1000 hours?

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

What are the names of all the games that have been played for at least 1000 hours ?

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


Question: List the total number of horses on farms in ascending order.

SELECT Total_Horses FROM farm ORDER BY Total_Horses ASC

List the total number of horses on farms in ascending order .

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


Question: How many problems did the product called "voluptatem" have in record?

SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"

How many problems did the product called " voluptatem " have in record ?

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


Question: List the names of mountains that do not have any climber.

SELECT Name FROM mountain WHERE Mountain_ID NOT IN (SELECT Mountain_ID FROM climber)

List the names of mountains that do not have any climber .

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


Question: What are the word pairs that occured only twice?

SELECT T1.word, T3.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T2.occurrences = 2

What are the word pairs that occured only twice ?


Question: Find the author who achieved the highest score in a submission.

SELECT Author FROM submission ORDER BY Scores DESC LIMIT 1

Find the author who achieved the highest score in a submission .

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


Question: What is the average salary for employees from ID 1 to 9?

SELECT AVG(Salary) FROM Employees WHERE EmployeeID BETWEEN 1 AND 9

What is the average salary for employees from ID 1 to 9 ?

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


Question: List down all ratings of action film titles.

SELECT T1.description 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 = 'action'

List down all ratings of action film titles .


Question: Show the names and ages of editors and the theme of journals for which they serve on committees, in ascending alphabetical order of theme.

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

Show the names and ages of editors and the theme of journals for which they serve on committees , in ascending alphabetical order of theme .

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


Question: How many orders were shipped in 1994?

SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994'


Question: How many campuses are there in Los Angeles county?

SELECT count(*) FROM campuses WHERE county  =  "Los Angeles"

How many campuses are there in Los Angeles county ?

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


Question: List the official full names and genders of legislators who have Collins as their last name.

SELECT official_full_name, gender_bio FROM current WHERE last_name = 'Collins'

List the official full names and genders of legislators who have Collins as their last name .

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


Question: List the employees who have not showed up in any circulation history of documents. List the employee's name.

SELECT employee_name FROM Employees EXCEPT SELECT Employees.employee_name FROM Employees JOIN Circulation_History ON Circulation_History.employee_id = Employees.employee_id

List the employees who have not showed up in any circulation history of documents . List the employee 's name .

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


Question: How many female students did Stanford University have in 2011?

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

How many female students did Stanford University have in 2011 ?

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


Question: How did Kyran Muller submit his complaint?

SELECT DISTINCT T2.`Submitted via` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.first = 'Kyran' AND T1.last = 'Muller'

How did Kyran Muller submit his complaint ?

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


Question: What are the types of books that have at least three books belonging to?

SELECT TYPE FROM book GROUP BY TYPE HAVING COUNT(*)  >=  3

What are the types of books that have at least three books belonging to ?

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


Question: Give the detailed description of all the crimes against society.

SELECT description FROM FBI_Code WHERE crime_against = 'Society'

Give the detailed description of all the crimes against society .

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


Question: What is the publication date of the book with the most pages?

SELECT publication_date FROM book ORDER BY num_pages DESC LIMIT 1

What is the publication date of the book with the most pages ?

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


Question: How much is the annual revenue of the customer with the most number of shipments?

SELECT T2.annual_revenue FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id GROUP BY T1.cust_id ORDER BY COUNT(T1.cust_id) DESC LIMIT 1

How much is the annual revenue of the customer with the most number of shipments ?

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


Question: List all the expenses incurred by the vice president.

SELECT T2.expense_id, T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Vice President'

List all the expenses incurred by the vice president .


Question: How many pages were there on the menu created on 17th November 1898?

SELECT SUM(CASE WHEN T1.date = '1898-11-17' THEN 1 ELSE 0 END) FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id

How many pages were there on the menu created on 17th November 1898 ?

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


Question: For each account type, find the average account balance of customers with credit score lower than 50.

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

For each account type , find the average account balance of customers with credit score lower than 50 .

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


Question: List the full names of all clients who live in the Pacific division.

SELECT T2.first, T2.middle, T2.last FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.division = 'Pacific'

List the full names of all clients who live in the Pacific division .

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


Question: Provide the price and country origin of the car named Ford Maverick.

SELECT DISTINCT T1.price, T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country INNER JOIN data AS T4 ON T4.ID = T1.ID WHERE T4.car_name = 'ford maverick'

Provide the price and country origin of the car named Ford Maverick .

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


Question: Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade, how many offers Multiple Provision Types? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city.

SELECT T2.City, COUNT(T2.CDSCode) FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.Magnet = 1 AND T2.GSoffered = 'K-8' AND T1.`NSLP Provision Status` = 'Multiple Provision Types' GROUP BY T2.City

Of the schools that offers a magnet program serving a grade span of Kindergarten to 8th grade , how many offers Multiple Provision Types ? List the number of cities that offers a Kindergarten to 8th grade span and indicate how many schools are there serving such grade span for each city .

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


Question: Show the id of game platform which makes the most sales in Japan.

SELECT T.game_platform_id FROM ( SELECT T2.game_platform_id, MAX(T2.num_sales) FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan' ) t

Show the i d of game platform which makes the most sales in Japan .

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


Question: For the repository with '8094' watchers , how many solutions does it contain?

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

For the repository with ' 8094 ' watchers , how many solutions does it contain ?

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


Question: Find the states where have some college students in tryout and their decisions are yes.

SELECT DISTINCT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.decision  =  'yes'

Find the states where have some college students in tryout and their decisions are yes .

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


Question: How many kids stay in the rooms reserved by ROY SWEAZY?

SELECT kids FROM Reservations WHERE FirstName = "ROY" AND LastName  =  "SWEAZY";

How many kids stay in the rooms reserved by ROY SWEAZY ?

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


Question: Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products.

SELECT avg(total_amount_purchased) ,  avg(total_value_purchased) FROM Product_Suppliers WHERE supplier_id  =  (SELECT supplier_id FROM Product_Suppliers GROUP BY supplier_id ORDER BY count(*) DESC LIMIT 1)

Return the average total amount purchased and total value purchased for the supplier who supplies the greatest number of products .

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


Question: Which business had the highest number of inspections done? Calculate the percentage of passed and failed inspections of the said business.

SELECT T2.dba_name , CAST(SUM(CASE WHEN T1.results = 'Pass' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.inspection_id) AS percentagePassed , CAST(SUM(CASE WHEN T1.results = 'Fail' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no GROUP BY T2.dba_name ORDER BY COUNT(T1.license_no) DESC LIMIT 1

Which business had the highest number of inspections done ? Calculate the percentage of passed and failed inspections of the said business .

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


Question: For the user No.24, how many times is the number of his/her posts compared to his/her votes?

SELECT CAST(COUNT(T2.Id) AS REAL) / COUNT(DISTINCT T1.Id) FROM votes AS T1 INNER JOIN posts AS T2 ON T1.UserId = T2.OwnerUserId WHERE T1.UserId = 24

For the user No.24 , how many times is the number of his / her posts compared to his / her votes ?

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


Question: List document type codes and the number of documents in each code.

SELECT document_type_code ,  count(*) FROM Documents GROUP BY document_type_code

List document type codes and the number of documents in each code .

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


Question: Find names and times of trains that run through stations for the local authority Chiltern.

SELECT t3.name ,  t3.time FROM station AS t1 JOIN route AS t2 ON t1.id  =  t2.station_id JOIN train AS t3 ON t2.train_id  =  t3.id WHERE t1.local_authority  =  "Chiltern"

Find names and times of trains that run through stations for the local authority Chiltern .

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


Question: State the documentary film titles with longest length.

SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T3.name = 'documentary' ORDER BY T1.length DESC LIMIT 1

State the documentary film titles with longest length .

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


Question: What is the average age of all artists?

What is the average age of all artists ?


Question: How many cards are there in the set 'World Championship Decks 2004' with the converted mana cost as '3'.

SELECT COUNT(id) FROM cards WHERE setCode IN ( SELECT code FROM sets WHERE name = 'World Championship Decks 2004' ) AND convertedManaCost = 3

How many cards are there in the set ' World Championship Decks 2004 ' with the converted mana cost as ' 3 ' .

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


Question: How many countries are there in total?


Question: What are the titles of books that have never been ordered?

SELECT title FROM book EXCEPT SELECT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn  =  T2.isbn

What are the titles of books that have never been ordered ?


Question: Give the number of samples in image no.2377985 whose attribute is electrical.

SELECT SUM(CASE WHEN T2.ATT_CLASS = 'white' THEN 1 ELSE 0 END) FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 2347915

Give the number of samples in image no.2377985 whose attribute is electrical .


Question: Who wrote the best selling book? Give me the author name.

SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id ORDER BY t2.sale_amount DESC LIMIT 1

Who wrote the best selling book ? Give me the author name .

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


Question: Calculate the difference between sales of games from region ID 2 and region ID 3.

SELECT SUM(CASE WHEN T.region_id = 2 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.region_id = 3 THEN T.num_sales ELSE 0 END) FROM region_sales t

Calculate the difference between sales of games from region ID 2 and region ID 3 .

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


Question: Count the number of invoices.


Question: How many customers in the machinery segment are in debt?

SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0 AND c_mktsegment = 'MACHINERY'

How many customers in the machinery segment are in debt ?

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


Question: Write down the name of the largest population country.

SELECT Name FROM Country ORDER BY Population DESC LIMIT 1

Write down the name of the largest population country .


Question: Which employee was responsible for inspection no.48224? Give the full name.

SELECT T2.first_name, T2.last_name FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id = 48224

Which employee was responsible for inspection no.48224 ? Give the full name .

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


Question: What are the keywords of the "Shield" episode?

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Shield'

What are the keywords of the " Shield " episode ?


Question: How many bikes are heavier than 780 grams?

SELECT count(*) FROM bike WHERE weight  >  780

How many bikes are heavier than 780 grams ?


Question: Show the name and population of the country that has the highest roller coaster.

SELECT T1.Name ,  T1.population FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID  =  T2.Country_ID ORDER BY T2.Height DESC LIMIT 1

Show the name and population of the country that has the highest roller coaster .

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


Question: What is the sum of score of the post on 2010-07-19?

SELECT SUM(Score) FROM posts WHERE LasActivityDate LIKE '2010-07-19%'

What is the sum of score of the post on 2010 - 07 - 19 ?

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


Question: What are the countries of mountains with height bigger than 5000?

SELECT Country FROM mountain WHERE Height  >  5000

What are the countries of mountains with height bigger than 5000 ?

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


Question: Provide the International Standard Book Number of the book The Mystery in the Rocky Mountains.

SELECT isbn13 FROM book WHERE title = 'The Mystery in the Rocky Mountains'

Provide the International Standard Book Number of the book The Mystery in the Rocky Mountains .

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


Question: what is the full name and id of the college with the largest number of baseball players?

SELECT T1.name_full ,  T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id  =  T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;

what is the full name and i d of the college with the largest number of baseball players ?

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


Question: Show customer ids who don't have an account.

SELECT customer_id FROM Customers EXCEPT SELECT customer_id FROM Accounts

Show customer ids who do n't have an account .


Question: List all product names and its product line for all purchase order with order quantity of 5000 or more.

SELECT T1.Name, T1.ProductLine FROM Product AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderQty > 4999

List all product names and its product line for all purchase order with order quantity of 5000 or more .

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


Question: List the titles for all Catalan language wikipedia page from revision page id 106600 to 106700.

SELECT title FROM pages WHERE revision BETWEEN 106600 AND 106700

List the titles for all Catalan language wikipedia page from revision page i d 106600 to 106700 .

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


Question: What's the description for the movie list "Short and pretty damn sweet"?

SELECT list_description FROM lists WHERE list_title = 'Short and pretty damn sweet'

What 's the description for the movie list " Short and pretty damn sweet " ?

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


Question: Which Asian country gave its agricultural sector the largest share of its gross domestic product?

SELECT T2.Country FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Asia' ORDER BY T4.Agriculture DESC LIMIT 1

Which Asian country gave its agricultural sector the largest share of its gross domestic product ?

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


Question: Please provide the title of the list with the most comments on the list.

SELECT list_title FROM lists GROUP BY list_title ORDER BY COUNT(list_comments) DESC LIMIT 1

Please provide the title of the list with the most comments on the list .

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


Question: Which countries have more than 90% of African? List the name of the country in full.

SELECT T2.Name FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'African' AND T1.Percentage > 90

Which countries have more than 90 % of African ? List the name of the country in full .

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


Question: How many episodes have the star score greater than 8?

SELECT COUNT(DISTINCT episode_id) FROM Vote WHERE stars > 8;

How many episodes have the star score greater than 8 ?

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


Question: In which district have there been more intimidation-type crimes?

SELECT T3.district_name FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.primary_description = 'INTIMIDATION' GROUP BY T3.district_name ORDER BY COUNT(T1.primary_description) DESC LIMIT 1

In which district have there been more intimidation - type crimes ?

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


Question: Show the distinct apartment numbers of the apartments that have bookings with status code "Confirmed".

SELECT DISTINCT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed"

Show the distinct apartment numbers of the apartments that have bookings with status code " Confirmed " .

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


Question: Which spokesman has lower points than the average?

SELECT name FROM spokesman WHERE points  <  (SELECT avg(points) FROM spokesman)

Which spokesman has lower points than the average ?


Question: What is the name of the product stored in location 1 compartment L container 6?

SELECT T2.Name FROM ProductInventory AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.LocationID = 1 AND T1.Shelf = 'L' AND T1.Bin = 6

What is the name of the product stored in location 1 compartment L container 6 ?

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


Question: What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is "PUR"?

SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON  T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  >  100 AND T3.transaction_type_code  =  "PUR"

What are the lot details of lots associated with transactions whose share count is bigger than 100 and whose type code is " PUR " ?

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


Question: Of customers who provide other services, how many are from places where inhabitants are more than 20000?

SELECT COUNT(T2.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.OCCUPATION = 'Other-service' AND T2.INHABITANTS_K > 20

Of customers who provide other services , how many are from places where inhabitants are more than 20000 ?

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


Question: Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental.

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

Return the full name of the staff who provided a customer with the first name April and the last name Burns with a film rental .

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


Question: Find the id, forename and number of races of all drivers who have at least participated in two races?

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

Find the i d , forename and number of races of all drivers who have at least participated in two races ?

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


Question: How many transactions have been made to purchase a root beer brand from California?

SELECT COUNT(T3.RootBeerID) FROM rootbeerbrand AS T1 INNER JOIN rootbeer AS T2 ON T1.BrandID = T2.BrandID INNER JOIN `transaction` AS T3 ON T2.RootBeerID = T3.RootBeerID WHERE T1.State = 'CA'

How many transactions have been made to purchase a root beer brand from California ?

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


Question: What atoms comprise TR186?

SELECT T.atom_id FROM atom AS T WHERE T.molecule_id = 'TR186'


Question: How many credits does course CIS-220 have, and what its description?

SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'CIS-220'

How many credits does course CIS-220 have , and what its description ?

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


Question: List the languages used in the USA.

SELECT Language FROM CountryLanguage WHERE CountryCode = 'USA'


Question: List all the podcasts reviewed by a reviewer who has a review titled "Inspired & On Fire!".

SELECT T1.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Inspired & On Fire!'

List all the podcasts reviewed by a reviewer who has a review titled " Inspired & On Fire ! " .

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


Question: How many users became an elite user the same year they joined Yelp?

SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = T2.year_id

How many users became an elite user the same year they joined Yelp ?

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


Question: Please list the titles of all the films that the customer RUTH MARTINEZ has rented.

SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'

Please list the titles of all the films that the customer RUTH MARTINEZ has rented .

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


Question: Show the station name with greatest number of trains.

SELECT T2.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id GROUP BY T1.station_id ORDER BY count(*) DESC LIMIT 1

Show the station name with greatest number of trains .


Question: Mention the most populated city and median income of the store in Florida state.

SELECT `City Name`, `Median Income` FROM `Store Locations` WHERE State = 'Florida' ORDER BY Population DESC LIMIT 1

Mention the most populated city and median income of the store in Florida state .

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


Question: What are the names of projects that have not been assigned?

SELECT Name FROM Projects WHERE Code NOT IN (SELECT Project FROM AssignedTo)

What are the names of projects that have not been assigned ?

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


Question: List out the number of students who have the longest duration of absense from school and enlisted in the peace corps.

SELECT COUNT(T1.NAME) FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'peace_corps' ORDER BY T1.month DESC LIMIT 1

List out the number of students who have the longest duration of absense from school and enlisted in the peace corps .

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


Question: State the inflation rate of Greece.

SELECT T2.Inflation FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Greece'


Question: What are the wines that have prices lower than 50 and have appelations in Monterey county?

SELECT T2.Name FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.County  =  "Monterey" AND T2.price  <  50

What are the wines that have prices lower than 50 and have appelations in Monterey county ?

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


Question: Tell the wet-bulb temperature of the weather station which contained store no.6 on 2012/2/15.

SELECT T1.wetbulb FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 14 AND T1.`date` = '2012-02-15'

Tell the wet - bulb temperature of the weather station which contained store no.6 on 2012/2/15 .

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


Question: Which department has the largest number of employees?

SELECT name FROM department GROUP BY departmentID ORDER BY count(departmentID) DESC LIMIT 1;

Which department has the largest number of employees ?


Question: Among all the orders made by a customer in the household segment, what is the highest total price?

SELECT MAX(T1.o_totalprice) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD'

Among all the orders made by a customer in the household segment , what is the highest total price ?

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


Question: Find the different billing countries for all invoices.

SELECT distinct(BillingCountry) FROM INVOICE

Find the different billing countries for all invoices .


Question: How many times in total did the team Boston Red Stockings participate in postseason games?

SELECT count(*) FROM ( SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_winner  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' UNION SELECT * FROM postseason AS T1 JOIN team AS T2 ON T1.team_id_loser  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' );

How many times in total did the team Boston Red Stockings participate in postseason games ?

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


Question: Name the goalies and season they played when Boston Bruins won number 1 in rank.

SELECT T1.firstName, T1.lastName, T3.year FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T2.year = T3.year AND T2.tmID = T3.tmID WHERE T1.deathYear IS NOT NULL AND T3.name = 'Boston Bruins' AND T3.rank = 1 AND T1.pos = 'G'

Name the goalies and season they played when Boston Bruins won number 1 in rank .

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


Question: Return the number of customers who have at least one order with "Cancelled" status.

SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status  =  "Cancelled"

Return the number of customers who have at least one order with " Cancelled " status .

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


Question: Show the nations that have both members older than 22 and members younger than 19.

SELECT Nationality FROM member WHERE Age  >  22 INTERSECT SELECT Nationality FROM member WHERE Age  <  19

Show the nations that have both members older than 22 and members younger than 19 .

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


Question: Who had the most assists of team Plymouth Whalers in the 1999-2000 season?

SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Plymouth Whalers' AND T2.SEASON = '1999-2000' ORDER BY T2.A DESC LIMIT 1

Who had the most assists of team Plymouth Whalers in the 1999 - 2000 season ?

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


Question: What is the total sales amount for Reflector?

SELECT SUM(T1.Price * T2.quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'Reflector'

What is the total sales amount for Reflector ?


Question: What is the post ID and the comments commented in the post titled by "Group differences on a five point Likert item"?

SELECT T2.Id, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.Title = 'Group differences on a five point Likert item'

What is the post ID and the comments commented in the post titled by " Group differences on a five point Likert item " ?

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


Question: What are the distinct invoice ids and statuses for all payments?

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

What are the distinct invoice ids and statuses for all payments ?

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


Question: List the weight of the customer's shipment with annual revenue of 39448581.

SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.annual_revenue = 39448581

List the weight of the customer 's shipment with annual revenue of 39448581 .

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


Question: How many critics of the movie "Imitation of Life" got more than 1 like?

SELECT COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Imitation of Life' AND T1.critic_likes > 1

How many critics of the movie " Imitation of Life " got more than 1 like ?

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


Question: Find the subject ID, name of subject and the corresponding number of courses for each subject, and sort by the course count in ascending order.

SELECT T1.subject_id ,  T2.subject_name ,  COUNT(*) FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id GROUP BY T1.subject_id ORDER BY COUNT(*) ASC

Find the subject ID , name of subject and the corresponding number of courses for each subject , and sort by the course count in ascending order .

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


Question: What is the status code with the least number of customers?

SELECT customer_status_code FROM Customers GROUP BY customer_status_code ORDER BY count(*) ASC LIMIT 1;

What is the status code with the least number of customers ?

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


Question: What is the username of the current official Facebook presence of the oldest current legislator?

SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id ORDER BY T1.birthday_bio LIMIT 1

What is the username of the current official Facebook presence of the oldest current legislator ?

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


Question: Does the bike with Id number 16 making any intercity trip? If yes, calculate the total travel duration during all the intercity trip. Convert the duration to hour.

SELECT T1.end_station_name, T2.city, CAST(SUM(T1.duration) AS REAL) / 3600 FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.bike_id = 16 AND T1.start_station_name != T1.end_station_name

Does the bike with I d number 16 making any intercity trip ? If yes , calculate the total travel duration during all the intercity trip . Convert the duration to hour .

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


Question: What are the countries of markets and their corresponding years of market estimation?

SELECT T2.Country ,  T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID

What are the countries of markets and their corresponding years of market estimation ?

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


Question: Which poll resource provided the most number of candidate information?

SELECT poll_source FROM candidate GROUP BY poll_source ORDER BY count(*) DESC LIMIT 1

Which poll resource provided the most number of candidate information ?

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


Question: Which word has the most occurrences within the same page of wikipedia about Catalan language?

SELECT T1.word FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T2.occurrences = ( SELECT MAX(occurrences) FROM pages_words )

Which word has the most occurrences within the same page of wikipedia about Catalan language ?

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


Question: How many Account Representatives are there in Illinois with satisfying performance?

SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Account Representative' AND T1.performance = 'Good' AND T2.state = 'IL'

How many Account Representatives are there in Illinois with satisfying performance ?

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


Question: Find the names of all reviewers who have contributed three or more ratings.

SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T1.rID HAVING COUNT(*)  >=  3

Find the names of all reviewers who have contributed three or more ratings .

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


Question: Which superhero has the same eyes, hair and skin colour? Indicate the publisher of the superhero.

SELECT T1.superhero_name, T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.eye_colour_id = T1.hair_colour_id AND T1.eye_colour_id = T1.skin_colour_id

Which superhero has the same eyes , hair and skin colour ? Indicate the publisher of the superhero .

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


Question: List the customers first and last name of 10 least expensive invoices.

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

List the customers first and last name of 10 least expensive invoices .

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


Question: How many chapters are there in "Midsummer Night's Dream"?

SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Midsummer Night''s Dream'

How many chapters are there in " Midsummer Night 's Dream " ?

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


Question: What was the highest score of the home team in the Netherlands Eredivisie league?

SELECT MAX(t2.home_team_goal) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Netherlands Eredivisie'

What was the highest score of the home team in the Netherlands Eredivisie league ?

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


Question: What is the name of the movie that is rated by most of times?

SELECT T2.title ,  T1.mID FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.mID ORDER BY count(*) DESC LIMIT 1

What is the name of the movie that is rated by most of times ?

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


Question: Which people severed as governor most frequently?

SELECT Governor FROM party GROUP BY Governor ORDER BY COUNT(*) DESC LIMIT 1

Which people severed as governor most frequently ?


Question: Among the active customers, how many of them have Nina as their first name?

SELECT COUNT(customer_id) FROM customer WHERE first_name = 'Nina' AND active = 1

Among the active customers , how many of them have Nina as their first name ?

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


Question: Write down the any five of ID and name of category that starts with alphabet "P".

SELECT category_id, category_name FROM Categories WHERE category_name LIKE 'P%' LIMIT 5

Write down the any five of ID and name of category that starts with alphabet " P " .

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


Question: What are the ids and names of racing bikes that are purchased by at least 4 cyclists?

SELECT T1.id ,  T1.product_name FROM bike AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.bike_id GROUP BY T1.id HAVING count(*)  >=  4

What are the ids and names of racing bikes that are purchased by at least 4 cyclists ?

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


Question: Find the first name and gpa of the students whose gpa is lower than the average gpa of all students.

SELECT stu_fname ,  stu_gpa FROM student WHERE stu_gpa  <  (SELECT avg(stu_gpa) FROM student)

Find the first name and gpa of the students whose gpa is lower than the average gpa of all students .

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


Question: What is the founded year of the non public school that was founded most recently?

SELECT founded FROM university WHERE affiliation != 'Public' ORDER BY founded DESC LIMIT 1

What is the founded year of the non public school that was founded most recently ?

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


Question: For each year, return the year and the number of times the team Boston Red Stockings won in the postseasons.

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

For each year , return the year and the number of times the team Boston Red Stockings won in the postseasons .

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


Question: How long did Austin Cintron take to return the movie 'Destiny Saturday'?

SELECT T2.rental_date - T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'AUSTIN' AND T4.title = 'DESTINY SATURDAY'

How long did Austin Cintron take to return the movie ' Destiny Saturday ' ?

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


Question: In which region where a game had the lowest number of sales?

SELECT DISTINCT T1.region_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id ORDER BY T2.num_sales LIMIT 1

In which region where a game had the lowest number of sales ?


Question: Find the club which has the largest number of members majoring in "600".

SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.major  =  "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Find the club which has the largest number of members majoring in " 600 " .

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


Question: What are the theme and year for all exhibitions that have a ticket price under 15?

SELECT theme ,  YEAR FROM exhibition WHERE ticket_price  <  15

What are the theme and year for all exhibitions that have a ticket price under 15 ?

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


Question: What is the average, minimum, maximum, and total transaction amount?

SELECT avg(transaction_amount) ,  min(transaction_amount) ,  max(transaction_amount) ,   sum(transaction_amount) FROM Financial_transactions

What is the average , minimum , maximum , and total transaction amount ?

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


Question: Find the race of the superhero who weighs 108kg and is 188cm tall.

SELECT DISTINCT T2.race FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T1.weight_kg = 108 AND T1.height_cm = 188

Find the race of the superhero who weighs 108 kg and is 188 cm tall .

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


Question: What is the average body mass index for patients with higher total cholesterol?

SELECT SUM(T1.VALUE) / COUNT(T1.PATIENT) FROM observations AS T1 INNER JOIN ( SELECT DISTINCT PATIENT FROM observations WHERE DESCRIPTION = 'Total Cholesterol' AND VALUE > 200 ) AS T2 ON T1.PATIENT = T2.PATIENT WHERE T1.DESCRIPTION = 'Body Mass Index'

What is the average body mass index for patients with higher total cholesterol ?

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


Question: Which countries has the most number of airlines whose active status is 'Y'?

SELECT country FROM airlines WHERE active  =  'Y' GROUP BY country ORDER BY count(*) DESC LIMIT 1

Which countries has the most number of airlines whose active status is ' Y ' ?

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


Question: How many teams have the same total number of postseason wins and postseason loses?

SELECT DISTINCT COUNT(tmID) FROM Goalies WHERE PostW = PostL

How many teams have the same total number of postseason wins and postseason loses ?


Question: List the names of the city with the top 5 white percentages.

SELECT Name FROM city ORDER BY White DESC LIMIT 5

List the names of the city with the top 5 white percentages .

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


Question: Find the name of bank branch that provided the greatest total amount of loans.

SELECT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id GROUP BY T1.bname ORDER BY sum(T2.amount) DESC LIMIT 1

Find the name of bank branch that provided the greatest total amount of loans .

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


Question: List the names and birthdays of the top five players in terms of potential.

SELECT DISTINCT T1.player_name ,  T1.birthday FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id  =  T2.player_api_id ORDER BY potential DESC LIMIT 5

List the names and birthdays of the top five players in terms of potential .

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


Question: Provide the tokenized name of the method "Sky.Excel.ExcelBook.TypeConvert".

SELECT NameTokenized FROM Method WHERE Name = 'Sky.Excel.ExcelBook.TypeConvert'

Provide the tokenized name of the method " Sky . Excel . ExcelBook . TypeConvert " .

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


Question: Name 10 cities with their states that are under the Lexington-Fayette, KY office of the Canada Border Services Agency.

SELECT DISTINCT T2.city, T2.state FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Lexington-Fayette, KY' LIMIT 10

Name 10 cities with their states that are under the Lexington - Fayette , KY office of the Canada Border Services Agency .

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


Question: How many users gave "Pavee Lackeen: The Traveller Girl" movie a rating score of 4?

SELECT COUNT(T2.user_id) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'Pavee Lackeen: The Traveller Girl' AND T2.rating_score = 4

How many users gave " Pavee Lackeen : The Traveller Girl " movie a rating score of 4 ?

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


Question: Count the number of papers Mckeown , Kathleen has cited .

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

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


Question: For the patient who was diagnosed with SLE on 1994/2/19, what was his/her anti-Cardiolipin antibody concentration status on 1993/11/12?

SELECT `aCL IgA`, `aCL IgG`, `aCL IgM` FROM Examination WHERE ID IN ( SELECT ID FROM Patient WHERE Diagnosis = 'SLE' AND Description = '1994-02-19' ) AND `Examination Date` = '1993-11-12'

For the patient who was diagnosed with SLE on 1994/2/19 , what was his / her anti - Cardiolipin antibody concentration status on 1993/11/12 ?

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


Question: List all country and league names.

SELECT T1.name ,  T2.name FROM Country AS T1 JOIN League AS T2 ON T1.id  =  T2.country_id


Question: How many of the works of Shakespeare are Tragedy?

SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy'

How many of the works of Shakespeare are Tragedy ?


Question: How many matches have 7 points of winning margin?

SELECT COUNT(Match_Id) FROM Match WHERE win_margin = 7

How many matches have 7 points of winning margin ?


Question: What is the acceleration of the most expensive car?

SELECT T1.acceleration FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

What is the acceleration of the most expensive car ?


Question: Find the number of different cities which banks are located at.

Find the number of different cities which banks are located at .


Question: What are the language and title of the ordered books with price less than 20% of the average price of all ordered books?

SELECT DISTINCT T3.language_name, T2.title FROM order_line AS T1 INNER JOIN book AS T2 ON T1.book_id = T2.book_id INNER JOIN book_language AS T3 ON T3.language_id = T2.language_id WHERE T1.price * 100 < ( SELECT AVG(price) FROM order_line ) * 20

What are the language and title of the ordered books with price less than 20 % of the average price of all ordered books ?

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


Question: how many schools exist in total?

SELECT count(DISTINCT school_code) FROM department


Question: If we discount the products that do not have any type of offer, how many different products have been sold in an amount greater than 2 units per order?

SELECT COUNT(DISTINCT T1.ProductID) FROM SalesOrderDetail AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN SpecialOffer AS T3 ON T2.SpecialOfferID = T3.SpecialOfferID WHERE T1.OrderQty > 2 AND T1.UnitPriceDiscount = 0

If we discount the products that do not have any type of offer , how many different products have been sold in an amount greater than 2 units per order ?

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


Question: Which territories is the employee with a doctorate in charge of? List all of the territory descriptions.

SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.TitleOfCourtesy = 'Dr.'

Which territories is the employee with a doctorate in charge of ? List all of the territory descriptions .

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


Question: Calculate the average GNP of all countries that use Arabic language.

SELECT AVG(T1.GNP) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'Arabic'

Calculate the average GNP of all countries that use Arabic language .

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


Question: Which category is the podcast "Scaling Global" under?

SELECT category FROM categories WHERE podcast_id IN ( SELECT podcast_id FROM podcasts WHERE title = 'Scaling Global' )

Which category is the podcast " Scaling Global " under ?

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


Question: What is the store and inventory ID of the film with the longest duration?

SELECT T2.store_id, T2.inventory_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id ORDER BY T1.length DESC LIMIT 1

What is the store and inventory ID of the film with the longest duration ?

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


Question: What is the BMI of David Bornhammar?

SELECT CAST(T2.weight_in_kg AS REAL) / (CAST(T3.height_in_cm AS REAL) / 100 * (CAST(T3.height_in_cm AS REAL) / 100)) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T1.PlayerName = 'David Bornhammar'


Question: When did eateries from San Bruno city get highest score in inspection?

SELECT T1.`date` FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.city = 'SAN BRUNO' ORDER BY T1.score DESC LIMIT 1

When did eateries from San Bruno city get highest score in inspection ?

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


Question: List each gender and the corresponding number of students.

SELECT Gender_MFU ,  COUNT(*) FROM Students GROUP BY Gender_MFU

List each gender and the corresponding number of students .


Question: How many movies did the director of the highest movie popularity make?

SELECT COUNT(movie_id) FROM movies WHERE director_id = ( SELECT director_id FROM movies ORDER BY movie_popularity DESC LIMIT 1 )

How many movies did the director of the highest movie popularity make ?

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