Question: What is the average number of book pages written by Zilpha Keatley Snyder?

SELECT AVG(T3.num_pages) FROM book_author AS T1 INNER JOIN author AS T2 ON T1.author_id = T2.author_id INNER JOIN book AS T3 ON T3.book_id = T1.book_id WHERE T2.author_name = 'Zilpha Keatley Snyder'

What is the average number of book pages written by Zilpha Keatley Snyder ?

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


Question: Find the id and local authority of the station whose maximum precipitation is higher than 50.

SELECT t2.id ,  t2.local_authority FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id GROUP BY t1.station_id HAVING max(t1.precipitation)  >  50

Find the i d and local authority of the station whose maximum precipitation is higher than 50 .

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


Question: Find the number of classes offered for all class rooms that held at least 2 classes.

SELECT count(*) ,  class_room FROM CLASS GROUP BY class_room HAVING count(*)  >=  2

Find the number of classes offered for all class rooms that held at least 2 classes .

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


Question: Count the number of postal points in the district represented by Kirkpatrick Ann.

SELECT COUNT(T2.zip_code) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.first_name = 'Kirkpatrick' AND T1.last_name = 'Ann'

Count the number of postal points in the district represented by Kirkpatrick Ann .

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


Question: Are the customers holding coupons with amount 500 bad or good?

SELECT T1.good_or_bad_customer FROM customers AS T1 JOIN discount_coupons AS T2 ON T1.coupon_id  =  T2.coupon_id WHERE T2.coupon_amount  =  500

Are the customers holding coupons with amount 500 bad or good ?

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


Question: Which vocal type did the musician with last name "Heilo" played in the song with title "Der Kapitan"?

SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid JOIN band AS T3 ON T1.bandmate  =  T3.id WHERE T3.lastname  =  "Heilo" AND T2.title  =  "Der Kapitan"

Which vocal type did the musician with last name " Heilo " played in the song with title " Der Kapitan " ?

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


Question: Which title is about helpful hints on how to use your electronic resources, which publisher published it and what is the price of this book?

SELECT T1.title, T2.pub_name, T1.price FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Helpful hints on how to use your electronic resources to the best advantage.'

Which title is about helpful hints on how to use your electronic resources , which publisher published it and what is the price of this book ?

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


Question: How many people were considered as prospective recipients of the "Animation" award?

SELECT COUNT(*) FROM Award WHERE award = 'Animation' AND result = 'Nominee';

How many people were considered as prospective recipients of the " Animation " award ?

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


Question: How many flights on the 1st of August 2018 were coming from Allentown, Pennsylvania?

SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1' AND ORIGIN = 'ABE'

How many flights on the 1st of August 2018 were coming from Allentown , Pennsylvania ?


Question: How many orders that the employees who are located in Tacoma handled?

SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.City = 'Tacoma'

How many orders that the employees who are located in Tacoma handled ?

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


Question: Please list the names of the films released in 2003 among the films scored by user 2941 .

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 2003 AND T1.user_id = 2941

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


Question: What is the location shared by most counties?

SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1

What is the location shared by most counties ?


Question: What are the songs in volumes with more than 1 week on top?

SELECT Song FROM volume WHERE Weeks_on_Top  >  1

What are the songs in volumes with more than 1 week on top ?

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


Question: What are the location and nickname of each school?

SELECT T1.Location ,  T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID  =  T2.School_ID

What are the location and nickname of each school ?


Question: Find the names of all instructors who have taught some course and the course_id.

SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID

Find the names of all instructors who have taught some course and the course_id .

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


Question: What is the precise location of the Sac State American River Courtyard?

SELECT T2.Latitude, T2.Longitude FROM location AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.LocationName = 'Sac State American River Courtyard'

What is the precise location of the Sac State American River Courtyard ?

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


Question: List the full name of all current female senators.

SELECT T2.first_name, T2.last_name FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.type = 'sen' AND T2.gender_bio = 'F' GROUP BY T2.ballotpedia_id

List the full name of all current female senators .


Question: What is the object whose attribute is blurry in image no.2377993? Give the explanation about the object.

SELECT T4.OBJ_CLASS_ID, T4.OBJ_CLASS FROM IMG_OBJ_att AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T1.IMG_ID = T3.IMG_ID INNER JOIN OBJ_CLASSES AS T4 ON T3.OBJ_CLASS_ID = T4.OBJ_CLASS_ID WHERE T2.ATT_CLASS = 'blurry' AND T1.IMG_ID = 22377993

What is the object whose attribute is blurry in image no.2377993 ? Give the explanation about the object .

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


Question: From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role?

SELECT date_from ,  date_to FROM Project_Staff WHERE project_id IN( SELECT project_id FROM Project_Staff GROUP BY project_id ORDER BY count(*) DESC LIMIT 1 ) UNION SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  'leader'

From what date and to what date do the staff work on a project that has the most staff and has staff in a leader role ?

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


Question: How many kinds of violations did "Stacks Restaurant" have on 2016/10/4?

