Question: Name the product from the 'Classic Cars' production line that has the greatest expected profit.

SELECT t.productName, t.MSRP - t.buyPrice FROM products AS t WHERE t.productLine = 'Classic Cars' ORDER BY t.MSRP - t.buyPrice DESC LIMIT 1

Name the product from the ' Classic Cars ' production line that has the greatest expected profit .

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


Question: What is the zip code of the address where the teacher with first name "Lyla" lives?

SELECT T1.zip_postcode FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T2.first_name  =  "Lyla"

What is the zip code of the address where the teacher with first name " Lyla " lives ?

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


Question: For the business which got the most number of violations, how many inspections did it have?

SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id GROUP BY T1.business_id ORDER BY COUNT(T1.business_id) DESC LIMIT 1

For the business which got the most number of violations , how many inspections did it have ?

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


Question: How many non-discontinued products are there in the dairy category?

SELECT COUNT(T1.CategoryID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.CategoryName = 'Dairy Products' AND T2.Discontinued = 0

How many non - discontinued products are there in the dairy category ?

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


Question: What are all locations of train stations?

What are all locations of train stations ?


Question: What is the name of the sales person who handled the highest number of sales?

SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T2.SalesPersonID = T1.EmployeeID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 1

What is the name of the sales person who handled the highest number of sales ?

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


Question: What is the minimum and maximum number of bathrooms of all the apartments?

SELECT min(bathroom_count) ,  max(bathroom_count) FROM Apartments

What is the minimum and maximum number of bathrooms of all the apartments ?

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


Question: List how many times the number of people in the room reached the maximum occupancy of the room. The number of people include adults and kids.

SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;

List how many times the number of people in the room reached the maximum occupancy of the room . The number of people include adults and kids .

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


Question: Please list the IDs of the users who have a high number of followers.

SELECT user_id FROM Users WHERE user_fans LIKE 'High' GROUP BY user_id

Please list the IDs of the users who have a high number of followers .

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


Question: Tally the customer ID of orders that were shipped to Brazil by Margaret Peacock from 3/31/97 to 12/10/97.

SELECT DISTINCT T2.CustomerID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.LastName = 'Peacock' AND T1.FirstName = 'Margaret' AND T2.ShipCountry = 'Brazil' AND T2.ShippedDate BETWEEN '1997-03-31 00:00:00' AND '1997-12-10 23:59:59'

Tally the customer ID of orders that were shipped to Brazil by Margaret Peacock from 3/31/97 to 12/10/97 .

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


Question: Please list all the superpowers of 3-D Man.

SELECT T3.power_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T1.superhero_name = '3-D Man'

Please list all the superpowers of 3 - D Man .

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


Question: Find all the papers published by "Aaron Turon".

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"

Find all the papers published by " Aaron Turon " .

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


Question: Show all order ids and their client names.

SELECT T1.idOrder ,  T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient

Show all order ids and their client names .


Question: What is the full name of the employee who is in charge of the territory of Denver?

SELECT T1.FirstName, T1.LastName 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 = 'Denver'

What is the full name of the employee who is in charge of the territory of Denver ?

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


Question: List all the counties in Georgia.

SELECT T2.county FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Georgia' GROUP BY T2.county

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


Question: Find the first name and last name of a customer who visited on the earliest date.

SELECT T1.FirstName ,  T1.LastName FROM customers AS T1 JOIN receipts AS T2 ON T1.id  =  T2.CustomerId ORDER BY T2.date LIMIT 1

Find the first name and last name of a customer who visited on the earliest date .

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


Question: How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users?

SELECT SUM(CASE WHEN T1.Sentiment > 0 THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.Sentiment = 0 THEN 1 ELSE 0 END) AS diff FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'

How many more tweets with a positive sentiment than the tweets with a neutral sentiment were posted by male users ?

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


Question: What are the neighborhoods that are located in the North Center community area?

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

What are the neighborhoods that are located in the North Center community area ?

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


Question: What are the names of students who haven't taken any Biology courses?

SELECT name FROM student WHERE id NOT IN (SELECT T1.id FROM takes AS T1 JOIN course AS T2 ON T1.course_id  =  T2.course_id WHERE T2.dept_name  =  'Biology')

What are the names of students who have n't taken any Biology courses ?

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


Question: Which three sales regions have generated the most revenue thus far?

SELECT TerritoryID FROM SalesTerritory ORDER BY SalesYTD DESC LIMIT 3

Which three sales regions have generated the most revenue thus far ?


Question: Return the most common full name among all actors.

SELECT first_name ,  last_name FROM actor GROUP BY first_name ,  last_name ORDER BY count(*) DESC LIMIT 1

Return the most common full name among all actors .


Question: Return the names of the different planes, as well as the names of the oldest pilots who flew each.

SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name

Return the names of the different planes , as well as the names of the oldest pilots who flew each .

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


Question: return the details of the customer with largest count of used services.

select t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id  =  t2.customer_id group by t1.customer_details order by count(*) desc limit 1

return the details of the customer with largest count of used services .

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


Question: What percentage of the AdventureWorks data is in Thai?

SELECT CAST(SUM(CASE WHEN T1.Name = 'Thai' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.CultureID) FROM Culture AS T1 INNER JOIN ProductModelProductDescriptionCulture AS T2 ON T1.CultureID = T2.CultureID

What percentage of the AdventureWorks data is in Thai ?


Question: How many characters are there in Twelfth Night?

SELECT COUNT(DISTINCT T4.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.Title = 'Twelfth Night'

How many characters are there in Twelfth Night ?


Question: Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff.

SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Sales Person" EXCEPT SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Clerical Staff"

Find the name and gender of the staff who has been assigned the job of Sales Person but never Clerical Staff .

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


Question: How many pages of Wikipedia are there in total on the Catalan language?

SELECT pages FROM langs WHERE lang = 'ca'

How many pages of Wikipedia are there in total on the Catalan language ?

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


Question: How many scientists are there?


Question: What is the average rating of comic category apps? How many users hold positive attitude towards this app?

SELECT AVG(T1.Rating) , COUNT(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE NULL END) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Category = 'COMICS'

What is the average rating of comic category apps ? How many users hold positive attitude towards this app ?

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


Question: What is the date, average temperature and mean humidity for the days with the 3 largest maximum gust speeds?

SELECT date ,  mean_temperature_f ,  mean_humidity FROM weather ORDER BY max_gust_speed_mph DESC LIMIT 3

What is the date , average temperature and mean humidity for the days with the 3 largest maximum gust speeds ?

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


Question: What are the start and end times of each meeting, as well as the corresponding client and staff details the attendees?

SELECT T1.start_date_time ,  T1.end_date_time ,  T2.client_details ,  T4.staff_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id JOIN staff_in_meetings AS T3 ON T1.meeting_id  =  T3.meeting_id JOIN staff AS T4 ON T3.staff_id  =  T4.staff_id

What are the start and end times of each meeting , as well as the corresponding client and staff details the attendees ?

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


Question: find the program owners that have some programs in both morning and night time.

SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning" INTERSECT SELECT t1.owner FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Night"

find the program owners that have some programs in both morning and night time .

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


Question: What is the name of Anguilla's capital, and where is it located?

SELECT Capital, Province FROM country WHERE Name = 'Anguilla'

What is the name of Anguilla 's capital , and where is it located ?

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


Question: Please list the names of all the Olympic competitors from Finland.

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

Please list the names of all the Olympic competitors from Finland .


Question: From August 10 to August 20, 2018, how many cancelled flights of air carrier named Spirit Air Lines: NK are there?

SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Spirit Air Lines: NK' AND T2.CANCELLED = 0 AND T2.FL_DATE BETWEEN '2018/8/10' AND '2018/8/20'

From August 10 to August 20 , 2018 , how many cancelled flights of air carrier named Spirit Air Lines : NK are there ?

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


Question: What kind of government does Iran have?

SELECT T2.Government FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Iran'

What kind of government does Iran have ?


Question: Which unique subset does document owned by Braeden belong to? List the subset name.

SELECT DISTINCT T1.Document_Subset_Name FROM Document_Subsets AS T1 JOIN Document_Subset_Members AS T2 ON T1.Document_Subset_ID =  T2.Document_Subset_ID JOIN Document_Objects AS T3 ON T2.Document_Object_ID  =  T3.Document_Object_ID WHERE T3.owner  =  'Braeden'

Which unique subset does document owned by Braeden belong to ? List the subset name .

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


Question: How many shipments did Zachery Hicks transport goods to New York in the year 2016?

SELECT COUNT(*) FROM city AS T1 INNER JOIN shipment AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T3.first_name = 'Zachery' AND T3.last_name = 'Hicks' AND T1.city_name = 'New York' AND STRFTIME('%Y', T2.ship_date) = '2016'

How many shipments did Zachery Hicks transport goods to New York in the year 2016 ?

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


Question: What are the names of the clients who do not have any booking?

SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID  =  T2.Client_ID

What are the names of the clients who do not have any booking ?


Question: Provide the air carrier description of the flight with a tail number N922US from Phoenix.

SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.TAIL_NUM = 'N922US' AND T1.ORIGIN = 'PHX' GROUP BY T2.Description

Provide the air carrier description of the flight with a tail number N922US from Phoenix .

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


Question: Which territory has the greatest difference in sales from previous year to this year? Indicate the difference, as well as the name and country of the region.

SELECT SalesLastYear - SalesYTD, Name, CountryRegionCode FROM SalesTerritory ORDER BY SalesLastYear - SalesYTD DESC LIMIT 1

Which territory has the greatest difference in sales from previous year to this year ? Indicate the difference , as well as the name and country of the region .

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


Question: How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996?

SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity AS num FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey INNER JOIN part AS T3 ON T2.ps_partkey = T3.p_partkey WHERE T1.l_receiptdate = '1996-05-07' AND T1.l_shipinstruct = 'DELIVER IN PERSON' AND T3.p_name = 'smoke turquoise purple blue salmon'

How much is the profit for smoke turquoise purple blue salmon that was delivered in person on 5/7/1996 ?

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


Question: What are the login names of all senior citizens, sorted by first name?

SELECT login_name FROM Users WHERE user_category_code  =  'Senior Citizen' ORDER BY first_name

What are the login names of all senior citizens , sorted by first name ?

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


Question: What is the name of the player with the largest number of votes?

SELECT Player_name FROM player ORDER BY Votes DESC LIMIT 1

What is the name of the player with the largest number of votes ?

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


Question: Among the countries whose GDP is over 1000000, how many of them have a population groth rate of over 3%?

SELECT COUNT(T1.Country) FROM economy AS T1 INNER JOIN population AS T2 ON T1.Country = T2.Country WHERE T1.GDP > 1000000 AND T2.Population_Growth > 3

Among the countries whose GDP is over 1000000 , how many of them have a population groth rate of over 3 % ?

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


Question: Among the players who had 10 empty net goals in their career, who is the tallest? Show his full name.

SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID GROUP BY T2.playerID, T1.height HAVING SUM(T2.ENG) > 10 ORDER BY T1.height DESC LIMIT 1

Among the players who had 10 empty net goals in their career , who is the tallest ? Show his full name .

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


Question: List the all the cities and its city population for provinces with population more than 1000000.

SELECT T1.Name, T1.Population FROM city AS T1 INNER JOIN province AS T2 ON T2.Name = T1.Province WHERE T2.Population > 1000000

List the all the cities and its city population for provinces with population more than 1000000 .

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


Question: What are the agency ids and agency details for all agencies who have a client?

SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id

What are the agency ids and agency details for all agencies who have a client ?

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


Question: List all of the player ids with a height of at least 180cm and an overall rating higher than 85.

SELECT player_api_id FROM Player WHERE height  >=  180 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE overall_rating  >  85

List all of the player ids with a height of at least 180 cm and an overall rating higher than 85 .

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


Question: How many students are there?


Question: What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010?

SELECT id FROM teaches WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010

What are the ids of instructors who taught in the Fall of 2009 but not in the Spring of 2010 ?

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


Question: How many main actors are there in the movie Pirates of the Caribbean: At World's End?

SELECT COUNT(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' AND T2.cast_order = ( SELECT MIN(T2.cast_order) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T3.gender_id = T2.gender_id WHERE T3.gender = 'Male' OR T3.gender = 'Female' AND T1.title = 'Pirates of the Caribbean: At World''s End' )

How many main actors are there in the movie Pirates of the Caribbean : At World 's End ?

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


Question: In customers with the first name of Erica, how many of them bought a quantity below 200?

SELECT COUNT(T1.ProductID) FROM Sales AS T1 INNER JOIN Customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.FirstName = 'Erica' AND T1.Quantity < 200

In customers with the first name of Erica , how many of them bought a quantity below 200 ?

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


Question: State name of unemployed students who have the longest duration of absense from school.

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1

State name of unemployed students who have the longest duration of absense from school .

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


Question: Please calculate the race completion percentage of Japanese drivers from 2007 to 2009.

SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.raceId) FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN drivers AS T3 on T1.driverId = T3.driverId WHERE T3.nationality = 'Japanese' AND T2.year BETWEEN 2007 AND 2009

Please calculate the race completion percentage of Japanese drivers from 2007 to 2009 .

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


Question: For each country, what is the average elevation of that country's airports?

SELECT avg(elevation) ,  country FROM airports GROUP BY country

For each country , what is the average elevation of that country 's airports ?

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


Question: Select the average value of all the boxes.

Select the average value of all the boxes .


Question: What is the least common order status?

SELECT order_status_code FROM Orders GROUP BY order_status_code ORDER BY count(*) LIMIT 1


Question: List the keyrune code for the set whose code is 'PKHC'.

SELECT keyruneCode FROM sets WHERE code = 'PKHC'

List the keyrune code for the set whose code is ' PKHC ' .

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


Question: How many total minutes has the Brooklyn-born player, known by the name of Superman, played during all of his NBA All-Star seasons?

SELECT SUM(T2.minutes) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCity = 'Brooklyn' AND T1.nameNick LIKE '%Superman%'

How many total minutes has the Brooklyn - born player , known by the name of Superman , played during all of his NBA All - Star seasons ?

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


Question: Find the first and last name of students who are living in the dorms that have amenity TV Lounge.

SELECT T1.fname ,  T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid  =  T4.amenid WHERE T4.amenity_name  =  'TV Lounge')

Find the first and last name of students who are living in the dorms that have amenity TV Lounge .

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


Question: What's the occurrence of the biwords pair whose first word is "àbac" and second word is "xinès"?

SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'àbac' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'xinès' )

What 's the occurrence of the biwords pair whose first word is " àbac " and second word is " xinès " ?

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


Question: What are the names of the songs whose title has the word "the"?

SELECT title FROM songs WHERE title LIKE '% the %'

What are the names of the songs whose title has the word " the " ?

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


Question: Among all chemical compounds that contain molecule TR047, identify the percent that form a double-bond.

SELECT CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T WHERE T.molecule_id = 'TR047'

Among all chemical compounds that contain molecule TR047 , identify the percent that form a double - bond .

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


Question: How many patients with a normal anti-SSA came to the hospital before 2000?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSA IN ('negative', '0') AND STRFTIME('%Y', T2.Date) < '2000'

How many patients with a normal anti - SSA came to the hospital before 2000 ?

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


Question: Find the number of boxes saved in each warehouse.

SELECT count(*) ,  warehouse FROM boxes GROUP BY warehouse

Find the number of boxes saved in each warehouse .


Question: What are the ids and details for each project?

SELECT project_id ,  project_details FROM Projects

What are the ids and details for each project ?


Question: Please list the full official names of all the current legislators who served the term that started on 2013/1/3.

SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start = '2013-01-03'

Please list the full official names of all the current legislators who served the term that started on 2013/1/3 .

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


Question: Find the average card credit customers whose membership level is above 1.

SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1

Find the average card credit customers whose membership level is above 1 .

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


Question: For the list with more than 200 followers, state the title and how long the list has been created?

SELECT list_title , 365 * (strftime('%Y', 'now') - strftime('%Y', list_creation_timestamp_utc)) + 30 * (strftime('%m', 'now') - strftime('%m', list_creation_timestamp_utc)) + strftime('%d', 'now') - strftime('%d', list_creation_timestamp_utc) FROM lists WHERE list_followers > 200

For the list with more than 200 followers , state the title and how long the list has been created ?

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


Question: What is the last name of every student who is either female or living in a city with the code BAL or male and under 20?

SELECT lname FROM student WHERE sex  =  'F' AND city_code  =  'BAL' UNION SELECT lname FROM student WHERE sex  =  'M' AND age  <  20

What is the last name of every student who is either female or living in a city with the code BAL or male and under 20 ?

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


Question: Among the male customer in their twenties, how many are from places where the average income is more than 3000?

SELECT COUNT(T2.GEOID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Male' AND T2.INCOME_K > 3000 AND T1.age >= 20 AND T1.age <= 29

Among the male customer in their twenties , how many are from places where the average income is more than 3000 ?

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


Question: Find the name of the document that has been accessed the greatest number of times, as well as the count of how many times it has been accessed?

SELECT document_name ,  access_count FROM documents ORDER BY access_count DESC LIMIT 1

Find the name of the document that has been accessed the greatest number of times , as well as the count of how many times it has been accessed ?

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


Question: How many students are disabled?


Question: What are the products with a large photo?

SELECT T2.ProductID FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName LIKE '%large.gif'

What are the products with a large photo ?


Question: Calculate the average level difference between the Marketing editors hired by the US and non-US publishers?

SELECT (CAST(SUM(CASE WHEN T1.country = 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T1.country != 'USA' THEN job_lvl ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.country != 'USA' THEN 1 ELSE 0 END)) FROM publishers AS T1 INNER JOIN employee AS T2 ON T1.pub_id = T2.pub_id INNER JOIN jobs AS T3 ON T2.job_id = T3.job_id WHERE T3.job_desc = 'Managing Editor'

Calculate the average level difference between the Marketing editors hired by the US and non - US publishers ?

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


Question: What are the names of all products that are not the most frequently-used maximum page size?

SELECT product FROM product WHERE product != (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY count(*) DESC LIMIT 1)

What are the names of all products that are not the most frequently - used maximum page size ?

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


Question: What are the codes of boxes stored in warehouses in Chicago?

SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago'

What are the codes of boxes stored in warehouses in Chicago ?

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


Question: How many members of the Student_Club have majored Environmental Engineering?

SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Environmental Engineering'

How many members of the Student_Club have majored Environmental Engineering ?

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


Question: What is the currency of Brazil?

SELECT T1.Name FROM Currency AS T1 INNER JOIN CountryRegionCurrency AS T2 ON T1.CurrencyCode = T2.CurrencyCode INNER JOIN CountryRegion AS T3 ON T2.CountryRegionCode = T3.CountryRegionCode WHERE T3.Name = 'Brazil'


Question: How many users were awarded with 'Citizen Patrol' badge?

SELECT COUNT(id) FROM badges WHERE `Name` = 'Citizen Patrol'

How many users were awarded with ' Citizen Patrol ' badge ?

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


Question: What are the delegate and committee information for each election record?

SELECT Delegate ,  Committee FROM election

What are the delegate and committee information for each election record ?

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


Question: Provide the engine displacement status of the $37443.85589 car.

SELECT T1.displacement FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '37443.85589'

Provide the engine displacement status of the $ 37443.85589 car .

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


Question: What is the path of solution of "spinachLexer.mT__55" method?

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'spinachLexer.mT__55'

What is the path of solution of " spinachLexer.mT__55 " method ?

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


Question: Find the store ID with more orders between "Aurora" and "Babylon" city.

SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.`City Name` = 'Aurora (Township)' OR T2.`City Name` = 'Babylon (Town)' GROUP BY T2.StoreID ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1

Find the store ID with more orders between " Aurora " and " Babylon " city .

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


Question: What is the average card credit of customers with membership level higher than 1?

SELECT avg(Card_Credit) FROM customer WHERE Level_of_Membership  >  1

What is the average card credit of customers with membership level higher than 1 ?

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


Question: What are the ids of all orders and the corresponding client names?

SELECT T1.idOrder ,  T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient

What are the ids of all orders and the corresponding client names ?

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


Question: What is Ajax's highest chance creation passing score and what is it classified as?

SELECT t2.chanceCreationPassing, t2.chanceCreationPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Ajax' ORDER BY t2.chanceCreationPassing DESC LIMIT 1

What is Ajax 's highest chance creation passing score and what is it classified as ?

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


Question: How many votes were made by Harlan?

SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN votes AS T3 ON T3.PostId = T2.PostId WHERE T1.DisplayName = 'Harlan'


Question: What is the name of each course and the corresponding number of student enrollment?

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

What is the name of each course and the corresponding number of student enrollment ?

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


Question: What are the names of the climbers, ordered by points descending?

SELECT Name FROM climber ORDER BY Points DESC

What are the names of the climbers , ordered by points descending ?

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


Question: What are the types and release dates of books?

What are the types and release dates of books ?


Question: Which fault log included the most number of faulty parts? List the fault log id, description and record time.

SELECT T1.fault_log_entry_id ,  T1.fault_description ,  T1.fault_log_entry_datetime FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id  =  T2.fault_log_entry_id GROUP BY T1.fault_log_entry_id ORDER BY count(*) DESC LIMIT 1

Which fault log included the most number of faulty parts ? List the fault log i d , description and record time .

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


Question: Please list the dates on which a male customer has purchased more than 3 root beers.

SELECT T2.TransactionDate FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Gender = 'M' GROUP BY T2.TransactionDate HAVING COUNT(T2.CustomerID) > 3

Please list the dates on which a male customer has purchased more than 3 root beers .

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


Question: List down the geographic identifier with an income that ranges from 2100 to 2500.

SELECT GEOID FROM Demog WHERE INCOME_K >= 2100 AND INCOME_K <= 2500

List down the geographic identifier with an income that ranges from 2100 to 2500 .

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


Question: Please list the product names of all the products on the LL Road Frame Sale.

SELECT T3.Name FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID WHERE T1.Description = 'LL Road Frame Sale'

Please list the product names of all the products on the LL Road Frame Sale .

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


Question: Give all information regarding instructors, in order of salary from least to greatest.

SELECT * FROM instructor ORDER BY salary

Give all information regarding instructors , in order of salary from least to greatest .

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


Question: What are the voice sound quality score, rhythm tempo score and stage presence score performed by the participant named 'Freeway'?

SELECT T1.voice_sound_quality ,  T1.rhythm_tempo ,  T1.stage_presence FROM performance_score AS T1 JOIN participants AS T2 ON T1.participant_id  =  T2.id WHERE T2.name  =  'Freeway'

What are the voice sound quality score , rhythm tempo score and stage presence score performed by the participant named ' Freeway ' ?

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


Question: What is the content of the review under the title "really interesting!" and is created on 2018-04-24 at 12:05:16?

SELECT content FROM reviews WHERE title = 'really interesting!' AND created_at = '2018-04-24T12:05:16-07:00'

What is the content of the review under the title " really interesting ! " and is created on 2018 - 04 - 24 at 12:05:16 ?

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


Question: List the name of the country with the biggest score in politics.

SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1

List the name of the country with the biggest score in politics .

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


Question: What is the county of the Sankee restaurant?

SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'sankee'

What is the county of the Sankee restaurant ?


Question: What are the department names, cities, and state provinces for each department?

SELECT T1.department_name ,  T2.city ,  T2.state_province FROM departments AS T1 JOIN locations AS T2 ON T2.location_id  =  T1.location_id

What are the department names , cities , and state provinces for each department ?

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


Question: Please indicate the keywords of the episode that won the Primetime Emmy Award category.

SELECT T2.keyword FROM Award AS T1 INNER JOIN Keyword AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'Primetime Emmy';

Please indicate the keywords of the episode that won the Primetime Emmy Award category .

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


Question: Which services were used by customers by more than 3 times? Give me the service details.

SELECT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id  =  t2.service_id GROUP BY t1.service_details HAVING count(*)  >  3

Which services were used by customers by more than 3 times ? Give me the service details .

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


Question: List all cases from the year 2012 in which the subject was deceased

SELECT case_number FROM incidents WHERE STRFTIME('%Y', date) > '2011' AND subject_statuses = 'Deceased'

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


Question: List the last name of all the students who majored Law and Constitutional Studies.

SELECT T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.major_name = 'Law and Constitutional Studies'

List the last name of all the students who majored Law and Constitutional Studies .

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


Question: What are the meeting ids, meeting outcomes, meeting types, and client details for all meetings?

SELECT T1.meeting_id ,  T1.meeting_outcome ,  T1.meeting_type ,  T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id

What are the meeting ids , meeting outcomes , meeting types , and client details for all meetings ?

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


Question: Which state is "Mercer University" located in?

SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Mercer University' THEN state ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL

Which state is " Mercer University " located in ?


Question: What is the name of the customer with the highest amount of debt?

SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )

What is the name of the customer with the highest amount of debt ?

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


Question: Which students do not have any answers? Find their first names.

SELECT First_Name FROM Students WHERE Student_ID NOT IN (SELECT Student_ID FROM Student_Answers)

Which students do not have any answers ? Find their first names .

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


Question: Which product has been ordered most number of times?

SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1

Which product has been ordered most number of times ?

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


Question: Show the names of countries in descending order of overall scores.

SELECT name FROM countries ORDER BY overall_score DESC

Show the names of countries in descending order of overall scores .

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


Question: What are the states with an above-average female population?

SELECT DISTINCT T2.state FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T2.female_population > ( SELECT AVG(female_population) FROM zip_data )

What are the states with an above - average female population ?

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


Question: What are the ids of all boats that are reserved by someone?

What are the ids of all boats that are reserved by someone ?


Question: Find the distinct first names of all the students who have vice president votes and whose city code is not PIT.

SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "PIT"

Find the distinct first names of all the students who have vice president votes and whose city code is not PIT .

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


Question: How many employees are there all together?

How many employees are there all together ?


Question: What is the surface area of the country where Sutton Coldfield city belongs?

SELECT T1.SurfaceArea FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Sutton Coldfield'

What is the surface area of the country where Sutton Coldfield city belongs ?

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


Question: What are the themes and years for exhibitions, sorted by ticket price descending?

SELECT theme ,  YEAR FROM exhibition ORDER BY ticket_price DESC

What are the themes and years for exhibitions , sorted by ticket price descending ?

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


Question: Return all distinct detention type codes.

SELECT DISTINCT detention_type_code FROM Detention

Return all distinct detention type codes .


Question: How many party events do we have?


Question: How many movies are playing across all theaters?

SELECT count(*) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie

How many movies are playing across all theaters ?


Question: Find and list the part key of the parts which has an above-average retail price.

SELECT p_partkey FROM part WHERE p_retailprice > ( SELECT AVG(p_retailprice) FROM part )

Find and list the part key of the parts which has an above - average retail price .

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


Question: What are the expenses of the budget with the lowest remaining?

SELECT T2.expense_description FROM budget AS T1 INNER JOIN expense AS T2 ON T1.budget_id = T2.link_to_budget ORDER BY T1.remaining LIMIT 1

What are the expenses of the budget with the lowest remaining ?

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


Question: Give the number of "game-Fishing" apps.

SELECT COUNT(T2.app_id) FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-Fishing'

Give the number of " game - Fishing " apps .

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


Question: What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000?

SELECT phone_number ,  email_address FROM Customers WHERE amount_outstanding  >  2000;

What are the phone numbers and email addresses of all customers who have an outstanding balance of more than 2000 ?

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


Question: What are the ids of all shipments on the planet Mars that are managed by Turanga Leela?

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" AND T3.Name = "Turanga Leela";

What are the ids of all shipments on the planet Mars that are managed by Turanga Leela ?

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


Question: What country does Roberto Almeida live?

SELECT country FROM customers WHERE first_name = "Roberto" AND last_name = "Almeida";

What country does Roberto Almeida live ?


Question: List the episode ID and title of episode where casting was credited to Bonita Pietila.

SELECT T1.episode_id, T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'true' AND T2.person = 'Bonita Pietila' AND T2.role = 'casting';

List the episode ID and title of episode where casting was credited to Bonita Pietila .

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


Question: Which company started the earliest the maintenance contract? Show the company name.

SELECT T1.company_name FROM Third_Party_Companies AS T1 JOIN Maintenance_Contracts AS T2 ON T1.company_id  =  T2.maintenance_contract_company_id ORDER BY T2.contract_start_date ASC LIMIT 1

Which company started the earliest the maintenance contract ? Show the company name .

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


Question: What activities do we have?


Question: Show the staff id and the number of meetings attended by the staff who attended some meeting but had the lowest attendance.

SELECT staff_id ,  count(*) FROM Staff_in_meetings GROUP BY staff_id ORDER BY count(*) ASC LIMIT 1;

Show the staff i d and the number of meetings attended by the staff who attended some meeting but had the lowest attendance .

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


Question: Please list the credit card numbers of all the employees who have left the Finance Department.

SELECT T3.CardNumber FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN CreditCard AS T3 ON T1.ModifiedDate = T3.ModifiedDate INNER JOIN PersonCreditCard AS T4 ON T3.CreditCardID = T4.CreditCardID WHERE T2.Name = 'Finance' AND T1.EndDate IS NOT NULL

Please list the credit card numbers of all the employees who have left the Finance Department .

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


Question: What are the names of all wines produced in 2008?

SELECT Name FROM WINE WHERE YEAR  =  "2008"

What are the names of all wines produced in 2008 ?

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


Question: How many addresses are there in Woodridge city?

SELECT COUNT(T1.address_id) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city = 'Woodridge'

How many addresses are there in Woodridge city ?


Question: List all goalies from year 2000 to 2010 for team COL. State their given name, height, weight and age of today.

SELECT T1.nameGiven, T1.height , T1.weight, STRFTIME('%Y', CURRENT_TIMESTAMP) - birthYear FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'COL' AND T2.year >= 2000 AND T2.year <= 2010 GROUP BY T1.playerID

List all goalies from year 2000 to 2010 for team COL . State their given name , height , weight and age of today .

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


Question: Please list the IDs of the teachers who have advised more than 4 others to teach.

SELECT p_id_dummy FROM advisedBy GROUP BY p_id_dummy HAVING COUNT(p_id_dummy) > 4

Please list the IDs of the teachers who have advised more than 4 others to teach .

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


Question: List the carriers of devices in ascending alphabetical order.

SELECT Carrier FROM device ORDER BY Carrier ASC

List the carriers of devices in ascending alphabetical order .


Question: From 1950 to 1970, what is the maximum point of players whose teams were ranked 1?

SELECT MAX(T2.points) FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year BETWEEN 1950 AND 1970 AND T1.rank = 1

From 1950 to 1970 , what is the maximum point of players whose teams were ranked 1 ?

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


Question: Show all transaction types.

SELECT DISTINCT transaction_type FROM Financial_Transactions


Question: Among the violations in 2016, how many of them have unscheduled inspections?

SELECT COUNT(T2.business_id) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.type = 'Routine - Unscheduled'

Among the violations in 2016 , how many of them have unscheduled inspections ?

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


Question: What are the ids of the problems which are reported before 1978-06-26?

SELECT problem_id FROM problems WHERE date_problem_reported < "1978-06-26"

What are the ids of the problems which are reported before 1978 - 06 - 26 ?

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


Question: What are the first names of students studying in room 107?

SELECT DISTINCT firstname FROM list WHERE classroom  =  107

What are the first names of students studying in room 107 ?

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


Question: What are the first names and ages of all students who are playing both Football and Lacrosse?

SELECT fname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName  =  "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName  =  "Lacrosse")

What are the first names and ages of all students who are playing both Football and Lacrosse ?

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


Question: How many customers are there?


Question: Find all the locations whose names contain the word "film".

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

Find all the locations whose names contain the word " film " .


Question: What is the percentage of double bonds in the molecule TR008? Please provide your answer as a percentage with five decimal places.

SELECT ROUND(CAST(COUNT(CASE WHEN T.bond_type = '=' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id),5) FROM bond AS T WHERE T.molecule_id = 'TR008'

What is the percentage of double bonds in the molecule TR008 ? Please provide your answer as a percentage with five decimal places .

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


Question: What are the character names in paragraph 3?

SELECT DISTINCT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.ParagraphNum = 3

What are the character names in paragraph 3 ?


Question: What is the name of the shop that has the most different kinds of devices in stock?

SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID ORDER BY COUNT(*) DESC LIMIT 1

What is the name of the shop that has the most different kinds of devices in stock ?

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


Question: How many games has Prithipal Singh participated in?

SELECT COUNT(T2.games_id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Prithipal Singh'

How many games has Prithipal Singh participated in ?


Question: What are the average rating and max age of all sailors?

SELECT AVG(rating) ,  MAX(age) FROM Sailors

What are the average rating and max age of all sailors ?

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


Question: In which cities are Los Angeles County Suburban Metro Schools located?

SELECT school_city FROM projects WHERE school_metro = 'suburban' AND school_county = 'Los Angeles'

In which cities are Los Angeles County Suburban Metro Schools located ?

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


Question: State the name and website of the institutes from the state with 209 graduate cohort in 2011.

SELECT T1.chronname, T1.site FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2011 AND T2.grad_cohort = 209

State the name and website of the institutes from the state with 209 graduate cohort in 2011 .

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


Question: What is the difference between the number of returned items and not returned items with the full price of under 16947.7?

SELECT SUM(IIF(l_returnflag = 'A', 1, 0)) - SUM(IIF(l_returnflag = 'N', 1, 0)) AS diff FROM lineitem WHERE l_extendedprice < 16947.7

What is the difference between the number of returned items and not returned items with the full price of under 16947.7 ?

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


Question: Given the titles of all courses, in order of titles and credits.

SELECT title FROM course ORDER BY title ,  credits

Given the titles of all courses , in order of titles and credits .

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


Question: What percentage of people have worked on the True North episode as additional crew?

SELECT CAST(SUM(CASE WHEN T2.role = 'Additional Crew' THEN 1 ELSE 0 END) AS REAL ) * 100 / COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'True North'

What percentage of people have worked on the True North episode as additional crew ?

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


Question: Among the projects whose donators are teachers, what is the percentage of projects that affected more than 30 students?

SELECT CAST(SUM(CASE WHEN T1.students_reached > 30 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.is_teacher_acct = 't'

Among the projects whose donators are teachers , what is the percentage of projects that affected more than 30 students ?

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


Question: What are the names of all the scientists in alphabetical order?

SELECT name FROM scientists ORDER BY name

What are the names of all the scientists in alphabetical order ?


Question: What are sale prices of books written by Plato?

SELECT saleprice FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "Plato"

What are sale prices of books written by Plato ?

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


Question: What proportion of cards do not have a text box with a normal layout?

SELECT CAST(SUM(CASE WHEN isTextless = 1 AND layout = 'normal' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cards

What proportion of cards do not have a text box with a normal layout ?

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


Question: What is the percentage of the words that have been repeated under 180 times in the Catalan language?

SELECT CAST(COUNT(CASE WHEN T2.occurrences < 180 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.lid) FROM langs AS T1 INNER JOIN langs_words AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'

What is the percentage of the words that have been repeated under 180 times in the Catalan language ?

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


Question: What number of patients with a degree of thrombosis level 2 and ANA pattern of only S, have a level of anti-Cardiolip in antibody (IgM) 20% higher than average?

SELECT COUNT(*) FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S' AND `aCL IgM` > (SELECT AVG(`aCL IgM`) * 1.2 FROM Examination WHERE Thrombosis = 2 AND `ANA Pattern` = 'S')

What number of patients with a degree of thrombosis level 2 and ANA pattern of only S , have a level of anti - Cardiolip in antibody ( IgM ) 20 % higher than average ?

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


Question: What are the member names and hometowns of those who registered at a branch in 2016?

SELECT T2.name ,  T2.hometown FROM membership_register_branch AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T1.register_year  =  2016

What are the member names and hometowns of those who registered at a branch in 2016 ?

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


Question: How many respondents who participated in the survey in 2019 have ever sought treatment for a mental health disorder from a mental health professional?

SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.QuestionID = 7 AND T1.SurveyID = 2019 AND T1.AnswerText = 1

How many respondents who participated in the survey in 2019 have ever sought treatment for a mental health disorder from a mental health professional ?

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


Question: What is the title of the 3 worst rated episodes?

SELECT title FROM Episode ORDER BY rating LIMIT 3

What is the title of the 3 worst rated episodes ?


Question: Who are the members of the club named "Hopkins Student Enterprises"? Show the last name.

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  =  "Hopkins Student Enterprises"

Who are the members of the club named " Hopkins Student Enterprises " ? Show the last name .

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


Question: What are the maximum and minimum enrollment of all institutions?

SELECT max(Enrollment) ,  min(Enrollment) FROM institution

What are the maximum and minimum enrollment of all institutions ?


Question: What are the names of regions that were not affected?

SELECT region_name FROM region WHERE region_id NOT IN (SELECT region_id FROM affected_region)

What are the names of regions that were not affected ?


Question: Among the sets in the block "Ice Age", how many of them have an Italian translation?

SELECT COUNT(DISTINCT T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.block = 'Ice Age' AND T2.language = 'Italian' AND T2.translation IS NOT NULL

Among the sets in the block " Ice Age " , how many of them have an Italian translation ?

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


Question: List the names and menu page IDs of the dishes that first appeared in 1861.

SELECT T2.name, T1.dish_id FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T2.first_appeared = 1861

List the names and menu page IDs of the dishes that first appeared in 1861 .

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


Question: How many owner and disponent dispositions are there from account number 1 to account number 10?

SELECT SUM(type = 'OWNER') , SUM(type = 'DISPONENT') FROM disp WHERE account_id BETWEEN 1 AND 10

How many owner and disponent dispositions are there from account number 1 to account number 10 ?

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


Question: What is the bowling skill used by most players?

SELECT T1.Bowling_Skill FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T2.Bowling_skill = T1.Bowling_Id GROUP BY T1.Bowling_Skill ORDER BY COUNT(T1.Bowling_Skill) DESC LIMIT 1

What is the bowling skill used by most players ?


Question: What are the different parties of representative? Show the party name and the number of representatives in each party.

SELECT Party ,  COUNT(*) FROM representative GROUP BY Party

What are the different parties of representative ? Show the party name and the number of representatives in each party .

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


Question: How many connections does the atom 19 have?

SELECT COUNT(T.bond_id) FROM connected AS T WHERE SUBSTR(T.atom_id, -2) = '19'

How many connections does the atom 19 have ?


Question: Which product is the most expensive?

SELECT ProductName FROM Products WHERE UnitPrice = ( SELECT MAX(UnitPrice) FROM Products )


Question: What is the legislative district's office address where 010XX W LAKE ST is located?

SELECT T1.ward_office_address FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T2.block = '010XX W LAKE ST' GROUP BY T1.ward_office_address

What is the legislative district 's office address where 010XX W LAKE ST is located ?

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


Question: Count the number of courses with more than 2 credits.

SELECT count(*) FROM COURSE WHERE Credits  >  2

Count the number of courses with more than 2 credits .

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


Question: Please list the job titles of the employees who has a document that has been approved.

SELECT DISTINCT T2.BusinessEntityID, T2.JobTitle FROM Document AS T1 INNER JOIN Employee AS T2 ON T1.Owner = T2.BusinessEntityID WHERE T1.Status = 2

Please list the job titles of the employees who has a document that has been approved .

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


Question: What are the different names of the colleges involved in the tryout in alphabetical order?

SELECT DISTINCT cName FROM tryout ORDER BY cName

What are the different names of the colleges involved in the tryout in alphabetical order ?

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


Question: Which destination has least number of flights?

SELECT destination FROM Flight GROUP BY destination ORDER BY count(*) LIMIT 1

Which destination has least number of flights ?


Question: Who is the narrator of the "Flight" episode?

SELECT T3.name FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.title = 'Flight' AND T2.role = 'Narrator'

Who is the narrator of the " Flight " episode ?


Question: From 1960 to 1965, which country had the highest Death rate, crude (per 1,000 people)?

SELECT CountryName FROM Indicators WHERE Year BETWEEN 1960 AND 1965 AND IndicatorName = 'Death rate, crude (per 1,000 people)' ORDER BY Value DESC LIMIT 1

From 1960 to 1965 , which country had the highest Death rate , crude ( per 1,000 people ) ?

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


Question: Among all events hold by the Student_Club in 2019, find the percentage share of events related to 'Community Service'

SELECT CAST(SUM(CASE WHEN type = 'Community Service' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(type) FROM event WHERE SUBSTR(event_date, 1, 4) = '2019'

Among all events hold by the Student_Club in 2019 , find the percentage share of events related to ' Community Service '

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


Question: Show the apartment type codes and apartment numbers in the buildings managed by "Kyle".

SELECT T2.apt_type_code ,  T2.apt_number FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T1.building_manager  =  "Kyle"

Show the apartment type codes and apartment numbers in the buildings managed by " Kyle " .

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


Question: Give the name and building of the departments with greater than average budget.

SELECT dept_name ,  building FROM department WHERE budget  >  (SELECT avg(budget) FROM department)

Give the name and building of the departments with greater than average budget .

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


Question: What is the language and flavor text of the card that has colorpie watermark? List out the type of this card.

SELECT DISTINCT T2.language, T2.flavorText FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.watermark = 'colorpie'

What is the language and flavor text of the card that has colorpie watermark ? List out the type of this card .

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


Question: What are the different names of the product characteristics?

SELECT DISTINCT characteristic_name FROM CHARACTERISTICS

What are the different names of the product characteristics ?


Question: For each reviewer id, what is the title and rating for the movie with the smallest rating?

SELECT T2.title ,  T1.rID ,  T1.stars ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.rID

For each reviewer i d , what is the title and rating for the movie with the smallest rating ?

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


Question: What is the profit for part no.98768 in order no.1?

SELECT T1.l_extendedprice * (1 - T1.l_discount) - T2.ps_supplycost * T1.l_quantity FROM lineitem AS T1 INNER JOIN partsupp AS T2 ON T1.l_suppkey = T2.ps_suppkey WHERE T1.l_orderkey = 1 AND T1.l_partkey = 98768

What is the profit for part no.98768 in order no.1 ?

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


Question: What's the list of all types for the card "Molimo, Maro-Sorcerer"?

SELECT DISTINCT subtypes, supertypes FROM cards WHERE name = 'Molimo, Maro-Sorcerer'

What 's the list of all types for the card " Molimo , Maro - Sorcerer " ?

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


Question:
How many papers are published under the conference "Mathematics of Program Construction
"?

SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'Mathematics of Program Construction'

How many papers are published under the conference " Mathematics of Program Construction " ?

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


Question: Name cellphone number's Type ID?

SELECT PhoneNumberTypeID FROM PhoneNumberType WHERE Name = 'Cell'

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


Question: How many accounts do we have?


Question: How many customers use a Yahoo! Mail e-mail address?

SELECT COUNT(*) FROM customer WHERE email LIKE '%@yahoo.com'

How many customers use a Yahoo ! Mail e - mail address ?

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


Question: Which parties have hosts of age above 50? Give me the party locations.

SELECT T3.Location 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 WHERE T2.Age  >  50

Which parties have hosts of age above 50 ? Give me the party locations .

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


Question: Which part has the least chargeable amount? List the part id and amount.

SELECT part_id ,  chargeable_amount FROM Parts ORDER BY chargeable_amount ASC LIMIT 1

Which part has the least chargeable amount ? List the part i d and amount .

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


Question: Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator?

SELECT CASE WHEN SUM(CAST(strftime('%Y', T2.end) AS int) - CAST(strftime('%Y', T2.start) AS int)) = 14 THEN official_full_name END FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.religion_bio = 'Lutheran' AND T2.state = 'OH' AND T2.type = 'rep'

Who is the Lutheran representative that served in the state of Ohio for 14 years before becoming a senator ?

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


Question: List all characteristics of product named "sesame" with type code "Grade".

SELECT t3.characteristic_name 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  =  "sesame" AND t3.characteristic_type_code  =  "Grade"

List all characteristics of product named " sesame " with type code " Grade " .

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


Question: List the document ids for any documents with the status code done and the type code paper.

SELECT document_id FROM Documents WHERE document_status_code = "done" AND document_type_code = "Paper";

List the document ids for any documents with the status code done and the type code paper .

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


Question: How many artists do we have?


Question: Show the positions of the players from the team with name "Ryley Goldner".

SELECT T1.Position FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id WHERE T2.Name  =  "Ryley Goldner"

Show the positions of the players from the team with name " Ryley Goldner " .

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


Question: List all the paper ID and its class type that cited the word 'word1002'.

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

List all the paper ID and its class type that cited the word ' word1002 ' .

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


Question: List the ingredients in Tomato-Cucumber Relish.

SELECT T3.name FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Tomato-Cucumber Relish'

List the ingredients in Tomato - Cucumber Relish .

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


Question: List the full name of employees and titles who have to report to Sales Manager.

SELECT FirstName, LastName, Title FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE Title = 'Sales Manager' )

List the full name of employees and titles who have to report to Sales Manager .

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


Question: List out the number of female students who enlisted in the air force.

SELECT COUNT(name) FROM enlist WHERE organ = 'air_force' AND name NOT IN ( SELECT name FROM male )

List out the number of female students who enlisted in the air force .

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


Question: What are the details on the document subsets that are named 'Best for 2000'?

SELECT Document_Subset_Details FROM Document_Subsets WHERE Document_Subset_Name = "Best for 2000";

What are the details on the document subsets that are named ' Best for 2000 ' ?

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


Question: List the product and its issues of the complains of clients with age greater than the 60% of average age of all clients.

SELECT DISTINCT T2.Product, T2.Issue FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.age * 100 > ( SELECT AVG(age) * 60 FROM client )

List the product and its issues of the complains of clients with age greater than the 60 % of average age of all clients .

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


Question: Which students have 'Suite' as a substring in their details? Give me their biographical information.

SELECT bio_data FROM Students WHERE student_details LIKE '%Suite%'

Which students have ' Suite ' as a substring in their details ? Give me their biographical information .

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


Question: What are the ids and locations of all circuits in France or Belgium?

SELECT circuitid ,  LOCATION FROM circuits WHERE country = "France" OR country = "Belgium"

What are the ids and locations of all circuits in France or Belgium ?

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


Question: What are the instruments are used in the song "Le Pop"?

SELECT instrument FROM instruments AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop"

What are the instruments are used in the song " Le Pop " ?

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


Question: Calculate the service of GDP for Brazil.

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

Calculate the service of GDP for Brazil .


Question: what are the first name and last name of all candidates?

SELECT T2.first_name ,  T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id

what are the first name and last name of all candidates ?

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


Question: How many distinct incident type codes are there?

SELECT count(DISTINCT incident_type_code) FROM Behavior_Incident

How many distinct incident type codes are there ?


Question: What is the full name of the employee who has the most customers?

SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id  =  T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What is the full name of the employee who has the most customers ?

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


Question: Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick.

SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  >  ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick" )

Find the ids of the problems reported after the date of any problems reported by the staff Rylan Homenick .

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


Question: For all ratings which are rated in year 2020, name the movies which has the rating scored 4 and above.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(SUBSTR(T1.rating_timestamp_utc, 1, 4) AS INTEGER) = 2020 AND CAST(SUBSTR(T1.rating_timestamp_utc, 6, 2) AS INTEGER) > 4

For all ratings which are rated in year 2020 , name the movies which has the rating scored 4 and above .

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


Question: How many females use ZUK Z1 phones in the age group under 23?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.device_model = 'Z1' AND T1.`group` = 'F23-' AND T2.phone_brand = 'ZUK'

How many females use ZUK Z1 phones in the age group under 23 ?

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


Question: How many patients have a normal level of anti-ribonuclear protein and have been admitted to the hospital?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP = 'negative' OR T2.RNP = '0' AND T1.Admission = '+'

How many patients have a normal level of anti - ribonuclear protein and have been admitted to the hospital ?

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


Question: Who is the tallest player in Denver Nuggets since 1980?

SELECT T1.firstName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T3.name = 'Denver Nuggets' AND T2.year > 1980 ORDER BY T1.height DESC LIMIT 1

Who is the tallest player in Denver Nuggets since 1980 ?

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


Question: List down the company names that have the highest reorder level.

SELECT DISTINCT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ReorderLevel = ( SELECT MAX(ReorderLevel) FROM Products )

List down the company names that have the highest reorder level .

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


Question: Among the films rented by Natalie Meyer, describe the titles and categories of the films which were rented in February 2006.

SELECT T3.title, T2.name FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id INNER JOIN customer AS T5 ON T4.store_id = T5.store_id INNER JOIN rental AS T6 ON T4.inventory_id = T6.inventory_id WHERE T5.first_name = 'Natalie' AND T5.last_name = 'Meyer' AND STRFTIME('%Y',T3.rental_rate) = '2006' AND STRFTIME('%m',T3.rental_rate) = '2'

Among the films rented by Natalie Meyer , describe the titles and categories of the films which were rented in February 2006 .

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


Question: What are the official languages of the countries of players from Maryland or Duke college?

SELECT T1.Official_native_language FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.College  =  "Maryland" OR T2.College  =  "Duke"

What are the official languages of the countries of players from Maryland or Duke college ?

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


Question: In the year 1500s, how many tragedies did Shakespeare write?

SELECT COUNT(id) FROM works WHERE GenreType = 'Tragedy' AND Date BETWEEN 1500 AND 1599

In the year 1500s , how many tragedies did Shakespeare write ?

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


Question: Return the duration of the actor with the greatest age.

SELECT Duration FROM actor ORDER BY Age DESC LIMIT 1

Return the duration of the actor with the greatest age .

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


Question: Which product line has the most products that are salable?

SELECT ProductLine FROM Product WHERE FinishedGoodsFlag = 1 GROUP BY ProductLine ORDER BY COUNT(FinishedGoodsFlag) DESC LIMIT 1

Which product line has the most products that are salable ?


Question: What is the number of invoices and total money billed in them from CA?

SELECT billing_state ,  COUNT(*) ,  SUM(total) FROM invoices WHERE billing_state  =  "CA";

What is the number of invoices and total money billed in them from CA ?

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


Question: Find the employee id for all employees who earn more than the average salary.

SELECT employee_id FROM employees WHERE salary  >  (SELECT AVG(salary) FROM employees)

Find the employee i d for all employees who earn more than the average salary .

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


Question: Identify recipes with different maximum and minimum quantities.

SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.max_qty <> T2.min_qty

Identify recipes with different maximum and minimum quantities .


Question: Show the name, open date, and organizer for all churches.

SELECT name ,  open_date ,  organized_by FROM Church

Show the name , open date , and organizer for all churches .

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


Question: For each  airport name, how many routes start at that airport, ordered from most to least?

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

For each airport name , how many routes start at that airport , ordered from most to least ?

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


Question: what is the total weight of all packages shipped on Mars?

SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Shipment AS T2 ON T1.Shipment = T2.ShipmentID JOIN Planet AS T3 ON T2.Planet = T3.PlanetID WHERE T3.Name = "Mars";

what is the total weight of all packages shipped on Mars ?

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


Question: Please list out the first name and last name of player who attended California college and have been selected as all stars?

SELECT DISTINCT T1.firstName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.college = 'California'

Please list out the first name and last name of player who attended California college and have been selected as all stars ?

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


Question: Return the first names and last names of all guests

SELECT guest_first_name ,  guest_last_name FROM Guests

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


Question: In 1960, what is largest population for country with upper middle income?

SELECT MAX(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.Year = 1960 AND T2.IndicatorName = 'Population, total'

In 1960 , what is largest population for country with upper middle income ?

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


Question: Which headphone models do not have any stock in any store?

SELECT model FROM headphone WHERE headphone_id NOT IN (SELECT headphone_id FROM stock)

Which headphone models do not have any stock in any store ?

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


Question: Tell the number of 4-year private not-for-profit schools in the home state of "Brevard Community College".

SELECT COUNT(T1.chronname) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T2.level = '4-year' AND T2.control = 'Private not-for-profit' AND T1.chronname = 'Brevard Community College'

Tell the number of 4 - year private not - for - profit schools in the home state of " Brevard Community College " .

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


Question: Show the transaction type code that occurs the most frequently.

SELECT transaction_type_code FROM TRANSACTIONS GROUP BY transaction_type_code ORDER BY COUNT(*) DESC LIMIT 1

Show the transaction type code that occurs the most frequently .

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


Question: Among the subscribers who rented a bike from South Van Ness at Market on 12/1/2013, whose duration was the shortest and to which station was the bike returned to? Indicate South Van Ness's dock count.

SELECT MIN(T2.duration), T2.end_station_name, COUNT(T2.start_station_name) FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name WHERE T2.start_date LIKE '12/1/2013%' AND T2.start_station_name = 'South Van Ness at Market' AND T2.subscription_type = 'Subscriber'

Among the subscribers who rented a bike from South Van Ness at Market on 12/1/2013 , whose duration was the shortest and to which station was the bike returned to ? Indicate South Van Ness 's dock count .

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


Question: In weather station 17, which store sold the highest quantity of item 45 in October 2012?

SELECT T1.store_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.item_nbr = 45 AND T2.station_nbr = 17 AND T1.`date` LIKE '%2012-10%' GROUP BY T1.store_nbr ORDER BY SUM(T1.units) DESC LIMIT 1

In weather station 17 , which store sold the highest quantity of item 45 in October 2012 ?

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


Question: What medication did Elly Koss take when she had Streptococcal sore throat?

SELECT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.reasondescription = 'Streptococcal sore throat (disorder)'

What medication did Elly Koss take when she had Streptococcal sore throat ?

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


Question: Give the web site address for "Swarthmore College".

SELECT T FROM ( SELECT DISTINCT CASE WHEN chronname = 'Swarthmore College' THEN site ELSE NULL END AS T FROM institution_details ) WHERE T IS NOT NULL

Give the web site address for " Swarthmore College " .

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


Question: What is the number of airlines based in Russia?

SELECT count(*) FROM airlines WHERE country  =  'Russia'

What is the number of airlines based in Russia ?


Question: What is the name of the department with the fewest members?

SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MEMBER_OF AS T2 ON T1.DNO  =  T2.DNO GROUP BY T2.DNO ORDER BY count(*) ASC LIMIT 1

What is the name of the department with the fewest members ?

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


Question: What is the average number of courses taught by a professor?

SELECT CAST(COUNT(T1.course_id) AS REAL) / COUNT(DISTINCT T2.p_id) AS num FROM taughtBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.professor = 1

What is the average number of courses taught by a professor ?

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


Question: What were the penalty minutes in 1923's Stanley Cup finals of the team that ranked second in that year?

SELECT T1.PIM FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1923' AND T2.rank = 2

What were the penalty minutes in 1923 's Stanley Cup finals of the team that ranked second in that year ?

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


Question: Calculate the differences of the paper number with the journal name of IWC in 2000 and 2010.

SELECT SUM(CASE WHEN T2.Year = 2000 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Year = 2010 THEN 1 ELSE 0 END) AS DIFF FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.ShortName = 'IWC'

Calculate the differences of the paper number with the journal name of IWC in 2000 and 2010 .

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


Question: How many users with a long tip and 2 likes for their tip have a high number of fans?

SELECT COUNT(DISTINCT T1.user_id) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T2.tip_length = 'Long' AND T2.likes = 2 AND T1.user_fans = 'High'

How many users with a long tip and 2 likes for their tip have a high number of fans ?

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


Question: List down the customer names with a disputed order status.

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

List down the customer names with a disputed order status .

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


Question: What are the favorite project types of each of the top 10 donors?

SELECT project_resource_type FROM ( SELECT T1.donor_acctid, T3.project_resource_type FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN resources AS T3 ON T2.projectid = T3.projectid ORDER BY T1.donation_total DESC LIMIT 10 ) GROUP BY project_resource_type ORDER BY COUNT(project_resource_type) DESC LIMIT 1

What are the favorite project types of each of the top 10 donors ?

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


Question: What are the distinct names of customers who have purchased a keyboard?

SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id JOIN products AS T4 ON T3.product_id  =  T4.product_id WHERE T4.product_name  =  "keyboard"

What are the distinct names of customers who have purchased a keyboard ?


Question: What are the ids of goods whose price is above twice the average price of all goods?

SELECT id FROM goods WHERE price  >  (SELECT avg(price) FROM goods)

What are the ids of goods whose price is above twice the average price of all goods ?

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


Question: Show names for all cities where at least three students live.

SELECT T1.city_name FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.city_code HAVING count(*)  >=  3

Show names for all cities where at least three students live .


Question: Show gas station id, location, and manager_name for all gas stations ordered by open year.

SELECT station_id ,  LOCATION ,  manager_name FROM gas_station ORDER BY open_year

Show gas station i d , location , and manager_name for all gas stations ordered by open year .

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


Question: Provide the language used by the people of Belize.

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belize'

Provide the language used by the people of Belize .


Question: What is the word pair that occured the highest amount of times in Addicio? Indicate how many times such word pair occured.

SELECT T3.w1st, T3.w2nd, T3.occurrences FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid INNER JOIN biwords AS T3 ON T2.wid = T3.w1st OR T2.wid = T3.w2nd WHERE T1.title = 'Addicio' ORDER BY T3.occurrences DESC LIMIT 1

What is the word pair that occured the highest amount of times in Addicio ? Indicate how many times such word pair occured .

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


Question: which states do have more than two universities with enrollment smaller than 3000?

SELECT state FROM university WHERE enrollment  <  3000 GROUP BY state HAVING count(*)  >  2

which states do have more than two universities with enrollment smaller than 3000 ?

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


Question: How many universities scored 40 in teaching criteria?

SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T2.score = 40 AND T1.criteria_name = 'Teaching' AND T2.score = 40

How many universities scored 40 in teaching criteria ?

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


Question: Find the total amount of products ordered before 2018-03-17 07:13:53.

SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id  =  t2.order_id WHERE t1.order_date  <  "2018-03-17 07:13:53"

Find the total amount of products ordered before 2018 - 03 - 17 07:13:53 .

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


Question: List all the zip codes in the county of New Castle in Delaware.

SELECT DISTINCT T2.zip_code FROM state AS T1 INNER JOIN country AS T2 ON T1.abbreviation = T2.state WHERE T2.county = 'NEW CASTLE' AND T1.name = 'Delaware'

List all the zip codes in the county of New Castle in Delaware .

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


Question: Find the total number of papers for each affiliation.

SELECT count(DISTINCT T2.paper_id) ,  T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id

Find the total number of papers for each affiliation .


Question: In what percentage of counties has the ABC Read project been launched?

SELECT CAST(SUM(CASE WHEN T2.title LIKE 'ABC Read' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.school_county) FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid

In what percentage of counties has the ABC Read project been launched ?

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


Question: List the countries of universities that scored 70 and below in 2016.

SELECT DISTINCT T3.country_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.score < 70 AND T2.year = 2016

List the countries of universities that scored 70 and below in 2016 .

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


Question: Find the name of services that have been used for more than 2 times in first notification of loss.

SELECT t2.service_name FROM first_notification_of_loss AS t1 JOIN services AS t2 ON t1.service_id  =  t2.service_id GROUP BY t1.service_id HAVING count(*)  >  2

Find the name of services that have been used for more than 2 times in first notification of loss .

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


Question: which gender got the highest average uncertain ratio.

SELECT t1.sex FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex ORDER BY avg(t2.unsure_rate) DESC LIMIT 1

which gender got the highest average uncertain ratio .


Question: The average unemployment ratio of 1995 and 1996, which one has higher percentage?

SELECT DISTINCT IIF(AVG(A13) > AVG(A12), '1996', '1995') FROM district

The average unemployment ratio of 1995 and 1996 , which one has higher percentage ?

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


Question: Give the address of the staff member who has the first name Elsa.

SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id  =  T2.address_id WHERE T1.first_name  =  'Elsa'

Give the address of the staff member who has the first name Elsa .

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


Question: Find the number of rooms that do not have any reservation.

SELECT count(*) FROM rooms WHERE roomid NOT IN (SELECT DISTINCT room FROM reservations)

Find the number of rooms that do not have any reservation .


Question: Mention the name of students who filed for bankruptcy and have never been absent from school.

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name WHERE T1.month = 0

Mention the name of students who filed for bankruptcy and have never been absent from school .

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


Question: How many users were adult?

SELECT COUNT(id) FROM users WHERE Age BETWEEN 19 AND 65


Question: Count the number of documents with the type code BK that correspond to each product id.

SELECT count(*) ,  project_id FROM Documents WHERE document_type_code  =  "BK" GROUP BY project_id

Count the number of documents with the type code BK that correspond to each product i d.

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


Question: What is the most common type of affiliation for institutions?

SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1

What is the most common type of affiliation for institutions ?


Question: Which property had the lowest price requested by the vendor? List the id and the price.

SELECT property_id ,  vendor_requested_price FROM Properties ORDER BY vendor_requested_price LIMIT 1;

Which property had the lowest price requested by the vendor ? List the i d and the price .

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


Question: For each date, return how many distinct customers visited on that day.

SELECT date ,  COUNT (DISTINCT CustomerId) FROM receipts GROUP BY date

For each date , return how many distinct customers visited on that day .

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


Question: Give the codes of document types that have more than 2 corresponding documents.

SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  2

Give the codes of document types that have more than 2 corresponding documents .

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


Question: List the year in which there are more than one festivals.

SELECT YEAR FROM festival_detail GROUP BY YEAR HAVING COUNT(*)  >  1

List the year in which there are more than one festivals .


Question: List all the salary values players received in 2010 and 2001.

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

List all the salary values players received in 2010 and 2001 .

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


Question: Show the most common type code across products.

SELECT Product_Type_Code FROM Products GROUP BY Product_Type_Code ORDER BY COUNT(*) DESC LIMIT 1

Show the most common type code across products .


Question: Find the names of the trains that do not pass any station located in London.

SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id  =  T2.train_id WHERE T1.station_id NOT IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id  =  T4.station_id WHERE t4.location  =  "London")

Find the names of the trains that do not pass any station located in London .

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


Question: How many students are in each department?

SELECT count(*) ,  dept_name FROM student GROUP BY dept_name

How many students are in each department ?


Question: What is the painting count of the artist with the longest life ?

select count(*) from artists as t1 join paintings as t2 on t1.artistid  =  t2.painterid group by t2.painterid order by t1.deathyear - t1.birthyear desc limit 1


Question: What are the names and damage in millions for storms, ordered by their max speeds descending?

SELECT name ,  damage_millions_USD FROM storm ORDER BY max_speed DESC

What are the names and damage in millions for storms , ordered by their max speeds descending ?

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


Question: How many prediction classes with "has" captions are there for image id 3050?

SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 3050 AND T2.PRED_CLASS = 'has'

How many prediction classes with " has " captions are there for image i d 3050 ?

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