Question: Write the complaint ID, call ID, and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014.

SELECT `Complaint ID`, call_id, phonefinal FROM callcenterlogs WHERE strftime('%Y', `Date received`) = '2014' AND server = 'AVIDAN'

Write the complaint ID , call ID , and final phone number of complaints through AVIDAN server from 1/1/2014 to 12/30/2014 .

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


Question: For how many consecutive years did Aruba get a footnote on the series code BX.KLT.DINV.CD.WD?

SELECT COUNT(T2.Year) FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'BX.KLT.DINV.CD.WD'

For how many consecutive years did Aruba get a footnote on the series code BX.KLT.DINV.CD.WD ?

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


Question: Show the police force shared by counties with location on the east and west.

SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "East" INTERSECT SELECT Police_force FROM county_public_safety WHERE LOCATION  =  "West"

Show the police force shared by counties with location on the east and west .

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


Question: Find the ids and names of stations from which at least 200 trips started.

SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*)  >=  200

Find the ids and names of stations from which at least 200 trips started .

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


Question: What is the quantity of the closed or not running Yelp Businesses in 'AZ'?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND active LIKE 'False'

What is the quantity of the closed or not running Yelp Businesses in ' AZ ' ?

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


Question:
How many language code of method is used for the github address "https://github.com/managedfusion/managedfusion.git
"?

SELECT COUNT(DISTINCT T3.Lang) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId INNER JOIN Method AS T3 ON T2.Id = T3.SolutionId WHERE T1.Url = 'https://github.com/managedfusion/managedfusion.git'

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


Question: What are the email addresses, cities, and counties listed for all cusomters who are from the gender that orders less often?

SELECT email_address ,  town_city ,  county FROM Customers WHERE gender_code  =  ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 )

What are the email addresses , cities , and counties listed for all cusomters who are from the gender that orders less often ?

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


Question: List all carcinogenic molecules and their elements.

SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+'

List all carcinogenic molecules and their elements .


Question: List down the page id of titles start with alphabet "b".

SELECT pid FROM pages WHERE title LIKE 'b%'

List down the page i d of titles start with alphabet " b " .

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


Question: Show the name of the shop that has the most kind of devices in stock.

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

Show the name of the shop that has the most kind of devices in stock .

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


Question: How many clubs does "Linda Smith" belong to?

SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Linda" AND t3.lname  =  "Smith"

How many clubs does " Linda Smith " belong to ?

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


Question: How many events in total have happened on all the vivo devices in the year 2016?

SELECT COUNT(T1.event_id) FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.event_id = T2.device_id WHERE STRFTIME('%Y', T1.timestamp) = '2016' AND T2.phone_brand = 'vivo'

How many events in total have happened on all the vivo devices in the year 2016 ?

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


Question: What are the names of the parts manufactured by manufacturer 3 that have a supply cost of 1,000?

SELECT T2.p_name FROM partsupp AS T1 INNER JOIN part AS T2 ON T1.ps_partkey = T2.p_partkey WHERE T1.ps_supplycost = 1000 AND T2.p_mfgr = 'Manufacturer#3'

What are the names of the parts manufactured by manufacturer 3 that have a supply cost of 1,000 ?

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


Question: Find the name and age of the authors who do not have any book in the record.

SELECT name ,  age FROM author WHERE author_id NOT IN (SELECT author_id FROM book)

Find the name and age of the authors who do not have any book in the record .

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


Question: What is the most common maximum page size?

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

What is the most common maximum page size ?


Question: What is the price of the book that sells the best?

SELECT T2.price FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id ORDER BY T1.qty DESC LIMIT 1

What is the price of the book that sells the best ?


Question: Which customers did not make any orders? List the first name, middle initial and last name.

SELECT customer_first_name ,  customer_middle_initial ,  customer_last_name FROM Customers EXCEPT SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id

Which customers did not make any orders ? List the first name , middle initial and last name .

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


Question: Show the name of the sport with the most events.

SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id GROUP BY T1.sport_name ORDER BY COUNT(T2.event_name) DESC LIMIT 1

Show the name of the sport with the most events .


Question: Which user made a post titled 'Understanding what Dassault iSight is doing?' and how much is the reputation of the user?

SELECT T1.DisplayName, T1.Reputation FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T2.Title = 'Understanding what Dassault iSight is doing?'

Which user made a post titled ' Understanding what Dassault iSight is doing ? ' and how much is the reputation of the user ?

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


Question: What are the payment ids, invoice ids, and payment details for all payments?

SELECT payment_id ,  invoice_id ,  payment_details FROM Payments

What are the payment ids , invoice ids , and payment details for all payments ?

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


Question: When did event number 7 happen for user number -8022267440849930000?

SELECT T1.timestamp FROM events_relevant AS T1 INNER JOIN app_events AS T2 ON T1.event_id = T2.event_id WHERE T2.app_id = -8022267440849930000 AND T1.event_id = 7

When did event number 7 happen for user number -8022267440849930000 ?

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


Question: What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports?

SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "London Heathrow" INTERSECT SELECT T1.Aircraft FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Airport_Name  =  "London Gatwick"

What are the names of all aircrafts that are associated with both London Heathrow and Gatwick airports ?

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


Question: List the titles of the art category.

SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'arts'


Question: What is the birth year of the artist who created a painting in 1884 that is on canvas?

SELECT T1.birthYear FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T2.year  =  1884 AND mediumOn  =  "canvas"

What is the birth year of the artist who created a painting in 1884 that is on canvas ?

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


Question: Return the famous titles for artists that have volumes that lasted more than 2 weeks on top.

SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T2.Weeks_on_Top  >  2

Return the famous titles for artists that have volumes that lasted more than 2 weeks on top .

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


Question: Name of the crew that were born in California, USA between 1958 and 1969.

SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) = '1958' AND birth_place = 'California' AND birth_country = 'USA';

Name of the crew that were born in California , USA between 1958 and 1969 .

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


Question: Find all students taught by OTHA MOYER. Output the first and last names of the students.

SELECT T1.firstname ,  T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "OTHA" AND T2.lastname  =  "MOYER"

Find all students taught by OTHA MOYER . Output the first and last names of the students .

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


Question: Find the names of all directors whose movies are rated by Sarah Martinez.

SELECT DISTINCT T2.director FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Sarah Martinez'

Find the names of all directors whose movies are rated by Sarah Martinez .

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


Question: Show each apartment type code, and the maximum and minimum number of rooms for each type.

SELECT apt_type_code ,  max(room_count) ,  min(room_count) FROM Apartments GROUP BY apt_type_code

Show each apartment type code , and the maximum and minimum number of rooms for each type .

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


Question: How many awards classified as "Primetime Emmy" category?

SELECT COUNT(award_id) FROM Award WHERE award_category = 'Primetime Emmy';

How many awards classified as " Primetime Emmy " category ?

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


Question: Please list the phone numbers of the students from the Student_Club that has attended the event "Women's Soccer".

SELECT T3.phone FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer'

Please list the phone numbers of the students from the Student_Club that has attended the event " Women 's Soccer " .

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


Question: How many institutions are there for each type of affiliation?

SELECT Affiliation ,  COUNT(*) FROM institution GROUP BY Affiliation

How many institutions are there for each type of affiliation ?


Question: Show the name of storms which don't have affected region in record.

SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)

Show the name of storms which do n't have affected region in record .

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


Question: How many images have at least one pair of object samples with the relation "parked on"?

SELECT SUM(CASE WHEN T1.PRED_CLASS = 'parked on' THEN 1 ELSE 0 END) FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID

How many images have at least one pair of object samples with the relation " parked on " ?

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


Question: What is the carrier of the most expensive phone?

SELECT Carrier FROM phone ORDER BY Price DESC LIMIT 1

What is the carrier of the most expensive phone ?


Question: Among all the current female legislators, how many of them have attended in Senate roll call votes?

