Question: Show all payment ids and details for invoices whose status is 'Working'.

SELECT T1.payment_id ,  T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id WHERE T2.invoice_status  =  'Working'

Show all payment ids and details for invoices whose status is ' Working ' .

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


Question: Which work is the character Lord Abergavenny from? Please give its short or abbreviated title.

SELECT DISTINCT T1.Title FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T4.CharName = 'Lord Abergavenny'

Which work is the character Lord Abergavenny from ? Please give its short or abbreviated title .

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


Question: What is the most common type of books?

SELECT TYPE FROM book GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1


Question: What is the total amount of settlement made for all the settlements?

SELECT sum(Amount_Settled) FROM Settlements

What is the total amount of settlement made for all the settlements ?

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


Question: For all the movies which were produced by Cruel and Unusual Films, which one has the most popularity?

SELECT T3.title 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 = 'Cruel and Unusual Films' ORDER BY T3.popularity DESC LIMIT 1

For all the movies which were produced by Cruel and Unusual Films , which one has the most popularity ?

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


Question: What is the author ID and their affiliations of authors of the papers with a journal ID of 0 and published in 2009.

SELECT DISTINCT T2.AuthorId, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.JournalId = 0 AND T1.Year = 2009 AND T2.Affiliation IS NOT NULL

What is the author ID and their affiliations of authors of the papers with a journal ID of 0 and published in 2009 .

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


Question: What is the device model of the device used by the oldest user?

SELECT device_model FROM phone_brand_device_model2 WHERE device_id IN ( SELECT device_id FROM gender_age WHERE age = ( SELECT MAX(age) FROM gender_age ) )

What is the device model of the device used by the oldest user ?

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


Question: What are the top 2 countries with the highest number of indebted suppliers?

SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T1.s_nationkey ) AS T ORDER BY T.num LIMIT 2

What are the top 2 countries with the highest number of indebted suppliers ?

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


Question: Find the name and address of the customers who have both New and Pending orders.

SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "New" INTERSECT SELECT T1.customer_name ,  T1.customer_address FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.order_status_code  =  "Pending"

Find the name and address of the customers who have both New and Pending orders .

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


Question: What are the titles of all movies that have between 3 and 5 stars?

SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars BETWEEN 3 AND 5

What are the titles of all movies that have between 3 and 5 stars ?

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


Question: List down the business ID with a high review count in Tempe.

SELECT business_id FROM Business WHERE review_count = 'High' AND city = 'Tempe'

List down the business ID with a high review count in Tempe .

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


Question: Who is the staff manager of the store with the most non-active customers?

SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.customer_id) AS num FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.store_id = T3.store_id WHERE T1.active = 0 GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Who is the staff manager of the store with the most non - active customers ?

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


Question: Count the number of exams.


Question: What are the names for the 3 branches that have the most memberships?

SELECT name FROM branch ORDER BY membership_amount DESC LIMIT 3

What are the names for the 3 branches that have the most memberships ?

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


Question: Calculate the average satisfaction of the good students with their courses.

SELECT CAST(SUM(sat) AS REAL) / COUNT(course_id) FROM registration WHERE grade = 'B'

Calculate the average satisfaction of the good students with their courses .


Question: What are the names of the three nations where the longest river that empties into the Atlantic Ocean stretches to?

SELECT DISTINCT T1.Country FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = ( SELECT Name FROM river WHERE Sea = 'Atlantic Ocean' ORDER BY Length DESC LIMIT 1 )

What are the names of the three nations where the longest river that empties into the Atlantic Ocean stretches to ?

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


Question: Give the average purchase price and average sale price for books.

SELECT avg(purchaseprice) ,  avg(saleprice) FROM Book

Give the average purchase price and average sale price for books .

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


Question: What are the different cities where students live?

SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id

What are the different cities where students live ?


Question: What are all the dates of enrollment and completion in record?

SELECT date_of_enrolment ,  date_of_completion FROM Student_Course_Enrolment

What are all the dates of enrollment and completion in record ?

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


Question: Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA.

SELECT cName ,  enr FROM College WHERE enr  >  10000 AND state = "LA"

Find the name , enrollment of the colleges whose size is bigger than 10000 and location is in state LA .

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


Question: Find the id of the candidate who got the lowest oppose rate.

SELECT Candidate_ID FROM candidate ORDER BY oppose_rate LIMIT 1

Find the i d of the candidate who got the lowest oppose rate .

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


Question: Find the total value of boxes stored in the warehouse with the largest capacity.

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

Find the total value of boxes stored in the warehouse with the largest capacity .

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


Question: What is the average actual profit by 1937 Lincoln Berline?

SELECT SUM(T1.priceEach - T2.buyPrice) / COUNT(*) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productName = '1937 Lincoln Berline'

What is the average actual profit by 1937 Lincoln Berline ?


Question: Among the male patients who have a normal level of white blood cells, how many of them have an abnormal fibrinogen level?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.FG <= 150 OR T2.FG >= 450 AND T2.WBC > 3.5 AND T2.WBC < 9.0 AND T1.SEX = 'M'

Among the male patients who have a normal level of white blood cells , how many of them have an abnormal fibrinogen level ?

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


Question: Find the name of the department that offers the largest number of credits of all classes.

SELECT T3.dept_name FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code JOIN department AS T3 ON T1.dept_code  =  T3.dept_code GROUP BY T1.dept_code ORDER BY sum(T1.crs_credit) DESC LIMIT 1

Find the name of the department that offers the largest number of credits of all classes .

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


Question: What is the id of the game "Resident Evil Archives: Resident Evil"?

SELECT T.genre_id FROM game AS T WHERE T.game_name = 'Resident Evil Archives: Resident Evil'

What is the i d of the game " Resident Evil Archives : Resident Evil " ?

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


Question: Which conference has the longest name?

SELECT FullName FROM Conference ORDER BY LENGTH(FullName) DESC LIMIT 1


Question: List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200.

SELECT T2.weight FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id  =  T2.people_id WHERE T1.snatch  >  140 OR T2.height  >  200;

List the weight of the body builders who have snatch score higher than 140 or have the height greater than 200 .

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


Question: What is the last name of the customers who shopped at the bakery more than 10 times?

SELECT T2.LastName FROM receipts AS T1 JOIN customers AS T2 ON T1.CustomerId  =  T2.id GROUP BY T2.id HAVING count(*)  >  10

What is the last name of the customers who shopped at the bakery more than 10 times ?

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


Question: What are the maximum and minimum age of driver?

What are the maximum and minimum age of driver ?


Question: How many times per year does a credit card customer complain about overlimit fees?

SELECT strftime('%Y', `Date received`), COUNT(`Date received`) FROM events WHERE product = 'Credit card' AND issue = 'Overlimit fee' GROUP BY strftime('%Y', `Date received`) HAVING COUNT(`Date received`)

How many times per year does a credit card customer complain about overlimit fees ?

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


Question: How many users from New York have a teacher and supporter badge?

