Question: Name the player who had the most goals for team Rimouski Oceanic in playoff.

SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.TEAM = 'Rimouski Oceanic' AND T2.GAMETYPE = 'Playoffs' ORDER BY T2.G DESC LIMIT 1

Name the player who had the most goals for team Rimouski Oceanic in playoff .

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


Question: Please list the name of crew that were born before 1970.

SELECT name FROM Person WHERE SUBSTR(birthdate, 1, 4) < '1970';

Please list the name of crew that were born before 1970 .

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


Question: How many samples of clouds are there in the image no.2315533?

SELECT SUM(CASE WHEN T1.IMG_ID = 2315533 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'clouds'

How many samples of clouds are there in the image no.2315533 ?


Question: In which lake flows the river that is, in turn, the mouth of the Manicouagan River?

SELECT NAME FROM lake WHERE river = ( SELECT river FROM river WHERE NAME = 'Manicouagan' )

In which lake flows the river that is , in turn , the mouth of the Manicouagan River ?

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


Question: How many events have each participants attended? List the participant id, type and the number.

SELECT T1.Participant_ID ,  T1.Participant_Type_Code ,  count(*) FROM Participants AS T1 JOIN Participants_in_Events AS T2 ON T1.Participant_ID  =  T2.Participant_ID GROUP BY T1.Participant_ID

How many events have each participants attended ? List the participant i d , type and the number .

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


Question: Return the lot details and investor ids.

SELECT lot_details ,  investor_id FROM LOTS

Return the lot details and investor ids .

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


Question: Please list the business IDs of all the Yelp_Businesses that are good for kids.

SELECT T2.business_id FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T1.attribute_name LIKE 'Good for Kids' AND T2.attribute_value LIKE 'TRUE'

Please list the business IDs of all the Yelp_Businesses that are good for kids .

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


Question: Among the wikipedia pages on Catalan with more than 300 different words, how many of them have a revision ID of over 28330000?

SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 300 AND revision > 28330000

Among the wikipedia pages on Catalan with more than 300 different words , how many of them have a revision ID of over 28330000 ?

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


Question: Show all the cinema names and opening years in descending order of opening year.

SELECT name ,  openning_year FROM cinema ORDER BY openning_year DESC

Show all the cinema names and opening years in descending order of opening year .

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


Question: How many papers has each affiliation published?

SELECT count(DISTINCT T2.paper_id) ,  T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id GROUP BY T1.affiliation_id

How many papers has each affiliation published ?


Question: Among the bakeries, what is total number of bakery located at University Avenue, Palo Alto?

SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.food_type = 'bakery' AND T2.city = 'palo alto' AND T1.street_name = 'university ave.'

Among the bakeries , what is total number of bakery located at University Avenue , Palo Alto ?

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


Question: List the type of the services in alphabetical order.

SELECT service_type_code FROM services ORDER BY service_type_code

List the type of the services in alphabetical order .


Question: What is given name for player 'aebisda01'. Calculate the average time in minutes for the all his games played as goaltender.

SELECT T1.nameGiven, CAST(SUM(T2.Min) AS REAL) / SUM(T2.GP) FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.playerID = 'aebisda01' GROUP BY T1.nameGiven

What is given name for player ' aebisda01 ' . Calculate the average time in minutes for the all his games played as goaltender .

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


Question: Mention the name of author for paper id 5 and state the keyword of this page.

SELECT T1.Name, T3.Keyword FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id WHERE T2.PaperId = 5

Mention the name of author for paper i d 5 and state the keyword of this page .

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


Question: What is the reputation and view count of the user, who is known by his or her display name 'Jarrod Dixon'?

SELECT Reputation, Views FROM users WHERE DisplayName = 'Jarrod Dixon'

What is the reputation and view count of the user , who is known by his or her display name ' Jarrod Dixon ' ?

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


Question: Find the name and website link of the channels that have more than one program.

SELECT t1.name ,  t1.internet FROM channel AS t1 JOIN program AS t2 ON t1.channel_id  =  t2.channel_id GROUP BY t1.channel_id HAVING count(*)  >  1

Find the name and website link of the channels that have more than one program .

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


Question: List the names of authors affiliated with the University of Oxford in alphabetical order.

SELECT Name FROM Author WHERE Affiliation = 'University of Oxford' ORDER BY Name ASC

List the names of authors affiliated with the University of Oxford in alphabetical order .

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


Question: What are the names and ages of pilots who own plane Piper Cub and are older than 35, or have F-14 Fighter and are younger than 30?

SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'Piper Cub' AND age  >  35 UNION SELECT pilot_name ,  age FROM pilotskills WHERE plane_name  =  'F-14 Fighter' AND age  <  30

What are the names and ages of pilots who own plane Piper Cub and are older than 35 , or have F-14 Fighter and are younger than 30 ?

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


Question: What is the hashed password of David Bradley?

SELECT T2.PasswordHash FROM Person AS T1 INNER JOIN Password AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'

What is the hashed password of David Bradley ?


Question: Which card costs more converted mana, "Serra Angel" or "Shrine Keeper"?

SELECT name FROM cards WHERE name IN ('Serra Angel', 'Shrine Keeper') ORDER BY convertedManaCost DESC LIMIT 1

Which card costs more converted mana , " Serra Angel " or " Shrine Keeper " ?

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


Question: List down the trip IDs when bike no. 10 was used by subscribers and the weather's mean temperature is no less than 62 degress Fahrenheit.

SELECT T1.id FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.bike_id = 10 AND T2.mean_temperature_f > 62 AND T1.subscription_type = 'Subscriber'

List down the trip IDs when bike no . 10 was used by subscribers and the weather 's mean temperature is no less than 62 degress Fahrenheit .

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


Question: What's the descripition of BitBar?

SELECT description FROM coins WHERE name = 'BitBar'


Question: What are the names of enzymes in descending order?

SELECT name FROM enzyme ORDER BY name DESC

What are the names of enzymes in descending order ?


Question: Return the unit of measure for 'Herb' products.

SELECT unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"

Return the unit of measure for ' Herb ' products .

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


Question: Of all the products ordered in order no. 10248, which product has the highest user satisfaction?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T1.ReorderLevel DESC LIMIT 1

Of all the products ordered in order no . 10248 , which product has the highest user satisfaction ?

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


Question: How many games were played in park "Columbia Park" in 1907?

SELECT count(*) FROM home_game AS T1 JOIN park AS T2 ON T1.park_id  =  T2.park_id WHERE T1.year = 1907 AND T2.park_name = 'Columbia Park';

How many games were played in park " Columbia Park " in 1907 ?

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


Question: For each bed type, find the average base price of different bed type.

SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;

For each bed type , find the average base price of different bed type .

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


Question: What percentage of Japanese translated sets are expansion sets?

SELECT CAST(SUM(CASE WHEN T2.language = 'Japanese' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T1.type = 'expansion'

What percentage of Japanese translated sets are expansion sets ?

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


Question: In which region can you find the highest number of Baskin Robbins restaurants?

SELECT T2.region AS num FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'baskin robbins' GROUP BY T2.region ORDER BY COUNT(T1.city) DESC LIMIT 1

In which region can you find the highest number of Baskin Robbins restaurants ?

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


Question: How many lessons did the customer Ryan Goodwin complete?

SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Rylan" AND T2.last_name = "Goodwin" AND T1.lesson_status_code = "Completed";

How many lessons did the customer Ryan Goodwin complete ?

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


Question: List the names of institutions in ascending order of founded year.

SELECT Name FROM institution ORDER BY Founded ASC

List the names of institutions in ascending order of founded year .

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


Question: How many users who started yelping since 2012 have sent a high number of funny votes?

SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2012 AND user_votes_funny LIKE 'High'

How many users who started yelping since 2012 have sent a high number of funny votes ?

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


Question: Find the grade studying in room 105.

SELECT DISTINCT grade FROM list WHERE classroom  =  105


Question: What are the names of pilots who have either the Piper Cub or the F-14 Fighter?

SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' OR plane_name  =  'F-14 Fighter'

What are the names of pilots who have either the Piper Cub or the F-14 Fighter ?

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


Question: How many flights on average does American Airlines Inc. operate every day in August, 2018?

SELECT CAST( SUM(CASE WHEN T2.FL_DATE LIKE '2018/8%' THEN 1 ELSE 0 END) AS REAL) / 31 FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA'

How many flights on average does American Airlines Inc. operate every day in August , 2018 ?

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


Question: Count the number of different hometowns of these people.

SELECT count(DISTINCT Hometown) FROM people

Count the number of different hometowns of these people .


Question: Count the number of authors.


Question: What is the name of medal that competitor id 9 obtained?

SELECT DISTINCT T1.medal_name FROM medal AS T1 INNER JOIN competitor_event AS T2 ON T1.id = T2.medal_id WHERE T2.competitor_id = 9

What is the name of medal that competitor i d 9 obtained ?

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


Question: List the name and city of starting stations which has an above-average duration trips.

SELECT DISTINCT T1.start_station_name, T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.duration > ( SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name )

List the name and city of starting stations which has an above - average duration trips .

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


Question: How many businesses in AZ state do not open on Thursday?

SELECT COUNT(T1.business_id) FROM Business AS T1 INNER JOIN Checkins AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T2.label_time_4 LIKE 'None' AND T1.state LIKE 'AZ' AND T3.day_of_week LIKE 'Thursday'

How many businesses in AZ state do not open on Thursday ?

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


Question: Which region is "Columbia" in?

SELECT T2.RegionDescription FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T1.TerritoryDescription = 'Columbia'


Question: What are the dates that have the 5 highest cloud cover rates and what are the rates?

SELECT date ,  cloud_cover FROM weather ORDER BY cloud_cover DESC LIMIT 5

What are the dates that have the 5 highest cloud cover rates and what are the rates ?

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


Question: Find the name of different colleges involved in the tryout in alphabetical order.

SELECT DISTINCT cName FROM tryout ORDER BY cName

Find the name of different colleges involved in the tryout in alphabetical order .

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


Question: Show the average amount of transactions for different lots.

SELECT T2.lot_id ,  avg(amount_of_transaction) FROM TRANSACTIONS AS T1 JOIN Transactions_Lots AS T2 ON T1.transaction_id  =  T2.transaction_id GROUP BY T2.lot_id

Show the average amount of transactions for different lots .

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


Question: Give the number of votes for the post about data visualization.

SELECT COUNT(T1.Id) FROM posts AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.PostId WHERE T1.Title LIKE '%data visualization%'

Give the number of votes for the post about data visualization .

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


Question: Show the institution name and location of institution that is most recently founded.

SELECT institution_name ,  LOCATION FROM institution ORDER BY founded DESC LIMIT 1

Show the institution name and location of institution that is most recently founded .

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


Question: What are the names of ships that were involved in a mission launched after 1928?

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

What are the names of ships that were involved in a mission launched after 1928 ?

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


Question: Among the players who had 10 empty net goals in their career, who is the tallest? Show his full name.

SELECT T2.firstName, T2.lastName FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.ENG = 10 ORDER BY T2.height DESC LIMIT 1

Among the players who had 10 empty net goals in their career , who is the tallest ? Show his full name .

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


Question: How much did customer 6 consume in total between August and November 2013?

SELECT SUM(Consumption) FROM yearmonth WHERE CustomerID = 6 AND Date BETWEEN '201308' AND '201311'

How much did customer 6 consume in total between August and November 2013 ?

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


Question: What are the names of captains, sorted by age descending?

SELECT name FROM captain ORDER BY age DESC

What are the names of captains , sorted by age descending ?

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


Question: How many different official languages are there?

SELECT count(DISTINCT language_id) FROM official_languages

How many different official languages are there ?


Question: What is zip code of customer with first name as Carole and last name as Bernhard?

SELECT T2.zip_postcode FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id WHERE T1.first_name = "Carole" AND T1.last_name = "Bernhard"

What is zip code of customer with first name as Carole and last name as Bernhard ?

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


Question: Count the number of statements.


Question: Gives the average number of chapters in Shakespeare's 1599 work.

SELECT CAST(COUNT(T1.id) AS REAL) / COUNT(DISTINCT T2.id) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1599'

Gives the average number of chapters in Shakespeare 's 1599 work .

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


Question: How many schools in Brooklyn with urban metro and donations for an honoree have requested TT992 - Refill Pack for Safety Name Tags as a resource?

SELECT COUNT(T2.schoolid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T2.school_city = 'Brooklyn' AND T2.school_metro = 'urban' AND T3.for_honoree = 't' AND T1.item_name = 'TT992 - Refill Pack for Safety Name Tags'

How many schools in Brooklyn with urban metro and donations for an honoree have requested TT992 - Refill Pack for Safety Name Tags as a resource ?

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


Question: Between the years 1990 and 2007, of the total rebounds achieved by each player, how many managed to exceed 75% of defensive rebounds?

SELECT COUNT(DISTINCT playerID) FROM player_allstar WHERE CAST(d_rebounds AS REAL) * 100 / rebounds > 75 AND season_id BETWEEN 1990 AND 2007

Between the years 1990 and 2007 , of the total rebounds achieved by each player , how many managed to exceed 75 % of defensive rebounds ?

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


Question: Which product was ordered the most in 2018?

SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T1.OrderDate LIKE '%/%/18' GROUP BY T1._ProductID ORDER BY COUNT(T1._ProductID) DESC LIMIT 1

Which product was ordered the most in 2018 ?

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


Question: In which year did London hold its earliest Olympic game?

SELECT T3.games_year FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'London' ORDER BY T3.games_year LIMIT 1

In which year did London hold its earliest Olympic game ?

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


Question: Among all the orders made by Aimee Bixby, how many of them chose the slowest delivery speed?

SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T2.`Ship Mode` = 'Standard Class'

Among all the orders made by Aimee Bixby , how many of them chose the slowest delivery speed ?

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


Question: What are the different affiliations, and how many schools with each have an enrollment size of above 20000?

SELECT count(*) ,  affiliation FROM university WHERE enrollment  >  20000 GROUP BY affiliation

What are the different affiliations , and how many schools with each have an enrollment size of above 20000 ?

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


Question: How many lesson does customer with first name Ray took?

SELECT count(*) FROM Lessons AS T1 JOIN Customers AS T2 ON T1.customer_id  = T2.customer_id WHERE T2.first_name = "Ray"

How many lesson does customer with first name Ray took ?

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


Question: What is the number of distinct teams that suffer elimination?

SELECT COUNT (DISTINCT team) FROM elimination

What is the number of distinct teams that suffer elimination ?


Question: What are the last names of female students, ordered by age descending?

SELECT LName FROM STUDENT WHERE Sex  =  "F" ORDER BY Age DESC

What are the last names of female students , ordered by age descending ?

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


Question: How many customers are in the automobile market segment?

SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'AUTOMOBILE'

How many customers are in the automobile market segment ?

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


Question: Among the patients that died, what is the condition of the oldest patient?

SELECT T1.DESCRIPTION FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.deathdate IS NOT NULL ORDER BY strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) DESC LIMIT 1

Among the patients that died , what is the condition of the oldest patient ?

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


Question: What is the first, last name, gpa of the youngest one among students whose GPA is above 3?

SELECT stu_fname ,  stu_lname ,  stu_gpa FROM student WHERE stu_gpa  >  3 ORDER BY stu_dob DESC LIMIT 1

What is the first , last name , gpa of the youngest one among students whose GPA is above 3 ?

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


Question: Find all the countries where some drivers have points above 150.

SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T2.Points  >  150

Find all the countries where some drivers have points above 150 .

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


Question: What is the average number of inspections done by the top 5 employees with the highest salary? List the names of the said employees.

SELECT CAST(COUNT(DISTINCT T2.inspection_id) AS REAL) / 5, T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T1.title = 'Sanitarian' ORDER BY T1.salary DESC LIMIT 5

What is the average number of inspections done by the top 5 employees with the highest salary ? List the names of the said employees .

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


Question: What are the character names for a senator of Venice?

SELECT CharName FROM characters WHERE Description = 'a senator of Venice'

What are the character names for a senator of Venice ?

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


Question: What is the average total score of body builders with height bigger than 200?

SELECT avg(T1.Total) FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  200

What is the average total score of body builders with height bigger than 200 ?

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


Question: At which conference was the paper "Skew-Circulant Preconditioners for Systems of LMF-Based ODE Codes" presented?

SELECT T2.FullName FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Skew-Circulant Preconditioners for Systems of LMF-Based ODE Codes'

At which conference was the paper " Skew - Circulant Preconditioners for Systems of LMF - Based ODE Codes " presented ?

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


Question: What are the names and location of the wrestlers?

What are the names and location of the wrestlers ?


Question: How many employees do we have?


Question: Among the menus that include baked apples with cream, who is the sponsor of the menu with the highest price?

SELECT T4.sponsor 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 INNER JOIN Menu AS T4 ON T4.id = T1.menu_id WHERE T3.name = 'Baked apples with cream' AND T3.id = 107 ORDER BY T2.price DESC LIMIT 1

Among the menus that include baked apples with cream , who is the sponsor of the menu with the highest price ?

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


Question: Who played the role of a teleplay in the episode that won "Best Television Episode"?

SELECT T2.name FROM Award AS T1 INNER JOIN Person AS T2 ON T1.person_id = T2.person_id WHERE T1.result = 'Winner' AND T1.award = 'Best Television Episode'

Who played the role of a teleplay in the episode that won " Best Television Episode " ?

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


Question: When did the country whose capital is Nouakchott attained it's independence?

SELECT T2.Independence FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country WHERE T1.Capital = 'Nouakchott'

When did the country whose capital is Nouakchott attained it 's independence ?

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


Question: What is the job position of the oldest employee?

SELECT T2.PersonType FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.BirthDate ASC LIMIT 1

What is the job position of the oldest employee ?


Question: What are the ids and product types for all products, sorted alphabetically by product name?

SELECT product_id ,  product_type_code FROM Products ORDER BY product_name

What are the ids and product types for all products , sorted alphabetically by product name ?

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


Question: Give the actual elapsed time of the flights with air carrier named Semo Aviation Inc.: SEM.

SELECT T2.ACTUAL_ELAPSED_TIME FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Semo Aviation Inc.: SEM'

Give the actual elapsed time of the flights with air carrier named Semo Aviation Inc. : SEM .

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


Question: In geographic identifier from 10 to 30, how many of them has an income below 2000?

SELECT COUNT(GEOID) FROM Demog WHERE INCOME_K < 2000 AND GEOID >= 10 AND GEOID <= 30

In geographic identifier from 10 to 30 , how many of them has an income below 2000 ?

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


Question: For the productline where the product No.S18_2949 was produced, what's the text description for that product line?

SELECT t1.textDescription FROM productlines AS t1 INNER JOIN products AS t2 ON t1.productLine = t2.productLine WHERE t2.productCode = 'S18_2949'

For the productline where the product No . S18_2949 was produced , what 's the text description for that product line ?

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


Question: State the area and population of the country where Asia Pacific Economic Cooperation headquarter is located.

SELECT T2.Name, T2.Population FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'Asia Pacific Economic Cooperation'

State the area and population of the country where Asia Pacific Economic Cooperation headquarter is located .

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


Question: How many accounts have an address that is too long?

SELECT COUNT(*) FROM Address WHERE AddressLine2 <> ''

How many accounts have an address that is too long ?


Question: How many first round draft player in 1996 NBA draft became an All-Star?

SELECT COUNT(T2.playerID) FROM draft AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.draftYear = 1996 AND T1.draftRound = 1

How many first round draft player in 1996 NBA draft became an All - Star ?

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


Question: Which item provided to a project whose main subject area is Literacy & Language has the highest unit price?

SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_area = 'Literacy & Language' ORDER BY T1.item_unit_price DESC LIMIT 1

Which item provided to a project whose main subject area is Literacy & Language has the highest unit price ?

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


Question: Show ids for the faculty members who don't advise any student.

SELECT FacID FROM Faculty EXCEPT SELECT advisor FROM Student

Show ids for the faculty members who do n't advise any student .

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


Question: Please list the three episodes with the highest number of votes for the worst star rating.

SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = ( SELECT MIN(stars) FROM Vote ) ORDER BY T2.votes DESC LIMIT 3;

Please list the three episodes with the highest number of votes for the worst star rating .

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


Question: How is the feature rooftop described?

SELECT feature_description FROM Features WHERE feature_name  =  'rooftop';


Question: For all directors who have directed more than one movie, what movies have they directed and what are their names?

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

For all directors who have directed more than one movie , what movies have they directed and what are their names ?

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


Question: What is the number of document object ids in the collection named Best?

SELECT T2.Document_Object_ID FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best";

What is the number of document object ids in the collection named Best ?

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


Question: Return the ids and models of vehicles that have been driven by more than 2 drivers or been driven by the Jeff Gordon.

SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id JOIN driver AS T3 ON T2.driver_id  =  T3.driver_id WHERE T3.name  =  'Jeff Gordon' UNION SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  >  2

Return the ids and models of vehicles that have been driven by more than 2 drivers or been driven by the Jeff Gordon .

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


Question: What is the date of the match that has the highest wager on the final result of a game?

SELECT Match_Date FROM `Match` ORDER BY Win_Margin DESC LIMIT 1

What is the date of the match that has the highest wager on the final result of a game ?

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


Question: List the full name of legislators whose born in 1960.

SELECT official_full_name FROM current WHERE birthday_bio LIKE '1960%'

List the full name of legislators whose born in 1960 .

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


Question: Tell me the name of the most pricy product.

SELECT Product_Name FROM PRODUCTS ORDER BY Product_Price DESC LIMIT 1

Tell me the name of the most pricy product .


Question: What is the title of the paper which cites the most other papers?

SELECT T2.title FROM Citation AS T1 JOIN Paper AS T2 ON T2.paper_id  =  T1.paper_id GROUP BY T1.paper_id ORDER BY count(*) DESC LIMIT 1

What is the title of the paper which cites the most other papers ?

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


Question: Provide the phone brands and models of the users who were at the coordinates of (80,44).

SELECT DISTINCT T1.phone_brand, T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T2.device_id = T1.device_id WHERE T2.longitude = 80 AND T2.latitude = 44

Provide the phone brands and models of the users who were at the coordinates of ( 80,44 ) .

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


Question: State the name and affiliation of author for the 'Education, democracy and growth' paper?

SELECT T2.Name, T2.Affiliation FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Education, democracy and growth'

State the name and affiliation of author for the ' Education , democracy and growth ' paper ?

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


Question: For case(s) where officer 'Evenden, George' is in charged, state the case number and the grand jury disposition?

SELECT T1.case_number, T1.grand_jury_disposition FROM incidents AS T1 INNER JOIN officers AS T2 ON T1.case_number = T2.case_number WHERE T2.first_name = 'George' AND T2.last_name = 'Evenden'

For case(s ) where officer ' Evenden , George ' is in charged , state the case number and the grand jury disposition ?

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


Question: What is the percentage of female audiences who viewed movies with rating 2?

SELECT CAST(SUM(IIF(T2.u_gender = 'F', 1, 0)) AS REAL) * 100 / COUNT(T2.userid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 2

What is the percentage of female audiences who viewed movies with rating 2 ?

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


Question: For the episode with the most votes, give its air date.

SELECT T2.air_date FROM Vote AS T1 INNER JOIN Episode AS T2 ON T2.episode_id = T1.episode_id GROUP BY T2.episode_id ORDER BY SUM(T1.votes) DESC LIMIT 1

For the episode with the most votes , give its air date .

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


Question: Show the start dates and end dates of all the apartment bookings made by guests with gender code "Female".

SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T2.gender_code  =  "Female"

Show the start dates and end dates of all the apartment bookings made by guests with gender code " Female " .

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


Question: Who is the head of state of the country where the city of Pyongyang is under?

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

Who is the head of state of the country where the city of Pyongyang is under ?

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


Question: Find the name and age of the person who is a friend of Dan or Alice.

SELECT DISTINCT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' OR T2.friend  =  'Alice'

Find the name and age of the person who is a friend of Dan or Alice .

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


Question: How many chapters have the name Gratiano as a character for "friend to Antonio and Bassiano"?

SELECT COUNT(DISTINCT T2.chapter_id) FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Gratiano' AND T1.Description = 'friend to Antonio and Bassiano'

How many chapters have the name Gratiano as a character for " friend to Antonio and Bassiano " ?

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


Question: Find the enrollment date for all the tests that have "Pass" result.

SELECT T1.date_of_enrolment FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id  =  T2.registration_id WHERE T2.test_result  =  "Pass"

Find the enrollment date for all the tests that have " Pass " result .

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


Question: What are the names of courses with 1 credit?

SELECT CName FROM COURSE WHERE Credits  =  1

What are the names of courses with 1 credit ?

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


Question: How many restaurants have met all requirements in the inspection?

SELECT COUNT(score) FROM inspections WHERE score = 100

How many restaurants have met all requirements in the inspection ?


Question: Find the total number of courses offered.

Find the total number of courses offered .


Question: What is the percentage of female competitors whose heights are over 170 that participated in the game in 1988?

SELECT CAST(COUNT(CASE WHEN T3.gender = 'F' AND T3.height > 170 THEN 1 END) AS REAL) * 100 / COUNT(T2.person_id) 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_year = 1988

What is the percentage of female competitors whose heights are over 170 that participated in the game in 1988 ?

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


Question: What is the parent document of document owned by Marlin? List the document id.

SELECT Parent_Document_Object_ID FROM Document_Objects WHERE OWNER  =  'Marlin'

What is the parent document of document owned by Marlin ? List the document i d.

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


Question: Among the elderlies, state the last name of whose complaint is handled in server YIFAT?

SELECT T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.age > 65 AND T2.server = 'YIFAT'

Among the elderlies , state the last name of whose complaint is handled in server YIFAT ?

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


Question: Among the worst actresses, how many of them got a rating of more than 3 to the movies they starred?

SELECT COUNT(T1.userid) FROM u2base AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid INNER JOIN users AS T4 ON T1.userid = T4.userid WHERE T3.a_quality = 0 AND T1.rating > 3 AND T4.u_gender = 'F'

Among the worst actresses , how many of them got a rating of more than 3 to the movies they starred ?

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


Question: Please list the names of coins that has been disappeared.

SELECT name FROM coins WHERE status = 'extinct'

Please list the names of coins that has been disappeared .

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


Question: What is the credit rating of the company whose average lead time is 16 days for a standard price of 18.9900 and whose last receipt date is August 27, 2011?

SELECT T2.CreditRating FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.StandardPrice = 18.9900 AND T1.AverageLeadTime = 16 AND STRFTIME('%Y-%m-%d', T1.LastReceiptDate) = '2011-08-27'

What is the credit rating of the company whose average lead time is 16 days for a standard price of 18.9900 and whose last receipt date is August 27 , 2011 ?

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


Question: What are the names of all the stores in the largest district by population?

SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id WHERE district_id  =  (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1)

What are the names of all the stores in the largest district by population ?

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


Question: What is the actual departure time of JetBlue Airways with the plane's tail number N903JB to Fort Lauderdale-Hollywood International Airport on the 20th of August 2018?

SELECT T1.DEP_TIME FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code INNER JOIN Airports AS T3 ON T1.DEST = T3.Code WHERE T1.FL_DATE = '2018/8/20' AND T1.TAIL_NUM = 'N903JB' AND T2.Description LIKE '%JetBlue Airways%' AND T3.Description LIKE '%Fort Lauderdale-Hollywood%'

What is the actual departure time of JetBlue Airways with the plane 's tail number N903JB to Fort Lauderdale - Hollywood International Airport on the 20th of August 2018 ?

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


Question: How many athletes competed in the 1992 Summer Olympics?

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

How many athletes competed in the 1992 Summer Olympics ?


Question: Please list the location coordinates of all the incidents that had happened in the ward represented by alderman Pat Dowell.

SELECT T2.latitude, T2.longitude FROM Ward AS T1 INNER JOIN Crime AS T2 ON T1.ward_no = T2.ward_no WHERE T1.alderman_first_name = 'Pat' AND T1.alderman_last_name = 'Dowell' AND T2.latitude IS NOT NULL AND T2.longitude IS NOT NULL

Please list the location coordinates of all the incidents that had happened in the ward represented by alderman Pat Dowell .

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


Question: List out patient names with calcium deficiency.

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Calcium' AND T2.VALUE < 8.6

List out patient names with calcium deficiency .


Question: What are the names of the cities along the Euphrat River's course? Indicate the capital city of the nation where the Euphrat River flows.

SELECT T2.City, T1.Capital FROM country AS T1 INNER JOIN located AS T2 ON T1.Code = T2.Country INNER JOIN river AS T3 ON T3.Name = T2.River WHERE T3.Name = 'Euphrat'

What are the names of the cities along the Euphrat River 's course ? Indicate the capital city of the nation where the Euphrat River flows .

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


Question: What is the category of the film Agent Truman?

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

What is the category of the film Agent Truman ?

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


Question: Count the number of different scientists assigned to any project.

SELECT count(DISTINCT scientist) FROM assignedto

Count the number of different scientists assigned to any project .

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


Question: On what dates were employees without the letter M in their first names hired?

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

On what dates were employees without the letter M in their first names hired ?

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


Question: What are the top 5 types of products with the highest selling price? ?

SELECT Name FROM Product ORDER BY ListPrice DESC LIMIT 5

What are the top 5 types of products with the highest selling price ? ?

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


Question: Please list the full names of all the male clients in the Pacific division.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T2.division = 'Pacific' AND T1.sex = 'Male'

Please list the full names of all the male clients in the Pacific division .

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


Question: Among the products that are purchased, how many of them have never received the highest rating?

SELECT COUNT(T1.ProductID) FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.MakeFlag = 0 AND T1.Rating != 5

Among the products that are purchased , how many of them have never received the highest rating ?

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


Question: Give the email address of the person who lives in "1411 Lillydale Drive".

SELECT T2.email FROM address AS T1 INNER JOIN staff AS T2 ON T1.address_id = T2.address_id WHERE T1.address = '1411 Lillydale Drive'

Give the email address of the person who lives in " 1411 Lillydale Drive " .

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


Question: What is the school and organization enrolled by student211?

SELECT T2.school, T1.organ FROM enlist AS T1 INNER JOIN enrolled AS T2 ON T2.name = T1.name WHERE T1.name = 'student211'

What is the school and organization enrolled by student211 ?

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


Question: Which film rated by user 59988436 that received 21 comments?

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 59988436 AND T1.critic_comments = 21

Which film rated by user 59988436 that received 21 comments ?

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


Question: Give the post name of "Idaho" state.

SELECT T FROM ( SELECT DISTINCT CASE WHEN state = 'Idaho' THEN state_post ELSE NULL END AS T FROM state_sector_details ) WHERE T IS NOT NULL

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


Question: What is the percentage of the European countries among the given countries?

SELECT CAST(SUM(IIF(T2.r_name = 'EUROPE', 1, 0)) AS REAL) * 100 / COUNT(T1.n_name) FROM nation AS T1 INNER JOIN region AS T2 ON T1.n_regionkey = T2.r_regionkey

What is the percentage of the European countries among the given countries ?


Question: Please list the names of all the producers in the movie "Pirates of the Caribbean: At World's End".

SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End' AND T2.job = 'Producer'

Please list the names of all the producers in the movie " Pirates of the Caribbean : At World 's End " .

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


Question: In August of 1996, how many orders were placed by the customer with the highest amount of orders?

SELECT COUNT(OrderID) FROM Orders WHERE OrderDate LIKE '1996-08%' GROUP BY CustomerID ORDER BY COUNT(OrderID) DESC LIMIT 1

In August of 1996 , how many orders were placed by the customer with the highest amount of orders ?

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


Question: What are names of the movies that are either made after 2000 or reviewed by Brittany Harris?

SELECT DISTINCT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Brittany Harris' OR T2.year  >  2000

What are names of the movies that are either made after 2000 or reviewed by Brittany Harris ?

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


Question: What is the excerpt post ID and wiki post ID of the tag named sample?

SELECT ExcerptPostId, WikiPostId FROM tags WHERE TagName = 'sample'

What is the excerpt post ID and wiki post ID of the tag named sample ?

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


Question: Provide ID, sex and age of patient who has blood glucose (GLU) not within normal range but with total cholesterol(T-CHO) within normal range.

SELECT DISTINCT T1.ID, T1.SEX , STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.GLU >= 180 AND T2.`T-CHO` < 250

Provide ID , sex and age of patient who has blood glucose ( GLU ) not within normal range but with total cholesterol(T - CHO ) within normal range .

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


Question: How many actors acted in movies in the Music category?

SELECT COUNT(T1.actor_id) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN film_category AS T4 ON T3.film_id = T4.film_id INNER JOIN category AS T5 ON T4.category_id = T5.category_id WHERE T5.name = 'Music'

How many actors acted in movies in the Music category ?


Question: What are the display names and ages of user who got the highest in views?

SELECT DisplayName, Age FROM users WHERE Views = ( SELECT MAX(Views) FROM users )

What are the display names and ages of user who got the highest in views ?

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


Question: How many students live in each city?

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


Question: What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT?

SELECT DISTINCT T1.Fname FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_PRESIDENT_Vote EXCEPT SELECT DISTINCT Fname FROM STUDENT WHERE city_code  =  "PIT"

What are the distinct first names of the students who have vice president votes and reside in a city whose city code is not PIT ?

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


Question: Which authors have submitted to more than one workshop?

SELECT T2.Author FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author HAVING COUNT(DISTINCT T1.workshop_id)  >  1

Which authors have submitted to more than one workshop ?


Question: What is the total revenue of companies started by founder?

SELECT sum(revenue) ,  founder FROM manufacturers GROUP BY founder

What is the total revenue of companies started by founder ?


Question: What is the ratio between the number of object samples in image 1 and the number of object samples in image 6?

SELECT CAST(SUM(CASE WHEN IMG_ID = 1 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN IMG_ID = 6 THEN 1 ELSE 0 END) FROM IMG_OBJ

What is the ratio between the number of object samples in image 1 and the number of object samples in image 6 ?

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


Question: What are the widths of the paintings that were created by the artist who was born before 1850?

SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.birthYear  <  1850

What are the widths of the paintings that were created by the artist who was born before 1850 ?

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


Question: What is the URL to the rating on Mubi of the Riff-Raff movie that was given the highest rating score by user 22030372?

SELECT T2.rating_url FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_id = 22030372 AND T2.rating_score = 5 AND T1.movie_title = 'Riff-Raff'

What is the URL to the rating on Mubi of the Riff - Raff movie that was given the highest rating score by user 22030372 ?

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


Question: Show all role codes with at least 3 employees.

SELECT role_code FROM Employees GROUP BY role_code HAVING count(*)  >=  3

Show all role codes with at least 3 employees .

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


Question: Among all the players whose weight is under 130, how many of them preferred foot in attacking is left?

SELECT COUNT(DISTINCT t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.weight < 130 AND t2.preferred_foot = 'left'

Among all the players whose weight is under 130 , how many of them preferred foot in attacking is left ?

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


Question: Which campus has the most faculties in year 2003?

SELECT T1.campus FROM campuses AS T1 JOIN faculty AS T2 ON T1.id  =  T2.campus WHERE T2.year  =  2003 ORDER BY T2.faculty DESC LIMIT 1

Which campus has the most faculties in year 2003 ?

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


Question: Give the description for the Act No.2, Scene No.2 of Midsummer Night's Dream.

SELECT T2.Description FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = '2' AND T2.Scene = '2' AND T1.Title = 'Midsummer Night''s Dream'

Give the description for the Act No.2 , Scene No.2 of Midsummer Night 's Dream .

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


Question: What are the average, maximum and total revenues of all companies?

SELECT avg(revenue) ,  max(revenue) ,  sum(revenue) FROM manufacturers

What are the average , maximum and total revenues of all companies ?


Question: When was the last f1 season whereby Brands Hatch hosted the British Grand Prix?

SELECT T2.date FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T1.name = 'Brands Hatch' AND T2.name = 'British Grand Prix' ORDER BY T2.year DESC LIMIT 1

When was the last f1 season whereby Brands Hatch hosted the British Grand Prix ?

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


Question: Write down the author's name and IDs who are affiliated with Univeristiy of Oulu.

SELECT Name, id FROM Author WHERE Affiliation = 'University of Oulu'

Write down the author 's name and IDs who are affiliated with Univeristiy of Oulu .

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


Question: What is the full name of the team with the fastest growth in winning rate in the 'ABA' league from 1972 to 1973?

SELECT T1.name FROM teams AS T1 INNER JOIN ( SELECT * FROM teams WHERE lgID = 'ABA' AND year = 1972 ) AS T2 ON T1.tmID = T2.tmID WHERE T1.lgID = 'ABA' AND T1.year = 1973 ORDER BY (CAST(T1.won AS REAL) / (T1.won + T1.lost) - (CAST(T2.won AS REAL) / (T2.won + T2.lost))) DESC LIMIT 1

What is the full name of the team with the fastest growth in winning rate in the ' ABA ' league from 1972 to 1973 ?

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


Question: Show the names of buildings except for those having an institution founded in 2003.

SELECT name FROM building EXCEPT SELECT T1.name FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  =  2003

Show the names of buildings except for those having an institution founded in 2003 .

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


Question: Which organization has the highest number of male students? Calculate for the percentage of the male students in the said organization.

SELECT T.organ, T.per FROM ( SELECT T1.organ, CAST(COUNT(T3.name) AS REAL) / COUNT(T2.name) AS per , COUNT(T3.name) AS num FROM enlist AS T1 INNER JOIN person AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T2.name = T3.name GROUP BY T1.organ ) T ORDER BY T.num DESC LIMIT 1

Which organization has the highest number of male students ? Calculate for the percentage of the male students in the said organization .

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


Question: Provide the name of the contact person who made the orders that shipped to Switzerland.

SELECT T1.ContactName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.ShipCountry = 'Switzerland' GROUP BY T1.ContactName

Provide the name of the contact person who made the orders that shipped to Switzerland .

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


Question: List down the name of teams that won the toss of the coin from matches with ID from 336010 to 336020.

SELECT T2.Team_Name FROM Match AS T1 INNER JOIN Team AS T2 ON T2.Team_Id = T1.Toss_Winner WHERE T1.Match_Id BETWEEN 336010 AND 336020

List down the name of teams that won the toss of the coin from matches with ID from 336010 to 336020 .

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


Question: Count the number of documents.


Question: List the closing time and day of week of active businesses in Tempe with stars greater than the 70% of average age of star rating.

SELECT T2.closing_time, T3.day_of_week FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Tempe' AND T1.active LIKE 'TRUE' AND T1.stars > 0.7 * ( SELECT AVG(T1.stars) FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Tempe' AND T1.active LIKE 'TRUE' )

List the closing time and day of week of active businesses in Tempe with stars greater than the 70 % of average age of star rating .

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


Question: Between 2018 to 2020, what is the average amount of shipped orders per year under Carl Nguyen?

SELECT CAST(COUNT(T1.OrderNumber) AS REAL) / 3 FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/18') OR (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/19') OR (T2.`Sales Team` = 'Carl Nguyen' AND ShipDate LIKE '%/%/20')

Between 2018 to 2020 , what is the average amount of shipped orders per year under Carl Nguyen ?

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


Question: How many perpetrators are there?


Question: Name customers in India with account balances over $5000.

SELECT T1.c_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal > 5000 AND T2.n_name = 'INDIA'

Name customers in India with account balances over $ 5000 .

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


Question: Please list the names of all the crew members of the movie "Pirates of the Caribbean: At World's End".

SELECT T3.person_name FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T1.title LIKE 'Pirates of the Caribbean: At World%s End'

Please list the names of all the crew members of the movie " Pirates of the Caribbean : At World 's End " .

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


Question: Give the full name and contact number of employees in descending order of age.

SELECT FirstName, LastName, HomePhone FROM Employees ORDER BY BirthDate DESC

Give the full name and contact number of employees in descending order of age .

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


Question: What are the mission codes, fates, and names of the ships involved?

SELECT T1.Code ,  T1.Fate ,  T2.Name FROM mission AS T1 JOIN ship AS T2 ON T1.Ship_ID  =  T2.Ship_ID

What are the mission codes , fates , and names of the ships involved ?

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


Question: Find the names of the swimmers who have no record.

SELECT name FROM swimmer WHERE id NOT IN (SELECT swimmer_id FROM record)

Find the names of the swimmers who have no record .

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


Question: Show names of shops and the carriers of devices they have in stock.

SELECT T3.Shop_Name ,  T2.Carrier FROM stock AS T1 JOIN device AS T2 ON T1.Device_ID  =  T2.Device_ID JOIN shop AS T3 ON T1.Shop_ID  =  T3.Shop_ID

Show names of shops and the carriers of devices they have in stock .

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


Question: List all player names in ascending alphabetical order.

SELECT Player_name FROM player ORDER BY Player_name ASC

List all player names in ascending alphabetical order .


Question: Who is the newest hired employee? Give the full name.

SELECT FirstName, LastName FROM Employees WHERE HireDate = ( SELECT MAX(HireDate) FROM Employees )

Who is the newest hired employee ? Give the full name .

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


Question: What are the different classes of races, and how many races correspond to each?

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

What are the different classes of races , and how many races correspond to each ?

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


Question: How many books were published by Kensington?

SELECT COUNT(T1.book_id) FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Kensington'

How many books were published by Kensington ?


Question: Return the names of artists and the themes of their exhibitions that had a ticket price higher than average.

SELECT T1.theme ,  T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id  =  T2.artist_id WHERE T1.ticket_price  >  (SELECT avg(ticket_price) FROM exhibition)

Return the names of artists and the themes of their exhibitions that had a ticket price higher than average .

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


Question: Calculate the average score per university under Alumni criteria in 2008.

SELECT AVG(T2.score) FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id WHERE T1.criteria_name = 'Alumni' AND T2.year = 2008

Calculate the average score per university under Alumni criteria in 2008 .

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


Question: Return the name of the artist who has the latest join year.

SELECT name FROM artist ORDER BY year_join DESC LIMIT 1

Return the name of the artist who has the latest join year .

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


Question: Who are the constructors of drivers sorted by drivers' age in ascending order?

SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC

Who are the constructors of drivers sorted by drivers ' age in ascending order ?

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


Question: How many players were born after the year 1985?

SELECT COUNT(Player_Id) FROM Player WHERE SUBSTR(DOB, 1, 4) > 1985

How many players were born after the year 1985 ?


Question: Please give the height of the tallest coach of the Montreal Canadiens.

SELECT T3.height FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Montreal Canadiens' AND T3.coachID IS NOT NULL ORDER BY T3.height DESC LIMIT 1

Please give the height of the tallest coach of the Montreal Canadiens .

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


Question: Calculate the difference between the highest votes for episode and the lowest votes for episode.

SELECT MAX(votes) - MIN(votes) FROM Vote;

Calculate the difference between the highest votes for episode and the lowest votes for episode .


Question: For each election cycle, report the number of voting records.

SELECT Election_Cycle ,  count(*) FROM VOTING_RECORD GROUP BY Election_Cycle

For each election cycle , report the number of voting records .

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


Question: Which of the customers, whose Tokyo-based sales representative reports to the Vice President of Sales whose employee number is 1056, has paid the highest payment? List the customer's name, the contact person and calculate the total amount of that customer's total payments.

SELECT T2.customerName, T2.contactFirstName, T2.contactLastName, SUM(T3.amount) FROM employees AS T1 INNER JOIN customers AS T2 ON T2.salesRepEmployeeNumber = T1.employeeNumber INNER JOIN payments AS T3 ON T2.customerNumber = T3.customerNumber INNER JOIN offices AS T4 ON T1.officeCode = T4.officeCode WHERE T4.city = 'Tokyo' AND T1.reportsTo = 1056 GROUP BY T2.customerName, T2.contactFirstName, T2.contactLastName ORDER BY amount DESC LIMIT 1

Which of the customers , whose Tokyo - based sales representative reports to the Vice President of Sales whose employee number is 1056 , has paid the highest payment ? List the customer 's name , the contact person and calculate the total amount of that customer 's total payments .

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


Question: How many departments did Sheela Ward work in between 1/1/2011 to 12/31/2012

SELECT COUNT(T3.Name) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.FirstName = 'Sheela' AND T1.LastName = 'Word' AND STRFTIME('%Y', T3.ModifiedDate) BETWEEN '2011' AND '2012'

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


Question: Which employee handled the most amount of orders in 1996? Give the full name, title, and address of this employee.

SELECT FirstName, LastName, Title, address FROM Employees WHERE EmployeeID = ( SELECT T1.EmployeeID FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T2.OrderDate BETWEEN '1996-01-01 00:00:00' AND '1997-01-01 00:00:00' GROUP BY T1.EmployeeID ORDER BY COUNT(T2.OrderID) DESC LIMIT 1 )

Which employee handled the most amount of orders in 1996 ? Give the full name , title , and address of this employee .

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


Question: What is the average quantity of stocks?

What is the average quantity of stocks ?


Question: List the descriptions of movies under the category Travel.

SELECT T1.description FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.`name` = 'Travel'

List the descriptions of movies under the category Travel .


Question: Tell me the ages of the oldest and youngest students studying major 600.

SELECT max(Age) ,  min(Age) FROM STUDENT WHERE Major  =  600

Tell me the ages of the oldest and youngest students studying major 600 .

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


Question: Among the public institutes in the state of Alabama, how many of them have over 30 students who graduated within 100 percent of normal/expected time in 2011?

SELECT COUNT(T1.chronname) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.state = 'Alabama' AND T1.control = 'Public' AND T2.year = 2011 AND T2.grad_100 > 30

Among the public institutes in the state of Alabama , how many of them have over 30 students who graduated within 100 percent of normal / expected time in 2011 ?

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


Question: What is all the information regarding employees who are managers?

SELECT DISTINCT * FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id WHERE T1.employee_id  =  T2.manager_id

What is all the information regarding employees who are managers ?


Question: What are the maximum and minimum number of silver medals for all the clubs?

SELECT max(Silver) ,  min(Silver) FROM club_rank

What are the maximum and minimum number of silver medals for all the clubs ?


Question: What is the first name and last name employee helps the customer with first name Leonie?

SELECT T2.FirstName ,  T2.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId WHERE T1.FirstName  =  "Leonie"

What is the first name and last name employee helps the customer with first name Leonie ?

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


Question: Which of these pages have more words, the page titled "Afluent" or "Asclepi"?

SELECT CASE WHEN ( SELECT words FROM pages WHERE title = 'Asclepi' ) > ( SELECT words FROM pages WHERE title = 'Afluent' ) THEN 'Asclepi' ELSE 'Afluent' END

Which of these pages have more words , the page titled " Afluent " or " Asclepi " ?

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


Question: What is the latitude and longitude for Baltimore?

SELECT latitude ,  longitude FROM City WHERE city_name  =  "Baltimore"

What is the latitude and longitude for Baltimore ?


Question: What are the type code, details, and date of each achievement?

SELECT achievement_type_code ,  achievement_details ,  date_achievement FROM Achievements

What are the type code , details , and date of each achievement ?


Question: What is the location of the bridge named 'Kolob Arch' or 'Rainbow Bridge'?

SELECT LOCATION FROM bridge WHERE name  =  'Kolob Arch' OR name  =  'Rainbow Bridge'

What is the location of the bridge named ' Kolob Arch ' or ' Rainbow Bridge ' ?

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


Question: Among the married employees with the highest pay frequency, how many of them have an eastern name style?

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeePayHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T1.MaritalStatus = 'M' AND T2.NameStyle = 1 AND T3.Rate = ( SELECT Rate FROM EmployeePayHistory ORDER BY Rate DESC LIMIT 1 )

Among the married employees with the highest pay frequency , how many of them have an eastern name style ?

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


Question: List the teams of the players with the top 5 largest ages.

SELECT Team FROM player ORDER BY Age DESC LIMIT 5

List the teams of the players with the top 5 largest ages .

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


Question: Find the name of all movies that are not played in Odeon theater.

SELECT title FROM movies EXCEPT SELECT T1.title FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie WHERE T2.name  =  'Odeon'

Find the name of all movies that are not played in Odeon theater .

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


Question: Find the number of reservations by sailors with id greater than 1 for each boat.

SELECT bid ,  count(*) FROM Reserves WHERE sid  >  1 GROUP BY bid

Find the number of reservations by sailors with i d greater than 1 for each boat .

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


Question: Give the review of the restaurant at 430, Broadway.

SELECT T1.review FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'Broadway' AND T2.street_num = 430

Give the review of the restaurant at 430 , Broadway .

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


Question: find the names of people who are taller than 200 or lower than 190.

SELECT name FROM people WHERE height  >  200 OR height  <  190

find the names of people who are taller than 200 or lower than 190 .

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


Question: List the distinct hometowns that are not associated with any gymnast.

SELECT DISTINCT Hometown FROM people EXCEPT SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID

List the distinct hometowns that are not associated with any gymnast .


Question: Show the names of cities in counties that have a crime rate less than 100.

SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate  <  100)

Show the names of cities in counties that have a crime rate less than 100 .

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


Question: What are the names of the tourist attractions that can be accessed by bus?

SELECT Name FROM TOURIST_ATTRACTIONS WHERE How_to_Get_There  =  "bus"

What are the names of the tourist attractions that can be accessed by bus ?

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


Question: Which business ID have the shortest business operating hours?

SELECT business_id FROM Business_Hours ORDER BY closing_time - opening_time LIMIT 1

Which business ID have the shortest business operating hours ?


Question: How many students for both genders graduated from a 2-year institute in Alabama in 2011?

SELECT SUM(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE  T2.cohort = '2y all' AND T2.year = 2011 AND T1.state = 'Alabama'

How many students for both genders graduated from a 2 - year institute in Alabama in 2011 ?

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


Question: Provide the number of Yelp businesses in "Gilbert" which got a" high" review count.

SELECT COUNT(business_id) FROM Business WHERE review_count = 'High' AND city = 'Gilbert'

Provide the number of Yelp businesses in " Gilbert " which got a " high " review count .

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


Question: What are the countries that have drivers with points larger than 150?

SELECT T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country WHERE T2.Points  >  150

What are the countries that have drivers with points larger than 150 ?

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


Question: How many games were released in the year 2001?

SELECT COUNT(id) FROM game_platform AS T WHERE T.release_year = 2001

How many games were released in the year 2001 ?


Question: Find the number of customers in the banks at New York City.

SELECT sum(no_of_customers) FROM bank WHERE city  =  'New York City'

Find the number of customers in the banks at New York City .

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


Question: List all genes whose interaction is with genes located in the nucleus in which it is positively correlated.

SELECT T1.GeneID FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T2.Expression_Corr > 0 AND T1.Localization = 'nucleus'

List all genes whose interaction is with genes located in the nucleus in which it is positively correlated .

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


Question: Who is the villain in Little Mermaid?

SELECT villian FROM characters WHERE movie_title = 'Little Mermaid'


Question: What is the GDP per capita in Switzerland?

SELECT T2.GDP / T1.Population FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Switzerland'

What is the GDP per capita in Switzerland ?


Question: Among the current legislators who do not have accounts on OpenSecrets.org., how many of them do not have instagram accounts either?

SELECT SUM(CASE WHEN T1.instagram IS NULL THEN 1 ELSE 0 END) AS count FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.opensecrets_id IS NULL OR T2.opensecrets_id = ''

Among the current legislators who do not have accounts on OpenSecrets.org . , how many of them do not have instagram accounts either ?

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


Question: What is al the available information of each student?

What is al the available information of each student ?


Question: What are the phones and emails of workshop groups in which services are performed?

SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID

What are the phones and emails of workshop groups in which services are performed ?

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


Question: Show the names and locations of institutions that are founded after 1990 and have the type "Private".

SELECT institution ,  LOCATION FROM institution WHERE founded  >  1990 AND TYPE  =  'Private'

Show the names and locations of institutions that are founded after 1990 and have the type " Private " .

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


Question: What is the total share of transactions?

SELECT sum(share_count) FROM TRANSACTIONS

What is the total share of transactions ?


Question: Find the ids of reviewers who didn't only give 4 star.

Find the ids of reviewers who did n't only give 4 star .

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


Question: List down atom id2 for atoms with element sulfur.

SELECT DISTINCT T2.atom_id2 FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T1.element = 's'

List down atom id2 for atoms with element sulfur .


Question: For the game on 2008/5/12, who was the man of the match?

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match WHERE T2.Match_Date = '2008-05-12'

For the game on 2008/5/12 , who was the man of the match ?

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


Question: Show all student ids and the number of hours played.

SELECT Stuid ,  sum(hours_played) FROM Plays_games GROUP BY Stuid

Show all student ids and the number of hours played .

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


Question: How many sections does each course has?

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

How many sections does each course has ?


Question: What's the French name of the set of cards with "Tendo Ice Bridge" is in?

SELECT T2.translation FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Tendo Ice Bridge' AND T2.language = 'French' AND T2.translation IS NOT NULL

What 's the French name of the set of cards with " Tendo Ice Bridge " is in ?

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


Question: What is the county and region of Plearn-Thai Cuisine restaurant?

SELECT T1.county, T1.region, T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.label = 'plearn-thai cuisine'

What is the county and region of Plearn - Thai Cuisine restaurant ?

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


Question: Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01? State the location of the station.

SELECT T1.name, T1.long FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/11/03 02:01:01' AND T2.bikes_available = 0

Which is the station where no bike could not be borrowed form on the 2013/11/03 02:01:01 ? State the location of the station .

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


Question: Who are the players who were not in the Hall of Fame list.

SELECT firstName, lastName FROM Master WHERE hofID IS NULL

Who are the players who were not in the Hall of Fame list .


Question: Give the coordinate of the alleys where a crime was reported and an arrest was made.

SELECT latitude, longitude FROM Crime WHERE location_description = 'ALLEY' AND arrest = 'TRUE' GROUP BY latitude, longitude

Give the coordinate of the alleys where a crime was reported and an arrest was made .

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


Question: Please name any two products that have the highest satisfaction levels among users of Heli Swaren GmbH & Co. KG.

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Heli Swaren GmbH & Co. KG' ORDER BY T1.ReorderLevel DESC LIMIT 2

Please name any two products that have the highest satisfaction levels among users of Heli Swaren GmbH & Co. KG .

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


Question: What are the names and years of the movies that has the top 3 highest rating star?

SELECT T2.title ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID ORDER BY T1.stars DESC LIMIT 3

What are the names and years of the movies that has the top 3 highest rating star ?

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


Question: Among all the flights scheduled to depart from John F. Kennedy International on 2018/8/1, when was the earliest one scheduled to depart?

SELECT T2.DEP_TIME FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN WHERE T2.FL_DATE = '2018/8/1' AND T1.Description = 'New York, NY: John F. Kennedy International' AND T2.DEP_TIME IS NOT NULL ORDER BY T2.DEP_TIME ASC LIMIT 1

Among all the flights scheduled to depart from John F. Kennedy International on 2018/8/1 , when was the earliest one scheduled to depart ?

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


Question: Please show the team that has the most number of technicians.

SELECT Team FROM technician GROUP BY Team ORDER BY COUNT(*) DESC LIMIT 1

Please show the team that has the most number of technicians .


Question: What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose id is 163?

SELECT first_name ,  last_name FROM employees WHERE salary  >  (SELECT salary FROM employees WHERE employee_id = 163 )

What is the full name ( first name and last name ) for those employees who gets more salary than the employee whose i d is 163 ?

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


Question: Which department, altogether, has the most personnel who work the evening shift?

SELECT T3.Name FROM EmployeeDepartmentHistory AS T1 INNER JOIN Shift AS T2 ON T1.ShiftId = T2.ShiftId INNER JOIN Department AS T3 ON T1.DepartmentID = T3.DepartmentID WHERE T2.Name = 'Night' GROUP BY T3.Name ORDER BY COUNT(T1.BusinessEntityID) DESC LIMIT 1

Which department , altogether , has the most personnel who work the evening shift ?

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


Question: Find each target user's name and average trust score.

SELECT T1.name ,  avg(trust) FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id  =  T2.target_u_id GROUP BY T2.target_u_id

Find each target user 's name and average trust score .

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


Question: How many accounts are there in total?


Question: How many votes did the episode titled "Cherished" get in total?

SELECT SUM(T2.votes) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Cherished'

How many votes did the episode titled " Cherished " get in total ?

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


Question: What is the weight in pounds of the heaviest player?

SELECT MAX(T2.weight_in_lbs) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id

What is the weight in pounds of the heaviest player ?

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


Question: What is all the information on the airport with the largest number of international passengers?

SELECT * FROM airport ORDER BY International_Passengers DESC LIMIT 1

What is all the information on the airport with the largest number of international passengers ?

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


Question: What is the number of colleges with a student population greater than 15000?

SELECT count(*) FROM College WHERE enr  >  15000

What is the number of colleges with a student population greater than 15000 ?


Question: What are the shipping agent names?

SELECT shipping_agent_name FROM Ref_Shipping_Agents;


Question: Count the number of different official languages.

SELECT count(DISTINCT language_id) FROM official_languages

Count the number of different official languages .


Question: What is the percentage of the trip were done by a subscriber?

SELECT CAST(COUNT(subscription_type) AS REAL) * 100 / ( SELECT COUNT(subscription_type) FROM trip ) FROM trip WHERE subscription_type = 'Subscriber'

What is the percentage of the trip were done by a subscriber ?


Question: List the document type code for the document with the id 2.

SELECT document_type_code FROM Documents WHERE document_id = 2;

List the document type code for the document with the i d 2 .

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


Question: Which historical female legislator that have their term ended on the 3rd of March 1791?

SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.end = '1791-03-03' AND T1.gender_bio = 'F'

Which historical female legislator that have their term ended on the 3rd of March 1791 ?

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


Question: What are the names of the parts that have a part supply cost of at least 1,000?

SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey WHERE T2.ps_supplycost > 1000

What are the names of the parts that have a part supply cost of at least 1,000 ?

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


Question: Find the number of phones for each accreditation type.

SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type

Find the number of phones for each accreditation type .


Question: In films with rental rate of 4.99, list down the inventory ID of the films starred by Lucille Dee.

SELECT T4.inventory_id FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id INNER JOIN inventory AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'Lucille' AND T1.last_name = 'Dee' AND T3.rental_rate = 4.99

In films with rental rate of 4.99 , list down the inventory ID of the films starred by Lucille Dee .

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


Question: Describe the ingredients in the recipe with the highest vitamin that helps vision in dim light.

SELECT T1.name FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T1.ingredient_id = T2.ingredient_id INNER JOIN Nutrition AS T3 ON T3.recipe_id = T2.recipe_id ORDER BY T3.vitamin_a DESC LIMIT 1

Describe the ingredients in the recipe with the highest vitamin that helps vision in dim light .

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


Question: Among the geographic ID which has 33.658K of inhabitants, describe the education, occupation and age of female widow.

SELECT T1.EDUCATIONNUM, T1.OCCUPATION, T1.age FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T2.INHABITANTS_K = 33.658 AND T1.SEX = 'Female' AND T1.MARITAL_STATUS = 'Widowed'

Among the geographic ID which has 33.658 K of inhabitants , describe the education , occupation and age of female widow .

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


Question: What are the makes of the teams with car owner "Buddy Arrington"?

SELECT Make FROM team WHERE Car_Owner  =  "Buddy Arrington"

What are the makes of the teams with car owner " Buddy Arrington " ?

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


Question: Which student is taking the most courses? Give me the id of the student and the number of courses he or she is taking.

SELECT count(*) ,  student_id FROM Classes GROUP BY student_id ORDER BY count(*) DESC LIMIT 1

Which student is taking the most courses ? Give me the i d of the student and the number of courses he or she is taking .

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


Question: How many cities have a salt lake located in it?

SELECT COUNT(T1.City) FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name WHERE T2.Type = 'salt'

How many cities have a salt lake located in it ?

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


Question: What are the unique labels for the albums?

SELECT count(DISTINCT label) FROM albums

What are the unique labels for the albums ?


Question: Among the orders made by customers in the household segment, how many of them are urgent?

SELECT COUNT(T1.o_orderpriority) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD' AND T1.o_orderpriority = '1-URGENT'

Among the orders made by customers in the household segment , how many of them are urgent ?

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


Question: Among all recipes containing cheese, what is the percentage of recipes with calories greater than 200?

SELECT CAST(SUM(CASE WHEN T4.calories > 200 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id INNER JOIN Nutrition AS T4 ON T4.recipe_id = T1.recipe_id WHERE T3.category = 'cheese'

Among all recipes containing cheese , what is the percentage of recipes with calories greater than 200 ?

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


Question: How many users obtained the "Announcer" badge?

SELECT COUNT(id) FROM badges WHERE Name = 'Announcer'

How many users obtained the " Announcer " badge ?


Question: Retrieve the open and close dates of all the policies associated with the customer whose name contains "Diana"

SELECT t2.date_opened ,  t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name LIKE "%Diana%"

Retrieve the open and close dates of all the policies associated with the customer whose name contains " Diana "

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


Question: Name the races along with its circuit name and location for f1 races hosted in September 2005.

SELECT DISTINCT T2.name, T1.name, T1.location FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.year = 2005 AND STRFTIME('%m', T2.date) = '09'

Name the races along with its circuit name and location for f1 races hosted in September 2005 .

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


Question: What is the name of the coach during whose period of coaching, a team has the most numbers of games won in the post-season games?

SELECT coachID FROM coaches ORDER BY post_wins DESC LIMIT 1

What is the name of the coach during whose period of coaching , a team has the most numbers of games won in the post - season games ?

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


Question: What are all the city names for cities in the USA, ordered by latitude?

SELECT city_name FROM City WHERE country  =  "USA" ORDER BY latitude

What are all the city names for cities in the USA , ordered by latitude ?

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


Question: Among the players from South Africa, provide the players' names who were born in 1984.

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_Id WHERE T2.Country_Name = 'South Africa' AND T1.DOB LIKE '1984%'

Among the players from South Africa , provide the players ' names who were born in 1984 .

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


Question: What are the names of every theater with at least one movie playing?

SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1

What are the names of every theater with at least one movie playing ?

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


Question: How many stars did "Eagle Capital" received from Little Rock on 2013/4/4?

SELECT COUNT(T1.Stars) FROM reviews AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle Capital' AND T2.city = 'Little Rock' AND T1.Date = '2013-04-04'

How many stars did " Eagle Capital " received from Little Rock on 2013/4/4 ?

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


Question: Find the cell mobile number of the candidates whose assessment code is "Fail"?

SELECT T3.cell_mobile_number FROM candidates AS T1 JOIN candidate_assessments AS T2 ON T1.candidate_id = T2.candidate_id JOIN people AS T3 ON T1.candidate_id = T3.person_id WHERE T2.asessment_outcome_code = "Fail"

Find the cell mobile number of the candidates whose assessment code is " Fail " ?

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


Question: For the Ligue 2 game that made the most goals, who is the winner of that game?

SELECT CASE WHEN T1.FTR = 'H' THEN T1.HomeTeam ELSE T1.AwayTeam END WINNER FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Ligue 2' ORDER BY T1.FTAG + T1.FTHG DESC LIMIT 1

For the Ligue 2 game that made the most goals , who is the winner of that game ?

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


Question: How many users have rated 1 each for the UK's second newest movies with a running time of 2?

SELECT COUNT(T2.userid) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'UK' AND T1.runningtime = 2 AND T2.rating = 1 AND T1.year = 2

How many users have rated 1 each for the UK 's second newest movies with a running time of 2 ?

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


Question: What are the codes of warehouses that have more boxes than their capacity?

SELECT T2.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code GROUP BY T2.code HAVING count(*)  >  T2.capacity

What are the codes of warehouses that have more boxes than their capacity ?

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


Question: How many universities have a campus fee greater than the average?

SELECT count(*) FROM csu_fees WHERE campusfee  >  (SELECT avg(campusfee) FROM csu_fees)

How many universities have a campus fee greater than the average ?


Question: How many tracks are in the AAC audio file media type?

SELECT COUNT(*) FROM MEDIATYPE AS T1 JOIN TRACK AS T2 ON T1.MediaTypeId  =  T2.MediaTypeId WHERE T1.Name  =  "AAC audio file"

How many tracks are in the AAC audio file media type ?

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


Question: How many criteria belong to ranking system ID 3?

SELECT COUNT(id) FROM ranking_criteria WHERE ranking_system_id = 3

How many criteria belong to ranking system ID 3 ?

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


Question: How many distinct students have been in detention?

SELECT count(DISTINCT student_id) FROM Students_in_Detention

How many distinct students have been in detention ?

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


Question: Find the names of users whose emails contain ‘superstar’ or ‘edu’.

SELECT name FROM user_profiles WHERE email LIKE '%superstar%' OR email LIKE '%edu%'

Find the names of users whose emails contain ‘ superstar ’ or ‘ edu ’ .

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


Question: Which region does Noah Thompson live in?

SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.first = 'Noah' AND T1.last = 'Thompson'

Which region does Noah Thompson live in ?


Question: What is the care plan description of the prevalent disease with the highest prevalence percentage?

SELECT T4.DESCRIPTION FROM all_prevalences AS T1 INNER JOIN conditions AS T2 ON T2.DESCRIPTION = T1.ITEM INNER JOIN encounters AS T3 ON T2.ENCOUNTER = T3.ID INNER JOIN careplans AS T4 ON T4.ENCOUNTER = T3.ID ORDER BY T1."PREVALENCE PERCENTAGE" DESC LIMIT 1

What is the care plan description of the prevalent disease with the highest prevalence percentage ?

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


Question: What is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008?

SELECT T1.ssn, T1.address FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.DATE = '2008-06-13' AND T2.REASONDESCRIPTION = 'Viral sinusitis (disorder)' AND T2.DESCRIPTION = 'Encounter for symptom'

What is the social security number and address of the patient who encountered viral sinusitis symptoms on 6/13/2008 ?

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


Question: Show minimum, maximum, and average market value for all companies.

SELECT min(market_value) ,  max(market_value) ,  avg(market_value) FROM company

Show minimum , maximum , and average market value for all companies .

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


Question: What was the condition of Elly Koss on 2009/1/8?

SELECT T2.description FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.START = '2009-01-08'

What was the condition of Elly Koss on 2009/1/8 ?

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


Question: Among the actors who starred in the movie Batman, which one of them is the tallest?

SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Batman' ORDER BY T3.`Height (Inches)` DESC LIMIT 1

Among the actors who starred in the movie Batman , which one of them is the tallest ?

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


Question: How many superheroes have blue eyes?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T2.colour = 'Blue'


Question: How many users who are under 30 years old use device model of Galaxy Note 2?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2' AND T1.age < 30

How many users who are under 30 years old use device model of Galaxy Note 2 ?

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


Question: What are the total number of the audiences who visited any of the festivals?

SELECT sum(Num_of_Audience) FROM festival_detail

What are the total number of the audiences who visited any of the festivals ?

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


Question: How many superheroes with blonde hair are there?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.hair_colour_id = T2.id WHERE T2.colour = 'Blond'

How many superheroes with blonde hair are there ?