Question: Calculate the difference in the percentage of members in New Jersey and Vermont.

SELECT CAST((SUM(CASE WHEN T2.state = 'New Jersey' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.state = 'Vermont' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.member_id) AS diff FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip

Calculate the difference in the percentage of members in New Jersey and Vermont .

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


Question: What are the names of the albums that have more than 10 tracks?

SELECT T1.title FROM albums AS T1 JOIN tracks AS T2 ON T1.id = T2.album_id GROUP BY T1.id HAVING count(T1.id)  >  10;

What are the names of the albums that have more than 10 tracks ?

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


Question: Return the different constructors of drivers, ordered by age ascending.

SELECT DISTINCT CONSTRUCTOR FROM driver ORDER BY Age ASC

Return the different constructors of drivers , ordered by age ascending .

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


Question: Find the title, credit, and department name of courses that have more than one prerequisites?

SELECT T1.title ,  T1.credits , T1.dept_name FROM course AS T1 JOIN prereq AS T2 ON T1.course_id  =  T2.course_id GROUP BY T2.course_id HAVING count(*)  >  1

Find the title , credit , and department name of courses that have more than one prerequisites ?

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


Question: How many customers have at least one order with status "Cancelled"?

SELECT count(DISTINCT customer_id) FROM customer_orders WHERE order_status  =  "Cancelled"

How many customers have at least one order with status " Cancelled " ?

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


Question: What is the total enrollment number of all colleges?

What is the total enrollment number of all colleges ?


Question: Return the founded year for the school with the largest enrollment.

SELECT founded FROM university ORDER BY enrollment DESC LIMIT 1

Return the founded year for the school with the largest enrollment .


Question: Who is in charge of the "Santa Monica" territory? Give the full name.

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Santa Monica'

Who is in charge of the " Santa Monica " territory ? Give the full name .

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


Question: What is the email id of clients whose calls were hung?

SELECT T1.email FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.outcome = 'HANG'

What is the email i d of clients whose calls were hung ?

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


Question: Give the title and credits for the course that is taught in the classroom with the greatest capacity.

SELECT T3.title ,  T3.credits FROM classroom AS T1 JOIN SECTION AS T2 ON T1.building  =  T2.building AND T1.room_number  =  T2.room_number JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T1.capacity  =  (SELECT max(capacity) FROM classroom)

Give the title and credits for the course that is taught in the classroom with the greatest capacity .

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


Question: How many planes of Spirit Air Lines took off on 2018/8/7?

SELECT COUNT(T2.Code) FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/7' AND T2.Description = 'Spirit Air Lines: NK'

How many planes of Spirit Air Lines took off on 2018/8/7 ?

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


Question: What is the total weight of all the packages that customer Leo Wong sent?

SELECT sum(T1.Weight) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

What is the total weight of all the packages that customer Leo Wong sent ?

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


Question: What is the ID of the device used by the youngest user?

SELECT device_id FROM gender_age WHERE age = ( SELECT MIN(age) FROM gender_age )

What is the ID of the device used by the youngest user ?


Question: What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956?

SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id  =  t2.campus WHERE t2.year  =  1956 AND totalenrollment_ay  >  400 AND FTE_AY  >  200

What campus had more than 400 total enrollment but more than 200 full time enrollment in year 1956 ?

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


Question: How many non-essential genes are located in the nucleus?

SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID WHERE T2.Localization = 'nucleus' AND T1.Essential = 'Non-Essential'

How many non - essential genes are located in the nucleus ?

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


Question: What are the different instruments listed in the database?

SELECT DISTINCT instrument FROM Instruments

What are the different instruments listed in the database ?


Question: Which position has won the most awards and who is the most recent player that was awarded with an award in that position? Indicate the name of the award and the full name of the player.

SELECT T1.pos, T2.award, T1.nameGiven, T1.lastName FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T2.coachID = T1.coachID GROUP BY T1.pos, T2.award, T1.nameGiven, T1.lastName ORDER BY COUNT(T2.award) LIMIT 1

Which position has won the most awards and who is the most recent player that was awarded with an award in that position ? Indicate the name of the award and the full name of the player .

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


Question: What are the full names and cities of employees who have the letter Z in their first names?

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

What are the full names and cities of employees who have the letter Z in their first names ?

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


Question: What are the forename and surname of the driver who has the smallest laptime?

SELECT T1.forename ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds LIMIT 1

What are the forename and surname of the driver who has the smallest laptime ?

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


Question: How many users have no followers in 2014?

SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year = 2004 AND user_fans LIKE 'None'

How many users have no followers in 2014 ?


Question: List the names of people that are not employed by any company

SELECT Name FROM people WHERE People_ID NOT IN (SELECT People_ID FROM employment)

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


Question: From which city and state does the customer that bought the product with the highest sales?

SELECT T5.City, T5.State FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN people AS T5 ON T5.`Customer ID` = T4.`Customer ID` ORDER BY T2.Sales DESC LIMIT 1

From which city and state does the customer that bought the product with the highest sales ?

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


Question: Calculate the total number of students in universities located in Sweden.

SELECT SUM(T2.num_students) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'Sweden'

Calculate the total number of students in universities located in Sweden .

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


Question: List, by ProductID, all products whose profit, relative to the standard price, is negative.

SELECT DISTINCT ProductID FROM ProductVendor WHERE StandardPrice - LastReceiptCost < 0

List , by ProductID , all products whose profit , relative to the standard price , is negative .

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


Question: Return the category code and typical price of 'cumin'.

SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"

Return the category code and typical price of ' cumin ' .

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


Question: How many times did Yuvraj Singh receive the Man of the Match award?

SELECT SUM(CASE WHEN T2.Player_Name = 'Yuvraj Singh' THEN 1 ELSE 0 END) FROM Match AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match

How many times did Yuvraj Singh receive the Man of the Match award ?

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


Question: Return the average price for each product type.

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

Return the average price for each product type .


Question: What is the average age of clients whose complaint type is "TT"?

SELECT AVG(T1.age) FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T2.type = 'TT'

What is the average age of clients whose complaint type is " TT " ?

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


Question: What is the average duration of trips for the starting station of Santa Clara at Almaden and what is the latitude and longitude of this station?

SELECT AVG(T1.duration), T2.lat, T2.long FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name LEFT JOIN station AS T3 ON T3.name = T1.end_station_name WHERE T1.start_station_name = 'Santa Clara at Almaden'

What is the average duration of trips for the starting station of Santa Clara at Almaden and what is the latitude and longitude of this station ?

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


Question: How many employees live in Georgia?

SELECT count(*) FROM Addresses WHERE state_province_county = "Georgia";


Question: Please indicate the review count of the "active life" businesses in Phoenix.

SELECT COUNT(*) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name = 'Active Life' AND T3.city = 'Phoenix'

Please indicate the review count of the " active life " businesses in Phoenix .

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


Question: What is the total amount of grant money given to each organization and what is its id?

SELECT sum(grant_amount) ,  organisation_id FROM Grants GROUP BY organisation_id

What is the total amount of grant money given to each organization and what is its i d ?

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


Question: How long was the review for business number 2 that user number 612 wrote?

SELECT review_length FROM Reviews WHERE user_id = 612 AND review_stars = 5 AND business_id = 2

How long was the review for business number 2 that user number 612 wrote ?

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


Question: Who was taking charge of orders from Morristown?

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Morristown'

Who was taking charge of orders from Morristown ?


Question: In which states are each of the the properties located?

SELECT DISTINCT T1.county_state_province FROM Addresses AS T1 JOIN Properties AS T2 ON T1.address_id  =  T2.property_address_id;

In which states are each of the the properties located ?


Question: Show all locations where a gas station for company with market value greater than 100 is located.

SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.market_value  >  100

Show all locations where a gas station for company with market value greater than 100 is located .

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


Question: What are the email addresses and date of births for all customers who have a first name of Carole?

SELECT email_address ,  date_of_birth FROM Customers WHERE first_name = "Carole"

What are the email addresses and date of births for all customers who have a first name of Carole ?

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


Question: What are the names of counties that do not contain any cities?

SELECT Name FROM county_public_safety WHERE County_ID NOT IN (SELECT County_ID FROM city)

What are the names of counties that do not contain any cities ?

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


Question: What product has the fewest online orders from one customer? List the product's class, line of business, and list price.

SELECT T2.Class, T2.ProductLine, T2.ListPrice FROM ShoppingCartItem AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY SUM(Quantity) LIMIT 1

What product has the fewest online orders from one customer ? List the product 's class , line of business , and list price .

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


Question: How many cities are there that have more than 3 airports?

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

How many cities are there that have more than 3 airports ?

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


Question: Find the author, rating and review creation date of review for podcast title 'In The Thick'.

SELECT T2.author_id, T2.rating, T2.created_at FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'In The Thick' GROUP BY T2.author_id, T2.rating, T2.created_at

Find the author , rating and review creation date of review for podcast title ' In The Thick ' .

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


Question: What are the headquarters that have both a company in the banking and 'oil and gas' industries?

SELECT headquarters FROM company WHERE main_industry  =  'Banking' INTERSECT SELECT headquarters FROM company WHERE main_industry  =  'Oil and gas'

What are the headquarters that have both a company in the banking and ' oil and gas ' industries ?

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


Question: What is the number of State Province of France that doesn't have a State Province Code?

SELECT T1.CountryRegionCode FROM StateProvince AS T1 INNER JOIN CountryRegion AS T2 ON T1.CountryRegionCode = T2.CountryRegionCode WHERE T2.Name = 'France' AND T1.IsOnlyStateProvinceFlag = 1

What is the number of State Province of France that does n't have a State Province Code ?

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


Question: Find the names of schools that have more than one donator with donation amount above 8.5.

SELECT T2.School_name FROM endowment AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.amount  >  8.5 GROUP BY T1.school_id HAVING count(*)  >  1

Find the names of schools that have more than one donator with donation amount above 8.5 .

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


Question: What is the name of the airline that flew the most flights to Chicago Midway International?

SELECT T3.Description FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T1.Description = 'Chicago, IL: Chicago Midway International' AND T2.DEST = 'MDW' GROUP BY T3.Description ORDER BY COUNT(T3.Description) DESC LIMIT 1

What is the name of the airline that flew the most flights to Chicago Midway International ?

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


Question: What type of political party Sherrod Brown has in 2005?

SELECT T1.party FROM `current-terms` AS T1 INNER JOIN current AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name = 'Sherrod' AND T2.last_name = 'Brown' AND T1.start LIKE '%2005%'

What type of political party Sherrod Brown has in 2005 ?

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


Question: State the name of research postgraduate student among Professor Zhihua Zhou's research assistants.

SELECT T3.f_name, T3.l_name FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T1.first_name = 'Zhihua' AND T3.type = 'RPG' AND T1.last_name = 'Zhou'

State the name of research postgraduate student among Professor Zhihua Zhou 's research assistants .

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


Question: Give the districts which have two or more addresses.

SELECT district FROM address GROUP BY district HAVING count(*)  >=  2

Give the districts which have two or more addresses .


Question: List all owner of documents that is related to documents owned by Braeden.

SELECT DISTINCT OWNER FROM Document_Subset_Members AS T1 JOIN Document_Objects AS T2 ON T1.Related_Document_Object_ID  =  T2.Document_Object_ID WHERE T2.Owner  =  'Braeden';

List all owner of documents that is related to documents owned by Braeden .

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


Question: Name the horror movies with positive ratings greater than 7.

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

Name the horror movies with positive ratings greater than 7 .

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


Question: What are the names of the venues in Abu Dhabi?

SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id WHERE T2.City_Name = 'Abu Dhabi'

What are the names of the venues in Abu Dhabi ?

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


Question: How many degrees were conferred at San Jose State University in 2000?

SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND t2.year  =  2000

How many degrees were conferred at San Jose State University in 2000 ?

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


Question: On what date were the most events logged on devices for 40-year-old male users?

SELECT T.timestamp FROM ( SELECT T2.timestamp, COUNT(T2.event_id) AS num FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'M' AND T1.age = 40 GROUP BY T2.timestamp ) AS T ORDER BY T.num DESC LIMIT 1

On what date were the most events logged on devices for 40 - year - old male users ?

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


Question: Show the average price range of hotels that have 5 star ratings and allow pets.

SELECT avg(price_range) FROM HOTELS WHERE star_rating_code  =  "5" AND pets_allowed_yn  =  1

Show the average price range of hotels that have 5 star ratings and allow pets .

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


Question: What are the different positions for match season?

SELECT DISTINCT POSITION FROM match_season

What are the different positions for match season ?


Question: Calculate the average home team goal in the 2010/2011 season in the country of Poland.

SELECT CAST(SUM(t2.home_team_goal) AS REAL) / COUNT(t2.id) FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id WHERE t1.name = 'Poland' AND t2.season = '2010/2011'

Calculate the average home team goal in the 2010/2011 season in the country of Poland .

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


Question: Gives the home page of the conference where the paper "Increasing the Concurrency in Estelle" is presented.

SELECT DISTINCT T2.HomePage FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Title = 'Increasing the Concurrency in Estelle'

Gives the home page of the conference where the paper " Increasing the Concurrency in Estelle " is presented .

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


Question: What is the percentage of restaurants that serve American food in Dublin city?

SELECT CAST(SUM(IIF(food_type = 'american food', 1, 0)) AS REAL) * 100 / COUNT(id_restaurant) FROM generalinfo WHERE city = 'dublin'

What is the percentage of restaurants that serve American food in Dublin city ?

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


Question: What is the age of the youngest female device user?

SELECT MIN(age) FROM gender_age WHERE gender = 'F'

What is the age of the youngest female device user ?


Question: What is the full name of the employee that inspected establishments with license 1334073?

SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.license_no = 1334073

What is the full name of the employee that inspected establishments with license 1334073 ?

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


Question: Show all book isbns and the numbers of orders for each.

SELECT isbn ,  count(*) FROM Books_Order GROUP BY isbn

Show all book isbns and the numbers of orders for each .

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


Question: How many activities do we have?


Question: Find the percentage of products that were shipped from Burbank in 2018?

SELECT CAST(SUM(CASE WHEN T3.`City Name` = 'Burbank' THEN T2.`Order Quantity` ELSE 0 END) AS REAL) * 100 / SUM(T2.`Order Quantity`) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T2.OrderDate LIKE '%/%/18'

Find the percentage of products that were shipped from Burbank in 2018 ?


Question: Which Payments were processed with Visa? List the payment Id, the date and the amount.

SELECT Payment_ID ,  Date_Payment_Made ,  Amount_Payment FROM Payments WHERE Payment_Method_Code  =  'Visa'

Which Payments were processed with Visa ? List the payment I d , the date and the amount .

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


Question: In what year did the episodes titled DWB get an award?

SELECT DISTINCT T1.year FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.title = 'DWB' AND T1.result = 'Winner'

In what year did the episodes titled DWB get an award ?

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


Question: How many songs have a shared vocal?

SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "shared"


Question: Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department.

SELECT name FROM instructor WHERE salary  >  (SELECT max(salary) FROM instructor WHERE dept_name  =  'Biology')

Find the names of all instructors whose salary is greater than the salary of all instructors in the Biology department .

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


Question: Which country has the least number of suppliers?

SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey GROUP BY T1.s_nationkey ORDER BY COUNT(T1.s_name) LIMIT 1

Which country has the least number of suppliers ?


Question: What are the distinct name, location and products of the enzymes which has any 'inhibitor' interaction?

SELECT DISTINCT T1.name ,  T1.location ,  T1.product FROM enzyme AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.enzyme_id  =  T1.id WHERE T2.interaction_type  =  'inhibitor'

What are the distinct name , location and products of the enzymes which has any ' inhibitor ' interaction ?

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


Question: What are the code and description of the most frequent behavior incident type?

SELECT T1.incident_type_code ,  T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code  =  T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY count(*) DESC LIMIT 1

What are the code and description of the most frequent behavior incident type ?

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


Question: Please list the lowest three eligible free rates for students aged 5-17 in continuation schools.

SELECT `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` FROM frpm WHERE `Educational Option Type` = 'Continuation School' AND `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` IS NOT NULL ORDER BY `Free Meal Count (Ages 5-17)` / `Enrollment (Ages 5-17)` ASC LIMIT 3

Please list the lowest three eligible free rates for students aged 5 - 17 in continuation schools .

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


Question: Mention the series code of countries using Hong Kong dollar as their currency unit.

SELECT T2.SeriesCode FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.CurrencyUnit = 'Hong Kong dollar'

Mention the series code of countries using Hong Kong dollar as their currency unit .

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


Question: Count the number of customers who have not made an order.

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

Count the number of customers who have not made an order .


Question: How many distinct locations of perpetrators are there?

SELECT count(DISTINCT LOCATION) FROM perpetrator

How many distinct locations of perpetrators are there ?


Question: What is the id of Rio de Janeiro?

SELECT id FROM city WHERE city_name = 'Rio de Janeiro'

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


Question: Find the names of states that have some college students playing in the mid position but not in the goalie position.

SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie'

Find the names of states that have some college students playing in the mid position but not in the goalie position .

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


Question: Please list all the customers that have Steve Patterson as their sales representitive.

SELECT t1.customerName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'Steve' AND t2.lastName = 'Patterson'

Please list all the customers that have Steve Patterson as their sales representitive .

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


Question: Among all chemical compounds identified in the database, what percent of compounds form a triple-bond.

SELECT CAST(COUNT(CASE WHEN T.bond_type = '#' THEN T.bond_id ELSE NULL END) AS REAL) * 100 / COUNT(T.bond_id) FROM bond AS T

Among all chemical compounds identified in the database , what percent of compounds form a triple - bond .

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


Question: Complaint about Credit Card mostly came from clients of which age group?

SELECT SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END), SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adult , SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elder FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.Product = 'Credit card'

Complaint about Credit Card mostly came from clients of which age group ?

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


Question: Name all the list titles created by user 4208563.

SELECT list_title FROM lists WHERE user_id LIKE 4208563

Name all the list titles created by user 4208563 .

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


Question: What is the name of the most recently founded organization in Saudi Arabia?

SELECT T1.Name FROM organization AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Saudi Arabia' ORDER BY T1.Established DESC LIMIT 1

What is the name of the most recently founded organization in Saudi Arabia ?

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


Question: How many distinct complaint type codes are there in the database?

SELECT count(DISTINCT complaint_type_code) FROM complaints

How many distinct complaint type codes are there in the database ?

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


Question: What are the distinct publishers of publications with price higher than 5000000?

SELECT DISTINCT Publisher FROM publication WHERE Price  >  5000000

What are the distinct publishers of publications with price higher than 5000000 ?

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


Question: Compute the average time in minute for each age group

SELECT CAST(SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 13 AND T1.age <= 19 THEN 1 ELSE 0 END) AS teenagerAverageMins, CAST(SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 19 AND T1.age <= 65 THEN 1 ELSE 0 END) AS adultAverageMins , CAST(SUM(CASE WHEN T1.age > 65 THEN 60 * strftime('%H', ser_time) + strftime('%M', ser_time) + strftime('%S', ser_time) / 60 ELSE 0 END) AS REAL) / SUM(CASE WHEN T1.age > 65 THEN 1 ELSE 0 END) AS elderAverageMins FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client`


Question: List all the junior senators in 1997.

SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.start LIKE '1997%' AND T2.state_rank = 'junior'


Question: Which districts have transactions greater than USS$10,000 in 1997?

SELECT T1.district_id FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T1.account_id = T3.account_id WHERE STRFTIME('%Y', T3.date) = '1997' GROUP BY T1.district_id HAVING SUM(T3.amount) > 10000

Which districts have transactions greater than USS$10,000 in 1997 ?

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


Question: Which institution has the most papers? Find the name of the institution.

SELECT t1.name FROM inst AS t1 JOIN authorship AS t2 ON t1.instid  =  t2.instid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.name ORDER BY count(*) DESC LIMIT 1

Which institution has the most papers ? Find the name of the institution .

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


Question: List the id, country, city and name of the airports ordered alphabetically by the name.

SELECT id ,  country ,  city ,  name FROM airport ORDER BY name

List the i d , country , city and name of the airports ordered alphabetically by the name .

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


Question: State the sex and birthday of patient ID '163109'. When was the examination taken and what symptom does the patient had.

SELECT T1.SEX, T1.Birthday, T2.`Examination Date`, T2.Symptoms FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.ID = 163109

State the sex and birthday of patient ID ' 163109 ' . When was the examination taken and what symptom does the patient had .

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


Question: Provide the page IDs and name of the menu which had the highest page count.

SELECT T1.page_number, T2.name FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id ORDER BY T2.page_count DESC LIMIT 1

Provide the page IDs and name of the menu which had the highest page count .

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


Question: What percentage of elderly customers who are never married in the place with geographic ID 24?

SELECT CAST(SUM(CASE WHEN T1.MARITAL_STATUS = 'never married' THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.GEOID = 24

What percentage of elderly customers who are never married in the place with geographic ID 24 ?

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


Question: How much more was customer 7 consuming in April 2013 than customer 5?

SELECT SUM(IIF(CustomerID = 7, Consumption, 0)) - SUM(IIF(CustomerID = 5, Consumption, 0)) FROM yearmonth WHERE Date = '201304'

How much more was customer 7 consuming in April 2013 than customer 5 ?

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


Question: What is the total number of runs scored by the batsmen during the 2nd inning of the match ID 335988?

SELECT SUM(Runs_Scored) FROM Batsman_Scored WHERE Match_Id = 335988 AND Innings_No = 2

What is the total number of runs scored by the batsmen during the 2nd inning of the match ID 335988 ?

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


Question: What is the total quantity of "Telescoping Adjustable Floor Lamp" ordered from central superstores?

SELECT SUM(T1.Quantity) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Telescoping Adjustable Floor Lamp'

What is the total quantity of " Telescoping Adjustable Floor Lamp " ordered from central superstores ?

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


Question: Please show different denominations and the corresponding number of schools.

SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination

Please show different denominations and the corresponding number of schools .


Question: How many number of donations did the project 'A Rug For Reaching Readers' get?

SELECT SUM(T2.donation_total) FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T1.title LIKE 'A Rug For Reaching Readers'

How many number of donations did the project ' A Rug For Reaching Readers ' get ?

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


Question: How many rooms in each building have a capacity of over 50?

SELECT count(*) ,  building FROM classroom WHERE capacity  >  50 GROUP BY building

How many rooms in each building have a capacity of over 50 ?

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


Question: What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding?

SELECT CAST(SUM(CASE WHEN FundingType = 'Locally funded' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN FundingType != 'Locally funded' THEN 1 ELSE 0 END) FROM schools WHERE County = 'Santa Clara' AND Charter = 1

What is the ratio in percentage of Santa Clara County schools that are locally funded compared to all other types of charter school funding ?

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


Question: Find the details of the customer who has used services the most times.

SELECT t1.customer_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_details ORDER BY count(*) DESC LIMIT 1

Find the details of the customer who has used services the most times .

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


Question: How many compliments received from medium users that Phoenix city achieved?

SELECT COUNT(T1.number_of_compliments) FROM Users_Compliments AS T1 INNER JOIN Reviews AS T2 ON T1.user_id = T2.user_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.city LIKE 'Phoenix' AND T1.number_of_compliments LIKE 'Medium'

How many compliments received from medium users that Phoenix city achieved ?

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


Question: Where was the ID 336005 match held? Please give me the venue and the city.

SELECT T2.Venue_Name, T3.City_Name FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id INNER JOIN City AS T3 ON T2.City_Id = T3.City_Id WHERE T1.Match_Id = '336005'

Where was the ID 336005 match held ? Please give me the venue and the city .

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


Question: Identify the total weight of shipments transported to San Mateo, California, in 2016.

SELECT SUM(T1.weight) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.city_name = 'San Mateo' AND STRFTIME('%Y', T1.ship_date) = '2016'

Identify the total weight of shipments transported to San Mateo , California , in 2016 .

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


Question: For each type, how many ships are there?

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

For each type , how many ships are there ?


Question: What are the first and last names of all customers with between 1000 and 3000 dollars outstanding?

SELECT first_name ,  last_name FROM Customers WHERE amount_outstanding BETWEEN 1000 AND 3000;

What are the first and last names of all customers with between 1000 and 3000 dollars outstanding ?

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


Question: How many sanitarian employees in Chicago are from the zip code 60617?

SELECT COUNT(employee_id) FROM employee WHERE zip = '60617'

How many sanitarian employees in Chicago are from the zip code 60617 ?

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


Question: Please list the texts of all the tweets posted from Buenos Aires with a positive sentiment.

SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Sentiment > 0 AND T2.City = 'Buenos Aires'

Please list the texts of all the tweets posted from Buenos Aires with a positive sentiment .

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


Question: What is the percentage of Harvard university's international students in 2011?

SELECT T1.pct_international_students FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year = 2011 AND T2.university_name = 'Harvard University'

What is the percentage of Harvard university 's international students in 2011 ?

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


Question: Among the countries that use Bosnian as their language, how many of them don't have a positive population growth rate?

SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country INNER JOIN population AS T3 ON T3.Country = T2.Country WHERE T2.Name = 'Bosnian' AND T3.Population_Growth < 0

Among the countries that use Bosnian as their language , how many of them do n't have a positive population growth rate ?

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


Question: Which make does the most drivers have?

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


Question: Write down the description and series code of Benin in year 2005.

SELECT T2.Description, T2.Seriescode FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.TableName = 'Benin' AND T2.Year = 'YR2005'

Write down the description and series code of Benin in year 2005 .

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


Question: How many cities are there in state "Colorado"?

SELECT count(*) FROM addresses WHERE state_province_county  =  "Colorado"

How many cities are there in state " Colorado " ?


Question: How many professors teach a class with the code ACCT-211?

SELECT count(DISTINCT PROF_NUM) FROM CLASS WHERE CRS_CODE  =  "ACCT-211"

How many professors teach a class with the code ACCT-211 ?

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


Question: What are the phone numbers for each employee?

What are the phone numbers for each employee ?


Question: What are the id of problems reported by the staff named Dameon Frami or Jolie Weber?

SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Dameon" AND T2.staff_last_name = "Frami" UNION SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Jolie" AND T2.staff_last_name = "Weber"

What are the i d of problems reported by the staff named Dameon Frami or Jolie Weber ?

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


Question: How many product names does the supplier Exotic Liquids have?

SELECT COUNT(T1.ProductName) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids'

How many product names does the supplier Exotic Liquids have ?

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


Question: Calculate the ratio between unemployed students and disabled students.

SELECT CAST(( SELECT COUNT(name) FROM unemployed ) AS REAL ) / ( SELECT COUNT(name) FROM disabled )

Calculate the ratio between unemployed students and disabled students .


Question: List the position of players with average number of points scored by players of that position bigger than 20.

SELECT POSITION FROM player GROUP BY name HAVING avg(Points)  >=  20

List the position of players with average number of points scored by players of that position bigger than 20 .

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


Question: List all bounding box widths and heights of object sample ID 2.

SELECT W, H FROM IMG_OBJ WHERE OBJ_SAMPLE_ID = 2

List all bounding box widths and heights of object sample ID 2 .

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


Question: Name the cast members of the movie 'African Egg'.

SELECT T2.first_name, T2.last_name FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T1.film_id = T3.film_id WHERE T3.title = 'AFRICAN EGG'

Name the cast members of the movie ' African Egg ' .

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


Question: What are the names of the characters voiced by Frank Welker?

SELECT character FROM `voice-actors` WHERE 'voice-actor' = 'Frank Welker'

What are the names of the characters voiced by Frank Welker ?

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


Question: Who is the person associated with the crew id 1325273?

SELECT person_name FROM person WHERE person_id = 1325273

Who is the person associated with the crew i d 1325273 ?


Question: Which district has the most accounts with loan contracts finished with no problems?

SELECT T1.A2 FROM District AS T1 INNER JOIN Account AS T2 ON T1.District_id = T2.District_id INNER JOIN Loan AS T3 ON T2.Account_id = T3.Account_id WHERE T3.status = 'A' GROUP BY T1.District_id ORDER BY COUNT(T2.Account_id) DESC LIMIT 1

Which district has the most accounts with loan contracts finished with no problems ?

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


Question: How many customers have no payment histories?

SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payments );

How many customers have no payment histories ?


Question: What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6?

SELECT SUBSTR(T.bond_id, 1, 7) AS atom_id1 , T.molecule_id || SUBSTR(T.bond_id, 8, 2) AS atom_id2 FROM bond AS T WHERE T.molecule_id = 'TR001' AND T.bond_id = 'TR001_2_6'

What are the atoms that are bonded in the molecule TR001 with the bond ID of TR001_2_6 ?

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


Question: How many Catalan-language Wikipedia pages are there overall?

SELECT pages FROM langs WHERE lang = 'ca'

How many Catalan - language Wikipedia pages are there overall ?


Question: Find the names of products that were bought by at least two distinct customers.

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

Find the names of products that were bought by at least two distinct customers .

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


Question: What is the denomination of the school the most players belong to?

SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1

What is the denomination of the school the most players belong to ?

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


Question: What is the primary conference of the school that has the lowest acc percent score in the competition?

SELECT t1.Primary_conference FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t2.acc_percent LIMIT 1

What is the primary conference of the school that has the lowest acc percent score in the competition ?

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


Question: Give the student's last name that gave the highest student satisfaction for the course "Intro to Database 2".

SELECT T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Intro to Database 2' ORDER BY T2.sat DESC LIMIT 1

Give the student 's last name that gave the highest student satisfaction for the course " Intro to Database 2 " .

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


Question: List all names of drivers in descending alphabetical order.

SELECT Driver_Name FROM driver ORDER BY Driver_Name DESC

List all names of drivers in descending alphabetical order .


Question: Among the incidents in January, 2018, how many of them were stated "against Property" in the FBI classification?

SELECT SUM(CASE WHEN SUBSTR(T2.date, 5, 4) = '2018' THEN 1 ELSE 0 END) FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no WHERE T1.crime_against = 'Property' AND SUBSTR(T2.date, 1, 1) = '1'

Among the incidents in January , 2018 , how many of them were stated " against Property " in the FBI classification ?

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


Question: For each zip code, how many times has the maximum wind speed reached 25 mph?

SELECT zip_code , count(*) FROM weather WHERE max_wind_Speed_mph  >=  25 GROUP BY zip_code

For each zip code , how many times has the maximum wind speed reached 25 mph ?

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


Question: How many courses are there in total?


Question: Return the names of tracks that have no had any races.

SELECT name FROM track WHERE track_id NOT IN (SELECT track_id FROM race)

Return the names of tracks that have no had any races .

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


Question: List all students' first names and last names who majored in 600.

SELECT Fname , Lname FROM Student WHERE Major  =  600;

List all students ' first names and last names who majored in 600 .

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


Question: What is the unique id of every painter who had a medium oil painting displayed at gallery 240?

SELECT DISTINCT painterID FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 240"

What is the unique i d of every painter who had a medium oil painting displayed at gallery 240 ?

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


Question: What is the venue name of Bandladore?

SELECT T1.Venue_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_ID = T2.City_ID WHERE T2.City_Name = 'Bangalore'


Question: What is the average width and height of the objects in image ID 47? List their object classes as well.

SELECT T2.OBJ_CLASS, AVG(T1.W), AVG(T1.H) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 47 GROUP BY T2.OBJ_CLASS

What is the average width and height of the objects in image ID 47 ? List their object classes as well .

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


Question: List the name of the shop with the latest open year.

SELECT Shop_Name FROM shop ORDER BY Open_Year DESC LIMIT 1

List the name of the shop with the latest open year .

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


Question: In which buildings are there at least ten professors?

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

In which buildings are there at least ten professors ?


Question: What are the different developers of games that are played by players that attend Auburn college?

SELECT DISTINCT T1.Developers FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.College  =  "Auburn"

What are the different developers of games that are played by players that attend Auburn college ?

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


Question: Provide Speedy Express's phone number and number of shipped orders on 30th January, 1998.

SELECT T2.Phone, COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Speedy Express' AND T1.ShippedDate LIKE '1998-01-30%' GROUP BY T2.Phone

Provide Speedy Express 's phone number and number of shipped orders on 30th January , 1998 .

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


Question: For each gender, return the gender code and the number of students who identify as that gender.

SELECT Gender_MFU ,  COUNT(*) FROM Students GROUP BY Gender_MFU

For each gender , return the gender code and the number of students who identify as that gender .

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


Question: What is the name and open year for the branch with most number of memberships registered in 2016?

SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1

What is the name and open year for the branch with most number of memberships registered in 2016 ?

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


Question: List down the names of platform where the games released in 2016 can be played on.

SELECT DISTINCT T1.platform_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id WHERE T2.release_year = 2016

List down the names of platform where the games released in 2016 can be played on .

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


Question: What are the different main industries for all companies?

SELECT DISTINCT main_industry FROM company

What are the different main industries for all companies ?


Question: Among the posts with views ranging from 100 to 150, what is the comment with the highest score?

SELECT Text FROM comments WHERE PostId IN ( SELECT Id FROM posts WHERE ViewCount BETWEEN 100 AND 150 ) ORDER BY Score DESC LIMIT 1

Among the posts with views ranging from 100 to 150 , what is the comment with the highest score ?

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


Question: Among all the users who use a vivo device, what is the age of the youngest user?

SELECT T1.age FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' ORDER BY T1.age LIMIT 1

Among all the users who use a vivo device , what is the age of the youngest user ?

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


Question: What are the ids, names and popularity of the participants, order by the number of songs they perform?

SELECT T1.id ,  T1.Name ,  T1.popularity FROM participants AS T1 JOIN performance_score AS T2 ON T2.participant_id  =  T1.id GROUP BY T1.id ORDER BY count(*)

What are the ids , names and popularity of the participants , order by the number of songs they perform ?

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


Question: What are the names and ids of all sailors who have a rating of at least 3 and reserved a boat?

SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE  T1.rating  >  2

What are the names and ids of all sailors who have a rating of at least 3 and reserved a boat ?

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


Question: Show me the classrooms grade 5 is using.

SELECT DISTINCT classroom FROM list WHERE grade  =  5

Show me the classrooms grade 5 is using .

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


Question: Find the name of persons who are friends with Alice for the shortest years.

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

Find the name of persons who are friends with Alice for the shortest years .

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


Question: What is the price of Chevrolet Vega 2300?

SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet vega 2300'

What is the price of Chevrolet Vega 2300 ?

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


Question: How many playoffs did Per Mars participate in?

SELECT SUM(T2.GP) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.PlayerName = 'Per Mars' AND T2.GAMETYPE = 'Playoffs'

How many playoffs did Per Mars participate in ?


Question: Find all the services that has been used by the customer with details "Hardy Kutch".

SELECT t3.service_details FROM customers AS t1 JOIN customers_and_services AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t1.customer_details  =  "Hardy Kutch"

Find all the services that has been used by the customer with details " Hardy Kutch " .

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


Question: How many matches did Team 10 play in 2012?

SELECT SUM(CASE WHEN Team_1 = 10 OR Team_2 = 10 THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2012'

How many matches did Team 10 play in 2012 ?

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


Question: What is the owner's display name of the most popular post?

SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts ORDER BY ViewCount DESC LIMIT 1 )

What is the owner 's display name of the most popular post ?

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


Question: Write the messages of those who donated to the Newark School District in the coordinates of 40.735332, -74.196014.

SELECT T1.donation_message FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_latitude = 40.735332 AND T2.school_longitude = -74.196014 AND T2.school_district = 'Newark School District'

Write the messages of those who donated to the Newark School District in the coordinates of 40.735332 , -74.196014 .

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


Question: Describe the names of neutral alignment superheroes.

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'

Describe the names of neutral alignment superheroes .


Question: What is the closing time of business id 4 on Sunday?

SELECT T2.closing_time FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday' AND T2.business_id = 4

What is the closing time of business i d 4 on Sunday ?

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


Question: How many papers did each author publish, ordered by number of papers?

SELECT T1.name ,  count(*) FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id ORDER BY count(*) DESC

How many papers did each author publish , ordered by number of papers ?

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


Question: List down at least five publishers of the games with number of sales less than 10000.

SELECT T.publisher_name FROM ( SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' AND T2.num_sales * 100000 < 10000 LIMIT 5 ) t

List down at least five publishers of the games with number of sales less than 10000 .

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


Question: Find the number of baseball ordered in December 2017.

SELECT COUNT(T2.OrderNumber) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Baseball' AND T2.OrderDate LIKE '12/%/18'

Find the number of baseball ordered in December 2017 .


Question: Which counties have two or more delegates? Give me the county names.

SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District GROUP BY T1.County_id HAVING COUNT(*)  >=  2

Which counties have two or more delegates ? Give me the county names .

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


Question: Please list the names of the players whose volley score and dribbling score are over 70.

SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.volleys > 70 AND t2.dribbling > 70

Please list the names of the players whose volley score and dribbling score are over 70 .

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


Question: How many times does M Chinnaswamy Stadium host games than Maharashtra Cricket Association Stadium?

SELECT SUM(CASE WHEN T2.Venue_Name = 'M Chinnaswamy Stadium' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.Venue_Name = 'Maharashtra Cricket Association Stadium' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Venue AS T2 ON T1.Venue_Id = T2.Venue_Id

How many times does M Chinnaswamy Stadium host games than Maharashtra Cricket Association Stadium ?

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


Question: How many products using "roadster_black_small.gif" as the thumbnail photo?

SELECT COUNT(DISTINCT T2.ProductID) FROM ProductPhoto AS T1 INNER JOIN ProductProductPhoto AS T2 ON T1.ProductPhotoID = T2.ProductPhotoID WHERE T1.LargePhotoFileName = 'roadster_black_large.gif'

How many products using " roadster_black_small.gif " as the thumbnail photo ?


Question: Identify the full name of the driver who delivered a shipment to the city of New York in February 2016.

SELECT T3.first_name, T3.last_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T2.city_name = 'New York' AND T1.ship_date LIKE '2016-02%'

Identify the full name of the driver who delivered a shipment to the city of New York in February 2016 .

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


Question: Give the price of the Monitor product.

SELECT product_price FROM Products WHERE product_name  =  "Monitor"


Question: What is the name style of the employee with the lowest pay rate?

SELECT T2.NameStyle FROM EmployeePayHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.Rate IS NOT NULL ORDER BY T1.Rate ASC LIMIT 1

What is the name style of the employee with the lowest pay rate ?

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


Question: List down all of the film titles that are rated for general audiences.

SELECT title FROM film WHERE rating = 'G'

List down all of the film titles that are rated for general audiences .

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


Question: List the names of all courses ordered by their titles and credits.

SELECT title FROM course ORDER BY title ,  credits

List the names of all courses ordered by their titles and credits .

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


Question: Who voiced the villain in "The Rescuers"?

SELECT T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T2.movie_title = T1.movie WHERE T2.movie_title = 'The Rescuers' AND T1.character = T2.villian

Who voiced the villain in " The Rescuers " ?

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


Question: Among all the menu pages with the appearance of the dish "Clear green turtle", how many of them have the dish at a stable price?

SELECT SUM(CASE WHEN T1.name = 'Clear green turtle' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL

Among all the menu pages with the appearance of the dish " Clear green turtle " , how many of them have the dish at a stable price ?

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


Question: Which book series contain both books with sale amount above 1000 and books with sale amount below 500?

SELECT book_series FROM book WHERE sale_amount  >  1000 INTERSECT SELECT book_series FROM book WHERE sale_amount  <  500

Which book series contain both books with sale amount above 1000 and books with sale amount below 500 ?

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


Question: What are the first names of all students that are not enrolled in courses?

SELECT Fname FROM STUDENT WHERE StuID NOT IN (SELECT StuID FROM ENROLLED_IN)

What are the first names of all students that are not enrolled in courses ?

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


Question: List the over IDs, ball IDs, and innings numbers of the match ID "336004" while the batsman got the maximum scores.

SELECT Over_Id, Ball_Id, Innings_No FROM Batsman_Scored WHERE Match_Id = 336004 ORDER BY Runs_Scored DESC LIMIT 1

List the over IDs , ball IDs , and innings numbers of the match ID " 336004 " while the batsman got the maximum scores .

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


Question: For the movies in English that are the oldest, how many of them have the lowest rating?

SELECT COUNT(DISTINCT T1.movieid) FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.year = 1 AND T2.rating = 1 AND T1.isEnglish = 'T'

For the movies in English that are the oldest , how many of them have the lowest rating ?

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


Question: find the name of people whose height is lower than the average.

SELECT name FROM people WHERE height  <  (SELECT avg(height) FROM people)

find the name of people whose height is lower than the average .

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


Question: How many territories are there?

SELECT COUNT(TerritoryID) FROM Territories


Question: In which cities are the customers of Costa Rica located?

SELECT T1.city FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T2.country_name = 'Costa Rica'

In which cities are the customers of Costa Rica located ?

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


Question: Please give the first name and phone number of the client whose complaint id is CR0922485.

SELECT T1.first, T1.phone FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0922485'

Please give the first name and phone number of the client whose complaint i d is CR0922485 .

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


Question: How many customers have an employee who reports to William Patterson as their sales representitive?

SELECT COUNT(t1.customerNumber) FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t2.firstName = 'William' AND t2.lastName = 'Patterson'

How many customers have an employee who reports to William Patterson as their sales representitive ?

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


Question: What are the distinct billing countries of the invoices?

SELECT distinct(BillingCountry) FROM INVOICE

What are the distinct billing countries of the invoices ?


Question: What are the customer ids of customers who have at least 15 receipts?

SELECT CustomerId FROM receipts GROUP BY CustomerId HAVING count(*)  >=  15

What are the customer ids of customers who have at least 15 receipts ?

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


Question: How many papers are written by authors from the institution "University of Pennsylvania"?

SELECT count(DISTINCT t1.title) FROM papers AS t1 JOIN authorship AS t2 ON t1.paperid  =  t2.paperid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t3.name  =  "University of Pennsylvania"

How many papers are written by authors from the institution " University of Pennsylvania " ?

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


Question: For the goalies whose weight are above 190, who had most goal againsts in 1978 season?

SELECT T1.playerID FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = '1978' AND T2.weight > 190 ORDER BY T1.GA DESC LIMIT 1

For the goalies whose weight are above 190 , who had most goal againsts in 1978 season ?

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


Question: Name the object class of the image with a bounding (422, 63, 77, 363).

SELECT T2.OBJ_CLASS FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.X = 422 AND T1.Y = 63 AND T1.W = 77 AND T1.H = 363

Name the object class of the image with a bounding ( 422 , 63 , 77 , 363 ) .

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


Question: How many employees have certificate.

SELECT count(DISTINCT eid) FROM Certificate


Question: What is the most popular movie directed by Ron Clements?

SELECT T2.name FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T2.name = T1.movie_title WHERE T2.director = 'Ron Clements' ORDER BY CAST(REPLACE(SUBSTR(total_gross, 2), ',', '') AS int) DESC LIMIT 1

What is the most popular movie directed by Ron Clements ?

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


Question: Find the names of all the customers and staff members.

SELECT customer_details FROM customers UNION SELECT staff_details FROM staff

Find the names of all the customers and staff members .


Question: What is the average coldest temperature for the zip code of 94301 and what stations are within the zip code? Include the latitude and longitude as well.

SELECT AVG(T3.min_temperature_f), T1.long, T1.lat FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name INNER JOIN weather AS T3 ON T3.zip_code = T2.zip_code WHERE T3.zip_code = 94301

What is the average coldest temperature for the zip code of 94301 and what stations are within the zip code ? Include the latitude and longitude as well .

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


Question: What is the name of tags used by John Salvatier's?

SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T2.PostId = T3.Id WHERE T1.DisplayName = 'John Salvatier'

What is the name of tags used by John Salvatier 's ?

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


Question: Give the country where St. George's Park is located.

SELECT T3.Country_Name FROM Venue AS T1 INNER JOIN City AS T2 ON T2.City_Id = T1.City_Id INNER JOIN Country AS T3 ON T3.Country_Id = T2.Country_id WHERE T1.Venue_Name = 'St George''s Park'

Give the country where St. George 's Park is located .

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


Question: Find the name of the swimmer who has the most records.

SELECT t1.name FROM swimmer AS t1 JOIN record AS t2 ON t1.id  =  t2.swimmer_id GROUP BY t2.swimmer_id ORDER BY count(*) DESC LIMIT 1

Find the name of the swimmer who has the most records .

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


Question: How many "Good for Kids" Yelp_Businesses are open everyday of the week?

SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business_Attributes AS T3 ON T1.business_id = T3.business_id INNER JOIN Attributes AS T4 ON T4.attribute_id = T4.attribute_id WHERE T2.day_id IN (1, 2, 3, 4, 5, 6, 7) AND T4.attribute_name = 'Good for Kids' AND T3.attribute_value = 'true'

How many " Good for Kids " Yelp_Businesses are open everyday of the week ?

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


Question: What were the cities in which John Aalberg competed?

SELECT T4.city_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T1.full_name = 'John Aalberg'

What were the cities in which John Aalberg competed ?


Question: List the tail number of flights that flew on August 17, 2018.

SELECT TAIL_NUM FROM Airlines WHERE FL_DATE = '2018/8/17' GROUP BY TAIL_NUM

List the tail number of flights that flew on August 17 , 2018 .

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


Question: What is all the information about the Marketing department?

SELECT * FROM  departments WHERE department_name  =  'Marketing'

What is all the information about the Marketing department ?


Question: List the ids, names, and government websites of all districts sorted by population.

SELECT name ,  Government_website ,  district_id FROM district ORDER BY Population

List the ids , names , and government websites of all districts sorted by population .

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


Question: What amenities does Smith Hall have in alphabetical order?

SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T1.dorm_name  =  'Smith Hall' ORDER BY T3.amenity_name

What amenities does Smith Hall have in alphabetical order ?

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


Question: Provide the businesses name in Tempe city whose opening hours are earlier than 8AM.

SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Business_Hours AS T4 ON T3.business_id = T4.business_id WHERE T3.city LIKE 'Tempe' AND T4.opening_time < '8AM'

Provide the businesses name in Tempe city whose opening hours are earlier than 8AM .

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


Question: What are all the address ids and address details?

SELECT address_id ,  address_details FROM Addresses

What are all the address ids and address details ?

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


Question: Among professors with the highest popularity, how many of their students have research capability of 5?

SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T1.capability = 5 ORDER BY T2.popularity DESC LIMIT 1

Among professors with the highest popularity , how many of their students have research capability of 5 ?

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


Question: Are there more male patients with creatinine not within the normal range than female? True or False?

SELECT CASE WHEN SUM(CASE WHEN T1.SEX = 'M' THEN 1 ELSE 0 END) > SUM(CASE WHEN T1.SEX = 'F' THEN 1 ELSE 0 END) THEN 'True' ELSE 'False' END FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5

Are there more male patients with creatinine not within the normal range than female ? True or False ?

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


Question: How many restaurants can you find in Concord?

SELECT COUNT(id_restaurant) FROM location WHERE city = 'concord'

How many restaurants can you find in Concord ?


Question: In the state of Connecticut, what is the name of the instution with the highest percent rank for freshman retention percentage within the sector?

SELECT chronname FROM institution_details WHERE state = 'Connecticut' AND retain_percentile = ( SELECT MAX(retain_percentile) FROM institution_details WHERE state = 'Connecticut' )

In the state of Connecticut , what is the name of the instution with the highest percent rank for freshman retention percentage within the sector ?

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


Question: Show project ids and the number of documents in each project.

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

Show project ids and the number of documents in each project .

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


Question: What is the name of the most expensive product?

SELECT Name FROM Products WHERE Price = ( SELECT MAX(Price) FROM Products )

What is the name of the most expensive product ?


Question: What are the average city fuel economy rate, average highway fuel economy rate for different types of powertrains?

SELECT avg(City_fuel_economy_rate) ,  avg(Highway_fuel_economy_rate) , Type_of_powertrain FROM vehicles GROUP BY Type_of_powertrain

What are the average city fuel economy rate , average highway fuel economy rate for different types of powertrains ?

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


Question: Count the number of bank branches.


Question: List down the ID of toss winners who decided to bat after winning the "toss of the coin".

SELECT Toss_Winner FROM Match WHERE Toss_Decide = 2

List down the ID of toss winners who decided to bat after winning the " toss of the coin " .

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


Question: How many long reviews does user No. 36139 give for the Yelp businesses?

SELECT COUNT(review_length) FROM Reviews WHERE user_id = 36139 AND review_length LIKE 'long'

How many long reviews does user No . 36139 give for the Yelp businesses ?

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


Question: What is the different id of every sailor who is not the youngest?

SELECT DISTINCT sid FROM Sailors WHERE age  >  (SELECT min(age) FROM Sailors);

What is the different i d of every sailor who is not the youngest ?

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


Question: What is the long title of the Shakespeare's work with Act 4 Scene 5 described as "Mytilene. A street before the brothel."?

SELECT T1.LongTitle FROM works AS T1 RIGHT JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Description = 'Mytilene. A street before the brothel.'

What is the long title of the Shakespeare 's work with Act 4 Scene 5 described as " Mytilene . A street before the brothel . " ?

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


Question: Show all region code and region name sorted by the codes.

SELECT region_code ,  region_name FROM region ORDER BY region_code

Show all region code and region name sorted by the codes .

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


Question: What are all the different first names of the drivers who are in position as standing and won?

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

What are all the different first names of the drivers who are in position as standing and won ?

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


Question: Find id for the sailors who do not have a reservation of a boat?

SELECT sid FROM Sailors EXCEPT SELECT T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid

Find i d for the sailors who do not have a reservation of a boat ?

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


Question: What is the average number of respondents per survey between 2014 and 2019?

SELECT CAST(COUNT(SurveyID) AS REAL) / 5 FROM Answer WHERE SurveyID BETWEEN 2014 AND 2019

What is the average number of respondents per survey between 2014 and 2019 ?

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


Question: Which events have the number of notes between one and three? List the event id and the property id.

SELECT T1.Customer_Event_ID  ,  T1.property_id FROM Customer_Events AS T1 JOIN Customer_Event_Notes AS T2 ON T1.Customer_Event_ID  =  T2.Customer_Event_ID GROUP BY T1.customer_event_id HAVING count(*) BETWEEN 1 AND 3

Which events have the number of notes between one and three ? List the event i d and the property i d.

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


Question: Among the games published by Nintendo, what is the percentage of those in the genre of sports?

SELECT CAST(COUNT(CASE WHEN T4.genre_name = 'Sports' THEN T1.id ELSE NULL END) AS REAL) * 100/ COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T3.publisher_name = 'Nintendo'

Among the games published by Nintendo , what is the percentage of those in the genre of sports ?

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


Question: What is the total number of Monitor products that have been ordered?

SELECT sum(order_quantity) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id WHERE T2.product_name  =  "Monitor"

What is the total number of Monitor products that have been ordered ?

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


Question: Who is the publisher of 3D Lemmings?

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


Question: How many routes end in a Canadian airport?

SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE country  =  'Canada'

How many routes end in a Canadian airport ?


Question: How many students are advised by each rank of faculty? List the rank and the number of students.

SELECT T1.rank ,  count(*) FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor GROUP BY T1.rank

How many students are advised by each rank of faculty ? List the rank and the number of students .

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


Question: What are the invoice numbers created before 1989-09-03 or after 2007-12-25?

SELECT invoice_number FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"

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


Question: List the name, IHSAA Football Class, and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003, in the order of percent of total invested budget and total budgeted budget.

SELECT T1.School_name ,  T1.Mascot ,  T1.IHSAA_Football_Class FROM school AS T1 JOIN budget AS T2 ON T1.school_id  =  T2.school_id WHERE Budgeted  >  6000 OR YEAR  <  2003 ORDER BY T2.total_budget_percent_invested ,  T2.total_budget_percent_budgeted

List the name , IHSAA Football Class , and Mascot of the schools that have more than 6000 of budgeted amount or were founded before 2003 , in the order of percent of total invested budget and total budgeted budget .

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


Question: List the name of tracks belongs to genre Rock or genre Jazz.

SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock" OR T1.name = "Jazz"

List the name of tracks belongs to genre Rock or genre Jazz .

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


Question: What is the ratio of the highest and lowest temperature in store 11?

SELECT CAST((MAX(T1.tmax) - MIN(T1.tmin)) AS REAL) / MIN(T1.tmin) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 11

What is the ratio of the highest and lowest temperature in store 11 ?

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


Question: Show first name, last name, age for all female students. Their sex is F.

SELECT Fname ,  Lname ,  Age FROM Student WHERE Sex  =  'F'

Show first name , last name , age for all female students . Their sex is F.

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


Question: What are the names of shops in ascending order of open year?

SELECT Shop_Name FROM shop ORDER BY Open_Year ASC

What are the names of shops in ascending order of open year ?

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


Question: List the full names of patients with nut allergy.

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to nut'

List the full names of patients with nut allergy .


Question: Find the name of the district which has the largest area.

SELECT name FROM district ORDER BY Area_km DESC LIMIT 1

Find the name of the district which has the largest area .

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


Question: Among the students with disabilities, list any five students' names who are unemployed.

SELECT T1.name FROM disabled AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name LIMIT 5

Among the students with disabilities , list any five students ' names who are unemployed .

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


Question: What is the horsepower and model year of the car named Subaru Dl?

SELECT T1.horsepower, T2.model_year FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'subaru dl'

What is the horsepower and model year of the car named Subaru Dl ?

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


Question: What is the name of the event that happened in the most recent year?

SELECT name FROM event ORDER BY YEAR DESC LIMIT 1

What is the name of the event that happened in the most recent year ?

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


Question: Compute the average price of all products with manufacturer code equal to 2.

SELECT avg(price) FROM products WHERE Manufacturer  =  2

Compute the average price of all products with manufacturer code equal to 2 .

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


Question: What are the last names of employees who serve at most 20 customers?

SELECT T1.LastName FROM CUSTOMER AS T1 JOIN EMPLOYEE AS T2 ON T1.SupportRepId  =  T2.EmployeeId GROUP BY T1.SupportRepId HAVING COUNT(*)  <=  20

What are the last names of employees who serve at most 20 customers ?

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


Question: What is the average BMI of an All-star player?

SELECT AVG(CAST(T1.weight AS REAL) / (T1.height * T1.height)) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID

What is the average BMI of an All - star player ?

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


Question: Please list the names of the courses that are less important than Machine Learning Theory.

SELECT name FROM course WHERE credit < ( SELECT credit FROM course WHERE name = 'Machine Learning Theory' )

Please list the names of the courses that are less important than Machine Learning Theory .

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


Question: What is the name of the client with the most number of orders?

SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient GROUP BY T1.idClient ORDER BY count(*) DESC LIMIT 1

What is the name of the client with the most number of orders ?

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


Question: Among the female legislators, what is the percentage of the senators in Maine?

SELECT CAST(SUM(CASE WHEN T2.type = 'sen' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.type) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'ME' AND T1.gender_bio = 'F'

Among the female legislators , what is the percentage of the senators in Maine ?


Question: What is the last name of the author that has published the most papers?

SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid GROUP BY t1.fname ,  t1.lname ORDER BY count(*) DESC LIMIT 1

What is the last name of the author that has published the most papers ?

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


Question: What is the average price of products that cost between 100 and 200?

SELECT AVG(Price) FROM Products WHERE Price BETWEEN 100 AND 200

What is the average price of products that cost between 100 and 200 ?

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


Question: Which dish has the highest price on the menu "Zentral Theater Terrace"? Please give its name.

SELECT T4.name FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Zentral Theater Terrace' ORDER BY T1.price DESC LIMIT 1

Which dish has the highest price on the menu " Zentral Theater Terrace " ? Please give its name .

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


Question: Show all church names that have hosted least two weddings.

SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id  =  T2.church_id GROUP BY T1.church_id HAVING count(*)  >=  2

Show all church names that have hosted least two weddings .

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


Question: What are the names and powertrain types of cars that have more than 30 total rental hours?

SELECT T2.name ,  T2.Type_of_powertrain FROM renting_history AS T1 JOIN vehicles AS T2 ON T1.vehicles_id  =  T2.id GROUP BY T1.vehicles_id HAVING sum(T1.total_hours)  >  30

What are the names and powertrain types of cars that have more than 30 total rental hours ?

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


Question: Please state any three business numbers in AZ state that have received the "Great experience" review stars.

SELECT DISTINCT T2.business_id FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T2.state LIKE 'AZ' AND T1.review_stars = 5 LIMIT 3

Please state any three business numbers in AZ state that have received the " Great experience " review stars .

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


Question: Which student answer texts were given both "Normal" and "Absent" as comments?

SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Normal" INTERSECT SELECT Student_Answer_Text FROM Student_Answers WHERE Comments  =  "Absent"

Which student answer texts were given both " Normal " and " Absent " as comments ?

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


Question: Among the movies released from 1991 to 2000, calculate the percentage of comedy movies. Provide any five movie titles and directors.

SELECT CAST(COUNT(CASE WHEN T1.genre = 'Comedy' THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title), group_concat(T1.movie_title), group_concat(T2.director) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE SUBSTR(T1.release_date, LENGTH(T1.release_date) - 3, LENGTH(T1.release_date)) BETWEEN '1991' AND '2000'

Among the movies released from 1991 to 2000 , calculate the percentage of comedy movies . Provide any five movie titles and directors .

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


Question: Show the employee ids and the number of documents destroyed by each employee.

SELECT Destroyed_by_Employee_ID ,  count(*) FROM Documents_to_be_destroyed GROUP BY Destroyed_by_Employee_ID

Show the employee ids and the number of documents destroyed by each employee .

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


Question: Which region is Yao Ming from?

SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Yao Ming'


Question: Who is the most productive director?

SELECT director FROM director GROUP BY director ORDER BY COUNT(name) DESC LIMIT 1


Question: For the driver who had the Q2 time as 0:01:40 in the qualifying race No. 355, what is his nationality?

SELECT DISTINCT T2.nationality FROM qualifying AS T1 INNER JOIN drivers AS T2 ON T2.driverId = T1.driverId WHERE T1.raceId = 355 AND T1.q2 LIKE '1:40%'

For the driver who had the Q2 time as 0:01:40 in the qualifying race No . 355 , what is his nationality ?

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


Question: How many products shipped on 19/11/1994 were ordered on 21/09/1994?

SELECT COUNT(T2.l_partkey) FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T1.o_orderdate = '1994-09-21' AND T2.l_shipdate = '1994-11-19'

How many products shipped on 19/11/1994 were ordered on 21/09/1994 ?

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


Question: How many Wikipedia pages with over 4000 different words are there on the Catalan language?

SELECT COUNT(lid) FROM pages WHERE lid = 1 AND words > 4000

How many Wikipedia pages with over 4000 different words are there on the Catalan language ?

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


Question: Name the most expensive and the least expensive products available, excluding free gifts.

SELECT Name FROM Products WHERE Price IN (( SELECT MAX(Price) FROM Products ), ( SELECT MIN(Price) FROM Products ))

Name the most expensive and the least expensive products available , excluding free gifts .

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


Question: Name all the volcano mountains between the height of 2000 to 4000.

SELECT Name FROM mountain WHERE Type = 'volcano' AND Height BETWEEN 2000 AND 4000

Name all the volcano mountains between the height of 2000 to 4000 .

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


Question: What is the percentage of the teams who had post season (playoff) were ranked number 1?

SELECT CAST(SUM(CASE WHEN rank = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(name) FROM teams

What is the percentage of the teams who had post season ( playoff ) were ranked number 1 ?

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


Question: How many unknown power cards contain info about the triggered ability

SELECT T2.text FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE (T1.power IS NULL OR T1.power = '*') AND T2.text LIKE '%triggered ability%'

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


Question: State the race and year of race in which Michael Schumacher had his fastest lap.

SELECT T1.name, T1.year FROM races AS T1 INNER JOIN lapTimes AS T2 ON T2.raceId = T1.raceId INNER JOIN drivers AS T3 ON T3.driverId = T2.driverId WHERE T3.forename = 'Michael' AND T3.surname = 'Schumacher' ORDER BY T2.milliseconds ASC LIMIT 1

State the race and year of race in which Michael Schumacher had his fastest lap .

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


Question: List the names of gymnasts in ascending order by their heights.

SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID ORDER BY T2.Height ASC

List the names of gymnasts in ascending order by their heights .

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


Question: List the names of journalists who have not reported any event.

SELECT Name FROM journalist WHERE journalist_ID NOT IN (SELECT journalist_ID FROM news_report)

List the names of journalists who have not reported any event .

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


Question: What are the total weights of players for team 'ANA' as per year 1997?

SELECT SUM(T1.weight) FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1997 AND T2.tmID = 'ANA'

What are the total weights of players for team ' ANA ' as per year 1997 ?

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


Question: What is the longest time for a student from the navy department to be absent from school?

SELECT T1.month FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T2.organ = 'navy' ORDER BY T1.`month` DESC LIMIT 1

What is the longest time for a student from the navy department to be absent from school ?

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


Question: What is the average vitamin C amount of all cakes?

SELECT AVG(T1.vitamin_c) FROM Nutrition AS T1 INNER JOIN Recipe AS T2 ON T2.recipe_id = T1.recipe_id WHERE T2.title LIKE '%cake%'

What is the average vitamin C amount of all cakes ?

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


Question: Among the customers from the United States, which market segment has the highest number of customers?

SELECT T.c_mktsegment FROM ( SELECT T1.c_mktsegment, COUNT(T1.c_custkey) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'UNITED STATES' GROUP BY T1.c_mktsegment ) AS T ORDER BY T.num DESC LIMIT 1

Among the customers from the United States , which market segment has the highest number of customers ?

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


Question: What is the ID of audiences that gave the most rating of 5?

SELECT userid FROM u2base WHERE rating = 5 GROUP BY userid ORDER BY COUNT(movieid) DESC LIMIT 1

What is the ID of audiences that gave the most rating of 5 ?

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


Question: How many products from the Clothing category were on the LL Road Frame Sale?

SELECT COUNT(T2.ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID INNER JOIN Product AS T3 ON T2.ProductID = T3.ProductID INNER JOIN ProductSubcategory AS T4 ON T3.ProductSubcategoryID = T4.ProductSubcategoryID INNER JOIN ProductCategory AS T5 ON T4.ProductCategoryID = T5.ProductCategoryID WHERE T1.Description = 'LL Road Frame Sale' AND T4.Name = 'Clothing'

How many products from the Clothing category were on the LL Road Frame Sale ?

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


Question: How many films in English are for adults only?

SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English' AND T1.rating = 'NC-17'

How many films in English are for adults only ?


Question: Count the number of planes Smith owns.

SELECT count(plane_name) FROM pilotskills WHERE pilot_name  =  'Smith'


Question: List the writers who have written more than one book.

SELECT Writer FROM book GROUP BY Writer HAVING COUNT(*)  >  1

List the writers who have written more than one book .


Question: How old is SC Ganguly in 2008?

SELECT 2008 - strftime('%Y', DOB) FROM Player WHERE Player_Name = 'SC Ganguly'


Question: List all the titles and year to date sales by author who are not on contract.

SELECT T1.title_id, T1.ytd_sales FROM titles AS T1 INNER JOIN titleauthor AS T2 ON T1.title_id = T2.title_id INNER JOIN authors AS T3 ON T2.au_id = T3.au_id WHERE T3.contract = 0

List all the titles and year to date sales by author who are not on contract .

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


Question: Which student visited restaurant most often? List student's first name and last name.

SELECT Student.Fname , Student.Lname FROM Student JOIN Visits_Restaurant ON Student.StuID = Visits_Restaurant.StuID GROUP BY Student.StuID ORDER BY count(*) DESC LIMIT 1;

Which student visited restaurant most often ? List student 's first name and last name .

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


Question: What is the total number of conferences?

What is the total number of conferences ?


Question: Please list the blocks where all the incidents in the district commanded by Robert A. Rubio took place.

SELECT T2.block FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.commander = 'Robert A. Rubio'

Please list the blocks where all the incidents in the district commanded by Robert A. Rubio took place .

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


Question: Select all the data from the products and each product's manufacturer.

SELECT * FROM products AS T1 JOIN Manufacturers AS T2 ON T1.manufacturer  =  T2.code

Select all the data from the products and each product 's manufacturer .


Question: Find the actor's name that played as Don Altobello in a drama movie that has a gross of 136766062.

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.Gross = 136766062 AND T2.`Character Name` = 'Don Altobello' AND T1.Genre = 'Drama'

Find the actor 's name that played as Don Altobello in a drama movie that has a gross of 136766062 .

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