SELECT COUNT(DISTINCT T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Name IN ('Supporter', 'Teacher') AND T2.Location = 'New York'

How many users from New York have a teacher and supporter badge ?

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


Question: Show the crime rate of counties with a city having white percentage more than 90.

SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID WHERE T1.White  >  90

Show the crime rate of counties with a city having white percentage more than 90 .

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


Question: How many violation of laws are there where no arrest has been made?

SELECT SUM(CASE WHEN T1.description LIKE '%The violation of laws%' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T2.Arrest = 'FALSE'

How many violation of laws are there where no arrest has been made ?

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


Question: What are the distinct visit dates?


Question: Please list the models of all the devices with an event under the location coordinates (121, 31).

SELECT T2.device_model FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.longitude = 121 AND T1.latitude = 31

Please list the models of all the devices with an event under the location coordinates ( 121 , 31 ) .

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


Question: What are the distinct unit prices of all tracks?

What are the distinct unit prices of all tracks ?


Question: How many units of item no.9 were sold in store no.1 in total in January, 2012?

SELECT SUM(units) FROM sales_in_weather WHERE SUBSTR(`date`, 6, 2) = '01' AND SUBSTR(`date`, 1, 4) = '2012' AND item_nbr = 9 AND store_nbr = 1

How many units of item no.9 were sold in store no.1 in total in January , 2012 ?

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


Question: How many users received commentator badges in 2014?

SELECT COUNT(Id) FROM badges WHERE Name = 'Commentator' AND STRFTIME('%Y', Date) = '2014'

How many users received commentator badges in 2014 ?


Question: How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total?

SELECT sum(T1.salary) FROM salary AS T1 JOIN player AS T2 ON T1.player_id = T2.player_id WHERE T2.name_first  =  'Len' AND T2.name_last = 'Barker' AND T1.year BETWEEN 1985 AND 1990;

How much did the the player with first name Len and last name Barker earn between 1985 to 1990 in total ?

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


Question: Write down the summary of episode whereby it has crew members that are not included in the credit list.

SELECT T1.summary FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'false';

Write down the summary of episode whereby it has crew members that are not included in the credit list .

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


Question: How much was a Bitcoin on 2013/4/28?

SELECT T2.price FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name = 'Bitcoin'


Question: What are the different titles of books that have been ordered in the past?

SELECT DISTINCT T1.title FROM book AS T1 JOIN books_order AS T2 ON T1.isbn  =  T2.isbn

What are the different titles of books that have been ordered in the past ?

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


Question: What are the maximum duration and resolution of all songs, for each language, ordered alphabetically by language?

SELECT max(T1.duration) ,  max(T2.resolution) ,  T2.languages FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id GROUP BY T2.languages ORDER BY T2.languages

What are the maximum duration and resolution of all songs , for each language , ordered alphabetically by language ?

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


Question: What are the venues of all the matches? Sort them in the descending order of match date.

SELECT venue FROM MATCH ORDER BY date DESC

What are the venues of all the matches ? Sort them in the descending order of match date .

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


Question: Calculate the average net profit of bar tools which has ordered quantity exceed 5.

SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bar Tools' AND T1.`Order Quantity` > 5

Calculate the average net profit of bar tools which has ordered quantity exceed 5 .

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


Question: How many European suppliers are there?

SELECT COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN supplier AS T3 ON T1.n_nationkey = T3.s_nationkey WHERE T2.r_name = 'EUROPE'


Question: Calculate the percentage of part supply that costs more than 500.

SELECT CAST(SUM(IIF(ps_supplycost > 500, 1, 0)) AS REAL) * 100 / COUNT(ps_suppkey) FROM partsupp

Calculate the percentage of part supply that costs more than 500 .

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


Question: What are the first names and office locations for all professors sorted alphabetically by first name?

SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num ORDER BY T2.emp_fname

What are the first names and office locations for all professors sorted alphabetically by first name ?

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


Question: For the players who played the most PBLA games, who was graduated from Central Missouri State college?

SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'PBLA' AND T2.GP = 10 AND T1.college = 'Central Missouri State' GROUP BY T1.firstName, T1.middleName, T1.lastName ORDER BY COUNT(T2.id) DESC LIMIT 1

For the players who played the most PBLA games , who was graduated from Central Missouri State college ?

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


Question: Show the average, minimum, and maximum ticket prices for exhibitions for all years before 2009.

SELECT avg(ticket_price) ,  min(ticket_price) ,  max(ticket_price) FROM exhibition WHERE YEAR  <  2009

Show the average , minimum , and maximum ticket prices for exhibitions for all years before 2009 .

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


Question: list the card number of all members whose hometown address includes word "Kentucky".

SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"

list the card number of all members whose hometown address includes word " Kentucky " .

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


Question: Among the comments with scores between 5 to 10, what is the percentage of the users with 0 up votes?

SELECT CAST(SUM(IIF(T1.UpVotes = 0, 1, 0)) AS REAL) * 100/ COUNT(T1.Id) AS per FROM users AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.UserId WHERE T2.Score BETWEEN 5 AND 10

Among the comments with scores between 5 to 10 , what is the percentage of the users with 0 up votes ?

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


Question: What are the description and credit of the course which the student whose last name is Smithson took?

SELECT T4.crs_description ,  T4.crs_credit FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T3.stu_num  =  T2.stu_num JOIN course AS T4 ON T4.crs_code  =  T1.crs_code WHERE T3.stu_lname  =  'Smithson'

What are the description and credit of the course which the student whose last name is Smithson took ?

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


Question: How many different products are produced in each headquarter city?

SELECT count(DISTINCT T1.name) ,  T2.Headquarter FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code GROUP BY T2.Headquarter

How many different products are produced in each headquarter city ?


Question: How many planes does Southwest Airlines Co. have?

SELECT COUNT(T3.TAIL_NUM) FROM ( SELECT T1.TAIL_NUM FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T2.Description = 'Southwest Airlines Co.: WN' GROUP BY T1.TAIL_NUM ) T3

How many planes does Southwest Airlines Co. have ?


Question: What is the average percentage of students graduating within 100 percent of normal/expected time for Central Alabama Community College?

SELECT AVG(T2.grad_100_rate) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Central Alabama Community College'

What is the average percentage of students graduating within 100 percent of normal / expected time for Central Alabama Community College ?

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


Question: Which classrooms are used by grade 4?

SELECT DISTINCT classroom FROM list WHERE grade  =  4


Question: Show the names of phones and the districts of markets they are on.

SELECT T3.Name ,  T2.District FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID  =  T3.Phone_ID

Show the names of phones and the districts of markets they are on .

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


Question: Return the apartment number with the largest number of bedrooms.

SELECT apt_number FROM Apartments ORDER BY bedroom_count DESC LIMIT 1

Return the apartment number with the largest number of bedrooms .

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


Question: For each grade, return the grade number, the number of classrooms used for the grade, and the total number of students enrolled in the grade.

SELECT grade ,  count(DISTINCT classroom) ,  count(*) FROM list GROUP BY grade

For each grade , return the grade number , the number of classrooms used for the grade , and the total number of students enrolled in the grade .

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


Question: Calculate the percentage of Asian students among students of other races who graduated from institution in Alabama in year 2013 within 100 percent of normal / expected time.

SELECT CAST(SUM(CASE WHEN T2.race = 'A' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T1.state = 'Alabama'

Calculate the percentage of Asian students among students of other races who graduated from institution in Alabama in year 2013 within 100 percent of normal / expected time .

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


Question: What are the id and name of the cyclist who owns the most bikes?

SELECT T1.id ,  T1.name FROM cyclist AS T1 JOIN cyclists_own_bikes AS T2 ON T1.id  =  T2.cyclist_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What are the i d and name of the cyclist who owns the most bikes ?

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


Question: List all the distinct product names ordered by product id?

SELECT DISTINCT product_name FROM product ORDER BY product_id

List all the distinct product names ordered by product i d ?

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


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

SELECT COUNT(*) FROM Dish WHERE times_appeared > Dish.menus_appeared

How many dishes appeared more than once on a menu ?


Question: Find the code and contents of the box with the lowest value.

SELECT code ,  CONTENTS FROM boxes ORDER BY value LIMIT 1

Find the code and contents of the box with the lowest value .

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


Question: Please provide links to events for members who have paid more than 50 dollar.

SELECT DISTINCT T3.link_to_event FROM expense AS T1 INNER JOIN member AS T2 ON T1.link_to_member = T2.member_id INNER JOIN attendance AS T3 ON T2.member_id = T3.link_to_member WHERE T1.cost > 50

Please provide links to events for members who have paid more than 50 dollar .

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


Question: What is the id of the driver who has driven the most vehicles, and how many vehicles is this?

SELECT count(*) ,  driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1

What is the i d of the driver who has driven the most vehicles , and how many vehicles is this ?

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


Question: Show student ids for all male students.

SELECT StuID FROM Student WHERE Sex  =  'M'

Show student ids for all male students .


Question: Give me the maximum low temperature and average precipitation at the Amersham station.

SELECT max(t1.low_temperature) ,  avg(t1.precipitation) FROM weekly_weather AS t1 JOIN station AS t2 ON t1.station_id  =  t2.id WHERE t2.network_name  =  "Amersham"

Give me the maximum low temperature and average precipitation at the Amersham station .

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


Question: Find the name of the person who has friends with age above 40 and 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) INTERSECT 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)

Find the name of the person who has friends with age above 40 and under age 30 ?

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


Question: What is the github address of the repository that contains files used by solution ID12?

SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 12

What is the github address of the repository that contains files used by solution ID12 ?

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


Question: Provide the itunes id and url for podcast titled 'Brown Suga Diaries'.

SELECT itunes_id, itunes_url FROM podcasts WHERE title = 'Brown Suga Diaries'

Provide the itunes i d and url for podcast titled ' Brown Suga Diaries ' .

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


Question: How old is each student and how many students are each age?

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

How old is each student and how many students are each age ?


Question: How many customers ordered the oldest book?

SELECT COUNT(*) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id GROUP BY T1.publication_date ORDER BY T1.publication_date ASC LIMIT 1

How many customers ordered the oldest book ?


Question: Indicate the year and a full name of the journal in which the publication named 'Area Effects in Cepaea' was published.

SELECT T1.Year, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = 'Area Effects in Cepaea'

Indicate the year and a full name of the journal in which the publication named ' Area Effects in Cepaea ' was published .

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


Question: How many professors teaches basic or medium undergraduate courses?

SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_300'

How many professors teaches basic or medium undergraduate courses ?


Question: Which foot is preferred by Abdou Diallo?

SELECT DISTINCT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Abdou Diallo'

Which foot is preferred by Abdou Diallo ?


Question: What is the category of the business with short review length and highest review stars within business ID from 5 t0 10?

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

What is the category of the business with short review length and highest review stars within business ID from 5 t0 10 ?

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


Question: Name the project that costs the most. How much has been collected from donation and what is the percentage amount still lacking?

SELECT T1.title, SUM(T3.donation_to_project), CAST((T2.total_price_excluding_optional_support - SUM(T3.donation_to_project)) AS REAL) * 100 / SUM(T3.donation_to_project) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T2.total_price_excluding_optional_support DESC LIMIT 1

Name the project that costs the most . How much has been collected from donation and what is the percentage amount still lacking ?

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


Question: Please list the Catalan words with an occurrence of over 200000.

SELECT word FROM words WHERE occurrences > 200000

Please list the Catalan words with an occurrence of over 200000 .

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


Question: List down all of the texts posted on Twitter on Thursday.

SELECT text FROM twitter WHERE Weekday = 'Thursday'

List down all of the texts posted on Twitter on Thursday .

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


Question: Provide the ID and ISO code of Belgium.

SELECT COUNTry_id, COUNTry_iso_code FROM COUNTry WHERE COUNTry_name = 'Belgium'

Provide the ID and ISO code of Belgium .


Question: Indicate the university's name with the highest ranking score in Teaching.

SELECT T1.university_name FROM university AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.university_id INNER JOIN ranking_criteria AS T3 ON T3.id = T2.ranking_criteria_id WHERE T3.criteria_name = 'Teaching' ORDER BY T2.score DESC LIMIT 1

Indicate the university 's name with the highest ranking score in Teaching .

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


Question: How many dishes are there on the menu "Zentral Theater Terrace"?

SELECT COUNT(*) FROM Menu WHERE name = 'Zentral Theater Terrace'

How many dishes are there on the menu " Zentral Theater Terrace " ?

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


Question: Give the advisor with the most students.

SELECT advisor FROM Student GROUP BY advisor ORDER BY count(*) DESC LIMIT 1

Give the advisor with the most students .


Question: By how much did Elly Koss's weight increase from the observation in 2008 to the observation in 2009?

SELECT SUM(CASE WHEN strftime('%Y', T2.date) = '2009' THEN T2.VALUE END) - SUM(CASE WHEN strftime('%Y', T2.date) = '2008' THEN T2.VALUE END) AS increase , T2.units FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description = 'Body Height'

By how much did Elly Koss 's weight increase from the observation in 2008 to the observation in 2009 ?

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


Question: Which shipping method is preferred by customers the most?

SELECT T2.method_name FROM cust_order AS T1 INNER JOIN shipping_method AS T2 ON T1.shipping_method_id = T2.method_id GROUP BY T2.method_name ORDER BY COUNT(T2.method_id) DESC LIMIT 1

Which shipping method is preferred by customers the most ?


Question: Among the countries that use Italian as their language, what is the percentage of republic countries?

SELECT CAST(SUM(CASE WHEN T2.GovernmentForm = 'Republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Language = 'Italian'

Among the countries that use Italian as their language , what is the percentage of republic countries ?

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


Question: Show the distinct countries of managers.

Show the distinct countries of managers .


Question: Among the businesses with score that ranges from 70 to 80, list their violation type ID and risk category.

SELECT DISTINCT T1.violation_type_id, T1.risk_category FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id INNER JOIN inspections AS T3 ON T2.business_id = T3.business_id WHERE T3.score BETWEEN 70 AND 80

Among the businesses with score that ranges from 70 to 80 , list their violation type ID and risk category .

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


Question: For each product which has problems, what are the number of problems and the product id?

SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id

For each product which has problems , what are the number of problems and the product i d ?

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


Question: Provide the address of the legislator with the contact form of http://www.carper.senate.gov/contact/.

SELECT address FROM `current-terms` WHERE contact_form = 'http://www.carper.senate.gov/contact/'

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


Question: What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations?

SELECT t3.individual_last_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id JOIN individuals AS t3 ON t2.individual_id  =  t3.individual_id WHERE t1.uk_vat_number  =  (SELECT max(uk_vat_number) FROM organizations) ORDER BY t2.date_contact_to ASC LIMIT 1

What is the last name of the first individual contacted from the organization with the maximum UK Vat number across all organizations ?

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


Question: Mention the first name of employee who took care the order id 10250.

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

Mention the first name of employee who took care the order i d 10250 .

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


Question: Write down the full name of Vie President of Sales and his age when he was hired.

SELECT FirstName, LastName , TIMESTAMPDIFF(YEAR, BirthDate, HireDate) AS AGE FROM Employees WHERE Title = 'Vice President, Sales'

Write down the full name of Vie President of Sales and his age when he was hired .

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


Question: What are the titles of all movies that have not been rated?

SELECT title FROM Movie WHERE mID NOT IN (SELECT mID FROM Rating)

What are the titles of all movies that have not been rated ?


Question: Return the titles and directors of films that were never in the market of China.

SELECT title ,  director FROM film WHERE film_id NOT IN (SELECT film_id FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.market_id  =  T2.Market_ID WHERE country  =  'China')

Return the titles and directors of films that were never in the market of China .

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


Question: What is the percentage ration of customers to subscribers that started their trips within the city of San Francisco?

SELECT CAST(SUM(CASE WHEN T1.subscription_type = 'Customer' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.subscription_type = 'Subscriber' THEN 1 ELSE 0 END) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco'

What is the percentage ration of customers to subscribers that started their trips within the city of San Francisco ?

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


Question: How many directors with average revenue of 4 have made either action or adventure films?

SELECT COUNT(T1.directorid) FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.avg_revenue = 4 AND (T2.genre = 'Adventure' OR T2.genre = 'Action')

How many directors with average revenue of 4 have made either action or adventure films ?

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


Question: What is the original language of the movie with the tagline "An offer you can't refuse."?

SELECT T3.language_name FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id INNER JOIN language_role AS T4 ON T2.language_role_id = T4.role_id WHERE T4.language_role = 'Original' AND T1.tagline LIKE 'An offer you can%t refuse.'

What is the original language of the movie with the tagline " An offer you ca n't refuse . " ?

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


Question: How many students does one classroom have?

SELECT count(*) ,  classroom FROM list GROUP BY classroom

How many students does one classroom have ?


Question: Calculate the number of game publisher IDs for games released in 1984.

SELECT COUNT(T.game_publisher_id) FROM game_platform AS T WHERE T.release_year = 1984

Calculate the number of game publisher IDs for games released in 1984 .

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


Question: List the products ordered by Becky Martin around the Central region.

SELECT DISTINCT T3.`Product Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Becky Martin' AND T3.Region = 'Central'

List the products ordered by Becky Martin around the Central region .

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


Question: How many bikes could Evelyn Park and Ride hold and how many users who started on that station are subscribers?

SELECT SUM(T2.dock_count), COUNT(T1.subscription_type) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.name = 'Evelyn Park and Ride' AND T1.start_station_name = T2.name AND T1.subscription_type = 'Subscriber'

How many bikes could Evelyn Park and Ride hold and how many users who started on that station are subscribers ?

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


Question: What are the names of games that were released in 2007?

SELECT T3.game_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T1.release_year = 2007

What are the names of games that were released in 2007 ?

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


Question: Among the crimes in all the districts in Chicago, what is the percentage of them happening in the Central district?

SELECT CAST(SUM(CASE WHEN T2.district_name = 'Central' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.case_number) FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no

Among the crimes in all the districts in Chicago , what is the percentage of them happening in the Central district ?

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


Question: List the names of buildings that have no company office.

SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)

List the names of buildings that have no company office .


Question: List the ids of all distinct orders ordered by placed date.

SELECT DISTINCT order_id FROM orders ORDER BY date_order_placed

List the ids of all distinct orders ordered by placed date .

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


Question: Which teams had more than 3 eliminations?

SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3

Which teams had more than 3 eliminations ?


Question: Which sales team name has the least orders in 2019?

SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`Sales Team` ORDER BY COUNT(T1.OrderNumber) ASC LIMIT 1

Which sales team name has the least orders in 2019 ?

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


Question: What is the genre name of the film HUNGER ROOF?

SELECT T1.name FROM category AS T1 JOIN film_category AS T2 ON T1.category_id  =  T2.category_id JOIN film AS T3 ON T2.film_id  =  T3.film_id WHERE T3.title  =  'HUNGER ROOF'

What is the genre name of the film HUNGER ROOF ?

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


Question: Tell me the first and last name of the student who has the most activities.

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

Tell me the first and last name of the student who has the most activities .

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


Question: Who was the player that got the lap time of 0:01:27 in the race No. 161? Show his introduction website.

SELECT DISTINCT T2.forename, T2.surname, T2.url FROM lapTimes AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 161 AND T1.time LIKE '1:27%'

Who was the player that got the lap time of 0:01:27 in the race No . 161 ? Show his introduction website .

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


Question: Find the name of authors who have never published a paper in ACL.

SELECT name FROM Author WHERE author_id NOT IN (SELECT T1.author_id FROM Author_list AS T1 JOIN Paper AS T2 ON T1.paper_id  =  T2.paper_id WHERE T2.venue  =  "ACL")

Find the name of authors who have never published a paper in ACL .

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


Question: Which students have a student loan more than the average amount? List the students' biographical data and the details.

SELECT T1.bio_data ,  T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id WHERE T2.amount_of_loan  >  ( SELECT avg(amount_of_loan) FROM Student_Loans )

Which students have a student loan more than the average amount ? List the students ' biographical data and the details .

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


Question: Which country have the least number of users being surveyed? Indicate the name of the country. If there are multiple countries having the same number of users, indicate all of their names.

SELECT T1.AnswerText FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 3 GROUP BY T1.AnswerText ORDER BY COUNT(T1.UserID) DESC LIMIT 1

Which country have the least number of users being surveyed ? Indicate the name of the country . If there are multiple countries having the same number of users , indicate all of their names .

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


Question: How much higher is James Johnson's salary from the minimum salary of his title?

SELECT CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL) - CAST(REPLACE(SUBSTR(T2.minsalary, 4), ',', '') AS REAL) AS diff FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T1.lastname = 'Johnson' AND T1.firstname = 'James'

How much higher is James Johnson 's salary from the minimum salary of his title ?

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


Question: List by name all customers who provided consent for the tag Older American.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Tags = 'Older American' AND T2.`Consumer consent provided?` != 'N/A' AND T2.`Consumer consent provided?` IS NOT NULL AND T2.`Consumer consent provided?` != ''

List by name all customers who provided consent for the tag Older American .

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


Question: Please list the names of all the awards won by the crew member whose nickname is Doofus.

SELECT T2.award FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.result = 'Winner';

Please list the names of all the awards won by the crew member whose nickname is Doofus .

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


Question: Players born in which year have received the most awards in total?

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

Players born in which year have received the most awards in total ?

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


Question: How many bench minor penalties did the team St. Louis Blues got in total in all the games?

SELECT CAST(SUM(BenchMinor) AS REAL) / 2 FROM Teams WHERE name = 'St. Louis Blues'

How many bench minor penalties did the team St. Louis Blues got in total in all the games ?

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


Question: How many students are enlisted to the air force?

SELECT COUNT(name) FROM enlist WHERE organ = 'air_force'

How many students are enlisted to the air force ?


Question: What are the distinct salaries of all instructors who earned less than the maximum salary?

SELECT DISTINCT salary FROM instructor WHERE salary  <  (SELECT max(salary) FROM instructor)

What are the distinct salaries of all instructors who earned less than the maximum salary ?

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


Question: What is the complete address of store id 1?

SELECT T3.address, T3.address2, T3.district FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id INNER JOIN store AS T4 ON T3.address_id = T4.address_id WHERE T4.store_id = 1

What is the complete address of store i d 1 ?

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


Question: Find the total number of available hotels.

Find the total number of available hotels .


Question: What is the total time for all lessons taught by Janessa 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";

What is the total time for all lessons taught by Janessa Sawayn ?

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


Question: List all countries and their number of airlines in the descending order of number of airlines.

SELECT country ,  count(*) FROM airlines GROUP BY country ORDER BY count(*) DESC

List all countries and their number of airlines in the descending order of number of airlines .

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


Question: Write the titles of horror films with a vote average of more than 7.

SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Horror' AND vote_average > 7

Write the titles of horror films with a vote average of more than 7 .

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


Question: How many packages sent by Ogden Wernstrom and received by Leo Wong?

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name = "Ogden Wernstrom" INTERSECT SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong"

How many packages sent by Ogden Wernstrom and received by Leo Wong ?

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


Question: State the number of users who are under 50 and above 20 use device model of Galaxy Premier.

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.age BETWEEN 20 AND 50 AND T2.device_model = 'Galaxy Premier'

State the number of users who are under 50 and above 20 use device model of Galaxy Premier .

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


Question: What is the form of government that the city of Manila has?

SELECT T1.GovernmentForm FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T2.Name = 'Manila'

What is the form of government that the city of Manila has ?

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


Question: What are the first and last names of all students who are not living in the city HKG and order the results by age?

SELECT fname ,  lname FROM student WHERE city_code != 'HKG' ORDER BY age

What are the first and last names of all students who are not living in the city HKG and order the results by age ?

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


Question: How many 10 star votes did the top 4 episodes with the highest rating received?

SELECT SUM(T1.votes) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 10 ORDER BY T1.rating DESC LIMIT 4;

How many 10 star votes did the top 4 episodes with the highest rating received ?

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


Question: List all the elements of atoms that can not bond with any other atoms.

SELECT DISTINCT T.element FROM atom AS T WHERE T.element NOT IN ( SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id )

List all the elements of atoms that can not bond with any other atoms .

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


Question: What are the names of enzymes whose product is not 'Heme'?

SELECT name FROM enzyme WHERE product != 'Heme'

What are the names of enzymes whose product is not ' Heme ' ?

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


Question: What are the clean and jerk score of the body builder with the highest total score?

SELECT Clean_Jerk FROM body_builder ORDER BY Total DESC LIMIT 1

What are the clean and jerk score of the body builder with the highest total score ?

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


Question: Calculate the total amount of fine under the food equipment and utensil category.

SELECT SUM(T2.fine) FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T1.category = 'Food Equipment and Utensil'

Calculate the total amount of fine under the food equipment and utensil category .

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


Question: What is the area code of Bishopville, SC?

SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.city = 'Bishopville' AND T2.state = 'SC'

What is the area code of Bishopville , SC ?

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


Question: For each student answer, find the first name of the student and the date of the answer.

SELECT T2.First_Name ,  T1.Date_of_Answer FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID  =  T2.Student_ID

For each student answer , find the first name of the student and the date of the answer .

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


Question: How many units of item no.9 were sold in store no.1 on 2012/1/1?

SELECT units FROM sales_in_weather WHERE `date` = '2012-01-01' AND store_nbr = 1 AND item_nbr = 9

How many units of item no.9 were sold in store no.1 on 2012/1/1 ?

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


Question: Show names of ships involved in a mission launched after 1928.

SELECT T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID WHERE T1.Launched_Year  >  1928

Show names of ships involved in a mission launched after 1928 .

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


Question: List the state in the US with the most invoices.

SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "USA" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;

List the state in the US with the most invoices .


Question: How many superheroes didn't have any publisher?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T2.id = 1

How many superheroes did n't have any publisher ?


Question: What is the full name of the Vice President of Production?

SELECT T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle = 'Vice President of Production'

What is the full name of the Vice President of Production ?

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


Question: Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way.

SELECT How_to_Get_There ,  COUNT(*) FROM Tourist_Attractions GROUP BY How_to_Get_There

Show different ways to get to attractions and the number of attractions that can be accessed in the corresponding way .

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


Question: Indicate the full names of the top 10 players with the highest number of penalties.

SELECT t2.player_name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.id = t2.id ORDER BY t1.penalties DESC LIMIT 10

Indicate the full names of the top 10 players with the highest number of penalties .

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


Question: Return the names of musicals who have the nominee Bob Fosse.

SELECT Name FROM musical WHERE Nominee  =  "Bob Fosse"

Return the names of musicals who have the nominee Bob Fosse .

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


Question: Give customer No.106936's region name.

SELECT T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_custkey = 106936

Give customer No.106936 's region name .


Question: What is the rating for "Draw A Stickman"?

SELECT Rating FROM playstore WHERE APP = 'Draw A Stickman'

What is the rating for " Draw A Stickman " ?

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


Question: Show all client ids and details with sic code "Bad".

SELECT client_id ,  client_details FROM Clients WHERE sic_code  =  "Bad";

Show all client ids and details with sic code " Bad " .

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


Question: What are the names of actors who have been in the musical titled The Phantom of the Opera?

SELECT T1.Name FROM actor AS T1 JOIN musical AS T2 ON T1.Musical_ID  =  T2.Musical_ID WHERE T2.Name  =  "The Phantom of the Opera"

What are the names of actors who have been in the musical titled The Phantom of the Opera ?

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


Question: How many businesses are registered in the database under 'Banks & Credit Unions' category?

SELECT COUNT(T2.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name = 'Banks & Credit Unions'

How many businesses are registered in the database under ' Banks & Credit Unions ' category ?

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


Question: List out the position of members who joined major of Business.

SELECT T2.position FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T1.major_name = 'Business'

List out the position of members who joined major of Business .

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


Question: How many separate 35 year-old uesers have rated the movie from UK?

SELECT COUNT(DISTINCT T2.userid) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid INNER JOIN users AS T3 ON T2.userid = T3.userid WHERE T1.country = 'UK' AND T3.age = 35

How many separate 35 year - old uesers have rated the movie from UK ?

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


Question: Which artist designed the card whose promotional name is "Battra, Dark Destroyer"?

SELECT artist FROM cards WHERE flavorName = 'Battra, Dark Destroyer'

Which artist designed the card whose promotional name is " Battra , Dark Destroyer " ?

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


Question: List down Ajax's superpowers.

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


Question: What type did match ID 336000 win?

SELECT T2.Win_Type FROM Match AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id WHERE T1.Match_Id = 336000

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


Question: What was the notes of the fundraising on 2019/9/14?

SELECT notes FROM income WHERE source = 'Fundraising' AND date_received = '2019-09-14'

What was the notes of the fundraising on 2019/9/14 ?


Question: Give the description of the moderate risk violation which "Chez Fayala, Inc." had on 2016/7/1.

SELECT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Chez Fayala, Inc.' AND T1.`date` = '2016-07-01' AND T1.risk_category = 'Moderate Risk'

Give the description of the moderate risk violation which " Chez Fayala , Inc. " had on 2016/7/1 .

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


Question: What is the task of the method whose tokenized name is "online median filter test median window filling"?

SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'online median filter test median window filling'

What is the task of the method whose tokenized name is " online median filter test median window filling " ?

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


Question: Find the top three dates with the most receipts.

SELECT date FROM receipts GROUP BY date ORDER BY count(*) DESC LIMIT 3

Find the top three dates with the most receipts .


Question: How many coaches does each club has? List the club id, name and the number of coaches.

SELECT T1.club_id ,  T1.club_name, count(*) FROM club AS T1 JOIN coach AS T2 ON T1.club_id  =  T2.club_id GROUP BY T1.club_id

How many coaches does each club has ? List the club i d , name and the number of coaches .

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


Question: Sort the first names of all the authors in alphabetical order.

SELECT fname FROM authors ORDER BY fname

Sort the first names of all the authors in alphabetical order .


Question: How many businesses with music_karaoke attribute are closed?

SELECT COUNT(T2.business_id) 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 = 'music_karaoke' AND T3.active = 'false' AND T2.attribute_value IN ('none', 'no', 'false')

How many businesses with music_karaoke attribute are closed ?

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


Question: What is the phone number of the performer Ashley?

SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name  =  "Ashley"

What is the phone number of the performer Ashley ?

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


Question: What is the expansion type of the set "Hauptset Zehnte Edition"?

SELECT T1.type FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T2.translation = 'Hauptset Zehnte Edition'

What is the expansion type of the set " Hauptset Zehnte Edition " ?

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


Question: What are the names of all employees who have a salary higher than average?

SELECT name FROM Employee WHERE salary  >  (SELECT avg(salary) FROM Employee)

What are the names of all employees who have a salary higher than average ?

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


Question: Write down the player names and IDs of the English umpires.

SELECT T1.Umpire_Name, T1.Umpire_Id FROM Umpire AS T1 INNER JOIN Country AS T2 ON T1.Umpire_Country = T2.Country_Id WHERE T2.Country_Name = 'England'

Write down the player names and IDs of the English umpires .


Question: Among the daylight savings areas in the Midwest region, how many postal points are there in Illinois?

SELECT COUNT(T2.zip_code) FROM state AS T1 INNER JOIN zip_data AS T2 ON T1.abbreviation = T2.state WHERE T1.name = 'Illinois' AND T2.daylight_savings = 'Yes' AND T2.region = 'Midwest'

Among the daylight savings areas in the Midwest region , how many postal points are there in Illinois ?

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


Question: How many institution are founded between 1850 and 1900?

SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900

How many institution are founded between 1850 and 1900 ?

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


Question: To which predicted relation class does the self-relation of the object sample in image no.5 belong?

SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 5 AND T2.OBJ1_SAMPLE_ID = T2.OBJ2_SAMPLE_ID

To which predicted relation class does the self - relation of the object sample in image no.5 belong ?

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


Question: List the skin colour of the superheroes with 100 attribute value.

SELECT DISTINCT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id WHERE T3.attribute_value = 100

List the skin colour of the superheroes with 100 attribute value .

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


Question: Report the first name and last name of all the students.

SELECT DISTINCT firstname ,  lastname FROM list

Report the first name and last name of all the students .

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


Question: What is the rating of Dragon Ball Legends and how many users dislike this App?

SELECT T1.Rating, COUNT(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'Dragon Ball Legends' AND CAST(Sentiment_Polarity AS INTEGER) < -0.5

What is the rating of Dragon Ball Legends and how many users dislike this App ?

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


Question: What is the name of the community that has the highest number of crimes related to prostitution?

SELECT T3.community_area_name FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no INNER JOIN Community_Area AS T3 ON T1.community_area_no = T3.community_area_no WHERE T2.primary_description = 'PROSTITUTION' GROUP BY T1.iucr_no ORDER BY T1.case_number DESC LIMIT 1

What is the name of the community that has the highest number of crimes related to prostitution ?

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


Question: What are the names of schools with the top 3 largest size?

SELECT cName FROM college ORDER BY enr DESC LIMIT 3

What are the names of schools with the top 3 largest size ?


Question: Show all author names and number of documents corresponding to each.

SELECT author_name ,  count(*) FROM Documents GROUP BY author_name

Show all author names and number of documents corresponding to each .

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


Question: In what locations and on what mediums are the paintings created by the artist with the first name Pablo?

SELECT T2.location ,   T2.medium FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.fname  =  "Pablo"

In what locations and on what mediums are the paintings created by the artist with the first name Pablo ?

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


Question: What is the life expectancy of the people living in Calama city?

SELECT T2.LifeExpectancy FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T1.Name = 'Calama'

What is the life expectancy of the people living in Calama city ?

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


Question: What place has the most flights coming from there?

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

What place has the most flights coming from there ?


Question: Among the players that weigh more than 90 kg, how many of them have a position of defense?

SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T2.weight_in_kg > 90 AND T1.position_info = 'D'

Among the players that weigh more than 90 kg , how many of them have a position of defense ?

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


Question: What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8?

SELECT DISTINCT artist_name FROM song WHERE languages  =  "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating  >  8

What are the names of the different artists that have produced a song in English but have never receieved a rating higher than 8 ?

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


Question: Which sport did John Aalberg participate in?

SELECT DISTINCT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id INNER JOIN competitor_event AS T3 ON T2.id = T3.event_id INNER JOIN games_competitor AS T4 ON T3.competitor_id = T4.id INNER JOIN person AS T5 ON T4.person_id = T5.id WHERE T5.full_name = 'John Aalberg'

Which sport did John Aalberg participate in ?

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


Question: What are the names of languages that are not the official language of any country?

SELECT name FROM languages WHERE id NOT IN (SELECT language_id FROM official_languages)

What are the names of languages that are not the official language of any country ?

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


Question: To which artist does the card with the text "Das perfekte Gegenmittel zu einer dichten Formation" belong?

SELECT DISTINCT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.flavorText LIKE '%DAS perfekte Gegenmittel zu einer dichten Formation%'

To which artist does the card with the text " Das perfekte Gegenmittel zu einer dichten Formation " belong ?

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


Question: Find the average ride duration during the rain of more than 0.8 inches.

SELECT AVG(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE (T2.events = 'Rain' AND T2.precipitation_inches > 0.8) OR (T2.events = 'rain' AND T2.precipitation_inches > 0.8)

Find the average ride duration during the rain of more than 0.8 inches .

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


Question: List all the navy students who are disabled.

SELECT T1.name FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'navy'

List all the navy students who are disabled .


Question: What is the customer address, customer phone, and customer email for Jeromy?

SELECT customer_address ,  customer_phone ,  customer_email FROM Customers WHERE customer_name  =  "Jeromy"

What is the customer address , customer phone , and customer email for Jeromy ?

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


Question: Which team got the most wins in the Stanley Cup finals?

SELECT T2.name FROM TeamsSC AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year GROUP BY T2.name ORDER BY SUM(T1.W) DESC LIMIT 1

Which team got the most wins in the Stanley Cup finals ?


Question: Who was the coach for the team which had the most bench minors penalty in 2003？

SELECT DISTINCT T3.firstName, T3.lastName FROM Teams AS T1 INNER JOIN Coaches AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN Master AS T3 ON T2.coachID = T3.coachID WHERE T1.year = '2003' GROUP BY T3.firstName, T3.lastName ORDER BY SUM(T1.BenchMinor) DESC LIMIT 1

Who was the coach for the team which had the most bench minors penalty in 2003 ？

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


Question: Find out if the project with the title Team More Books! has a New York teaching fellow.

SELECT T2.teacher_ny_teaching_fellow FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'Team More Books!'

Find out if the project with the title Team More Books ! has a New York teaching fellow .

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


Question: What are all role codes?


Question: Among the female users of the devices, how many of them are over 30?

SELECT COUNT(device_id) FROM gender_age WHERE age > 30 AND gender = 'F'

Among the female users of the devices , how many of them are over 30 ?

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


Question: How many customers have opened an account?

SELECT count(DISTINCT customer_id) FROM Accounts

How many customers have opened an account ?


Question: Which LAM customer used the Euro as their currency and had the highest consumption in October 2013?

SELECT T1.CustomerID FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'LAM' AND T2.Date = '201310' AND T1.Currency = 'EUR' GROUP BY T1.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1

Which LAM customer used the Euro as their currency and had the highest consumption in October 2013 ?

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


Question: How many trips in 2013 had durations longer than 1000 seconds?

SELECT COUNT(duration) FROM trip WHERE start_date LIKE '%/%/2013%' AND duration > 1000

How many trips in 2013 had durations longer than 1000 seconds ?

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


Question: What are the companies and main industries of all companies that are not headquartered in the United States?

SELECT company ,  main_industry FROM company WHERE headquarters != 'USA'

What are the companies and main industries of all companies that are not headquartered in the United States ?

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


Question: Indicate the name of the actors of the films rated as 'Parents Strongly Precautioned' with the highest replacement cost.

SELECT T1.first_name, T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.rating = 'PG-13' ORDER BY T3.replacement_cost DESC LIMIT 1

Indicate the name of the actors of the films rated as ' Parents Strongly Precautioned ' with the highest replacement cost .

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


Question: What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040?

SELECT T1.`FRPM Count (Ages 5-17)` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.MailStreet = 'PO Box 1040' AND T2.SOCType = 'Youth Authority Facilities'

What is the free or reduced price meal count for ages 5 to 17 in the Youth Authority School with a mailing street address of PO Box 1040 ?

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


Question: Find courses that ran in Fall 2009 or in Spring 2010.

SELECT course_id FROM SECTION WHERE semester  =  'Fall' AND YEAR  =  2009 UNION SELECT course_id FROM SECTION WHERE semester  =  'Spring' AND YEAR  =  2010

Find courses that ran in Fall 2009 or in Spring 2010 .

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


Question: What is the bounding box of the object with image id 4 and a prediction relationship class id of 144?

SELECT T2.X, T2.Y, T2.W, T2.H FROM IMG_REL AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.IMG_ID = T2.IMG_ID WHERE T1.PRED_CLASS_ID = 144 AND T1.IMG_ID = 3

What is the bounding box of the object with image i d 4 and a prediction relationship class i d of 144 ?

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


Question: What is the age of student Linda Smith?

SELECT Age FROM Student WHERE Fname = "Linda" AND Lname = "Smith";

What is the age of student Linda Smith ?

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


Question: Find the stories of the building with the largest height.

SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1

Find the stories of the building with the largest height .

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


Question: What are the cities with exactly two airports?

SELECT city FROM airports GROUP BY city HAVING count(*)  =  2

What are the cities with exactly two airports ?


Question: Show names for all regions except for Denmark.

SELECT region_name FROM region WHERE region_name != 'Denmark'

Show names for all regions except for Denmark .


Question: Between 1/1/2010 to 12/31/2020, how many users, who were a trialist when they created the list, gave the movie "The Secret Life of Words" a rating score of 3?

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 = 'The Secret Life of Words' AND T1.rating_score = 3 AND T1.user_trialist = 0 AND T1.rating_timestamp_utc BETWEEN '2010%' AND '2020%'

Between 1/1/2010 to 12/31/2020 , how many users , who were a trialist when they created the list , gave the movie " The Secret Life of Words " a rating score of 3 ?

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


Question: Find papers whose second author has last name "Turon" and is affiliated with an institution in the country "USA".

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "USA" AND t2.authorder  =  2 AND t1.lname  =  "Turon"

Find papers whose second author has last name " Turon " and is affiliated with an institution in the country " USA " .

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


Question: Please list the awards won by coaches who were born in 1952.

SELECT T2.award FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T1.birthYear = 1952

Please list the awards won by coaches who were born in 1952 .

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


Question: Among the customers from Houston, Texas, what is the total profit of their orders 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` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.City = 'Houston' AND T1.State = 'Texas' AND T2.Region = 'Central'

Among the customers from Houston , Texas , what is the total profit of their orders in the Central region ?

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


Question: What is the average unit price of all the tracks?

What is the average unit price of all the tracks ?

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


Question: What is the most common age group among all device users?

SELECT T.num FROM ( SELECT `group`, COUNT(`group`) AS num FROM gender_age GROUP BY `group` ) T

What is the most common age group among all device users ?


Question: Count the number of users that are logged in.

SELECT count(*) FROM users WHERE user_login  =  1

Count the number of users that are logged in .


Question: What are the different locations of warehouses?

SELECT count(DISTINCT LOCATION) FROM warehouses

What are the different locations of warehouses ?


Question: How many reference papers does paper with id D12-1027 have?

SELECT count(*) FROM Citation WHERE paper_id  =  "D12-1027"

How many reference papers does paper with i d D12 - 1027 have ?

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


Question: How many releases by the artist michael jackson are tagged "pop"?

SELECT COUNT(T1.groupName) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'pop' AND T1.artist = 'michael jackson'

How many releases by the artist michael jackson are tagged " pop " ?

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


Question: How many courses does Alvera McQuillin take?

SELECT COUNT(T1.course_id) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.f_name = 'Alvera' AND T2.l_name = 'McQuillin'

How many courses does Alvera McQuillin take ?


Question: How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018? Identify the plane number of the aircraft with the highest delayed hours.

SELECT T1.TAIL_NUM, SUM(CAST(T1.LATE_AIRCRAFT_DELAY AS REAL) / 60) AS delay FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T2.Code = T1.OP_CARRIER_AIRLINE_ID WHERE T1.FL_DATE LIKE '2018/8/%' AND T2.Description = 'Delta Air Lines Inc.: DL' ORDER BY delay DESC LIMIT 1

How many hours in total did all of the Delta Air Lines aircraft were delayed due to a late aircraft in August of 2018 ? Identify the plane number of the aircraft with the highest delayed hours .

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


Question: How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1?

SELECT (SUM(CASE WHEN T.game_platform_id = 50 THEN T.num_sales ELSE 0 END) - SUM(CASE WHEN T.game_platform_id = 51 THEN T.num_sales ELSE 0 END)) * 100000 AS nums FROM region_sales AS T WHERE T.region_id = 1

How many more games were sold on game platform ID 50 than on game platform ID 51 in region ID 1 ?

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


Question: How many airports are there per city in the US ordered from most to least?

SELECT count(*) ,  city FROM airports WHERE country  =  'United States' GROUP BY city ORDER BY count(*) DESC

How many airports are there per city in the US ordered from most to least ?

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


Question: Which customer has used the most types of services ? Give me the customer details .

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

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


Question: What is the name of the competitor who has won the most medals?

SELECT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.id != 4 GROUP BY T1.full_name ORDER BY COUNT(T4.id) DESC LIMIT 1

What is the name of the competitor who has won the most medals ?

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


Question: How many product maintenance documents are private?

SELECT COUNT(DocumentNode) FROM Document WHERE DocumentSummary IS NULL

How many product maintenance documents are private ?


Question: What are the first name and last name of all the teachers?

SELECT DISTINCT firstname ,  lastname FROM teachers

What are the first name and last name of all the teachers ?

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


Question: Which 1988 movie got the most ratings?

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 1988 ORDER BY T1.rating_score DESC LIMIT 1

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


Question: What is the number of airports per country, ordered from most to least?

SELECT count(*) ,  country FROM airports GROUP BY country ORDER BY count(*) DESC

What is the number of airports per country , ordered from most to least ?

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


Question: What is the average number of items shipped each day in April of 1994?

SELECT AVG(l_linenumber) FROM lineitem WHERE l_shipdate BETWEEN '1994-01-01' AND '1994-01-30'

What is the average number of items shipped each day in April of 1994 ?

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


Question: Return the names and ids of all products whose price is between 600 and 700.

SELECT product_name ,  product_id FROM products WHERE product_price BETWEEN 600 AND 700

Return the names and ids of all products whose price is between 600 and 700 .

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


Question: Give me a list of distinct product ids from orders placed between 1975-01-01 and 1976-01-01?

SELECT DISTINCT T2.product_id FROM orders AS T1 JOIN order_items AS T2 ON T1.order_id = T2.order_id WHERE T1.date_order_placed >= "1975-01-01" AND T1.date_order_placed <= "1976-01-01"

Give me a list of distinct product ids from orders placed between 1975 - 01 - 01 and 1976 - 01 - 01 ?

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


Question: Compare the number of legislators who started the term in 1875 and 2005.

SELECT SUM(CASE WHEN `current-terms`.start LIKE '2005%' THEN 1 ELSE 0 END) - ( SELECT SUM(CASE WHEN start LIKE '1875%' THEN 1 ELSE 0 END) FROM `historical-terms` ) FROM `current-terms`

Compare the number of legislators who started the term in 1875 and 2005 .

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


Question: What is the district of Zaanstad?

SELECT District FROM City WHERE name = 'Zaanstad'


Question: Which phone number should I call if I want to reach Nancy Davolio's home?

SELECT HomePhone FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy'

Which phone number should I call if I want to reach Nancy Davolio 's home ?

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


Question: What are the details of the three most expensive hotels?

SELECT other_hotel_details FROM HOTELS ORDER BY price_range DESC LIMIT 3

What are the details of the three most expensive hotels ?

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


Question: What are the ids for transactions that have an amount greater than the average amount of a transaction?

SELECT transaction_id FROM Financial_transactions WHERE transaction_amount  >  (SELECT avg(transaction_amount) FROM Financial_transactions)

What are the ids for transactions that have an amount greater than the average amount of a transaction ?

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


Question: Please show the names and rank of players that have played the game titled "Super Mario World".

SELECT T3.Player_name ,  T3.rank_of_the_year 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 T1.Title  =  "Super Mario World"

Please show the names and rank of players that have played the game titled " Super Mario World " .

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


Question: How many sales representatives whose salaries are higher than 2000?

SELECT COUNT(Title) FROM Employees WHERE Salary > 2000 AND Title = 'Sales Representative'

How many sales representatives whose salaries are higher than 2000 ?

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


Question: Please list the names of the production company of the movie "Four Rooms".

SELECT T1.company_name 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 T3.title = 'Four Rooms'

Please list the names of the production company of the movie " Four Rooms " .

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


Question: How many vampire superheroes are there?

SELECT COUNT(T1.superhero_name) FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Vampire'

How many vampire superheroes are there ?


Question: What is the difference between the units sold for item 1 when the sunset was the earliest and the latest?

SELECT ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset LIMIT 1 ) - ( SELECT SUM(T2.units) AS sumunit FROM weather AS T1 INNER JOIN sales_in_weather AS T2 ON T1.`date` = T2.`date` INNER JOIN relation AS T3 ON T2.store_nbr = T3.store_nbr WHERE T2.item_nbr = 5 AND sunset IS NOT NULL GROUP BY T1.sunset ORDER BY T1.sunset DESC LIMIT 1 )

What is the difference between the units sold for item 1 when the sunset was the earliest and the latest ?

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


Question: What is the maximum average speed?


Question: Find all the songs whose name contains the word "the".

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

Find all the songs whose name contains the word " the " .


Question: Between 1917 to 1920, what are the names of the team who ranked first in the first half of the season each year?

SELECT DISTINCT T2.name FROM TeamsHalf AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.half = 1 AND T1.rank = 1 AND T1.year BETWEEN 1917 AND 1920

Between 1917 to 1920 , what are the names of the team who ranked first in the first half of the season each year ?

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


Question: Please list the titles of all the releases with the tag "1980s".

SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'

Please list the titles of all the releases with the tag " 1980s " .

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


Question: Find the names of departments that are located in Houston.

SELECT t1.dname FROM department AS t1 JOIN dept_locations AS t2 ON t1.dnumber  =  t2.dnumber WHERE t2.dlocation  =  'Houston'

Find the names of departments that are located in Houston .

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


Question: How many Italian film titles were special featured with deleted scenes?

SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN `language` AS T2 ON T1.language_id = T2.language_id WHERE T2.`name` = 'Italian' AND T1.special_features = 'deleted scenes'

How many Italian film titles were special featured with deleted scenes ?

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


Question: What is the average price of the products for each category?

SELECT avg(product_price) ,  product_category_code FROM products GROUP BY product_category_code

What is the average price of the products for each category ?

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


Question: Please list the credit card IDs of the employees who work as store contact.

SELECT T2.CreditCardID FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SC'

Please list the credit card IDs of the employees who work as store contact .

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


Question: Provide all rivers name and length in USA.

SELECT DISTINCT T3.Name, T3.Length FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T2.Country = 'USA'

Provide all rivers name and length in USA .

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


Question: In how many matches in the Seria A division did both teams have equal goals?

SELECT COUNT(T1.FTR) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Seria A' AND T1.FTR = 'D'

In how many matches in the Seria A division did both teams have equal goals ?

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


Question: List down the name of artists for cards in Chinese Simplified.

SELECT T1.artist FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Chinese Simplified'

List down the name of artists for cards in Chinese Simplified .

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


Question: For the order from "HILAA" on 1997/12/25, what was the total quantity of the products in that order?

SELECT SUM(T2.Quantity) FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.CustomerID = 'HILAA' AND T1.OrderDate LIKE '1997-12-25%'

For the order from " HILAA " on 1997/12/25 , what was the total quantity of the products in that order ?

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


Question: What is the average unit price of Tokyo Traders' products?

SELECT SUM(T1.UnitPrice) / COUNT(T2.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Tokyo Traders'

What is the average unit price of Tokyo Traders ' products ?

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


Question: Show the headquarters that have at least two companies.

SELECT Headquarters FROM company GROUP BY Headquarters HAVING COUNT(*)  >=  2

Show the headquarters that have at least two companies .


Question: Among the flights on 2018/8/1, how many of them departed from an airport in New York?

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

Among the flights on 2018/8/1 , how many of them departed from an airport in New York ?

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


Question: What are the names of actors who are not 20 years old?

What are the names of actors who are not 20 years old ?

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


Question: The main character Elsa is voiced by which actor and who is the director of the movie?

SELECT T1.`voice-actor`, T3.director FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title INNER JOIN director AS T3 ON T2.movie_title = T3.name WHERE T2.hero = 'Elsa'

The main character Elsa is voiced by which actor and who is the director of the movie ?

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


Question: List out the id of event that achieve the gold medal.

SELECT T2.event_id FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T1.medal_name = 'Gold'

List out the i d of event that achieve the gold medal .

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


Question: What portion of the nations in Latin America and the Caribbean had more than 50% of their land used for agriculture in 1961?

SELECT CAST(SUM(CASE WHEN T1.Value > 50 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.CountryCode) FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Year = 1961 AND T2.Region = 'Latin America & Caribbean' AND indicatorname = 'Agricultural land (% of land area)'

What portion of the nations in Latin America and the Caribbean had more than 50 % of their land used for agriculture in 1961 ?

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


Question: On the day with the hottest temperature ever in 2014, how many bike trips started from the station 2nd at Folsom?

SELECT COUNT(T1.start_station_name) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2014%' AND T2.zip_code = 94107 AND T1.start_station_name = '2nd at Folsom' ORDER BY T2.max_temperature_f DESC LIMIT 1

On the day with the hottest temperature ever in 2014 , how many bike trips started from the station 2nd at Folsom ?

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


Question: Indicate the height of all players from team Oshawa Generals in inches.

SELECT T3.height_in_inch FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'Oshawa Generals'

Indicate the height of all players from team Oshawa Generals in inches .

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


Question: What are the average prices of wines for different years?

SELECT avg(Price) ,  YEAR FROM WINE GROUP BY YEAR

What are the average prices of wines for different years ?

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


Question: Find the title of course whose prerequisite is course Differential Geometry.

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

Find the title of course whose prerequisite is course Differential Geometry .

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


Question: What is the percentage of act number 5 in Titus Andronicus?

SELECT CAST(SUM(IIF(T2.act = 5, 1, 0)) AS REAL) * 100 / COUNT(T2.act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Titus Andronicus'

What is the percentage of act number 5 in Titus Andronicus ?

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


Question: Show the nicknames of schools that are not in division 1.

SELECT Nickname FROM school_details WHERE Division != "Division 1"

Show the nicknames of schools that are not in division 1 .

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


Question: How many male patients are diagnosed with hypertension as compared to female patients?

SELECT COUNT(DISTINCT CASE WHEN T2.gender = 'M' THEN T2.patient END) AS Male , COUNT(DISTINCT CASE WHEN T2.gender = 'F' THEN T2.patient END) AS Female FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Hypertension'

How many male patients are diagnosed with hypertension as compared to female patients ?

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


Question: Show the number of customer cards.


Question: What is the percentage of the people who are under 35 and participated in the summer season?

SELECT CAST(COUNT(CASE WHEN T2.age < 35 THEN 1 END) AS REAL) * 100 / COUNT(T2.games_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Summer'

What is the percentage of the people who are under 35 and participated in the summer season ?

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


Question: Show the names of players coached by the rank 1 coach.

SELECT T3.Player_name FROM player_coach AS T1 JOIN coach AS T2 ON T1.Coach_ID  =  T2.Coach_ID JOIN player AS T3 ON T1.Player_ID  =  T3.Player_ID WHERE T2.Rank  =  1

Show the names of players coached by the rank 1 coach .

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


Question: For the latest passing player who could play all the positions in the court, how many points did he have in his career?

SELECT SUM(T2.points) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.pos = 'C-F-G' GROUP BY T2.playerID, T2.year ORDER BY T2.year DESC LIMIT 1

For the latest passing player who could play all the positions in the court , how many points did he have in his career ?

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


Question: What are the names of the collections that are related to the collection named Best?

SELECT DISTINCT T4.Collection_Name FROM Collection_Subset_Members AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Related_Collection_ID = T2.Collection_ID JOIN Collections AS T3 ON T1.Collection_ID = T3.Collection_ID JOIN Collections AS T4 ON T2.Collection_ID = T4.Collection_ID WHERE T3.Collection_Name = "Best";

What are the names of the collections that are related to the collection named Best ?

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


Question: Among all the trips, which day had the most bikes borrowed? What was the average coldest temperature on that day?

SELECT T2.date, AVG(T2.min_temperature_f) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code GROUP BY T2.date ORDER BY COUNT(T1.start_date) DESC LIMIT 1

Among all the trips , which day had the most bikes borrowed ? What was the average coldest temperature on that day ?

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


Question: How many cities are there in the country ruled by Kostis Stefanopoulos?

SELECT COUNT(DISTINCT T1.Name) FROM City AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.HeadOfState = 'Kostis Stefanopoulos'

How many cities are there in the country ruled by Kostis Stefanopoulos ?

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


Question: How many customers are named Madison?

SELECT COUNT(CustomerID) FROM Customers WHERE FirstName = 'Madison'


Question: Return the primary conference of the school with the lowest acc percentage score.

SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1

Return the primary conference of the school with the lowest acc percentage score .

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


Question: Find the details for all chip models.


Question: What are the names of countries that do not have an official language?

SELECT name FROM countries WHERE id NOT IN (SELECT country_id FROM official_languages)

What are the names of countries that do not have an official language ?

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


Question: Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on  Sep 21, 2010.

SELECT Kids FROM Reservations WHERE CheckIn  =  "2010-09-21" AND FirstName  =  "DAMIEN" AND LastName  =  "TRACHSEL";

Return the number of kids for the room reserved and checked in by DAMIEN TRACHSEL on Sep 21 , 2010 .

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


Question: What is the name of all the people who are older than at least one engineer? Order them by age.

SELECT name FROM Person WHERE age  >  (SELECT min(age) FROM person WHERE job  =  'engineer') ORDER BY age

What is the name of all the people who are older than at least one engineer ? Order them by age .

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


Question: What are the average and maximum values for each type of content in boxes?

SELECT avg(value) ,  max(value) ,  CONTENTS FROM boxes GROUP BY CONTENTS

What are the average and maximum values for each type of content in boxes ?

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


Question: Give me the full birthdate, email and phone number of the youngest client in Indianapolis .

SELECT T1.year, T1.month, T1.day, T1.email, T1.phone FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.city = 'Indianapolis' ORDER BY T1.year DESC, T1.month DESC, T1.day DESC LIMIT 1

Give me the full birthdate , email and phone number of the youngest client in Indianapolis .

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