SELECT COUNT(lis_id) FROM current WHERE gender_bio = 'F' AND lis_id IS NOT NULL

Among all the current female legislators , how many of them have attended in Senate roll call votes ?

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


Question: What is the phone number of Kerry Pryor?

SELECT phone_number FROM student WHERE l_name = 'Pryor' AND f_name = 'Kerry'

What is the phone number of Kerry Pryor ?

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


Question: List the supplier company names located in Germany.

SELECT CompanyName FROM Suppliers WHERE Country = 'Germany'

List the supplier company names located in Germany .

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


Question: How many products have a price higher than the average?

SELECT count(*) FROM products WHERE product_price  >  (SELECT avg(product_price) FROM products)

How many products have a price higher than the average ?

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


Question: List the names of players in ascending order of votes.

SELECT Player_name FROM player ORDER BY Votes ASC

List the names of players in ascending order of votes .

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


Question: State the chance creation passing class for "PEC Zwolle" on 2013/9/20.

SELECT t2.chanceCreationPassingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'PEC Zwolle' AND SUBSTR(t2.`date`, 1, 10) = '2013-09-20'

State the chance creation passing class for " PEC Zwolle " on 2013/9/20 .

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


Question: In the violations in 2014, how many of them have a low risk category?

SELECT COUNT(risk_category) FROM violations WHERE STRFTIME('%Y', `date`) = '2014' AND risk_category = 'Low Risk'

In the violations in 2014 , how many of them have a low risk category ?

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


Question: How many parts have a retail price of over 1900?

SELECT COUNT(p_partkey) FROM part WHERE p_retailprice > 1900

How many parts have a retail price of over 1900 ?

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


Question: How many departments are led by heads who are not mentioned?

SELECT count(*) FROM department WHERE department_id NOT IN (SELECT department_id FROM management);

How many departments are led by heads who are not mentioned ?


Question: Find the name of dorms which have both TV Lounge and Study Room as amenities.

SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' INTERSECT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'

Find the name of dorms which have both TV Lounge and Study Room as amenities .

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


Question: When was the medical information on patient number 48473 first documented, and what disease did she have?

SELECT `First Date`, Diagnosis FROM Patient WHERE ID = 48473

When was the medical information on patient number 48473 first documented , and what disease did she have ?

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


Question: Please give the name of the course in which most numbers of the students got an A. Also, list the full name of the students who got an A in this course.

SELECT T3.name, T2.f_name, T2.l_name FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T1.grade = 'A' GROUP BY T3.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1

Please give the name of the course in which most numbers of the students got an A. Also , list the full name of the students who got an A in this course .

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


Question: Which product has the highest standard cost?

SELECT Name FROM Product ORDER BY StandardCost DESC LIMIT 1

Which product has the highest standard cost ?


Question: What is the title of the first book that was published in 1900?

SELECT title FROM book WHERE STRFTIME('%Y', publication_date) = '1900' ORDER BY publication_date LIMIT 1

What is the title of the first book that was published in 1900 ?

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


Question: Among the movie lists created after 2010/1/1, how many of them have over 200 followers?

SELECT COUNT(*) FROM lists WHERE list_followers > 200 AND list_update_timestamp_utc > '2010-01-01'

Among the movie lists created after 2010/1/1 , how many of them have over 200 followers ?

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


Question: List the full name of all employees who work in the Northern region.

SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID INNER JOIN Region AS T4 ON T3.RegionID = T4.RegionID WHERE T4.RegionDescription = 'Northern'

List the full name of all employees who work in the Northern region .

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


Question: Please list the names of the authors of the paper "Area Effects in Cepaea".

SELECT T1.Name FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T2.Title = 'Area Effects in Cepaea'

Please list the names of the authors of the paper " Area Effects in Cepaea " .

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


Question: What are the names and locations of tracks that have had exactly 1 race?

SELECT T2.name ,  T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id GROUP BY T1.track_id HAVING count(*)  =  1

What are the names and locations of tracks that have had exactly 1 race ?

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


Question: Which keywords belong to the movie titles with the highest popularity?

SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id ORDER BY T1.popularity DESC LIMIT 1

Which keywords belong to the movie titles with the highest popularity ?

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


Question: Find all the forenames of distinct drivers who was in position 1 as standing and won?

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

Find all the forenames of distinct drivers who was in position 1 as standing and won ?

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


Question: Who are the players that have names containing the letter a?

SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'

Who are the players that have names containing the letter a ?


Question: Count the number of drivers who have not driven any vehicles.

SELECT count(*) FROM driver WHERE driver_id NOT IN ( SELECT driver_id FROM vehicle_driver )

Count the number of drivers who have not driven any vehicles .


Question: Find the titles of movies that don’t have any rating.

SELECT title FROM movies WHERE rating  =  'null'

Find the titles of movies that do n’t have any rating .

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


Question: What is the most common result of the music festival?

SELECT RESULT FROM music_festival GROUP BY RESULT ORDER BY COUNT(*) DESC LIMIT 1

What is the most common result of the music festival ?

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


Question: What is the transaction type that has processed the greatest total amount in transactions?

SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1

What is the transaction type that has processed the greatest total amount in transactions ?

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


Question: Which character was mentioned in the paragraph "Would he do so, I'ld beg your precious mistress, Which he counts but a trifle."? Give the character name.

SELECT T1.CharName FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'Would he do so, I''ld beg your precious mistress,Which he counts but a trifle.'

Which character was mentioned in the paragraph " Would he do so , I'ld beg your precious mistress , Which he counts but a trifle . " ? Give the character name .

Would he do so, I'ld beg your precious mistress,Which he counts but a trifle.

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


Question: Show the names of customers and names of dishes they order.

SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID

Show the names of customers and names of dishes they order .

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


Question: In the year 1997 allstar game, which teams did the players had the most rebounds play in? List their team ids.

SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year INNER JOIN player_allstar AS T3 ON T3.playerID = T1.playerID WHERE T3.season_id = 1997 ORDER BY T1.rebounds DESC LIMIT 1

In the year 1997 allstar game , which teams did the players had the most rebounds play in ? List their team ids .

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


Question: How many schools in the West New York School District have the highest poverty level?

SELECT COUNT(poverty_level) FROM projects WHERE school_district = 'West New York School District' AND poverty_level = 'highest poverty'

How many schools in the West New York School District have the highest poverty level ?

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


Question: How many orders that Medsep Group had made?

SELECT SUM(CASE WHEN T1.`Customer Names` = 'Medsep Group' THEN 1 ELSE 0 END) FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID

How many orders that Medsep Group had made ?

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


Question: Which country has the highest infant mortality? Also state its population growth.

SELECT T1.Name, T2.Population_Growth FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country ORDER BY T2.Infant_Mortality DESC LIMIT 1

Which country has the highest infant mortality ? Also state its population growth .

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


Question: Please show the most common age of editors.

SELECT Age FROM editor GROUP BY Age ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common age of editors .


Question: Find the id and address of the shops whose score is below the average score.

SELECT shop_id ,  address FROM shop WHERE score  <  (SELECT avg(score) FROM shop)

Find the i d and address of the shops whose score is below the average score .

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


Question: List the name of all playlist.


Question: Among the teams that were ranked 3 from 1937 to 1940, what is the team name whose players had the highest point?

SELECT DISTINCT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.rank = 3 AND T1.year BETWEEN 1937 AND 1940 ORDER BY T2.points DESC LIMIT 1

Among the teams that were ranked 3 from 1937 to 1940 , what is the team name whose players had the highest point ?

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


Question: Indicate, by region, which platform has sold the most games.

SELECT T.region_name FROM ( SELECT T1.platform_name, T4.region_name, SUM(T3.num_sales) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN region_sales AS T3 ON T1.id = T3.game_platform_id INNER JOIN region AS T4 ON T3.region_id = T4.id GROUP BY T1.platform_name, T4.region_name ORDER BY SUM(T3.num_sales) DESC LIMIT 1 ) t

