Question: For each donation not from a teacher, state the donor account id and calculate the percentage of donation given for optional support.

SELECT donor_acctid, donation_optional_support / donation_total FROM donations WHERE is_teacher_acct = 'f'

For each donation not from a teacher , state the donor account i d and calculate the percentage of donation given for optional support .

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


Question: How many products are there?


Question: Find the number of distinct courses that have enrolled students.

SELECT count(course_id) FROM Student_Course_Enrolment

Find the number of distinct courses that have enrolled students .


Question: List out the first name of legislators who are senior Senator.

SELECT T1.first_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state_rank = 'senior' GROUP BY T1.first_name

List out the first name of legislators who are senior Senator .

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


Question: What language was the most used in movies released in 2006?

SELECT T.language_id FROM ( SELECT T1.language_id, COUNT(T1.language_id) AS num FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE STRFTIME('%Y',T1.release_year) = '2006' GROUP BY T1.language_id ) AS T ORDER BY T.num DESC LIMIT 1

What language was the most used in movies released in 2006 ?

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


Question: List the email of customers that bought the book titled Switch on the Night.

SELECT T4.email FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.title = 'Switch on the Night'

List the email of customers that bought the book titled Switch on the Night .

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


Question: List all the customers in increasing order of IDs.

SELECT customer_id ,  customer_name FROM customers ORDER BY customer_id ASC

List all the customers in increasing order of IDs .


Question: How many faculty, in total, are there in the year 2002?

SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002

How many faculty , in total , are there in the year 2002 ?

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


Question: In the year 1998, how many home wins did the team which had the 1st round, 12th pick have that year?

SELECT T2.homeWon FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 12 AND T1.draftYear = 1998

In the year 1998 , how many home wins did the team which had the 1st round , 12th pick have that year ?

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


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

SELECT Total_Points FROM gymnast ORDER BY Floor_Exercise_Points DESC

List the total points of gymnasts in descending order of floor exercise points .

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


Question: Which country has both drivers with make "Dodge" and drivers with make "Chevrolet"?

SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Dodge" INTERSECT SELECT t2.country FROM driver AS t1 JOIN country AS t2 ON t1.country  =  t2.country_id WHERE t1.Make  =  "Chevrolet"

Which country has both drivers with make " Dodge " and drivers with make " Chevrolet " ?

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


Question: What is the most common allergy among patients?

SELECT DESCRIPTION FROM allergies GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1

What is the most common allergy among patients ?


Question: What is the bussiness id for Mr. Hung-Fu Ting?

SELECT BusinessEntityID FROM Person WHERE Title = 'Mr.' AND FirstName = 'Hung-Fu' AND LastName = 'Ting'

What is the bussiness i d for Mr. Hung - Fu Ting ?

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


Question: Find out the send dates of the documents with the grant amount of more than 5000 were granted by organisation type described

SELECT T1.sent_date FROM documents AS T1 JOIN Grants AS T2 ON T1.grant_id  =  T2.grant_id JOIN Organisations AS T3 ON T2.organisation_id  =  T3.organisation_id JOIN organisation_Types AS T4 ON T3.organisation_type  =  T4.organisation_type WHERE T2.grant_amount  >  5000 AND T4.organisation_type_description  =  'Research'

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


Question: What is the average score for "Chairman Bao" in all its unscheduled routine inspections?

SELECT CAST(SUM(CASE WHEN T2.name = 'Chairman Bao' THEN T1.score ELSE 0 END) AS REAL) / COUNT(CASE WHEN T1.type = 'Routine - Unscheduled' THEN T1.score ELSE 0 END) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id

What is the average score for " Chairman Bao " in all its unscheduled routine inspections ?

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


Question: Which classes have more than two captains?

SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*)  >  2

Which classes have more than two captains ?


Question: How many times greater is the appearances of the biword pair "a base" than "a decimal"?

SELECT CAST(occurrences AS REAL) / ( SELECT occurrences FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'decimal' ) ) FROM biwords WHERE w1st = ( SELECT wid FROM words WHERE word = 'a' ) AND w2nd = ( SELECT wid FROM words WHERE word = 'base' )

How many times greater is the appearances of the biword pair " a base " than " a decimal " ?

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


Question: Sort the list of names and costs of all procedures in the descending order of cost.

SELECT name ,  cost FROM procedures ORDER BY cost DESC

Sort the list of names and costs of all procedures in the descending order of cost .

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


Question: What is the full name of the employee who was responsible for the most inspection in March 2016?

SELECT T3.first_name, T3.last_name FROM ( SELECT T1.employee_id, COUNT(T1.inspection_id) FROM inspection AS T1 WHERE strftime('%Y-%m', T1.inspection_date) = '2016-03' GROUP BY T1.employee_id ORDER BY COUNT(T1.inspection_id) DESC LIMIT 1 ) AS T2 INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id

What is the full name of the employee who was responsible for the most inspection in March 2016 ?

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


Question: Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards. State if these cards have missing or degraded properties and values.

SELECT T1.id, T2.text, T1.hasContentWarning FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.artist = 'Stephen Daniele'

Find all cards illustrated by Stephen Daniel and describe the text of the ruling of these cards . State if these cards have missing or degraded properties and values .

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


Question: Give the social security number of the female Irish patient allergic to grass pollen.

SELECT T2.ssn FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Allergy to grass pollen' AND T2.ethnicity = 'irish' AND T2.gender = 'F'

Give the social security number of the female Irish patient allergic to grass pollen .

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


Question: List all the flavors of Croissant available in this bakery.

SELECT flavor FROM goods WHERE food  =  "Croissant"

List all the flavors of Croissant available in this bakery .


Question: List the hardware model name for the phons that were produced by "Nokia Corporation" but whose screen mode type is not Text.

SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE t2.Company_name  =  "Nokia Corporation" AND T1.Type != "Text";

List the hardware model name for the phons that were produced by " Nokia Corporation " but whose screen mode type is not Text .

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


Question: Among the best actors, how many of them got a rating of 5 to the movies they starred?

SELECT COUNT(T1.actorid) FROM actors AS T1 INNER JOIN movies2actors AS T2 ON T1.actorid = T2.actorid INNER JOIN u2base AS T3 ON T2.movieid = T3.movieid WHERE T1.a_quality = 5 AND T3.rating = 5

Among the best actors , how many of them got a rating of 5 to the movies they starred ?

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


Question: How many customers in the Northeast use Microsoft email?

SELECT COUNT(T1.email) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T3.Region = 'Northeast' AND T1.email LIKE '%@outlook.com'

How many customers in the Northeast use Microsoft email ?


Question: How many faculty members do we have for each rank and gender?

SELECT rank ,  sex ,  count(*) FROM Faculty GROUP BY rank ,  sex

How many faculty members do we have for each rank and gender ?


Question: Among the inspections done by sanitarian Joshua Rosa, how many of them have the result of "pass"?

