Question: What is the name of the supplier that supplies the most products to the company?

SELECT T1.SupplierID FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T1.SupplierID ORDER BY COUNT(*) DESC LIMIT 1

What is the name of the supplier that supplies the most products to the company ?

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


Question: Show all distinct cities in the address record.

Show all distinct cities in the address record .


Question: Which images have more than 20 object samples?

SELECT IMG_ID FROM IMG_OBJ GROUP BY IMG_ID HAVING COUNT(IMG_ID) > 20

Which images have more than 20 object samples ?


Question: Please provide the names of the artists who illustrated the card art in Phyrexian.

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

Please provide the names of the artists who illustrated the card art in Phyrexian .

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


Question: Provide the fine paid and the complete address of the establishment with inspection ID 48216.

SELECT DISTINCT T3.fine, T1.state, T1.city, T1.address FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T2.inspection_id = 48216

Provide the fine paid and the complete address of the establishment with inspection ID 48216 .

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


Question: Which allergy has most number of students affected?

SELECT Allergy FROM Has_allergy GROUP BY Allergy ORDER BY count(*) DESC LIMIT 1

Which allergy has most number of students affected ?


Question: Please provide the titles of any two papers that are either preprinted or unpublished along with the full name of the journal to which those papers belong.

SELECT T1.Title, T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year < 1 LIMIT 2

Please provide the titles of any two papers that are either preprinted or unpublished along with the full name of the journal to which those papers belong .

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


Question: When is the highest closed price of CHNCoin?

SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'CHNCoin' ORDER BY T2.close DESC LIMIT 1

When is the highest closed price of CHNCoin ?


Question: Please list the movies directed by Wolfgang Reitherman that can be watched by the general audience.

SELECT T1.movie_title FROM `movies_total_gross` AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T1.MPAA_rating = 'G' AND T2.director = 'Wolfgang Reitherman'

Please list the movies directed by Wolfgang Reitherman that can be watched by the general audience .

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


Question: Give me the name and description of the location with code x.

SELECT location_name ,  location_description FROM Ref_locations WHERE location_code  =  "x"

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


Question: Return the color code and description for the product with the name 'chervil'.

SELECT t1.color_code ,  t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code WHERE t1.product_name  =  "chervil"

Return the color code and description for the product with the name ' chervil ' .

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


Question: Please list the names of taverns that paid a $100 fine upon inspection.

SELECT DISTINCT T1.dba_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE T1.facility_type = 'Tavern' AND T3.fine = 100

Please list the names of taverns that paid a $ 100 fine upon inspection .

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


Question: Find the list of distinct ranks for faculty.

Find the list of distinct ranks for faculty .


Question: What are the names of all vehicles, ordered by model year descending?

SELECT name FROM vehicles ORDER BY model_year DESC

What are the names of all vehicles , ordered by model year descending ?

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


Question: In superheroes with weight less than 100, list the full name of the superheroes with brown eyes.

SELECT T1.full_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.weight_kg < 100 AND T2.colour = 'Brown'

In superheroes with weight less than 100 , list the full name of the superheroes with brown eyes .

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


Question: Find the saving balance of the account with the highest checking balance.

SELECT T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid ORDER BY T2.balance DESC LIMIT 1

Find the saving balance of the account with the highest checking balance .

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


Question: How many times on page number 44 does the word "votives" appear?

SELECT T2.occurrences FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'votives' AND T2.pid = 44

How many times on page number 44 does the word " votives " appear ?

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


Question: What are the crime rates of counties sorted by number of offices ascending?

SELECT Crime_rate FROM county_public_safety ORDER BY Police_officers ASC

What are the crime rates of counties sorted by number of offices ascending ?

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


Question: How many cylinders does the cheapest car have?

SELECT T1.cylinders FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY price ASC LIMIT 1

How many cylinders does the cheapest car have ?


Question: Write the name of the player who was the man of the series more than one time.

SELECT T2.Player_Name FROM Season AS T1 INNER JOIN Player AS T2 ON T1.Man_of_the_Series = T2.Player_Id WHERE T1.Man_of_the_Series > 1

Write the name of the player who was the man of the series more than one time .

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


Question: Among all the suppliers in debt, how many of them are in Europe?

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

Among all the suppliers in debt , how many of them are in Europe ?

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


Question: Please list the nicknames of the players who have won the All-Rookie award and are born in March.

SELECT DISTINCT T1.nameNick FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthMon = 3

Please list the nicknames of the players who have won the All - Rookie award and are born in March .

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


Question: Show the sea level status recorded by the weather station of store no.19 on 2013/2/24.

SELECT T1.sealevel FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2013-02-24' AND T2.store_nbr = 19

Show the sea level status recorded by the weather station of store no.19 on 2013/2/24 .

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


Question: What are the average laps of all the drivers who are younger than 20?

SELECT avg(Laps) FROM driver WHERE age  <  20

What are the average laps of all the drivers who are younger than 20 ?

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


Question: Which airline does the aircraft with the fastest flight belong to?

SELECT T1.OP_CARRIER_AIRLINE_ID FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ACTUAL_ELAPSED_TIME IS NOT NULL AND T1.CRS_ELAPSED_TIME IS NOT NULL ORDER BY T1.ACTUAL_ELAPSED_TIME - T1.CRS_ELAPSED_TIME ASC LIMIT 1

Which airline does the aircraft with the fastest flight belong to ?


Question: What is the birth year of each distinct artists who created sculptures after 1920?

SELECT DISTINCT T1.birthYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  >  1920

What is the birth year of each distinct artists who created sculptures after 1920 ?

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


Question: Which is the email of the party that has used the services the most number of times?

SELECT t1.party_email FROM parties AS t1 JOIN party_services AS t2 ON t1.party_id  =  t2.customer_id GROUP BY t1.party_email ORDER BY count(*) DESC LIMIT 1

Which is the email of the party that has used the services the most number of times ?

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


Question: What is the status code of the items being ordered and shipped and its corresponding shipment tracking number?

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

What is the status code of the items being ordered and shipped and its corresponding shipment tracking number ?

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


Question: For the county where DeSantis Ron is from, what is the average female median age?

SELECT SUM(T4.female_median_age) / COUNT(T1.county) FROM country AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id INNER JOIN zip_data AS T4 ON T1.zip_code = T4.zip_code WHERE T3.first_name = 'DeSantis' AND T3.last_name = 'Ron'

For the county where DeSantis Ron is from , what is the average female median age ?

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


Question: Count the number of parties.


Question: How much more total box office gross did the Walt Disney Company have in revenue in 1998 than in 1997?

SELECT SUM(CASE WHEN `Year` = 1998 THEN Total ELSE 0 END) - SUM(CASE WHEN `Year` = 1997 THEN Total ELSE 0 END) FROM revenue

How much more total box office gross did the Walt Disney Company have in revenue in 1998 than in 1997 ?

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


Question: Please name any three parts that have an available quantity of more than 9998.

SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_availqty > 9998 LIMIT 3

Please name any three parts that have an available quantity of more than 9998 .

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


Question: What is the description of the product named "Chocolate"?

SELECT product_description FROM products WHERE product_name  =  "Chocolate"

What is the description of the product named " Chocolate " ?

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


Question: List the order id, customer id for orders in Cancelled status, ordered by their order dates.

SELECT order_id ,  customer_id FROM customer_orders WHERE order_status_code  =   "Cancelled" ORDER BY order_date

List the order i d , customer i d for orders in Cancelled status , ordered by their order dates .

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


Question: Show all allergy type with number of students affected.

SELECT T2.allergytype ,  count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy GROUP BY T2.allergytype

Show all allergy type with number of students affected .


Question: In the countries for which the latest trade data are from 2013, what was the GDP growth in 2014? List them in the ascending order of GDP.

SELECT DISTINCT T1.CountryCode, T2.Value FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.LatestTradeData = 2013 AND T2.IndicatorName LIKE 'GDP growth (annual %)' AND T2.year = 2014 AND T2.Value > 0 ORDER BY T2.Value ASC

In the countries for which the latest trade data are from 2013 , what was the GDP growth in 2014 ? List them in the ascending order of GDP .

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


Question: Please list the dates on which the sale of item no.5 in store no.3 exceeded 100 and the average wind speed exceeded 10.