Indicate , by region , which platform has sold the most games .


Question: What are the average extra runs given in the second innings of every match?

SELECT AVG(Innings_No) FROM Extra_Runs WHERE Innings_No = 2

What are the average extra runs given in the second innings of every match ?

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


Question: What are the total number of domestic passengers at all London airports?

SELECT sum(Domestic_Passengers) FROM airport WHERE Airport_Name LIKE "%London%"

What are the total number of domestic passengers at all London airports ?

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


Question: Which month has the most happy hours?

SELECT MONTH FROM happy_hour GROUP BY MONTH ORDER BY count(*) DESC LIMIT 1


Question: How many methods in the same repository share a tokenized name that begins with "query language..."?

SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized LIKE 'query language%'

How many methods in the same repository share a tokenized name that begins with " query language ... " ?

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


Question: Find the manager and sponsor for each team and order them by the car owner.

SELECT Manager ,  Sponsor FROM team ORDER BY Car_Owner

Find the manager and sponsor for each team and order them by the car owner .

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


Question: Find the name of the club that has the most female students.

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

Find the name of the club that has the most female students .

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


Question: Find the number of rooms for different block code?

SELECT count(*) ,  T1.blockcode FROM BLOCK AS T1 JOIN room AS T2 ON T1.blockfloor  =  T2.blockfloor AND T1.blockcode  =  T2.blockcode GROUP BY T1.blockcode

Find the number of rooms for different block code ?


Question: What is the average math score of the school with the lowest average score for all subjects, and in which county is it located?

SELECT T1.AvgScrMath, T2.County FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T1.AvgScrMath IS NOT NULL ORDER BY T1.AvgScrMath + T1.AvgScrRead + T1.AvgScrWrite ASC LIMIT 1

What is the average math score of the school with the lowest average score for all subjects , and in which county is it located ?

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


Question: Show the name, time, and service for all trains.

SELECT name ,  TIME ,  service FROM train

Show the name , time , and service for all trains .

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


Question: How many courses does the student with the highest GPA this semester take?

SELECT COUNT(course_id) FROM registration WHERE student_id IN ( SELECT student_id FROM student WHERE gpa = ( SELECT MAX(gpa) FROM student ) )

How many courses does the student with the highest GPA this semester take ?

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


Question: Among the technology items, what percentage of them are from Best Buy for Business? Provide the date of the project related to those items.

