Question: What is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located?

SELECT COUNT(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T2.gender = 'M' ORDER BY T1.aid_value DESC LIMIT 1

What is the total male graduates in 2012 in the state whereby the institute with the highest average amount of student aid going to undergraduate recipients is located ?

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


Question: In which year did the record ID 19 with game publisher ID 6657 released?

SELECT T.release_year FROM game_platform AS T WHERE T.game_publisher_id = 6657 AND T.id = 19

In which year did the record ID 19 with game publisher ID 6657 released ?

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


Question: How many classrooms are not in Lamberton?

SELECT count(*) FROM classroom WHERE building != 'Lamberton'

How many classrooms are not in Lamberton ?


Question: What is the full name of the country with 100% Africans?

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

What is the full name of the country with 100 % Africans ?

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


Question: What is the match id of the competition called "1994 FIFA World Cup qualification"?

SELECT match_id FROM MATCH WHERE competition = "1994 FIFA World Cup qualification"

What is the match i d of the competition called " 1994 FIFA World Cup qualification " ?

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


Question: Find the distinct winery of wines having price between 50 and 100.

SELECT DISTINCT Winery FROM WINE WHERE Price BETWEEN 50 AND 100

Find the distinct winery of wines having price between 50 and 100 .

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


Question: Find the names of the regions which were affected by the storm that killed the greatest number of people.

SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1

Find the names of the regions which were affected by the storm that killed the greatest number of people .

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


Question: Tell the genre of the game "Resident Evil: Revelations".

SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = 'Resident Evil: Revelations'

Tell the genre of the game " Resident Evil : Revelations " .

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


Question: Please give the full names of all the patients who had been prescribed with Acetaminophen.

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.description LIKE 'Acetaminophen%'

Please give the full names of all the patients who had been prescribed with Acetaminophen .

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


Question: What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5?

SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5

What are the products with the maximum page size eqal to A4 or a pages per minute color less than 5 ?

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


Question: What is the average amount of loan which are still on running contract with statement issuance after each transaction?

SELECT AVG(T2.amount) FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.status IN ('C', 'D') AND T1.frequency = 'POPLATEK PO OBRATU'

What is the average amount of loan which are still on running contract with statement issuance after each transaction ?

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


Question: What was the total price of the products shipped to Rovelli Gifts Distributors Ltd. between 1/1/2003 and 12/31/2003?

SELECT T3.priceEach * T3.quantityOrdered FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN orderdetails AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.customerName = 'Rovelli Gifts' AND T2.status = 'Shipped' AND STRFTIME('%Y', T2.shippedDate) = '2003'

What was the total price of the products shipped to Rovelli Gifts Distributors Ltd. between 1/1/2003 and 12/31/2003 ?

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


Question: Provide all the orders from WARE-NMK1003. Name the product and sales team for each of these order.

SELECT DISTINCT T1.`Product Name`, T3.`Sales Team` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID WHERE T2.WarehouseCode = 'WARE-NMK1003'

Provide all the orders from WARE - NMK1003 . Name the product and sales team for each of these order .

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


Question: Find the full names of employees living in the city of Calgary.

SELECT FirstName ,  LastName FROM EMPLOYEE WHERE City  =  "Calgary"

Find the full names of employees living in the city of Calgary .

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


Question: Count the number of book clubs.


Question: Among the atoms that contain element carbon, which one does not contain compound carcinogenic?

SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'

Among the atoms that contain element carbon , which one does not contain compound carcinogenic ?

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


Question: Find the total claimed amount of all the claims.

Find the total claimed amount of all the claims .


Question: Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms.

SELECT CAST(SUM(CASE WHEN T1.label = '+' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.bond_type = '#' AND T2.element = 'h'

Calculate the percentage of carcinogenic molecules with triple bonded Hidrogen atoms .

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


Question: What is the name of the browser that became compatible with the accelerator 'CProxy' after year 1998 ?

SELECT T1.name FROM browser AS T1 JOIN accelerator_compatible_browser AS T2 ON T1.id  =  T2.browser_id JOIN web_client_accelerator AS T3 ON T2.accelerator_id  =  T3.id WHERE T3.name  =  'CProxy' AND T2.compatible_since_year  >  1998

What is the name of the browser that became compatible with the accelerator ' CProxy ' after year 1998 ?

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


Question: Pick 5 clients with 0 priority and write down their last name.

SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.priority = 0 LIMIT 5

Pick 5 clients with 0 priority and write down their last name .

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


Question: What is the least common faculty rank?

SELECT Rank FROM FACULTY GROUP BY Rank ORDER BY count(*) ASC LIMIT 1


Question: Please list the ages of all the users who use a Galaxy Note 2.

SELECT T2.age FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.device_model = 'Galaxy Note 2'

Please list the ages of all the users who use a Galaxy Note 2 .

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


Question: Which patients made more than one appointment? Tell me the name and phone number of these patients.

SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1

Which patients made more than one appointment ? Tell me the name and phone number of these patients .

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


Question: How much do the works data saved in English and Arabic differ from one another?

SELECT SUM(CASE WHEN T1.Name = 'English' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.Name = 'Arabic' THEN 1 ELSE 0 END) FROM Culture AS T1 INNER JOIN ProductModelProductDescriptionCulture AS T2 ON T1.CultureID = T2.CultureID WHERE T1.Name = 'English' OR T1.Name = 'Arabic'

How much do the works data saved in English and Arabic differ from one another ?

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


Question: How many times did the matches were held in MA Chidambaram Stadium from 5/9/2009 to 8/8/2011?

SELECT SUM(CASE WHEN Venue_Name = 'MA Chidambaram Stadium' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id WHERE Match_Date BETWEEN '2009-05-09' AND '2011-08-08'

How many times did the matches were held in MA Chidambaram Stadium from 5/9/2009 to 8/8/2011 ?

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


Question: Find the name of the store which has the most headphones in stock. List the number of headphones as well.

SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1

Find the name of the store which has the most headphones in stock . List the number of headphones as well .

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


Question: What is the official full name of the current legislator whose current official Facebook presence is "senjoniernst"?

SELECT T1.official_full_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook = 'senjoniernst'

What is the official full name of the current legislator whose current official Facebook presence is " senjoniernst " ?

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


Question: What is the average inflation rate of the biggest continent?

SELECT AVG(T4.Inflation) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country INNER JOIN economy AS T4 ON T4.Country = T3.Code WHERE T1.Name = ( SELECT Name FROM continent ORDER BY Area DESC LIMIT 1 )

What is the average inflation rate of the biggest continent ?


Question: Which headquarter's truck has the highest shipments in year 2016?

SELECT CASE WHEN T2.make = 'Peterbilt' THEN 'Texas (TX)' WHEN T2.make = 'Mack' THEN 'North Carolina (NC)' WHEN T2.make = 'Kenworth' THEN 'Washington (WA)' END AS "result" FROM shipment AS T1 INNER JOIN truck AS T2 ON T1.truck_id = T2.truck_id WHERE CAST(T1.ship_date AS DATE) = 2016 GROUP BY T2.make ORDER BY COUNT(T1.ship_id) DESC LIMIT 1

Which headquarter 's truck has the highest shipments in year 2016 ?

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


Question: Who is the highest paid employee in "Boston"? Give the full name.

SELECT T1.firstname, T1.lastname FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Boston' ORDER BY T1.salary DESC LIMIT 1

Who is the highest paid employee in " Boston " ? Give the full name .

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


Question: What are the ages of all music artists?

What are the ages of all music artists ?


Question: Calculate difference between business that have the highest number of reviews and business that have the lowest number of reviews.

SELECT ( SELECT COUNT(business_id) FROM Reviews GROUP BY business_id ORDER BY COUNT(business_id) DESC LIMIT 1 ) - ( SELECT COUNT(business_id) FROM Reviews GROUP BY business_id ORDER BY COUNT(business_id) ASC LIMIT 1 ) AS DIFF

Calculate difference between business that have the highest number of reviews and business that have the lowest number of reviews .

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


Question: What is the total number of games sold in region ID 1?

SELECT SUM(T.num_sales * 100000) FROM region_sales AS T WHERE T.region_id = 1

What is the total number of games sold in region ID 1 ?

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


Question: How many simple assaults happened on 2018/9/8?

SELECT SUM(CASE WHEN T2.secondary_description = 'SIMPLE' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.date LIKE '%9/8/2018%' AND T2.primary_description = 'ASSAULT'

How many simple assaults happened on 2018/9/8 ?


Question: Find the marketing region description of China?

SELECT Marketing_Region_Descriptrion FROM Marketing_Regions WHERE Marketing_Region_Name  =  "China"

Find the marketing region description of China ?

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


Question: Show all locations which don't have a train station with at least 15 platforms.

SELECT LOCATION FROM station EXCEPT SELECT LOCATION FROM station WHERE number_of_platforms  >=  15

Show all locations which do n't have a train station with at least 15 platforms .

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


Question: Count the number of students who have advisors.

SELECT count(DISTINCT s_id) FROM advisor

Count the number of students who have advisors .


Question: What are the ids and flavors of cakes, ordered by flavor?

SELECT id ,  flavor FROM goods WHERE food  =  "Cake" ORDER BY flavor

What are the ids and flavors of cakes , ordered by flavor ?

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


Question: What are the ids, scores, and dates of the games which caused at least two injury accidents?

SELECT T1.id ,  T1.score ,  T1.date FROM game AS T1 JOIN injury_accident AS T2 ON T2.game_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2

What are the ids , scores , and dates of the games which caused at least two injury accidents ?

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


Question: How many times of repetition does the word "exemple" show in the Catalan language?

SELECT T2.occurrences FROM words AS T1 INNER JOIN langs_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'exemple' AND T2.lid = 1

How many times of repetition does the word " exemple " show in the Catalan language ?

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


Question: Find the names of instructors who didn't each any courses in any Spring semester.

SELECT name FROM instructor WHERE id NOT IN (SELECT id FROM teaches WHERE semester  =  'Spring')

Find the names of instructors who did n't each any courses in any Spring semester .

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


Question: Which department has the most professors with a Ph.D.?

SELECT T2.dept_name ,  T1.dept_code FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.prof_high_degree  =  'Ph.D.' GROUP BY T1.dept_code ORDER BY count(*) DESC LIMIT 1

Which department has the most professors with a Ph.D. ?


Question: Name the Apps with a sentiment objectivity of 0.3 and include their number of installs.

SELECT DISTINCT T1.App, T1.Installs FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = 0.3

Name the Apps with a sentiment objectivity of 0.3 and include their number of installs .

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


Question: For each director, return the director's name together with the title of the movie they directed that received the highest rating among all of their movies, and the value of that rating. Ignore movies whose director is NULL.

SELECT T2.title ,  T1.stars ,  T2.director ,  max(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE director != "null" GROUP BY director

For each director , return the director 's name together with the title of the movie they directed that received the highest rating among all of their movies , and the value of that rating . Ignore movies whose director is NULL .

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


Question: Tell the question ID for "Would you bring up a physical health issue with a potential employer in an interview?".

SELECT questionid FROM Question WHERE questiontext LIKE 'Would you bring up a physical health issue with a potential employer in an interview?'

Tell the question ID for " Would you bring up a physical health issue with a potential employer in an interview ? " .

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


Question: What are the books published by "Harper Collins"?

SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Harper Collins'

What are the books published by " Harper Collins " ?

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


Question: List the names of all distinct products in alphabetical order.

SELECT DISTINCT product_name FROM products ORDER BY product_name

List the names of all distinct products in alphabetical order .


Question: What is the full name of the customer who gave a 5-star rating and commented "The quintessential dessert root beer. No ice cream required" on his review?

SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 5 AND T2.Review = 'The quintessential dessert root beer. No ice cream required.'

What is the full name of the customer who gave a 5 - star rating and commented " The quintessential dessert root beer . No ice cream required " on his review ?

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


Question: List all public schools and their locations.

SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public'

List all public schools and their locations .


Question: For each grade 0 classroom, report the total number of students.

SELECT classroom ,  count(*) FROM list WHERE grade  =  "0" GROUP BY classroom

For each grade 0 classroom , report the total number of students .

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


Question: What are the distinct names of nurses on call?

SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse

What are the distinct names of nurses on call ?

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


Question: Which employees have the role with code "HR"? Find their names.

SELECT employee_name FROM Employees WHERE role_code  =  "HR"

Which employees have the role with code " HR " ? Find their names .

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


Question: What is the state for area code of 787?

SELECT DISTINCT T2.state FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787

What is the state for area code of 787 ?

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


Question: To which community area does the neighborhood Albany Park belong?

SELECT T2.community_area_name FROM Neighborhood AS T1 INNER JOIN Community_Area AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.neighborhood_name = 'Albany Park'

To which community area does the neighborhood Albany Park belong ?

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


Question: How many Olympic games were held in London?

SELECT COUNT(T1.games_id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'London'

How many Olympic games were held in London ?


Question: What is the Asian population in the city with the alias Leeds?

SELECT SUM(T2.asian_population) FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.alias = 'Leeds'

What is the Asian population in the city with the alias Leeds ?

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


Question: How old is the most influential user?

SELECT Age FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )


Question: What are the names of products that have not been ordered?

SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS t1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id

What are the names of products that have not been ordered ?


Question: How many of the users who rate the movie with the id '2462959' are female?

SELECT COUNT(T1.userid) FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.userid = 2462959 AND T1.u_gender = 'F'

How many of the users who rate the movie with the i d ' 2462959 ' are female ?

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


Question: Whah are the name of each industry and the number of companies in that industry?

SELECT Industry ,  COUNT(*) FROM Companies GROUP BY Industry

Whah are the name of each industry and the number of companies in that industry ?

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


Question: Please list the phone numbers of all the customers in the household segment and are in Brazil.

SELECT T1.c_phone FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_mktsegment = 'HOUSEHOLD' AND T2.n_name = 'BRAZIL'

Please list the phone numbers of all the customers in the household segment and are in Brazil .

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


Question: Give the title and author's name of the papers published between 2000 and 2005 that include the topic optical properties.

SELECT T1.Title, T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Keyword LIKE '%optical properties%' AND T1.Year BETWEEN 2000 AND 2005 AND T1.Title <> ''

Give the title and author 's name of the papers published between 2000 and 2005 that include the topic optical properties .

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


Question: What is the highest gender ratio of the residential areas in Arecibo county?

SELECT CAST(T1.male_population AS REAL) / T1.female_population FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' AND T1.female_population <> 0 ORDER BY 1 DESC LIMIT 1

What is the highest gender ratio of the residential areas in Arecibo county ?

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


Question: What are the names of different tracks, and how many races has each had?

SELECT T2.name ,  count(*) FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id GROUP BY T1.track_id

What are the names of different tracks , and how many races has each had ?

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


Question: Please list the mountains in the country with the lowest inflation rate.

SELECT Mountain FROM geo_mountain WHERE Country = ( SELECT Country FROM economy ORDER BY Inflation ASC LIMIT 1 )

Please list the mountains in the country with the lowest inflation rate .

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


Question: Show the product type codes that have at least two products.

SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code HAVING COUNT(*)  >=  2

Show the product type codes that have at least two products .

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


Question: Tell me the the date when the first claim was made.

SELECT Date_Claim_Made FROM Claims ORDER BY Date_Claim_Made ASC LIMIT 1

Tell me the the date when the first claim was made .

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


Question: In which province is the highest volcano mountain located in?

SELECT T1.Province FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T3.Type = 'volcano' ORDER BY T3.Height DESC LIMIT 1

In which province is the highest volcano mountain located in ?

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


Question: For Which order was the most profitable, please list the customer name of the order and the profit of the order.

SELECT t3.customerName, (t1.priceEach - t4.buyPrice) * t1.quantityOrdered FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber INNER JOIN products AS t4 ON t1.productCode = t4.productCode GROUP BY t3.customerName, t1.priceEach, t4.buyPrice, t1.quantityOrdered ORDER BY (t1.priceEach - t4.buyPrice) * t1.quantityOrdered DESC LIMIT 1

For Which order was the most profitable , please list the customer name of the order and the profit of the order .

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


Question: Show the average, minimum, and maximum age for different majors.

SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major

Show the average , minimum , and maximum age for different majors .


Question: What are the names of all Rock tracks that are stored on MPEG audio files?

SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" AND T3.name = "MPEG audio file";

What are the names of all Rock tracks that are stored on MPEG audio files ?

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


Question: Return the cities and provinces of institutions.

SELECT City ,  Province FROM institution

Return the cities and provinces of institutions .


Question: Please list the texts of all the tweets in French posted by male users.

SELECT T1.text FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Lang = 'fr'

Please list the texts of all the tweets in French posted by male users .

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


Question: How many scenes are there in King John?

SELECT COUNT(T2.Scene) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'King John'

How many scenes are there in King John ?


Question: List out the state of businesses which have opening time at 1AM.

SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T2.opening_time = '1AM'

List out the state of businesses which have opening time at 1AM .

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


Question: Show names of players and names of clubs they are in.

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

Show names of players and names of clubs they are in .

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


Question: Provide the destinations of flight number 1596.

SELECT DEST FROM Airlines WHERE OP_CARRIER_FL_NUM = 1596

Provide the destinations of flight number 1596 .


Question: Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation.

SELECT ShortName, ExternalDebtReportingStatus FROM Country WHERE LendingCategory = 'IDA'

Please list the countries under the lending category of the International Development Associations and have a external debt reporting finished by estimation .

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


Question: What is the name of the country of the supplier with the highest debt?

SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey ORDER BY T1.s_suppkey DESC LIMIT 1

What is the name of the country of the supplier with the highest debt ?

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


Question: List all players' given name who are good at both left and right hand and playing the forward position.

SELECT nameGiven FROM Master WHERE shootCatch IS NULL AND pos = 'F'

List all players ' given name who are good at both left and right hand and playing the forward position .

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


Question: Among the cars with 8 cylinders, what is the name of the one that's the most expensive?

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.cylinders = 8 ORDER BY T2.price DESC LIMIT 1

Among the cars with 8 cylinders , what is the name of the one that 's the most expensive ?

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


Question: Show me the city code of two cities with maximum distance.

SELECT city1_code ,  city2_code FROM Direct_distance ORDER BY distance DESC LIMIT 1

Show me the city code of two cities with maximum distance .

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


Question: Which police forces operate in both counties that are located in the East and in the West?

SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "West"

Which police forces operate in both counties that are located in the East and in the West ?

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


Question: Indicate the ISBN13 of all the books that have less than 140 pages and more than 135.

SELECT isbn13 FROM book WHERE num_pages < 140 AND num_pages > 135

Indicate the ISBN13 of all the books that have less than 140 pages and more than 135 .

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


Question: Please list the names of all the suppliers for the part with the highest retail price.

SELECT T3.s_phone FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'hot spring dodger dim light' ORDER BY T1.p_size DESC LIMIT 1

Please list the names of all the suppliers for the part with the highest retail price .

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


Question: Provide the full name and email address of the Student_Club's Secretary.

SELECT first_name, last_name, email FROM member WHERE position = 'Secretary'

Provide the full name and email address of the Student_Club 's Secretary .

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


Question: Show all invoice ids and the number of payments for each invoice.

SELECT invoice_id ,  count(*) FROM Payments GROUP BY invoice_id

Show all invoice ids and the number of payments for each invoice .

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


Question: What is the percentage of total orders from stores in Orange County in 2018?

SELECT CAST(SUM(CASE WHEN T2.County = 'Orange County' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/18'

What is the percentage of total orders from stores in Orange County in 2018 ?

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


Question: List the poverty level of all the schools that received donations with the zip code "7079".

SELECT DISTINCT T2.poverty_level FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.donor_zip = 7079

List the poverty level of all the schools that received donations with the zip code " 7079 " .

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


Question: What is the average unit price of tracks that belong to Jazz genre?

SELECT AVG(UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Jazz"

What is the average unit price of tracks that belong to Jazz genre ?

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


Question: What are the different role codes for users, and how many users have each?

SELECT count(*) ,  role_code FROM users GROUP BY role_code

What are the different role codes for users , and how many users have each ?

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


Question: Among the players who died in Massachussets, how many of them have won an award?

SELECT COUNT(DISTINCT T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.deathState = 'MA'

Among the players who died in Massachussets , how many of them have won an award ?

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


Question: How many businesses are not closed in the city of Mesa?

SELECT COUNT(business_id) FROM Business WHERE city = 'Mesa' AND active = 'true'

How many businesses are not closed in the city of Mesa ?

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


Question: How many OPPO devices are there?

SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE phone_brand = 'OPPO'


Question: How many players did not get more than 10 steals between the years 2000 and 2005?

SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE season_id BETWEEN 2000 AND 2005 AND steals <= 10

How many players did not get more than 10 steals between the years 2000 and 2005 ?

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


Question: What are the names and codes for all majors ordered by their code?

SELECT major_name ,  major_code FROM Major ORDER BY major_code

What are the names and codes for all majors ordered by their code ?

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


Question: Show the names of editors that are on the committee of journals with sales bigger than 3000.

SELECT T2.Name 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 WHERE T3.Sales  >  3000

Show the names of editors that are on the committee of journals with sales bigger than 3000 .

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


Question: What is the percentage of rated movies were released in year 2021?

SELECT CAST(SUM(CASE WHEN T1.movie_release_year = 2021 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id

What is the percentage of rated movies were released in year 2021 ?

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


Question: What is the brand of the truck that is used to ship by Zachery Hicks?

SELECT DISTINCT T1.make FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T3.first_name = 'Zachery' AND T3.last_name = 'Hicks'

What is the brand of the truck that is used to ship by Zachery Hicks ?

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


Question: List the official full names of 10 legislators who have a YouTube account but no Instagram account.

SELECT T2.official_full_name FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.facebook IS NOT NULL AND (T1.instagram IS NULL OR T1.instagram = '') LIMIT 10

List the official full names of 10 legislators who have a YouTube account but no Instagram account .

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


Question: Which team had more home victories in the 2021 season's matches of the Bundesliga division, Augsburg or Mainz?

SELECT CASE WHEN COUNT(CASE WHEN T1.HomeTeam = 'Augsburg' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T1.HomeTeam = ' Mainz' THEN 1 ELSE NULL END) > 0 THEN 'Augsburg' ELSE 'Mainz' END FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.FTR = 'H'

Which team had more home victories in the 2021 season 's matches of the Bundesliga division , Augsburg or Mainz ?

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


Question: How many turnovers per game did the assist champion had in the 2003 NBA season?

SELECT AVG(T2.turnovers) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2003 GROUP BY T1.playerID, T2.assists ORDER BY T2.assists DESC LIMIT 1

How many turnovers per game did the assist champion had in the 2003 NBA season ?

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


Question: Among all the closed events, which event has the highest spend-to-budget ratio?

SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.status = 'Closed' ORDER BY T1.spent / T1.amount DESC LIMIT 1

Among all the closed events , which event has the highest spend - to - budget ratio ?

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


Question: How many customers are in debt?

SELECT COUNT(c_custkey) FROM customer WHERE c_acctbal < 0


Question: What is the title of the employee who handled order id 10270?

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

What is the title of the employee who handled order i d 10270 ?

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


Question: What are the names of all people, ordered by their date of birth?

SELECT name FROM people ORDER BY date_of_birth

What are the names of all people , ordered by their date of birth ?

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


Question: What is the percentage of borderless cards?

SELECT CAST(SUM(CASE WHEN borderColor = 'borderless' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards

What is the percentage of borderless cards ?


Question: What are the distinct last names of the students who have class president votes?

SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.CLASS_President_VOTE

What are the distinct last names of the students who have class president votes ?

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


Question: List out the name of orders which have delivery date of 6/13/2018.

SELECT DISTINCT T FROM ( SELECT IIF(DeliveryDate = '6/13/18', OrderNumber, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

List out the name of orders which have delivery date of 6/13/2018 .

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


Question: How many players with the first name Joe were drafted in 1970?

SELECT COUNT(DISTINCT playerID) FROM draft WHERE firstName = 'Joe' AND draftYear = 1970

How many players with the first name Joe were drafted in 1970 ?

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


Question: How many artworks are there?


Question: Please list the names of all the universities that scored under 60 in teaching in 2011 and are in the United States of America.

SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id INNER JOIN country AS T4 ON T4.id = T3.country_id WHERE T4.country_name = 'United States of America' AND T2.year = 2011 AND T2.score < 60 AND T1.criteria_name = 'Teaching'

Please list the names of all the universities that scored under 60 in teaching in 2011 and are in the United States of America .

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


Question: What are the names and descriptions of the photos taken at the tourist attraction "film festival"?

SELECT T1.Name ,  T1.Description FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "film festival"

What are the names and descriptions of the photos taken at the tourist attraction " film festival " ?

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


Question: What is the average rating for movie titled 'When Will I Be Loved'?

SELECT AVG(T2.rating_score) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'When Will I Be Loved'

What is the average rating for movie titled ' When Will I Be Loved ' ?

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


Question: Find the first and last names of all the female (sex is F) students who have president votes.

SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"

Find the first and last names of all the female ( sex is F ) students who have president votes .

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


Question: How many kinds of events does athletics have?

SELECT COUNT(T2.event_name) FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Athletics'

How many kinds of events does athletics have ?


Question: Find the pilots who have either plane Piper Cub or plane F-14 Fighter.

SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' OR plane_name  =  'F-14 Fighter'

Find the pilots who have either plane Piper Cub or plane F-14 Fighter .

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


Question: Give me the names of customers who have placed orders between 2009-01-01 and 2010-01-01.

SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.date_order_placed >= "2009-01-01" AND T2.date_order_placed <= "2010-01-01"

Give me the names of customers who have placed orders between 2009 - 01 - 01 and 2010 - 01 - 01 .

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


Question: Show names of technicians and series of machines they are assigned to repair.

SELECT T3.Name ,  T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID

Show names of technicians and series of machines they are assigned to repair .

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


Question: For each phone, show its names and total number of stocks.

SELECT T2.Name ,  sum(T1.Num_of_stock) FROM phone_market AS T1 JOIN phone AS T2 ON T1.Phone_ID  =  T2.Phone_ID GROUP BY T2.Name

For each phone , show its names and total number of stocks .

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


Question: list all the names of press in descending order of the profit of the year.

SELECT name FROM press ORDER BY Year_Profits_billion DESC

list all the names of press in descending order of the profit of the year .

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


Question: Give me the name of each club.


Question: Provide the last edit date and last edit user ID for the post "Detecting a given face in a database of facial images".

SELECT LastEditDate, LastEditorUserId FROM posts WHERE Title = 'Detecting a given face in a database of facial images'

Provide the last edit date and last edit user ID for the post " Detecting a given face in a database of facial images " .

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


Question: Return the amount of the largest payment.

SELECT amount FROM payment ORDER BY amount DESC LIMIT 1

Return the amount of the largest payment .


Question: what is the name and position of the head whose department has least number of employees?

SELECT T2.name ,  T2.position FROM department AS T1 JOIN physician AS T2 ON T1.head  =  T2.EmployeeID GROUP BY departmentID ORDER BY count(departmentID) LIMIT 1;

what is the name and position of the head whose department has least number of employees ?

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


Question: Show the student id of the oldest student.

SELECT StuID FROM Student WHERE age  =  (SELECT max(age) FROM Student)

Show the student i d of the oldest student .


Question: What are the id, name, price and color of the products which have not been ordered for at least twice?

SELECT product_id ,  product_name ,  product_price ,  product_color FROM Products EXCEPT SELECT T1.product_id ,  T1.product_name ,  T1.product_price ,  T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Orders AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.product_id HAVING count(*)  >=  2

What are the i d , name , price and color of the products which have not been ordered for at least twice ?

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


Question: When was the game titled 3DS Classic Collection released?

SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = '3DS Classic Collection'

When was the game titled 3DS Classic Collection released ?

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


Question: Give the name of the league with the highest matches of all time and how many matches were played in the said league.

SELECT t2.name, t1.max_count FROM League AS t2 JOIN (SELECT league_id, MAX(cnt) AS max_count FROM (SELECT league_id, COUNT(id) AS cnt FROM Match GROUP BY league_id) AS subquery) AS t1 ON t1.league_id = t2.id

Give the name of the league with the highest matches of all time and how many matches were played in the said league .

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


Question: Among the South African players, how many were born before 4/11/1980?

SELECT SUM(CASE WHEN T1.DOB < '1980-4-11' THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id WHERE T2.Country_Name = 'South Africa'

Among the South African players , how many were born before 4/11/1980 ?

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


Question: Of players who have more than 2 wins, what is the country of the player who makes the most?

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

Of players who have more than 2 wins , what is the country of the player who makes the most ?

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


Question: How many male patients have a normal level of both albumin and total protein?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M'  AND T2.ALB > 3.5 AND T2.ALB < 5.5 AND T2.TP BETWEEN 6.0 AND 8.5

How many male patients have a normal level of both albumin and total protein ?

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


Question: How was Francesco Migliore's attacking work rate on 2015/5/1?

SELECT t2.attacking_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.`date` LIKE '2015-05-01%' AND t1.player_name = 'Francesco Migliore'

How was Francesco Migliore 's attacking work rate on 2015/5/1 ?

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


Question: What is the average business time for Yelp_Business no.1 on weekends?

SELECT T1.closing_time + 12 - T1.opening_time AS "avg opening hours" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T1.business_id = 1 AND (T2.day_of_week = 'Sunday' OR T2.day_of_week = 'Sunday')

What is the average business time for Yelp_Business no.1 on weekends ?


Question: Which book by Hirohiko Araki was published on 6/6/2006?

SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Hirohiko Araki' AND T1.publication_date = '2006-06-06'

Which book by Hirohiko Araki was published on 6/6/2006 ?


Question: For the document subset with the most number of different documents , what are the ids and names of the subset , as well as the number of documents ?

select t1.document_subset_id ,  t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id =  t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;

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


Question: Show the number of customers for each gender.

SELECT gender ,  count(*) FROM Customers GROUP BY gender

Show the number of customers for each gender .


Question: List out all the coach ID who have served more than 2 different teams.

SELECT coachID FROM coaches GROUP BY coachID HAVING COUNT(DISTINCT tmID) > 2

List out all the coach ID who have served more than 2 different teams .

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


Question: Which city is "Rensselaer Polytechnic Institute" located in?

SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Rensselaer Polytechnic Institute' THEN city ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL

Which city is " Rensselaer Polytechnic Institute " located in ?

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


Question: Give the average distance between Boston and other cities.

SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code WHERE T2.city_name  =  "Boston"

Give the average distance between Boston and other cities .


Question: Calculate the total sales made by the games released in 2000.

SELECT SUM(T1.num_sales) FROM region_sales AS T1 INNER JOIN game_platform AS T2 ON T1.game_platform_id = T2.id WHERE T2.release_year = 2000

Calculate the total sales made by the games released in 2000 .

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


Question: What are the movie titles for ones that are played in the Odeon theater?

SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'

What are the movie titles for ones that are played in the Odeon theater ?

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


Question: List down the games ID of games held in Tokyo.

SELECT T1.games_id FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'Tokyo'

List down the games ID of games held in Tokyo .

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


Question: Which of the airport names contains the word 'international'?

SELECT name FROM airport WHERE name LIKE '%international%'

Which of the airport names contains the word ' international ' ?

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


Question: Calculate the percentage of paragraphs in all chapters of "All's Well That Ends Well".

SELECT CAST(SUM(IIF(T1.Title = 'All''s Well That Ends Well', 1, 0)) AS REAL) * 100 / COUNT(T3.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id

Calculate the percentage of paragraphs in all chapters of " All 's Well That Ends Well " .

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


Question: Which location names contain the word "film"?

SELECT Location_Name FROM LOCATIONS WHERE Location_Name LIKE "%film%"

Which location names contain the word " film " ?


Question: List the names of counties in descending order of population.

SELECT Name FROM county_public_safety ORDER BY Population DESC

List the names of counties in descending order of population .


Question: What is the date when the youngest user made his or her first post?

SELECT T2.CreaionDate FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.Age IS NOT NULL ORDER BY T1.Age, T2.CreaionDate LIMIT 1

What is the date when the youngest user made his or her first post ?

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


Question: What is the percentage of the events that went over budget?

SELECT CAST(SUM(CASE WHEN remaining < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(budget_id) FROM budget

What is the percentage of the events that went over budget ?


Question: Show the different countries and the number of members from each.

SELECT Country ,  COUNT(*) FROM member GROUP BY Country

Show the different countries and the number of members from each .


Question:
What is the defensive work rate of the football player David Wilson
?

SELECT DISTINCT t2.defensive_work_rate FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'David Wilson'

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


Question: Name the taverns that failed the inspection in January 2010.

SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-01' AND T2.results = 'Fail' AND T1.facility_type = 'TAVERN'

Name the taverns that failed the inspection in January 2010 .

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


Question: Give the full name of the customer who bought the most amount of products.

SELECT T3.FirstName, T3.MiddleInitial, T3.LastName FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID ORDER BY T2.Quantity * T1.Price DESC LIMIT 1

Give the full name of the customer who bought the most amount of products .

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


Question: What is the name of the establishment that Joshua Rosa inspected?

SELECT DISTINCT T3.dba_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id INNER JOIN establishment AS T3 ON T2.license_no = T3.license_no WHERE T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'

What is the name of the establishment that Joshua Rosa inspected ?

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


Question: Provide the name of the song from the movie directed by Ben Sharpsteen.

SELECT T1.song FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Ben Sharpsteen'

Provide the name of the song from the movie directed by Ben Sharpsteen .

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


Question: Which manufacturer is most common among clubs?

SELECT Manufacturer FROM club GROUP BY Manufacturer ORDER BY COUNT(*) DESC LIMIT 1

Which manufacturer is most common among clubs ?


Question: Return the characters and durations for each actor.

Return the characters and durations for each actor .


Question: What is the time of sampling of the solution with the highest sampling time? Indicate the id number of the solution.

SELECT DISTINCT SampledAt, SolutionId FROM Method WHERE SampledAt = ( SELECT MAX(SampledAt) FROM Method )

What is the time of sampling of the solution with the highest sampling time ? Indicate the i d number of the solution .

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


Question: What are the full name, hire date, salary, and department id for employees without the letter M in their first name?

SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%'

What are the full name , hire date , salary , and department i d for employees without the letter M in their first name ?

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


Question: Find the first names and number of works of all artists who have at least two paintings?

SELECT T1.fname ,  count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  >=  2

Find the first names and number of works of all artists who have at least two paintings ?

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


Question: What are the names of all the publishers who have published at least 30 books?

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name HAVING COUNT(T2.publisher_name) >= 30

What are the names of all the publishers who have published at least 30 books ?

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


Question: What are ids of the all distinct orders, sorted by placement date?

SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed

What are ids of the all distinct orders , sorted by placement date ?


Question: What is the number of cities in the United States with more than 3 airports?

SELECT city FROM airports WHERE country  =  'United States' GROUP BY city HAVING count(*)  >  3

What is the number of cities in the United States with more than 3 airports ?

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


Question: Which programs' origins are not "Beijing"? Give me the program names.

SELECT name FROM program WHERE origin != 'Beijing'

Which programs ' origins are not " Beijing " ? Give me the program names .

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


Question: For each director who directed more than one movie, what are the titles and dates of release for all those movies?

SELECT T1.title ,  T1.year FROM Movie AS T1 JOIN Movie AS T2 ON T1.director  =  T2.director WHERE T1.title != T2.title

For each director who directed more than one movie , what are the titles and dates of release for all those movies ?

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


Question: which poll source does the highest oppose rate come from?

SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1

which poll source does the highest oppose rate come from ?

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


Question: What genre of movie has Taran as the main character?

SELECT T1.genre FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T2.hero = 'Taran'

What genre of movie has Taran as the main character ?

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


Question: Who was the latest non player/builder to become the hall of famer? Give the full name.

SELECT name FROM HOF WHERE category IN ('Player', 'Builder') ORDER BY year DESC LIMIT 1

Who was the latest non player / builder to become the hall of famer ? Give the full name .

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


Question: List all books written in Arabic.

SELECT T1.title FROM book AS T1 INNER JOIN book_language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_name = 'Arabic'


Question: Which actor has appeared in the most films?

SELECT actorid FROM movies2actors GROUP BY actorid ORDER BY COUNT(movieid) DESC LIMIT 1

Which actor has appeared in the most films ?


Question: Who ordered the order ID CA-2011-118976 from the East region?

SELECT DISTINCT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Order ID` = 'CA-2011-118976' AND T2.Region = 'East'

Who ordered the order ID CA-2011 - 118976 from the East region ?

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


Question: List all the driver names in ascending order of age.

SELECT Driver FROM driver ORDER BY Age ASC

List all the driver names in ascending order of age .


Question: Name schools in Riverside which the average of average math score for SAT is grater than 400, what is the funding type of these schools?

SELECT T1.sname, T2.`Charter Funding Type` FROM satscores AS T1 INNER JOIN frpm AS T2 ON T1.cds = T2.CDSCode WHERE T2.`District Name` LIKE 'Riverside%' GROUP BY T1.sname, T2.`Charter Funding Type` HAVING CAST(SUM(T1.AvgScrMath) AS REAL) / COUNT(T1.cds) > 400

Name schools in Riverside which the average of average math score for SAT is grater than 400 , what is the funding type of these schools ?

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


Question: Find the name of the district which has greatest number of spokesmen.

SELECT t1.name FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID  =  t2.District_ID GROUP BY t2.District_ID ORDER BY count(*) DESC LIMIT 1

Find the name of the district which has greatest number of spokesmen .


Question: How many apps that are only compatible with Android ver 8.0 and above? List down the users' sentiment of these apps.

SELECT DISTINCT Sentiment FROM user_reviews WHERE App IN ( SELECT App FROM playstore WHERE `Android Ver` = '8.0 and up' )

How many apps that are only compatible with Android ver 8.0 and above ? List down the users ' sentiment of these apps .

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


Question: List movie titles with duration over 120 minutes that are in the action category.

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` = 'action' AND T1.length > 120

List movie titles with duration over 120 minutes that are in the action category .

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


Question: How many points did Lewis Hamilton get in total in all the Formula_1 races he participated?

SELECT SUM(T2.points) FROM drivers AS T1 INNER JOIN results AS T2 ON T1.driverId = T2.driverId WHERE T1.forename = 'Lewis' AND T1.surname = 'Hamilton'

How many points did Lewis Hamilton get in total in all the Formula_1 races he participated ?

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


Question: Among the dishes on menu page ID 7610, list the names and highest prices of the dishes in menu items that were created on 23rd May 2011.

SELECT T1.name, T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.created_at LIKE '2011-05-23%' ORDER BY T2.price DESC LIMIT 1

Among the dishes on menu page ID 7610 , list the names and highest prices of the dishes in menu items that were created on 23rd May 2011 .

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


Question: Who are the sponsors of the menu whose image full height is more than 10000 mm?

SELECT T2.sponsor FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T1.full_height = 10000

Who are the sponsors of the menu whose image full height is more than 10000 mm ?

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


Question: What is the total salary paid by team Boston Red Stockings in 2010?

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

What is the total salary paid by team Boston Red Stockings in 2010 ?

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


Question: How many male students join more than one organization?

SELECT COUNT(T.a) FROM ( SELECT COUNT(DISTINCT T1.name) AS a, COUNT(T2.organ) AS num FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name GROUP BY T1.name ) T WHERE T.num > 1

How many male students join more than one organization ?


Question: What is the average winning rate of the Buffalo Sabres in 2000?

SELECT SUM(CAST(T2.W AS REAL) / T2.G) / COUNT(T1.oppID) FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID WHERE T2.name = 'Buffalo Sabres' AND T1.year = 2000

What is the average winning rate of the Buffalo Sabres in 2000 ?

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


Question: What are the addresses for the stores?

SELECT T2.address FROM store AS T1 INNER JOIN address AS T2 ON T1.address_id = T2.address_id


Question: How many self-relations are there between the object samples in image no.5?

SELECT SUM(CASE WHEN IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_REL WHERE OBJ1_SAMPLE_ID = OBJ2_SAMPLE_ID

How many self - relations are there between the object samples in image no.5 ?

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


Question: What is the gender of Agent 13 hero?

SELECT T2.gender FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T1.superhero_name = 'Agent 13'

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


Question: Give the station pressure status recorded by the weather station which contained no.12 store on 2012/5/15.

SELECT T1.stnpressure FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2012-05-15' AND T2.store_nbr = 12

Give the station pressure status recorded by the weather station which contained no.12 store on 2012/5/15 .

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


Question: Find the name of companies whose revenue is between 100 and 150.

SELECT name FROM manufacturers WHERE revenue BETWEEN 100 AND 150

Find the name of companies whose revenue is between 100 and 150 .

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


Question: What are the personal name, family name, and author ID of the course author who teaches the most courses?

SELECT T1.personal_name ,  T1.family_name ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1

What are the personal name , family name , and author ID of the course author who teaches the most courses ?

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


Question: List out the name of products which have been applied 10% discount.

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

List out the name of products which have been applied 10 % discount .

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


Question: What are the ids of users who have only made one search, and what are their category codes?

SELECT T1.user_category_code ,  T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id  =  T2.user_id GROUP BY T1.user_id HAVING count(*)  =  1;

What are the ids of users who have only made one search , and what are their category codes ?

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


Question: For the post which got 1910 view counts, how many comments does it get?

SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T1.ViewCount = 1910

For the post which got 1910 view counts , how many comments does it get ?

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


Question: What are the companies of entrepreneurs, ordered descending by amount of money requested?

SELECT Company FROM entrepreneur ORDER BY Money_Requested DESC

What are the companies of entrepreneurs , ordered descending by amount of money requested ?

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


Question: How many musicals has each nominee been nominated for?

SELECT Nominee ,  COUNT(*) FROM musical GROUP BY Nominee

How many musicals has each nominee been nominated for ?


Question: Among the matches of Delhi Daredevils in 2014, how many won matches are there?

SELECT COUNT(T1.Match_Winner) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 OR T2.Team_Id = T1.Team_2 WHERE T2.team_name = 'Delhi Daredevils' AND T1.Match_Date LIKE '2014%'

Among the matches of Delhi Daredevils in 2014 , how many won matches are there ?

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


Question: What are the names of languages, in alphabetical order?

SELECT name FROM languages ORDER BY name ASC

What are the names of languages , in alphabetical order ?


Question: What is the total number of fans or followers who received most likes of their comments in the business?

SELECT COUNT(T1.user_fans) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id ORDER BY COUNT(T2.likes) DESC LIMIT 1

What is the total number of fans or followers who received most likes of their comments in the business ?

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


Question: How many Sales Manager who are working in Sydney? List out their email.

SELECT T1.email FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T1.jobTitle LIKE '%Sales Manager%' AND T2.city = 'Sydney'

How many Sales Manager who are working in Sydney ? List out their email .

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


Question: Provide the full names of patients who have been taking Penicillin V Potassium 250 MG since 1948.

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Penicillin V Potassium 250 MG' AND strftime('%Y', T2.START) >= '1948'

Provide the full names of patients who have been taking Penicillin V Potassium 250 MG since 1948 .

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


Question: Calculate the average population of community areas in the West side.

SELECT AVG(population) FROM Community_Area WHERE side = 'West '

Calculate the average population of community areas in the West side .

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


Question: Where was the order No. 10383 shipped to? Show me the address.

SELECT t2.addressLine1, t2.addressLine2 FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.orderNumber = '10383'

Where was the order No . 10383 shipped to ? Show me the address .

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


Question: List down the movie titles within the genre of thriller.

SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Thriller'

List down the movie titles within the genre of thriller .

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


Question: List the categories of inactive businesses in AZ.

SELECT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'FALSE' AND T1.state LIKE 'AZ'

List the categories of inactive businesses in AZ .

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


Question: Which department has the highest average student GPA, and what is the average gpa?

SELECT T2.dept_name ,  avg(T1.stu_gpa) FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY avg(T1.stu_gpa) DESC LIMIT 1

Which department has the highest average student GPA , and what is the average gpa ?

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


Question: Which nation's GDP is the lowest among those that are communist states?

SELECT T2.Country FROM politics AS T1 INNER JOIN economy AS T2 ON T1.Country = T2.Country WHERE T1.Government = 'Communist state' ORDER BY T2.GDP ASC LIMIT 1

Which nation 's GDP is the lowest among those that are communist states ?

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


Question: How many students are enlisted in the army?

SELECT COUNT(name) FROM enlist WHERE organ = 'army'

How many students are enlisted in the army ?


Question: What is the ratio of American casts on episode 2 of the series? Please include their roles.

SELECT CAST(SUM(CASE WHEN T2.category = 'Cast' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.category), T1.role FROM Award AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T2.episode_id = T3.episode_id INNER JOIN Person AS T4 ON T2.person_id = T4.person_id WHERE T3.episode = 2 AND T4.birth_country = 'USA'

What is the ratio of American casts on episode 2 of the series ? Please include their roles .

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


Question: What is the name of the product that is most sold by sale person id 20?

SELECT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 20 ORDER BY T2.Quantity DESC LIMIT 1

What is the name of the product that is most sold by sale person i d 20 ?

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


Question: Who were the owners of eateries which had highest health hazard by improper cooking time or temperatures?

SELECT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.description = 'Improper cooking time or temperatures'

Who were the owners of eateries which had highest health hazard by improper cooking time or temperatures ?

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


Question: Among the list of employees, what is the total number of supervisors?

SELECT COUNT(employee_id) FROM employee WHERE title = 'Supervisor'

Among the list of employees , what is the total number of supervisors ?

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


Question: Name the title of books written by author A.J.Ayer.

SELECT T3.title FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'A.J. Ayer'

Name the title of books written by author A.J.Ayer .

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


Question: What are the names of students who have more than one advisor?

SELECT T1.name FROM student AS T1 JOIN advisor AS T2 ON T1.id  =  T2.s_id GROUP BY T2.s_id HAVING count(*)  >  1

What are the names of students who have more than one advisor ?

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


Question: List the name of competitors from Argentina.

SELECT T3.full_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Argentina'

List the name of competitors from Argentina .


Question: What percentage of authors of the paper about Charged particle multiplicity are affiliated with INFN?

SELECT CAST((SUM(CASE WHEN T1.Affiliation LIKE '%INFN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T2.Id) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title LIKE '%Charged particle multiplicity%'

What percentage of authors of the paper about Charged particle multiplicity are affiliated with INFN ?

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


Question: Find the total production amount and product names which had "10 - 500 g pkgs." as quantity per unit.

SELECT UnitsInStock + UnitsOnOrder, ProductName FROM Products WHERE QuantityPerUnit = '10 - 500 g pkgs.'

Find the total production amount and product names which had " 10 - 500 g pkgs . " as quantity per unit .

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


Question: Return the poll resource associated with the most candidates.

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

Return the poll resource associated with the most candidates .


Question: How many planes are owned by the pilot whose name is Smith?

SELECT count(plane_name) FROM pilotskills WHERE pilot_name  =  'Smith'

How many planes are owned by the pilot whose name is Smith ?

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


Question: How many French movies got the highest ranking?

SELECT COUNT(movieid) FROM movies WHERE country = 'France' AND movieid IN ( SELECT movieid FROM u2base WHERE rating = ( SELECT MAX(rating) FROM u2base ) )

How many French movies got the highest ranking ?


Question: Provide the air carrier description of all flights arriving at Miami.

SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEST = 'MIA'

Provide the air carrier description of all flights arriving at Miami .

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


Question: Show the name of the customer who has the most orders.

SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY count(*) DESC LIMIT 1

Show the name of the customer who has the most orders .


Question: In complaints received in 2014, how many of them were submitted via call?

SELECT COUNT(T2.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.`Submitted via` = 'Phone' AND strftime('%Y', T1.`Date received`) = '2014'

In complaints received in 2014 , how many of them were submitted via call ?

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


Question: Which publisher had the highest job level? Give his/her full name.

SELECT T1.fname, T1.minit, T1.lname FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id ORDER BY T1.job_lvl DESC LIMIT 1

Which publisher had the highest job level ? Give his / her full name .

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


Question: In users yelping since 2009 to 2011, how many of them have low count of fans?

SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year >= 2009 AND user_yelping_since_year < 2012 AND user_fans = 'Low'

In users yelping since 2009 to 2011 , how many of them have low count of fans ?

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


Question: Show the names of phones with carrier either "Sprint" or "TMobile".

SELECT Name FROM phone WHERE Carrier  =  "Sprint" OR Carrier  =  "TMobile"

Show the names of phones with carrier either " Sprint " or " TMobile " .

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


Question: How many deserts are there in a country where over 90% of people speaks Armenian?

SELECT COUNT(T2.Desert) FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country INNER JOIN language AS T3 ON T1.Code = T2.Country WHERE T3.Name = 'Armenian' AND T3.Percentage > 90

How many deserts are there in a country where over 90 % of people speaks Armenian ?

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


Question: For users whose description contain the string 'Mother', which age categories are they in?

SELECT T2.age_category_code FROM Ref_User_Categories AS T1 JOIN Users AS T2 ON T1.user_category_code  =  T2.user_category_code WHERE T1.User_category_description LIKE "%Mother";

For users whose description contain the string ' Mother ' , which age categories are they in ?

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


Question: What are the ids of users who have searched at least twice, and what did they search?

SELECT search_seq ,  user_id FROM User_Searches GROUP BY user_id HAVING count(*) >= 2;

What are the ids of users who have searched at least twice , and what did they search ?

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


Question: What is the total number of players born between 1970 to 1975?

SELECT COUNT(Player_Id) FROM Player WHERE strftime('%Y', DOB) BETWEEN '1970' AND '1975'

What is the total number of players born between 1970 to 1975 ?

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


Question: Who are the top 5 professors who teaches the highest number of professional or master/undergraduate courses?

SELECT T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500' GROUP BY T2.p_id ORDER BY COUNT(T2.p_id) DESC LIMIT 5

Who are the top 5 professors who teaches the highest number of professional or master / undergraduate courses ?

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


Question: How many products with the highest unit price were ordered?

SELECT OrderQty FROM PurchaseOrderDetail ORDER BY UnitPrice DESC LIMIT 1

How many products with the highest unit price were ordered ?

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


Question: For each order, what is its id, date, and total amount paid?

SELECT T1.order_id ,  T1.date_order_placed ,  sum(T3.product_price) FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id JOIN Products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T1.order_id

For each order , what is its i d , date , and total amount paid ?


Question: List the 5 orders with the highest total price, indicating the delivery date.

SELECT T1.o_orderkey, T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 5

List the 5 orders with the highest total price , indicating the delivery date .

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


Question: Which product received a review from Indianapolis on 2016/10/7?

SELECT T1.Product FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' AND T1.Date = '2016-10-07'

Which product received a review from Indianapolis on 2016/10/7 ?

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


Question: State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM.

SELECT T1.Views FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Date = '2010-07-19 19:39:08.0'

State the number of views of users who obtained the badge on 7/19/2010 7:39:08 PM .

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


Question: What are the names of all airports whose elevation is between -50 and 50?

SELECT name FROM airports WHERE elevation BETWEEN -50 AND 50

What are the names of all airports whose elevation is between -50 and 50 ?

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


Question: What was the difference in gas consumption between CZK-paying customers and EUR-paying customers in 2012?

SELECT SUM(IIF(T1.Currency = 'CZK', T2.Consumption, 0)) - SUM(IIF(T1.Currency = 'EUR', T2.Consumption, 0)) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE SUBSTR(T2.Date, 1, 4) = '2012'

What was the difference in gas consumption between CZK - paying customers and EUR - paying customers in 2012 ?

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


Question: How many businesses in the AZ state got low quality of reviews?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND review_count LIKE 'Low'

How many businesses in the AZ state got low quality of reviews ?

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


Question: What is the first name of the sculptor with the greatest number of works?

SELECT T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) DESC LIMIT 1

What is the first name of the sculptor with the greatest number of works ?

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


Question: What is the average salary of the employees who takes charge of the sales of over 4 territories?

SELECT AVG(T1.Salary) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.EmployeeID HAVING COUNT(T2.TerritoryID) > 4

What is the average salary of the employees who takes charge of the sales of over 4 territories ?

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


Question: What are the names of all females who are friends with Zach?

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

What are the names of all females who are friends with Zach ?

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


Question: What is the average price for a lesson taught by Janessa Sawayn?

SELECT avg(price) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

What is the average price for a lesson taught by Janessa Sawayn ?

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


Question: What are the names of countains that no climber has climbed?

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

What are the names of countains that no climber has climbed ?

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


Question: Of all the teams that played as a team away against Caen in the 2010 season, which one has the highest winning percentage?

SELECT AwayTeam FROM matchs WHERE HomeTeam = 'Caen' AND season = 2010 AND FTR = 'A' GROUP BY AwayTeam ORDER BY COUNT(AwayTeam) DESC LIMIT 1

Of all the teams that played as a team away against Caen in the 2010 season , which one has the highest winning percentage ?

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


Question: From 2000 to 2010, in which year did the studio entertainment segment make the most revenue?

SELECT `Year` FROM revenue WHERE `Year` BETWEEN 2000 AND 2010 ORDER BY `Studio Entertainment[NI 1]` DESC LIMIT 1

From 2000 to 2010 , in which year did the studio entertainment segment make the most revenue ?

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


Question: Which position does Suchitra hold?

SELECT T2.JobTitle FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'Suchitra'


Question: Which role did Joseph Blair play in the show?

SELECT T1.role FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'Joseph Blair'

Which role did Joseph Blair play in the show ?


Question: Which allergy type has least number of allergies?

SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) ASC LIMIT 1

Which allergy type has least number of allergies ?


Question: How many authors were associated with the Microsoft Research when paper number 1 was written?

SELECT COUNT(PaperId) FROM PaperAuthor WHERE Affiliation LIKE '%Microsoft Research%'

How many authors were associated with the Microsoft Research when paper number 1 was written ?

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


Question: What is the minimum inventory quantity of Chainring Bolts?

SELECT SafetyStockLevel FROM Product WHERE Name = 'Chainring Bolts'

What is the minimum inventory quantity of Chainring Bolts ?


Question: What are the party emails associated with parties that used the party form that is the most common?

SELECT t1.party_email FROM parties AS t1 JOIN party_forms AS t2 ON t1.party_id  =  t2.party_id WHERE t2.form_id  =  (SELECT form_id FROM party_forms GROUP BY form_id ORDER BY count(*) DESC LIMIT 1)

What are the party emails associated with parties that used the party form that is the most common ?

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


Question: What are the number of international and domestic passengers of the airport named London "Heathrow"?

SELECT International_Passengers ,  Domestic_Passengers FROM airport WHERE Airport_Name  =  "London Heathrow"

What are the number of international and domestic passengers of the airport named London " Heathrow " ?

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


Question: List the full name of all the senior senators in year 2013.

SELECT T2.official_full_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.state_rank = 'senior' AND T1.type = 'sen' AND T1.start LIKE '2013%'

List the full name of all the senior senators in year 2013 .

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


Question: List the official names of cities that have not held any competition.

SELECT Official_Name FROM city WHERE City_ID NOT IN (SELECT Host_city_ID FROM farm_competition)

List the official names of cities that have not held any competition .

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


Question: How many bad superheroes are there?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Bad'


Question: What are the document ids for the budget type code 'SF'?

SELECT document_id FROM Documents_with_expenses WHERE budget_type_code  =  'SF'

What are the document ids for the budget type code ' SF ' ?

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


Question: How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin?

SELECT sum(T1.lesson_time) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin";

How long is the total lesson time took by customer with first name as Rylan and last name as Goodwin ?

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


Question: Show the people that have been governor the most times.

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

Show the people that have been governor the most times .


Question: Find the number of dorms and total capacity for each gender.

SELECT count(*) ,  sum(student_capacity) ,  gender FROM dorm GROUP BY gender

Find the number of dorms and total capacity for each gender .

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


Question: In 2007, which job position was hired the most?

SELECT JobTitle FROM Employee WHERE STRFTIME('%Y', HireDate) = '2007' GROUP BY HireDate ORDER BY COUNT(JobTitle) DESC LIMIT 1

In 2007 , which job position was hired the most ?

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


Question: Please list the family names of any employees whose middle names begin with C.

SELECT LastName FROM Person WHERE PersonType = 'EM' AND MiddleName LIKE 'C%'

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


Question: What is Turanga Leela's salary and position?

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

What is Turanga Leela 's salary and position ?

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


Question: Find the model of the most expensive headphone.

SELECT model FROM headphone ORDER BY price DESC LIMIT 1

Find the model of the most expensive headphone .


Question: What are the categories that business number 15 belongs to?

SELECT T2.category_name FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.business_id = 15

What are the categories that business number 15 belongs to ?

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


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

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

What is the average rating of all the podcasts in category art ?

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


Question: display the country ID and number of cities for each country.

SELECT country_id ,  COUNT(*) FROM locations GROUP BY country_id

display the country ID and number of cities for each country .


Question: Which movies of director Wolfgang Reitherman do not have villain?

SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Wolfgang Reitherman' AND T1.villian IS NULL

Which movies of director Wolfgang Reitherman do not have villain ?

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


Question: Find the name of the room with the maximum occupancy.

SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;

Find the name of the room with the maximum occupancy .

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


Question: In sales ID between 30 and 40, who is the customer that bought a total quantity of 403?

SELECT T2.FirstName, T2.LastName FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Quantity = 403 AND T1.SalesID BETWEEN 30 AND 40

In sales ID between 30 and 40 , who is the customer that bought a total quantity of 403 ?

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


Question: Identify all the atoms that are connected to the atoms of the TR181 molecule.

SELECT T2.atom_id, T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T2.atom_id = T1.atom_id WHERE T1.molecule_id = 'TR181'

Identify all the atoms that are connected to the atoms of the TR181 molecule .

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


Question: For which countries are there more than four distinct addresses listed?

SELECT country FROM addresses GROUP BY country HAVING count(address_id)  >  4

For which countries are there more than four distinct addresses listed ?


Question: What is the name of the coach whose team placed 4th in the 1969 game? Indicate their coachID.

SELECT T1.coachID FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = 1969 AND T2.rank = 4

What is the name of the coach whose team placed 4th in the 1969 game ? Indicate their coachID .

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


Question: What is the average capacity of the stadiums that were opened in year 2005?

SELECT avg(capacity) FROM stadium WHERE opening_year  =  2005

What is the average capacity of the stadiums that were opened in year 2005 ?

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


Question: How many bike stations are installed after August, 2013 in San Jose?

SELECT COUNT(installation_date) FROM station WHERE city = 'San Jose' AND (SUBSTR(CAST(installation_date AS TEXT), 1, INSTR(installation_date, '/') - 1) IN ('8', '9', '10', '11', '12') AND SUBSTR(CAST(installation_date AS TEXT), -4) = '2013') OR SUBSTR(CAST(installation_date AS TEXT), -4) > '2013'

How many bike stations are installed after August , 2013 in San Jose ?

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


Question: How many coaches worked a temporary term in the year 2007?

SELECT COUNT(coachID) FROM Coaches WHERE year = 2007 AND notes = 'interim'

How many coaches worked a temporary term in the year 2007 ?

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


Question: Calculate the average weight in pounds of all players drafted by Arizona Coyotes.

SELECT CAST(SUM(T1.weight_in_lbs) AS REAL) / COUNT(T2.ELITEID) FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.overallby = 'Arizona Coyotes'

Calculate the average weight in pounds of all players drafted by Arizona Coyotes .

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


Question: What is the percentage of the actors that showed up in the credit list of movie "Dawn of the Planet of the Apes" that were born after "1970/1/1"?

SELECT CAST(SUM(CASE WHEN T3.`Date of Birth` > '1970-01-01' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.`Date of Birth`) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Dawn of the Planet of the Apes'

What is the percentage of the actors that showed up in the credit list of movie " Dawn of the Planet of the Apes " that were born after " 1970/1/1 " ?

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


Question: Among the customers in Asia, how many customers are in debt?

SELECT COUNT(T1.n_name) FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_acctbal < 0 AND T3.r_name = 'ASIA'

Among the customers in Asia , how many customers are in debt ?

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


Question: How many images have over 20 object samples?

SELECT COUNT(T1.IMG_ID) FROM ( SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(OBJ_SAMPLE_ID) > 20 ) T1

How many images have over 20 object samples ?


Question: What are the result description of the project whose detail is 'sint'?

SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint'

What are the result description of the project whose detail is ' sint ' ?

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


Question: What is the name of the station that is less used by customers who borrow bikes from? Indicate when was the station installed.

SELECT T1.start_station_name, T2.installation_date FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.subscription_type = 'Customer' GROUP BY T1.start_station_name ORDER BY COUNT(T1.subscription_type) LIMIT 1

What is the name of the station that is less used by customers who borrow bikes from ? Indicate when was the station installed .

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


Question: What is the title of the paper that was written by Cheng Huang and affiliated with Microsoft?

SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Cheng Huang' AND T2.Affiliation = 'Microsoft'

What is the title of the paper that was written by Cheng Huang and affiliated with Microsoft ?

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


Question: List the name and country of origin for all singers who have produced songs with rating above 9.

SELECT DISTINCT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.rating  >  9

List the name and country of origin for all singers who have produced songs with rating above 9 .

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


Question: Show all the activity names and the number of faculty involved in each activity.

SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID

Show all the activity names and the number of faculty involved in each activity .

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


Question: What are dates of birth of all the guests whose gender is "Male"?

SELECT date_of_birth FROM Guests WHERE gender_code  =  "Male"

What are dates of birth of all the guests whose gender is " Male " ?

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


Question: Which physician was trained in the procedure that costs the most.

SELECT T1.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment ORDER BY T3.cost DESC LIMIT 1

Which physician was trained in the procedure that costs the most .

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


Question: Which schools do not have any player? Give me the school locations.

SELECT LOCATION FROM school WHERE School_ID NOT IN (SELECT School_ID FROM Player)

Which schools do not have any player ? Give me the school locations .

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