SELECT T1.`date` FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T2.store_nbr = 3 AND T1.item_nbr = 5 AND T1.units > 100 AND T3.avgspeed > 10

Please list the dates on which the sale of item no.5 in store no.3 exceeded 100 and the average wind speed exceeded 10 .

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


Question: What are the general and specific descriptions of the most common crime incidents that happened in an aircraft?

SELECT T2.primary_description, T2.secondary_description FROM Crime AS T1 INNER JOIN IUCR AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.location_description = 'AIRCRAFT' GROUP BY T1.iucr_no ORDER BY COUNT(T1.iucr_no) DESC LIMIT 1

What are the general and specific descriptions of the most common crime incidents that happened in an aircraft ?

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


Question: Show all ministers and parties they belong to in descending order of the time they took office.

SELECT minister ,  party_name FROM party ORDER BY took_office DESC

Show all ministers and parties they belong to in descending order of the time they took office .

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


Question: In which year was the movie "La Antena" released?

SELECT movie_release_year FROM movies WHERE movie_title = 'La Antena'

In which year was the movie " La Antena " released ?

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


Question: Find the average order quantity per order.

SELECT avg(order_quantity) FROM order_items

Find the average order quantity per order .


Question: How many male clients born in the year 1977 were given priority 0 in their complaints?

SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.sex = 'Male' AND T2.priority = 0 AND T1.year = 1997

How many male clients born in the year 1977 were given priority 0 in their complaints ?

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


Question: How many lessons were in cancelled state?

SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled";

How many lessons were in cancelled state ?


Question: How many professors have a Ph.D. in each department?

SELECT count(*) ,  dept_code FROM professor WHERE prof_high_degree  =  'Ph.D.' GROUP BY dept_code

How many professors have a Ph.D. in each department ?


Question: How many rooms are there?


Question: State name of disabled students who have the longest duration of absense from school.

SELECT T1.name FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name ORDER BY T2.month DESC LIMIT 1

State name of disabled students who have the longest duration of absense from school .

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


Question: What are the ids of the paintings created before all of the paintings in gallery 240?

SELECT paintingID FROM paintings WHERE YEAR  <   (SELECT min(YEAR) FROM paintings WHERE LOCATION  =  'Gallery 240')

What are the ids of the paintings created before all of the paintings in gallery 240 ?

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


Question: Find the name and salary of instructors who are advisors of the students from the Math department.

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

Find the name and salary of instructors who are advisors of the students from the Math department .

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


Question: What is the preferred foot when attacking of the youngest football player?

SELECT t2.preferred_foot FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t1.birthday DESC LIMIT 1

What is the preferred foot when attacking of the youngest football player ?

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


Question: Give the name of the league had the most goals in the 2016 season?

SELECT t2.name FROM Match AS t1 INNER JOIN League AS t2 ON t1.league_id = t2.id WHERE t1.season = '2015/2016' GROUP BY t2.name ORDER BY SUM(t1.home_team_goal + t1.away_team_goal) DESC LIMIT 1

Give the name of the league had the most goals in the 2016 season ?

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


Question: Among the users that permit the company to send regular emails to them, how many of them had made a transaction with a Visa card in July, 2014?

SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.SubscribedToEmailList = 'TRUE' AND T2.CreditCardType = 'Visa' AND STRFTIME('%Y-%m', T2.TransactionDate) = '2014-07'

Among the users that permit the company to send regular emails to them , how many of them had made a transaction with a Visa card in July , 2014 ?

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


Question: How many players were born after 1990?

SELECT COUNT(id) FROM Player WHERE STRFTIME('%Y', birthday) > '1990'


Question: Find the number of products for each manufacturer, showing the name of each company.

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

Find the number of products for each manufacturer , showing the name of each company .

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


Question: Find the number of trains starting from each origin.

SELECT origin ,  count(*) FROM train GROUP BY origin

Find the number of trains starting from each origin .


Question: Which publisher published the slowest superhero?

SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN hero_attribute AS T3 ON T1.id = T3.hero_id INNER JOIN attribute AS T4 ON T3.attribute_id = T4.id WHERE T4.attribute_name = 'Speed' ORDER BY T3.attribute_value LIMIT 1

Which publisher published the slowest superhero ?


Question: Find the name and number of citations of the author who has most citations among all authors?

SELECT T3.name ,  count(*) FROM Citation AS T1 JOIN Author_list AS T2 ON T1.cited_paper_id  =  T2.paper_id JOIN Author AS T3 ON T2.author_id  =  T3.author_id GROUP BY T2.author_id ORDER BY count(*) DESC LIMIT 1

Find the name and number of citations of the author who has most citations among all authors ?

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


Question: What is the average, minimum, maximum distance between two cities?

SELECT avg(distance) ,  min(distance) ,  max(distance) FROM Direct_distance

What is the average , minimum , maximum distance between two cities ?


Question: Show the transportation method most people choose to get to tourist attractions.

SELECT How_to_Get_There FROM Tourist_Attractions GROUP BY How_to_Get_There ORDER BY COUNT(*) DESC LIMIT 1

Show the transportation method most people choose to get to tourist attractions .


Question: What are the territory descriptions of territories in the Eastern region?

SELECT DISTINCT T1.TerritoryDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Eastern' ORDER BY T1.TerritoryDescription

What are the territory descriptions of territories in the Eastern region ?

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


Question: Among the players who played in OHL league during the regular season in 2007-2008, who is the player that attained the most number of assist?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.LEAGUE = 'OHL' AND T1.GAMETYPE = 'Regular Season' ORDER BY T1.A DESC LIMIT 1

Among the players who played in OHL league during the regular season in 2007 - 2008 , who is the player that attained the most number of assist ?

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


Question: In which distinct years was the governor "Eliot Spitzer"?

SELECT DISTINCT YEAR FROM party WHERE Governor  =  "Eliot Spitzer"

In which distinct years was the governor " Eliot Spitzer " ?

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


Question: How many businesses ID sell beer and wine?

SELECT COUNT(business_id) FROM Business_Attributes WHERE attribute_id = 1 AND attribute_value = 'beer_and_wine'

How many businesses ID sell beer and wine ?

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


Question: What is the total number of students enrolled in an university with a rank of 5 or below?

SELECT sum(enrollment) FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id WHERE T2.rank  >=  5

What is the total number of students enrolled in an university with a rank of 5 or below ?

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


Question: How many institutions do not have an associated protein in our record?

SELECT count(*) FROM institution WHERE institution_id NOT IN (SELECT institution_id FROM protein)

How many institutions do not have an associated protein in our record ?


Question: What is the name and distance for the aircraft that has an id of 12?

SELECT name ,  distance FROM Aircraft WHERE aid  =  12

What is the name and distance for the aircraft that has an i d of 12 ?

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


Question: How many gold-eyed superheroes did Marvel Comics publish?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN colour AS T3 ON T1.eye_colour_id = T3.id WHERE T2.publisher_name = 'Marvel Comics' AND T3.colour = 'Gold'

How many gold - eyed superheroes did Marvel Comics publish ?

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


Question: List the name character awarded for the Outstanding Voice-Over Performance award in 2009.

SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.year = 2009 AND T1.award = 'Outstanding Voice-Over Performance';

List the name character awarded for the Outstanding Voice - Over Performance award in 2009 .

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


Question: What is the task of the method that is in the Czech language?

SELECT DISTINCT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Lang = 'cs'

What is the task of the method that is in the Czech language ?

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


Question: How many donors who donated to the city of Pocatello are not teachers?

SELECT COUNT(donationid) FROM donations WHERE donor_city = 'Pocatello' AND is_teacher_acct = 'f'

How many donors who donated to the city of Pocatello are not teachers ?

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


Question: How many customers have an order?

SELECT count(DISTINCT customer_id) FROM Customer_orders


Question: Please list the Italian text ruling of all the cards in the set Coldsnap.

SELECT DISTINCT T1.text FROM foreign_data AS T1 INNER JOIN cards AS T2 ON T2.uuid = T1.uuid INNER JOIN sets AS T3 ON T3.code = T2.setCode WHERE T3.name = 'Coldsnap' AND T1.language = 'Italian'

Please list the Italian text ruling of all the cards in the set Coldsnap .

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


Question: How many exhibitions have a attendance more than 100 or have a ticket price below 10?