SELECT CAST(SUM(CASE WHEN T1.vendor_name = 'Best Buy for Business' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.project_resource_type = 'Technology' UNION ALL SELECT DISTINCT T1.date_posted FROM projects AS T1 INNER JOIN resources AS T2 ON T1.projectid = T2.projectid WHERE T2.vendor_name = 'Best Buy for Business' AND T2.project_resource_type = 'Technology'

Among the technology items , what percentage of them are from Best Buy for Business ? Provide the date of the project related to those items .

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


Question: Among universities that score below 80 in 2015, what is the percentage of international students?

SELECT SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) / COUNT(*) * 100 FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.score < 80 AND T1.year = 2015

Among universities that score below 80 in 2015 , what is the percentage of international students ?

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


Question: What is the last name and position of the student that bought pizza on 09/10/2019?

SELECT T1.last_name, T1.position FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T2.expense_date = '2019-09-10' AND T2.expense_description = 'Pizza'

What is the last name and position of the student that bought pizza on 09/10/2019 ?

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


Question: List the champion (team name) and year from year 1950 to 1960.

SELECT DISTINCT T1.name, T2.year FROM teams AS T1 JOIN series_post AS T2 ON T1.tmID = T2.tmIDWinner WHERE T2.round = 'F' AND T2.year BETWEEN 1950 AND 1960

List the champion ( team name ) and year from year 1950 to 1960 .

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


Question: What are the full names of employees who with in department 70 or 90?

SELECT first_name ,  last_name FROM employees WHERE department_id  =  70 OR department_id  =  90

What are the full names of employees who with in department 70 or 90 ?

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


Question: Give the full names of the countries that are located in more than one continent.

SELECT T3.Name FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T3.Code = T2.Country GROUP BY T3.Name HAVING COUNT(T3.Name) > 1

Give the full names of the countries that are located in more than one continent .

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


Question: What are the names of customers who have taken both Mortgage and Auto loans?

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Mortgages' INTERSECT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE loan_type  =  'Auto'

What are the names of customers who have taken both Mortgage and Auto loans ?

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


Question: Show member names without any registered branch.

SELECT name FROM member WHERE member_id NOT IN (SELECT member_id FROM membership_register_branch)

Show member names without any registered branch .

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


Question: How many sections does each course have?

SELECT count(*) ,  crs_code FROM CLASS GROUP BY crs_code

How many sections does each course have ?


Question: List the name of the company that produced more than one phone model.

SELECT Company_name FROM phone GROUP BY Company_name HAVING count(*)  >  1;

List the name of the company that produced more than one phone model .

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


Question: What are the paths of solutions in repository "https://github.com/ecoffey/Bebop.git"

SELECT DISTINCT T2.Path FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/ecoffey/Bebop.git'

What are the paths of solutions in repository " https://github.com/ecoffey/Bebop.git "

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


Question: Find the customer who started a policy most recently.

SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.start_date  =  (SELECT max(start_date) FROM policies)

Find the customer who started a policy most recently .

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


Question: How many countries do we have?

SELECT count(DISTINCT country) FROM City


Question: Among the products, how many of them were discontinued in production?

SELECT COUNT(*) FROM Products WHERE Discontinued = 1

Among the products , how many of them were discontinued in production ?


Question: Find the code of the role that have the most employees.

SELECT role_code FROM Employees GROUP BY role_code ORDER BY count(*) DESC LIMIT 1

Find the code of the role that have the most employees .


Question: Write down the title and summary of the episode with the keyword 'eviction.'

SELECT T1.title, T1.summary FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.keyword = 'eviction';

Write down the title and summary of the episode with the keyword ' eviction . '

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


Question: For each book type return the type and the number of books of that type.

SELECT TYPE ,  COUNT(*) FROM book GROUP BY TYPE

For each book type return the type and the number of books of that type .

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


Question: What are the coordinates of the planet named Mars?

SELECT Coordinates FROM Planet WHERE Name  =  "Mars";

What are the coordinates of the planet named Mars ?

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


Question: What are the ids of the courses that are registered or attended by the student whose id is 121?

SELECT course_id FROM student_course_registrations WHERE student_id = 121 UNION SELECT course_id FROM student_course_attendance WHERE student_id = 121

What are the ids of the courses that are registered or attended by the student whose i d is 121 ?

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


Question: What is the average price for the order line?

What is the average price for the order line ?


Question: Compute the average score of submissions.

Compute the average score of submissions .


Question: List all the order numbers for In-Store sales and find the city where the store is located.

SELECT DISTINCT T1.OrderNumber, T2.`City Name` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.`Sales Channel` = 'In-Store'

List all the order numbers for In - Store sales and find the city where the store is located .

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


Question: List the personal details and the address type descriptions of all the students.

SELECT DISTINCT T1.student_details ,  T3.address_type_description FROM Students AS T1 JOIN Students_Addresses AS T2 ON T1.student_id  =  T2.student_id JOIN Ref_Address_Types AS T3 ON T2.address_type_code  =  T3.address_type_code

List the personal details and the address type descriptions of all the students .

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


Question: What are the wifi and screen mode type of the hardware model named "LG-P760"?

SELECT T1.WiFi , T3.Type FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model JOIN screen_mode AS T3 ON T2.screen_mode = T3.Graphics_mode WHERE T2.Hardware_Model_name = "LG-P760";

What are the wifi and screen mode type of the hardware model named " LG - P760 " ?

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


Question: How many cities in France have a population of more than 100,000?

SELECT COUNT(T2.Name) FROM country AS T1 INNER JOIN city AS T2 ON T2.Country = T1.Code WHERE T1.Name = 'France' AND T2.Population > 100000

How many cities in France have a population of more than 100,000 ?

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


Question: For the patients with an abnormal activated partial prothrom bin time, how many of them does not have thrombosis?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE T3.Thrombosis = 0 AND T2.APTT > 45

For the patients with an abnormal activated partial prothrom bin time , how many of them does not have thrombosis ?

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


Question: What is the phone number of the school that has the highest average score in Math?

SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY T2.AvgScrMath DESC LIMIT 1

What is the phone number of the school that has the highest average score in Math ?

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


Question: What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated.

SELECT AVG(T2.Value) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName LIKE 'adolescent fertility rate%'

What is the average adolescent fertility rate of the country whose Alpha2Code is 1A over the years this indicator was calculated .

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


Question: What are the distinct types of the companies that have operated any flights with velocity less than 200?

SELECT DISTINCT T1.type FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T2.velocity  <  200

What are the distinct types of the companies that have operated any flights with velocity less than 200 ?

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


Question: How many "bars" are there in the Yelp business?

SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Bars'

How many " bars " are there in the Yelp business ?


Question: What is the average number of stars assigned to The simpson 20s: S20-E12? What is the said episode all about?

SELECT AVG(T2.stars), T1.summary FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.episode_id = 'S20-E12';

What is the average number of stars assigned to The simpson 20s : S20 - E12 ? What is the said episode all about ?

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


Question: Which city was the 1992 Summer Olympic held?

SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '1992 Summer'

Which city was the 1992 Summer Olympic held ?


Question: What is the name of the Olympic game with the most competitors held in Barcelona?

SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T4.city_name = 'Barcelona' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1

What is the name of the Olympic game with the most competitors held in Barcelona ?

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


Question: Calculate the average duration of absense of disabled students.

SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name

Calculate the average duration of absense of disabled students .


Question: Return the id of the customer who has the most cards, as well as the number of cards.

SELECT customer_id ,  count(*) FROM Customers_cards GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1

Return the i d of the customer who has the most cards , as well as the number of cards .

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


Question: Which direction do most of the trains with rectangle-shaped second cars run?

SELECT T2.direction FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.position = 2 AND T1.shape = 'rectangle' GROUP BY T2.direction ORDER BY COUNT(T2.id) DESC LIMIT 1

Which direction do most of the trains with rectangle - shaped second cars run ?

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


Question: Which city has the most businesses whose attribute is full_bar?

SELECT T1.city FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id WHERE T2.attribute_value LIKE 'full_bar' GROUP BY T1.city

Which city has the most businesses whose attribute is full_bar ?

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


Question: What percentage of customers from the African region is in the household segment?

SELECT CAST(SUM(IIF(T2.r_name = 'AFRICA', 1, 0)) AS REAL) * 100 / COUNT(T1.n_nationkey) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey INNER JOIN customer AS T3 ON T1.n_nationkey = T3.c_nationkey WHERE T3.c_mktsegment = 'HOUSEHOLD'

What percentage of customers from the African region is in the household segment ?

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


Question: Show the titles of books in descending order of publication price.

SELECT T1.Title FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T2.Price DESC

Show the titles of books in descending order of publication price .

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


Question: Which park had most attendances in 2008?

SELECT T2.park_name FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year = 2008 ORDER BY T1.attendance DESC LIMIT 1;

Which park had most attendances in 2008 ?


Question: Write down the ruling of Beacon of Immortality.

SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Beacon of Immortality'

Write down the ruling of Beacon of Immortality .

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


Question: What are the managers and sponsors of teams? Sort the results by Car Owners.

SELECT Manager ,  Sponsor FROM team ORDER BY Car_Owner

What are the managers and sponsors of teams ? Sort the results by Car Owners .

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


Question: Please list the full names of any three inactive customers.

SELECT first_name, last_name FROM customer WHERE active = 0 LIMIT 3

Please list the full names of any three inactive customers .


Question: What is the nationality of supplier number 1?

SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_suppkey = 1

What is the nationality of supplier number 1 ?


Question: Find the location of businesses that have business hours from 8 am to 9 pm every Friday.

SELECT T1.city FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.closing_time LIKE '9PM' AND T2.opening_time LIKE '8AM' AND T3.day_of_week LIKE 'Friday' GROUP BY T1.city

Find the location of businesses that have business hours from 8 am to 9 pm every Friday .

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


Question: What is the average rental rate of sci-fi film titles?

SELECT AVG(T1.rental_rate) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T3.category_id = T2.category_id WHERE T3.`name` = 'Sci-Fi'

What is the average rental rate of sci - fi film titles ?

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


Question: What are all the document type codes and document type names?

SELECT document_type_code ,  document_type_name FROM Ref_document_types

What are all the document type codes and document type names ?

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


Question: What's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal/expected time?

SELECT SUM(T2.grad_100) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011 AND T2.gender = 'M' AND T2.race = 'H'

What 's the number of male Hispanic students who graduated from Central Alabama Community College in 2011 within 100 percent of normal / expected time ?

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


Question: What are the names of the top 6 products that has the biggest size in centimeter and what are its reorder point?

SELECT Name, ReorderPoint FROM Product WHERE SizeUnitMeasureCode = 'CM' ORDER BY Size DESC LIMIT 6

What are the names of the top 6 products that has the biggest size in centimeter and what are its reorder point ?

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


Question: How many more territories are there in than Eastern Region than in the Southern Region?

SELECT ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ) - ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Southern' ) AS Calu

How many more territories are there in than Eastern Region than in the Southern Region ?

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


Question: What are the elimination moves of wrestlers whose team is "Team Orton"?

SELECT Elimination_Move FROM Elimination WHERE Team  =  "Team Orton"

What are the elimination moves of wrestlers whose team is " Team Orton " ?

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


Question: How many papers were published by the "Virtual Reality, IEEE Annual International Symposium" conference in 2012?

SELECT COUNT(T2.Id) FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.FullName = 'Virtual Reality, IEEE Annual International Symposium' AND T2.Year = 2012

How many papers were published by the " Virtual Reality , IEEE Annual International Symposium " conference in 2012 ?

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


Question: Name all the authors for all business titles.

SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.type = 'business'

Name all the authors for all business titles .

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


Question: Find all years that have a movie that received a rating of 4 or 5, and sort them in increasing order of year.

SELECT DISTINCT YEAR FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  >=  4 ORDER BY T1.year

Find all years that have a movie that received a rating of 4 or 5 , and sort them in increasing order of year .

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


Question: Count the total number of tweet IDs in `en`.

SELECT COUNT(DISTINCT TweetID) FROM twitter WHERE Lang = 'en'

Count the total number of tweet IDs in ` en ` .

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


Question: What are the feature name and description of the most commonly seen feature across properties?

SELECT T1.feature_name ,  T1.feature_description FROM Features AS T1 JOIN Property_Features AS T2 ON T1.feature_id  =  T2.feature_id GROUP BY T1.feature_name ORDER BY count(*) DESC LIMIT 1;

What are the feature name and description of the most commonly seen feature across properties ?

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


Question: What are the id and details of the customers who have at least 3 events?

SELECT T1.customer_id ,  T1.customer_details FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  3

What are the i d and details of the customers who have at least 3 events ?

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


Question: What is the establishment's name and employee involved in the inspection ID 44256 on May 5, 2010?

SELECT T1.dba_name, T3.first_name, T3.last_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T2.inspection_date = '2010-05-05' AND T2.inspection_id = 44256

What is the establishment 's name and employee involved in the inspection ID 44256 on May 5 , 2010 ?

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


Question: What are the first and last names of the instructors who teach the top 3 number of courses?

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

What are the first and last names of the instructors who teach the top 3 number of courses ?

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


Question: Which organization did student285 enlist?

