Question: What are the label IDs and app IDs of the Chinese Classical Mythology category?

SELECT T1.label_id, T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'Chinese Classical Mythology'

What are the label IDs and app IDs of the Chinese Classical Mythology category ?

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


Question: List the name of products in ascending order of price.

SELECT Product_Name FROM Products ORDER BY Product_Price ASC

List the name of products in ascending order of price .


Question: Which country does the customer with the email "rturbitt2@geocities.jp" from?

SELECT T4.country_name FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.email = 'rturbitT2@geocities.jp'

Which country does the customer with the email " rturbitt2@geocities.jp " from ?

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


Question: What year was account owner number 130 born?

SELECT STRFTIME('%Y', T1.birth_date) FROM client AS T1 INNER JOIN disp AS T3 ON T1.client_id = T3.client_id INNER JOIN account AS T2 ON T3.account_id = T2.account_id WHERE T2.account_id = 130

What year was account owner number 130 born ?


Question: What are the different document ids that are in the subset named 'Best for 2000' or in the collection named 'Best'?

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

What are the different document ids that are in the subset named ' Best for 2000 ' or in the collection named ' Best ' ?

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


Question: Find the name and description of the role with code "MG".

SELECT role_name ,  role_description FROM ROLES WHERE role_code  =  "MG"

Find the name and description of the role with code " MG " .

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


Question: Give the genre of the games released from 2000 to 2002.

SELECT DISTINCT T4.genre_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T1.release_year BETWEEN 2000 AND 2002

Give the genre of the games released from 2000 to 2002 .

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


Question: What is the most popular payment method?

SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1

What is the most popular payment method ?


Question: What are the login names of the students with family name "Ward"?

SELECT login_name FROM Students WHERE family_name  =  "Ward"

What are the login names of the students with family name " Ward " ?

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


Question: Find the names of items whose rank is higher than 3 and whose average rating is above 5.

SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id WHERE T2.rank  >  3 INTERSECT SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id GROUP BY T2.i_id HAVING avg(T2.rating)  >  5

Find the names of items whose rank is higher than 3 and whose average rating is above 5 .

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


Question: Among the patients with hypertension, what is the average of their diastolic blood pressure?

SELECT AVG(T1.VALUE) FROM observations AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN conditions AS T3 ON T2.patient = T3.PATIENT WHERE T3.DESCRIPTION = 'Hypertension' AND T1.DESCRIPTION = 'Diastolic Blood Pressure'

Among the patients with hypertension , what is the average of their diastolic blood pressure ?

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


Question: Find the total amount claimed in the most recently created document.

SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)

Find the total amount claimed in the most recently created document .

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


Question: List the school color of the school that has the largest enrollment.

SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1

List the school color of the school that has the largest enrollment .

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


Question: Give the full name of employee who handled the order id 10280.

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderID = 10280

Give the full name of employee who handled the order i d 10280 .

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


Question: What is the name and salary of the employee with the id 242518965?

SELECT name ,  salary FROM Employee WHERE eid  =  242518965

What is the name and salary of the employee with the i d 242518965 ?

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


Question: Out of all the incidents of domestic violence reported at the ward represented by alderman Walter Burnett Jr., how many were arrested?

SELECT SUM(CASE WHEN T2.arrest = 'TRUE' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T1.alderman_first_name = 'Walter' AND T1.alderman_last_name = 'Burnett' AND alderman_name_suffix = 'Jr.' AND T2.domestic = 'TRUE'

Out of all the incidents of domestic violence reported at the ward represented by alderman Walter Burnett Jr. , how many were arrested ?

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


Question: In February, which city marks the highest temperature?

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id ORDER BY T2.Feb DESC LIMIT 1

In February , which city marks the highest temperature ?


Question: How many unique users have seen tweet with text `Happy New Year to all those AWS instances of ours!`?

SELECT Reach FROM twitter WHERE text = 'Happy New Year to all those AWS instances of ours!'

How many unique users have seen tweet with text ` Happy New Year to all those AWS instances of ours ! ` ?

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


Question: Which region has the most territories?

SELECT T2.RegionID FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID GROUP BY T2.RegionID ORDER BY COUNT(T1.TerritoryID) DESC LIMIT 1


Question: Calculate the average length of employment for employee working in the Research and Development deparment.

SELECT AVG(STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.HireDate)) FROM Employee AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Research and Development'

Calculate the average length of employment for employee working in the Research and Development deparment .

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


Question: Which upper middle income country has the lowest value of CO2 emissions (kt)?

SELECT T1.CountryCode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IncomeGroup = 'Upper middle income' AND T2.IndicatorName = 'CO2 emissions (kt)' ORDER BY T2.Value ASC LIMIT 1

Which upper middle income country has the lowest value of CO2 emissions ( kt ) ?

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


Question: Among the players whose bowling skill is "Legbreak", when was the oldest one of them born?

SELECT MIN(T1.DOB) FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T1.Bowling_skill = T2.Bowling_Id WHERE T2.Bowling_Skill = 'Legbreak'

Among the players whose bowling skill is " Legbreak " , when was the oldest one of them born ?

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


Question: How many wins does the team have whose goaltender have the most number of successfully stopping the other team from scoring during the entire game?

SELECT SUM(W) FROM Goalies GROUP BY tmID ORDER BY SUM(SHO) DESC LIMIT 1

How many wins does the team have whose goaltender have the most number of successfully stopping the other team from scoring during the entire game ?

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


Question: Betweeen 2016 to 2019, which year recorded the highest number of people with mental illness?

SELECT T1.SurveyID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T1.SurveyID BETWEEN 2016 AND 2019 AND T2.questionid = 34 AND T1.AnswerText LIKE 'Yes' GROUP BY T1.SurveyID ORDER BY COUNT(T1.UserID) DESC LIMIT 1

Betweeen 2016 to 2019 , which year recorded the highest number of people with mental illness ?

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


Question: What percentage of households are in "Coroyell" out of its state?

SELECT CAST(SUM(CASE WHEN T1.county = 'CORYELL' THEN T2.households ELSE 0 END) AS REAL) * 100 / SUM(T2.households) FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code

What percentage of households are in " Coroyell " out of its state ?

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


Question: Give the number of stores which opened on the weather station that recorded the fastest average wind speed.

SELECT COUNT(T.store_nbr) FROM ( SELECT DISTINCT store_nbr FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 ) ) T

Give the number of stores which opened on the weather station that recorded the fastest average wind speed .

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


Question: Among the cars introduced in 1977, provide the names and the horse powers of cars from Europe.

SELECT T1.car_name, T1.horsepower FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T2.model_year = 1977 AND T3.country = 'Europe'

Among the cars introduced in 1977 , provide the names and the horse powers of cars from Europe .

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


Question: Calculate the average quantity per sales from sales id 20 to 30.

SELECT AVG(Quantity) FROM Sales WHERE SalesID BETWEEN 20 AND 30

Calculate the average quantity per sales from sales i d 20 to 30 .

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


Question: Find the number and averaged salary of all instructors who are in the department with the highest budget.

SELECT avg(T1.salary) ,  count(*) FROM instructor AS T1 JOIN department AS T2 ON T1.dept_name  =  T2.dept_name ORDER BY T2.budget DESC LIMIT 1

Find the number and averaged salary of all instructors who are in the department with the highest budget .

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


Question: What was the character that Dan Castellaneta did the voice over for and was awarded?

SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award LIKE '%Voice-Over%' AND T1.person = 'Dan Castellaneta';

What was the character that Dan Castellaneta did the voice over for and was awarded ?

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


Question: How many movies were produced by "Eddie Murphy Productions"?

SELECT COUNT(T1.movie_id) FROM movie_company AS T1 INNER JOIN production_company AS T2 ON T1.company_id = T2.company_id WHERE T2.company_name = 'Eddie Murphy Productions'

How many movies were produced by " Eddie Murphy Productions " ?

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


Question: What is the percentage of Japanese cars in the database?