SELECT count(*) FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id  =  T2.exhibition_id WHERE T1.attendance  >  100 OR T2.ticket_price  <  10

How many exhibitions have a attendance more than 100 or have a ticket price below 10 ?

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


Question: How many accounts does the customer with first name Art and last name Turcotte have?

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

How many accounts does the customer with first name Art and last name Turcotte have ?

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


Question: Who ordered the book with the cheapest price?

SELECT T3.first_name, T3.last_name FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id ORDER BY T1.price ASC LIMIT 1

Who ordered the book with the cheapest price ?


Question: What is the inspection ID where the employee named "David Hodges" is currently employed in the "Kamayan Express" establishment?

SELECT T2.inspection_id 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 T3.first_name = 'David' AND T3.last_name = 'Hodges' AND T1.dba_name = 'KAMAYAN EXPRESS'

What is the inspection ID where the employee named " David Hodges " is currently employed in the " Kamayan Express " establishment ?

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


Question: What is the location name of the document "Robin CV"?

SELECT T3.location_name FROM All_documents AS T1 JOIN Document_locations AS T2 ON T1.document_id  =  T2.document_id JOIN Ref_locations AS T3 ON T2.location_code  =  T3.location_code WHERE T1.document_name  =  "Robin CV"

What is the location name of the document " Robin CV " ?

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


Question: How many employees who began working in 2009 or later had night shifts?

SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Shift AS T2 ON T1.ShiftId = T2.ShiftId WHERE T2.ShiftId = 3 AND STRFTIME('%Y', T2.StartTime) >= '2009'

How many employees who began working in 2009 or later had night shifts ?


Question: Return the number of music festivals of each category.

SELECT Category ,  COUNT(*) FROM music_festival GROUP BY Category

Return the number of music festivals of each category .


Question: Name the coin with the highest percentage price changed in 24 hours. State the transaction date and price.

SELECT T1.name, T2.DATE, T2.price FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.percent_change_24h = ( SELECT MAX(percent_change_24h) FROM historical )

Name the coin with the highest percentage price changed in 24 hours . State the transaction date and price .

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


Question: Give me the capitals of the regions whose area is larger than 10000.

SELECT Capital FROM region WHERE Area  >  10000

Give me the capitals of the regions whose area is larger than 10000 .

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


Question: Show the apartment numbers of apartments with unit status availability of both 0 and 1.

SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  0 INTERSECT SELECT T1.apt_number FROM Apartments AS T1 JOIN View_Unit_Status AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.available_yn  =  1

Show the apartment numbers of apartments with unit status availability of both 0 and 1 .

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


Question: Count the number of countries.


Question: Which city has the highest number of businesses in the food industry whose number of reviews is high?

SELECT T1.city FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.review_count LIKE 'High' AND T3.category_name LIKE 'Food' GROUP BY T1.city

Which city has the highest number of businesses in the food industry whose number of reviews is high ?

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


Question: What was the number of Bitcoins verifiably burned until 2013/4/28?

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

What was the number of Bitcoins verifiably burned until 2013/4/28 ?

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


Question: What are the titles of the episodes that have received more 7-star votes than the season average?

SELECT DISTINCT T1.episode_id FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 7 AND T2.votes > 0.7 * ( SELECT CAST(COUNT(votes) AS REAL) / COUNT(CASE WHEN stars = 7 THEN 1 ELSE 0 END) FROM Vote );

What are the titles of the episodes that have received more 7 - star votes than the season average ?

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


Question: How many dishes are there on page 1 of menu ID12882?

SELECT SUM(CASE WHEN T1.page_number = 1 THEN 1 ELSE 0 END) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id WHERE T1.menu_id = 12882

How many dishes are there on page 1 of menu ID12882 ?

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


Question: Return the full names and salaries of employees with null commissions.

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

Return the full names and salaries of employees with null commissions .

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


Question: The 'More Stupider: A 90-Day Fiance Podcast' belongs to which category and what is the average rating of the podcast?

SELECT AVG(T3.rating) FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T2.title = 'More Stupider: A 90-Day Fiance Podcast'

The ' More Stupider : A 90 - Day Fiance Podcast ' belongs to which category and what is the average rating of the podcast ?

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


Question: Which character won the Outstanding Voice-Over Performance award in 2009?

SELECT DISTINCT T1.character FROM Character_Award AS T1 INNER JOIN Award AS T2 ON T1.award_id = T2.award_id WHERE T2.award = 'Outstanding Voice-Over Performance' AND T2.year = 2009 AND T2.result = 'Winner';

Which character won the Outstanding Voice - Over Performance award in 2009 ?

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


Question: Find the distinct titles of all the paintings that have a longer height than some painting on canvas?

SELECT DISTINCT title FROM paintings WHERE height_mm  >  (SELECT min(height_mm) FROM paintings WHERE mediumOn  =  "canvas")

Find the distinct titles of all the paintings that have a longer height than some painting on canvas ?

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


Question: Return the characteristic names of the 'sesame' product.

SELECT t3.characteristic_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 WHERE t1.product_name  =  "sesame"

Return the characteristic names of the ' sesame ' product .

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


Question: What is the profit of the product with the highest list price and of the product with the lowest list price other than 0? Indicates the depth the component is from its parent.

SELECT ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice DESC LIMIT 1 ) , ( SELECT ListPrice - StandardCost FROM Product WHERE ListPrice != 0 ORDER BY ListPrice LIMIT 1 )

What is the profit of the product with the highest list price and of the product with the lowest list price other than 0 ? Indicates the depth the component is from its parent .

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


Question: For how many terms have the oldest current legislator served?

SELECT COUNT(T2.bioguide) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.birthday_bio = ( SELECT MIN(birthday_bio) FROM current )

For how many terms have the oldest current legislator served ?


Question: What is the rank of the book with the smallest number of pages?

SELECT T2.Rank FROM book AS T1 JOIN review AS T2 ON T1.Book_ID  =  T2.Book_ID ORDER BY T1.Pages ASC LIMIT 1

What is the rank of the book with the smallest number of pages ?

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


Question: State the driver with the most points scored. Find his full name with that points.

SELECT T3.forename, T3.surname, T2.points FROM races AS T1 INNER JOIN driverStandings AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId ORDER BY T2.points DESC LIMIT 1

State the driver with the most points scored . Find his full name with that points .

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


Question: List all the representatives in 1789 along with the districts and state.

SELECT T2.district, T2.state FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1789%'

List all the representatives in 1789 along with the districts and state .

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


Question: Give the name of the movie which the song "I Thought I Lost You" is associated with.

SELECT movie_title FROM characters WHERE song = 'I Thought I Lost You'

Give the name of the movie which the song " I Thought I Lost You " is associated with .

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


Question: State the district and region for loan ID '4990'.

SELECT T2.A2, T2.A3 FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN loan AS T3 ON T1.account_id = T3.account_id WHERE T3.loan_id = 4990

State the district and region for loan ID ' 4990 ' .

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


Question: Show first name and last name for all the students advised by Michael Goodrich.

SELECT T2.fname ,  T2.lname FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.fname  =  "Michael" AND T1.lname  =  "Goodrich"

Show first name and last name for all the students advised by Michael Goodrich .

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


Question: Provide the heights of the heroes whose eye colours are amber.

SELECT T1.height_cm FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Amber'

Provide the heights of the heroes whose eye colours are amber .

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


Question: What is the average weight in pounds of all the players with the highest prospects for the draft?

SELECT CAST(SUM(T2.weight_in_lbs) AS REAL) / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id WHERE T1.CSS_rank = ( SELECT MAX(CSS_rank) FROM PlayerInfo )

What is the average weight in pounds of all the players with the highest prospects for the draft ?

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


Question: What is the ranking criteria ID of Brown University in 2014?

SELECT T1.ranking_criteria_id FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Brown University' AND T1.year = 2014

What is the ranking criteria ID of Brown University in 2014 ?

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


Question: How many male customers who are living in North Bohemia have average salary greater than 8000?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A3 = 'north Bohemia' AND T2.A11 > 8000

How many male customers who are living in North Bohemia have average salary greater than 8000 ?

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


Question: Among all players drafted by the Toronto Maple Leafs, identify the percentage who are from Eastern Europe.