SELECT organ FROM enlist WHERE name = 'student285'

Which organization did student285 enlist ?


Question: What are the days that had the smallest temperature range, and what was that range?

SELECT date ,  max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1

What are the days that had the smallest temperature range , and what was that range ?

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


Question: Which sport does the event "Shooting Women's Trap" belong to?

SELECT T1.sport_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T2.event_name LIKE 'Shooting Women%s Trap'

Which sport does the event " Shooting Women 's Trap " belong to ?

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


Question: What is the menu id of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages?

SELECT T2.menu_id FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T1.sponsor = 'OCCIDENTAL & ORIENTAL STEAMSHIP COMPANY' GROUP BY T2.menu_id ORDER BY COUNT(T2.page_number) DESC LIMIT 1

What is the menu i d of the menu sponsored by Occidental and Oriental Steamship Company with the highest number of pages ?

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


Question: What are the names of all cities with more than one airport and how many airports do they have?

SELECT city ,  count(*) FROM airports GROUP BY city HAVING count(*)  >  1

What are the names of all cities with more than one airport and how many airports do they have ?

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


Question: Of the titles, which title is about the Carefully researched study of the effects of strong emotions on the body, which state-based publisher published this book, and what is the year-to-date sale?

SELECT T1.title, T2.pub_name, T1.ytd_sales FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.notes = 'Carefully researched study of the effects of strong emotions on the body. Metabolic charts included.'

Of the titles , which title is about the Carefully researched study of the effects of strong emotions on the body , which state - based publisher published this book , and what is the year - to - date sale ?

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


Question: Which buildings have apartments that have more than two bathrooms? Give me the addresses of the buildings.

SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2

Which buildings have apartments that have more than two bathrooms ? Give me the addresses of the buildings .

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


Question: Where do the Senior Citizens live? List building, street, and the city.

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

Where do the Senior Citizens live ? List building , street , and the city .

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


Question: What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times?

SELECT name FROM station WHERE city  =  "Palo Alto" EXCEPT SELECT end_station_name FROM trip GROUP BY end_station_name HAVING count(*)  >  100

What are the names of stations that are located in Palo Alto city but have never been the ending point of trips more than 100 times ?

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


Question: What is the average age for each dorm and what are the names of each dorm?

SELECT avg(T1.age) ,  T3.dorm_name FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid GROUP BY T3.dorm_name

What is the average age for each dorm and what are the names of each dorm ?

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


Question: What is the birth name of Al Jean and his role in creating The simpson 20s: Season 20?

SELECT DISTINCT T1.birth_name, T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.name = 'Al Jean';

What is the birth name of Al Jean and his role in creating The simpson 20s : Season 20 ?

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


Question: Determine the percentage of manufacturers who are from Texas among all of Lorenzo's customers.