SELECT CAST(SUM(CASE WHEN T2.country = 'Japan' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM production AS T1 INNER JOIN country AS T2 ON T1.country = T2.origin

What is the percentage of Japanese cars in the database ?


Question: What are all the location codes and location names?

SELECT location_code ,  location_name FROM Ref_locations

What are all the location codes and location names ?

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


Question: Show the distinct themes of journals.


Question: Show the meeting ids and the number of staff in each meeting.

SELECT meeting_id ,  count(*) FROM Staff_in_meetings GROUP BY meeting_id

Show the meeting ids and the number of staff in each meeting .

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


Question: What are the minimum, average, and maximum prices across all products?

SELECT min(product_price) ,  avg(product_price) ,  max(product_price) FROM Products

What are the minimum , average , and maximum prices across all products ?


Question: Show the credit card number of Lisa Ling.

SELECT DISTINCT T2.CreditCardNumber FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Lisa' AND T1.Last = 'Ling'

Show the credit card number of Lisa Ling .

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


Question: List the distinct subject code of exams in ascending alphabetical order .

select distinct subject_code from exams order by subject_code asc

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


Question: Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa.

SELECT payment_date FROM payment WHERE amount  >  10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.first_name  =  'Elsa'

Find all the payment dates for the payments with an amount larger than 10 and the payments handled by a staff person with the first name Elsa .

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


Question: What are the tracks that Dean Peeters bought?

SELECT T1.name FROM tracks AS T1 JOIN invoice_lines AS T2 ON T1.id = T2.track_id JOIN invoices AS T3 ON T3.id = T2.invoice_id JOIN customers AS T4 ON T4.id = T3.customer_id WHERE T4.first_name = "Daan" AND T4.last_name = "Peeters";

What are the tracks that Dean Peeters bought ?


Question: Among the players who have won the award of Rookie of the year, what is the height of the tallest player?

SELECT T1.height FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' ORDER BY T1.height DESC LIMIT 1

Among the players who have won the award of Rookie of the year , what is the height of the tallest player ?

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


Question: Where country does Baghdad belongs to?

SELECT Name FROM country WHERE Province = 'Baghdad'


Question: Is molecule TR124 carcinogenic?

SELECT T.label FROM molecule AS T WHERE T.molecule_id = 'TR124'


Question: What is the average difference in the y coordinate of 2 object samples with the relation "parked on" in image no.1?

SELECT CAST(SUM(T3.Y) AS REAL) / COUNT(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE NULL END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.OBJ1_SAMPLE_ID = T3.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID

What is the average difference in the y coordinate of 2 object samples with the relation " parked on " in image no.1 ?

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


Question: Return the colleges that have players who play the Midfielder position, as well as players who play the Defender position.

SELECT College FROM match_season WHERE POSITION  =  "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION  =  "Defender"

Return the colleges that have players who play the Midfielder position , as well as players who play the Defender position .

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


Question: What are the first and last names for all customers?

SELECT first_name ,  last_name FROM Customers;

What are the first and last names for all customers ?

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


Question: Find the state which has the most number of customers.

SELECT state FROM bank GROUP BY state ORDER BY sum(no_of_customers) DESC LIMIT 1

Find the state which has the most number of customers .

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


Question: What roles have not been credited at the end of the episodes?

SELECT DISTINCT role FROM Credit WHERE credited = 'false'

What roles have not been credited at the end of the episodes ?


Question: Which crytocurrency had a bigger number of coins circulating in the market and in the general public's hands on 2013/4/28, Bitcoin or Litecoin?

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name IN ('Bitcoin', 'Litecoin') ORDER BY T2.circulating_supply DESC LIMIT 1

Which crytocurrency had a bigger number of coins circulating in the market and in the general public 's hands on 2013/4/28 , Bitcoin or Litecoin ?

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


Question: On the menu with the most dishes, how many dishes were there on its second page?

SELECT COUNT(T1.dish_id) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T2.page_number = 2 GROUP BY T3.name ORDER BY T3.dish_count DESC LIMIT 1

On the menu with the most dishes , how many dishes were there on its second page ?

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


Question: What percentage of projects in the City of Santa Barbara are in suburban metro?

SELECT CAST(SUM(CASE WHEN school_metro = 'suburban' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(projectid) FROM projects WHERE school_city = 'Santa Barbara'

What percentage of projects in the City of Santa Barbara are in suburban metro ?

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


Question: Please list the titles of any three action films.

SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Action' LIMIT 3

Please list the titles of any three action films .


Question: List point level of inspections with no fine.

SELECT DISTINCT T1.point_level FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.fine = 0

List point level of inspections with no fine .

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


Question: What care plans have been received by Mrs. Elly Koss during year 1970?

SELECT T2.DESCRIPTION FROM patients AS T1 INNER JOIN careplans AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND strftime('%Y', T2.START) = '2013'

What care plans have been received by Mrs. Elly Koss during year 1970 ?

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


Question: What are the achievement detail and the type description of each achievements?

SELECT T1.achievement_details ,  T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code  =  T2.achievement_type_code

What are the achievement detail and the type description of each achievements ?

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


Question: On what date did the customer with the lowest credit limit serviced by sales representative Barry Jones make payments for his/her orders?

SELECT T3.paymentDate FROM employees AS T1 INNER JOIN customers AS T2 ON T1.employeeNumber = T2.salesRepEmployeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber WHERE T1.firstName = 'Barry' AND T1.lastName = 'Jones' AND T1.jobTitle = 'Sales Rep' ORDER BY T2.creditLimit ASC LIMIT 1

On what date did the customer with the lowest credit limit serviced by sales representative Barry Jones make payments for his / her orders ?

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


Question: Among the superheroes with blue eyes, how many of them have the super power of "Agility"?

SELECT COUNT(T1.id) 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 INNER JOIN colour AS T4 ON T1.eye_colour_id = T4.id WHERE T3.power_name = 'Agility' AND T4.colour = 'Blue'

Among the superheroes with blue eyes , how many of them have the super power of " Agility " ?

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


Question: Among the residential areas with the bad alias "Internal Revenue Service", how many of them are in the Eastern time zone?

SELECT COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN avoid AS T2 ON T1.zip_code = T2.zip_code WHERE T2.bad_alias = 'Internal Revenue Service' AND T1.time_zone = 'Eastern'

Among the residential areas with the bad alias " Internal Revenue Service " , how many of them are in the Eastern time zone ?

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


Question: Please list the employees who have more than 20 vacations hours and wish to receive e-mail promotions.

SELECT T1.BusinessEntityID FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1 AND T1.VacationHours > 20

Please list the employees who have more than 20 vacations hours and wish to receive e - mail promotions .

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


Question: Find the tourist attractions that have parking or shopping as their feature details. What are the names of the attractions?

SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'

Find the tourist attractions that have parking or shopping as their feature details . What are the names of the attractions ?

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


Question: Give the average number of working horses on farms with more than 5000 total horses.

SELECT avg(Working_Horses) FROM farm WHERE Total_Horses  >  5000

Give the average number of working horses on farms with more than 5000 total horses .

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


Question: Find the name of the airports located in Cuba or Argentina.

SELECT name FROM airports WHERE country  =  'Cuba' OR country  =  'Argentina'

Find the name of the airports located in Cuba or Argentina .

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


Question: Find the maximum age of all the students.

Find the maximum age of all the students .


Question: How many author published papers in the 'IEEE Computer' journal?

SELECT COUNT(T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T3.FullName = 'IEEE Computer'

How many author published papers in the ' IEEE Computer ' journal ?

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


Question: How many books written by Akira Watanabe are available on Gravity?

SELECT COUNT(*) FROM author AS T1 INNER JOIN book_author AS T2 ON T1.author_id = T2.author_id WHERE T1.author_name = 'Akira Watanabe'

How many books written by Akira Watanabe are available on Gravity ?


Question: Give the FBI code for the crime described by "The killing of one human being by another."

SELECT fbi_code_no FROM FBI_Code WHERE description = 'The killing of one human being by another.'

Give the FBI code for the crime described by " The killing of one human being by another . "

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


Question: How many of the legislators are male?

SELECT COUNT(*) FROM current WHERE gender_bio = 'M'


Question: What is the inventory ID of Karen Jackson?

SELECT T2.inventory_id FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'KAREN' AND T1.last_name = 'JACKSON'

What is the inventory ID of Karen Jackson ?

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


Question: What is the customer's address for the shipment with ship ID 1117?

SELECT T2.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T1.ship_id = '1117'

What is the customer 's address for the shipment with ship ID 1117 ?

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


Question: What is the title, phone and hire date of Nancy Edwards?

SELECT title ,  phone ,  hire_date FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";

What is the title , phone and hire date of Nancy Edwards ?

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


Question: Show the title and director for all films.

Show the title and director for all films .


Question: Among the female clients that age between 20 to 40, list the date when their complaints were received.

SELECT DISTINCT T3.`Date received` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID INNER JOIN callcenterlogs AS T3 ON T2.`Complaint ID` = T3.`Complaint ID` WHERE T1.age BETWEEN 20 AND 40 AND T1.sex = 'Female'

Among the female clients that age between 20 to 40 , list the date when their complaints were received .

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


Question: What is the care plan for the patient with social security number 999-15-3685?

SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ssn = '999-15-3685'

What is the care plan for the patient with social security number 999 - 15 - 3685 ?

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


Question: What type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non-essential?

SELECT T2.Type FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Function = 'TRANSCRIPTION' AND T1.Essential = 'Non-Essential'

What type of interactions occurs in genes whose function is cellular transport and transport medicine and are classified as non - essential ?

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


Question: Show all sic codes and the number of clients with each code.

SELECT sic_code ,  count(*) FROM Clients GROUP BY sic_code

Show all sic codes and the number of clients with each code .

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


Question: What are the maximum and average height of the mountains?

SELECT max(height) ,  avg(height) FROM mountain

What are the maximum and average height of the mountains ?


Question: What is all the product data, as well as  each product's manufacturer?

SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code

What is all the product data , as well as each product 's manufacturer ?

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


Question: What are the id of each employee and the number of document destroyed by that employee?

SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID

What are the i d of each employee and the number of document destroyed by that employee ?

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


Question: On average, how many scenes are there in each of the comedy works written by Shakespeare?

SELECT CAST(SUM(T2.Scene) AS REAL) / COUNT(T1.id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.GenreType = 'Comedy'

On average , how many scenes are there in each of the comedy works written by Shakespeare ?

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


Question: List in alphabetic order all different amenities.

SELECT amenity_name FROM dorm_amenity ORDER BY amenity_name

List in alphabetic order all different amenities .


Question: How many cars running east have double-sided tail cars?

SELECT COUNT(T1.id) FROM trains AS T1 INNER JOIN cars AS T2 ON T1.id = T2.train_id INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T3 ON T1.id = T3.train_id WHERE T1.direction = 'east' AND T2.position = T3.trailPosi AND T2.sides = 'double'

How many cars running east have double - sided tail cars ?

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


Question: Lists the last name of all clients who made a PS-type complaint and were served by TOVA.

SELECT t1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'PS' AND T2.server = 'TOVA'

Lists the last name of all clients who made a PS - type complaint and were served by TOVA .

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


Question: What is the donation message for donation ID a84dace1ff716f6f0c7af8ef9090a5d5?

SELECT donation_message FROM donations WHERE donationid = 'a84dace1ff716f6f0c7af8ef9090a5d5'

What is the donation message for donation ID a84dace1ff716f6f0c7af8ef9090a5d5 ?

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


Question: List all the dates of enrollment and completion of students.

SELECT date_of_enrolment ,  date_of_completion FROM Student_Course_Enrolment

List all the dates of enrollment and completion of students .

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


Question: Name all stores and its sales representative in France territory.

SELECT T3.Name, T4.FirstName, T4.LastName FROM SalesTerritory AS T1 INNER JOIN Customer AS T2 ON T1.TerritoryID = T2.TerritoryID INNER JOIN Store AS T3 ON T2.StoreID = T3.BusinessEntityID INNER JOIN Person AS T4 ON T2.PersonID = T4.BusinessEntityID WHERE T1.Name = 'France'

Name all stores and its sales representative in France territory .

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


Question: What are the names of customers who do not have any policies?

SELECT customer_details FROM customers EXCEPT SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id

What are the names of customers who do not have any policies ?


Question: What is the name of the county with the greatest population?

SELECT Name FROM county_public_safety ORDER BY Population DESC LIMIT 1

What is the name of the county with the greatest population ?


Question: Please indicate total order quantity of product Candles and calculate the percentage of such product among all the orders.

SELECT SUM(CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END), CAST(SUM(CASE WHEN T1.`Product Name` = 'Candles' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID

Please indicate total order quantity of product Candles and calculate the percentage of such product among all the orders .

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


Question: What are the response received dates for the documents described as 'Regular' or granted with more than 100?

SELECT T1.response_received_date FROM Documents AS T1 JOIN Document_Types AS T2 ON T1.document_type_code  =  T2.document_type_code JOIN Grants AS T3 ON T1.grant_id  =  T3.grant_id WHERE T2.document_description  =  'Regular' OR T3.grant_amount  >  100

What are the response received dates for the documents described as ' Regular ' or granted with more than 100 ?

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


Question: How many students are over 18 and do not have allergy to food type or animal type?

SELECT count(*) FROM Student WHERE age  >  18 AND StuID NOT IN ( SELECT StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "food" OR T2.allergytype  =  "animal")

How many students are over 18 and do not have allergy to food type or animal type ?

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


Question: Count the number of planes flown by pilots older than 40.

SELECT count(plane_name) FROM pilotskills WHERE age  >  40

Count the number of planes flown by pilots older than 40 .

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


Question: Find the average hours of all projects.

Find the average hours of all projects .


Question: What are the stadiums of institutions in descending order of the capacity.

SELECT Stadium FROM institution ORDER BY Capacity DESC

What are the stadiums of institutions in descending order of the capacity .

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


Question: Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points?

SELECT DISTINCT T1.forename FROM drivers AS T1 JOIN driverstandings AS T2 ON T1.driverid = T2.driverid WHERE T2.position = 1 AND T2.wins = 1 AND T2.points > 20

Find all the forenames of distinct drivers who won in position 1 as driver standing and had more than 20 points ?

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


Question: How many questions in 2014's survey had more than 200 answers?

SELECT COUNT(QuestionID) FROM Answer WHERE SurveyID LIKE 2014 GROUP BY QuestionID ORDER BY COUNT(QuestionID) > 200 LIMIT 1

How many questions in 2014 's survey had more than 200 answers ?

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


Question: Give the full name of the artist who lived the longest.

SELECT lname ,  fname FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1

Give the full name of the artist who lived the longest .


Question: What is the Crankarm product's net profit?

SELECT T2.LastReceiptCost - T2.StandardPrice FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name LIKE '%Crankarm%'

What is the Crankarm product 's net profit ?


Question: For the patient who has the highest Ig A within the normal range, what is his or her diagnosis?

SELECT patientData.Diagnosis FROM Patient AS patientData INNER JOIN Laboratory AS labData ON patientData.ID = labData.ID WHERE labData.IGA BETWEEN 80 AND 500 ORDER BY labData.IGA DESC LIMIT 1

For the patient who has the highest Ig A within the normal range , what is his or her diagnosis ?

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


Question: What are the titles of films that do not have a film market estimation?

SELECT Title FROM film WHERE Film_ID NOT IN (SELECT Film_ID FROM film_market_estimation)

What are the titles of films that do not have a film market estimation ?

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


Question: Which negatively correlated, genetically interacting genes are non-essential? What percentage do they represent with respect to those that are essential?

SELECT CAST(COUNT(T1.GeneID) AS REAL) * 100 / ( SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 ) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr < 0 AND T1.Essential = 'Non-Essential'

Which negatively correlated , genetically interacting genes are non - essential ? What percentage do they represent with respect to those that are essential ?

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


Question: What is the first name and age of the artist who lived the longest?

SELECT fname  ,  deathYear - birthYear FROM artists ORDER BY deathYear - birthYear DESC LIMIT 1

What is the first name and age of the artist who lived the longest ?

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


Question: How much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the Clothing category?

SELECT (MAX(T1.ListPrice) - MIN(T1.ListPrice)) * 100 / MIN(T1.ListPrice) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID INNER JOIN ProductCategory AS T3 ON T2.ProductCategoryID = T3.ProductCategoryID WHERE T3.Name = 'Clothing'

How much more expensive in percentage is the product with the highest selling price from the product with the lowest selling price in the Clothing category ?

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


Question: What are the last updated date for English film titles that were released in 2006?

SELECT DISTINCT T1.last_update FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T2.`name` = 'English' AND T1.release_year = 2006

What are the last updated date for English film titles that were released in 2006 ?

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


Question: What is the highest point highest point of Per Mars in the draft year?

SELECT T1.P FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Per Mars' ORDER BY T1.P DESC LIMIT 1

What is the highest point highest point of Per Mars in the draft year ?

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


Question: What age group is the most using SM-T2558 model phones?

SELECT T.`group` FROM ( SELECT T1.`group`, COUNT(T1.device_id) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'SM-T2558' GROUP BY T1.`group` ) AS T ORDER BY T.num DESC LIMIT 1

What age group is the most using SM - T2558 model phones ?

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


Question: Show the residences that have both a player of gender "M" and a player of gender "F".

SELECT Residence FROM player WHERE gender  =  "M" INTERSECT SELECT Residence FROM player WHERE gender  =  "F"

Show the residences that have both a player of gender " M " and a player of gender " F " .

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


Question: For the employee who has been hired the latest, what is his or her pay rate?

SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.HireDate DESC LIMIT 1

For the employee who has been hired the latest , what is his or her pay rate ?

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


Question: What are the names of modern rooms that have a base price lower than $160 and two beds.

SELECT roomName FROM Rooms WHERE basePrice  <  160 AND beds =  2 AND decor  =  'modern';

What are the names of modern rooms that have a base price lower than $ 160 and two beds .

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


Question: Please list the IDs of the orders made by Aimee Bixby with more than 3 kinds of products ordered.

SELECT DISTINCT T2.`Order ID` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' GROUP BY T2.`Product ID` HAVING COUNT(T2.`Product ID`) > 3

Please list the IDs of the orders made by Aimee Bixby with more than 3 kinds of products ordered .

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


Question: How many actors with the surname Kilmer are there?

SELECT COUNT(actor_id) FROM actor WHERE last_name = 'Kilmer'

How many actors with the surname Kilmer are there ?


Question: how many ships are there?


Question: What are the names of customers who use the least common payment method?

SELECT customer_name FROM Customers WHERE payment_method_code  =  ( SELECT payment_method_code FROM Customers GROUP BY payment_method_code ORDER BY count(*) ASC LIMIT 1)

What are the names of customers who use the least common payment method ?

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


Question: How many of the employees have the last name "Ringer" ?

SELECT COUNT(LastName) FROM Employees WHERE LastName = 'Ringer'

How many of the employees have the last name " Ringer " ?

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


Question: Find the first names of students whose first names contain letter "a".

SELECT DISTINCT Fname FROM STUDENT WHERE Fname LIKE '%a%'

Find the first names of students whose first names contain letter " a " .

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


Question: What is the name of the genre with the most number of video games?

SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T2.id = T1.genre_id GROUP BY T2.genre_name ORDER BY COUNT(T1.genre_id) DESC LIMIT 1

What is the name of the genre with the most number of video games ?

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


Question: Where in New York can you locate the brewery that makes the bitterest beer? List both the brewery's name and the name of the city.

SELECT T2.name, T2.city FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.state = 'NY' ORDER BY T1.ibu DESC LIMIT 1

Where in New York can you locate the brewery that makes the bitterest beer ? List both the brewery 's name and the name of the city .

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


Question: Show each county along with the number of schools and total enrollment in each county.

SELECT county ,  count(*) ,  sum(enrollment) FROM school GROUP BY county

Show each county along with the number of schools and total enrollment in each county .

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


Question: How many employees in the Information Service department work the evening shift?

SELECT COUNT(T2.BusinessEntityID) FROM Department AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.DepartmentID = T2.DepartmentID INNER JOIN Shift AS T3 ON T2.ShiftId = T3.ShiftId WHERE T1.Name = 'Information Services' AND T3.Name = 'Evening'

How many employees in the Information Service department work the evening shift ?

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


Question: How many publishers have the word "book" in their name?

SELECT COUNT(*) FROM publisher WHERE publisher_name LIKE '%book%'

How many publishers have the word " book " in their name ?

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


Question: What was the inspection type when El Aji Peruvian Restaurant got highest inspection score?

SELECT T1.type FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'El Aji Peruvian Restaurant' ORDER BY T1.score DESC LIMIT 1

What was the inspection type when El Aji Peruvian Restaurant got highest inspection score ?

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


Question: What are the ids of the students who attended courses in the statistics department in order of attendance date.

SELECT T2.student_id FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.date_of_attendance

What are the ids of the students who attended courses in the statistics department in order of attendance date .

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


Question: In which year did the user who gave the most number of "5" star reviews join the Yelp?

SELECT T2.user_yelping_since_year FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_stars = 5 GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.review_stars) DESC LIMIT 1

In which year did the user who gave the most number of " 5 " star reviews join the Yelp ?

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


Question: Please list any three episodes that have an excellent rating.

SELECT title FROM Episode WHERE rating BETWEEN 7 AND 10 LIMIT 3;

Please list any three episodes that have an excellent rating .


Question: What movie is playing at both the Odeon and Imperial theater?

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

What movie is playing at both the Odeon and Imperial theater ?

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


Question: Which restaurants have highest rating? List the restaurant name and its rating.

SELECT ResName , Rating FROM Restaurant ORDER BY Rating DESC LIMIT 1;

Which restaurants have highest rating ? List the restaurant name and its rating .

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


Question: From which country is the tweet with the most likes posted?

SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID ORDER BY T1.Likes DESC LIMIT 1

From which country is the tweet with the most likes posted ?

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


Question: What are the id of students who registered course 301?

SELECT student_id FROM student_course_attendance WHERE course_id  =  301

What are the i d of students who registered course 301 ?

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


Question: What is the invoice id, status code, and details for the invoice with most number of payments.

SELECT T1.invoice_id ,  T2.invoice_status ,  T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1

What is the invoice i d , status code , and details for the invoice with most number of payments .

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


Question: What is the number of departments in Division "AS"?

SELECT count(*) FROM DEPARTMENT WHERE Division  =  "AS"

What is the number of departments in Division " AS " ?

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


Question: How many students participated in tryouts for each college by descennding count?

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

How many students participated in tryouts for each college by descennding count ?


Question: Compute the total order quantity for Uncle Bob's Organic Dried Pears so far.

SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName LIKE 'Uncle Bob%s Organic Dried Pears'

Compute the total order quantity for Uncle Bob 's Organic Dried Pears so far .

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


Question: What are the names and salaries of instructors who advises students in the History department?

SELECT T2.name ,  T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'History'

What are the names and salaries of instructors who advises students in the History department ?

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


Question: What country declared its independence in 1994?

SELECT Name FROM Country WHERE IndepYear = 1994

What country declared its independence in 1994 ?


Question: List names of all authors who have more than 50 papers.

SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  >  50

List names of all authors who have more than 50 papers .

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


Question: How many papers are published in year 2009 by Columbia University?

SELECT count(DISTINCT T1.paper_id) FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University" AND T1.year  =  2009

How many papers are published in year 2009 by Columbia University ?

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


Question: Which minister left office the latest?

SELECT minister FROM party ORDER BY left_office DESC LIMIT 1


Question: Please list the players who received the "Most Valuable Player" award in the NBA league after the year of 1990, along with their IDs.

SELECT playerID FROM awards_players WHERE year > 1990 AND award = 'Most Valuable Player' AND lgID = 'NBA'

Please list the players who received the " Most Valuable Player " award in the NBA league after the year of 1990 , along with their IDs .

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


Question: The song "Once Upon a Dream" is associated with the movie directed by whom?

SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T1.song = 'Once Upon a Dream'

The song " Once Upon a Dream " is associated with the movie directed by whom ?

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


Question: List the name of all different customers who have some loan sorted by their total loan amount.

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

List the name of all different customers who have some loan sorted by their total loan amount .

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


Question: What is the level of the course with the most number of teachers?

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

What is the level of the course with the most number of teachers ?


Question: What is the total amount of moeny paid by the customer Carole Bernhard?

SELECT sum(T1.amount_payment) FROM Customer_Payments AS T1 JOIN Customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = "Carole" AND T2.last_name = "Bernhard"

What is the total amount of moeny paid by the customer Carole Bernhard ?

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


Question: What is the percentage of employees who work the night shift?

SELECT CAST(SUM(CASE WHEN T1.Name = 'Night' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.BusinessEntityID) FROM Shift AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.ShiftId = T2.ShiftId

What is the percentage of employees who work the night shift ?


Question: What are the students ids of students who have more than one allergy?

SELECT StuID FROM Has_allergy GROUP BY StuID HAVING count(*)  >=  2

What are the students ids of students who have more than one allergy ?

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


Question: What is the total value of Argentum coined traded in the past 24 hours on 2016/10/11.

SELECT T2.volume_24h FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Argentum' AND T2.date = '2016-10-11'

What is the total value of Argentum coined traded in the past 24 hours on 2016/10/11 .

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


Question: Return the maximum and minimum number of cities across all markets.

SELECT max(Number_cities) ,  min(Number_cities) FROM market

Return the maximum and minimum number of cities across all markets .

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


Question: Provide the number of staff at the University of Auckland in 2015.

SELECT CAST(SUM(T1.num_students) AS REAL) / SUM(T1.student_staff_ratio) FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'University of Auckland' AND T1.year = 2015

Provide the number of staff at the University of Auckland in 2015 .

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


Question: What are the average and total capacities across all warehouses?

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

What are the average and total capacities across all warehouses ?


Question: Calculate the total price of items for menu with ID 12882.

SELECT SUM(T2.price) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id WHERE T1.menu_id = 12882

Calculate the total price of items for menu with ID 12882 .

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


Question: What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints?

SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1

What are the emails of customers who have filed complaints on the product which has had the greatest number of complaints ?

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


Question: State the object class of sample no.10 of image no.2320341.

SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2320341 AND T2.OBJ_SAMPLE_ID = 10

State the object class of sample no.10 of image no.2320341 .

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


Question: List all the ingredients of Apricot Yogurt Parfaits.

SELECT T3.name, T3.category 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 = 'Apricot Yogurt Parfaits'

List all the ingredients of Apricot Yogurt Parfaits .

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


Question: What is Jeannot Szwarc's most popular movie and what is its average rating score?

SELECT T2.movie_title, AVG(T1.rating_score) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.director_name = 'Jeannot Szwarc' ORDER BY T2.movie_popularity DESC LIMIT 1

What is Jeannot Szwarc 's most popular movie and what is its average rating score ?

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


Question: For the problem with id 10, return the ids and dates of its problem logs.

SELECT problem_log_id ,  log_entry_date FROM problem_log WHERE problem_id = 10

For the problem with i d 10 , return the ids and dates of its problem logs .

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


Question: Provide the price of the only Toyota Corona hardtop in the database.

SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'toyota corona hardtop'

Provide the price of the only Toyota Corona hardtop in the database .

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


Question: Give the budget type code that is most common among documents with expenses.

SELECT budget_type_code FROM Documents_with_expenses GROUP BY budget_type_code ORDER BY count(*) DESC LIMIT 1

Give the budget type code that is most common among documents with expenses .

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


Question: How many checks were issued by Euro+ Shopping Channel in the year 2004?

SELECT COUNT(T1.checkNumber) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE customerName = 'Euro+ Shopping Channel' AND STRFTIME('%Y', T1.paymentDate) = '2004'

How many checks were issued by Euro+ Shopping Channel in the year 2004 ?

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


Question: What are the names of people who are shorter than average?

SELECT name FROM people WHERE height  <  (SELECT avg(height) FROM people)

What are the names of people who are shorter than average ?


Question: What are the states or counties of the address of the stores with marketing region code "CA"?

SELECT T1.State_County FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Marketing_Region_Code  =  "CA"

What are the states or counties of the address of the stores with marketing region code " CA " ?

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


Question: What is the genre of the movie title which was well-received by the audiences but made the lowest revenue?

SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id ORDER BY T1.vote_average DESC, T1.revenue LIMIT 1

What is the genre of the movie title which was well - received by the audiences but made the lowest revenue ?

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


Question: List the user ids and ages who gave the rate 2 to the movie No. 2409051.

SELECT T1.userid, T1.age FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid WHERE T2.movieid = '2409051' AND T2.rating = 2

List the user ids and ages who gave the rate 2 to the movie No . 2409051 .

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


Question: Describe the students' full names and GPAs under the supervision of the most popular professor.

SELECT T3.f_name, T3.l_name, T3.gpa FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id ORDER BY T1.popularity DESC LIMIT 1

Describe the students ' full names and GPAs under the supervision of the most popular professor .

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


Question: what are the names of the ships ordered by ascending tonnage?

SELECT Name FROM ship ORDER BY Tonnage ASC

what are the names of the ships ordered by ascending tonnage ?

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


Question: Among the restaurants being inspected in 2016, how many of them are in San Francisco?

SELECT COUNT(DISTINCT T2.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2016' AND T2.city IN ('San Francisco', 'SAN FRANCISCO', 'SF', 'S.F.')

Among the restaurants being inspected in 2016 , how many of them are in San Francisco ?

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


Question: Between 1970 to 1980, how many movies with a popularity of more than 11,000 were released?

SELECT COUNT(movie_id) FROM movies WHERE movie_release_year BETWEEN '1970' AND '1980' AND movie_popularity > 11000

Between 1970 to 1980 , how many movies with a popularity of more than 11,000 were released ?

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


Question: What are the names of all cities and states?

SELECT town_city FROM addresses UNION SELECT state_province_county FROM addresses

What are the names of all cities and states ?


Question: For how long was Elly Koss required to take Acetaminophen?

SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%'

For how long was Elly Koss required to take Acetaminophen ?

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


Question: What percentage of restaurants are from the Bay Area?

SELECT CAST(SUM(IIF(T1.region = 'bay area', 1, 0)) AS REAL) * 100 / COUNT(T2.id_restaurant) FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city

What percentage of restaurants are from the Bay Area ?


Question: How many characters are there in Hamlet?

SELECT COUNT(DISTINCT T3.character_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 WHERE T1.Title = 'Hamlet'

How many characters are there in Hamlet ?


Question: List the venues of debates in ascending order of the number of audience.

SELECT Venue FROM debate ORDER BY Num_of_Audience ASC

List the venues of debates in ascending order of the number of audience .

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


Question: How many films did a customer named Francis Sikes rent?

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

How many films did a customer named Francis Sikes rent ?

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


Question: Which team does Andreas Jamtin belong to?

SELECT DISTINCT T1.TEAM FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.PlayerName = 'Andreas Jamtin'

Which team does Andreas Jamtin belong to ?


Question: For each city, find the number and average age of pilots who have a plane.

SELECT count(T1.pilot_name) ,  avg(T1.age) ,  T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name GROUP BY T2.location

For each city , find the number and average age of pilots who have a plane .

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


Question: Return the most common type of affiliation across all institutions.

SELECT Affiliation FROM institution GROUP BY Affiliation ORDER BY COUNT(*) DESC LIMIT 1

Return the most common type of affiliation across all institutions .


Question: List the full name of players who are born outside USA.

SELECT firstName, middleName, lastName FROM players WHERE birthCountry != 'USA'

List the full name of players who are born outside USA .

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


Question: Tell the number of 4-year public schools in UT whose graduation rate exceeds the average for the state.

SELECT COUNT(DISTINCT T1.chronname) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'UT' AND T1.level = '4-year' AND T1.control = 'Public' AND T1.awards_per_value > T1.awards_per_state_value

Tell the number of 4 - year public schools in UT whose graduation rate exceeds the average for the state .

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


Question: Which chromoly steel product model has AdventureWorks saved in English?

SELECT T1.ProductModelID FROM ProductModelProductDescriptionCulture AS T1 INNER JOIN Culture AS T2 USING (cultureid) INNER JOIN ProductDescription AS T3 USING (productdescriptionid) WHERE T3.Description LIKE 'Chromoly steel%' AND T2.Name = 'English'

Which chromoly steel product model has AdventureWorks saved in English ?

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


Question: There was a loan approved in 1994/8/25, where was that account opened, give the district Id of the branch.

SELECT T1.district_id FROM account AS T1 INNER JOIN loan AS T2 ON T1.account_id = T2.account_id WHERE T2.date = '1994-08-25'

There was a loan approved in 1994/8/25 , where was that account opened , give the district I d of the branch .

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


Question: What is the superpowers of the superhero has Helen Parr as their full name?

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.full_name = 'Helen Parr'

What is the superpowers of the superhero has Helen Parr as their full name ?

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


Question: How many courses have the highest difficulty?

SELECT COUNT(course_id) FROM course WHERE diff = 5

How many courses have the highest difficulty ?


Question: Which dish lasted longer, Anchovies or Fresh lobsters in every style?

SELECT CASE WHEN SUM(CASE WHEN name = 'Anchovies' THEN last_appeared - first_appeared ELSE 0 END) - SUM(CASE WHEN name = 'Fresh lobsters in every style' THEN last_appeared - first_appeared ELSE 0 END) > 0 THEN 'Anchovies' ELSE 'Fresh lobsters in every style' END FROM Dish WHERE name IN ('Fresh lobsters in every style', 'Anchovies')

Which dish lasted longer , Anchovies or Fresh lobsters in every style ?

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


Question: Please list the donation messages of the donations for the projects created by a teacher working in a public magnet school in Brooklyn.

SELECT T2.donation_message FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.school_city = 'Brooklyn' AND T1.school_magnet = 't'

Please list the donation messages of the donations for the projects created by a teacher working in a public magnet school in Brooklyn .

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


Question: List the software platform shared by the greatest number of devices.

SELECT Software_Platform FROM device GROUP BY Software_Platform ORDER BY COUNT(*) DESC LIMIT 1

List the software platform shared by the greatest number of devices .

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


Question: List the top 10 players' names whose heights are above 180 in descending order of average heading accuracy.

SELECT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 180 GROUP BY t1.id ORDER BY CAST(SUM(t2.heading_accuracy) AS REAL) / COUNT(t2.`player_fifa_api_id`) DESC LIMIT 10

List the top 10 players ' names whose heights are above 180 in descending order of average heading accuracy .

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


Question: Give the religion of the legislator whose YouTube name is MaxineWaters.

SELECT T2.religion_bio FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T1.youtube = 'MaxineWaters'

Give the religion of the legislator whose YouTube name is MaxineWaters .

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


Question: How many movies were released between 1937 and 1950?

SELECT COUNT(movie_title) FROM characters WHERE SUBSTR(release_date, LENGTH(release_date) - 1, LENGTH(release_date)) BETWEEN '37' AND '50'

How many movies were released between 1937 and 1950 ?

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


Question: Find the number of reviews.


Question: Among the teenager clients who use Google account and Microsoft account, which group of client is more than the other?

SELECT CASE WHEN SUM(CASE WHEN email LIKE '%@gmail.com' THEN 1 ELSE 0 END) > SUM(CASE WHEN email LIKE '%@outlook.com' THEN 1 ELSE 0 END) THEN 'Google account' ELSE 'Microsoft account' END FROM client WHERE age BETWEEN 13 AND 19

Among the teenager clients who use Google account and Microsoft account , which group of client is more than the other ?

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


Question: What is the total point count of the youngest gymnast?

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

What is the total point count of the youngest gymnast ?

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


Question: What is the opening time of the active businesses in Glendale that have a medium review count.

SELECT DISTINCT T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city = 'Glendale' AND T1.review_count = 'Medium' AND T1.active = 'true'

What is the opening time of the active businesses in Glendale that have a medium review count .

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


Question: What is the total donation amount for the project 'Engaging Young Readers with a Leveled Classroom Library'?

SELECT SUM(T2.donation_to_project) + SUM(T2.donation_optional_support) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Engaging Young Readers with a Leveled Classroom Library '

What is the total donation amount for the project ' Engaging Young Readers with a Leveled Classroom Library ' ?

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


Question: State the name of vendor that supplies book resources to all school with literacy subject as their primary focus.

SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject LIKE 'Literacy'

State the name of vendor that supplies book resources to all school with literacy subject as their primary focus .

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


Question: State the number of disabled students who have payment due.

SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.bool = 'neg'

State the number of disabled students who have payment due .

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


Question: What is the series code for number of infant deaths in year 1965 for the country whose full name is Islamic State of Afghanistan?

SELECT DISTINCT T3.Seriescode FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN CountryNotes AS T3 ON T2.CountryCode = T3.Countrycode WHERE T2.IndicatorName = 'Number of infant deaths' AND T1.LongName = 'Islamic State of Afghanistan' AND T2.Year = 1965

What is the series code for number of infant deaths in year 1965 for the country whose full name is Islamic State of Afghanistan ?

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


Question: Find the names of students who have taken any course in the fall semester of year 2003.

SELECT name FROM student WHERE id IN (SELECT id FROM takes WHERE semester  =  'Fall' AND YEAR  =  2003)

Find the names of students who have taken any course in the fall semester of year 2003 .

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


Question: Select the average price of each manufacturer's products, showing only the manufacturer's code.

SELECT AVG(Price) ,  Manufacturer FROM Products GROUP BY Manufacturer

Select the average price of each manufacturer 's products , showing only the manufacturer 's code .

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


Question: Find the countries in south Asia which are in the low-income group. What is the source of their recent income and expenditure data? List it alongside the table name of the countries.

SELECT TableName, SourceOfMostRecentIncomeAndExpenditureData FROM Country WHERE Region = 'South Asia' AND IncomeGroup = 'Low income'

Find the countries in south Asia which are in the low - income group . What is the source of their recent income and expenditure data ? List it alongside the table name of the countries .

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


Question: What is the comment of the product "burlywood plum powder puff mint"?

SELECT p_comment FROM part WHERE p_name = 'burlywood plum powder puff mint'

What is the comment of the product " burlywood plum powder puff mint " ?

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


Question: Please list the IDs of the advisors of the students who are in the 5th year of their program.

SELECT T1.p_id_dummy FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_5'

Please list the IDs of the advisors of the students who are in the 5th year of their program .

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


Question: What is the name of the perpetrator with the biggest weight.

SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Weight DESC LIMIT 1

What is the name of the perpetrator with the biggest weight .

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


Question: Give the average justice scores across all countries.

SELECT avg(justice_score) FROM countries

Give the average justice scores across all countries .


Question: What are the names of clients who have ordered Pride and Prejudice?

SELECT T3.name FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient JOIN Book AS T4 ON T4.isbn  =  T2.isbn WHERE T4.title  =  "Pride and Prejudice"

What are the names of clients who have ordered Pride and Prejudice ?

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


Question: How many tests have result "Fail"?

SELECT count(*) FROM Student_Tests_Taken WHERE test_result  =  "Fail"

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


Question: Find the names of departments that are either in division AS or in division EN and in Building NEB.

SELECT DName FROM DEPARTMENT WHERE Division  =  "AS" UNION SELECT DName FROM DEPARTMENT WHERE Division  =  "EN" AND Building  =  "NEB"

Find the names of departments that are either in division AS or in division EN and in Building NEB .

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


Question: Identify superheroes who can control wind and list their names in alphabetical order.

SELECT T1.superhero_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 T3.power_name = 'Wind Control' ORDER BY T1.superhero_name

Identify superheroes who can control wind and list their names in alphabetical order .

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


Question: What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000?

SELECT CAST(SUM(CASE WHEN T1.SalesQuota > 300000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T2.CountryRegionCode = 'US' AND T2.Name = 'Northwest'

What percentage of businesses in the Northwest US have forecasted annual sales of above 300,000 ?

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


Question: What was the price of 1 Bitcoin in 2016?

SELECT AVG(T2.price) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Bitcoin' AND STRFTIME('%Y', T2.date) = '2016'

What was the price of 1 Bitcoin in 2016 ?

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


Question: Name the top 5 highest-grossing Disney movies adjusted for inflation. Identify the percentage they contributed to the total of Disney's current gross.

SELECT SUM(CASE WHEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) > 1236035515 THEN CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL) ELSE 0 END) * 100 / SUM(CAST(REPLACE(trim(inflation_adjusted_gross, '$'), ',', '') AS REAL)) FROM movies_total_gross

Name the top 5 highest - grossing Disney movies adjusted for inflation . Identify the percentage they contributed to the total of Disney 's current gross .

O O O O O O O O O O O O O O O O O O O O O O O O O O O


Question: What is the title of the book that has been ordered the greatest number of times?

SELECT T2.title FROM Books_Order AS T1 JOIN Book AS T2 ON T1.isbn  =  T2.isbn GROUP BY T1.isbn ORDER BY count(*) DESC LIMIT 1

What is the title of the book that has been ordered the greatest number of times ?

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


Question: From 7/9/2010 to 10/29/2013, how many black patients were immunized with the meningococcal MCV4P vaccine?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'meningococcal MCV4P' AND T2.DATE BETWEEN '2010-07-09' AND '2013-10-29' AND T1.race = 'black'

From 7/9/2010 to 10/29/2013 , how many black patients were immunized with the meningococcal MCV4P vaccine ?

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


Question: What is the average result of the question "What is your age?" in 2014's survey?

SELECT CAST(SUM(T2.AnswerText) AS REAL) / COUNT(T2.UserID) AS "avg" FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2014 AND T1.questiontext LIKE 'What is your age?'

What is the average result of the question " What is your age ? " in 2014 's survey ?

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


Question: Find the name and age of the oldest sailor.

SELECT name ,  age FROM Sailors WHERE age  =  ( SELECT max(age) FROM Sailors )

Find the name and age of the oldest sailor .


Question: Who are the co-authors for Jei Keon Chae and what is the title of paper written by them?

SELECT T2.AuthorId, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Jei Keon Chae'

Who are the co - authors for Jei Keon Chae and what is the title of paper written by them ?

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


Question: What is the height of the mountain climbined by the climbing who had the most points?

SELECT T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID ORDER BY T1.Points DESC LIMIT 1

What is the height of the mountain climbined by the climbing who had the most points ?

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


Question: Provide the number of airplanes that landed on Oakland Airport on 2018/8/7.

SELECT SUM(CASE WHEN T1.Description LIKE '%Oakland%' THEN 1 ELSE 0 END) AS count FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/7'

Provide the number of airplanes that landed on Oakland Airport on 2018/8/7 .

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


Question: What is the medium through which most complaints are registered in Florida?

SELECT T3.`Submitted via` FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.state = 'FL' GROUP BY T1.`Complaint ID` ORDER BY COUNT(T1.`Complaint ID`) DESC LIMIT 1

What is the medium through which most complaints are registered in Florida ?


Question: What are the buildings, streets, and cities corresponding to the addresses of senior citizens?

SELECT T1.line_1_number_building ,  T1.line_2_number_street ,  T1.town_city FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id  =  T2.user_address_id WHERE T2.user_category_code  =  'Senior Citizen';

What are the buildings , streets , and cities corresponding to the addresses of senior citizens ?

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


Question: Find the name and price of the product that has been ordered the greatest number of times.

SELECT t1.product_name ,   t1.product_price FROM products AS t1 JOIN regular_order_products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t2.product_id ORDER BY count(*) DESC LIMIT 1

Find the name and price of the product that has been ordered the greatest number of times .

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


Question: What are the names of tracks that contain the the word you in them?

SELECT Name FROM TRACK WHERE Name LIKE '%you%'

What are the names of tracks that contain the the word you in them ?

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


Question: How many inspections failed in 2014?

SELECT COUNT(inspection_id) FROM inspection WHERE strftime('%Y', inspection_date) = '2014' AND results = 'Fail'


Question: What is the name of the scuplture that was created most recently ?

select title from sculptures order by year desc limit 1


Question: Provide the ingredients and maximum quantities of the recipe which can serve 7 people.

SELECT T3.name, T2.max_qty 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.servings = 7

Provide the ingredients and maximum quantities of the recipe which can serve 7 people .

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


Question: Name the paper which is cited most times and the paper which is cited least times? Also, find the number of times each one is cited.

SELECT cited_paper_id, COUNT(cited_paper_id), ( SELECT cited_paper_id FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_paper_id) ASC LIMIT 1 ), ( SELECT COUNT(cited_paper_id) FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_paper_id) ASC LIMIT 1 ) FROM cites GROUP BY cited_paper_id ORDER BY COUNT(cited_paper_id) DESC LIMIT 1

Name the paper which is cited most times and the paper which is cited least times ? Also , find the number of times each one is cited .

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


Question: Find the name of the cinemas that are playing movies with either rating ‘G’ or rating ‘PG’.

SELECT title FROM movies WHERE rating  =  'G' OR rating  =  'PG'

Find the name of the cinemas that are playing movies with either rating ‘ G ’ or rating ‘ PG ’ .

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


Question: Give me the the first and last name of the faculty who advises the most students.

SELECT T1.fname ,  T1.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID ORDER BY count(*) DESC LIMIT 1

Give me the the first and last name of the faculty who advises the most students .

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


Question: Show the crime rates of counties in ascending order of number of police officers.

SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC

Show the crime rates of counties in ascending order of number of police officers .

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


Question: State the name and date of the last round of race in year 1999.

SELECT name, date FROM races WHERE year = 1999 ORDER BY round DESC LIMIT 1

State the name and date of the last round of race in year 1999 .

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


Question: How many different comments are there for student answers?

SELECT count(DISTINCT Comments) FROM Student_Answers

How many different comments are there for student answers ?


Question: What profit will the company gain if they sell 10 items of the product that has the lightest weight?

SELECT 10 * (ListPrice - StandardCost) FROM Product WHERE Weight IS NOT NULL ORDER BY Weight LIMIT 1

What profit will the company gain if they sell 10 items of the product that has the lightest weight ?

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


Question: How many engineers did each staff contact? List both the contact staff name and number of engineers contacted.

SELECT T1.staff_name ,  count(*) FROM Staff AS T1 JOIN Engineer_Visits AS T2 ON T1.staff_id  =  T2.contact_staff_id GROUP BY T1.staff_name

How many engineers did each staff contact ? List both the contact staff name and number of engineers contacted .

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


Question: In which country does the user with first name Robbie live?

SELECT T1.country FROM Addresses AS T1 JOIN Users AS T2 ON T1.address_id  =  T2.user_address_id WHERE T2.first_name  =  'Robbie';

In which country does the user with first name Robbie live ?

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


Question: When compared to the total number of breweries in the US producing American Blonde Ale, how many in the state of Wisconsin produces American Blonde Ale? Indicate your answer in percentage (%).

SELECT CAST(SUM(IIF(T2.state = 'WI', 1, 0)) AS REAL) * 100 / COUNT(T1.id) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T1.style = 'American Blonde Ale'

When compared to the total number of breweries in the US producing American Blonde Ale , how many in the state of Wisconsin produces American Blonde Ale ? Indicate your answer in percentage ( % ) .

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


Question: What is the name of the song that was released in the most recent year?

SELECT song_name ,  releasedate FROM song ORDER BY releasedate DESC LIMIT 1

What is the name of the song that was released in the most recent year ?

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


Question: Please list all sale team names which had orders on 5/31/2018.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T1.OrderDate = '5/31/18' THEN T2.`Sales Team` ELSE NULL END AS T FROM `Sales Orders` T1 INNER JOIN `Sales Team` T2 ON T2.SalesTeamID = T1._SalesTeamID ) WHERE T IS NOT NULL

Please list all sale team names which had orders on 5/31/2018 .

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


Question: List all company names with a book published by Alyson.

SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id  =  T2.book_club_id WHERE T2.publisher  =  'Alyson'

List all company names with a book published by Alyson .

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


Question: When was the first ever project went live on the site and what were the names of the resources being requested? If there are multiple projects that have the same date, indicate each of them and their items.

SELECT T2.date_posted, T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.date_posted = ( SELECT date_posted FROM projects ORDER BY date_posted ASC LIMIT 1 )

When was the first ever project went live on the site and what were the names of the resources being requested ? If there are multiple projects that have the same date , indicate each of them and their items .

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


Question: How much is the average sentiment polarity score of Golf GPS Rangefinder: Golf Pad and what is it's rating in the Google Play Store?

SELECT AVG(T2.Sentiment_Polarity), T1.Rating FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Golf GPS Rangefinder: Golf Pad'

How much is the average sentiment polarity score of Golf GPS Rangefinder : Golf Pad and what is it 's rating in the Google Play Store ?

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


Question: What are the names of clubs, ordered descending by the average earnings of players within each?

SELECT T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID GROUP BY T1.Club_ID ORDER BY avg(T2.Earnings) DESC

What are the names of clubs , ordered descending by the average earnings of players within each ?

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


Question: Identify all installed and activated apps by their id.

SELECT app_id FROM app_events WHERE is_active = 1 AND is_installed = 1

Identify all installed and activated apps by their i d.

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


Question: What product is the least shipped to the postal code 28023?

SELECT T4.ProductName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.PostalCode = 28023 ORDER BY T3.Quantity LIMIT 1

What product is the least shipped to the postal code 28023 ?

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


Question: Show the names of customers who use Credit Card payment method and have more than 2 orders.

SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.payment_method_code  =  'Credit Card' GROUP BY T1.customer_id HAVING count(*)  >  2

Show the names of customers who use Credit Card payment method and have more than 2 orders .

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


Question: Among all the solution of the 'zh-cn' methods, which path is most often used?

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Lang = 'zh-cn' GROUP BY T1.Path ORDER BY COUNT(T1.Path) DESC LIMIT 1

Among all the solution of the ' zh - cn ' methods , which path is most often used ?

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


Question: Identify the latest badge awarded to the user with the display name Emmett.

SELECT T1.Name FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.DisplayName = 'Emmett' ORDER BY T1.Date DESC LIMIT 1

Identify the latest badge awarded to the user with the display name Emmett .

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


Question: What are the names of the cars worth 20000?

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = 20000

What are the names of the cars worth 20000 ?


Question: Calculate the amount budgeted for 'April Speaker' event. List all the budgeted categories for said event in an ascending order based on their amount budgeted.

SELECT T2.category, SUM(T2.amount) FROM event AS T1 JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_name = 'April Speaker' GROUP BY T2.category ORDER BY SUM(T2.amount) ASC

Calculate the amount budgeted for ' April Speaker ' event . List all the budgeted categories for said event in an ascending order based on their amount budgeted .

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


Question: What is the name of the activity with the most students?

SELECT T1.activity_name FROM Activity AS T1 JOIN Participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1

What is the name of the activity with the most students ?


Question: Please list the classes of all the object samples in image no.1.

SELECT T1.OBJ_CLASS FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 1 GROUP BY T1.OBJ_CLASS

Please list the classes of all the object samples in image no.1 .


Question: Return the average price of Clothes.

SELECT avg(product_price) FROM Products WHERE product_type_code  =  "Clothes"


Question: Who are the friends of Bob?

SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  'Bob'


Question: Return the full names and salaries for employees with first names that end with the letter m.

SELECT first_name ,  last_name ,  salary FROM employees WHERE first_name LIKE '%m'

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


Question: How many orders were shipped by the sales team with the highest amount of shipped orders in 2020? Give the name of the said sales team.

SELECT COUNT(T1.OrderNumber), T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.ShipDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1

How many orders were shipped by the sales team with the highest amount of shipped orders in 2020 ? Give the name of the said sales team .

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


Question: What are the first names of customers who have not rented any films after '2005-08-23 02:06:01'?

SELECT first_name FROM customer WHERE customer_id NOT IN( SELECT customer_id FROM rental WHERE rental_date  >  '2005-08-23 02:06:01' )

What are the first names of customers who have not rented any films after ' 2005 - 08 - 23 02:06:01 ' ?

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


Question: Among the customers from Indiana, what is the percentage of their purchased orders in the Central region with no discount?

SELECT CAST(SUM(CASE  WHEN T2.Discount = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'Central' AND T1.State = 'Indiana'

Among the customers from Indiana , what is the percentage of their purchased orders in the Central region with no discount ?

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


Question: How many seasons has Silverstone Circuit hosted the United Kindom grand prix?

SELECT COUNT(T2.circuitid) FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Silverstone Circuit' AND T2.name = 'British Grand Prix'

How many seasons has Silverstone Circuit hosted the United Kindom grand prix ?

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


Question: Count the number of customers that have an email containing "gmail.com".

SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"

Count the number of customers that have an email containing " gmail.com " .

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


Question: What are the capitals of the regions with area bigger than 10000?

SELECT Capital FROM region WHERE Area  >  10000

What are the capitals of the regions with area bigger than 10000 ?

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


Question: Show the city and the number of branches opened before 2010 for each city.

SELECT city ,  count(*) FROM branch WHERE open_year  <  2010 GROUP BY city

Show the city and the number of branches opened before 2010 for each city .

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


Question: Which episode number has the second highest positive viewer comments and has been awarded "Best Television Episode"?

SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Best Television Episode' AND T1.result = 'Winner' ORDER BY T2.rating DESC LIMIT 2

Which episode number has the second highest positive viewer comments and has been awarded " Best Television Episode " ?

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


Question: What is the name of the most expensive product?

SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1

What is the name of the most expensive product ?


Question: How many Haileybury Hockey Club goalies became a hall of famer?

SELECT COUNT(DISTINCT T1.playerID) FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID INNER JOIN Teams AS T3 ON T1.tmID = T3.tmID AND T1.year = T3.year WHERE T3.name = 'Haileybury Hockey Club' AND T2.hofID IS NOT NULL

How many Haileybury Hockey Club goalies became a hall of famer ?

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


Question: At what date and time did San Jose Diridon Caltrain Station have most bikes available.

SELECT T2.time FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.bikes_available = ( SELECT MAX(T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T1.name = 'San Jose Diridon Caltrain Station' )

At what date and time did San Jose Diridon Caltrain Station have most bikes available .

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


Question: Show all the distinct institution types.

Show all the distinct institution types .


Question: What are the faculty id and the number of students each faculty has?

SELECT T1.FacID ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.FacID

What are the faculty i d and the number of students each faculty has ?

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


Question: How many penalty minutes did the Montreal Canadiens have in the 1918's Stanley Cup Finals?

SELECT T2.PIM FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T1.year = 1918

How many penalty minutes did the Montreal Canadiens have in the 1918 's Stanley Cup Finals ?

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


Question: What are all the different package numbers that Leo Wong sent or received?

SELECT DISTINCT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber OR T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"

What are all the different package numbers that Leo Wong sent or received ?

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


Question: How many Japanese cars weigh more than 2000 lbs?

SELECT COUNT(*) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T3.country = 'Japan' AND T1.weight > 2000

How many Japanese cars weigh more than 2000 lbs ?


Question: What are the type codes of the policies used by the customer "Dayana Robel"?

SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"

What are the type codes of the policies used by the customer " Dayana Robel " ?

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


Question: List out the root beer ID for the brand Bulldog, Bundaberg, Dad's, Dog n Suds and Virgil's.

SELECT T1.RootBeerID FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T2.BrandID = T1.BrandID WHERE T2.BrandName IN ('Bulldog', 'Bundaberg', 'Dad''s', 'Dog n Suds', 'Virgil''s')

List out the root beer ID for the brand Bulldog , Bundaberg , Dad 's , Dog n Suds and Virgil 's .

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


Question: Which ingredient appeared the least in recipes?

SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) ASC LIMIT 1

Which ingredient appeared the least in recipes ?


Question: How many incidents are considered "severe" in the IUCR classification?

SELECT COUNT(*) FROM IUCR WHERE index_code = 'I'

How many incidents are considered " severe " in the IUCR classification ?