SELECT CAST(COUNT(CASE WHEN nation IN ('Belarus', 'Czech Rep.', 'Slovakia', 'Ukraine') THEN ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(ELITEID) FROM PlayerInfo WHERE overallby = 'Toronto Maple Leafs'

Among all players drafted by the Toronto Maple Leafs , identify the percentage who are from Eastern Europe .

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


Question: Please list the order keys of all the orders that have more than 2 parts with a jumbo case container.

SELECT T.l_orderkey FROM ( SELECT T2.l_orderkey, COUNT(T2.l_partkey) AS num FROM part AS T1 INNER JOIN lineitem AS T2 ON T1.p_partkey = T2.l_partkey WHERE T1.p_container = 'JUMBO CASE' GROUP BY T2.l_orderkey ) AS T WHERE T.num > 2

Please list the order keys of all the orders that have more than 2 parts with a jumbo case container .

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


Question: What are the different nationalities of pilots? Show each nationality and the number of pilots of each nationality.

SELECT Nationality ,  COUNT(*) FROM pilot GROUP BY Nationality

What are the different nationalities of pilots ? Show each nationality and the number of pilots of each nationality .

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


Question: What is the average total number of passengers of airports that are associated with aircraft "Robinson R-22"?

SELECT avg(T3.Total_Passengers) 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 T1.Aircraft  =  "Robinson R-22"

What is the average total number of passengers of airports that are associated with aircraft " Robinson R-22 " ?

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


Question: Who directed the movie with the most voice actors?

SELECT T2.director, COUNT(DISTINCT T1.`voice-actor`) FROM `voice-actors` AS T1 INNER JOIN director AS T2 ON T1.movie = T2.name GROUP BY T2.director ORDER BY COUNT(DISTINCT T1.`voice-actor`) DESC LIMIT 1

Who directed the movie with the most voice actors ?

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


Question: Who is the tallest player in team USA U20?

SELECT T.PlayerName FROM ( SELECT T1.PlayerName, T3.height_in_cm FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'USA U20' ORDER BY T3.height_in_cm DESC ) AS T WHERE T.height_in_cm = ( SELECT MAX(T3.height_in_cm) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T1.height = T3.height_id WHERE T2.TEAM = 'USA U20' )

Who is the tallest player in team USA U20 ?

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


Question: Park Dietz was credited in which role in the episode titled "Cherished"?

SELECT T2.role FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T1.title = 'Cherished' AND T3.name = 'Park Dietz' AND T2.credited = 'true'

Park Dietz was credited in which role in the episode titled " Cherished " ?

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


Question: Which students are unaffected by allergies?

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy

Which students are unaffected by allergies ?


Question: How many clubs are located at "HHH"?

SELECT count(*) FROM club WHERE clublocation  =  "HHH"

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


Question: Find the first and last names of the artists who have both works of paintings and sculptures?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID INTERSECT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN paintings AS T4 ON T3.artistID  =  T4.painterID

Find the first and last names of the artists who have both works of paintings and sculptures ?

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


Question: What is the name of badge that the user whose display name is "Pierre" obtained?

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

What is the name of badge that the user whose display name is " Pierre " obtained ?

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


Question: How many female legislators become representatives for California in 2015?

SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE STRFTIME('%Y', T2.start) = '2015' AND T2.state = 'CA' AND T1.gender_bio = 'F'

How many female legislators become representatives for California in 2015 ?


Question: Find out the yearly income of geographic ID when the customer is female and occupation as sales.

SELECT T2.INHABITANTS_K * T2.INCOME_K * 12 FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Female' AND T1.OCCUPATION = 'Sales'

Find out the yearly income of geographic ID when the customer is female and occupation as sales .

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


Question: On what date did the country have a gross domestic product 400% higher than Saint Kitts and Nevis become independent?

SELECT Independence FROM politics WHERE country = ( SELECT country FROM economy WHERE GDP = 1100 )

On what date did the country have a gross domestic product 400 % higher than Saint Kitts and Nevis become independent ?

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


Question: Find the number of projects which each scientist is working on and scientist's name.

SELECT count(*) ,  T1.name FROM scientists AS T1 JOIN assignedto AS T2 ON T1.ssn  =  T2.scientist GROUP BY T1.name

Find the number of projects which each scientist is working on and scientist 's name .

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


Question: What is the eye colour of superhero with superhero ID 75?

SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.id = 75

What is the eye colour of superhero with superhero ID 75 ?

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


Question: What is the title of episode with 5 stars and nominated for Prism Award which is aired on April 19, 2009?

SELECT T3.title FROM Award AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T3.air_date = '2009-04-19' AND T1.award_category = 'Prism Award' AND T2.stars = 5 AND T1.result = 'Nominee';

What is the title of episode with 5 stars and nominated for Prism Award which is aired on April 19 , 2009 ?

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


Question: Please list the Formula_1 races that Lewis Hamilton participated.

SELECT T1.name FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Lewis' AND T3.surname = 'Hamilton'

Please list the Formula_1 races that Lewis Hamilton participated .


Question: What are the names of all the dorms that can accomdate more than 300 students?

SELECT dorm_name FROM dorm WHERE student_capacity  >  300

What are the names of all the dorms that can accomdate more than 300 students ?

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


Question: display the full name (first and last name), and salary of those employees who working in any department located in London.

SELECT first_name ,  last_name ,  salary FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN  locations AS T3 ON T2.location_id  =  T3.location_id WHERE  T3.city  =  'London'

display the full name ( first and last name ) , and salary of those employees who working in any department located in London .

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


Question: What is the reason for sales order "51883"?

SELECT T2.Name FROM SalesOrderHeaderSalesReason AS T1 INNER JOIN SalesReason AS T2 ON T1.SalesReasonID = T2.SalesReasonID WHERE T1.SalesOrderID = 51883

What is the reason for sales order " 51883 " ?

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


Question: What is the average salary for each job title?

SELECT job_title ,  AVG(salary) FROM employees AS T1 JOIN jobs AS T2 ON T1.job_id  =  T2.job_id GROUP BY T2.job_title

What is the average salary for each job title ?


Question: Which publisher has published the most number of Action games?

SELECT T.publisher_name FROM ( SELECT T4.publisher_name, COUNT(DISTINCT T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id INNER JOIN game_publisher AS T3 ON T2.id = T3.game_id INNER JOIN publisher AS T4 ON T3.publisher_id = T4.id WHERE T1.genre_name = 'Action' GROUP BY T4.publisher_name ORDER BY COUNT(DISTINCT T2.id) DESC LIMIT 1 ) t

Which publisher has published the most number of Action games ?

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


Question: Calculate the average view count of each post tagged as 'humor' and list the title and the comment of each post.

SELECT AVG(T2.ViewCount), T2.Title, T1.Text FROM comments AS T1 INNER JOIN posts AS T2 ON T2.Id = T1.PostId  WHERE T2.Tags = '<humor>' GROUP BY T2.Title, T1.Text

Calculate the average view count of each post tagged as ' humor ' and list the title and the comment of each post .

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


Question: How many gold medals were given to the winners in the Ice Hockey Men's Ice Hockey event?

SELECT COUNT(T2.competitor_id) FROM event AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.event_id WHERE T1.event_name LIKE 'Ice Hockey Men%s Ice Hockey' AND T2.medal_id = 1

How many gold medals were given to the winners in the Ice Hockey Men 's Ice Hockey event ?

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


Question: What is the employment and payment status of student110?

SELECT T1.bool FROM no_payment_due AS T1 INNER JOIN unemployed AS T2 ON T1.name = T2.name WHERE T1.name = 'student110'

What is the employment and payment status of student110 ?


Question: What are names of customers who never ordered product Latte.

SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name 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 JOIN products AS t4 ON t3.product_id  =  t4.product_id WHERE t4.product_details  =  'Latte'

What are names of customers who never ordered product Latte .

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


Question: Which department has the lowest budget?

SELECT dept_name FROM department ORDER BY budget LIMIT 1

Which department has the lowest budget ?


Question: What are the top 5 tags with the highest amount of downloads?

SELECT T2.tag FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'album' ORDER BY T1.totalSnatched DESC LIMIT 5

What are the top 5 tags with the highest amount of downloads ?


Question: How many addresses are from the Philippines?

SELECT COUNT(T2.country_id) FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T2.country_name = 'Philippines'

How many addresses are from the Philippines ?


Question: Find Alice's friends of friends.

SELECT DISTINCT T4.name FROM PersonFriend AS T1 JOIN Person AS T2 ON T1.name  =  T2.name JOIN PersonFriend AS T3 ON T1.friend  =  T3.name JOIN PersonFriend AS T4 ON T3.friend  =  T4.name WHERE T2.name  =  'Alice' AND T4.name != 'Alice'


Question: How many movie reviews does each director get?

SELECT count(*) ,  T1.director FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID GROUP BY T1.director

How many movie reviews does each director get ?


Question: What is the middle name of the legislator whose birthday was on 8/24/1956?

SELECT middle_name FROM current WHERE birthday_bio = '1956-08-24'

What is the middle name of the legislator whose birthday was on 8/24/1956 ?

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


Question: Who among KAM's customers consumed the most? How much did it consume?

SELECT T2.CustomerID, SUM(T2.Consumption) FROM customers AS T1 INNER JOIN yearmonth AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.Segment = 'KAM' GROUP BY T2.CustomerID ORDER BY SUM(T2.Consumption) DESC LIMIT 1

Who among KAM 's customers consumed the most ? How much did it consume ?

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


Question: What is the percentage of preprints of John Van Reenen's papers?

SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 AND T1.JournalId = 0 THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Id) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'John Van Reenen'

What is the percentage of preprints of John Van Reenen 's papers ?

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


Question: What is the name of the airport with the most number of routes that start in China?

SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid WHERE T1.country  =  'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1

What is the name of the airport with the most number of routes that start in China ?

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


Question: List the names of studios that have at least two films.

SELECT Studio FROM film GROUP BY Studio HAVING COUNT(*)  >=  2

List the names of studios that have at least two films .


Question: List all the authors named "George".

SELECT author_name FROM author WHERE author_name LIKE 'George%'


Question: Which Russian set of cards contains the most cards overall?

SELECT T1.id FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Russian' GROUP BY T1.baseSetSize ORDER BY T1.baseSetSize DESC LIMIT 1

Which Russian set of cards contains the most cards overall ?

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


Question: Return all information about discounts.

Return all information about discounts .


Question: What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance?

SELECT T1.name ,  T2.balance + T3.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  >  (SELECT avg(balance) FROM savings)

What are the names and sum of checking and savings balances for accounts with savings balances higher than the average savings balance ?

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


Question: How many employees do we have?


Question: What percentage was the total unit sales of store no.10 to the total sales of its weather station on 2014/10/31?

SELECT CAST(SUM(CASE WHEN T2.store_nbr = 10 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T1.`date` = '2014-10-31'

What percentage was the total unit sales of store no.10 to the total sales of its weather station on 2014/10/31 ?

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


Question: What phone number does alderman Emma Mitts have to call if she wants to speak to the commander in charge of the investigation of the crimes that have occurred in her ward?

SELECT T3.phone FROM Ward AS T1 INNER JOIN Crime AS T2 ON T2.ward_no = T1.ward_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.alderman_first_name = 'Emma' AND T1.alderman_last_name = 'Mitts'

What phone number does alderman Emma Mitts have to call if she wants to speak to the commander in charge of the investigation of the crimes that have occurred in her ward ?

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


Question: How much is the average salary of female employees in comparison to male employees?

SELECT AVG(T2.Rate) FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Gender = 'F'

How much is the average salary of female employees in comparison to male employees ?

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


Question: Please list the surnames of all the Italian drivers.

SELECT surname FROM drivers WHERE nationality = 'Italian'

Please list the surnames of all the Italian drivers .


Question: What is the order that total cost the least , and how much is the total cost ?

select t1.order_id ,  sum(t2.product_price) from order_items as t1 join products as t2 on t1.product_id  =  t2.product_id group by t1.order_id order by sum(t2.product_price) asc limit 1

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


Question: Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working.

SELECT Nationality FROM journalist WHERE Years_working  >  10 INTERSECT SELECT Nationality FROM journalist WHERE Years_working  <  3

Show the nations that have both journalists with more than 10 years of working and journalists with less than 3 years of working .

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


Question: Who is the youngest player to have played during the 1997-1998 season for OHL League?

SELECT DISTINCT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '1997-1998' AND T1.LEAGUE = 'OHL' ORDER BY T2.birthdate DESC LIMIT 1

Who is the youngest player to have played during the 1997 - 1998 season for OHL League ?

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


Question: Among the USA players, who has the lightest weight?

SELECT T2.PlayerName FROM weight_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.weight_id = T2.weight WHERE T2.nation = 'USA' ORDER BY T1.weight_in_lbs ASC LIMIT 1

Among the USA players , who has the lightest weight ?

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


Question: Which crew member of the simpson 20s is the oldest?

SELECT name FROM Person WHERE birthdate IS NOT NULL ORDER BY birthdate ASC LIMIT 1;

Which crew member of the simpson 20s is the oldest ?


Question: List the names of institutions in descending order of the number of championships.

SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T1.Number_of_Championships DESC

List the names of institutions in descending order of the number of championships .

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


Question: How many king beds are there?

SELECT sum(beds) FROM Rooms WHERE bedtype  =  'King';


Question: Which country with a city with a population between 50,000 and 300,000 inhabitants and which is a member of an organization established between 03/01/1991 and 04/30/1991 is also a member of the EBRD?

SELECT T2.Country FROM country AS T1 INNER JOIN isMember AS T2 ON T1.Code = T2.Country INNER JOIN organization AS T3 ON T3.Country = T2.Country INNER JOIN city AS T4 ON T4.Country = T3.Country WHERE T3.Abbreviation = 'EBRD' AND T4.Population BETWEEN 50000 AND 300000 AND T3.Established BETWEEN '1991-01-31' AND '1991-04-30'

Which country with a city with a population between 50,000 and 300,000 inhabitants and which is a member of an organization established between 03/01/1991 and 04/30/1991 is also a member of the EBRD ?

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


Question: Name the country in which the topic is about Poverty: Shared Prosperity. Indicate the long name of the country.

SELECT DISTINCT T1.LongName FROM Country AS T1 INNER JOIN footnotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T3.Topic = 'Poverty: Shared prosperity'

Name the country in which the topic is about Poverty : Shared Prosperity . Indicate the long name of the country .

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


Question: How many students are under advisor 415?

SELECT COUNT(*) FROM advisedBy WHERE p_id_dummy = 415

How many students are under advisor 415 ?


Question: What are the first names of all artists who have at least two paintings, and how many works did each create?

SELECT T1.fname ,  count(*) FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID GROUP BY T2.painterID HAVING count(*)  >=  2

What are the first names of all artists who have at least two paintings , and how many works did each create ?

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


Question: List ther users who gave the worst rating for movie 'Love Will Tear Us Apart'.

SELECT T1.user_id FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'Love Will Tear Us Apart' AND T1.rating_score = 1

List ther users who gave the worst rating for movie ' Love Will Tear Us Apart ' .

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


Question: List the creation date and age of the user that commented with webiste.

SELECT T2.CreationDate, T2.Age FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.text LIKE '%http://%'

List the creation date and age of the user that commented with webiste .

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


Question: What are the names of all Hardware products, sorted by price ascending?

SELECT product_name FROM Products WHERE product_type_code  =  "Hardware" ORDER BY product_price ASC

What are the names of all Hardware products , sorted by price ascending ?

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


Question: Provide the start date, end date, and party of Pearl Peden Oldfield.

SELECT T2.start, T2.`end`, T2.party FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.first_name = 'Pearl' AND T1.middle_name = 'Peden' AND T1.last_name = 'Oldfield'

Provide the start date , end date , and party of Pearl Peden Oldfield .

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


Question: What is the first name of the students who are in age 20 to 25 and living in PHL city?

SELECT fname FROM student WHERE city_code  =  'PHL' AND age BETWEEN 20 AND 25

What is the first name of the students who are in age 20 to 25 and living in PHL city ?

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


Question: Is word id "88" the word id for title "Animals"?

SELECT CASE WHEN COUNT(T1.pid) > 0 THEN 'YES' ELSE 'NO' END AS YORN FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T2.wid = 88 AND T1.title = 'Animals'

Is word i d " 88 " the word i d for title " Animals " ?

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


Question: Find the names of the items that did not receive any review.

SELECT title FROM item WHERE i_id NOT IN (SELECT i_id FROM review)

Find the names of the items that did not receive any review .


Question: List out full name of employees who are working in Boston?

SELECT T1.firstName, T1.lastName FROM employees AS T1 INNER JOIN offices AS T2 ON T1.officeCode = T2.officeCode WHERE T2.city = 'Boston'

List out full name of employees who are working in Boston ?

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


Question: Find the last name of the individuals that have been contact individuals of 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

Find the last name of the individuals that have been contact individuals of an organization .

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


Question: Which country did Bradford Team belongs to?

SELECT DISTINCT T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.HomeTeam = 'Bradford' OR T1.AwayTeam = 'Bradford'

Which country did Bradford Team belongs to ?

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


Question: What are the names of the technicians by ascending order of quality rank for the machine they are assigned?

SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID ORDER BY T2.quality_rank

What are the names of the technicians by ascending order of quality rank for the machine they are assigned ?

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


Question: How many brands of bottle root beer were purchased between 4/3/2015 and 10/26/2015?

SELECT COUNT(BrandID) FROM rootbeer WHERE ContainerType = 'Bottle' AND PurchaseDate BETWEEN '2015-04-03' AND '2015-10-26'

How many brands of bottle root beer were purchased between 4/3/2015 and 10/26/2015 ?

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


Question: List the name of married employees with less than 20 vacation hours.

SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.MaritalStatus = 'M' AND T2.VacationHours < 20

List the name of married employees with less than 20 vacation hours .

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


Question: Find the the customer details and id for the customers who had more than one policy.

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

Find the the customer details and i d for the customers who had more than one policy .

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


Question: How many books have been published in Japanese?

SELECT COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id WHERE T1.language_name = 'Japanese'

How many books have been published in Japanese ?


Question: Provide the google entity ID of the senators in New York.

SELECT T1.google_entity_id_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'sen' AND T2.state = 'NY'

Provide the google entity ID of the senators in New York .

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


Question: How many males from Belgium have participated in an Olympic Games?

SELECT COUNT(T2.person_id) FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.region_name = 'Belgium' AND T3.gender = 'M'

How many males from Belgium have participated in an Olympic Games ?


Question: List the character names played by Catherine Deneuve.

SELECT T2.character_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Catherine Deneuve'

List the character names played by Catherine Deneuve .

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


Question: How many pairs of object samples in image no.1 have the relation of "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.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID != OBJ2_SAMPLE_ID

How many pairs of object samples in image no.1 have the relation of " parked on " ?

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


Question: Find the location of the plane that is owned by the youngest pilot.

SELECT T2.location FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T1.age  =  (SELECT min(age) FROM pilotskills)

Find the location of the plane that is owned by the youngest pilot .

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


Question: Give the web site address for the school in "PA" state with the highest latitude.

SELECT DISTINCT T1.site FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'PA' AND T1.lat_y = ( SELECT MAX(T1.lat_y) FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.state = T1.state WHERE T2.state_abbr = 'PA' )

Give the web site address for the school in " PA " state with the highest latitude .

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


Question: Return the names of all regions other than Denmark.

SELECT region_name FROM region WHERE region_name != 'Denmark'

Return the names of all regions other than Denmark .


Question: Calculate the percentage of movie titles with a screen length of more than 120 minutes that have a category of horror movies.

SELECT CAST(SUM(IIF(T3.`name` = 'Horror', 1, 0)) * 100 / COUNT(T1.film_id) AS REAL) 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 T1.length > 120

Calculate the percentage of movie titles with a screen length of more than 120 minutes that have a category of horror movies .

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


Question: What is the solution path for method number 3?

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 3

What is the solution path for method number 3 ?

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


Question: What are the first and last names of all the candidates?

SELECT T2.first_name ,  T2.last_name FROM candidates AS T1 JOIN people AS T2 ON T1.candidate_id = T2.person_id

What are the first and last names of all the candidates ?

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


Question: List the states where both the secretary of 'Treasury' department and the secretary of 'Homeland Security' were born.

SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id JOIN head AS T3 ON T2.head_id  =  T3.head_id WHERE T1.name  =  'Treasury' INTERSECT SELECT T3.born_state FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id JOIN head AS T3 ON T2.head_id  =  T3.head_id WHERE T1.name  =  'Homeland Security'

List the states where both the secretary of ' Treasury ' department and the secretary of ' Homeland Security ' were born .

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


Question: Where is the place of birth of the actor with the number nm0007064 who has not been credited for playing the role of a "Narrator"?

SELECT DISTINCT T1.birth_place FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id WHERE T1.person_id = 'nm0007064' AND T2.role = 'Narrator' AND T2.credited = 'false'

Where is the place of birth of the actor with the number nm0007064 who has not been credited for playing the role of a " Narrator " ?

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


Question: What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county?

SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND faculty  >  (SELECT max(faculty) FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2002 AND T1.county  =  "Orange")

What are the names of the campus that have more faculties in 2002 than the maximum number in Orange county ?

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


Question: How many distinct planes are owned across all pilots?

SELECT count(DISTINCT plane_name) FROM pilotskills

How many distinct planes are owned across all pilots ?


Question: State the publisher name of the game "ModNation Racers".

SELECT T1.publisher_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'ModNation Racers'

State the publisher name of the game " ModNation Racers " .

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


Question: Provide the number of students at Yale University in 2016.

SELECT T1.num_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.university_name = 'Yale University' AND T1.year = 2016

Provide the number of students at Yale University in 2016 .

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


Question: What is the average duration in milliseconds of tracks that belong to Latin or Pop genre?

SELECT AVG(Milliseconds) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Latin" OR T1.Name  =  "Pop"

What is the average duration in milliseconds of tracks that belong to Latin or Pop genre ?

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


Question: Among the weekly issuance accounts, how many have a loan of under 200000?

SELECT COUNT(T1.account_id) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id WHERE T2.frequency = 'POPLATEK TYDNE' AND T1.amount < 200000

Among the weekly issuance accounts , how many have a loan of under 200000 ?

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


Question: How many customers are manufacturer?

SELECT COUNT(*) FROM customer WHERE cust_type = 'manufacturer'


Question: What is maximum, minimum and average amount of outstanding of customer?

SELECT max(amount_outstanding) ,  min(amount_outstanding) ,  avg(amount_outstanding) FROM Customers;

What is maximum , minimum and average amount of outstanding of customer ?

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


Question: Calculate the average inspections per year done by Jessica Anthony from 2010 to 2017.

SELECT CAST(COUNT(CASE WHEN T1.first_name = 'Jessica' AND T1.last_name = 'Anthony' THEN T2.inspection_id ELSE 0 END) AS REAL) / 8 FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y', T2.inspection_date) BETWEEN '2010' AND '2017'

Calculate the average inspections per year done by Jessica Anthony from 2010 to 2017 .

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


Question: List the description of all aircrafts.


Question: What are the different transaction types, and how many transactions of each have taken place?

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

What are the different transaction types , and how many transactions of each have taken place ?

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


Question: What are the first and last name of the author who published the paper titled "Nameless, Painless"?

SELECT t1.fname ,  t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title  =  "Nameless ,  Painless"

What are the first and last name of the author who published the paper titled " Nameless , Painless " ?

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


Question: What are the themes of competitions that have corresponding host cities with more than 1000 residents?

SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000

What are the themes of competitions that have corresponding host cities with more than 1000 residents ?

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


Question: What is the contact form of the legislator named Rick Crawford?

SELECT T2.contact_form FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Rick Crawford'

What is the contact form of the legislator named Rick Crawford ?

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


Question: Provide the point of the winning margin in a match between Mumbai Indians and Royal Challengers Bangalore on May 28, 2008.

SELECT T1.Win_Margin FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Team_1 INNER JOIN Team AS T3 ON T3.Team_Id = T1.Team_2 WHERE (T2.Team_Name = 'Mumbai Indians' AND T3.Team_Name = 'Royal Challengers Bangalore' AND T1.Match_Date = '2008-05-28') OR (T2.Team_Name = 'Royal Challengers Bangalore' AND T3.Team_Name = 'Mumbai Indians' AND T1.Match_Date = '2008-05-28')

Provide the point of the winning margin in a match between Mumbai Indians and Royal Challengers Bangalore on May 28 , 2008 .

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


Question: For each main industry, what is the total number of companies for the industry with the highest total market value?

SELECT main_industry ,  count(*) FROM company GROUP BY main_industry ORDER BY sum(market_value) DESC LIMIT 1

For each main industry , what is the total number of companies for the industry with the highest total market value ?

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


Question: find the name and gender of the author who published the most books.

SELECT t1.name ,  t1.gender FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id GROUP BY t2.author_id ORDER BY count(*) DESC LIMIT 1

find the name and gender of the author who published the most books .

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


Question: What are the special notes for the country whose average adolescent fertility rate is the highest?

SELECT DISTINCT T1.SpecialNotes FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Value = ( SELECT Value FROM Indicators WHERE IndicatorName LIKE 'Adolescent fertility rate%' ORDER BY Value DESC LIMIT 1 )

What are the special notes for the country whose average adolescent fertility rate is the highest ?

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


Question: Count the number of characteristics the product 'sesame' has.

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id WHERE t1.product_name  =  "sesame"

Count the number of characteristics the product ' sesame ' has .

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


Question: What is the maximum stars and year for the most recent movie?

SELECT max(T1.stars) ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT max(YEAR) FROM Movie)

What is the maximum stars and year for the most recent movie ?

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


Question: Please list all competitors' names who participated in 1936 Summer.

SELECT T3.full_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1936 Summer'

Please list all competitors ' names who participated in 1936 Summer .

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


Question: Show the party and the number of drivers in each party.

SELECT party ,  count(*) FROM driver GROUP BY party

Show the party and the number of drivers in each party .


Question: What gender of users posted the most tweets in `en`?

SELECT T.Gender FROM ( SELECT T2.Gender, COUNT( text) AS num FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T1.Lang = 'en' GROUP BY T2.Gender ) T ORDER BY T.num DESC LIMIT 1

What gender of users posted the most tweets in ` en ` ?

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


Question: Indicate the care plan needed for the patient living at 179 Sydni Roads, Taunton, MA 02780 US.

SELECT T1.DESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.address = '179 Sydni Roads Taunton MA 02780 US'

Indicate the care plan needed for the patient living at 179 Sydni Roads , Taunton , MA 02780 US .

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


Question: Locate all events on devices of women under 30 years old.

SELECT T1.device_id FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T1.age < 30

Locate all events on devices of women under 30 years old .

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


Question: List down the IDs of the production companies that released the movies in 1916.

SELECT T2.company_id FROM movie AS T1 INNER JOIN movie_company AS T2 ON T1.movie_id = T2.movie_id WHERE CAST(STRFTIME('%Y', T1.release_date) AS INT) = 1916

List down the IDs of the production companies that released the movies in 1916 .

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


Question: How many different kinds of lens brands are there?

SELECT count(DISTINCT brand) FROM camera_lens

How many different kinds of lens brands are there ?


Question: In superheroes with height between 150 to 180, what is the percentage of heroes published by Marvel Comics?

SELECT CAST(COUNT(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.height_cm BETWEEN 150 AND 180

In superheroes with height between 150 to 180 , what is the percentage of heroes published by Marvel Comics ?

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


Question: What was the total amount of sales handled by Nancy Davolio in December 1996, excluding discounts?

SELECT SUM(T3.UnitPrice * T3.Quantity) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T2.OrderDate LIKE '1996-12%' AND T3.Discount = 0

What was the total amount of sales handled by Nancy Davolio in December 1996 , excluding discounts ?

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


Question: Give the ids of goods that cost less than 3 dollars.

Give the ids of goods that cost less than 3 dollars .

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


Question: What is the colour of Apocalypse's skin?

SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.skin_colour_id = T2.id WHERE T1.superhero_name = 'Apocalypse'

What is the colour of Apocalypse 's skin ?


Question: Please list the accounts whose district is Tabor that are eligible for loans.

SELECT T2.account_id FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'OWNER' AND T1.A2 = 'Tabor'

Please list the accounts whose district is Tabor that are eligible for loans .

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


Question: What is the name of the race that occurred most recently?

SELECT name FROM races ORDER BY date DESC LIMIT 1

What is the name of the race that occurred most recently ?


Question: Please list the names of the institutes in the state of Alabama whose all graduates in total exceeded 500 in 2011?

SELECT DISTINCT T1.chronname FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T2.year = 2011 AND T2.race = 'X' AND T2.grad_cohort > 500

Please list the names of the institutes in the state of Alabama whose all graduates in total exceeded 500 in 2011 ?

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


Question: Find the number of different locations where Rocks are stored.

SELECT count(DISTINCT LOCATION) FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks'

Find the number of different locations where Rocks are stored .


Question: Current legislator Roger F. Wicker has not been a representative for how many terms?

SELECT SUM(CASE WHEN T1.official_full_name = 'Roger F. Wicker' THEN 1 ELSE 0 END) AS count FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.district IS NULL OR T2.district = ''

Current legislator Roger F. Wicker has not been a representative for how many terms ?

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


Question: What are the names and seatings for all tracks opened after 2000, ordered by seating?

SELECT name ,  seating FROM track WHERE year_opened  >  2000 ORDER BY seating

What are the names and seatings for all tracks opened after 2000 , ordered by seating ?

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


Question: Find the average access counts of documents with functional area "Acknowledgement".

SELECT avg(t1.access_count) FROM documents AS t1 JOIN document_functional_areas AS t2 ON t1.document_code  =  t2.document_code JOIN functional_areas AS t3 ON t2.functional_area_code  =  t3.functional_area_code WHERE t3.functional_area_description  =  "Acknowledgement"

Find the average access counts of documents with functional area " Acknowledgement " .

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


Question: Which brewery brewed the most sold root beer in 2015?

SELECT T3.BreweryName FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.TransactionDate LIKE '2015%' GROUP BY T3.BrandID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

Which brewery brewed the most sold root beer in 2015 ?

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


Question: What is the most common type of engine?

SELECT Engine FROM driver GROUP BY Engine ORDER BY COUNT(*) DESC LIMIT 1

What is the most common type of engine ?


Question: How many companies are there in the city of London?

SELECT COUNT(CompanyName) FROM Customers WHERE City = 'London'

How many companies are there in the city of London ?

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


Question: State the name of captain keeper of the match no.419117.

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

State the name of captain keeper of the match no.419117 .

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


Question: List the name of the most expensive car.

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

List the name of the most expensive car .


Question: On what episode did Julia Roberts win the "Outstanding Guest Actress in a Drama Series" award during the 1999 Primetime Emmy Awards? Tell me her role.

SELECT T3.episode_id, T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id INNER JOIN Episode AS T3 ON T2.episode_id = T3.episode_id WHERE T2.year = 1999 AND T2.award = 'Outstanding Guest Actress in a Drama Series' AND T2.organization = 'Primetime Emmy Awards' AND T1.name = 'Julia Roberts' AND T2.result = 'Nominee'

On what episode did Julia Roberts win the " Outstanding Guest Actress in a Drama Series " award during the 1999 Primetime Emmy Awards ? Tell me her role .

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


Question: How many people who were born after 1970 are animation executive producer?

SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE STRFTIME(T1.birthdate) > '1970' AND T2.role = 'animation executive producer';

How many people who were born after 1970 are animation executive producer ?

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


Question: Give the bounding box of the kite in image no.2324765.

SELECT T2.X, T2.Y, T2.W, T2.H FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.IMG_ID = 2324765 AND T1.OBJ_CLASS = 'kite'

Give the bounding box of the kite in image no.2324765 .


Question: Among the incidents reported in Harrison, what percentage are disorderly conduct?

SELECT COUNT(CASE WHEN T3.title = 'Disorderly Conduct' THEN T2.report_no END) * 100.0 / COUNT(T2.report_no) AS per FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T1.district_name = 'Harrison'

Among the incidents reported in Harrison , what percentage are disorderly conduct ?

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


Question: Who is the author of the document "Travel to Brazil"?

SELECT author_name FROM Documents WHERE document_name  =  "Travel to Brazil"

Who is the author of the document " Travel to Brazil " ?

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


Question: What is the average number of crimes committed in 1995 in regions where the number exceeds 4000 and the region has accounts that are opened starting from the year 1997?

SELECT AVG(T1.A15) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE STRFTIME('%Y', T2.date) >= '1997' AND T1.A15 > 4000

What is the average number of crimes committed in 1995 in regions where the number exceeds 4000 and the region has accounts that are opened starting from the year 1997 ?

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


Question: How many different payment methods are there?

SELECT count(DISTINCT payment_method) FROM customers

How many different payment methods are there ?


Question: Find the names of all pilots who have a plane named Piper Cub and is under 35.

SELECT pilot_name FROM PilotSkills WHERE age  <  35 AND plane_name  =  'Piper Cub'

Find the names of all pilots who have a plane named Piper Cub and is under 35 .

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


Question: Please list the home phone numbers of the employees who are in charge of the sales in the territories in the Eastern Region.

SELECT T1.HomePhone 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 = 'Eastern ' GROUP BY T1.HomePhone

Please list the home phone numbers of the employees who are in charge of the sales in the territories in the Eastern Region .

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


Question: show the train name and station name for each train.

SELECT T2.name ,  T3.name FROM train_station AS T1 JOIN station AS T2 ON T1.station_id  =  T2.station_id JOIN train AS T3 ON T3.train_id  =  T1.train_id

show the train name and station name for each train .

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


Question: Where does the staff member with the first name Elsa live?

SELECT T2.address FROM staff AS T1 JOIN address AS T2 ON T1.address_id  =  T2.address_id WHERE T1.first_name  =  'Elsa'

Where does the staff member with the first name Elsa live ?

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


Question: List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96% of the average occurrences of all conditions.

SELECT DISTINCT T2.first, T2.last FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN all_prevalences AS T3 ON T1.DESCRIPTION = T3.ITEM WHERE T2.ethnicity = 'irish' AND 100 * CAST(T3.OCCURRENCES AS REAL) / ( SELECT AVG(OCCURRENCES) FROM all_prevalences ) > 96

List down the full name of Irish patients diagnosed with the prevalent diseases that have an occurrence greater than the 96 % of the average occurrences of all conditions .

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


Question: Find the different first names and cities of the students who have allergy to milk or cat.

SELECT DISTINCT T1.fname ,  T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid  =  T2.stuid WHERE T2.Allergy  =  "Milk" OR T2.Allergy  =  "Cat"

Find the different first names and cities of the students who have allergy to milk or cat .

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


Question: What are the titles of all the albums alphabetically ascending?

SELECT title FROM albums ORDER BY title;

What are the titles of all the albums alphabetically ascending ?


Question: Among the employees who have a pay rate of above 40, how many of them are male?

SELECT SUM(CASE WHEN T2.Gender = 'M' THEN 1 ELSE 0 END) FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Rate > 40

Among the employees who have a pay rate of above 40 , how many of them are male ?

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


Question: What are the content ratings for the apps that have "gr8" in their comments?

SELECT DISTINCT T1.`Content Rating` FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Translated_Review LIKE '%gr8%'

What are the content ratings for the apps that have " gr8 " in their comments ?

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


Question: What is the id, name and IATA code of the airport that had most number of flights?

SELECT T1.id ,  T1.name ,  T1.IATA FROM airport AS T1 JOIN flight AS T2 ON T1.id  =  T2.airport_id GROUP BY T2.id ORDER BY count(*) DESC LIMIT 1

What is the i d , name and IATA code of the airport that had most number of flights ?

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


Question: How many type of jobs do they have?


Question: How many customers are there in India?

SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'INDIA'


Question: Does Thomas Carnes have an account on ballotpedia.org?

SELECT CASE WHEN ballotpedia_id IS NULL THEN 'doesn''t have' ELSE 'have' END AS HaveorNot FROM historical WHERE first_name = 'Thomas' AND last_name = 'Carnes'

Does Thomas Carnes have an account on ballotpedia.org ?

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


Question: How many of the line items that have a quantity greater than 40 have been shipped by air?

SELECT COUNT(l_linenumber) FROM lineitem WHERE l_quantity > 40 AND l_shipmode = 'AIR'

How many of the line items that have a quantity greater than 40 have been shipped by air ?

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


Question: Which episode has the highest number of vote of the star score?

SELECT episode_id FROM Vote ORDER BY votes DESC LIMIT 1;

Which episode has the highest number of vote of the star score ?


Question: Which recipe has the highest calories?

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


Question: Give me the full name of the first customer, and tell me how long ago he or she wrote his or her first review since making his or her first purchase.

SELECT T1.First, T1.Last , strftime('%J', ReviewDate) - strftime('%J', FirstPurchaseDate) AS TIMEAGO FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID LIMIT 1

Give me the full name of the first customer , and tell me how long ago he or she wrote his or her first review since making his or her first purchase .

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


Question: List down all film IDs of comedy film titles.

SELECT T1.film_id 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 = 'comedy'

List down all film IDs of comedy film titles .


Question: How many voice-actors were involved in the Bambi movie?

SELECT COUNT(DISTINCT 'voice-actor') FROM `voice-actors` WHERE movie = 'Bambi'

How many voice - actors were involved in the Bambi movie ?

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


Question: What is the average latitude and longitude of all starting stations for the 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 all starting stations for the trips ?

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


Question: Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books.

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  =  "Plato" AND T1.saleprice  <  (SELECT avg(saleprice) FROM Book)

Give the titles of books authored by Plato that have a sale price lower than the average sale price across all books .

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


Question: What are the labels' IDs of online shopping and online malls categories?

SELECT label_id FROM label_categories WHERE category IN ('online shopping', 'online malls')

What are the labels ' IDs of online shopping and online malls categories ?

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


Question: How many app users belong to label ID of "48"?

SELECT COUNT(app_id) FROM app_labels WHERE label_id = 48

How many app users belong to label ID of " 48 " ?

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


Question: Please list the years in which the NHL League had shots recorded while the goalie was on the ice.

SELECT DISTINCT year FROM Goalies WHERE lgID = 'NHL' AND SA IS NOT NULL

Please list the years in which the NHL League had shots recorded while the goalie was on the ice .

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


Question: On which day has it neither been foggy nor rained in the zip code of 94107?

SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "Fog" AND EVENTS != "Rain"

On which day has it neither been foggy nor rained in the zip code of 94107 ?

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


Question: Define the gender of "student995" and his/her enrolled schools.

SELECT IIF(T2.name IS NULL, 'female', 'male') AS gen , T1.school FROM enrolled AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name WHERE T1.name = 'student995'

Define the gender of " student995 " and his / her enrolled schools .

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


Question: How many percent of the mountains on Andes which are non-volcanic?

SELECT CAST(SUM(CASE WHEN type != 'volcano' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM mountain WHERE Mountains = 'Andes'

How many percent of the mountains on Andes which are non - volcanic ?

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


Question: What is the average page number of the menus that have the dish "Clear green turtle"?

SELECT AVG(T1.page_number) FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Clear green turtle'

What is the average page number of the menus that have the dish " Clear green turtle " ?

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


Question: Find the names of all sculptures located in gallery 226.

SELECT title FROM sculptures WHERE LOCATION  =  "Gallery 226"

Find the names of all sculptures located in gallery 226 .

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


Question: Find the names of customers who never placed an order.

SELECT customer_name FROM customers EXCEPT SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id

Find the names of customers who never placed an order .


Question: Lists all genes by identifier number located in the cytoplasm and whose function is metabolism.

SELECT DISTINCT GeneID FROM Genes WHERE Localization = 'cytoplasm' AND Function = 'METABOLISM'

Lists all genes by identifier number located in the cytoplasm and whose function is metabolism .

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


Question: What is the title of episode nominated for WGA Award (TV) with votes greater than 1000?

SELECT DISTINCT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.votes > 1000 AND T1.award_category = 'WGA Award (TV)' AND T1.result = 'Nominee';

What is the title of episode nominated for WGA Award ( TV ) with votes greater than 1000 ?

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


Question: How many episodes aired in the year 2009 have over 15% of voters giving 10 stars in star score?

SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2009' AND T2.stars = 10 AND T2.percent > 15;

How many episodes aired in the year 2009 have over 15 % of voters giving 10 stars in star score ?

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


Question: Which planets that have exact one employee has clearance? List planets' name.

SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*)  =  1;

Which planets that have exact one employee has clearance ? List planets ' name .

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


Question: Find the author for each submission and list them in ascending order of submission score.

SELECT Author FROM submission ORDER BY Scores ASC

Find the author for each submission and list them in ascending order of submission score .

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