SELECT CAST(SUM(CASE WHEN cust_type = 'manufacturer' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer WHERE state = 'TX'

Determine the percentage of manufacturers who are from Texas among all of Lorenzo 's customers .

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


Question: Return the famous release date for the oldest artist.

SELECT Famous_Release_date FROM artist ORDER BY Age DESC LIMIT 1

Return the famous release date for the oldest artist .

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


Question: List the IUCR numbers and index status of homicide incidents.

SELECT index_code FROM IUCR WHERE primary_description = 'HOMICIDE'

List the IUCR numbers and index status of homicide incidents .

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


Question: What is the alias of the city called Hartford?

SELECT DISTINCT T2.alias FROM zip_data AS T1 INNER JOIN alias AS T2 ON T1.zip_code = T2.zip_code WHERE T1.city = 'Hartford'

What is the alias of the city called Hartford ?


Question: List the names of states that have more than 2 parks.

SELECT state FROM park GROUP BY state HAVING count(*)  >  2;

List the names of states that have more than 2 parks .

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


Question: How many countries have notes on the indicator Stocks traded, turnover ratio of domestic shares?

SELECT COUNT(T1.Countrycode)  FROM CountryNotes AS T1 INNER JOIN Series AS T2 ON T1.Seriescode = T2.SeriesCode WHERE T2.IndicatorName = 'Stocks traded, turnover ratio of domestic shares (%)'

How many countries have notes on the indicator Stocks traded , turnover ratio of domestic shares ?

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


Question: Find the last name of the staff whose email address contains "wrau".

SELECT last_name FROM staff WHERE email_address LIKE "%wrau%"

Find the last name of the staff whose email address contains " wrau " .

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


Question: Name the title, year and keyword of the paper which were written by the author ID of 661002 with the affiliation of "Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA" organization.

SELECT T2.Title, T2.Year, T2.Keyword FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.AuthorId = 661002 AND T1.Affiliation = 'Scientific Computing and Imaging Institute, University of Utah, UT 84112, USA'

Name the title , year and keyword of the paper which were written by the author ID of 661002 with the affiliation of " Scientific Computing and Imaging Institute , University of Utah , UT 84112 , USA " organization .

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


Question: Return the name of the youngest pilot to fly Piper Cub.

SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' ORDER BY age LIMIT 1

Return the name of the youngest pilot to fly Piper Cub .

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


Question: Calculate the percentage of population in Edmonton city to the population of its province.

SELECT CAST(T1.Population AS REAL) * 100 / T2.Population FROM city AS T1 INNER JOIN province AS T2 ON T1.Province = T2.Name WHERE T1.Name = 'Edmonton'

Calculate the percentage of population in Edmonton city to the population of its province .

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


Question: Among all shipments placed by Sunguard Window Tinting & Truck Accessories in 2017, identify the percentage of shipments whose weight exceeded 10,000 pounds.

SELECT CAST(SUM(CASE WHEN T1.weight >= 10000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.cust_name = 'Sunguard Window Tinting & Truck Accessories' AND STRFTIME('%Y', T1.ship_date) = '2017'

Among all shipments placed by Sunguard Window Tinting & Truck Accessories in 2017 , identify the percentage of shipments whose weight exceeded 10,000 pounds .

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


Question: What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991?

SELECT AVG('1999'  - STRFTIME('%Y', T2.Birthday)) FROM Laboratory AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.Date BETWEEN '1991-10-01' AND '1991-10-30'

What is the average age of patients as of year 1999 examined in the laboratory for the October of the year 1991 ?

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


Question: What is the percentage difference between month 0 absence and month 9 absence?

SELECT CAST(((SUM(IIF(month = 0, 1, 0)) - SUM(IIF(month = 9, 1, 0)))) AS REAL) * 100 / SUM(IIF(month = 0, 1, 0)) FROM longest_absense_from_school

What is the percentage difference between month 0 absence and month 9 absence ?

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


Question: Give the title of book by George Orwell that has the lowest saleprice.

SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell" ORDER BY T1.saleprice LIMIT 1

Give the title of book by George Orwell that has the lowest saleprice .

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


Question: What is the average number of rooms of apartments with type code "Studio"?

SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "Studio"

What is the average number of rooms of apartments with type code " Studio " ?

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


Question: display the employee ID and job name for all those jobs in department 80.

SELECT T1.employee_id ,  T2.job_title FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id  =  T2.job_id WHERE T1.department_id = 80

display the employee ID and job name for all those jobs in department 80 .

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


Question: Find the name of the products that have the color description "red" and have the characteristic name "fast".

SELECT product_name FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "red" AND t3.characteristic_name  =  "fast"

Find the name of the products that have the color description " red " and have the characteristic name " fast " .

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


Question: What are the titles of films and corresponding types of market estimations?

SELECT T1.Title ,  T2.Type FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID  =  T2.Film_ID

What are the titles of films and corresponding types of market estimations ?

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


Question: What are the last names of individuals who have been contact individuals for an organization?

SELECT DISTINCT t1.individual_last_name FROM individuals AS t1 JOIN organization_contact_individuals AS t2 ON t1.individual_id  =  t2.individual_id

What are the last names of individuals who have been contact individuals for an organization ?

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


Question: Which directors with the best quality directed the most films?

SELECT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 5 GROUP BY T1.directorid ORDER BY COUNT(T2.movieid) DESC LIMIT 1

Which directors with the best quality directed the most films ?


Question: How many tracks belong to rock genre?

SELECT COUNT(*) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"


Question: Which authors publish books in both "MM" and "LT" series? Give me the author names.

SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'MM' INTERSECT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id WHERE t2.book_series  =  'LT'

Which authors publish books in both " MM " and " LT " series ? Give me the author names .

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


Question: List all book titles which have sale prices higher than the average.

SELECT title FROM book WHERE saleprice  >  (SELECT avg(saleprice) FROM book)

List all book titles which have sale prices higher than the average .

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


Question: What are the names and players of all the clubs?

SELECT T1.name ,  T2.Player_id FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID

What are the names and players of all the clubs ?

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


Question: Find the name of customers who did not pay with Cash.

SELECT customer_name FROM customers WHERE payment_method != 'Cash'

Find the name of customers who did not pay with Cash .


Question: List the name and population of the communities where more than average solicit for prostitutes were reported.

SELECT T2.community_area_name, T2.population FROM Crime AS T1 INNER JOIN Community_Area AS T2 ON T2.community_area_no = T1.community_area_no INNER JOIN IUCR AS T3 ON T3.iucr_no = T1.iucr_no WHERE T3.iucr_no = ( SELECT iucr_no FROM IUCR WHERE secondary_description = 'SOLICIT FOR PROSTITUTE' GROUP BY iucr_no HAVING COUNT(iucr_no) > ( SELECT SUM(CASE WHEN secondary_description = 'SOLICIT FOR PROSTITUTE' THEN 1.0 ELSE 0 END) / COUNT(iucr_no) AS average FROM IUCR ) )

List the name and population of the communities where more than average solicit for prostitutes were reported .

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


Question: Name actors who voiced more than five Disney characters.

SELECT 'voice-actor' FROM `voice-actors` GROUP BY 'voice-actor' HAVING COUNT(movie) > 5

Name actors who voiced more than five Disney characters .


Question: Among the recipes from The California Tree Fruit Agreement, calculate the percentage of sodium-free recipes.

SELECT CAST(SUM(CASE WHEN T2.sodium < 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.source = 'The California Tree Fruit Agreement'

Among the recipes from The California Tree Fruit Agreement , calculate the percentage of sodium - free recipes .

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


Question: How many pilots are there?


Question: What is the age of the driver who raced in the most races?

SELECT T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID ORDER BY COUNT(*) DESC LIMIT 1

What is the age of the driver who raced in the most races ?

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


Question: What is the level name of the cheapest catalog (in USD)?

SELECT t2.catalog_level_name FROM catalog_contents AS t1 JOIN catalog_structure AS t2 ON t1.catalog_level_number  =  t2.catalog_level_number ORDER BY t1.price_in_dollars LIMIT 1

What is the level name of the cheapest catalog ( in USD ) ?

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


Question: How many patients are not using Procrastin-X as medication?

SELECT count(*) FROM patient WHERE SSN NOT IN ( SELECT T1.patient FROM Prescribes AS T1 JOIN Medication AS T2 ON T1.Medication  =  T2.Code WHERE T2.name  =  'Procrastin-X' )

How many patients are not using Procrastin - X as medication ?

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


Question: What are the names and ages of drivers who raced in two or more races?

SELECT T1.Driver_Name ,  T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID HAVING COUNT(*)  >=  2

What are the names and ages of drivers who raced in two or more races ?

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


Question: What are the titles of paintings that are created after 1910 and whose medium is oil?

SELECT title FROM paintings WHERE YEAR  >  1910 AND medium  =  "oil"

What are the titles of paintings that are created after 1910 and whose medium is oil ?

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


Question: What are the top 10 customers' first and last names with the highest gross sales, and also what are the sales?

SELECT T1.first_name ,  T1.last_name ,  SUM(T2.total) FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id  =  T1.id GROUP BY T1.id ORDER BY SUM(T2.total) DESC LIMIT 10;

What are the top 10 customers ' first and last names with the highest gross sales , and also what are the sales ?

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


Question: What is the highest price of dishes with menu item ID 1 to 5?

SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T2.id BETWEEN 1 AND 5 ORDER BY T2.price DESC LIMIT 1

What is the highest price of dishes with menu item ID 1 to 5 ?

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


Question: Find the first names of all customers that live in Brazil and have an invoice.

SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"

Find the first names of all customers that live in Brazil and have an invoice .

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


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

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

How many sales teams are there in the Midwest ?


Question: Please list all of the restaurants that serve European food.

SELECT label FROM generalinfo WHERE food_type = 'european'

Please list all of the restaurants that serve European food .


Question: Find the name of rooms whose price is higher than the average price.

SELECT roomName FROM Rooms WHERE basePrice  >  ( SELECT avg(basePrice) FROM Rooms );

Find the name of rooms whose price is higher than the average price .

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


Question: How many players were born in 1982 and have a height above 182cm?

SELECT COUNT(T2.ELITEID) FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T1.height_in_cm > 182 AND strftime('%Y', T2.birthdate) = '1982'

How many players were born in 1982 and have a height above 182 cm ?

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


Question: Show names for all cities in state PA.

SELECT city_name FROM City WHERE state  =  "PA"


Question: List the first and last names of all distinct staff members who are assigned to the problem whose id is 1.

SELECT DISTINCT staff_first_name ,  staff_last_name FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T2.problem_id = 1

List the first and last names of all distinct staff members who are assigned to the problem whose i d is 1 .

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


Question: Where does the employee named "Standard Murray" live?

SELECT address, city, state FROM employee WHERE first_name = 'Standard' AND last_name = 'Murray'

Where does the employee named " Standard Murray " live ?


Question: What is the total quantity of products purchased by "Rodrick Heaney"?

SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id WHERE t1.customer_name  =  "Rodrick Heaney"

What is the total quantity of products purchased by " Rodrick Heaney " ?

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


Question: Which of the films released in 2006 was the most popular among Mubi users?

SELECT movie_title FROM movies WHERE movie_release_year = 2006 ORDER BY movie_popularity DESC LIMIT 1

Which of the films released in 2006 was the most popular among Mubi users ?

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


Question: What is the payment method and customer number for customer named Jeromy?

SELECT payment_method_code ,  customer_number FROM Customers WHERE customer_name  =  "Jeromy"

What is the payment method and customer number for customer named Jeromy ?

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


Question: Find all receipts which either has the earliest date or has a good with price above 10.

SELECT T1.Receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.price  >  10 UNION SELECT ReceiptNumber FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date LIMIT 1)

Find all receipts which either has the earliest date or has a good with price above 10 .

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


Question: List the project details of the projects launched by the organisation

SELECT project_details FROM Projects WHERE organisation_id IN ( SELECT organisation_id FROM Projects GROUP BY organisation_id ORDER BY count(*) DESC LIMIT 1 )

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


Question: Give the percentage of subscribers who rated who rated the movie "G.I. Jane".

SELECT CAST(SUM(CASE WHEN T3.user_subscriber = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id INNER JOIN lists_users AS T3 ON T1.user_id = T3.user_id WHERE T2.movie_title = 'G.I. Jane'

Give the percentage of subscribers who rated who rated the movie " G.I. Jane " .

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


Question: List the names of all players in team Avangard Omsk in season 2000-2001.

SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' AND T1.TEAM = 'Avangard Omsk'

List the names of all players in team Avangard Omsk in season 2000 - 2001 .

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


Question: From the trip record, find the number of unique bikes.

SELECT count(DISTINCT bike_id) FROM trip

From the trip record , find the number of unique bikes .


Question: Return the name and gender of the staff who was assigned in 2016.

SELECT T1.staff_name ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.date_assigned_from LIKE "2016%"

Return the name and gender of the staff who was assigned in 2016 .

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


Question: Among the users who use SUGAR, calculate the percentage of those who are above 20 years old.

SELECT SUM(IIF(T1.age > 20, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'SUGAR'

Among the users who use SUGAR , calculate the percentage of those who are above 20 years old .

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


Question: After Azha Restaurant Inc. passed the inspection on 2010/1/21, when was the follow-up inspection done?

SELECT T1.followup_to FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE T2.dba_name = 'Azha Restaurant Inc.' AND T1.results = 'Pass' AND T1.inspection_date = '2010-01-21'

After Azha Restaurant Inc. passed the inspection on 2010/1/21 , when was the follow - up inspection done ?

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


Question: What are the distinct names of products purchased by at least two different customers?

SELECT DISTINCT T3.product_name FROM customer_orders AS T1 JOIN order_items AS T2 ON T1.order_id  =  T2.order_id JOIN products AS T3 ON T2.product_id  =  T3.product_id GROUP BY T3.product_id HAVING COUNT (DISTINCT T1.customer_id)  >=  2

What are the distinct names of products purchased by at least two different customers ?

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


Question: What are the birth places that are shared by at least two people?

SELECT Birth_Place FROM people GROUP BY Birth_Place HAVING COUNT(*)  >=  2

What are the birth places that are shared by at least two people ?

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


Question: Show all the buildings that have at least 10 professors.

SELECT building FROM Faculty WHERE rank  =  "Professor" GROUP BY building HAVING count(*)  >=  10

Show all the buildings that have at least 10 professors .

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


Question: Find the name of the train whose route runs through greatest number of stations.

SELECT t1.name FROM train AS t1 JOIN route AS t2 ON t1.id  =  t2.train_id GROUP BY t2.train_id ORDER BY count(*) DESC LIMIT 1

Find the name of the train whose route runs through greatest number of stations .

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


Question: How many parties are there?


Question: What's the percentage of coins that is higher than the price 1 hour ago in May 29,2013? List the names of these coins.

SELECT T1.NAME FROM coins AS T1 INNER JOIN historical AS T2 ON T1.ID = T2.coin_id WHERE T2.DATE = '2013-05-29' AND T2.percent_change_1h > 0

What 's the percentage of coins that is higher than the price 1 hour ago in May 29,2013 ? List the names of these coins .

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


Question: What is the closing and opening time of businesses located at Gilbert with highest star rating?

SELECT T2.closing_time, T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Gilbert' ORDER BY T1.stars DESC LIMIT 1

What is the closing and opening time of businesses located at Gilbert with highest star rating ?

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


Question: What are the full name (first and last name) and salary for all employees who does not have any value for commission?

SELECT first_name ,  last_name ,  salary FROM  employees WHERE commission_pct  =  "null"

What are the full name ( first and last name ) and salary for all employees who does not have any value for commission ?

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


Question: Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list.

SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Mckeown%" EXCEPT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id WHERE T3.name LIKE "%Rambow%"

Find the titles and paper IDs for papers which have Mckeown but not Rambow in author list .

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


Question: Write the titles of papers published by Adam Jones and the journal name in which it was published from 2005 to 2010.

SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Adam Jones' AND T1.Year BETWEEN 2005 AND 2010

Write the titles of papers published by Adam Jones and the journal name in which it was published from 2005 to 2010 .

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


Question: How many unique directors with an average earnings of 2 and a quality of 3 have not made comedy films? List them.

SELECT DISTINCT T1.directorid FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 3 AND T1.avg_revenue = 2 AND T2.genre != 'Comedy'

How many unique directors with an average earnings of 2 and a quality of 3 have not made comedy films ? List them .

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


Question: Show the account id and the number of transactions for each account

SELECT account_id ,  count(*) FROM Financial_transactions GROUP BY account_id

Show the account i d and the number of transactions for each account

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


Question: Which country have data classified as official aid?

SELECT DISTINCT T1.CountryCode FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.Description = 'Data are classified as official aid.'

Which country have data classified as official aid ?

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


Question: Name all the authors for 'Sushi, Anyone?'.

SELECT T3.au_fname, T3.au_lname FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T1.title = 'Sushi, Anyone?'

Name all the authors for ' Sushi , Anyone ? ' .

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


Question: What is the name of school that has the smallest enrollment in each state?

SELECT cName ,  state ,  min(enr) FROM college GROUP BY state

What is the name of school that has the smallest enrollment in each state ?

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


Question: Find the net profit of the floral products which were delivered in 2021.

SELECT SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.DeliveryDate LIKE '%/%/21' AND T2.`Product Name` = 'Floral'

Find the net profit of the floral products which were delivered in 2021 .

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


Question: Please provide the names of any three away teams that competed in the Italian divisions.

SELECT T1.AwayTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div=T2.division WHERE T2.country = 'Italy' LIMIT 3

Please provide the names of any three away teams that competed in the Italian divisions .

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


Question: What are the names of players who had been man of the match more than 5 times in season year 2008?

SELECT CASE WHEN COUNT(T2.Man_of_the_Match) > 5 THEN T1.Player_Name ELSE 0 END FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id INNER JOIN Season AS T4 ON T2.Season_Id = T4.Season_Id WHERE T4.Season_Year = 2008

What are the names of players who had been man of the match more than 5 times in season year 2008 ?

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


Question: What are the names of the states whose postal point is not affiliated with any organization?

SELECT DISTINCT T2.name FROM zip_data AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.division IS NULL

What are the names of the states whose postal point is not affiliated with any organization ?

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


Question: How many regions do we have?


Question: What is the amount of customers of 1957 Chevy Pickup by customers in a month?

SELECT COUNT(T2.customerNumber) FROM orderdetails AS T1 INNER JOIN orders AS T2 ON T1.orderNumber = T2.orderNumber WHERE T1.productCode IN ( SELECT productCode FROM products WHERE productName = '1957 Chevy Pickup' )

What is the amount of customers of 1957 Chevy Pickup by customers in a month ?

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


Question: Of the deserts on the America Continent, which one covers the greatest area?

SELECT T5.Name FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN geo_desert AS T4 ON T4.Country = T1.Code INNER JOIN desert AS T5 ON T5.Name = T4.Desert WHERE T3.Name = 'America' ORDER BY T5.Area DESC LIMIT 1

Of the deserts on the America Continent , which one covers the greatest area ?

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


Question: What is the average latitude and longitude of the starting points of all trips?

SELECT avg(T1.lat) ,  avg(T1.long) FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id

What is the average latitude and longitude of the starting points of all trips ?

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


Question: Which collection have most number of documents? List collection name, id and number of documents.

SELECT T1.Collection_Name ,  T1.Collection_ID ,  count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;

Which collection have most number of documents ? List collection name , i d and number of documents .

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


Question: What is the maximum acceleration of a car with price over $40000?

SELECT MAX(T1.acceleration) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T2.price > 40000

What is the maximum acceleration of a car with price over $ 40000 ?

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


Question: Which vendor's selling price for Hex Nut 5 is the lowest, please give the vendor's name.

SELECT T3.Name FROM ProductVendor AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Name = 'Hex Nut 5' ORDER BY T1.StandardPrice LIMIT 1

Which vendor 's selling price for Hex Nut 5 is the lowest , please give the vendor 's name .

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


Question: What is the average unit price of AKJ Books items?

SELECT SUM(item_unit_price) / SUM(item_quantity) FROM resources WHERE vendor_name = 'AKJ Books'

What is the average unit price of AKJ Books items ?

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


Question: List the names of all the universities that have no less than 50,000 students in the year 2012.

SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.num_students > 50000 AND T1.year = 2012

List the names of all the universities that have no less than 50,000 students in the year 2012 .

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


Question: What are the names of all games played by Linda Smith?

SELECT Gname FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.gameid  =  T2.gameid JOIN Student AS T3 ON T3.Stuid  =  T1.Stuid WHERE T3.Lname  =  "Smith" AND T3.Fname  =  "Linda"

What are the names of all games played by Linda Smith ?

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


Question: List all the coral islands along with its city and province.

SELECT City, Province FROM locatedOn WHERE Island IN ( SELECT Name FROM island WHERE Type = 'coral' )

List all the coral islands along with its city and province .

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


Question: Show the name of cities in the county that has the largest number of police officers.

SELECT name FROM city WHERE county_ID  =  (SELECT county_ID FROM county_public_safety ORDER BY Police_officers DESC LIMIT 1)

Show the name of cities in the county that has the largest number of police officers .

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


Question: How many shipments by truck were made?

SELECT COUNT(*) FROM ShipMethod AS T1 INNER JOIN SalesOrderHeader AS T2 USING (ShipMethodID) WHERE T1.Name = 'XRQ - TRUCK GROUND'


Question: For directors who had more than one movie, return the titles and produced years of all movies directed by them.

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

For directors who had more than one movie , return the titles and produced years of all movies directed by them .

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


Question: List all the names of events that had an attendance of over 20 students but were not fundraisers.

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

List all the names of events that had an attendance of over 20 students but were not fundraisers .

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


Question: List the countries and their official languages in Antarctica.

SELECT T1.Name, T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Antarctica' AND T2.IsOfficial = 'T'

List the countries and their official languages in Antarctica .

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


Question: Which teams had the most postseason empty net goals in 2010 season? List their team names.

SELECT T2.name FROM Goalies AS T1 INNER JOIN Teams AS T2 ON T1.tmID = T2.tmID WHERE T1.year = 2010 GROUP BY T2.name ORDER BY SUM(PostENG) DESC LIMIT 1

Which teams had the most postseason empty net goals in 2010 season ? List their team names .

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


Question: Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000?

SELECT * FROM  job_history AS T1 JOIN employees AS T2 ON T1.employee_id  =  T2.employee_id WHERE T2.salary  >=  12000

Can you return all detailed info of jobs which was done by any of the employees who is presently earning a salary on and above 12000 ?

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


Question: What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road, San Diego, California?

SELECT T3.address FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.address = '7052 Carroll Road' AND T2.city = 'San Diego' AND T2.state = 'CA'

What is the address of the driver that delivers the shipment for the customer lives at 7052 Carroll Road , San Diego , California ?

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


Question: For patient born between 1936-1956, how many male patients have creatinine phosphokinase beyond the normal range?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) BETWEEN '1936' AND '1956' AND T1.SEX = 'M' AND T2.CPK >= 250

For patient born between 1936 - 1956 , how many male patients have creatinine phosphokinase beyond the normal range ?

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


Question: Please list the social security numbers of the male employees with a salary of over $70,000 a year.

SELECT ssn FROM employee WHERE gender = 'M' AND CAST(REPLACE(SUBSTR(salary, 4), ',', '') AS REAL) > 70000

Please list the social security numbers of the male employees with a salary of over $ 70,000 a year .

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


Question: How many Folsom customers prefer to pay with Visa?

SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.City = 'Folsom' AND T2.CreditCardType = 'Visa'

How many Folsom customers prefer to pay with Visa ?


Question: For each document object id, how many children do they have?

SELECT T2.Document_Object_ID ,  count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;

For each document object i d , how many children do they have ?

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


Question: Show the student answer texts that received both "Normal" and "Absent" as comments.

SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Absent"

Show the student answer texts that received both " Normal " and " Absent " as comments .

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


Question: How many donors have endowment for school named "Glenn"?

SELECT count(DISTINCT T1.donator_name) FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  "Glenn"

How many donors have endowment for school named " Glenn " ?

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


Question: Find id of the candidate whose email is stanley.monahan@example.org?

SELECT T2.candidate_id FROM people AS T1 JOIN candidates AS T2 ON T1.person_id = T2.candidate_id WHERE T1.email_address = "stanley.monahan@example.org"

Find i d of the candidate whose email is stanley.monahan@example.org ?


Question: How many menu items were created on 28th March 2011?

SELECT COUNT(*) FROM MenuItem WHERE created_at LIKE '2011-03-28%'

How many menu items were created on 28th March 2011 ?

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


Question: List the criteria names under the ranking system called Center for World University Ranking.

SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings'

List the criteria names under the ranking system called Center for World University Ranking .

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


Question: Please list the event names of all the events attended by Maya Mclean.

SELECT T1.event_name FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T3.first_name = 'Maya' AND T3.last_name = 'Mclean'

Please list the event names of all the events attended by Maya Mclean .

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


Question: How many trains are there that run in the east direction?

SELECT COUNT(id) FROM trains WHERE direction = 'east'

How many trains are there that run in the east direction ?

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


Question: Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types.

SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.Graphics_mode  =  t2.screen_mode WHERE t2.Accreditation_type  =  'Full'

Find the pixels of the screen modes that are used by both phones with full accreditation types and phones with Provisional accreditation types .

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


Question: How many users whose reputations are higher than 2000 and the number of views is higher than 1000?

SELECT COUNT(id) FROM users WHERE Reputation > 2000 AND Views > 1000

How many users whose reputations are higher than 2000 and the number of views is higher than 1000 ?

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


Question: List any five of course IDs with professor IDs who taught master courses.

SELECT T1.course_id, T2.p_id FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T1.courseLevel = 'Level_500' LIMIT 5

List any five of course IDs with professor IDs who taught master courses .

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


Question: Which professor advised Willie Rechert to work as a research assistant? Please give his or her full name.

SELECT T1.first_name, T1.last_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Willie' AND T3.l_name = 'Rechert'

Which professor advised Willie Rechert to work as a research assistant ? Please give his or her full name .

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


Question: How many times did K Goel played as a player only?

SELECT COUNT(T1.Match_Id) FROM Player_Match AS T1 INNER JOIN Player AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T1.Role_Id = T3.Role_Id WHERE T2.Player_Name = 'K Goel' AND T3.Role_Id = 3

How many times did K Goel played as a player only ?

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


Question: How many female patients were given an APS diagnosis?

SELECT COUNT(ID) FROM Patient WHERE SEX = 'F' AND Diagnosis = 'APS'

How many female patients were given an APS diagnosis ?


Question: Tell me the the claim date and settlement date for each settlement case.

SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Settlements

Tell me the the claim date and settlement date for each settlement case .

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


Question: List the names of departments where some physicians are primarily affiliated with.

SELECT DISTINCT T2.name FROM affiliated_with AS T1 JOIN department AS T2 ON T1.department = T2.departmentid WHERE PrimaryAffiliation  =  1

List the names of departments where some physicians are primarily affiliated with .

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


Question: What are the short name of team who played safe while creating chance of passing?

SELECT DISTINCT t1.team_short_name FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t2.chanceCreationPassingClass = 'Safe'

What are the short name of team who played safe while creating chance of passing ?

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


Question: How many 'blue' attribute classes are there on image ID 2355735?

SELECT COUNT(T1.ATT_CLASS) FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T2.IMG_ID = 2355735 AND T1.ATT_CLASS = 'blue'

How many ' blue ' attribute classes are there on image ID 2355735 ?

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


Question: What are the brands of the root beers that received 5-star ratings from no less than 5 customers?

SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 GROUP BY T2.BrandID HAVING COUNT(T2.StarRating) >= 5

What are the brands of the root beers that received 5 - star ratings from no less than 5 customers ?

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


Question: How many students belong to the navy department?

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

How many students belong to the navy department ?


Question: During all the observations of Elly Koss, what was the highest Systolic Blood Pressure observed?

SELECT T2.value, 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 = 'Systolic Blood Pressure' ORDER BY T2.VALUE DESC LIMIT 1

During all the observations of Elly Koss , what was the highest Systolic Blood Pressure observed ?

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