Question: Among the cases reported in the ward with Edward Burke as the alderman and happened in the community area with the highest population, provide the report number of the crime with the highest beat.

SELECT T2.report_no FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no WHERE T1.alderman_first_name = 'Edward' AND T1.alderman_last_name = 'Burke' ORDER BY T2.beat DESC, T3.population DESC LIMIT 1

Among the cases reported in the ward with Edward Burke as the alderman and happened in the community area with the highest population , provide the report number of the crime with the highest beat .

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


Question: From the Spanish LaLiga division in the 2017 season, which team won the most times as a local team and by what percentage?

SELECT T1.HomeTeam HWHT , CAST(COUNT(CASE WHEN T1.FTR = 'H' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(HomeTeam) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'LaLiga' AND T2.country = 'Spain' AND T1.season = 2017

From the Spanish LaLiga division in the 2017 season , which team won the most times as a local team and by what percentage ?

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


Question: What is the total value of boxes kept in the warehouse with the greatest capacity?

SELECT sum(T1.value) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code ORDER BY T2.capacity DESC LIMIT 1

What is the total value of boxes kept in the warehouse with the greatest capacity ?

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


Question: What is the course title of the prerequisite of course Mobile Computing?

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

What is the course title of the prerequisite of course Mobile Computing ?

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


Question: What are the different boat ids reserved by the sailor whose id is 1?

SELECT DISTINCT bid FROM Reserves WHERE sid = 1

What are the different boat ids reserved by the sailor whose i d is 1 ?

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


Question: Which papers were written by authors from the institution "Google"?

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

Which papers were written by authors from the institution " Google " ?

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


Question: Show the minimum, average, maximum order quantity of all invoices.

SELECT min(Order_Quantity) ,  avg(Order_Quantity) ,  max(Order_Quantity) FROM INVOICES

Show the minimum , average , maximum order quantity of all invoices .

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


Question: Which customers have total order quantity greater than 1? Give me the customer names.

SELECT T1.Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID GROUP BY T1.Name HAVING sum(T2.Quantity)  >  1

Which customers have total order quantity greater than 1 ? Give me the customer names .

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


Question: What is the full name of the customer who rented movies for 7 consecutive days?

SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN ( SELECT customer_id, COUNT(*) AS num_days FROM ( SELECT *, date(days, '-' || rn || ' day') AS results FROM ( SELECT customer_id, days, row_number() OVER (PARTITION BY customer_id ORDER BY days) AS rn FROM ( SELECT DISTINCT customer_id, date(rental_date) AS days FROM rental ) ) ) GROUP BY customer_id, results HAVING num_days = 7 ) AS T2 ON T1.customer_id = T2.customer_id

What is the full name of the customer who rented movies for 7 consecutive days ?

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


Question: Please list all the paths of the solutions containing files within the repository whose url is "https://github.com/maxild/playground.git".

SELECT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/maxild/playground.git'

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


Question: How many disabled students have zero absences?

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

How many disabled students have zero absences ?


Question: How many accounts does each customer have? List the number and customer id.

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

How many accounts does each customer have ? List the number and customer i d.

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


Question: Based on business in Phoenix, calculate the percentage of business with low funny votes.

SELECT CAST(SUM(CASE WHEN T2.review_votes_funny = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix'

Based on business in Phoenix , calculate the percentage of business with low funny votes .

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


Question: Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type.

SELECT sum(Enrollment) ,  affiliation FROM university WHERE founded  >  1850 GROUP BY affiliation

Find the total number of students enrolled in the colleges that were founded after the year of 1850 for each affiliation type .

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


Question: How many films have the word 'Dummy' in their titles?

SELECT count(*) FROM film WHERE title LIKE "%Dummy%"

How many films have the word ' Dummy ' in their titles ?

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


Question: List the PG-13 romantic comedy movie titles and their release dates.

SELECT movie_title, release_date FROM movies_total_gross WHERE MPAA_rating = 'PG-13' AND genre = 'Romantic Comedy'

List the PG-13 romantic comedy movie titles and their release dates .

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


Question: Find the name of account that has the lowest total checking and saving balance.

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

Find the name of account that has the lowest total checking and saving balance .

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


Question: What is the average number of audience for festivals?

SELECT avg(Num_of_Audience) FROM festival_detail

What is the average number of audience for festivals ?

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


Question: What is the percentage of restaurants that paid a fine of 250 among all establishments?

SELECT CAST(COUNT(CASE WHEN T3.fine = 250 THEN T1.license_no END) AS REAL) * 100 / COUNT(T1.license_no) 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 T1.facility_type = 'Restaurant'

What is the percentage of restaurants that paid a fine of 250 among all establishments ?

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


Question: Who is the alderman in the ward associated with the crime with report number 23769?

SELECT T2.alderman_first_name, T2.alderman_last_name FROM Crime AS T1 INNER JOIN Ward AS T2 ON T2.ward_no = T1.ward_no WHERE T1.report_no = 23769

Who is the alderman in the ward associated with the crime with report number 23769 ?

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


Question: Find the policy types more than 4 customers use. Show their type code.

SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*)  >  4

Find the policy types more than 4 customers use . Show their type code .

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


Question: What segment did the customer have at 2012/8/23 21:20:00?

SELECT T2.Segment FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.date = '2012-08-23' AND T1.time = '21:20:00'

What segment did the customer have at 2012/8/23 21:20:00 ?

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


Question: In the 2014 Winter game, what is the percentage of competitors who age 28 years old?

SELECT CAST(COUNT(CASE WHEN T2.age = 28 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2014 Winter'

In the 2014 Winter game , what is the percentage of competitors who age 28 years old ?

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


Question: Return the average number of units sold in millions for games not developed by Nintendo.

SELECT avg(Units_sold_Millions) FROM game WHERE developers != 'Nintendo'

Return the average number of units sold in millions for games not developed by Nintendo .

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


Question: Which word has the most repetitions in the Catalan language? Give the ID of the word.

SELECT wid FROM langs_words WHERE occurrences = ( SELECT MAX(occurrences) FROM langs_words )

Which word has the most repetitions in the Catalan language ? Give the ID of the word .

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


Question: For each company id, what are the companies and how many gas stations does each one operate?

SELECT T2.company ,  count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id

For each company i d , what are the companies and how many gas stations does each one operate ?

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


Question: What are the destinations and number of flights to each one?

SELECT destination ,  count(*) FROM Flight GROUP BY destination

What are the destinations and number of flights to each one ?


Question: How many of the patients who have stopped taking medication for 'coronary heart disease' are still alive?

SELECT COUNT(DISTINCT T2.patient) FROM medications AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.REASONDESCRIPTION = 'Coronary Heart Disease' AND T1.STOP IS NOT NULL AND T2.deathdate IS NULL

How many of the patients who have stopped taking medication for ' coronary heart disease ' are still alive ?

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


Question: For each zip code, return how many times max wind speed reached 25?

SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code

For each zip code , return how many times max wind speed reached 25 ?

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


Question: Show the company name with the number of gas station.

SELECT T2.company ,  count(*) FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id GROUP BY T1.company_id

Show the company name with the number of gas station .


Question: HOw many engineers are older than 30?

SELECT count(*) FROM Person WHERE age  >  30 AND job  =  'engineer'


Question: List the all the assets make, model, details by the disposed date ascendingly.

SELECT asset_make ,  asset_model ,  asset_details FROM Assets ORDER BY asset_disposed_date ASC

List the all the assets make , model , details by the disposed date ascendingly .

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


Question: Name all person in the individual retail whose last name is 'Anderson'.

SELECT FirstName, MiddleName, LastName FROM Person WHERE LastName = 'Anderson' AND PersonType = 'IN'

Name all person in the individual retail whose last name is ' Anderson ' .

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


Question: How many of the workers who started working in 2009 are from the Production Department?

SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T2.StartDate >= '2009-01-01' AND T2.StartDate < '2010-01-01' AND T1.Name = 'Production'

How many of the workers who started working in 2009 are from the Production Department ?

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


Question: How many orders were returned in the year 2020?

SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Returned' AND STRFTIME('%Y', T2.status_date) = '2020'

How many orders were returned in the year 2020 ?


Question: Return each apartment type code along with the maximum and minimum number of rooms among each type.

SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code

Return each apartment type code along with the maximum and minimum number of rooms among each type .

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


Question: What is the name of the school with the highest difference in the average completion rate for the national in which it belongs? Indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs.

SELECT T1.chronname, T2.state_appr_value FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state ORDER BY T1.awards_per_value - T2.awards_per_natl_value DESC LIMIT 1

What is the name of the school with the highest difference in the average completion rate for the national in which it belongs ? Indicate the state appropriations to higher education in fiscal year 2011 per resident to which the school belongs .

O O O B-COLUMN O O O O O O O O O O O O O O O O O O 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 schools donated by donor "000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest?

SELECT COUNT(T1.schoolid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.poverty_level = 'highest poverty' AND T2.donor_acctid = '000eebf28658900e63b538cf8a73afbd'

Among the schools donated by donor " 000eebf28658900e63b538cf8a73afbd",how many schools whose poverty level are highest ?

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


Question: What is the title of the paper published in 1995 and whose author included Thomas Wiegand?

SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995

What is the title of the paper published in 1995 and whose author included Thomas Wiegand ?

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


Question: Which product of Exotic Liquids company that have the highest reorder levels?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids' ORDER BY T1.ReorderLevel DESC LIMIT 1

Which product of Exotic Liquids company that have the highest reorder levels ?

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


Question: Among Daisey Lamball's orders, how many were shipped via International shipping?

SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Daisey' AND T1.last_name = 'Lamball' AND T3.method_name = 'International'

Among Daisey Lamball 's orders , how many were shipped via International shipping ?

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


Question: Show the position of players and the corresponding number of players.

SELECT POSITION ,  COUNT(*) FROM match_season GROUP BY POSITION

Show the position of players and the corresponding number of players .


Question: Sate the order number and calculate the net profit for each order under Joshua Bennett.

SELECT T1.OrderNumber , REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')  FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'Joshua Bennett'

Sate the order number and calculate the net profit for each order under Joshua Bennett .

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


Question: Who is the voice actor of the hero in Lion King?

SELECT T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T2.movie_title = 'Lion King' AND T1.character = 'Lion King'

Who is the voice actor of the hero in Lion King ?

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


Question: What is the description of document type 'Paper'?

SELECT document_type_description FROM Ref_Document_Types WHERE document_type_code = "Paper";

What is the description of document type ' Paper ' ?

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


Question: Find the last names of the members of the club "Bootup Baltimore".

SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore"

Find the last names of the members of the club " Bootup Baltimore " .

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


Question: What is the full name of the customer that had made the most transactions in August, 2014?

SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y-%m', T2.TransactionDate) = '2014-08' GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1

What is the full name of the customer that had made the most transactions in August , 2014 ?

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


Question: Which cards are ranked 1st on EDHRec? List all of the cards name and its banned play format.

SELECT T1.name, T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.edhrecRank = 1 AND T2.status = 'Banned' GROUP BY T1.name, T2.format

Which cards are ranked 1st on EDHRec ? List all of the cards name and its banned play format .

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


Question: What is the total number of companies?


Question: What are the names of all sailors with a higher rating than every sailor named Luis?

SELECT name FROM Sailors WHERE rating  >  (SELECT max(rating) FROM Sailors WHERE name  =  'Luis')

What are the names of all sailors with a higher rating than every sailor named Luis ?

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


Question: List the community area names in the Northwest.

SELECT community_area_name FROM Community_Area WHERE side = 'Northwest'

List the community area names in the Northwest .

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


Question: Return the names of institutions, as well as their nicknames.

SELECT T2.Name ,  T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID

Return the names of institutions , as well as their nicknames .

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


Question: How many trips which subscription types were Subscriber and ended in San Jose city?

SELECT COUNT(T1.subscription_type) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.end_station_name WHERE T1.subscription_type = 'Subscriber' AND T2.city = 'San Jose'

How many trips which subscription types were Subscriber and ended in San Jose city ?

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


Question: How many products are there for each product type?

SELECT product_type_code ,  count(*) FROM Products GROUP BY product_type_code

How many products are there for each product type ?


Question: What are the names of banks in the state of New York?

SELECT bname FROM bank WHERE state  =  'New York'

What are the names of banks in the state of New York ?

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


Question: Among the cases dismissed by the grand jury disposition, what percentage of cases is where the subject is injured?

SELECT CAST(SUM(subject_statuses = 'Injured') AS REAL) * 100 / COUNT(case_number) FROM incidents WHERE grand_jury_disposition = 'No Bill'

Among the cases dismissed by the grand jury disposition , what percentage of cases is where the subject is injured ?

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


Question: What is the name of customers who do not use Cash as payment method.

SELECT customer_name FROM customers WHERE payment_method != 'Cash'

What is the name of customers who do not use Cash as payment method .

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


Question: What are the names of the songs without a lead vocal?

SELECT DISTINCT title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid EXCEPT SELECT t2.title FROM vocals AS t1 JOIN songs AS t2 ON t1.songid  =  t2.songid WHERE TYPE  =  "lead"

What are the names of the songs without a lead vocal ?

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


Question: What are the names of all clubs?


Question: Provide the students' names and schools who enrolled for 15 months.

SELECT name, school FROM enrolled WHERE month = 15

Provide the students ' names and schools who enrolled for 15 months .

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


Question: How many rentals were returned on 5/27/2005?

SELECT COUNT(rental_id) FROM rental WHERE rental_date = '2005-05-27'

How many rentals were returned on 5/27/2005 ?


Question: Return the code of the city that has the most students.

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

Return the code of the city that has the most students .


Question: For each player, what are their name, season, and country that they belong to?

SELECT T2.Season ,  T2.Player ,  T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country

For each player , what are their name , season , and country that they belong to ?

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


Question: Return the average top speed across all vehicles.

Return the average top speed across all vehicles .


Question: What is the id, name and nationality of the architect who built most mills?

SELECT T1.id ,  T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What is the i d , name and nationality of the architect who built most mills ?

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


Question: How many Minipumps have been sold?

SELECT COUNT(OrderQty) FROM SalesOrderDetail WHERE ProductID IN ( SELECT ProductID FROM Product WHERE Name = 'Minipump' )


Question: Give the number of users who took the "mental health survey for 2018".

SELECT COUNT(DISTINCT T1.UserID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2018'

Give the number of users who took the " mental health survey for 2018 " .

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


Question: Show the names of pilots and models of aircrafts they have flied with.

SELECT T3.Pilot_name ,  T2.Model FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID  =  T3.Pilot_ID

Show the names of pilots and models of aircrafts they have flied with .

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


Question: For movies with the keyword of "civil war", calculate the average revenue generated by these movies.

SELECT AVG(T1.revenue) FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'civil war'

For movies with the keyword of " civil war " , calculate the average revenue generated by these movies .

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


Question: Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500?

SELECT Status FROM city WHERE Population  >  1500 INTERSECT SELECT Status FROM city WHERE Population  <  500

Which statuses correspond to both cities that have a population over 1500 and cities that have a population lower than 500 ?

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


Question: What is the model of the oldest user's device?

SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id ORDER BY T2.age DESC LIMIT 1

What is the model of the oldest user 's device ?


Question: Please show different software platforms and the corresponding number of devices using each.

SELECT Software_Platform ,  COUNT(*) FROM device GROUP BY Software_Platform

Please show different software platforms and the corresponding number of devices using each .

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


Question: How many cities are there in the United States?

SELECT COUNT(T2.city) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id WHERE T1.country = 'United States'

How many cities are there in the United States ?


Question: Count the number of customers who do not have an account.

SELECT count(*) FROM Customers WHERE customer_id NOT IN (SELECT customer_id FROM Accounts)

Count the number of customers who do not have an account .


Question: List the total points of gymnasts in descending order.

SELECT Total_Points FROM gymnast ORDER BY Total_Points DESC

List the total points of gymnasts in descending order .


Question: What are card ids, customer ids, card types, and card numbers for each customer card?

SELECT card_id ,  customer_id ,  card_type_code ,  card_number FROM Customers_cards

What are card ids , customer ids , card types , and card numbers for each customer card ?

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


Question: What are the full names of customers with the account name 900?

SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"

What are the full names of customers with the account name 900 ?

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


Question: How many American cars have an acceleration time of less than 12 seconds?

SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'USA' AND T1.acceleration < 12

How many American cars have an acceleration time of less than 12 seconds ?

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


Question: Return the maximum number of points for climbers from the United Kingdom.

SELECT max(Points) FROM climber WHERE Country  =  "United Kingdom"

Return the maximum number of points for climbers from the United Kingdom .

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


Question: Count the number of characteristics of the 'flax' product.

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t1.product_name  =  "flax"

Count the number of characteristics of the ' flax ' product .

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


Question: Please list the texts of all the tweets that are reshared.

SELECT text FROM twitter WHERE IsReshare = 'TRUE'

Please list the texts of all the tweets that are reshared .


Question: How many superheroes did DC Comics publish?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.publisher_name = 'DC Comics'

How many superheroes did DC Comics publish ?

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


Question: What is the average salary of an intern?

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

What is the average salary of an intern ?


Question: What is the id of the files that are available in the format of mp4 and a resolution smaller than 1000?

SELECT f_id FROM files WHERE formats  =  "mp4" INTERSECT SELECT f_id FROM song WHERE resolution  <  1000

What is the i d of the files that are available in the format of mp4 and a resolution smaller than 1000 ?

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


Question: List out city name of businesses which have medium length of review.

SELECT DISTINCT T1.city FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T2.review_length = 'Medium'

List out city name of businesses which have medium length of review .

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


Question: How many titles did Mary Smith rent in 2005? Determine the percentage of titles rented in June 2005.

SELECT COUNT(T2.rental_id) , CAST(SUM(IIF(STRFTIME('%m',T2.rental_date) = '7', 1, 0)) AS REAL) * 100 / COUNT(T2.rental_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'Maria' AND T1.last_name = 'Miller' AND STRFTIME('%Y',T2.rental_date) = '2005'

How many titles did Mary Smith rent in 2005 ? Determine the percentage of titles rented in June 2005 .

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


Question: For loans contracts which are still running where client are in debt, list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996.

SELECT CAST((T3.A13 - T3.A12) AS REAL) * 100 / T3.A12 FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.status = 'D'

For loans contracts which are still running where client are in debt , list the district of the and the state the percentage unemployment rate increment from year 1995 to 1996 .

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


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

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

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

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


Question: Show the locations of parties and the names of the party hosts in ascending order of the age of the host.

SELECT T3.Location ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID ORDER BY T2.Age

Show the locations of parties and the names of the party hosts in ascending order of the age of the host .

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


Question: Which colleges have both authors with submission score above 90 and authors with submission score below 80?

SELECT College FROM submission WHERE Scores  >  90 INTERSECT SELECT College FROM submission WHERE Scores  <  80

Which colleges have both authors with submission score above 90 and authors with submission score below 80 ?

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


Question: How many participants belong to the type 'Organizer'?

SELECT count(*) FROM participants WHERE participant_type_code  =  'Organizer'

How many participants belong to the type ' Organizer ' ?


Question: What are names of movies that have a 'G' ratings?

SELECT title FROM movies WHERE rating  =  'G'

What are names of movies that have a ' G ' ratings ?

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


Question: How many books were ordered by customer Kandy Adamec?

SELECT COUNT(*) FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T3.first_name = 'Kandy' AND T3.last_name = 'Adamec'

How many books were ordered by customer Kandy Adamec ?

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


Question: What is the most common first name among the customers?

SELECT first_name FROM customer GROUP BY first_name ORDER BY COUNT(first_name) DESC LIMIT 1

What is the most common first name among the customers ?

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


Question: How many paragraphs are there in the scene whose description is "A Sea-port in Cyprus. An open place near the quay."?

SELECT SUM(T2.ParagraphNum) FROM chapters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.chapter_id WHERE T1.Description = 'A Sea-port in Cyprus. An open place near the quay.'

How many paragraphs are there in the scene whose description is " A Sea - port in Cyprus . An open place near the quay . " ?

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


Question: Find the names of the buildings in "on-hold" status, and sort them in ascending order of building stories.

SELECT name FROM buildings WHERE Status  =  "on-hold" ORDER BY Stories ASC

Find the names of the buildings in " on - hold " status , and sort them in ascending order of building stories .

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


Question: How many routes go from the United States to Canada?

SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country  =  'United States')

How many routes go from the United States to Canada ?

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


Question: List the id of students who never attends courses?

SELECT student_id FROM students WHERE student_id NOT IN (SELECT student_id FROM student_course_attendance)

List the i d of students who never attends courses ?

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


Question: Provide the origin of the flight that has the shortest actual elapsed time.

SELECT ORIGIN FROM Airlines ORDER BY ACTUAL_ELAPSED_TIME ASC LIMIT 1

Provide the origin of the flight that has the shortest actual elapsed time .

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


Question: Find the number of classes in each department.

SELECT count(*) ,  dept_code FROM CLASS AS T1 JOIN course AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY dept_code

Find the number of classes in each department .


Question: What is the maximum, minimum and average years spent working on a school bus?

SELECT max(years_working) ,  min(years_working) ,  avg(years_working) FROM school_bus

What is the maximum , minimum and average years spent working on a school bus ?

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


Question: What is the full name of the actor who starred in most movies?

SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, COUNT(T1.film_id) AS num FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id GROUP BY T2.first_name, T2.last_name ) AS T ORDER BY T.num DESC LIMIT 1

What is the full name of the actor who starred in most movies ?

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


Question: Sherri Rhodes rented a film at 12:27:27 on 2005/7/28, when did she/he return that film?

SELECT T2.return_date FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'SHERRI' AND T1.last_name = 'RHODES' AND T2.rental_date = '2005-07-28 12:27:27'

Sherri Rhodes rented a film at 12:27:27 on 2005/7/28 , when did she / he return that film ?

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


Question: How much time does it take to update the status of order "2398"?

SELECT strftime('%J', T2.status_date) - strftime('%J', T1.order_date) FROM cust_order AS T1 INNER JOIN order_history AS T2 ON T1.order_id = T2.order_id WHERE T1.order_id = 2398

How much time does it take to update the status of order " 2398 " ?

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


Question: Calculate the average income made by movies using the keyword "paris". List the title of the movies.

SELECT AVG(T1.revenue), T1.title FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T3.keyword_name = 'paris'

Calculate the average income made by movies using the keyword " paris " . List the title of the movies .

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


Question: Calculate the percentage of users with a high number of fans who were elite in 2011.

SELECT CAST(SUM(CASE WHEN T3.user_fans = 'High' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.user_fans) FROM Years AS T1 INNER JOIN Elite AS T2 ON T1.year_id = T2.year_id INNER JOIN Users AS T3 ON T2.user_id = T3.user_id WHERE T1.actual_year = 2011

Calculate the percentage of users with a high number of fans who were elite in 2011 .

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


Question: Provide the air carrier description of the flight with the highest actual elapsed time.

SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ACTUAL_ELAPSED_TIME DESC LIMIT 1

Provide the air carrier description of the flight with the highest actual elapsed time .

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


Question: What is the total number of tweets sent by male users on Mondays?

SELECT COUNT(DISTINCT T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male' AND T1.Weekday = 'Monday'

What is the total number of tweets sent by male users on Mondays ?

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


Question: What is the category of the business with medium review length and highest review stars within business ID from 6 t0 9?

SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Medium' AND T2.business_id BETWEEN 6 AND 9 ORDER BY T1.review_stars DESC LIMIT 1

What is the category of the business with medium review length and highest review stars within business ID from 6 t0 9 ?

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


Question: Lists by ID all Creature-type cards with legal status.

SELECT T1.id FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid INNER JOIN legalities AS T3 ON T1.uuid = T3.uuid WHERE T3.status = 'Legal' AND T1.types = 'Creature'

Lists by ID all Creature - type cards with legal status .

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


Question: Find the start and end dates of behavior incidents of students with last name "Fahey".

SELECT T1.date_incident_start ,  date_incident_end FROM Behavior_Incident AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.last_name  =  "Fahey"

Find the start and end dates of behavior incidents of students with last name " Fahey " .

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


Question: Who is the coach who had coached the the most seasons in MTL? State his given name, date of birth and all teams he had coaches before.

SELECT T2.nameGiven , T2.birthYear, T2.birthMon, T2.birthDay, T3.name FROM Goalies AS T1 INNER JOIN Master AS T2 ON T2.playerID = T1.playerID INNER JOIN Teams AS T3 ON T3.lgID = T1.lgID WHERE T3.tmID = 'MTL' GROUP BY T2.nameGiven, T2.birthYear, T2.birthMon, T2.birthDay, T3.name ORDER BY COUNT(T2.coachID) DESC LIMIT 1

Who is the coach who had coached the the most seasons in MTL ? State his given name , date of birth and all teams he had coaches before .

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


Question: What are the names of all the physicians who took appointments.

SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID

What are the names of all the physicians who took appointments .

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


Question: Among the criminal sexual assaults in the district of Adnardo Gutierrez, how many cases happened in the residence?

SELECT COUNT(T2.report_no) FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T3.title = 'Criminal Sexual Assault' AND T1.commander = 'Adnardo Gutierrez' AND T2.location_description = 'RESIDENCE'

Among the criminal sexual assaults in the district of Adnardo Gutierrez , how many cases happened in the residence ?

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


Question: List down the customer names and product names of the order made by "Anthony Torres" via distributor channel.

SELECT DISTINCT T1.`Customer Names`, T4.`Product Name` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Sales Team` AS T3 ON T3.SalesTeamID = T2._SalesTeamID INNER JOIN Products AS T4 ON T4.ProductID = T2._ProductID WHERE T3.`Sales Team` = 'Anthony Torres' AND T2.`Sales Channel` = 'Distributor'

List down the customer names and product names of the order made by " Anthony Torres " via distributor channel .

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


Question: Which film titles have the most expensive rental rate?

SELECT title FROM film WHERE rental_rate = ( SELECT MAX(rental_rate) FROM film )

Which film titles have the most expensive rental rate ?

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


Question: How much time do businesses in El Mirage City, AZ State operate in average daily?

SELECT SUM(T2.closing_time - T2.opening_time) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'El Mirage' AND T1.state = 'AZ'

How much time do businesses in El Mirage City , AZ State operate in average daily ?

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


Question: What is the genre of PG rated movie starred by the actor with highest net worth?

SELECT T1.Genre 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.`MPAA Rating` = 'PG' ORDER BY CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) DESC LIMIT 1

What is the genre of PG rated movie starred by the actor with highest net worth ?

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


Question: What kind of allergy is most common among white people?

SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.race = 'white' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1

What kind of allergy is most common among white people ?


Question: What are the most common types of interactions between enzymes and medicine, and how many types are there?

SELECT interaction_type ,  count(*) FROM medicine_enzyme_interaction GROUP BY interaction_type ORDER BY count(*) DESC LIMIT 1

What are the most common types of interactions between enzymes and medicine , and how many types are there ?

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


Question: How many debates are there?


Question: How many elite users have reviewed Yelp_Business no.1?

SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id INNER JOIN Reviews AS T3 ON T1.user_id = T3.user_id WHERE T3.business_id = 1

How many elite users have reviewed Yelp_Business no.1 ?

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


Question: What were all the salary values of players in 2010 and 2001?

SELECT salary FROM salary WHERE YEAR  =  2010 UNION SELECT salary FROM salary WHERE YEAR  =  2001

What were all the salary values of players in 2010 and 2001 ?

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


Question: What are the ids and details of the students who take 2 courses?

SELECT T1.student_id ,  T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  =  2

What are the ids and details of the students who take 2 courses ?


Question: In posts with 1 comment, how many of the comments have 0 score?

SELECT COUNT(T1.id) FROM comments AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.CommentCount = 1 AND T2.Score = 0

In posts with 1 comment , how many of the comments have 0 score ?

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


Question: How many Catholic legislators do not have an account on ballotpedia.org?

SELECT COUNT(bioguide_id) FROM historical WHERE religion_bio = 'Catholic' AND ballotpedia_id IS NULL

How many Catholic legislators do not have an account on ballotpedia.org ?


Question: Count the number of times the team "Boston Red Stockings" lost in 2009 postseason.

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

Count the number of times the team " Boston Red Stockings " lost in 2009 postseason .

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


Question: State the customer name of orders which has shipped date in 7/8/2018.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.ShipDate = '7/8/18' THEN T1.`Customer Names` END AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) WHERE T IS NOT NULL

State the customer name of orders which has shipped date in 7/8/2018 .

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


Question: List all Book titles, ISBNs, and sale prices.

SELECT title ,  isbn ,  SalePrice FROM Book

List all Book titles , ISBNs , and sale prices .

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


Question: Show the ages of gymnasts in descending order of total points.

SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID ORDER BY T1.Total_Points DESC

Show the ages of gymnasts in descending order of total points .

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


Question: How many books do we have?


Question: What are the top 2 order keys of the item with the highest amount of extended price?

SELECT l_orderkey FROM lineitem ORDER BY l_extendedprice DESC LIMIT 2

What are the top 2 order keys of the item with the highest amount of extended price ?

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


Question: Calculate average scene per act in Antony and Cleopatra.

SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Antony and Cleopatra'

Calculate average scene per act in Antony and Cleopatra .

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


Question: What are the manager's first name, last name and id who won the most manager award?

SELECT T1.name_first ,  T1.name_last ,  T2.player_id FROM player AS T1 JOIN manager_award AS T2 ON T1.player_id  =  T2.player_id GROUP BY T2.player_id ORDER BY count(*) DESC LIMIT 1;

What are the manager 's first name , last name and i d who won the most manager award ?

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


Question: List by ID the businesses with the reviews with the lowest veracity of Paradise Valley.

SELECT business_id FROM Business WHERE stars > 3 AND city = 'Paradise Valley' AND review_count = 'Low'

List by ID the businesses with the reviews with the lowest veracity of Paradise Valley .

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


Question: How many episodes have not won any Law & Order series awards?

SELECT COUNT(award_id) FROM Award WHERE Result = 'Nominee'

How many episodes have not won any Law & Order series awards ?


Question: Give the country with the fewest number of cities.

SELECT country FROM City GROUP BY country ORDER BY count(*) ASC LIMIT 1

Give the country with the fewest number of cities .


Question: Give the home phone number of the employee who is in charge of "Savannah" territory.

SELECT T1.HomePhone FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Savannah'

Give the home phone number of the employee who is in charge of " Savannah " territory .

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


Question: What is the outcome type of match ID 392195?

SELECT T2.Outcome_Type FROM Match AS T1 INNER JOIN Outcome AS T2 ON T1.Outcome_type = T2.Outcome_Id WHERE T1.Match_Id = '392195'

What is the outcome type of match ID 392195 ?

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


Question: For each player, show the team and the location of school they belong to.

SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID

For each player , show the team and the location of school they belong to .

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


Question: What is the weight in pounds of the style that is produced the most by the company? If there are multiple products sharing the same weight, indicate the name of each one of them and their corresponding weights.

SELECT Weight FROM Product WHERE WeightUnitMeasureCode = 'LB' GROUP BY Weight ORDER BY COUNT(Style) DESC LIMIT 1

What is the weight in pounds of the style that is produced the most by the company ? If there are multiple products sharing the same weight , indicate the name of each one of them and their corresponding weights .

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


Question: How many film categories are there?

SELECT COUNT(DISTINCT category_id) FROM category


Question: How many stores procured products on October 27, 2018, in the city of Oregon?

SELECT SUM(CASE WHEN T1.ProcuredDate = '10/27/18' AND T2.`City Name` = 'Orlando' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID

How many stores procured products on October 27 , 2018 , in the city of Oregon ?

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


Question: Show the ids of all the faculty members who participate in an activity and advise a student.

SELECT FacID FROM Faculty_participates_in INTERSECT SELECT advisor FROM Student

Show the ids of all the faculty members who participate in an activity and advise a student .

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


Question: List the names of buildings in descending order of building height.

SELECT name FROM buildings ORDER BY Height DESC

List the names of buildings in descending order of building height .

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


Question: For all the referees, who became a hall of famer in the 1970s? What's his hofID?

SELECT name, hofID FROM HOF WHERE category = 'Builder' AND year BETWEEN 1970 AND 1979

For all the referees , who became a hall of famer in the 1970s ? What 's his hofID ?

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


Question: Between the faculty employee professors, how many teaches high-level or harder undergraduate courses? Indicate each of the professors unique identifying number.

SELECT COUNT(*) FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id INNER JOIN course AS T3 ON T3.course_id = T2.course_id WHERE T1.hasPosition = 'Faculty_eme' AND T1.professor = 1 AND T3.courseLevel = 'Level_400'

Between the faculty employee professors , how many teaches high - level or harder undergraduate courses ? Indicate each of the professors unique identifying number .

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


Question: Find the name of physicians who are affiliated with Surgery or Psychiatry department.

SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' OR T3.name  =  'Psychiatry'

Find the name of physicians who are affiliated with Surgery or Psychiatry department .

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


Question: List down the actor ID of actors with Dee as their last name.

SELECT actor_id FROM actor WHERE last_name = 'Dee'

List down the actor ID of actors with Dee as their last name .

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


Question: What is the most common role for the staff?

SELECT role_code FROM Project_Staff GROUP BY role_code ORDER BY count(*) DESC LIMIT 1

What is the most common role for the staff ?

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


Question: How many artists are above age 46 and joined after 1990?

SELECT count(*) FROM artist WHERE age  >  46 AND year_join  >  1990

How many artists are above age 46 and joined after 1990 ?

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


Question: How many faculty members participate in each activity? Return the activity names and the number of faculty members.

SELECT T1.activity_name ,  count(*) FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID

How many faculty members participate in each activity ? Return the activity names and the number of faculty members .

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


Question: Show the number of projects.


Question: Which type of label is the most numerous in atoms with hydrogen?

SELECT T.label FROM ( SELECT T2.label, COUNT(T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'h' GROUP BY T2.label ORDER BY COUNT(T2.molecule_id) DESC LIMIT 1 ) t

Which type of label is the most numerous in atoms with hydrogen ?


Question: Calculate the total number of sales in North America.

SELECT SUM(T2.num_sales) * 100000 AS nums FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'North America'

Calculate the total number of sales in North America .

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


Question: For the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes, what is the highest expression correlation score?

SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Chromosome = 6 OR T1.Chromosome = 8 ORDER BY T2.Expression_Corr DESC LIMIT 1

For the pairs of genes with one having 8 chromosomes and the other having 6 chromosomes , what is the highest expression correlation score ?

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


Question: Show all ministers who do not belong to Progress Party.

SELECT minister FROM party WHERE party_name != 'Progress Party'

Show all ministers who do not belong to Progress Party .

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


Question: Find the number of departments in each school.

SELECT count(DISTINCT dept_name) ,  school_code FROM department GROUP BY school_code

Find the number of departments in each school .


Question: What are the names of the ordered products that have profit deficiency in central superstore?

SELECT DISTINCT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND T1.Profit < 0

What are the names of the ordered products that have profit deficiency in central superstore ?

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


Question: Retrieve all the first and last names of authors in the alphabetical order of last names.

SELECT fname ,  lname FROM authors ORDER BY lname

Retrieve all the first and last names of authors in the alphabetical order of last names .

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


Question: Which are the top five best selling products? Please state the full name of them.

SELECT T2.Description FROM transactions_1k AS T1 INNER JOIN products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Amount DESC LIMIT 5

Which are the top five best selling products ? Please state the full name of them .


Question: Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed?

SELECT `Sales Channel` FROM `Sales Orders` WHERE OrderDate LIKE '1/%/20' GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1

Which sales channel was most preferred in commercializing products in January 2020 based on the number of orders placed ?

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


Question: Please list the movies rated by the user who created the movie list "250 Favourite Films".

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T3.list_title = '250 Favourite Films'

Please list the movies rated by the user who created the movie list " 250 Favourite Films " .

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


Question: Among episodes aired in 2009, which episode has received the worst response based on the rating.

SELECT episode_id FROM Episode WHERE air_date LIKE '2009%' ORDER BY rating LIMIT 1;

Among episodes aired in 2009 , which episode has received the worst response based on the rating .

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


Question: How many cities have businesses with active life category? Find the percentage of the city where the review count that is low in total review count.

SELECT SUM(CASE WHEN T2.category_name LIKE 'Active Life' THEN 1 ELSE 0 END) AS "num" , CAST(SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS REAL) * 100 / ( SELECT COUNT(T3.review_count) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T3.review_count LIKE 'Low' ) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id

How many cities have businesses with active life category ? Find the percentage of the city where the review count that is low in total review count .

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


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

SELECT DISTINCT Name FROM WINE ORDER BY Name

List the names of all distinct wines in alphabetical order .


Question: Among the days on which over 100 units of item no.5 were sold in store no.3, on which date was the temperature range the biggest?

SELECT T2.`date` FROM relation AS T1 INNER JOIN sales_in_weather AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T1.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T2.item_nbr = 5 AND T2.units > 100 ORDER BY tmax - tmin DESC LIMIT 1

Among the days on which over 100 units of item no.5 were sold in store no.3 , on which date was the temperature range the biggest ?

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


Question: Which services are used by the customer "Hardy Kutch" or are rated as "good" in a customer interaction? Give me the service details.

SELECT DISTINCT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id JOIN customer_interactions AS t4 ON t3.service_id  =  t4.service_id WHERE t1.customer_details  =  "Hardy Kutch" OR t4.services_and_channels_details  =  "good"

Which services are used by the customer " Hardy Kutch " or are rated as " good " in a customer interaction ? Give me the service details .

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


Question: According to the observation on 2008/3/11, what was the height of Elly Koss?

SELECT T2.value, T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.date = '2008-03-11' AND T2.description = 'Body Height'

According to the observation on 2008/3/11 , what was the height of Elly Koss ?

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


Question: Find the average rating star for each movie that received at least 2 ratings.

SELECT mID ,  avg(stars) FROM Rating GROUP BY mID HAVING count(*)  >=  2

Find the average rating star for each movie that received at least 2 ratings .

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


Question: What is the foreign name of the card in French of type Creature, normal layout and black border color, by artist Matthew D. Wilson?

SELECT name FROM foreign_data WHERE uuid IN ( SELECT uuid FROM cards WHERE types = 'Creature' AND layout = 'normal' AND borderColor = 'black' AND artist = 'Matthew D. Wilson' ) AND language = 'French'

What is the foreign name of the card in French of type Creature , normal layout and black border color , by artist Matthew D. Wilson ?

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


Question: Which three cities have the largest regional population?

SELECT city FROM city ORDER BY regional_population DESC LIMIT 3

Which three cities have the largest regional population ?


Question: How many of the countries name start with alphabet A? List down the Alpha2Code of them.

SELECT COUNT(ShortName) FROM Country WHERE ShortName LIKE 'A%' UNION SELECT alpha2code FROM country WHERE shortname LIKE 'A%'

How many of the countries name start with alphabet A ? List down the Alpha2Code of them .

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


Question: For the professors who advise more than 2 students, which professor has a higher teaching ability? Give the full name.

SELECT T.first_name, T.last_name FROM ( SELECT T2.first_name, T2.last_name, T2.teachingability FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id GROUP BY T1.prof_id HAVING COUNT(student_id) > 2 ) T ORDER BY T.teachingability DESC LIMIT 1

For the professors who advise more than 2 students , which professor has a higher teaching ability ? Give the full name .

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


Question: How many Australian customers who have credit line under 220000?

SELECT COUNT(creditLimit) FROM customers WHERE creditLimit < 220000 AND country = 'Australia'

How many Australian customers who have credit line under 220000 ?

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


Question: State the name of the object class that has in most images.

SELECT OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID GROUP BY T2.OBJ_CLASS ORDER BY COUNT(T1.OBJ_CLASS_ID) DESC LIMIT 1

State the name of the object class that has in most images .


Question: List out the start date of the care plan of alive patients.

SELECT DISTINCT T1.START FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.deathdate IS NULL

List out the start date of the care plan of alive patients .

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


Question: What are the names of wines that are more expensive then all wines made in the year 2006?

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

What are the names of wines that are more expensive then all wines made in the year 2006 ?

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


Question: What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat?

SELECT name FROM Sailors WHERE rating  >  (SELECT max(T1.rating) FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid JOIN Boats AS T3 ON T3.bid  =  T2.bid WHERE T3.color  =  'red')

What are the names of the sailors whose rating is larger than the rating of all sailors who booked a red boat ?

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


Question: Show the locations of schools that have more than 1 player.

SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*)  >  1

Show the locations of schools that have more than 1 player .

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


Question: How many open businesses in the City of Phoenix have users left a long review?

SELECT COUNT(DISTINCT T2.business_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_length = 'Long' AND T2.active = 'true' AND T2.city = 'Phoenix'

How many open businesses in the City of Phoenix have users left a long review ?

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


Question: What is the name of the customer who has greatest total loan amount?

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

What is the name of the customer who has greatest total loan amount ?

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


Question: How many of the matches are Superover?

SELECT SUM(CASE WHEN T2.Outcome_Type = 'Superover' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Outcome AS T2 ON T2.Outcome_Id = T1.Outcome_type


Question: In which continent does the country with the smallest surface area belongs?

SELECT Continent FROM Country ORDER BY SurfaceArea LIMIT 1

In which continent does the country with the smallest surface area belongs ?

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


Question: Among the students who filed for bankruptcy with an absence in school of no more than 6 months, how many students enlisted for the fire department?

SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name INNER JOIN enlist AS T3 ON T3.name = T2.name WHERE T3.organ = 'fire_department'

Among the students who filed for bankruptcy with an absence in school of no more than 6 months , how many students enlisted for the fire department ?

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


Question: Mention the type of game that Matthias Trattnig played.

SELECT DISTINCT T1.GAMETYPE FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Matthias Trattnig'

Mention the type of game that Matthias Trattnig played .

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


Question: Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars.

SELECT T1.event_name, T1.event_date FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T3.expense_description = 'Pizza' AND T3.cost > 50 AND T3.cost < 100

Find the name and date of events with expenses for pizza that were more than fifty dollars but less than a hundred dollars .

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


Question: How many searches do buyers make in total?

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

How many searches do buyers make in total ?


Question: Find the number of movies in each rating.

SELECT count(*) ,  rating FROM movies GROUP BY rating

Find the number of movies in each rating .


Question: Among the root beer brands that do not advertise on Facebook and Twitter, which brand has the highest number of purchases?

SELECT T2.BreweryName FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.FacebookPage IS NULL AND T2.Twitter IS NULL GROUP BY T2.BrandID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

Among the root beer brands that do not advertise on Facebook and Twitter , which brand has the highest number of purchases ?

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


Question: Find the number of members living in each address.

SELECT count(*) ,  address FROM member GROUP BY address

Find the number of members living in each address .


Question: Among the schools with the SAT test takers of over 500, please list the schools that are magnet schools or offer a magnet program.

SELECT T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Magnet = 1 AND T1.NumTstTakr > 500

Among the schools with the SAT test takers of over 500 , please list the schools that are magnet schools or offer a magnet program .

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


Question: How many papers are published in year 2000 under the conference "SSPR"?

SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year = 2000 AND T2.ShortName = 'SSPR'

How many papers are published in year 2000 under the conference " SSPR " ?

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


Question: What is the average value of Adjusted net enrolment rate, primary, both sexes (%) indicator in Algeria from 1975 to 1980?

SELECT CAST(SUM(Value) AS REAL) / COUNT(CountryCode) FROM Indicators WHERE CountryName = 'Algeria' AND Year > 1974 AND Year < 1981 AND IndicatorName = 'Adjusted net enrolment rate, primary, both sexes (%)'

What is the average value of Adjusted net enrolment rate , primary , both sexes ( % ) indicator in Algeria from 1975 to 1980 ?

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


Question: Among the coaches who taught the teams in 1922's Stanley Cup finals, how many of them are from the USA?

SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN TeamsSC AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.year = 1922 AND T3.birthCountry = 'USA'

Among the coaches who taught the teams in 1922 's Stanley Cup finals , how many of them are from the USA ?

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


Question: Count the number of different affected regions.

SELECT count(DISTINCT region_id) FROM affected_region

Count the number of different affected regions .


Question: Which customer addresses are no longer active?

SELECT DISTINCT T1.street_name FROM address AS T1 INNER JOIN customer_address AS T2 ON T1.address_id = T2.address_id INNER JOIN address_status AS T3 ON T3.status_id = T2.status_id WHERE T3.address_status = 'Inactive'

Which customer addresses are no longer active ?


Question: How many female mailing list subscribers from Sacramento gave a 4-star rating between 1/3/2016 and 10/26/2016?

SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating = 4 AND T1.City = 'Sacramento' AND T1.Gender = 'F' AND T1.SubscribedToEmailList = 'TRUE' AND T2.ReviewDate BETWEEN '2013-01-03' AND '2013-10-26'

How many female mailing list subscribers from Sacramento gave a 4 - star rating between 1/3/2016 and 10/26/2016 ?

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


Question: Which cities have regional population above 8000000 or below 5000000?

SELECT city FROM city WHERE regional_population  >  10000000 UNION SELECT city FROM city WHERE regional_population  <  5000000

Which cities have regional population above 8000000 or below 5000000 ?

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


Question: What are the themes of farm competitions sorted by year in ascending order?

SELECT Theme FROM farm_competition ORDER BY YEAR ASC

What are the themes of farm competitions sorted by year in ascending order ?

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


Question: How many persons were born in New York, USA?

SELECT COUNT(name) FROM Person WHERE birth_place = 'New York City' AND birth_country = 'USA';

How many persons were born in New York , USA ?

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


Question: Who are the different directors of films which had market estimation in 1995?

SELECT DISTINCT T1.Director FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID  =  T2.Film_ID WHERE T2.Year  =  1995

Who are the different directors of films which had market estimation in 1995 ?

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


Question: Find the neighborhood where no headphones are in stock.

SELECT Neighborhood FROM store EXCEPT SELECT t1.Neighborhood FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id

Find the neighborhood where no headphones are in stock .


Question: Find all the films longer than 100 minutes, or rated PG, except those who cost more than 200 for replacement. List the titles.

SELECT title FROM film WHERE LENGTH  >  100 OR rating  =  'PG' EXCEPT SELECT title FROM film WHERE replacement_cost  >  200

Find all the films longer than 100 minutes , or rated PG , except those who cost more than 200 for replacement . List the titles .

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


Question: What is the repository id of the method with tokenized name "crc parameters get hash code"?

SELECT T1.RepoId FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'crc parameters get hash code'

What is the repository i d of the method with tokenized name " crc parameters get hash code " ?

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


Question: List the full names, gender and positions who's location is in New York city.

SELECT T1.firstname, T1.lastname, T1.gender, T3.positiontitle FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T2.locationcity = 'New York City'

List the full names , gender and positions who 's location is in New York city .

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


Question: What is the short description of the project that gives donation to school “301c9bf0a45d159d162b65a93fddd74e”?

SELECT T2.short_description FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.schoolid = '301c9bf0a45d159d162b65a93fddd74e'

What is the short description of the project that gives donation to school “ 301c9bf0a45d159d162b65a93fddd74e ” ?

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


Question: Show the name, nation and result for the cyclists who did not purchase any racing bike.

SELECT name ,  nation ,  RESULT FROM cyclist EXCEPT SELECT T1.name ,  T1.nation ,  T1.result FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id

Show the name , nation and result for the cyclists who did not purchase any racing bike .

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


Question: Name the coins that have three tags.

SELECT name FROM coins WHERE LENGTH(tag_names) - LENGTH(replace(tag_names, ',', '')) = 2


Question: Find the name of the storm that affected both Afghanistan and Albania regions.

SELECT T3.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 WHERE T2.Region_name  =  'Afghanistan' INTERSECT SELECT T3.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 WHERE T2.Region_name  =  'Albania'

Find the name of the storm that affected both Afghanistan and Albania regions .

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


Question: Find the name and email of the user whose name contains the word ‘Swift’.

SELECT name ,  email FROM user_profiles WHERE name LIKE '%Swift%'

Find the name and email of the user whose name contains the word ‘ Swift ’ .

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


Question: State the category of the label that represented the behavior category of app id 4955831798976240000.

SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 4955831798976240000

State the category of the label that represented the behavior category of app i d 4955831798976240000 .

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


Question: How many movies have a popularity of more than 400 but less than 500? Indicate the name of the movies and the highest rating score each movie has received.

SELECT T1.movie_title, MAX(T2.rating_score) FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_popularity BETWEEN 400 AND 500 GROUP BY T1.movie_title

How many movies have a popularity of more than 400 but less than 500 ? Indicate the name of the movies and the highest rating score each movie has received .

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


Question: What are the names of the states that have some college students playing in the positions of goalie and mid-field?

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

What are the names of the states that have some college students playing in the positions of goalie and mid - field ?

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


Question: What level is course 165? List the professors who teach the course.

SELECT T1.courseLevel, T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.course_id = 165

What level is course 165 ? List the professors who teach the course .


Question: How many items shipped by REG AIR were ordered on March 22, 1995?

SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'REG AIR' AND T1.o_orderdate = '1995-03-22'

How many items shipped by REG AIR were ordered on March 22 , 1995 ?

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


Question: Which classrooms are used by grade 5?

SELECT DISTINCT classroom FROM list WHERE grade  =  5


Question: For how many times has the scene "OLIVIA’S house." appeared in Twelfth Night?

SELECT COUNT(T2.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'OLIVIA’S house.' AND T1.Title = 'Twelfth Night'

For how many times has the scene " OLIVIA ’S house . " appeared in Twelfth Night ?

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


Question: Among the menus that did not support taking out or booking in advance, how many of them were created before 1950?

SELECT COUNT(*) FROM Menu WHERE call_number IS NULL AND strftime('%Y', date) < '1950'

Among the menus that did not support taking out or booking in advance , how many of them were created before 1950 ?

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


Question: Show total points of all players.


Question: Describe the information about rulings for card named 'Sublime Epiphany' with number 74s.

SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Sublime Epiphany' AND T1.number = '74s'

Describe the information about rulings for card named ' Sublime Epiphany ' with number 74s .

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


Question: Sort the apartment numbers in ascending order of room count.

SELECT apt_number FROM Apartments ORDER BY room_count ASC

Sort the apartment numbers in ascending order of room count .

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


Question: How many 'classic' cards are eligible for loan?

SELECT COUNT(T1.card_id) FROM card AS T1 INNER JOIN disp AS T2 ON T1.disp_id = T2.disp_id WHERE T1.type = 'classic' AND T2.type = 'OWNER'

How many ' classic ' cards are eligible for loan ?


Question: Find all different contents stored in New York.

SELECT DISTINCT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE LOCATION  =  'New York'

Find all different contents stored in New York .


Question: What is the ratio of players with batting hands of left and right?

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

What is the ratio of players with batting hands of left and right ?

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


Question: Calculate the average male median age of all the residential areas in Windham county.

SELECT SUM(T2.male_median_age) / COUNT(T2.median_age) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'WINDHAM'

Calculate the average male median age of all the residential areas in Windham county .

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


Question: Which vocal type has the band mate with first name "Marianne" played the most?

SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate  =  T2.id WHERE firstname  =  "Marianne" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1

Which vocal type has the band mate with first name " Marianne " played the most ?

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


Question: Show all storm names except for those with at least two affected regions.

SELECT name FROM storm EXCEPT SELECT T1.name FROM storm AS T1 JOIN affected_region AS T2 ON T1.storm_id  =  T2.storm_id GROUP BY T1.storm_id HAVING count(*)  >=  2

Show all storm names except for those with at least two affected regions .

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


Question: What are the different subsets of documents related to each document id , list the name of the document subset and id of the actual document ?

select distinct t3.document_subset_name ,  t1.document_object_id from document_subset_members as t1 join document_subset_members  as t2 on t1.related_document_object_id = t2.document_object_id join document_subsets as t3 on t2.document_subset_id =  t3.document_subset_id

What are the different subsets of documents related to each document i d , list the name of the document subset and i d of the actual document ?

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


Question: What are the receipt numbers for instances where both cakes and cookies were purchased?

SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.food  =  "Cake" INTERSECT SELECT T1.receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.food  =  "Cookie"

What are the receipt numbers for instances where both cakes and cookies were purchased ?

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


Question: Which part is ordered in a bigger amount in order no.1, "burnished seashell gainsboro navajo chocolate" or "salmon white grey tan navy"?

SELECT T.p_name FROM ( SELECT T2.p_name, SUM(T1.l_quantity) AS num FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T2.p_name IN ('salmon white grey tan navy', 'burnished seashell gainsboro navajo chocolate') GROUP BY T1.l_partkey ) AS T ORDER BY T.num DESC LIMIT 1

Which part is ordered in a bigger amount in order no.1 , " burnished seashell gainsboro navajo chocolate " or " salmon white grey tan navy " ?

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


Question: Find 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

Find the distinct last names of the students who have class president votes .

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


Question: How many channels have the word 'bbc' in their internet link?

SELECT count(*) FROM channel WHERE internet LIKE "%bbc%"

How many channels have the word ' bbc ' in their internet link ?

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


Question: What is the total number of superheroes without full name?

SELECT COUNT(id) FROM superhero WHERE full_name IS NULL

What is the total number of superheroes without full name ?

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


Question: What are the ranks of captains that have no captain that are in the Third-rate ship of the line class?

SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS  =  'Third-rate ship of the line'

What are the ranks of captains that have no captain that are in the Third - rate ship of the line class ?

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


Question: Which policy type appears most frequently in the available policies?

SELECT policy_type_code FROM available_policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1

Which policy type appears most frequently in the available policies ?

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


Question: Show each author and the number of workshops they submitted to.

SELECT T2.Author ,  COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author

Show each author and the number of workshops they submitted to .


Question: List down the cities with unknown country.

SELECT city FROM geographic WHERE county = 'unknown'

List down the cities with unknown country .


Question: How many players did Boston Red Stockings have in 2000?

SELECT count(*) 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  =  2000

How many players did Boston Red Stockings have in 2000 ?

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


Question: Show all allergies with type food.

SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "food"


Question: Give the number of movies with "saving the world" as the keyword.

SELECT COUNT(T2.movie_id) FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id WHERE keyword_name = 'saving the world'

Give the number of movies with " saving the world " as the keyword .

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


Question: List the bad alias of the postal point located in Camuy.

SELECT T1.bad_alias FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Camuy'

List the bad alias of the postal point located in Camuy .

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


Question: List the object classes of image ID 36 with coordinates (0,0).

SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 36 AND T1.X = 0 AND T1.Y = 0

List the object classes of image ID 36 with coordinates ( 0,0 ) .

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


Question: Which venue did Kolkata Knight Riders play most of their matches as a Team 1?

SELECT T3.Venue_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Team_1 INNER JOIN Venue AS T3 ON T2.Venue_Id = T3.Venue_Id WHERE T1.Team_Name = 'Kolkata Knight Riders' GROUP BY T3.Venue_Id ORDER BY COUNT(T3.Venue_Id) DESC LIMIT 1

Which venue did Kolkata Knight Riders play most of their matches as a Team 1 ?

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


Question: Of the first 100 molecules in number order, how many are carcinogenic?

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

Of the first 100 molecules in number order , how many are carcinogenic ?


Question: What is the code of each role and the number of employees in each role?

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

What is the code of each role and the number of employees in each role ?

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


Question: How many users rated the movie "The Magnificent Ambersons" gave a rating score of no more than 2? List all the URL to the rating on Mubi.

SELECT COUNT(T2.user_id), T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_title = 'The Magnificent Ambersons' AND T2.rating_score <= 2

How many users rated the movie " The Magnificent Ambersons " gave a rating score of no more than 2 ? List all the URL to the rating on Mubi .

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


Question: District commander Robert A. Rubio was responsible for how many incidents in January, 2018?

SELECT SUM(CASE WHEN SUBSTR(T2.date, 5, 4) = '2018' THEN 1 ELSE 0 END) FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio' AND SUBSTR(T2.date, 1, 1) = '1'

District commander Robert A. Rubio was responsible for how many incidents in January , 2018 ?

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


Question: Find the last name of students who is either female (sex is F) and living in the city of code BAL or male (sex is M) and in age of below 20.

SELECT lname FROM student WHERE sex  =  'F' AND city_code  =  'BAL' UNION SELECT lname FROM student WHERE sex  =  'M' AND age  <  20

Find the last name of students who is either female ( sex is F ) and living in the city of code BAL or male ( sex is M ) and in age of below 20 .

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


Question: Calculate the total salary for employees who did inspection from ID 52270 to 52272.

SELECT SUM(T2.salary) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id WHERE T1.inspection_id BETWEEN 52270 AND 52272

Calculate the total salary for employees who did inspection from ID 52270 to 52272 .

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


Question: How many businesses in Tempe are rated as 'Wonderful experience?

SELECT COUNT(business_id) FROM Business WHERE city = 'Phoenix' AND stars > 3

How many businesses in Tempe are rated as ' Wonderful experience ?


Question: Return all detention summaries.


Question: What are the ids of the train running east?

SELECT id FROM trains WHERE direction = 'east'

What are the ids of the train running east ?


Question: What is the role of Mark Hammel?

SELECT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Mark Hammel'


Question: How many players have more than 1000 hours of training?

SELECT count(*) FROM Player WHERE HS  >  1000

How many players have more than 1000 hours of training ?


Question: List name, dates active, and number of deaths for all storms with at least 1 death.

SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1

List name , dates active , and number of deaths for all storms with at least 1 death .

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


Question: What are the most common film genres made by the worst directors?

SELECT T2.genre FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 0 GROUP BY T2.genre ORDER BY COUNT(T2.movieid) DESC LIMIT 1

What are the most common film genres made by the worst directors ?


Question: What collection details are there on the subset named 'Top collection'?

SELECT Collecrtion_Subset_Details FROM Collection_Subsets WHERE Collection_Subset_Name = "Top collection";

What collection details are there on the subset named ' Top collection ' ?

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


Question: Describe the violation dates, risk categories, descriptions and names of the eateries under Jade Chocolates LLC.

SELECT T1.`date`, T1.risk_category, T1.description, T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.owner_name = 'Jade Chocolates LLC'

Describe the violation dates , risk categories , descriptions and names of the eateries under Jade Chocolates LLC .

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


Question: What are the different regions of clubs in ascending alphabetical order?

SELECT DISTINCT Region FROM club ORDER BY Region ASC

What are the different regions of clubs in ascending alphabetical order ?


Question: What is the average duration of a bike trip made on the day with the hottest temperature ever in 2014?

SELECT AVG(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2014%' AND T1.start_station_name = '2nd at Folsom' AND T2.max_temperature_f = ( SELECT max_temperature_f FROM weather ORDER BY max_temperature_f DESC LIMIT 1 )

What is the average duration of a bike trip made on the day with the hottest temperature ever in 2014 ?

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


Question: Show the flight number and distance of the flight with maximum price.

SELECT flno ,  distance FROM Flight ORDER BY price DESC LIMIT 1

Show the flight number and distance of the flight with maximum price .

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


Question: Among the crimes with no arrest made, how many of them happened in the ward represented by alderman Pat Dowell?

SELECT SUM(CASE WHEN T1.alderman_last_name = 'Dowell' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.arrest = 'FALSE' AND T1.alderman_first_name = 'Pat'

Among the crimes with no arrest made , how many of them happened in the ward represented by alderman Pat Dowell ?

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


Question: What are the names of all the songs whose album is under the label of "Universal Music Group"?

SELECT T3.title FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid  =  T2.albumid JOIN songs AS T3 ON T2.songid  =  T3.songid WHERE t1.label  =  "Universal Music Group"

What are the names of all the songs whose album is under the label of " Universal Music Group " ?

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


Question: Return the country in which the user with first name Robbie lives.

SELECT T1.country FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id  =  T2.user_address_id WHERE T2.first_name  =  'Robbie';

Return the country in which the user with first name Robbie lives .

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


Question: Which player has the highest overall rating? Indicate the player's api id.

SELECT player_api_id FROM Player_Attributes ORDER BY overall_rating DESC LIMIT 1

Which player has the highest overall rating ? Indicate the player 's api i d.

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


Question: Return the number of companies created by Andy.

SELECT count(*) FROM manufacturers WHERE founder  =  'Andy'

Return the number of companies created by Andy .


Question: State the name of the lake in Albania province and in which city does it located at.

SELECT Lake, City FROM located WHERE Province = 'Albania' AND Lake IS NOT NULL

State the name of the lake in Albania province and in which city does it located at .

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


Question: What is the average pay rate of the employees who worked in the Engineering Departmentin 2007?

SELECT AVG(T3.Rate) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN EmployeePayHistory AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Engineering' AND STRFTIME('%Y', EndDate) > '2007' AND STRFTIME('%Y', T1.StartDate) < '2007'

What is the average pay rate of the employees who worked in the Engineering Departmentin 2007 ?

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


Question: What is the average number of gold medals for a club?

What is the average number of gold medals for a club ?


Question: How much more space does Asia have than Europe?

SELECT MAX(Area) - MIN(Area) FROM continent WHERE Name = 'Asia' OR Name = 'Europe'

How much more space does Asia have than Europe ?


Question: What is the average song duration for the songs that are in mp3 format and whose resolution below 800?

SELECT avg(T1.duration) FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.formats  =  "mp3" AND T2.resolution   <  800

What is the average song duration for the songs that are in mp3 format and whose resolution below 800 ?

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