SELECT COUNT(T2.inspection_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.results = 'Pass' AND T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'

Among the inspections done by sanitarian Joshua Rosa , how many of them have the result of " pass " ?

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


Question: What is the subject of the series SP.DYN.AMRT.MA and what does it pertain to?

SELECT DISTINCT T1.Topic, T2.Description FROM Series AS T1 INNER JOIN SeriesNotes AS T2 ON T1.SeriesCode = T2.Seriescode WHERE T1.SeriesCode = 'SP.DYN.AMRT.MA'

What is the subject of the series SP.DYN.AMRT.MA and what does it pertain to ?

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


Question: Who was the driver of truck no.3 on 2016/9/19? Tell the full name.

SELECT T3.first_name, T3.last_name FROM truck AS T1 INNER JOIN shipment AS T2 ON T1.truck_id = T2.truck_id INNER JOIN driver AS T3 ON T3.driver_id = T2.driver_id WHERE T1.truck_id = '3' AND T2.ship_date = '2016-09-19'

Who was the driver of truck no.3 on 2016/9/19 ? Tell the full name .

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


Question: What is the total expense for the Yearly Kickoff?

SELECT SUM(T3.cost) FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'Yearly Kickoff'

What is the total expense for the Yearly Kickoff ?


Question: Which recipe needs the most frozen raspberries in light syrup? State its title.

SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'frozen raspberries in light syrup' AND T2.max_qty = T2.min_qty

Which recipe needs the most frozen raspberries in light syrup ? State its title .

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


Question: What is the address that received the most orders?

SELECT T2.street_name, T2.city FROM cust_order AS T1 INNER JOIN address AS T2 ON T1.dest_address_id = T2.address_id GROUP BY T2.street_number, T2.street_name, T2.city ORDER BY COUNT(T1.dest_address_id) DESC LIMIT 1

What is the address that received the most orders ?


Question: List the first names of employees with trading quantity for more than 500.

SELECT DISTINCT T1.FirstName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID WHERE T2.Quantity > 500

List the first names of employees with trading quantity for more than 500 .

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


Question: How many competitor ids does Martina Kohlov have?

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

How many competitor ids does Martina Kohlov have ?

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


Question: Return reviewer name, movie title, stars, and ratingDate. And sort the data first by reviewer name, then by movie title, and lastly by number of stars.

SELECT T3.name ,  T2.title ,  T1.stars ,  T1.ratingDate FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID ORDER BY T3.name ,  T2.title ,  T1.stars

Return reviewer name , movie title , stars , and ratingDate . And sort the data first by reviewer name , then by movie title , and lastly by number of stars .

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


Question: Give the number of papers that were published on "IEEE Transactions on Nuclear Science" in 1999.

SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'IEEE Transactions on Nuclear Science' AND T2.Year = 1999

Give the number of papers that were published on " IEEE Transactions on Nuclear Science " in 1999 .

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


Question: How much donations have been collected for project 'Whistle While We Work!'?

SELECT SUM(T2.donation_to_project) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title = 'Whistle While We Work!'

How much donations have been collected for project ' Whistle While We Work ! ' ?

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


Question: Please list two people who are the nominees for the "Outstanding Voice-Over Performance" award for season 20.

SELECT person FROM Award WHERE result = 'Nominee' AND award = 'Outstanding Voice-Over Performance' AND episode_id LIKE 'S20%' LIMIT 2;

Please list two people who are the nominees for the " Outstanding Voice - Over Performance " award for season 20 .

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


Question: State the address location of store No.1.

SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 1

State the address location of store No.1 .


Question: List the director's name of the movies released between 1/01/1916 and 12/31/1925.

SELECT T2.person_name FROM movie_cast AS T1 INNER JOIN person AS T2 ON T1.person_id = T2.person_id INNER JOIN movie AS T3 ON T1.movie_id = T3.movie_id INNER JOIN movie_crew AS T4 ON T1.movie_id = T4.movie_id WHERE T4.job = 'Director' AND T3.release_date BETWEEN '1916-01-01' AND '1925-12-31'

List the director 's name of the movies released between 1/01/1916 and 12/31/1925 .

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


Question: Among the restaurants on street number below 1000, how many of them are in Railroad St.?

SELECT COUNT(city) FROM location WHERE street_name = 'railroad' AND street_num < 1000

Among the restaurants on street number below 1000 , how many of them are in Railroad St. ?

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


Question: Where us the club named "Tennis Club" located?

SELECT clublocation FROM club WHERE clubname  =  "Tennis Club"

Where us the club named " Tennis Club " located ?

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


Question: How many papers have "Atsushi Ohori" published?

SELECT count(*) FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE  t1.fname  =  "Atsushi" AND t1.lname  =  "Ohori"

How many papers have " Atsushi Ohori " published ?


Question: Tell me the highest, lowest, and average cost of procedures.

SELECT MAX(cost) ,  MIN(cost) ,  AVG(cost) FROM procedures

Tell me the highest , lowest , and average cost of procedures .


Question: How many products were ordered in the order with the highest freight?

SELECT COUNT(T2.ProductID) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID GROUP BY T2.ProductID ORDER BY COUNT(T1.Freight) DESC LIMIT 1

How many products were ordered in the order with the highest freight ?

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


Question: Please name one attribute that business number 2 does not have.

SELECT T1.attribute_name FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value LIKE 'none' LIMIT 1

Please name one attribute that business number 2 does not have .


Question: Please calculate the number of clients by each division.

SELECT T2.division, COUNT(T2.division) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division

Please calculate the number of clients by each division .


Question: Which catalog contents has price above 700 dollars? Show their catalog entry names and capacities.

SELECT catalog_entry_name ,  capacity FROM Catalog_Contents WHERE price_in_dollars  >  700

Which catalog contents has price above 700 dollars ? Show their catalog entry names and capacities .

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


Question: order all gas station locations by the opening year.

SELECT LOCATION FROM gas_station ORDER BY open_year

order all gas station locations by the opening year .

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


Question: Which weather station has the highest number of stores?

SELECT station_nbr FROM relation GROUP BY station_nbr ORDER BY COUNT(store_nbr) DESC LIMIT 1

Which weather station has the highest number of stores ?


Question: Which role have won at least two awards for the entire season and list out the name?

SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id GROUP BY T2.role HAVING COUNT(T2.award_id) > 1

Which role have won at least two awards for the entire season and list out the name ?

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


Question: Show all information of all unrated movies.

SELECT * FROM movies WHERE rating  =  'null'

Show all information of all unrated movies .


Question: How many sales teams are there in the Midwest?

SELECT SUM(CASE WHEN Region = 'Midwest' THEN 1 ELSE 0 END) FROM `Sales Team`

How many sales teams are there in the Midwest ?


Question: What is the total population for all the districts that have an area larger tahn the average city area?

SELECT sum(city_population) FROM district WHERE city_area  >  (SELECT avg(city_area) FROM district)

What is the total population for all the districts that have an area larger tahn the average city area ?

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


Question: How much total loan does each student have ? List the student ids and the amounts .

select student_id ,  sum(amount_of_loan) from student_loans group by student_id

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


Question: When was the earliest date of loan?

SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1


Question: Select the area and government website of the district with the smallest population.

SELECT area_km ,  Government_website FROM district ORDER BY Population LIMIT 1

Select the area and government website of the district with the smallest population .

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


Question: Which director is in charge of the most programs?

SELECT t2.name FROM program AS t1 JOIN director AS t2 ON t1.director_id  =  t2.director_id GROUP BY t1.director_id ORDER BY count(*) DESC LIMIT 1

Which director is in charge of the most programs ?


Question: What is the badge name that user 'SilentGhost' obtained?

SELECT T2.Name FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'SilentGhost'

What is the badge name that user ' SilentGhost ' obtained ?

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


Question: Of all the orders that have ordered Ikura, how many of them enjoys a unit price that's lower than its standard unit price?

SELECT COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura' AND T2.UnitPrice < T1.UnitPrice

Of all the orders that have ordered Ikura , how many of them enjoys a unit price that 's lower than its standard unit price ?

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


Question: Which nations have both hosts of age above 45 and hosts of age below 35?

SELECT Nationality FROM HOST WHERE Age  >  45 INTERSECT SELECT Nationality FROM HOST WHERE Age  <  35

Which nations have both hosts of age above 45 and hosts of age below 35 ?

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


Question: Where is the club "Pen and Paper Gaming" located?

SELECT clublocation FROM club WHERE clubname  =  "Pen and Paper Gaming"

Where is the club " Pen and Paper Gaming " located ?

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


Question: What are the songs in volumes that have resulted in a nomination at music festivals?

SELECT T2.Song FROM music_festival AS T1 JOIN volume AS T2 ON T1.Volume  =  T2.Volume_ID WHERE T1.Result  =  "Nominated"

What are the songs in volumes that have resulted in a nomination at music festivals ?

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


Question: List the name of the players born between 1970 and 1990 in descending order of age.

SELECT Player_Name FROM Player WHERE DOB BETWEEN '1970-01-01' AND '1990-12-31' ORDER BY DOB DESC

List the name of the players born between 1970 and 1990 in descending order of age .


Question: Which category is the film "Beach Heartbreakers" falls into?

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

Which category is the film " Beach Heartbreakers " falls into ?

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


Question: What are the names of shops that have more than a single kind of device in stock?

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

What are the names of shops that have more than a single kind of device in stock ?

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


Question: Among the coaches who have taught the Philadelphia Flyers, how many of them are born in March?

SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthMon = 3

Among the coaches who have taught the Philadelphia Flyers , how many of them are born in March ?

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


Question: What company has a Colonial Voice card that expired in March 2005?

SELECT T2.BusinessEntityID FROM CreditCard AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID WHERE T1.CardType = 'ColonialVoice' AND T1.ExpMonth = 3 AND T1.ExpYear = 2005

What company has a Colonial Voice card that expired in March 2005 ?

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


Question: How much salary does Jessica Anthony receive?

SELECT salary FROM employee WHERE first_name = 'Jessica' AND last_name = 'Anthony'

How much salary does Jessica Anthony receive ?


Question: How many customers use each payment method?

SELECT payment_method_code ,  count(*) FROM customers GROUP BY payment_method_code

How many customers use each payment method ?


Question: Indicate the percentage of inactive customers at store no.1.

SELECT CAST(SUM(CASE WHEN active = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(customer_id) FROM customer WHERE store_id = 1

Indicate the percentage of inactive customers at store no.1 .


Question: What are the speeds of the longest roller coaster?

SELECT Speed FROM roller_coaster ORDER BY LENGTH DESC LIMIT 1

What are the speeds of the longest roller coaster ?

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


Question: How many products are in the 'Spices' category and have a typical price of over 1000?

SELECT count(*) FROM products WHERE product_category_code  =  "Spices" AND typical_buying_price  >  1000

How many products are in the ' Spices ' category and have a typical price of over 1000 ?

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


Question: Who is the friend of Zach with longest year relationship?

SELECT friend FROM PersonFriend WHERE name =  'Zach' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')

Who is the friend of Zach with longest year relationship ?

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


Question: What are the collection subsets that the collection named 'Best' in?

SELECT DISTINCT T1.Collection_Subset_Name FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID =  T2.Collection_Subset_ID JOIN Collections AS T3 ON T2.Collection_ID =  T3.Collection_ID WHERE T3.Collection_Name = "Best";

What are the collection subsets that the collection named ' Best ' in ?

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


Question: How many active employees whose payrate is equal or below 30 per hour.

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.CurrentFlag = 1 AND T2.Rate <= 30

How many active employees whose payrate is equal or below 30 per hour .

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


Question: How many customers do not have an account?

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

How many customers do not have an account ?


Question: In the 2015–2016 season, how many games were played in the Italian Serie A league?

SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t1.name = 'Italy Serie A' AND t2.season = '2015/2016'

In the 2015–2016 season , how many games were played in the Italian Serie A league ?

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


Question: Find the name and access counts of all documents, in alphabetic order of the document name.

SELECT document_name ,  access_count FROM documents ORDER BY document_name

Find the name and access counts of all documents , in alphabetic order of the document name .

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


Question: What is the number of players who have points less than 30 for each position?

SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION

What is the number of players who have points less than 30 for each position ?

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


Question: What is the smallest number of packages received and by whom ?

select t2.name ,  count(*) from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber group by t1.recipient order by count(*) limit 1;

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


Question: What is average age of all sailors who have a rating of 7?

SELECT AVG(age) FROM Sailors WHERE rating  =  7

What is average age of all sailors who have a rating of 7 ?

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


Question: What is the most expensive product?

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


Question: Provide the full names and emails of unpaid research assistants.

SELECT T2.f_name, T2.l_name, T2.email FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'free'

Provide the full names and emails of unpaid research assistants .


Question: give me names of all compatible browsers and accelerators in the descending order of compatible year

SELECT T2.name ,  T3.name FROM accelerator_compatible_browser AS T1 JOIN browser AS T2 ON T1.browser_id  =  T2.id JOIN web_client_accelerator AS T3 ON T1.accelerator_id  =  T3.id ORDER BY T1.compatible_since_year DESC

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


Question: List all the tires businesses that are opened everyday.

SELECT DISTINCT T2.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 T1.category_name = 'Tires' GROUP BY T2.business_id HAVING COUNT(day_id) = 7

List all the tires businesses that are opened everyday .


Question: Which region does "Supplier#000000129" belong to?

SELECT T3.r_name FROM nation AS T1 INNER JOIN supplier AS T2 ON T1.n_nationkey = T2.s_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.s_name = 'Supplier#000000129'

Which region does " Supplier#000000129 " belong to ?


Question: How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn?

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

How long is the total lesson time taught by staff with first name as Janessa and last name as Sawayn ?

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


Question: How many students that are undergoing the pre-phase of qualification have advisors?

SELECT COUNT(T1.p_id_dummy) FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.inPhase = 'Pre_Quals' AND T2.student = 1

How many students that are undergoing the pre - phase of qualification have advisors ?

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


Question: How much money did the customer No.297 pay for the rental which happened at 12:27:27 on 2005/7/28?

SELECT T1.amount FROM payment AS T1 INNER JOIN rental AS T2 ON T1.rental_id = T2.rental_id WHERE T2.rental_date = '2005-07-28 12:27:27' AND T2.customer_id = 297

How much money did the customer No.297 pay for the rental which happened at 12:27:27 on 2005/7/28 ?

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


Question: How many countries have a latest population census in 2011? Indicate their full names.

SELECT COUNT(LongName) FROM country WHERE LatestPopulationCensus = '2011' UNION ALL SELECT LongName FROM country WHERE LatestPopulationCensus = '2011'

How many countries have a latest population census in 2011 ? Indicate their full names .

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


Question: Count the number of universities that do not participate in the baketball match.

SELECT count(*) FROM university WHERE school_id NOT IN (SELECT school_id FROM basketball_match)

Count the number of universities that do not participate in the baketball match .

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


Question: What are the websites for all the partially virtual chartered schools located in San Joaquin?

SELECT Website FROM schools WHERE County = 'San Joaquin' AND Virtual = 'P' AND Charter = 1

What are the websites for all the partially virtual chartered schools located in San Joaquin ?

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


Question: State 10 emails of UK Sales Rep who have the lowest credit limit.

SELECT DISTINCT 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' ORDER BY T1.creditLimit LIMIT 10

State 10 emails of UK Sales Rep who have the lowest credit limit .

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


Question: What is the average justice scores among countries?

SELECT avg(justice_score) FROM countries

What is the average justice scores among countries ?


Question: What is the language of the "Battlebond" set?

SELECT language FROM set_translations WHERE id IN ( SELECT id FROM sets WHERE name = 'Battlebond' )

What is the language of the " Battlebond " set ?

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


Question: What is the average rating for the all Yelp businesses that open 24 hours?

SELECT CAST(SUM(T3.stars) AS REAL) / COUNT(T2.business_id) AS "avg" FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.attribute_name LIKE 'Open 24 Hours' AND T2.attribute_value LIKE 'TRUE'

What is the average rating for the all Yelp businesses that open 24 hours ?

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


Question: What is the name of author with the ID of 1722?

What is the name of author with the ID of 1722 ?

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


Question: Which tourist attractions can we get to by bus? Tell me the names of the attractions.

SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus"

Which tourist attractions can we get to by bus ? Tell me the names of the attractions .

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


Question: Calculate the total rating of winners in OFTA Television Award and WGA Award (TV).

SELECT SUM(T2.rating) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award_category IN ('Jupiter Award ', 'WGA Award (TV)');

Calculate the total rating of winners in OFTA Television Award and WGA Award ( TV ) .

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


Question: Which document has between 2 and 4 number of documents ? List the document id and the number of related documents .

select document_object_id , count(*) from document_subset_members group by document_object_id having count(*) between 2 and 4;

Which document has between 2 and 4 number of documents ? List the document i d and the number of related documents .

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


Question: Please list the deserts in the countries whose population is over 100000 and covers an area of under 500000.

SELECT T2.Desert FROM country AS T1 INNER JOIN geo_desert AS T2 ON T1.Code = T2.Country WHERE T1.Area > 100000 AND T1.Population < 500000

Please list the deserts in the countries whose population is over 100000 and covers an area of under 500000 .

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


Question: What are the cities and provinces of institutions?

SELECT City ,  Province FROM institution

What are the cities and provinces of institutions ?


Question: List down most tallest players' name.

SELECT player_name FROM (SELECT player_name, height, DENSE_RANK() OVER (ORDER BY height DESC) as rank FROM Player) WHERE rank = 1


Question: How many games did player Id "vanbijo01" win in the 1990 season?

SELECT W FROM Goalies WHERE playerID = 'vanbijo01' AND year = 1990

How many games did player I d " vanbijo01 " win in the 1990 season ?

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


Question: Indicate on how many different pages the word ripoll appears.

SELECT T3.page FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'ripoll'

Indicate on how many different pages the word ripoll appears .

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


Question: Of the players drafted in NBA between 1990 and 2000, who has the most points in all-star? List the player's first name and last name.

SELECT T3.firstname, T3.lastname FROM player_allstar AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID INNER JOIN draft AS T3 ON T1.playerID = T3.playerID WHERE T2.year BETWEEN 1990 AND 2000 ORDER BY T1.points DESC LIMIT 1

Of the players drafted in NBA between 1990 and 2000 , who has the most points in all - star ? List the player 's first name and last name .

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


Question: Among the shipments in 2017, how many of them have the destination in New Jersey?

SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' AND T2.state = 'New Jersey'

Among the shipments in 2017 , how many of them have the destination in New Jersey ?

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


Question: Add the number of businesses that indicate their home address as their address and those whose address corresponds to the shipping address.

SELECT SUM(CASE WHEN T2.Name = 'Home' THEN 1 ELSE 0 END) , SUM(CASE WHEN T2.Name = 'Shipping' THEN 1 ELSE 0 END) FROM BusinessEntityAddress AS T1 INNER JOIN AddressType AS T2 ON T1.AddressTypeID = T2.AddressTypeID

Add the number of businesses that indicate their home address as their address and those whose address corresponds to the shipping address .

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


Question: Among the products that are no longer in continuous production, how many of them have their supplier in the USA?

SELECT COUNT(T1.Discontinued) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'USA' AND T1.Discontinued = 1

Among the products that are no longer in continuous production , how many of them have their supplier in the USA ?

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


Question: How many black patients stopped their care plan in 2017?

SELECT COUNT(DISTINCT T2.patient) FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.race = 'black' AND strftime('%Y', T1.STOP) = '2017'

How many black patients stopped their care plan in 2017 ?

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


Question: Find the entry names of the catalog with the attribute that have the most entries.

SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.attribute_value  =  (SELECT attribute_value FROM Catalog_Contents_Additional_Attributes GROUP BY attribute_value ORDER BY count(*) DESC LIMIT 1)

Find the entry names of the catalog with the attribute that have the most entries .

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


Question: Add the total profit of Patrick Gardner in the Central region.

SELECT SUM(T2.Profit) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Patrick Gardner' AND T1.Region = 'Central'

Add the total profit of Patrick Gardner in the Central region .

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


Question: What publishers have the word 'Entertainment' in their name?

SELECT T.publisher_name FROM publisher AS T WHERE T.publisher_name LIKE '%Entertainment%'

What publishers have the word ' Entertainment ' in their name ?

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


Question: Please list down the ID of actors and directors in action movies.

SELECT T2.actorid, T1.directorid FROM movies2directors AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.genre = 'Action'

Please list down the ID of actors and directors in action movies .

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


Question: Calculate the ratio in percentage between the average number of female and male students who joined Fire Department organization.

SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name), CAST(SUM(IIF(T2.name IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name WHERE T1.organ = 'fire_department'

Calculate the ratio in percentage between the average number of female and male students who joined Fire Department organization .

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


Question: Indicate the name and category of the most recent award received by the show.

SELECT award, award_category FROM Award WHERE result = 'Winner' ORDER BY year DESC LIMIT 1;

Indicate the name and category of the most recent award received by the show .

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


Question: What level is Physician?

SELECT T1.Level FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID WHERE T2.position  =  "Physician";


Question: What is the id of the patient whose hypertension started most recently?

SELECT PATIENT FROM conditions WHERE START = ( SELECT MAX(START) FROM conditions WHERE DESCRIPTION = 'Hypertension' )

What is the i d of the patient whose hypertension started most recently ?

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


Question: How many research postgraduate students are there?

SELECT COUNT(student_id) FROM student WHERE type = 'RPG'

How many research postgraduate students are there ?


Question: What drug is administered more often to treat child attention deficit disorder?

SELECT DESCRIPTION FROM medications WHERE REASONDESCRIPTION = 'Child attention deficit disorder' GROUP BY DESCRIPTION ORDER BY COUNT(DESCRIPTION) DESC LIMIT 1

What drug is administered more often to treat child attention deficit disorder ?

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


Question: List the address, town and county information of the customers who live in the USA.

SELECT address_line_1 ,  town_city ,  county FROM Customers WHERE Country  =  'USA'

List the address , town and county information of the customers who live in the USA .

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


Question: Among the users who obtained the "Teacher" badge, calculate their percentage of users

SELECT CAST(COUNT(T1.Id) AS REAL) * 100 / (SELECT COUNT(Id) FROM users) FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.Name = 'Teacher'

Among the users who obtained the " Teacher " badge , calculate their percentage of users

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


Question: What are the names of customers who have a loan of more than 3000 in amount?

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE amount  >  3000

What are the names of customers who have a loan of more than 3000 in amount ?

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


Question: What college has a student who successfully made the team in the role of a goalie?

SELECT cName FROM  tryout WHERE decision  =  'yes' AND pPos  =  'goalie'

What college has a student who successfully made the team in the role of a goalie ?


Question: Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department, how many of them are female?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.SEX = 'Female' AND T2.RESPONSE = 'true'

Of the first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department , how many of them are female ?

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


Question: List the store ID of the films starred by Reese West with a duration of 100 minutes and below?

SELECT T4.store_id 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 T3.film_id = T4.film_id WHERE T3.length < 100 AND T1.first_name = 'Reese' AND T1.last_name = 'West'

List the store ID of the films starred by Reese West with a duration of 100 minutes and below ?

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


Question: Give the player id of the man who had the most turnovers whose team missed the playoffs in year 1988.

SELECT T2.playerID FROM players_teams AS T1 INNER JOIN players AS T2 ON T1.playerID = T2.playerID WHERE T1.PostGP = 0 AND T1.year = 1988 ORDER BY T1.turnovers DESC LIMIT 1

Give the player i d of the man who had the most turnovers whose team missed the playoffs in year 1988 .

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


Question: Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment.

SELECT TYPE FROM institution WHERE founded  >  1990 AND enrollment  >=  1000

Show the institution type with an institution founded after 1990 and an institution with at least 1000 enrollment .

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


Question: What is the name of every sailor whose name contains the letter e?

SELECT name FROM Sailors WHERE name LIKE '%e%'

What is the name of every sailor whose name contains the letter e ?

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


Question: Among the transactions made in the gas stations in the Czech Republic, how many of them are taken place after 2012/1/1?

SELECT COUNT(T1.TransactionID) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T2.Country = 'CZE' AND STRFTIME('%Y', T1.Date) >= '2012'

Among the transactions made in the gas stations in the Czech Republic , how many of them are taken place after 2012/1/1 ?

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


Question: What are the names of all books and their corresponding authors?

SELECT T3.title ,  T1.name FROM Author AS T1 JOIN Author_Book AS T2 ON T2.Author  =  T1.idAuthor JOIN Book AS T3 ON T2.isbn  =  T3.isbn

What are the names of all books and their corresponding authors ?

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


Question: What are the titles of games that are played by players from Oklahoma college or Auburn college?

SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.College  =  "Oklahoma" INTERSECT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.College  =  "Auburn"

What are the titles of games that are played by players from Oklahoma college or Auburn college ?

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


Question: Return the number of accounts that the customer with the first name Art and last name Turcotte has.

SELECT count(*) FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Art" AND T2.customer_last_name  =  "Turcotte"

Return the number of accounts that the customer with the first name Art and last name Turcotte has .

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


Question: Give the number of female users of "E派" brand devices.

SELECT COUNT(T2.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.phone_brand = 'E派'

Give the number of female users of " E派 " brand devices .

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


Question: Which character has the longest screen time in the movie Batman?

SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Batman' ORDER BY T2.screentime DESC LIMIT 1

Which character has the longest screen time in the movie Batman ?

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


Question: What is the zip code that has the lowest average mean sea level pressure?

SELECT zip_code FROM weather GROUP BY zip_code ORDER BY avg(mean_sea_level_pressure_inches) LIMIT 1

What is the zip code that has the lowest average mean sea level pressure ?

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


Question: Find the latest logon date of the students whose family name is "Jaskolski" or "Langosh".

SELECT date_of_latest_logon FROM Students WHERE family_name  =  "Jaskolski" OR family_name  =  "Langosh"

Find the latest logon date of the students whose family name is " Jaskolski " or " Langosh " .

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


Question: When was the $32650.65157 car introduced to the market? State the year.

SELECT T1.model FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price = '32650.65157'

When was the $ 32650.65157 car introduced to the market ? State the year .


Question: How many high-class products are sold by preferred vendors?

SELECT COUNT(T2.Name) FROM ProductVendor AS T1 INNER JOIN Product AS T2 USING (ProductID) INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.PreferredVendorStatus = 1 AND T2.Class = 'M'

How many high - class products are sold by preferred vendors ?

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


Question: Please list all the common questions in 2014's survey and 2016's survey.

SELECT T1.questiontext FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID IN (2014, 2016) GROUP BY T1.questiontext

Please list all the common questions in 2014 's survey and 2016 's survey .

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


Question: Which customers have an insurance policy with the type code "Deputy" or "Uniform"? Return the customer details.

SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy" OR t1.policy_type_code  =  "Uniform"

Which customers have an insurance policy with the type code " Deputy " or " Uniform " ? Return the customer details .

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


Question: What's the winning rate of Club Brugge in the 2021 Premier League?

SELECT CAST(COUNT(CASE WHEN T1.FTR = 'H' THEN 1 ELSE NULL END) + COUNT(CASE WHEN T1.FTR = 'A' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(t1.FTR) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.AwayTeam = 'Club Brugge' OR T1.HomeTeam = 'Club Brugge'

What 's the winning rate of Club Brugge in the 2021 Premier League ?

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


Question: What is the maximum salary of position "Trainer"?

SELECT maxsalary FROM position WHERE positiontitle = 'Trainee'

What is the maximum salary of position " Trainer " ?

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


Question: Write 10 coordinates with the object class "pizza."

SELECT T1.IMG_ID, T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'pizza' LIMIT 10

Write 10 coordinates with the object class " pizza . "

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


Question: What is the code of Gwynedd State?

SELECT DISTINCT StateCode FROM location WHERE State = 'Gwynedd'


Question: What is the result of the February 24, 2010 inspection involving the employee named "Arnold Holder"?

SELECT DISTINCT T2.results FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_date = '2010-02-24' AND T1.first_name = 'Arnold' AND T1.last_name = 'Holder'

What is the result of the February 24 , 2010 inspection involving the employee named " Arnold Holder " ?

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


Question: Which movie is the character Dr. Archibald 'Moonlight' Graham from?

SELECT T1.Title FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Dr. Archibald ''Moonlight'' Graham'

Which movie is the character Dr. Archibald ' Moonlight ' Graham from ?

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


Question: Find the last and first name of students who are playing Football or Lacrosse.

SELECT T2.lname ,  T2.fname FROM SportsInfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T1.SportName  =  "Football" OR T1.SportName  =  "Lacrosse"

Find the last and first name of students who are playing Football or Lacrosse .

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


Question: What's the value of the indicator whose long definition is "Adolescent fertility rate is the number of births per 1,000 women ages 15-19." for the Arab World in 1960?

SELECT T1.Value FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName INNER JOIN Country AS T3 ON T1.CountryCode = T3.CountryCode WHERE T2.LongDefinition = 'Adolescent fertility rate is the number of births per 1,000 women ages 15-19.' AND T3.ShortName = 'Arab World' AND T1.Year = 1960

What 's the value of the indicator whose long definition is " Adolescent fertility rate is the number of births per 1,000 women ages 15 - 19 . " for the Arab World in 1960 ?

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


Question: Name the title and publisher for title ID BU 2075. Provide all the royalty percentage for all ranges.

SELECT T1.title, T3.pub_name, T2.lorange, T2.hirange, T2.royalty FROM titles AS T1 INNER JOIN roysched AS T2 ON T1.title_id = T2.title_id INNER JOIN publishers AS T3 ON T1.pub_id = T3.pub_id WHERE T1.title_id = 'BU2075'

Name the title and publisher for title ID BU 2075 . Provide all the royalty percentage for all ranges .

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


Question: What are the student ids of students who don't have any allergies?

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy

What are the student ids of students who do n't have any allergies ?

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


Question: What are the medicine and trade names that cannot interact with the enzyme with the product 'Heme'?

SELECT name ,  trade_name FROM medicine EXCEPT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id JOIN enzyme AS T3 ON T3.id  =  T2.enzyme_id WHERE T3.product  =  'Protoporphyrinogen IX'

What are the medicine and trade names that can not interact with the enzyme with the product ' Heme ' ?

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


Question: Provide the locations and times of the events of app ID "8715964299802120000".

SELECT T1.longitude, T1.latitude, T1.timestamp FROM events AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = 8715964299802120000

Provide the locations and times of the events of app ID " 8715964299802120000 " .

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


Question: How many restaurant is the Sandwich type restaurant?

SELECT count(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID =  Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'

How many restaurant is the Sandwich type restaurant ?

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


Question: What are the titles of movies and books corresponding to companies incorporated in China?

SELECT T1.title ,  T3.book_title FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id  =  T2.movie_id JOIN book_club AS T3 ON T3.book_club_id  =  T2.book_club_id WHERE T2.incorporated_in  =  'China'

What are the titles of movies and books corresponding to companies incorporated in China ?

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


Question: Which user have only one post history per post and having at least 1000 views?

SELECT T2.UserId FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T3.ViewCount >= 1000 GROUP BY T2.UserId HAVING COUNT(DISTINCT T2.PostHistoryTypeId) = 1

Which user have only one post history per post and having at least 1000 views ?

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


Question: What is the percentage of Story Spotlight cards that do not have a text box? List them by their ID.

SELECT CAST(SUM(CASE WHEN isTextless = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(id) FROM cards WHERE isStorySpotlight = 1

What is the percentage of Story Spotlight cards that do not have a text box ? List them by their ID .

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


Question: How many tweets have the male users posted in total?

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

How many tweets have the male users posted in total ?

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


Question: Among the posts owned by csgillespie, how many of them are root posts?

SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' AND T1.ParentId IS NULL

Among the posts owned by csgillespie , how many of them are root posts ?

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


Question: Show the name of aircraft which fewest people have its certificate.

SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1

Show the name of aircraft which fewest people have its certificate .

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


Question: How many publishers are in the USA?

SELECT COUNT(pub_id) FROM publishers WHERE country = 'USA'


Question: List all the student answer texts in descending order of count.

SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC

List all the student answer texts in descending order of count .

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


Question: Show the names of members and the location of the performances they attended.

SELECT T2.Name ,  T3.Location FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID

Show the names of members and the location of the performances they attended .

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


Question: In which month was the player who has won the most awards born?

SELECT T1.birthMon FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID GROUP BY T2.playerID ORDER BY COUNT(T2.award) DESC LIMIT 1

In which month was the player who has won the most awards born ?

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


Question: What are the names of candidates who have a lower support rate than oppose rate?

SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t2.support_rate  <  t2.oppose_rate

What are the names of candidates who have a lower support rate than oppose rate ?

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


Question: Provide the titles and revenues of the movies produced by the DreamWorks company.

SELECT T1.title, T1.revenue FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id INNER JOIN production_company AS T3 ON T2.company_id = T3.company_id WHERE T3.company_name = 'DreamWorks'

Provide the titles and revenues of the movies produced by the DreamWorks company .

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


Question: Give the number of games which were published by Ascaron Entertainment GmbH.

SELECT COUNT(T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'Ascaron Entertainment GmbH'

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


Question: How many phones are there?


Question: Which headphone model has the highest price?

SELECT model FROM headphone ORDER BY price DESC LIMIT 1

Which headphone model has the highest price ?


Question: What is the profit for the product "792"?

SELECT T1.ListPrice - T2.StandardCost FROM ProductListPriceHistory AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 792

What is the profit for the product " 792 " ?


Question: Return the earliest date of loan in the record.

SELECT date_of_loan FROM Student_Loans ORDER BY date_of_loan ASC LIMIT 1

Return the earliest date of loan in the record .

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


Question: What are the full names and salaries for any employees earning less than 6000?

SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000

What are the full names and salaries for any employees earning less than 6000 ?

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


Question: Which player is older, Aaron Lennon or Abdelaziz Barrada?

SELECT player_name FROM Player WHERE player_name IN ('Aaron Lennon', 'Abdelaziz Barrada') ORDER BY birthday ASC LIMIT 1

Which player is older , Aaron Lennon or Abdelaziz Barrada ?

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


Question: Show the name, home city, and age for all drivers.

SELECT name ,  home_city ,  age FROM driver

Show the name , home city , and age for all drivers .

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


Question: What are the countries of perpetrators? Show each country and the corresponding number of perpetrators there.

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

What are the countries of perpetrators ? Show each country and the corresponding number of perpetrators there .

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


Question: For each building, return the name of the building and the name of the region it belongs to.

SELECT T1.Name ,  T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID

For each building , return the name of the building and the name of the region it belongs to .

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


Question: How many object elements are there on average in each image?

SELECT CAST(COUNT(OBJ_CLASS_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ

How many object elements are there on average in each image ?


Question: What are the first names of all students in course ACCT-211?

SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211'

What are the first names of all students in course ACCT-211 ?

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


Question: How many users liked the movie "A Way of Life" to the highest extent?

SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.rating_score = 5

How many users liked the movie " A Way of Life " to the highest extent ?

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


Question: What are the grapes, appelations, and wines with scores above 93, sorted by Name?

SELECT Grape ,  Appelation ,  Name FROM WINE WHERE Score  >  93 ORDER BY Name

What are the grapes , appelations , and wines with scores above 93 , sorted by Name ?

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


Question: Which director had the most popular film from 1937 to 1990?

SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name INNER JOIN movies_total_gross AS T3 ON T3.movie_title = T1.movie_title WHERE SUBSTR(T3.release_date, LENGTH(T3.release_date) - 3, LENGTH(T3.release_date)) BETWEEN '1937' AND '1990' ORDER BY CAST(REPLACE(trim(T3.total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1

Which director had the most popular film from 1937 to 1990 ?

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


Question: Give the alias of the cities with an Asian population of 7.

SELECT T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.asian_population = 7

Give the alias of the cities with an Asian population of 7 .

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


Question: How many students are there for each major?

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

How many students are there for each major ?


Question: How many kinds of products have not been sold?

SELECT count(*) FROM Products WHERE product_id NOT IN ( SELECT product_id FROM Order_items )

How many kinds of products have not been sold ?


Question: What is the sport name of "Cross Country Skiing Men's 10/15 kilometres Pursuit" event?

SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Cross Country Skiing Men%s 10/15 kilometres Pursuit'

What is the sport name of " Cross Country Skiing Men 's 10/15 kilometres Pursuit " event ?

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


Question: What is the height of David Bornhammar in inches?

SELECT T2.height_in_inch FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar'

What is the height of David Bornhammar in inches ?


Question: List all free sports Apps and their translated review.

SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Type = 'Free' AND T1.Category = 'SPORTS'

List all free sports Apps and their translated review .

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


Question: Find the number of students in each major.

SELECT count(*) ,  major FROM student GROUP BY major

Find the number of students in each major .


Question: What are the name and ID of the product bought the most.

SELECT t2.product_details ,  t2.product_id FROM order_items AS t1 JOIN products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_id ORDER BY sum(t1.order_quantity) LIMIT 1

What are the name and ID of the product bought the most .


Question: For the method has the summary of "Refetches the Entity from the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.", what is its solution path?

SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Summary = 'Refetches the Entity FROM the persistent storage. Refetch is used to re-load an Entity which is marked "Out-of-sync", due to a save action. Refetching an empty Entity has no effect.'

For the method has the summary of " Refetches the Entity from the persistent storage . Refetch is used to re - load an Entity which is marked " Out - of - sync " , due to a save action . Refetching an empty Entity has no effect . " , what is its solution path ?

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


Question: What is the restaurant's name at "41.9532864854" latitude and "-87.7673790701422" longitude?

SELECT dba_name FROM establishment WHERE latitude = 41.9532864854 AND longitude = -87.7673790701422 AND facility_type = 'Restaurant'

What is the restaurant 's name at " 41.9532864854 " latitude and " -87.7673790701422 " longitude ?

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


Question: Users in which country has posted more numbers of positive tweets, Argentina or Australia?

SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.Country IN ('Argentina', 'Australia') AND T1.Sentiment > 0 GROUP BY T2.Country ORDER BY COUNT(T1.TweetID) DESC LIMIT 1

Users in which country has posted more numbers of positive tweets , Argentina or Australia ?

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


Question: How many platforms are available for the game Pro Evolution Soccer 2016?

SELECT COUNT(T2.id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id INNER JOIN game_publisher AS T3 ON T1.game_publisher_id = T3.id INNER JOIN game AS T4 ON T3.game_id = T4.id WHERE T4.game_name = 'Pro Evolution Soccer 2016'

How many platforms are available for the game Pro Evolution Soccer 2016 ?

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


Question: What are the details of the project with no outcomes?

SELECT project_details FROM Projects WHERE project_id NOT IN ( SELECT project_id FROM Project_outcomes )

What are the details of the project with no outcomes ?

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


Question: What is the name of the university with the most majors ranked number 1?

SELECT T2.university_name FROM Major_Ranking AS T1 JOIN University AS T2 ON T1.university_id  =  T2.university_id WHERE T1.rank  =  1 GROUP BY T2.university_name ORDER BY count(*) DESC LIMIT 1

What is the name of the university with the most majors ranked number 1 ?

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


Question: List all the authors who wrote fewer pages than the average.

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

List all the authors who wrote fewer pages than the average .


Question: Find the number of students living in each city.

SELECT T1.city_name ,  count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.city_code

Find the number of students living in each city .


Question: Please state the longest river that flows to the Mediterranean Sea.

SELECT Name FROM river WHERE Sea = 'Mediterranean Sea' ORDER BY Length DESC LIMIT 1

Please state the longest river that flows to the Mediterranean Sea .

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


Question: How many students who are female are allergic to milk or eggs?

SELECT count(*) FROM has_allergy AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.sex  =  "F" AND T1.allergy  =  "Milk" OR T1.allergy  =  "Eggs"

How many students who are female are allergic to milk or eggs ?

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


Question: What is the name of the document with the most number of sections?

SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code  =  t2.document_code GROUP BY t1.document_code ORDER BY count(*) DESC LIMIT 1

What is the name of the document with the most number of sections ?

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


Question: Which tourist attractions are visited at least twice? Give me their names and ids.

SELECT T1.Name ,  T2.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING count(*)  >=  2

Which tourist attractions are visited at least twice ? Give me their names and ids .

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


Question: For all directors who directed more than one movie, return the titles of all movies directed by them, along with the director name. Sort by director name, then movie title.

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

For all directors who directed more than one movie , return the titles of all movies directed by them , along with the director name . Sort by director name , then movie title .

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


Question: What are the appelations for wines produced after 2008 but not in the Central Coast area?

SELECT Appelation FROM WINE WHERE YEAR  >  2008 EXCEPT SELECT Appelation FROM APPELLATIONS WHERE Area  =  "Central Coast"

What are the appelations for wines produced after 2008 but not in the Central Coast area ?

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


Question: Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components.

SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  <  6 INTERSECT SELECT t3.name FROM furniture AS t1 JOIN furniture_manufacte AS t2 ON t1.Furniture_ID  =  t2.Furniture_ID JOIN manufacturer AS t3 ON t2.manufacturer_id  =  t3.manufacturer_id WHERE t1.num_of_component  >  10

Find the name of the company that produces both furnitures with less than 6 components and furnitures with more than 10 components .

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


Question: What are the total amount and average amount paid in claim headers?

SELECT sum(amount_piad) ,  avg(amount_piad) FROM claim_headers

What are the total amount and average amount paid in claim headers ?

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


Question: Calculate the revenues made by Fantasy Films and Live Entertainment.

SELECT SUM(T3.revenue) FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name IN ('Fantasy Films', 'Live Entertainment')

Calculate the revenues made by Fantasy Films and Live Entertainment .

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


Question: Write all the keywords belonging to the movie 'Sky Captain and the World of Tomorrow.'

SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.title = 'Sky Captain and the World of Tomorrow'

Write all the keywords belonging to the movie ' Sky Captain and the World of Tomorrow . '

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


Question: Show the themes of parties and the names of the party hosts.

SELECT T3.Party_Theme ,  T2.Name FROM party_host AS T1 JOIN HOST AS T2 ON T1.Host_ID  =  T2.Host_ID JOIN party AS T3 ON T1.Party_ID  =  T3.Party_ID

Show the themes of parties and the names of the party hosts .

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


Question: How many disabled students are female?

SELECT COUNT(name) FROM disabled WHERE name NOT IN ( SELECT name FROM male )


Question: For the post that got the most number of answers owned by csgillespie, how many answers did it get?

SELECT MAX(T1.AnswerCount) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'

For the post that got the most number of answers owned by csgillespie , how many answers did it get ?

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


Question: State what kind of expenses that Sacha Harrison incurred?

SELECT T2.expense_description FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Sacha' AND T1.last_name = 'Harrison'

State what kind of expenses that Sacha Harrison incurred ?


Question: How many customers use each payment method?

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

How many customers use each payment method ?


Question: Find the name of employees whose salary is above the average salary or more than 5000.

SELECT Name FROM Employee WHERE Salary  >  5000 OR Salary  >  (SELECT avg(salary) FROM employee)

Find the name of employees whose salary is above the average salary or more than 5000 .

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


Question: Among the items shipped in 1994 via truck, how many items were returned?

SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1994' AND l_returnflag = 'R' AND l_shipmode = 'TRUCK'

Among the items shipped in 1994 via truck , how many items were returned ?

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


Question: What are the order dates of orders with price higher than 1000?

SELECT T1.Order_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID JOIN Products AS T3 ON T2.Product_ID  =  T3.Product_ID WHERE T3.Product_price  >  1000

What are the order dates of orders with price higher than 1000 ?

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


Question: What are the names of the people who are older 40 but no friends under age 30?

SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) EXCEPT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)

What are the names of the people who are older 40 but no friends under age 30 ?

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


Question: Describe the customer names and lasting delivery periods for the product of "Bedroom Furniture" by wholesale channel in 2019.

SELECT T1.`Customer Names`, T2.DeliveryDate FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T2.`Sales Channel` = 'Wholesale' AND T3.`Product Name` = 'Bedroom Furniture' AND T2.OrderDate LIKE '%/%/19'

Describe the customer names and lasting delivery periods for the product of " Bedroom Furniture " by wholesale channel in 2019 .

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


Question: What is the percentage of female patients who started the care plan in 2010?

SELECT CAST(SUM(CASE WHEN T2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.PATIENT) AS percentage FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE strftime('%Y', T1.START) = '2010'

What is the percentage of female patients who started the care plan in 2010 ?

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


Question: Provide the first name of employee who did inspection ID 48225?

SELECT T1.first_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_id = 48225

Provide the first name of employee who did inspection ID 48225 ?

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


Question: Show the statuses of roller coasters longer than 3300 or higher than 100.

SELECT Status FROM roller_coaster WHERE LENGTH  >  3300 OR Height  >  100

Show the statuses of roller coasters longer than 3300 or higher than 100 .

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


Question: Which school has the smallest amount of professors?

SELECT T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code ORDER BY count(*) LIMIT 1

Which school has the smallest amount of professors ?


Question: List all the names of products with the special offer "15".

SELECT T2.Name FROM SpecialOfferProduct AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SpecialOfferID = 15

List all the names of products with the special offer " 15 " .

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


Question: What percentage of Catalan-language Wikipedia pages have more than 10,000 words?

SELECT CAST(COUNT(CASE WHEN T2.words > 10000 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T2.page) FROM langs AS T1 INNER JOIN pages AS T2 ON T1.lid = T2.lid WHERE T1.lang = 'ca'

What percentage of Catalan - language Wikipedia pages have more than 10,000 words ?

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


Question: Provide the title, release year and the tag associated with the live album that has the highest number of downloads?

SELECT T1.groupName, T1.groupYear, T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'live album' ORDER BY T1.totalSnatched DESC LIMIT 1

Provide the title , release year and the tag associated with the live album that has the highest number of downloads ?

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


Question: List the names and languages of the songs .


Question: List all countries with negative growth in population. State the country, population and growth.

SELECT T1.Name, T1.Population, T2.Population_Growth FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Population_Growth < 0

List all countries with negative growth in population . State the country , population and growth .

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


Question: Give the level of education and occupation of customers ages from 20 to 35 with an income K of 2000 and below.

SELECT T1.EDUCATIONNUM, T1.OCCUPATION FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INCOME_K < 2000 AND T1.age >= 20 AND T1.age <= 35

Give the level of education and occupation of customers ages from 20 to 35 with an income K of 2000 and below .

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


Question: List down the name of dishes that were positioned on the left upper corner.

SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.xpos < 0.25 AND T2.ypos < 0.25

List down the name of dishes that were positioned on the left upper corner .

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


Question: In countries with constitutional monarchy, what is the percentage of cities located in the district of England?

SELECT CAST(SUM(CASE WHEN T1.District = 'England' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GovernmentForm = 'Constitutional Monarchy'

In countries with constitutional monarchy , what is the percentage of cities located in the district of England ?

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


Question: Which team did CK Kapugedera belong to? How many matches did he play?

SELECT T3.Team_Name, COUNT(T2.Match_Id) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T2.Player_Id = T1.Player_Id INNER JOIN Team AS T3 ON T3.Team_Id = T2.Team_Id WHERE T1.Player_Name = 'CK Kapugedera'

Which team did CK Kapugedera belong to ? How many matches did he play ?

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


Question: Find the number of the products that have their color described as "red" and have a characteristic named "slow".

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "red" AND t3.characteristic_name  =  "slow"

Find the number of the products that have their color described as " red " and have a characteristic named " slow " .

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


Question: How many female users were surveyed in the mental health survey for 2017 in the state of Nebraska?

SELECT COUNT(*) FROM ( SELECT T2.UserID FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID INNER JOIN Survey AS T3 ON T2.SurveyID = T3.SurveyID WHERE T3.Description = 'mental health survey for 2017' AND T1.questionid = 2 AND T2.AnswerText = 'Female' UNION SELECT T2.UserID FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID INNER JOIN Survey AS T3 ON T2.SurveyID = T3.SurveyID WHERE T1.questionid = 4 AND T2.AnswerText = 'Nebraska' AND T3.Description = 'mental health survey for 2017' )

How many female users were surveyed in the mental health survey for 2017 in the state of Nebraska ?

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


Question: Which type of powertrain is most common?

SELECT type_of_powertrain FROM vehicles GROUP BY type_of_powertrain ORDER BY count(*) DESC LIMIT 1

Which type of powertrain is most common ?


Question: Among the employees born before 1980 , how many of them are single?

SELECT COUNT(BusinessEntityID) FROM Employee WHERE MaritalStatus = 's' AND BirthDate < '1980-1-1'

Among the employees born before 1980 , how many of them are single ?


Question: What is the name of set number 5 and its translation?

SELECT T1.name, T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.id = 5 GROUP BY T1.name, T2.translation

What is the name of set number 5 and its translation ?

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


Question: What is the average latitude and longitude in San Jose?

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

What is the average latitude and longitude in San Jose ?

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


Question: How many products have their color described as 'white' or have a characteristic with the name 'hot'?

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "white" OR t3.characteristic_name  =  "hot"

How many products have their color described as ' white ' or have a characteristic with the name ' hot ' ?

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


Question: How many vendors does Adventure Works still work with but are not preferable?

SELECT COUNT(BusinessEntityID) FROM Vendor WHERE PreferredVendorStatus = 0 AND ActiveFlag = 1

How many vendors does Adventure Works still work with but are not preferable ?


Question: Who is the director of the movie Pinocchio?

SELECT director FROM director WHERE name = 'Pinocchio'

Who is the director of the movie Pinocchio ?


Question: What are the full names of the 3 instructors who teach the most courses?

SELECT T2.Fname ,  T2.Lname FROM COURSE AS T1 JOIN FACULTY AS T2 ON T1.Instructor  =  T2.FacID GROUP BY T1.Instructor ORDER BY count(*) DESC LIMIT 3

What are the full names of the 3 instructors who teach the most courses ?

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


Question: State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer.

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

State the opensecrets_id of the legislator whose YouTube name is Bluetkemeyer .

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


Question: What are the first names of all students who got a grade C in a class?

SELECT DISTINCT stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE enroll_grade  =  'C'

What are the first names of all students who got a grade C in a class ?

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


Question: What is the id for the employee called Ebba?

SELECT employee_ID FROM Employees WHERE employee_name  =  "Ebba"

What is the i d for the employee called Ebba ?


Question: What's Pedro S Afonso's job title?

SELECT T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.fname = 'Pedro' AND T1.minit = 'S' AND T1.lname = 'Afonso'

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


Question: Find the uuid of cards in which the old school format is restricted or banned.

SELECT uuid FROM legalities WHERE format = 'oldschool' AND (status = 'Banned' OR status = 'Restricted')

Find the uuid of cards in which the old school format is restricted or banned .

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


Question: What are the names of all people who are friends with Alice for the shortest amount of time?

SELECT name FROM PersonFriend WHERE friend =  'Alice' AND YEAR  =  (SELECT min(YEAR) FROM PersonFriend WHERE friend =  'Alice')

What are the names of all people who are friends with Alice for the shortest amount of time ?

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


Question: Return the name and country corresponding to the artist who has had the most exhibitions.

SELECT T2.name , T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id  =  T2.artist_id GROUP BY T1.artist_id ORDER BY count(*) DESC LIMIT 1

Return the name and country corresponding to the artist who has had the most exhibitions .

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


Question: Show the name and total hours of renting for each vehicle.

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

Show the name and total hours of renting for each vehicle .

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


Question: Find the name, checking balance and saving balance of all accounts in the bank.

SELECT T2.balance ,  T3.balance ,  T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid

Find the name , checking balance and saving balance of all accounts in the bank .

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


Question: Show names for all employees who have certificates on both Boeing 737-800 and Airbus A340-300.

SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "Boeing 737-800" INTERSECT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "Airbus A340-300"

Show names for all employees who have certificates on both Boeing 737 - 800 and Airbus A340 - 300 .

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


Question: What are the unique block codes that have available rooms?

SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0

What are the unique block codes that have available rooms ?

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


Question: How many services are there?


Question: Of all male officers, what percentage are black officers?

SELECT CAST(SUM(race = 'B') AS REAL) * 100 / COUNT(case_number) FROM officers WHERE gender = 'M'

Of all male officers , what percentage are black officers ?


Question: Please indicate the birthplace of the crew which name is Dan Castellaneta.

SELECT birth_place FROM Person WHERE name = 'Dan Castellaneta';

Please indicate the birthplace of the crew which name is Dan Castellaneta .

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


Question: Please list the location coordinates of all the facilities that had an inspection on 2010/5/11.

SELECT DISTINCT T2.latitude, T2.longitude FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE T1.inspection_date = '2010-05-11'

Please list the location coordinates of all the facilities that had an inspection on 2010/5/11 .

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


Question: Return the winning drivers of races who did not have the pole position of Junior Strous.

SELECT Winning_driver FROM race WHERE Pole_Position != 'Junior Strous'

Return the winning drivers of races who did not have the pole position of Junior Strous .

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


Question: Which country's gas station had the first paid cusomer in 2012/8/25?

SELECT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' ORDER BY T1.Time DESC LIMIT 1

Which country 's gas station had the first paid cusomer in 2012/8/25 ?

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


Question: Which student has the loan with the minimum value? List the student's biographical information.

SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1

Which student has the loan with the minimum value ? List the student 's biographical information .

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


Question: Which author had the most papers in the year 2009?

SELECT T3.name FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T3.author_id  =  T2.author_id WHERE T1.year  =  2009 GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1

Which author had the most papers in the year 2009 ?

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


Question: From 1/3/97 to 8/10/97, how many orders were shipped via Federal Shipping?

SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping' AND T1.ShippedDate BETWEEN '1997-03-01 00:00:00' AND '1997-10-08 23:59:59'

From 1/3/97 to 8/10/97 , how many orders were shipped via Federal Shipping ?

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


Question: Please show different types of artworks with the corresponding number of artworks of each type.

SELECT TYPE ,  COUNT(*) FROM artwork GROUP BY TYPE

Please show different types of artworks with the corresponding number of artworks of each type .

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


Question: What is the display name of the user who acquired the first Autobiographer badge?

SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Autobiographer' ORDER BY T2.Date LIMIT 1

What is the display name of the user who acquired the first Autobiographer badge ?

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


Question: Show all payment method codes and the number of orders for each code.

SELECT payment_method_code ,  count(*) FROM INVOICES GROUP BY payment_method_code

Show all payment method codes and the number of orders for each code .

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


Question: What are the names of Art instructors who have taught a course, and the corresponding course id?

SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID WHERE T1.dept_name  =  'Art'

What are the names of Art instructors who have taught a course , and the corresponding course i d ?

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


Question: Who is the driver that transported the lightest weight of shipment? Provide the full name of the driver.

SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id ORDER BY T1.weight ASC LIMIT 1

Who is the driver that transported the lightest weight of shipment ? Provide the full name of the driver .

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


Question: When did the artist who made the fewest sculptures die?

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

When did the artist who made the fewest sculptures die ?

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


Question: What are the the songs in volumes, listed in ascending order?

What are the the songs in volumes , listed in ascending order ?


Question: How many universities got less than 50 scores under ranking criteria ID 6 in 2011?

SELECT COUNT(*) FROM university_ranking_year WHERE ranking_criteria_id = 6 AND year = 2011 AND score < 50

How many universities got less than 50 scores under ranking criteria ID 6 in 2011 ?

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


Question: Find the teams that won more than once.

SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*)  >  1

Find the teams that won more than once .


Question: Who has friends that are younger than the average age?

SELECT DISTINCT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  <  (SELECT avg(age) FROM person)

Who has friends that are younger than the average age ?


Question: Find the type of contents that are not in the warehouses located at New York.

SELECT CONTENTS FROM boxes EXCEPT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'

Find the type of contents that are not in the warehouses located at New York .

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


Question: How many players whose teams were ranked 6 in 1937?

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T3.tmID = T2.tmID WHERE T3.year = 1937 AND T3.rank = 6

How many players whose teams were ranked 6 in 1937 ?

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


Question: How many restaurants can we find at number 871 on its street?

SELECT COUNT(id_restaurant) FROM location WHERE street_num = 871

How many restaurants can we find at number 871 on its street ?

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


Question: Show all staff ids and the number of document processes for each staff.

SELECT staff_id ,  count(*) FROM Staff_in_processes GROUP BY staff_id

Show all staff ids and the number of document processes for each staff .

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


Question: How many pages does 'Seaward' have?

SELECT num_pages FROM book WHERE title = 'Seaward'