SELECT COUNT(DISTINCT T1.violation_type_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Stacks Restaurant' AND T1.`date` = '2016-10-04'

How many kinds of violations did " Stacks Restaurant " have on 2016/10/4 ?

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


Question: For each aircraft that has won an award, what is its name and how many time has it won?

SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft

For each aircraft that has won an award , what is its name and how many time has it won ?

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


Question: In which region were the assistant location managers born?

SELECT T2.birth_region FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'president of NBC West Coast'

In which region were the assistant location managers born ?


Question: State top 3 emails of UK Sales Rep who have the highest credit limit.

SELECT T2.email FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep' AND T1.country = 'UK' GROUP BY T1.customerName, T2.email ORDER BY SUM(T1.creditLimit) DESC LIMIT 3

State top 3 emails of UK Sales Rep who have the highest credit limit .

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


Question: What is the most frequent product type code?

SELECT product_type_code FROM Products GROUP BY product_type_code ORDER BY count(*) DESC LIMIT 1

What is the most frequent product type code ?


Question: Which product did Phillina Ober buy?

SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Phillina Ober'


Question: What is the first and last name of the faculty members who participated in at least one activity? For each of them, also show the number of activities they participated in.

SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID

What is the first and last name of the faculty members who participated in at least one activity ? For each of them , also show the number of activities they participated in .

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


Question: What is the molecule of atom id "TR000_2" and atom id 2 "TR000_4"?

SELECT T1.molecule_id FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR000_2' AND T2.atom_id2 = 'TR000_4'

What is the molecule of atom i d " TR000_2 " and atom i d 2 " TR000_4 " ?

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


Question: How many 20 years old athletes were there in the 1984 Summer Olympic Games?

SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1984 Summer' AND T2.age = 20

How many 20 years old athletes were there in the 1984 Summer Olympic Games ?

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


Question: What are the names of vehicles, sorted descending by total hours of renting?

SELECT T2.name FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T2.id ORDER BY sum(T1.total_hours) DESC

What are the names of vehicles , sorted descending by total hours of renting ?

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


Question: What is the percentage of the most common conditions for patients age 60 and above?

SELECT CAST(SUM(CASE WHEN T5.DESCRIPTION = T3.DESCRIPTION THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.patient) FROM ( SELECT T2.DESCRIPTION, T1.patient FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE ROUND((strftime('%J', T2.START) - strftime('%J', T1.birthdate)) / 365) > 60 GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1 ) AS T3 INNER JOIN patients AS T4 ON T3.patient = T4.patient INNER JOIN conditions AS T5 ON T4.patient = T5.PATIENT WHERE ROUND((strftime('%J', T5.START) - strftime('%J', T4.birthdate)) / 365) > 60

What is the percentage of the most common conditions for patients age 60 and above ?

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


Question: What is the average height of player who were born in 1990 and after? Compare the average height with players who were born before 1990.

SELECT AVG(IIF(birthYear < 1990, height, NULL)) - AVG(IIF(birthYear >= 1990, height, NULL)) FROM Master

What is the average height of player who were born in 1990 and after ? Compare the average height with players who were born before 1990 .

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


Question: Please list the product description of the products bought in transactions in euro.

SELECT DISTINCT T1.ProductID, T3.Description FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN products AS T3 ON T1.ProductID = T3.ProductID WHERE T2.Currency = 'EUR'

Please list the product description of the products bought in transactions in euro .

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


Question: Count the number of characteristics.


Question: How many dishes appeared on a menu more than once?

SELECT COUNT(*) FROM Dish WHERE times_appeared > menus_appeared

How many dishes appeared on a menu more than once ?


Question: How many vehicles have maximum top speed?

SELECT count(*) FROM vehicle WHERE top_speed  =  (SELECT max(top_speed) FROM vehicle)

How many vehicles have maximum top speed ?


Question: For the repository which got '189' Stars, how many solutions which needs to be compiled does it contain?

SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Stars = 189 AND T2.WasCompiled = 0

For the repository which got ' 189 ' Stars , how many solutions which needs to be compiled does it contain ?

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


Question: How many businesses operating in the shopping business have opening times before 8AM?

SELECT COUNT(T3.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T4.opening_time < '8AM' AND T1.category_name LIKE 'Shopping'

How many businesses operating in the shopping business have opening times before 8AM ?

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


Question: What is the name of the most common genre in all tracks?

SELECT T1.Name FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId GROUP BY T2.GenreId ORDER BY COUNT(*) DESC LIMIT 1

What is the name of the most common genre in all tracks ?

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


Question: What are all the distinct participant ids who attended any events?

SELECT count(DISTINCT participant_id) FROM participants_in_Events

What are all the distinct participant ids who attended any events ?


Question: What is the name of all tracks in the album named Balls to the Wall?

SELECT T2.name FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.title = "Balls to the Wall";

What is the name of all tracks in the album named Balls to the Wall ?

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


Question: Find the name of amenities Smith Hall dorm have. ordered the results by amenity names.

SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T1.dorm_name  =  'Smith Hall' ORDER BY T3.amenity_name

Find the name of amenities Smith Hall dorm have . ordered the results by amenity names .

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


Question: What is the role of K Goel in the match ID 335992?

SELECT T3.Role_Desc FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Rolee AS T3 ON T3.Role_Id = T2.Role_Id WHERE T2.Match_Id = 335992 AND T1.Player_Name = 'K Goel'

What is the role of K Goel in the match ID 335992 ?

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


Question: What are the cards belong to duel deck a? List the ID.

SELECT id FROM cards WHERE duelDeck = 'a'

What are the cards belong to duel deck a ? List the ID .

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


Question: What is the city located in Bay Area of Santa Clara?

SELECT city FROM geographic WHERE region = 'bay area' AND county = 'santa clara county'

What is the city located in Bay Area of Santa Clara ?

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


Question: Return the phone numbers of employees with salaries between 8000 and 12000.

SELECT phone_number FROM employees WHERE salary BETWEEN 8000 AND 12000

Return the phone numbers of employees with salaries between 8000 and 12000 .

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


Question: Among the matches held in St. George's Park, give the match ID of the match with the highest winning margin points.

SELECT T2.Match_Id FROM Venue AS T1 INNER JOIN Match AS T2 ON T1.venue_id = T2.venue_id WHERE T1.Venue_Name = 'St George''s Park' ORDER BY T2.Win_Margin DESC LIMIT 1

Among the matches held in St. George 's Park , give the match ID of the match with the highest winning margin points .

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


Question: How many christmas albums were released in 2004?

SELECT COUNT(T1.id) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'christmas' AND T1.groupYear = 2004 AND T1.releaseType LIKE 'album'

How many christmas albums were released in 2004 ?

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


Question: What is the longest review?

SELECT title FROM reviews ORDER BY LENGTH(content) DESC LIMIT 1


Question: What are names of patients who made an appointment?

SELECT name FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn

What are names of patients who made an appointment ?


Question: List the job titles of Sally Menke in the crew.

SELECT DISTINCT T2.job FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Sally Menke'

List the job titles of Sally Menke in the crew .

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


Question: What type of inspection was done at John Schaller?

SELECT DISTINCT T2.inspection_type FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.dba_name = 'JOHN SCHALLER'

What type of inspection was done at John Schaller ?


Question: Show budget type codes and the number of documents in each budget type.

SELECT budget_type_code ,  count(*) FROM Documents_with_expenses GROUP BY budget_type_code

Show budget type codes and the number of documents in each budget type .

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


Question: Count the number of distinct player positions.

SELECT count(DISTINCT POSITION) FROM player

Count the number of distinct player positions .


Question: Which episode has the two keywords "nun" and "priest"?

SELECT T1.title FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword IN ('nun', 'priest')

Which episode has the two keywords " nun " and " priest " ?

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


Question: Among the zip code under Saint Croix county, which zip code has the biggest land area?

SELECT T1.zip_code FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.county = 'SAINT CROIX' ORDER BY T2.land_area DESC LIMIT 1

Among the zip code under Saint Croix county , which zip code has the biggest land area ?

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


Question: Show ids for all documents with budget types described as 'Government'.

SELECT T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_Budget_Codes AS T2 ON T1.Budget_Type_code  =  T2.Budget_Type_code WHERE T2.budget_type_Description  =  "Government"

Show ids for all documents with budget types described as ' Government ' .

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


Question: Among the recipes that take more than 10 minutes to prepare, what is the title of the one with the most calories?

SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.prep_min > 10 ORDER BY T2.calories DESC LIMIT 1

Among the recipes that take more than 10 minutes to prepare , what is the title of the one with the most calories ?

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


Question: Please list a patient's platelet level if it is within the normal range and if he or she is diagnosed with MCTD.

SELECT T2.PLT FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'MCTD' AND T2.PLT BETWEEN 100 AND 400

Please list a patient 's platelet level if it is within the normal range and if he or she is diagnosed with MCTD .

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


Question: Show the name of vehicles with no renting history.

SELECT name FROM vehicles WHERE id NOT IN (SELECT vehicles_id FROM renting_history)

Show the name of vehicles with no renting history .

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


Question: Which is the youngest patient with an abnormal anti-ribonuclear protein level? Please list his or her date of birth.

SELECT T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RNP != '-' OR '+-' ORDER BY T1.Birthday DESC LIMIT 1

Which is the youngest patient with an abnormal anti - ribonuclear protein level ? Please list his or her date of birth .

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


Question: How many orders did Marcelia Goering place in 2021 that uses the Priority Shipping method?

SELECT COUNT(*) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Marcelia' AND T1.last_name = 'Goering' AND STRFTIME('%Y', T2.order_date) = '2021' AND T3.method_name = 'Priority'

How many orders did Marcelia Goering place in 2021 that uses the Priority Shipping method ?

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


Question: How is the Credit Rating for company whose rowguid is "33671A4E-DF2B-4879-807B-E3F930DD5C0C"?

SELECT T1.CreditRating FROM Vendor AS T1 INNER JOIN BusinessEntity AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.rowguid = '33671A4E-DF2B-4879-807B-E3F930DD5C0C'

How is the Credit Rating for company whose rowguid is " 33671A4E - DF2B-4879 - 807B - E3F930DD5C0C " ?

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


Question: List all titles published in year 1991. Also provide notes details of the title and the publisher's name.

SELECT T1.title, T1.notes, T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991'

List all titles published in year 1991 . Also provide notes details of the title and the publisher 's name .

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


Question: What is the average value of boxes for each warehouse?

SELECT warehouse ,  avg(value) FROM boxes GROUP BY warehouse

What is the average value of boxes for each warehouse ?

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


Question: Please list the full names of any three countries that have their series code with a description of UN Energy Statistics (2014).

SELECT DISTINCT T2.LongName FROM CountryNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Description = 'Sources: UN Energy Statistics (2014)' LIMIT 3

Please list the full names of any three countries that have their series code with a description of UN Energy Statistics ( 2014 ) .

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


Question: How many songs contain "Love" in their names?

SELECT count(*) FROM songs WHERE name LIKE "%Love%"

How many songs contain " Love " in their names ?

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


Question: Find the ids of all the order items whose product id is 11.

SELECT order_item_id FROM order_items WHERE product_id = 11

Find the ids of all the order items whose product i d is 11 .

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


Question: Who is the champion of the Canadian Grand Prix in 2008? Indicate his finish time.

SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Canadian Grand Prix' AND T2.year = 2008 AND T1.time LIKE '_:%:__.___'

Who is the champion of the Canadian Grand Prix in 2008 ? Indicate his finish time .

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


Question: What is the id and name of the department store that has both marketing and managing department?

SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "marketing" INTERSECT SELECT T2.dept_store_id ,  T2.store_name FROM departments AS T1 JOIN department_stores AS T2 ON T1.dept_store_id  =  T2.dept_store_id WHERE T1.department_name  =  "managing"

What is the i d and name of the department store that has both marketing and managing department ?

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


Question: List all the animation titles.

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


Question: Show all city names and the average distance to all other cities.

SELECT T2.city_name ,  avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code GROUP BY T1.city1_code

Show all city names and the average distance to all other cities .

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


Question: Count the number of different provinces that have institutions.

SELECT count(DISTINCT Province) FROM institution

Count the number of different provinces that have institutions .


Question: What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant?

SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id WHERE t2.rank  =  'Midshipman' INTERSECT SELECT t1.name FROM ship AS t1 JOIN captain AS t2 ON t1.ship_id  =  t2.ship_id WHERE t2.rank  =  'Lieutenant'

What are the names of ships that are commanded by both captains with the rank of Midshipman and captains with the rank of Lieutenant ?

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


Question: How many furniture products were ordered at central superstore?

SELECT COUNT(*) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Furniture'

How many furniture products were ordered at central superstore ?

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


Question: Give me the names and prices of furnitures which some companies are manufacturing.

SELECT t1.name ,  t2.price_in_dollar FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID

Give me the names and prices of furnitures which some companies are manufacturing .

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


Question: Who was the Law and Order series writer who also won the Television Silver Gavel Award at the American Bar Association Silver Gavel Awards for Media and the Arts for two consecutive years?

SELECT t3.name FROM ( SELECT DISTINCT T2.year AS years, T1.name, row_number() OVER (PARTITION BY T1.name ORDER BY T2.year) AS rm FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.award = 'Television' AND T2.award_category = 'Silver Gavel Award' AND T2.series = 'Law and Order' AND T2.result = 'Winner' AND T2.organization = 'American Bar Association Silver Gavel Awards for Media and the Arts' ) AS T3 GROUP BY t3.name HAVING COUNT(t3.years - t3.rm) >= 2

Who was the Law and Order series writer who also won the Television Silver Gavel Award at the American Bar Association Silver Gavel Awards for Media and the Arts for two consecutive years ?

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


Question: What is the full address of the customer who commented that DHL be used for the order that was shipped on April 4, 2005?

SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN orders AS T2 ON T1.customerNumber = T2.customerNumber WHERE T2.shippedDate = '2005-04-04' AND T2.status = 'Shipped'

What is the full address of the customer who commented that DHL be used for the order that was shipped on April 4 , 2005 ?

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


Question: How many rare enchantment Abundance cards are there whose play format status are all legal?

SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T2.uuid = T1.uuid WHERE T1.rarity = 'rare' AND T1.types = 'Enchantment' AND T1.name = 'Abundance' AND T2.status = 'Legal'

How many rare enchantment Abundance cards are there whose play format status are all legal ?

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


Question: What is the student staff ratio of Harvard University in 2012?

SELECT T1.student_staff_ratio FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Harvard University' AND T1.year = 2012

What is the student staff ratio of Harvard University in 2012 ?

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


Question: How many transactions were paid in CZK in the morning of 2012/8/26?

SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN customers AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Date = '2012-08-26' AND T1.Time < '13:00:00' AND T2.Currency = 'CZK'

How many transactions were paid in CZK in the morning of 2012/8/26 ?

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


Question: How many category id have low review count and rating more than 2?

SELECT COUNT(DISTINCT T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.review_count = 'Low' AND T3.stars > 2

How many category i d have low review count and rating more than 2 ?

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


Question: How many people did not enjoy the finale episode?

SELECT COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.episode = 24 AND T2.stars = 1

How many people did not enjoy the finale episode ?


Question: How many players have the bowling skill greater than 2?

SELECT COUNT(Player_Name) FROM Player WHERE Bowling_skill > 2

How many players have the bowling skill greater than 2 ?

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


Question: What are the student IDs for everybody who worked for more than 10 hours per week on all sports?

SELECT StuID FROM Sportsinfo GROUP BY StuID HAVING sum(hoursperweek)  >  10

What are the student IDs for everybody who worked for more than 10 hours per week on all sports ?

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


Question: Name the title of the top three releases with the highest number of downloads.

SELECT groupName FROM torrents ORDER BY totalSnatched DESC LIMIT 3

Name the title of the top three releases with the highest number of downloads .


Question: What is the average rating for right-footed players and left-footed players?

SELECT preferred_foot ,  avg(overall_rating) FROM Player_Attributes GROUP BY preferred_foot

What is the average rating for right - footed players and left - footed players ?

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


Question: Mention the description of the care plan of American patients.

SELECT DISTINCT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.ethnicity = 'american'

Mention the description of the care plan of American patients .

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


Question: Find the average number of factories for the manufacturers that have more than 20 shops.

SELECT avg(Num_of_Factories) FROM manufacturer WHERE num_of_shops  >  20

Find the average number of factories for the manufacturers that have more than 20 shops .

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


Question: What is the total value of cancelled orders?

SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T2.status = 'Cancelled'

What is the total value of cancelled orders ?


Question: Return the description for the courses named "database".

SELECT course_description FROM COURSES WHERE course_name  =  "database"

Return the description for the courses named " database " .

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


Question: What is the average number of dishes per menu page of menu ID12882?

SELECT CAST(COUNT(dish_id) AS REAL) / COUNT(T3.page_count) 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.menu_id = 12882

What is the average number of dishes per menu page of menu ID12882 ?

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


Question: Find the names of all instructors in Comp. Sci. department with salary > 80000.

SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'  AND salary  >  80000

Find the names of all instructors in Comp . Sci . department with salary > 80000 .

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


Question: Count the number of students living in China.

SELECT count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE T1.country  =  "CHINA"

Count the number of students living in China .


Question: Please list the ID of the patient whose RF is normal and who is older than 60.

SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.RF < 20 AND STRFTIME('%Y', DATE('now')) - STRFTIME('%Y', T1.Birthday) > 60

Please list the ID of the patient whose RF is normal and who is older than 60 .

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


Question: Return the order ids and details for orderes with two or more invoices.

SELECT T2.order_id ,  T2.order_details FROM Invoices AS T1 JOIN Orders AS T2 ON T1.order_id  =  T2.order_id GROUP BY T2.order_id HAVING count(*)  >  2

Return the order ids and details for orderes with two or more invoices .

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


Question: Among the top 5 heaviest shipments, how many shipments were transported via Mack?

SELECT COUNT(T2.ship_id) FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id WHERE T1.make = 'Mack' ORDER BY T2.weight DESC LIMIT 1

Among the top 5 heaviest shipments , how many shipments were transported via Mack ?

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


Question: Find the names of customers who are not living in the state of California.

SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  'California'

Find the names of customers who are not living in the state of California .

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


Question: What is the credit card type used by Kenneth Walton?

SELECT DISTINCT T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.First = 'Kenneth' AND T1.Last = 'Walton'

What is the credit card type used by Kenneth Walton ?

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


Question: For loan amount less than USD100,000, what is the percentage of accounts that is still running with no issue.

SELECT CAST(SUM(status = 'C') AS REAL) * 100 / COUNT(account_id) FROM loan WHERE amount < 100000

For loan amount less than USD100,000 , what is the percentage of accounts that is still running with no issue .

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


Question: What are the names of all universities without any majors ranked number 1?

SELECT university_name FROM University EXCEPT SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1

What are the names of all universities without any majors ranked number 1 ?

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


Question: What is the total number of word cited under that class labelled 'AI'?

SELECT COUNT(DISTINCT T2.word_cited_id) FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.class_label = 'AI'

What is the total number of word cited under that class labelled ' AI ' ?

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


Question: Write all the review content belonging to StormCast: The Official Warhammer Age of Sigmar Podcast.

SELECT content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'StormCast: The Official Warhammer Age of Sigmar Podcast' )

Write all the review content belonging to StormCast : The Official Warhammer Age of Sigmar Podcast .

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


Question: Among the author included in the paper of "Inspection resistant memory: Architectural support for security from physical examination", write down the author name and ID who were affiliated with Microsoft Research, USA.

SELECT T2.Name, T1.Id FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Inspection resistant memory: Architectural support for security FROM physical examination' AND T2.Affiliation = 'Microsoft Research, USA'

Among the author included in the paper of " Inspection resistant memory : Architectural support for security from physical examination " , write down the author name and ID who were affiliated with Microsoft Research , USA .

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


Question: How many customers ordered the book titled "Anleitung zum Zickigsein"

SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'Anleitung zum Zickigsein'

How many customers ordered the book titled " Anleitung zum Zickigsein "

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


Question: How much is the part supply cost for the medium metallic grey dodger linen?

SELECT T2.ps_supplycost FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T1.p_name = 'medium metallic grey dodger linen'

How much is the part supply cost for the medium metallic grey dodger linen ?

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


Question: What are the total number of credits offered by each department?

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

What are the total number of credits offered by each department ?


Question: Show the most common apartment type code among apartments with more than 1 bathroom.

SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1

Show the most common apartment type code among apartments with more than 1 bathroom .

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


Question: Among the products manufactured by manufacturer 5 that have a retail price of no more than 1,000, how many products were shipped via rail?

SELECT COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_mfgr = 'Manufacturer#5' AND T3.p_retailprice < 1000 AND T2.l_shipmode = 'RAIL'

Among the products manufactured by manufacturer 5 that have a retail price of no more than 1,000 , how many products were shipped via rail ?

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


Question: What is the percentage of device users in the F27-28 age group who experienced an event on the 3rd of May 2016?

SELECT SUM(IIF(T1.`group` = 'F27-28', 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE SUBSTR(T2.timestamp, 1, 10) = '2016-05-03'

What is the percentage of device users in the F27 - 28 age group who experienced an event on the 3rd of May 2016 ?

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


Question: What are the ids and dates of the orders with at least two products?

SELECT T1.order_id ,  T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >=  2

What are the ids and dates of the orders with at least two products ?


Question: Find the name of the first 5 customers.

SELECT customer_name FROM Customers ORDER BY date_became_customer LIMIT 5

Find the name of the first 5 customers .


Question: For all female patient with total protein (TP) beyond the normal index, what is the deviation of their TP idex from the normal.

SELECT T2.TP - 8.5 FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND T2.TP > 8.5

For all female patient with total protein ( TP ) beyond the normal index , what is the deviation of their TP idex from the normal .

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


Question: Show all conference names and the number of times each conference has.

SELECT conference_name ,  count(*) FROM conference GROUP BY conference_name

Show all conference names and the number of times each conference has .

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


Question: Among the movies from France, how many of them are drama?

SELECT COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'France' AND T1.genre = 'drama'

Among the movies from France , how many of them are drama ?

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


Question: Write down the inventories' IDs and actors' names of "STREETCAR INTENTIONS".

SELECT T4.inventory_id, T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T2.film_id = T4.film_id WHERE T3.title = 'STREETCAR INTENTIONS'

Write down the inventories ' IDs and actors ' names of " STREETCAR INTENTIONS " .

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


Question: How many publications were published in relation to the conference 'Adaptive Multimedia Retrieval' in 2007?

SELECT COUNT(T2.ConferenceId) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Adaptive Multimedia Retrieval' AND T2.Year = 2007

How many publications were published in relation to the conference ' Adaptive Multimedia Retrieval ' in 2007 ?

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


Question: when is the hire date for those employees whose first name does not containing the letter M?

SELECT hire_date FROM employees WHERE first_name NOT LIKE '%M%'

when is the hire date for those employees whose first name does not containing the letter M ?

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


Question: What are the names of courses that give either 3 credits, or 1 credit and 4 hours?

SELECT CName FROM COURSE WHERE Credits  =  3 UNION SELECT CName FROM COURSE WHERE Credits  =  1 AND Hours  =  4

What are the names of courses that give either 3 credits , or 1 credit and 4 hours ?

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


Question: Return the cheapest price for goods with cheese flavor.

SELECT min(price) FROM goods WHERE flavor  =  "Cheese"

Return the cheapest price for goods with cheese flavor .

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


Question: List the name of franchise that have the most number of games.

SELECT Franchise FROM game GROUP BY Franchise ORDER BY COUNT(*) DESC LIMIT 1

List the name of franchise that have the most number of games .


Question: Lists all governments with a parliamentary democracy that achieved their independence between 01/01/1950 and 12/31/1999.

SELECT * FROM politics WHERE STRFTIME('%Y', Independence) BETWEEN '1950' AND '1999' AND Government = 'parliamentary democracy'

Lists all governments with a parliamentary democracy that achieved their independence between 01/01/1950 and 12/31/1999 .

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


Question: On average, how many rooms does a property have?

On average , how many rooms does a property have ?


Question: Please list all the foreign languages in which the card "Ancestor's Chosen" has a flavor text.

SELECT T2.language FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T2.uuid = T1.uuid WHERE T1.name = 'Ancestor''s Chosen' AND T2.flavorText IS NOT NULL

Please list all the foreign languages in which the card " Ancestor 's Chosen " has a flavor text .

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


Question: Find all the layer type codes with their corresponding usage count.

SELECT analytical_layer_type_code ,  count(*) FROM analytical_layer GROUP BY analytical_layer_type_code

Find all the layer type codes with their corresponding usage count .

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


Question: Show the customer ids and firstname without a credit card.

SELECT customer_id ,  customer_first_name FROM Customers EXCEPT SELECT T1.customer_id ,  T2.customer_first_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE card_type_code  =  "Credit"

Show the customer ids and firstname without a credit card .

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


Question: How many games did Per Mars play in the 1997-1998 season?

SELECT T2.GP FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.SEASON = '1997-1998' AND T1.PlayerName = 'Pavel Patera'

How many games did Per Mars play in the 1997 - 1998 season ?

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


Question: Which location has the most corresponding counties?

SELECT LOCATION FROM county_public_safety GROUP BY LOCATION ORDER BY COUNT(*) DESC LIMIT 1

Which location has the most corresponding counties ?


Question: Give the abbreviation name for the character "Earl of Westmoreland".

SELECT DISTINCT Abbrev FROM characters WHERE CharName = 'Earl of Westmoreland'

Give the abbreviation name for the character " Earl of Westmoreland " .

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


Question: List the themes of parties in ascending order of number of hosts.

SELECT Party_Theme FROM party ORDER BY Number_of_hosts ASC

List the themes of parties in ascending order of number of hosts .

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


Question: What are the names of drivers except for those who had the pole position James Hinchcliffe?

SELECT Driver_Name FROM driver EXCEPT SELECT T1.Driver_Name FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID WHERE Pole_Position  =  "James Hinchcliffe"

What are the names of drivers except for those who had the pole position James Hinchcliffe ?

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


Question: In businesses with a category of mexican, how many of them has a star rating below 4?

SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.stars < 4 AND T3.category_name LIKE 'Mexican'

In businesses with a category of mexican , how many of them has a star rating below 4 ?

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


Question: What are the names of all teams from universities that have more people enrolled than average ?

select team_name from university where enrollment  >  (select avg(enrollment) from university)

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


Question: Which students have professors as their advisors? Find their student ids.

SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"

Which students have professors as their advisors ? Find their student ids .

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


Question: How many drivers were in the Australian Grand Prix held in 2009?

SELECT count(*) FROM results AS T1 JOIN races AS T2 ON T1.raceid = T2.raceid WHERE T2.name = "Australian Grand Prix" AND YEAR = 2009

How many drivers were in the Australian Grand Prix held in 2009 ?

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


Question: What are the names of the enzymes used in the medicine  Amisulpride that acts as inhibitors?

SELECT T1.name FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T1.id  =  T2.enzyme_id JOIN medicine AS T3 ON T2.medicine_id  =  T3.id WHERE T3.name  =  'Amisulpride' AND T2.interaction_type  =  'inhibitor'

What are the names of the enzymes used in the medicine Amisulpride that acts as inhibitors ?

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


Question: Clerk#000000936 dealt with a "Not Specified" order on 1995/3/13, what was the charge for the part of the order shipped by truck?

SELECT T2.l_extendedprice * (1 - T2.l_discount) * (1 + T2.l_tax) AS num FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_clerk = 'Clerk#000000936' AND T2.l_shipmode = 'TRUCK' AND T1.o_orderstatus = '4-NOT SPECIFIED' AND T1.o_orderdate = '1995-03-13'

Clerk#000000936 dealt with a " Not Specified " order on 1995/3/13 , what was the charge for the part of the order shipped by truck ?

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


Question: What are the names of the customers and staff members?

SELECT customer_details FROM customers UNION SELECT staff_details FROM staff

What are the names of the customers and staff members ?


Question: Which club has the most members majoring in "600"?

SELECT t1.clubname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.major  =  "600" GROUP BY t1.clubname ORDER BY count(*) DESC LIMIT 1

Which club has the most members majoring in " 600 " ?

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


Question: Find the names of scientists who are not working on the project with the highest hours.

SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)

Find the names of scientists who are not working on the project with the highest hours .

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


Question: What is the average latitude and longitude of stations located in San Jose city?

SELECT avg(lat) ,  avg(long) FROM station WHERE city  =  "San Jose"

What is the average latitude and longitude of stations located in San Jose city ?

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


Question: What is the status code of the items have been ordered and shipped, and also what are their shipment tracking numbers?

SELECT T1.order_item_status_code ,  T3.shipment_tracking_number FROM Order_items AS T1 JOIN Shipment_Items AS T2 ON T1.order_item_id  =  T2.order_item_id JOIN Shipments AS T3 ON T2.shipment_id  =  T3.shipment_id

What is the status code of the items have been ordered and shipped , and also what are their shipment tracking numbers ?

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


Question: What are the salespeople's email addresses?

SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SP'

What are the salespeople 's email addresses ?


Question: Among all orders updated in 2022, identify the percentage that has been returned.

SELECT CAST(SUM(CASE WHEN T1.status_value = 'Returned' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE STRFTIME('%Y', T2.status_date) = '2022'

Among all orders updated in 2022 , identify the percentage that has been returned .

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


Question: How many matches were played by the player with player ID 2?

SELECT SUM(CASE WHEN Player_Id = 2 THEN 1 ELSE 0 END) FROM Player_Match

How many matches were played by the player with player ID 2 ?

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


Question: Show the booking status code and the corresponding number of bookings.

SELECT 	booking_status_code ,  COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code

Show the booking status code and the corresponding number of bookings .

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


Question: How many sales representatives who have office code is 1?

SELECT COUNT(officeCode) FROM employees WHERE jobTitle = 'Sales Rep' AND officeCode = 1

How many sales representatives who have office code is 1 ?

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


Question: Among all publications containing keywords 'Turbulent Fluids', what percentage of them was published in the journal named 'Physics of Fluids'?

SELECT CAST(SUM(CASE WHEN T1.Keyword = 'Turbulent Fluids' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.FullName = 'Physics of Fluids' THEN 1 ELSE 0 END) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id

Among all publications containing keywords ' Turbulent Fluids ' , what percentage of them was published in the journal named ' Physics of Fluids ' ?

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


Question: Find the make that has more than one team.

SELECT make FROM team GROUP BY team HAVING count(*)  >  1

Find the make that has more than one team .


Question: How many additional timers were born in USA?

SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'additional timer' AND T1.birth_country = 'USA';

How many additional timers were born in USA ?


Question: Among the movies released from 2001 to 2005, list down the titles and directors of the movies which had a total gross of more than 100% above the average.

SELECT T2.name, T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE SUBSTR(T1.release_date, LENGTH(T1.release_date) - 3, LENGTH(T1.release_date)) BETWEEN '2001' AND '2005' AND CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) / ( SELECT SUM(CAST(REPLACE(trim(T3.total_gross, '$'), ',', '') AS REAL)) / COUNT(T3.movie_title) AS avg_gross FROM movies_total_gross AS T3 INNER JOIN director AS T4 ON T3.movie_title = T4.name WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '2001' AND '2005' ) - 1 > 1

Among the movies released from 2001 to 2005 , list down the titles and directors of the movies which had a total gross of more than 100 % above the average .

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


Question: Among the events attended by more than 10 members of the Student_Club, how many of them are meetings?

SELECT T1.event_name FROM event AS T1  INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event GROUP BY T1.event_id  HAVING COUNT(T2.link_to_event) > 10 EXCEPT SELECT T1.event_name  FROM event AS T1  WHERE T1.type = 'Meeting'

Among the events attended by more than 10 members of the Student_Club , how many of them are meetings ?

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


Question: How many publishers have published more than 3 puzzle games?

SELECT COUNT(T.publisher_name) FROM ( SELECT T3.publisher_name, COUNT(DISTINCT T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' GROUP BY T3.publisher_name HAVING COUNT(DISTINCT T1.id) > 3 ) t

How many publishers have published more than 3 puzzle games ?

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


Question: Indicate the country name of the city Las Marias.

SELECT T1.county FROM country AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Las Marias'

Indicate the country name of the city Las Marias .

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


Question: List the long name of teams with above-average build-up play passing in 2012.

SELECT DISTINCT t4.team_long_name FROM Team_Attributes AS t3 INNER JOIN Team AS t4 ON t3.team_api_id = t4.team_api_id WHERE SUBSTR(t3.`date`, 1, 4) = '2012' AND t3.buildUpPlayPassing > ( SELECT CAST(SUM(t2.buildUpPlayPassing) AS REAL) / COUNT(t1.id) FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE STRFTIME('%Y',t2.`date`) = '2012')

List the long name of teams with above - average build - up play passing in 2012 .

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


Question: Among the unemployed students, how many of them have no payment due?

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

Among the unemployed students , how many of them have no payment due ?

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


Question: Calculate the average number of current male legislators who chose Democrat from 2000 until 2021.

SELECT CAST(COUNT(T1.bioguide_id) AS REAL) / 22 FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND CAST(T2.start AS DATE) >= 2000 AND CAST(T2.END AS DATE) <= 2021 AND T2.party = 'Democrat'

Calculate the average number of current male legislators who chose Democrat from 2000 until 2021 .

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


Question: Calculate the total number of orders placed by the company 'GROSELLA-Restaurante'.

SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'GROSELLA-Restaurante'

Calculate the total number of orders placed by the company ' GROSELLA - Restaurante ' .

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


Question: What are the names of products that are not 'white' in color and are not measured by the unit 'Handful'?

SELECT t1.product_name FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code JOIN ref_colors AS t3 ON t1.color_code  =  t3.color_code WHERE t3.color_description  =  "white" AND t2.unit_of_measure != "Handful"

What are the names of products that are not ' white ' in color and are not measured by the unit ' Handful ' ?

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


Question: List the titles of movies directed by Jack Kinney that were released before 1947.

SELECT T1.movie_title FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Jack Kinney' AND SUBSTR(T1.release_date, LENGTH(T1.release_date) - 1, LENGTH(T1.release_date)) < '47'

List the titles of movies directed by Jack Kinney that were released before 1947 .

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


Question: From which city were more tweets posted, Bangkok or Chiang Mai?

SELECT SUM(CASE WHEN T2.City = 'Bangkok' THEN 1 ELSE 0 END) AS bNum , SUM(CASE WHEN T2.City = 'Chiang Mai' THEN 1 ELSE 0 END) AS cNum FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City IN ('Bangkok', 'Chiang Mai')

From which city were more tweets posted , Bangkok or Chiang Mai ?

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


Question: Show the most common nationality of pilots.

SELECT Nationality FROM pilot GROUP BY Nationality ORDER BY COUNT(*) DESC LIMIT 1

Show the most common nationality of pilots .


Question: Please list the texts of the top 3 tweets with the most number of unique users seeing the tweet.

SELECT text FROM twitter ORDER BY Reach DESC LIMIT 3

Please list the texts of the top 3 tweets with the most number of unique users seeing the tweet .

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


Question: What is the general description for case number JB106010?

SELECT T1.primary_description FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.case_number = 'JB106010'

What is the general description for case number JB106010 ?

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


Question: Which trip started from the station with the largest dock count? Give me the trip id.

SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1

Which trip started from the station with the largest dock count ? Give me the trip i d.

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


Question: How many images contain 'bridge' as an object element?

SELECT COUNT(DISTINCT T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'bridge'

How many images contain ' bridge ' as an object element ?


Question: Show the transaction type code that occurs the fewest times.

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

Show the transaction type code that occurs the fewest times .

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


Question: Please list the teams that have played in 1922's Stanley Cup finals.

SELECT T2.name FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.year = '1922'

Please list the teams that have played in 1922 's Stanley Cup finals .


Question: Please provide the IDs of the 3 female clients with the largest loans.

SELECT T1.client_id FROM client AS T1 INNER JOIN disp AS T4 on T1.client_id= T4.client_id INNER JOIN account AS T2 ON T4.account_id = T2.account_id  INNER JOIN loan AS T3 ON T2.account_id = T3.account_id and T4.account_id = T3.account_id WHERE T1.gender = 'F' ORDER BY T3.amount DESC LIMIT 3

Please provide the IDs of the 3 female clients with the largest loans .

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


Question: Please list all the biwords pairs with "àbac" as its first word.

SELECT T1.word AS W1, T3.word AS W2 FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'àbac'

Please list all the biwords pairs with " àbac " as its first word .

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


Question: Show all agency ids without any client.

SELECT agency_id FROM Agencies EXCEPT SELECT agency_id FROM Clients

Show all agency ids without any client .


Question: Show names for all vehicles in descending order of model year.

SELECT name FROM vehicles ORDER BY model_year DESC

Show names for all vehicles in descending order of model year .

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


Question: Give me the distinct id and price for all goods whose price is below the average of all goods?

SELECT DISTINCT id ,  price FROM goods WHERE price  <  (SELECT avg(price) FROM goods)

Give me the distinct i d and price for all goods whose price is below the average of all goods ?

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


Question: Show the full Comment of the method "DE2_UE_Fahrradkurier.de2_uebung_fahrradkurierDataSet1TableAdapters.TableAdapterManager.UpdateInsertedRows".

SELECT FullComment FROM Method WHERE Name = 'DE2_UE_Fahrradkurier.de2_uebung_fahrradkurierDataSet1TableAdapters.TableAdapterManager.UpdateInsertedRows'

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


Question: How many collections that are related to collection named Best?

SELECT count(DISTINCT T1.Related_Collection_ID) FROM Collection_Subset_Members AS T1 JOIN Collections AS T2 ON T1.Collection_ID  =  T2.Collection_ID WHERE T2.Collection_Name = "Best";

How many collections that are related to collection named Best ?

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


Question: Calculate the average height of all neutral superheroes.

SELECT AVG(T1.height_cm) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'

Calculate the average height of all neutral superheroes .


Question: How many customers in total?


Question: Among all the production technicians, how many have a below average pay rate for a production technician?

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' AND T2.Rate < ( SELECT AVG(T2.Rate) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' )

Among all the production technicians , how many have a below average pay rate for a production technician ?

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


Question: Please list director IDs who have the quality of at least 3 and have made at least 2 different genres of movies.

SELECT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality >= 3 GROUP BY T1.directorid HAVING COUNT(T2.movieid) >= 2

Please list director IDs who have the quality of at least 3 and have made at least 2 different genres of movies .

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


Question: What are the student ID and login name of the student who are enrolled in the most courses?

SELECT T1.student_id ,  T2.login_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id ORDER BY COUNT(*) DESC LIMIT 1

What are the student ID and login name of the student who are enrolled in the most courses ?

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


Question: What is the nationality of the journalist with the largest number of years working?

SELECT Nationality FROM journalist ORDER BY Years_working DESC LIMIT 1

What is the nationality of the journalist with the largest number of years working ?

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


Question: Name the teams played in a match which resulted in a tie in 2015.

SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Team_1 OR T1.Team_Id = T2.Team_2 INNER JOIN Win_By AS T3 ON T2.Win_Type = T3.Win_Id WHERE SUBSTR(T2.Match_Date, 1, 4) = '2015' AND T3.Win_Type = 'Tie' LIMIT 1

Name the teams played in a match which resulted in a tie in 2015 .

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


Question: Which city has most population other than its capital in Bangladesh?

SELECT T3.Name FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T1.Name = 'Bangladesh' AND T3.Name <> T1.Capital ORDER BY T3.Population DESC LIMIT 1

Which city has most population other than its capital in Bangladesh ?

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


Question: Find the commander's name, email address, and phone number of the Ogden district.

SELECT commander, email, phone FROM District WHERE district_name = 'Ogden'

Find the commander 's name , email address , and phone number of the Ogden district .

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


Question: How many students does each advisor have?

SELECT advisor ,  count(*) FROM Student GROUP BY advisor

How many students does each advisor have ?


Question: Calculate the percentage of pages that have 1500 different words.

SELECT CAST(COUNT(CASE WHEN words = 1500 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(page) FROM pages WHERE words > 300 LIMIT 3

Calculate the percentage of pages that have 1500 different words .

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


Question: Among the coaches who have served more than 2 NBA teams, during which coach's period of coaching, a team has the least numbers of games lost in the post-season games?

SELECT coachID FROM coaches WHERE lgID = 'NBA' AND post_wins != 0 AND post_losses != 0 AND coachID IN ( SELECT coachID FROM coaches WHERE lgID = 'NBA' GROUP BY coachID HAVING COUNT(tmID) > 2 ) ORDER BY post_losses ASC LIMIT 1

Among the coaches who have served more than 2 NBA teams , during which coach 's period of coaching , a team has the least numbers of games lost in the post - season games ?

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


Question: Among the students enrolled in UCLA, what is the percentage of male students in the air force department?

SELECT CAST(COUNT(T4.name) AS REAL) * 100 / COUNT(T2.name) FROM enlist AS T1 INNER JOIN person AS T2 ON T1.name = T2.name INNER JOIN enrolled AS T3 ON T3.name = T2.name LEFT JOIN male AS T4 ON T2.name = T4.name WHERE T3.school = 'ucla' AND T1.organ = 'air_force'

Among the students enrolled in UCLA , what is the percentage of male students in the air force department ?

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


Question: What is the container type, brand name and star rating for root beer ID 10054?

SELECT T4.ContainerType, T3.BrandName, T1.StarRating FROM rootbeerreview AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID INNER JOIN rootbeer AS T4 ON T2.RootBeerID = T4.RootBeerID WHERE T2.RootBeerID = 100054

What is the container type , brand name and star rating for root beer ID 10054 ?

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


Question: List all the organisations of students who filed for bankcrupcy.

SELECT T2.organ FROM filed_for_bankrupcy AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name

List all the organisations of students who filed for bankcrupcy .

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


Question: What is the most purchased products during the rainy days in June 2013 in weather station 9?

SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T3.station_nbr = 9 AND T1.`date` LIKE '%2013-06%' AND codesum = 'RA' ORDER BY T1.units DESC LIMIT 1

What is the most purchased products during the rainy days in June 2013 in weather station 9 ?

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


Question: What are the names of climbers and the corresponding heights of the mountains that they climb?

SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

What are the names of climbers and the corresponding heights of the mountains that they climb ?

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


Question: Show flight number for all flights with more than 2000 distance.

SELECT flno FROM Flight WHERE distance  >  2000

Show flight number for all flights with more than 2000 distance .

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


Question: Among the Ivy League Schools, which school have the highest number of Hispanic graduates of all time?

SELECT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname IN ( 'Brown University', 'Columbia University', 'Cornell University', 'Dartmouth College', 'Harvard University', 'Princeton University', 'University of Pennsylvania', 'Yale University' ) AND T2.race = 'H' GROUP BY T1.chronname ORDER BY SUM(T2.grad_cohort) DESC LIMIT 1

Among the Ivy League Schools , which school have the highest number of Hispanic graduates of all time ?


Question: What instrument did the musician with last name "Heilo" use in the song "Le Pop"?

SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId JOIN Instruments AS T4 ON T4.songid  =  T3.songid AND T4.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo" AND T3.title  =  "Le Pop"

What instrument did the musician with last name " Heilo " use in the song " Le Pop " ?

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


Question: Find the delegates who are from counties with population below 100000.

SELECT T2.Delegate FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T1.Population  <  100000

Find the delegates who are from counties with population below 100000 .

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


Question: How many times did the Yale University achieve a score of no less than 10 in the Quality of Education Rank?

SELECT COUNT(*) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T3.university_name = 'Yale University' AND T2.score >= 10 AND T1.criteria_name = 'Quality of Education Rank'

How many times did the Yale University achieve a score of no less than 10 in the Quality of Education Rank ?

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


Question: How many products do we have?


Question: What is the average number of working horses of farms with more than 5000 total number of horses?

SELECT avg(Working_Horses) FROM farm WHERE Total_Horses  >  5000

What is the average number of working horses of farms with more than 5000 total number of horses ?

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


Question: What are the names of all the media types?

What are the names of all the media types ?


Question: List the name of all products along with the number of complaints that they have received.

SELECT t1.product_name ,  count(*) FROM products AS t1 JOIN complaints AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_name

List the name of all products along with the number of complaints that they have received .

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


Question: What is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at South Park?

SELECT CAST(SUM(IIF(subscription_type = 'Subscriber', 1, 0)) AS REAL) / SUM(IIF(subscription_type = 'Customer', 1, 0)) FROM trip WHERE start_station_name = '2nd at South Park' AND end_station_name = '2nd at South Park'

What is the ratio for subscriber to customer given that the starting and the ending stations is 2nd at South Park ?

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


Question: List all the actors who have played characters with "captain" in their names.

SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name LIKE '%captain%'

List all the actors who have played characters with " captain " in their names .

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


Question: What are the details and ways to get to tourist attractions related to royal family?

SELECT T1.Royal_Family_Details ,  T2.How_to_Get_There FROM ROYAL_FAMILY AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Royal_Family_ID  =  T2.Tourist_Attraction_ID

What are the details and ways to get to tourist attractions related to royal family ?

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


Question: What is the average replacement cost of the films under the category of "Horror"?

SELECT AVG(T3.replacement_cost) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T2.name = 'Horror'

What is the average replacement cost of the films under the category of " Horror " ?

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


Question: Please name any three sovereign nations that have been governed by the republic since 1991.

SELECT country FROM politics WHERE government = 'republic' AND STRFTIME('%Y', independence) >= '1991' AND country IN ( SELECT country FROM country ) ORDER BY independence LIMIT 3

Please name any three sovereign nations that have been governed by the republic since 1991 .

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


Question: List the name of clubs in ascending alphabetical order.

List the name of clubs in ascending alphabetical order .


Question: How many authors are there?


Question: Show all cities along with the number of drama workshop groups in each city.

SELECT T1.City_Town ,  count(*) FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID GROUP BY T1.City_Town

Show all cities along with the number of drama workshop groups in each city .

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


Question: Show the avatar of the user who gave the rating at 2019/10/17 1:36:36.

SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_timestamp_utc LIKE '2019-10-17 01:36:36'

Show the avatar of the user who gave the rating at 2019/10/17 1:36:36 .

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


Question: List the title of the episode with stars greater than the 70% of average stars of all episodes.

SELECT DISTINCT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars > 0.7 * ( SELECT AVG(stars) FROM Vote );

List the title of the episode with stars greater than the 70 % of average stars of all episodes .

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


Question: How many distinct customer and services details are there?

SELECT count(DISTINCT customers_and_services_details) FROM customers_and_services

How many distinct customer and services details are there ?

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


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

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

What are the vocal types used in song " Le Pop " ?

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


Question: Among the actors who acted in UK movies, what percentage of actors received a rating of at least 3?

SELECT CAST(SUM(IIF(T3.a_quality >= 3, 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T1.country = 'UK'

Among the actors who acted in UK movies , what percentage of actors received a rating of at least 3 ?

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


Question: What is the discount percentage of "LL Road Frame Sale"?

SELECT DiscountPct FROM SpecialOffer WHERE Description = 'LL Road Frame Sale'

What is the discount percentage of " LL Road Frame Sale " ?

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


Question: Find number of tracks in each genre?

SELECT count(*) ,  T1.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id GROUP BY T1.name;

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


Question: What are the names of scientists who are not working on the project with the most hours?

SELECT name FROM scientists EXCEPT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)

What are the names of scientists who are not working on the project with the most hours ?

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


Question: How many flights were there on 2018/8/1?

SELECT COUNT(*) FROM Airlines WHERE FL_DATE = '2018/8/1'

How many flights were there on 2018/8/1 ?


Question: How many times was "Blanket Beverly" rented?

SELECT COUNT(T3.rental_id) FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id WHERE T1.title = 'Blanket Beverly'

How many times was " Blanket Beverly " rented ?

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


Question: Count the number of customers who hold an account.

SELECT count(DISTINCT customer_id) FROM Accounts

Count the number of customers who hold an account .


Question: What are the ids, date opened, name, and other details for all accounts?

SELECT account_id ,  date_account_opened ,  account_name ,  other_account_details FROM Accounts

What are the ids , date opened , name , and other details for all accounts ?

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


Question: What is the average hours across all projects?

What is the average hours across all projects ?


Question: In the Venus and Adonis, what is the description of the last scene listed?

SELECT T2.Description FROM works AS T1 RIGHT JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Venus and Adonis' ORDER BY T2.Scene DESC LIMIT 1

In the Venus and Adonis , what is the description of the last scene listed ?

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


Question: What are the conference name and journal name of paper written by Shueh-Lin Yau? List down the name of co-authors and provide the title of that paper.

SELECT T1.ConferenceId, T1.JournalId, T2.Name, T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id INNER JOIN Journal AS T4 ON T1.JournalId = T4.Id WHERE T2.Name = 'Shueh-Lin Yau'

What are the conference name and journal name of paper written by Shueh - Lin Yau ? List down the name of co - authors and provide the title of that paper .

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


Question: What are the names of the movie that was rated by the user between 1/1/2013 to 12/31/2013 by the user who created the list "100 Greatest Living American Filmmakers"? Calculate for the average rating score of those movies in 2013.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists AS T3 ON T3.user_id = T1.user_id WHERE T1.rating_timestamp_utc BETWEEN '2013-01-01' AND '2013-12-31' AND T3.list_title = '100 Greatest Living American Filmmakers'

What are the names of the movie that was rated by the user between 1/1/2013 to 12/31/2013 by the user who created the list " 100 Greatest Living American Filmmakers " ? Calculate for the average rating score of those movies in 2013 .

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


Question: Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010.

SELECT CAST(COUNT(CASE WHEN T2.position <> 1 THEN T2.position END) AS REAL) * 100 / COUNT(T2.driverStandingsId) FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.surname = 'Hamilton' AND T1.year >= 2010

Calculate the percentage whereby Hamilton was not at the 1st track of the the f1 circuit since 2010 .

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


Question: Find out the popularity of the movies with the highest vote count.

SELECT popularity FROM movie ORDER BY vote_COUNT DESC LIMIT 1

Find out the popularity of the movies with the highest vote count .

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


Question: How many students will be impacted for the Fit Firsties! Project?

SELECT T2.students_reached FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Fit Firsties!'

How many students will be impacted for the Fit Firsties ! Project ?

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


Question: Among all the employees, how many percent more for the publishers than designers?

SELECT CAST(SUM(CASE WHEN T2.job_desc = 'publisher' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.job_desc = 'designer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.job_id) FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id

Among all the employees , how many percent more for the publishers than designers ?

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


Question: Which channels are not owned by CCTV? Give me the channel names.

SELECT name FROM channel WHERE OWNER != 'CCTV'

Which channels are not owned by CCTV ? Give me the channel names .

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


Question: What is the average room count of the apartments whose booking status code is "Provisional"?

SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"

What is the average room count of the apartments whose booking status code is " Provisional " ?

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


Question: Among the players from the ABA league, how many of them have the center position?

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'ABA' AND (T1.pos = 'C' OR T1.pos = 'F-C')

Among the players from the ABA league , how many of them have the center position ?

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


Question: Among all the incidents with no arrest made, what is the percentage of them having a generic description of "BATTERY" in the IUCR classification?

SELECT CAST(SUM(CASE WHEN T1.primary_description = 'BATTERY' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*)FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T2.arrest = 'FALSE'

Among all the incidents with no arrest made , what is the percentage of them having a generic description of " BATTERY " in the IUCR classification ?

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


Question: Count the total number of clubs.


Question: How many paragraphs are there in the longest chapter where Sir Richard Ratcliff appeared?

SELECT MAX(T2.ParagraphNum) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Sir Richard Ratcliff'

How many paragraphs are there in the longest chapter where Sir Richard Ratcliff appeared ?

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


Question: Find the number of classes in each school.

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

Find the number of classes in each school .


Question: Which cities have regional population above 10000000?

SELECT city FROM city WHERE regional_population  >  10000000

Which cities have regional population above 10000000 ?

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


Question: Calculate the percentage of people who were born after 1970 and from California.

SELECT CAST(SUM(CASE WHEN birth_region = 'California' AND SUBSTR(birthdate, 1, 4) > '1970' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(birthdate) FROM Person;

Calculate the percentage of people who were born after 1970 and from California .


Question: Find the code of boxes that are stored at the warehouses located at Chicago or New York.

SELECT T1.code FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' OR T2.location  =  'New York'

Find the code of boxes that are stored at the warehouses located at Chicago or New York .

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


Question: Among the LG brand users, calculate the percentage of the Nexus 5 model user. What is the ratio of male and female users of it?

SELECT SUM(IIF(T1.device_model = 'Nexus 5', 1, 0)) * 100 / COUNT(T1.device_id) AS per , SUM(IIF(T1.device_model = 'Nexus 5' AND T2.gender = 'M', 1, 0)) / SUM(IIF(T1.device_model = 'Nexus 5' AND T2.gender = 'F', 1, 0)) AS r FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'LG'

Among the LG brand users , calculate the percentage of the Nexus 5 model user . What is the ratio of male and female users of it ?

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


Question: What kind of currency did the customer paid at 16:25:00 in 2012/8/24?

SELECT DISTINCT T3.Currency FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN customers AS T3 ON T1.CustomerID = T3.CustomerID WHERE T1.Date = '2012-08-24' AND T1.Time = '16:25:00'

What kind of currency did the customer paid at 16:25:00 in 2012/8/24 ?

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


Question: Find the name of the patient who made the appointment with the most recent start date.

SELECT T1.name FROM patient AS T1 JOIN appointment AS T2 ON T1.ssn = T2.patient ORDER BY T2.start DESC LIMIT 1

Find the name of the patient who made the appointment with the most recent start date .

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


Question: What is the country that has the most perpetrators?

SELECT Country ,  COUNT(*) FROM perpetrator GROUP BY Country ORDER BY COUNT(*) DESC LIMIT 1

What is the country that has the most perpetrators ?


Question: Please list the name of the person who was in the Hall of Fame in the year 1978.

Please list the name of the person who was in the Hall of Fame in the year 1978 .

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


Question: List all the names of the stores assigned to the sales person with the id "277".

SELECT Name FROM Store WHERE SalesPersonID = 277

List all the names of the stores assigned to the sales person with the i d " 277 " .

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


Question: Which team did the youngest player who could be in F-G position play in the NBA?

SELECT T1.tmID FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T3.pos = 'F-G' AND T2.lgID = 'NBA' ORDER BY T3.birthDate DESC LIMIT 1

Which team did the youngest player who could be in F - G position play in the NBA ?

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


Question: What is the maximum, minimum and average market share of the listed browsers?

SELECT max(market_share) ,  min(market_share) ,  avg(market_share) FROM browser

What is the maximum , minimum and average market share of the listed browsers ?

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


Question: Which of the three segments—SME, LAM and KAM—has the biggest and lowest percentage increases in consumption paid in EUR between 2012 and 2013?

SELECT CAST((SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0))) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'SME' AND T2.Date LIKE '2012%', T2.Consumption, 0)), CAST(SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'LAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) , CAST(SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2013%', T2.Consumption, 0)) - SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) AS FLOAT) * 100 / SUM(IIF(T1.Segment = 'KAM' AND T2.Date LIKE '2012%', T2.Consumption, 0)) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID

Which of the three segments — SME , LAM and KAM — has the biggest and lowest percentage increases in consumption paid in EUR between 2012 and 2013 ?

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


Question: List the research staff details, and order in ascending order.

SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC

List the research staff details , and order in ascending order .

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


Question: Return the ids of documents that do not have expenses.

SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_with_expenses

Return the ids of documents that do not have expenses .

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


Question: How many vandalisms were arrested in the ward represented by Edward Burke?

SELECT SUM(CASE WHEN T1.alderman_last_name = 'Burke' THEN 1 ELSE 0 END) FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no INNER JOIN FBI_Code AS T3 ON T2.fbi_code_no = T3.fbi_code_no WHERE T3.title = 'Vandalism' AND T2.arrest = 'TRUE' AND T1.alderman_first_name = 'Edward'

How many vandalisms were arrested in the ward represented by Edward Burke ?

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


Question: Which driver was in the no. 4 grid formation when starting the race in 1989's Australian Grand Prix? Please give his forename and surname.

SELECT T3.forename, T3.surname FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T2.grid = 4 AND T1.name = 'Australian Grand Prix' AND T1.year = 1989

Which driver was in the no . 4 grid formation when starting the race in 1989 's Australian Grand Prix ? Please give his forename and surname .

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


Question: State the unemployed students who enlisted in marines.

SELECT T1.name FROM unemployed AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'marines'

State the unemployed students who enlisted in marines .


Question: Find the patient who most recently stayed in room 111.

SELECT patient FROM stay WHERE room  =  111 ORDER BY staystart DESC LIMIT 1

Find the patient who most recently stayed in room 111 .

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


Question: In which country was the winner of the Outstanding Voice-Over Performance award of 2009 born?

SELECT T1.birth_country FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Outstanding Voice-Over Performance' AND T2.year = 2009 AND T2.result = 'Winner';

In which country was the winner of the Outstanding Voice - Over Performance award of 2009 born ?

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


Question: List the car's name with a price worth greater than 85% of the average price of all cars.

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price * 100 > ( SELECT AVG(price) * 85 FROM price )

List the car 's name with a price worth greater than 85 % of the average price of all cars .

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


Question: How many Professors are in building NEB?

SELECT count(*) FROM Faculty WHERE Rank  =  "Professor" AND building  =  "NEB"

How many Professors are in building NEB ?


Question: Among all the parts under the type "promo brushed steel", how many of them have a total available quantity from all suppliers of under 5000?

SELECT SUM(num) FROM ( SELECT COUNT(T3.s_name) AS num FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_type = 'PROMO BRUSHED STEEL' GROUP BY T2.ps_partkey HAVING SUM(T2.ps_availqty) < 5000 ) T

Among all the parts under the type " promo brushed steel " , how many of them have a total available quantity from all suppliers of under 5000 ?

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


Question: Find the name and hours of project that has the most number of scientists.

SELECT T1.name ,  T1.hours FROM projects AS T1 JOIN assignedto AS T2 ON T1.code  =  T2.project GROUP BY T2.project ORDER BY count(*) DESC LIMIT 1

Find the name and hours of project that has the most number of scientists .

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


Question: Show the nominees that have nominated musicals for both "Tony Award" and "Drama Desk Award".

SELECT Nominee FROM musical WHERE Award  =  "Tony Award" INTERSECT SELECT Nominee FROM musical WHERE Award  =  "Drama Desk Award"

Show the nominees that have nominated musicals for both " Tony Award " and " Drama Desk Award " .

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


Question: Tally the email addresses and phone numbers of customers from Sacramento who gave a star rating of more than 3 in 2014.

SELECT DISTINCT T1.Email, T1.PhoneNumber FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.StarRating > 3 AND T1.City = 'Sacramento' AND T2.ReviewDate BETWEEN '2014-01-01' AND '2014-12-31'

Tally the email addresses and phone numbers of customers from Sacramento who gave a star rating of more than 3 in 2014 .

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


Question: What is the description of the role named "Proof Reader"?

SELECT role_description FROM ROLES WHERE role_name  =  "Proof Reader"

What is the description of the role named " Proof Reader " ?

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