Question: Of the patients with an normal level of IGG, how many of them admitted to the hospital?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGG > 900 AND T2.IGG <2000 AND  T1.Admission = '+'

Of the patients with an normal level of IGG , how many of them admitted to the hospital ?

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


Question: How many types of "HL Touring Frames" are there?

SELECT COUNT(ProductID) FROM Products WHERE Name LIKE '%HL Touring Frame%'

How many types of " HL Touring Frames " are there ?

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


Question: List down the advised student IDs and IDs of employing professor in faculty.

SELECT T1.p_id, T2.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE hasPosition = 'Faculty_eme'

List down the advised student IDs and IDs of employing professor in faculty .


Question: Among the male students, list down the names of students with payment due.

SELECT T1.name FROM male AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'pos'

Among the male students , list down the names of students with payment due .

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


Question: Show company name and main industry without a gas station.

SELECT company ,  main_industry FROM company WHERE company_id NOT IN (SELECT company_id FROM station_company)

Show company name and main industry without a gas station .

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


Question: List all product names that are high in quality. Please also state its selling price.

SELECT Name, ListPrice FROM Product WHERE Class = 'H'

List all product names that are high in quality . Please also state its selling price .

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


Question: Provide the name of the artist who released his or her Single-Table in 2012 with the highest number of downloads. Name the Single-Table title as well.

SELECT artist, groupName FROM torrents WHERE groupYear = 2012 AND releaseType LIKE 'Single' ORDER BY totalSnatched DESC LIMIT 1

Provide the name of the artist who released his or her Single - Table in 2012 with the highest number of downloads . Name the Single - Table title as well .

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


Question: How many more devices are there of the brand vivo than of the brand LG?

SELECT SUM(IIF(phone_brand = 'vivo', 1, 0)) - SUM(IIF(phone_brand = 'LG', 1, 0)) AS num FROM phone_brand_device_model2

How many more devices are there of the brand vivo than of the brand LG ?

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


Question: Among the cards with a white border color, how many of them have unknown power?

SELECT SUM(CASE WHEN power LIKE '%*%' OR power IS NULL THEN 1 ELSE 0 END) FROM cards WHERE borderColor = 'white'

Among the cards with a white border color , how many of them have unknown power ?

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


Question: Provide the superpowers of the superhero called Deathlok.

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

Provide the superpowers of the superhero called Deathlok .


Question: How many complaints are not in process with an agent?

SELECT COUNT(outcome) FROM callcenterlogs WHERE outcome != 'AGENT'

How many complaints are not in process with an agent ?


Question: Find the phone number of performer "Ashley".

SELECT Customer_Phone FROM PERFORMERS WHERE Customer_Name  =  "Ashley"

Find the phone number of performer " Ashley " .

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


Question: How many photos type compliment given from users with high cool votes?

SELECT COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id INNER JOIN Compliments AS T3 ON T2.compliment_id = T3.compliment_id INNER JOIN Reviews AS T4 ON T1.user_id = T4.user_id WHERE T3.compliment_type = 'photos' AND T4.review_votes_cool = 'High'

How many photos type compliment given from users with high cool votes ?

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


Question: What is the atom ID of double bonded carbon in TR012 molecule?

SELECT T1.atom_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T2.molecule_id = 'TR012' AND T3.bond_type = '=' AND T1.element = 'c'

What is the atom ID of double bonded carbon in TR012 molecule ?

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


Question: In female students in year 2012, how many of them from a state with number of schools ranges from 10 to 20?

SELECT COUNT(T2.race) FROM state_sector_details AS T1 INNER JOIN state_sector_grads AS T2 ON T2.stateid = T1.stateid WHERE T2.gender = 'F' AND schools_count BETWEEN 10 AND 20 AND T2.year = 2012

In female students in year 2012 , how many of them from a state with number of schools ranges from 10 to 20 ?

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


Question: What is the name of the country with the highest politics score?

SELECT name FROM countries ORDER BY politics_score DESC LIMIT 1

What is the name of the country with the highest politics score ?

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


Question: Return the age of the person with the greatest height.

SELECT Age FROM people ORDER BY Height DESC LIMIT 1

Return the age of the person with the greatest height .


Question: Find the id of the appointment with the most recent start date?

SELECT appointmentid FROM appointment ORDER BY START DESC LIMIT 1

Find the i d of the appointment with the most recent start date ?

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


Question: List all open years when at least two shops are opened.

SELECT open_year FROM branch GROUP BY open_year HAVING count(*)  >=  2

List all open years when at least two shops are opened .


Question: What division did the team coached by the winner of the 1977 NBA Coach of the Year award play in in 1976?

SELECT DISTINCT T3.divID FROM awards_coaches AS T1 INNER JOIN coaches AS T2 ON T1.coachID = T2.coachID INNER JOIN teams AS T3 ON T2.tmID = T3.tmID WHERE T1.year = 1977 AND T1.award = 'NBA Coach of the Year' AND T3.year = 1976

What division did the team coached by the winner of the 1977 NBA Coach of the Year award play in in 1976 ?

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


Question: On 11/3/2013, which stations are often empty? Indicate the names of the stations.

SELECT DISTINCT T1.name FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.bikes_available = 0 AND T2.time LIKE '2013/11/03%'

On 11/3/2013 , which stations are often empty ? Indicate the names of the stations .

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


Question: What are the names of all video games that are collectible cards?

SELECT gname FROM Video_games WHERE gtype  =  "Collectible card game"

What are the names of all video games that are collectible cards ?

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


Question: What are the actual delivery dates of orders with quantity 1?

SELECT T1.Actual_Delivery_Date FROM Customer_Orders AS T1 JOIN ORDER_ITEMS AS T2 ON T1.Order_ID  =  T2.Order_ID WHERE T2.Order_Quantity  =  1

What are the actual delivery dates of orders with quantity 1 ?

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


Question: List the site of institution within the student count of 500 to 1000 that has the recent year of data release.

SELECT DISTINCT T1.site FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.student_count BETWEEN 500 AND 1000 AND T2.year = ( SELECT MAX(T2.year) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid )

List the site of institution within the student count of 500 to 1000 that has the recent year of data release .

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


Question: What is the email address of clients who submitted their complaints via postal mail?

SELECT T1.email FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Submitted via` = 'Postal mail'

What is the email address of clients who submitted their complaints via postal mail ?

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


Question: How much taller is David Bornhammar than Pauli Levokari in centimeters?

SELECT ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'David Bornhammar' ) - ( SELECT T2.height_in_cm FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.PlayerName = 'Pauli Levokari' )

How much taller is David Bornhammar than Pauli Levokari in centimeters ?

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


Question: Find the name and age of the director who is in charge of the most programs?

SELECT t2.name ,  t2.age FROM program AS t1 JOIN director AS t2 ON t1.director_id  =  t2.director_id GROUP BY t1.director_id ORDER BY count(*) DESC LIMIT 1

Find the name and age of the director who is in charge of the most programs ?

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


Question: List the camera lens names containing substring "Digital".

SELECT name FROM camera_lens WHERE name LIKE "%Digital%"

List the camera lens names containing substring " Digital " .

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


Question: Which country has the highest value of Merchandise imports by the reporting economy (current US$)?

SELECT CountryName FROM Indicators WHERE IndicatorName = 'Merchandise imports by the reporting economy (current US$)' ORDER BY Value DESC LIMIT 1

Which country has the highest value of Merchandise imports by the reporting economy ( current US$ ) ?

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


Question: Show ids for all students who don't live in USA.

SELECT StuID FROM Student EXCEPT SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE country  =  "USA"

Show ids for all students who do n't live in USA .


Question: What is the title of the episode with the most nominations?

SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Nominee' GROUP BY T2.episode_id ORDER BY COUNT(T1.result) DESC LIMIT 1

What is the title of the episode with the most nominations ?


Question: How many inspections were done under the display of inspection report summary category?

SELECT COUNT(T2.inspection_id) FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T1.category = 'Display of Inspection Report Summary'

How many inspections were done under the display of inspection report summary category ?

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


Question: Name all the products with next entry ID greater than 8.

SELECT catalog_entry_name FROM catalog_contents WHERE next_entry_id  >  8

Name all the products with next entry ID greater than 8 .

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


Question: For the planes which has the hightest total price, how much it exceeds the average?

SELECT MAX(quantityOrdered * priceEach) - AVG(priceEach) FROM orderdetails WHERE productCode IN ( SELECT productCode FROM products WHERE productLine = 'Planes' )

For the planes which has the hightest total price , how much it exceeds the average ?

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


Question: Return the number of orders received for Pride and Prejudice.

SELECT count(*) FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice"

Return the number of orders received for Pride and Prejudice .

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


Question: List the products that were ordered by Anne McFarland from the Western store.

SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Anne McFarland'

List the products that were ordered by Anne McFarland from the Western store .

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


Question: For each dorm, how many amenities does it have?

SELECT count(*) ,  T1.dormid FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid WHERE T1.student_capacity  >  100 GROUP BY T1.dormid

For each dorm , how many amenities does it have ?


Question: What are the average rating and resolution of songs that are in Bangla?

SELECT avg(rating) ,  avg(resolution) FROM song WHERE languages  =  "bangla"

What are the average rating and resolution of songs that are in Bangla ?

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


Question: What is the administrator's email address for the school with the highest number of test takers who received SAT scores of at least 1500?Provide the name of the school.

SELECT T2.AdmEmail1, T2.School FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode ORDER BY T1.NumGE1500 DESC LIMIT 1

What is the administrator 's email address for the school with the highest number of test takers who received SAT scores of at least 1500?Provide the name of the school .

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


Question: How many breweries are located in North America?

SELECT COUNT(BrandID) FROM rootbeerbrand WHERE Country = 'United States'

How many breweries are located in North America ?


Question: What are the names of authors who have not published a paper in ACL?

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

What are the names of authors who have not published a paper in ACL ?

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


Question: Write down the full name, performance status and located city of the employee who's social security number is "767-74-7373".

SELECT T1.firstname, T1.lastname, T2.state, T2.locationcity FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T1.ssn = '767-74-7373'

Write down the full name , performance status and located city of the employee who 's social security number is " 767 - 74 - 7373 " .

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


Question: What is the title which has character named "Froth"?

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

What is the title which has character named " Froth " ?

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


Question: How many cards in the set Coldsnap have a black border color?

SELECT SUM(CASE WHEN T1.borderColor = 'black' THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'

How many cards in the set Coldsnap have a black border color ?

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


Question: Provide the country with republic government which has the highest population growth?

SELECT T2.Country FROM population AS T1 INNER JOIN politics AS T2 ON T1.Country = T2.Country WHERE T2.Government = 'republic' ORDER BY T1.Population_Growth DESC LIMIT 1

Provide the country with republic government which has the highest population growth ?

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


Question: Please list the titles of the films that are released in 2006 and have a rental rate of $2.99.

SELECT title FROM film WHERE release_year = 2006 AND rental_rate = 2.99

Please list the titles of the films that are released in 2006 and have a rental rate of $ 2.99 .

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


Question: What are the title, id, and description of the movie with the greatest number of actors?

SELECT T2.title ,  T2.film_id ,  T2.description FROM film_actor AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T2.film_id ORDER BY count(*) DESC LIMIT 1

What are the title , i d , and description of the movie with the greatest number of actors ?

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


Question: Between 2006 and 2007, which year ID had the greater number in elite user?

SELECT year_id FROM Elite WHERE year_id IN (2006, 2007) GROUP BY year_id ORDER BY COUNT(user_id) DESC LIMIT 1

Between 2006 and 2007 , which year ID had the greater number in elite user ?

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


Question: Which team had the least number of attendances in home games in 1980?

SELECT T2.name FROM home_game AS T1 JOIN team AS T2 ON T1.team_id = T2.team_id_br WHERE T1.year = 1980 ORDER BY T1.attendance ASC LIMIT 1;

Which team had the least number of attendances in home games in 1980 ?

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


Question: List the categories of active businesses in Glendale, AZ.

SELECT DISTINCT T3.category_name FROM Business_Categories AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Categories AS T3 ON T1.category_id = T3.category_id WHERE T2.active = 'true' AND T2.state = 'AZ' AND T2.city = 'Glendale'

List the categories of active businesses in Glendale , AZ .

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


Question: Name the advisors for students in Year 3 of the program.

SELECT T1.p_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id WHERE T2.yearsInProgram = 'Year_3'

Name the advisors for students in Year 3 of the program .

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


Question: Show each premise type and the number of premises in that type.

SELECT premises_type ,  count(*) FROM premises GROUP BY premises_type

Show each premise type and the number of premises in that type .

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


Question: What are the different pilot names who had piloted a flight in the country 'United States' or in the airport named 'Billund Airport'?

SELECT DISTINCT T2.pilot FROM airport AS T1 JOIN flight AS T2 ON T1.id  =  T2.airport_id WHERE T1.country  =  'United States' OR T1.name  =  'Billund Airport'

What are the different pilot names who had piloted a flight in the country ' United States ' or in the airport named ' Billund Airport ' ?

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


Question: Find the percentage of atoms with single 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 t

Find the percentage of atoms with single bond .


Question: Show the names of journalists and the dates of the events they reported.

SELECT T3.Name ,  T2.Date FROM news_report AS T1 JOIN event AS T2 ON T1.Event_ID  =  T2.Event_ID JOIN journalist AS T3 ON T1.journalist_ID  =  T3.journalist_ID

Show the names of journalists and the dates of the events they reported .

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


Question: Which region has the most athletes?

SELECT T2.region_name FROM person_region AS T1 INNER JOIN noc_region AS T2 ON T1.region_id = T2.id GROUP BY T2.region_name ORDER BY COUNT(T1.person_id) DESC LIMIT 1


Question: How many staff in total?


Question: Calculate the percentage of zip codes that are PO boxes.

SELECT CAST(SUM(CASE WHEN type = 'PO Box' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(zip_code) FROM zip_code

Calculate the percentage of zip codes that are PO boxes .

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


Question: What is the weight of the shortest person?

SELECT Weight FROM people ORDER BY Height ASC LIMIT 1

What is the weight of the shortest person ?


Question: List the customers' first name, middle initial, last name and payment methods.

SELECT T1.customer_first_name ,  T1.customer_middle_initial ,  T1.customer_last_name ,  T2.Payment_method_code FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id  =  T2.customer_id

List the customers ' first name , middle initial , last name and payment methods .

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


Question: What is the first name of the staff who did not give any lesson?

SELECT first_name FROM Staff EXCEPT SELECT T2.first_name FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id  =  T2.staff_id

What is the first name of the staff who did not give any lesson ?

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


Question: What are all the policy types of the customer named "Dayana Robel"?

SELECT DISTINCT t3.policy_type_code FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id JOIN available_policies AS t3 ON t2.policy_id  =  t3.policy_id WHERE t1.customer_name  =  "Dayana Robel"

What are all the policy types of the customer named " Dayana Robel " ?

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


Question: Which students participate in both Canoeing and Kayaking as their activities? Tell me their student ids.

SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Canoeing' INTERSECT SELECT T1.stuid FROM participates_in AS T1 JOIN activity AS T2 ON T2.actid  =  T2.actid WHERE T2.activity_name  =  'Kayaking'

Which students participate in both Canoeing and Kayaking as their activities ? Tell me their student ids .

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


Question: List the directors of movies that feature a song.

SELECT T2.director FROM characters AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T1.song IS NOT NULL GROUP BY T2.director

List the directors of movies that feature a song .

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


Question: Which hero was the fastest?

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


Question: Please list the reviewers who have given the highest rating for a medium class, women's product.

SELECT T1.ReviewerName FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Class = 'M' AND T2.Style = 'W' AND T1.Rating = 5

Please list the reviewers who have given the highest rating for a medium class , women 's product .

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


Question: List down the country names of countries that have a GNP lower than 1000 and have Dutch as their language.

SELECT T2.Name FROM CountryLanguage AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.Code WHERE T2.GNP < 1000 AND T1.IsOfficial = 'T' AND T1.Language = 'Dutch'

List down the country names of countries that have a GNP lower than 1000 and have Dutch as their language .

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


Question: What are the names of artists who are Male and are from UK?

SELECT artist_name FROM artist WHERE country  =  "UK" AND gender  =  "Male"

What are the names of artists who are Male and are from UK ?

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


Question: Did the tallest player got in the Hall of Fame? If yes, please list the year when he got in the Hall of Fame.

SELECT CASE WHEN T1.hofID IS NULL THEN 'NO' ELSE T2.year END FROM Master AS T1 LEFT JOIN HOF AS T2 ON T1.hofID = T2.hofID WHERE T1.height = ( SELECT MAX(height) FROM Master )

Did the tallest player got in the Hall of Fame ? If yes , please list the year when he got in the Hall of Fame .

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


Question: Which post by Harvey Motulsky has the most views? Please give the id and title of this post.

SELECT T2.Id, T2.Title FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE T1.DisplayName = 'Harvey Motulsky' ORDER BY T2.ViewCount DESC LIMIT 1

Which post by Harvey Motulsky has the most views ? Please give the i d and title of this post .

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


Question: What are the numbers of the shortest flights?

SELECT flno FROM Flight ORDER BY distance ASC LIMIT 3

What are the numbers of the shortest flights ?


Question: What is the name of the institution that "Matthias Blume" belongs to?

SELECT DISTINCT t3.name FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN inst AS t3 ON t2.instid  =  t3.instid WHERE t1.fname  =  "Matthias" AND t1.lname  =  "Blume"

What is the name of the institution that " Matthias Blume " belongs to ?

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


Question: Among the trains running west, how many trains have three-wheeled, jagged roof cars?

SELECT SUM(CASE WHEN T2.direction = 'west' THEN 1 ELSE 0 END)as count FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T1.wheels = 3 AND T1.roof = 'jagged'

Among the trains running west , how many trains have three - wheeled , jagged roof cars ?

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


Question: What is the name of the territory assigned to the sales person with business id "277"?

SELECT T2.Name FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.BusinessEntityID = 277

What is the name of the territory assigned to the sales person with business i d " 277 " ?

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


Question: Which country has the highest GDP?

SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country ORDER BY T2.GDP DESC LIMIT 1


Question: Find the valid answer text that appeared most frequently.

SELECT Valid_Answer_Text FROM Valid_Answers GROUP BY Valid_Answer_Text ORDER BY COUNT(*) DESC LIMIT 1

Find the valid answer text that appeared most frequently .


Question: Find all types of store and number of them.

SELECT TYPE ,  count(*) FROM store GROUP BY TYPE

Find all types of store and number of them .


Question: Find the total credits of all classes offered by each department.

SELECT sum(T1.crs_credit) ,  T1.dept_code FROM course AS T1 JOIN CLASS AS T2 ON T1.crs_code  =  T2.crs_code GROUP BY T1.dept_code

Find the total credits of all classes offered by each department .


Question: Among the students from the Student_Club who attended the event "Women's Soccer", how many of them want a T-shirt that's in medium size?

SELECT COUNT(T1.event_id) FROM event AS T1 INNER JOIN attendance AS T2 ON T1.event_id = T2.link_to_event INNER JOIN member AS T3 ON T2.link_to_member = T3.member_id WHERE T1.event_name = 'Women''s Soccer' AND T3.t_shirt_size = 'Medium'

Among the students from the Student_Club who attended the event " Women 's Soccer " , how many of them want a T - shirt that 's in medium size ?

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


Question: Show the types of schools that have two schools.

SELECT TYPE FROM school GROUP BY TYPE HAVING count(*)  =  2

Show the types of schools that have two schools .


Question: What is the description of collection named Best?

SELECT Collection_Description FROM Collections WHERE Collection_Name = "Best";

What is the description of collection named Best ?

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


Question: Find the name, type, and flag of the ship that is built in the most recent year.

SELECT name ,  TYPE ,  flag FROM ship ORDER BY built_year DESC LIMIT 1

Find the name , type , and flag of the ship that is built in the most recent year .

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


Question: What is the average lead time of product ID 843? Calculate for its profit on net and indicate the full location to which the vendor is located.

SELECT T1.AverageLeadTime, T1.LastReceiptCost - T1.StandardPrice, T4.AddressLine1, T4.AddressLine2 , T4.City, T4.PostalCode FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN BusinessEntityAddress AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID INNER JOIN Address AS T4 ON T3.AddressID = T4.AddressID WHERE T1.ProductID = 843

What is the average lead time of product ID 843 ? Calculate for its profit on net and indicate the full location to which the vendor is located .

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


Question: List the name of tracks belongs to genre Rock or media type is MPEG audio file.

SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id JOIN media_types AS T3 ON T3.id = T2.media_type_id WHERE T1.name = "Rock" OR T3.name = "MPEG audio file";

List the name of tracks belongs to genre Rock or media type is MPEG audio file .

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


Question: How many patients are allergic to eggs?

SELECT COUNT(PATIENT) FROM allergies WHERE DESCRIPTION = 'Allergy to eggs'

How many patients are allergic to eggs ?

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


Question: How many authors have written paper "145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT: "?

SELECT COUNT(DISTINCT T2.Name) FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = '145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT: '

How many authors have written paper " 145 GROWTH HORMONE RECEPTORS AND THE ONSET OF HYPERINSULINEMIA IN THE OBESE ZUCKER RAT : " ?

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


Question: What is the total number of bikes that can be hold in Redwood City before 2014.

SELECT SUM(CASE WHEN city = 'Redwood City' AND SUBSTR(installation_date, -4) < '2014' THEN dock_count ELSE 0 END) NUM FROM station

What is the total number of bikes that can be hold in Redwood City before 2014 .

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


Question: What is the process name for the next process of the process with id 9?

SELECT process_name FROM Business_processes WHERE process_id  =  (SELECT next_process_id FROM Business_processes WHERE process_id  =  9)

What is the process name for the next process of the process with i d 9 ?

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


Question: Find the first name of the band mate that has performed in most songs.

SELECT t2.firstname FROM Performance AS t1 JOIN Band AS t2 ON t1.bandmate  =  t2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId GROUP BY firstname ORDER BY count(*) DESC LIMIT 1

Find the first name of the band mate that has performed in most songs .

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


Question: Tell me the distinct block codes where some rooms are available.

SELECT DISTINCT blockcode FROM room WHERE unavailable  =  0

Tell me the distinct block codes where some rooms are available .

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


Question: List the name and assets of each company in ascending order of company name.

SELECT name ,  Assets_billion FROM Companies ORDER BY name ASC

List the name and assets of each company in ascending order of company name .

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


Question: What are the maximum and minimum resolution of songs whose duration is 3 minutes?

SELECT max(T2.resolution) ,  min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "3:%"

What are the maximum and minimum resolution of songs whose duration is 3 minutes ?

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


Question: Provide the names and birthdates of players who have left-arm fast skills.

SELECT T1.Player_Name, T1.DOB FROM Player AS T1 INNER JOIN Bowling_Style AS T2 ON T2.Bowling_Id = T1.Bowling_skill WHERE T2.Bowling_skill = 'Left-arm fast'

Provide the names and birthdates of players who have left - arm fast skills .

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


Question: How many stations were able to sell item 5 on January 2014?

SELECT COUNT(DISTINCT T2.station_nbr) AS number FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE SUBSTR(`date`, 1, 7) = '2014-01' AND item_nbr = 5

How many stations were able to sell item 5 on January 2014 ?

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


Question: Give the name of the city of the user who tweeted `One of our favorite stories is @FINRA_News's move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a`.

SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.text = 'One of our favorite stories is @FINRA_News''s move to the cloud with AWS Enterprise Support! https://amp.twimg.com/v/991837f1-4815-4edc-a88f-e68ded09a02a'

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


Question: What is the birthday of Amy Klobuchar?

SELECT birthday_bio FROM current WHERE first_name = 'Amy' AND last_name = 'Klobuchar'


Question: What are the titles and paper ids co-authored by Mckeown, Kathleen and Rambow, Owen?

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

What are the titles and paper ids co - authored by Mckeown , Kathleen and Rambow , Owen ?

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


Question: What are the names of players who have the best dribbling?

SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.dribbling  =  ( SELECT max(overall_rating) FROM Player_Attributes)

What are the names of players who have the best dribbling ?


Question: How many races are there?


Question: Show all invoice ids and statuses without a payment.

SELECT invoice_id ,  invoice_status FROM Invoices EXCEPT SELECT T1.invoice_id ,  T1.invoice_status FROM Invoices AS T1 JOIN Payments AS T2 ON T1.invoice_id  =  T2.invoice_id

Show all invoice ids and statuses without a payment .

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


Question: In terms of number of points acquired, how many victories did the driver who ranked 91st acquired?

SELECT SUM(CASE WHEN points = 91 THEN wins ELSE 0 END) FROM driverStandings

In terms of number of points acquired , how many victories did the driver who ranked 91st acquired ?

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


Question: List all role codes, role names, and role descriptions.

SELECT role_code ,  role_name ,  role_description FROM ROLES

List all role codes , role names , and role descriptions .

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


Question: Among the students who have been absent for four months, provide any five students' names and enlisted organizations.

SELECT T2.name, T2.organ FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T2.name = T1.name WHERE T1.month = 4 LIMIT 5

Among the students who have been absent for four months , provide any five students ' names and enlisted organizations .

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


Question: From 2018 to 2020, which year did the George Lewis group have the highest number of orders?

SELECT SUBSTR(T1.OrderDate, -2, 2) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'George Lewis' GROUP BY SUBSTR(T1.OrderDate, -2, 2) ORDER BY COUNT(T1.OrderNumber) DESC LIMIT 1

From 2018 to 2020 , which year did the George Lewis group have the highest number of orders ?

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


Question: What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department?

SELECT DISTINCT T2.emp_fname ,  T3.prof_high_degree FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Computer Info. Systems'

What are the different first names and highest degree attained for professors teaching in the Computer Information Systems department ?

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


Question: Among the languages used in Baltic Countries, provide the languages which are used by over 80%.

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Region = 'Baltic Countries' AND T2.Percentage > 80

Among the languages used in Baltic Countries , provide the languages which are used by over 80 % .

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


Question: Find the first name and office of the professor who is in the history department and has a Ph.D. degree.

SELECT T1.emp_fname ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T3.dept_code  =  T2.dept_code WHERE T3.dept_name  =  'History' AND T2.prof_high_degree  =  'Ph.D.'

Find the first name and office of the professor who is in the history department and has a Ph.D. degree .

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


Question: List all the titles created by user who was a subsriber when he created the list and have less than 50 movies in the list.

SELECT DISTINCT T2.list_title FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_movie_number < 50 AND T1.user_subscriber = 1

List all the titles created by user who was a subsriber when he created the list and have less than 50 movies in the list .

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


Question: What is the average of Indian players that were born between 1975 and 1985 among all players?

SELECT CAST(SUM(CASE WHEN T2.Country_Name = 'India' THEN 1 ELSE 0 END) AS REAL) / COUNT(T1.Player_Id) FROM Player AS T1 INNER JOIN Country AS T2 ON T1.Country_Name = T2.Country_ID WHERE strftime('%Y', T1.DOB) BETWEEN '1975' AND '1985'

What is the average of Indian players that were born between 1975 and 1985 among all players ?

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


Question: Name all the release titles of the "ep's" under the alternative tag.

SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'alternative' AND T1.releaseType = 'ep'

Name all the release titles of the " ep 's " under the alternative tag .

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


Question: Which students manage to generate the highest income. State his/her full name along with the income source.

SELECT T1.first_name, T1.last_name, T2.source FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member GROUP BY T1.first_name, T1.last_name, T2.source ORDER BY SUM(T2.amount) DESC LIMIT 1

Which students manage to generate the highest income . State his / her full name along with the income source .

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


Question: Find the name of the target user with the lowest trust score.

SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id  =  T2.target_u_id ORDER BY trust LIMIT 1

Find the name of the target user with the lowest trust score .

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


Question: What are the three largest numbers of games sold?

SELECT T.game_platform_id, SUM(T.num_sales) * 100000 FROM region_sales AS T GROUP BY game_platform_id ORDER BY SUM(T.num_sales) * 100000 DESC LIMIT 3

What are the three largest numbers of games sold ?


Question: Which headphone class does have more than two headphones?

SELECT CLASS FROM headphone GROUP BY CLASS HAVING count(*)  >  2

Which headphone class does have more than two headphones ?


Question: What is the first name of the male employee who has a western name style?

SELECT T2.FirstName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.NameStyle = 0 AND T1.Gender = 'M'

What is the first name of the male employee who has a western name style ?

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


Question: Among the people in Animation Department, who are credited for additional time in the episode titled by "How the Test Was Won"?

SELECT T2.person FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'How the Test Was Won' AND T2.role = 'additional timer' AND T2.credited = 'true' AND T2.category = 'Animation Department';

Among the people in Animation Department , who are credited for additional time in the episode titled by " How the Test Was Won " ?

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


Question: How many female patients born in 1964 were admitted to the hospital? List them by ID.

SELECT ID FROM Patient WHERE STRFTIME('%Y', Birthday) = '1964' AND SEX = 'F' AND Admission = '+'

How many female patients born in 1964 were admitted to the hospital ? List them by ID .

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


Question: How many exams are there?


Question: What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer?

SELECT CAST(SUM(CASE WHEN T2.`Consumer consent provided?` = 'Consent provided' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.`Consumer consent provided?`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Male' AND T1.first = 'Mason' AND T1.middle = 'Javen' AND T1.last = 'Lopez'

What is the percentage of the complaint calls from Mr Mason Javen Lopez has got the consent provided by the customer ?

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


Question: What are the headquarters without companies that are in the banking industry?

SELECT headquarters FROM company EXCEPT SELECT headquarters FROM company WHERE main_industry  =  'Banking'

What are the headquarters without companies that are in the banking industry ?

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


Question: Which two nations are separated from one another by the longest border? Please include the entire names of the nations in your answer.

SELECT Country1, Country2 FROM borders ORDER BY Length DESC LIMIT 1

Which two nations are separated from one another by the longest border ? Please include the entire names of the nations in your answer .

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


Question: What are the personal details and the address type descriptions of each student?

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

What are the personal details and the address type descriptions of each student ?

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


Question: Find the department name of the instructor whose name contains 'Soisalon'.

SELECT dept_name FROM instructor WHERE name LIKE '%Soisalon%'

Find the department name of the instructor whose name contains ' Soisalon ' .

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


Question: What are the names of the publishers that made more than 15 billion profits each year or 1 billion each month?

SELECT name FROM press WHERE Year_Profits_billion  >  15 OR Month_Profits_billion  >  1

What are the names of the publishers that made more than 15 billion profits each year or 1 billion each month ?

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


Question: What is the longest trip duration that started and ended August 29, 2013?

SELECT MAX(duration) FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%'

What is the longest trip duration that started and ended August 29 , 2013 ?

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


Question: What are the names of the movie theaters that are playing 'G' or 'PG' rated movies?

SELECT title FROM movies WHERE rating  =  'G' OR rating  =  'PG'

What are the names of the movie theaters that are playing ' G ' or ' PG ' rated movies ?

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


Question: How many businesses are there in Phoenix city? Find the percentage of businesses in Phoenix city in the total city.

SELECT SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS "num" , CAST(SUM(CASE WHEN T3.city LIKE 'Phoenix' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.city) FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id

How many businesses are there in Phoenix city ? Find the percentage of businesses in Phoenix city in the total city .

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


Question: What is the id of the store that has the most items in inventory?

SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1

What is the i d of the store that has the most items in inventory ?

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


Question: List names of all pilot aged 30 or younger in descending alphabetical order.

SELECT Name FROM pilot WHERE Age  <=  30 ORDER BY Name DESC

List names of all pilot aged 30 or younger in descending alphabetical order .

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


Question: Provide the display name of the user who made the vote No.6347.

SELECT T1.DisplayName FROM users AS T1 INNER JOIN votes AS T2 ON T1.Id = T2.UserId WHERE T2.Id = 6347

Provide the display name of the user who made the vote No.6347 .

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


Question: What are the keywords of the episodes which have the air date in 2008?

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.air_date, 1, 4) = '2008';

What are the keywords of the episodes which have the air date in 2008 ?

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


Question: What year saw the greatest number of organizations created on the European continent?

SELECT STRFTIME('%Y', T4.Established) FROM continent AS T1 INNER JOIN encompasses AS T2 ON T1.Name = T2.Continent INNER JOIN country AS T3 ON T2.Country = T3.Code INNER JOIN organization AS T4 ON T4.Country = T3.Code WHERE T1.Name = 'Europe' GROUP BY STRFTIME('%Y', T4.Established) ORDER BY COUNT(T4.Name) DESC LIMIT 1

What year saw the greatest number of organizations created on the European continent ?

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


Question: How many clubs does "Linda Smith" have membership for?

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

How many clubs does " Linda Smith " have membership for ?

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


Question: How many id movies have category id 11?

SELECT COUNT(film_id) FROM film_category WHERE category_id = 11

How many i d movies have category i d 11 ?

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


Question: For each county, find the name of the county and the number of delegates from that county.

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

For each county , find the name of the county and the number of delegates from that county .

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


Question: What are the names of buildings sorted in descending order of building height?

SELECT name FROM buildings ORDER BY Height DESC

What are the names of buildings sorted in descending order of building height ?

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


Question: Which object has the highest attribute classes?

SELECT OBJ_SAMPLE_ID FROM IMG_OBJ_ATT GROUP BY OBJ_SAMPLE_ID ORDER BY COUNT(OBJ_SAMPLE_ID) DESC LIMIT 1

Which object has the highest attribute classes ?


Question: Which state can address "6862 Kaitlyn Knolls" possibly be in?

SELECT state_province_county FROM addresses WHERE line_1_number_building LIKE "%6862 Kaitlyn Knolls%"

Which state can address " 6862 Kaitlyn Knolls " possibly be in ?

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


Question: When did the first staff member start working?

SELECT date_from FROM Project_Staff ORDER BY date_from ASC LIMIT 1

When did the first staff member start working ?


Question: Find the names of all artists that have "a" in their names.

SELECT Name FROM ARTIST WHERE Name LIKE "%a%"

Find the names of all artists that have " a " in their names .

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


Question: State the name of employee that manages the order from Victuailles en stock?

SELECT DISTINCT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.CompanyName = 'Victuailles en stock'

State the name of employee that manages the order from Victuailles en stock ?

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


Question: Calculate the population of Arab in each country?

SELECT T2.Percentage * T1.Population FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Arab'

Calculate the population of Arab in each country ?


Question: Find the id of the item whose title is "orange".

SELECT i_id FROM item WHERE title  =  "orange"

Find the i d of the item whose title is " orange " .

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


Question: What percentage of all scenes are tragic scenes in Shakespeare's work in 1594?

SELECT CAST(SUM(IIF(T2.GenreType = 'Tragedy', 1, 0)) AS REAL) * 100 / COUNT(T1.Scene) FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T2.Date = '1594'

What percentage of all scenes are tragic scenes in Shakespeare 's work in 1594 ?

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


Question: What are the name and typical buying and selling prices of the products that have color described as "yellow"?

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

What are the name and typical buying and selling prices of the products that have color described as " yellow " ?

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


Question: What is the id of the reviewer named Daniel Lewis?

SELECT rID FROM Reviewer WHERE name  =  "Daniel Lewis"

What is the i d of the reviewer named Daniel Lewis ?

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


Question: Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel.

SELECT DISTINCT `Customer Names`, CustomerID FROM ( SELECT T2.`Customer Names`, T2.CustomerID , SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) AS T FROM `Sales Orders` T1 INNER JOIN Customers T2 ON T2.CustomerID = T1._CustomerID WHERE T1.`Sales Channel` = 'Online' GROUP BY T2.CustomerID ) WHERE T > 5000

Mention the customer names and IDs which ordered total net profit of above 5000 USD through online channel .

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


Question: Where can you rent the movie 'Wyoming Storm'? Identify the address of the rental store and the rental rate.

SELECT T2.store_id, T1.address, T4.rental_rate FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id INNER JOIN inventory AS T3 ON T2.store_id = T3.store_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.title = 'WYOMING STORM'

Where can you rent the movie ' Wyoming Storm ' ? Identify the address of the rental store and the rental rate .

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


Question: Give the repository Url of the one with most solutions.

SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId GROUP BY T2.RepoId ORDER BY COUNT(T2.RepoId) DESC LIMIT 1

Give the repository Url of the one with most solutions .

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


Question: Find the order id and customer id associated with the oldest order.

SELECT order_id ,  customer_id FROM orders ORDER BY date_order_placed LIMIT 1

Find the order i d and customer i d associated with the oldest order .

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


Question: List any ten male students who enlisted for foreign legion.

SELECT T1.name FROM enlist AS T1 INNER JOIN male AS T2 ON T2.name = T1.name WHERE T1.organ = 'foreign_legion' LIMIT 10

List any ten male students who enlisted for foreign legion .

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


Question: Which item provided for projects with Mathematics as a primary subject is the most expensive?

SELECT T1.item_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.primary_focus_subject = 'Mathematics' ORDER BY T1.item_unit_price DESC LIMIT 1

Which item provided for projects with Mathematics as a primary subject is the most expensive ?

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


Question: Calculate the percentage of suppliers in Germany.

SELECT CAST(SUM(IIF(T2.n_name = 'GERMANY', 1, 0)) AS REAL) * 100 / COUNT(T1.s_suppkey) FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0

Calculate the percentage of suppliers in Germany .


Question: Among all patients who sought medical attention in 2010 due to contact dermatitis, identify the percentage of females.

SELECT CAST(SUM(CASE WHEN T2.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.PATIENT) FROM encounters AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE strftime('%Y', T1.DATE) = '2010' AND T1.REASONDESCRIPTION = 'Contact dermatitis'

Among all patients who sought medical attention in 2010 due to contact dermatitis , identify the percentage of females .

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


Question: What is the average duration of bike trips in the city of Palo Alto?

SELECT AVG(T1.duration) FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'Palo Alto'

What is the average duration of bike trips in the city of Palo Alto ?

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


Question: What are the titles of paintings that have a width less than 600 or a height taller taller than 800?

SELECT title FROM paintings WHERE width_mm  <  600 OR height_mm  >  800

What are the titles of paintings that have a width less than 600 or a height taller taller than 800 ?

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


Question: Which are the first and last names of the students taught by MARROTTE KIRK?

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

Which are the first and last names of the students taught by MARROTTE KIRK ?

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


Question: Which days had a minimum dew point smaller than any day in zip code 94107, and in which zip codes were those measurements taken?

SELECT date ,  zip_code FROM weather WHERE min_dew_point_f  <  (SELECT min(min_dew_point_f) FROM weather WHERE zip_code  =  94107)

Which days had a minimum dew point smaller than any day in zip code 94107 , and in which zip codes were those measurements taken ?

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


Question: What is the total number of awards won by The simpson 20s: Season 20?

SELECT COUNT(award_id) FROM Award WHERE result = 'Winner';

What is the total number of awards won by The simpson 20s : Season 20 ?


Question: Among the top 5 owners with highest number of establishments, which owner has the highest number of high risk violations? Give the name of the owner.

SELECT T4.owner_name FROM violations AS T3 INNER JOIN businesses AS T4 ON T3.business_id = T4.business_id INNER JOIN ( SELECT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id GROUP BY T2.owner_name ORDER BY COUNT(T1.business_id) DESC LIMIT 5 ) AS T5 ON T4.owner_name = T5.owner_name WHERE T3.risk_category = 'High Risk' GROUP BY T4.owner_name ORDER BY COUNT(T3.risk_category) DESC LIMIT 1

Among the top 5 owners with highest number of establishments , which owner has the highest number of high risk violations ? Give the name of the owner .

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


Question: Count the number of male students who belong to foreign legion.

SELECT COUNT(T1.name) FROM male AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name WHERE T2.organ = 'foreign_legion'

Count the number of male students who belong to foreign legion .

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


Question: Who are the different players, what season do they play in, and what is the name of the team they are on?

SELECT T1.Season ,  T1.Player ,  T2.Name FROM match_season AS T1 JOIN team AS T2 ON T1.Team  =  T2.Team_id

Who are the different players , what season do they play in , and what is the name of the team they are on ?

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


Question: Which state has the most customers?

SELECT state FROM customers GROUP BY state ORDER BY count(*) LIMIT 1


Question: Show the apartment numbers, start dates, and end dates of all the apartment bookings.

SELECT T2.apt_number ,  T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id

Show the apartment numbers , start dates , and end dates of all the apartment bookings .

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


Question: How many neighborhoods are there in the community area of Lincoln Square?

SELECT COUNT(T3.community_area_no) FROM ( SELECT T1.community_area_no FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no WHERE community_area_name = 'Lincoln Square' GROUP BY T1.community_area_no ) T3

How many neighborhoods are there in the community area of Lincoln Square ?

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


Question: How many legislators have not been registered in Federal Election Commission data?

SELECT COUNT(*) FROM current WHERE fec_id IS NULL OR fec_id = ''

How many legislators have not been registered in Federal Election Commission data ?


Question: How many different places have some plane?

SELECT count(DISTINCT LOCATION) FROM hangar

How many different places have some plane ?


Question: Find the number of papers published by authors from the institution "Tokohu University".

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  =  "Tokohu University"

Find the number of papers published by authors from the institution " Tokohu University " .

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


Question: What is the type of interaction for the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?

SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id  =  T2.id JOIN enzyme AS T3 ON T1.enzyme_id  =  T3.id WHERE T3.name  =  'ALA synthase' AND T2.name  =  'Aripiprazole'

What is the type of interaction for the enzyme named ' ALA synthase ' and the medicine named ' Aripiprazole ' ?

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


Question: Find all the product whose name contains the word "Scanner".

SELECT product FROM product WHERE product LIKE "%Scanner%"

Find all the product whose name contains the word " Scanner " .


Question: List the brand IDs of the beers whose star rating is more than 3.

SELECT BrandID FROM rootbeerreview WHERE StarRating > 3

List the brand IDs of the beers whose star rating is more than 3 .

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


Question: What are the company that Adventure Works deal with that have poor credit rating? Please provide their business number.

SELECT BusinessEntityID FROM Vendor WHERE CreditRating = ( SELECT CreditRating FROM Vendor ORDER BY CreditRating DESC LIMIT 1 )

What are the company that Adventure Works deal with that have poor credit rating ? Please provide their business number .

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


Question: Calculate the difference between the total sales in the East superstore and the total sales in the West superstore.

SELECT SUM(T1.Sales) - SUM(T2.Sales) AS difference FROM east_superstore AS T1 INNER JOIN west_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID`

Calculate the difference between the total sales in the East superstore and the total sales in the West superstore .

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


Question: How many of the cities are in a Bay Area?

SELECT COUNT(city) FROM geographic WHERE region = 'bay area'

How many of the cities are in a Bay Area ?

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


Question: What is the number of flights?


Question: For each injury accident, find the date of the game and the name of the injured player in the game, and sort the results in descending order of game season.

SELECT T1.date ,  T2.player FROM game AS T1 JOIN injury_accident AS T2 ON T1.id  =  T2.game_id ORDER BY T1.season DESC

For each injury accident , find the date of the game and the name of the injured player in the game , and sort the results in descending order of game season .

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


Question: List package number and weight of top 3 lightest packages.

SELECT PackageNumber ,  Weight FROM PACKAGE ORDER BY Weight ASC LIMIT 3;

List package number and weight of top 3 lightest packages .

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


Question: Which region has the second most clients?

SELECT T2.division FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id GROUP BY T2.division ORDER BY COUNT(T2.division) DESC LIMIT 1, 1

Which region has the second most clients ?


Question: What are the customer phone numbers under the policy "Life Insurance"?

SELECT customer_phone FROM available_policies WHERE policy_type_code  =  "Life Insurance"

What are the customer phone numbers under the policy " Life Insurance " ?

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


Question: How many credits have been displayed from episode 1 until 10?

SELECT COUNT(T1.person_id) FROM Credit AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.credited = 'true' AND T2.episode BETWEEN 1 AND 10

How many credits have been displayed from episode 1 until 10 ?

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


Question: How many journals don’t have a short name?

SELECT COUNT(ShortName) FROM Journal WHERE ShortName = ''

How many journals do n’t have a short name ?


Question: What are the names of the amenities that Smith Hall has?

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'

What are the names of the amenities that Smith Hall has ?

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


Question: How many acts are there in Sonnets?

SELECT SUM(DISTINCT T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Sonnets'


Question: What is the percentage of players who were born in Denmark and weight above 154 lbs?

SELECT CAST(COUNT(CASE WHEN T1.nation = 'Denmark' AND T2.weight_in_lbs > 154 THEN T1.ELITEID ELSE NULL END) AS REAL) * 100 / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN weight_info AS T2 ON T1.weight = T2.weight_id

What is the percentage of players who were born in Denmark and weight above 154 lbs ?

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


Question: Sum up the likes get by short reviews on businesses located in City Goodyear.

SELECT SUM(T2.likes) AS likes FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Goodyear'

Sum up the likes get by short reviews on businesses located in City Goodyear .

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


Question: What is the id of the problem log that is created most recently?

SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1

What is the i d of the problem log that is created most recently ?

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


Question: What are the maximum and minimum voice sound quality score of the performances?

SELECT max(voice_sound_quality) ,  min(voice_sound_quality) FROM performance_score

What are the maximum and minimum voice sound quality score of the performances ?

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


Question: What is the difference between the number of molecules that are carcinogenic and those that are not?

SELECT COUNT(CASE WHEN T.label = '+' THEN T.molecule_id ELSE NULL END) - COUNT(CASE WHEN T.label = '-' THEN T.molecule_id ELSE NULL END) AS diff_car_notcar FROM molecule t

What is the difference between the number of molecules that are carcinogenic and those that are not ?

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


Question: Which Arabic-speaking country has the smallest population?

SELECT T1.Name FROM country AS T1 INNER JOIN language AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'Arabic' AND T2.Percentage = 100 ORDER BY T1.Population ASC LIMIT 1

Which Arabic - speaking country has the smallest population ?


Question: What is the cheapest cookie and its flavor?

SELECT id ,  flavor FROM goods WHERE food  =  "Cookie" ORDER BY price LIMIT 1

What is the cheapest cookie and its flavor ?


Question: Find the name of students who have taken the prerequisite course of the course with title International Finance.

SELECT T1.name FROM student AS T1 JOIN takes AS T2 ON T1.id  =  T2.id WHERE T2.course_id IN (SELECT T4.prereq_id FROM course AS T3 JOIN prereq AS T4 ON T3.course_id  =  T4.course_id WHERE T3.title  =  'International Finance')

Find the name of students who have taken the prerequisite course of the course with title International Finance .

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


Question: What is the campus fee of "San Francisco State University" in year 2000?

SELECT t1.campusfee FROM csu_fees AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t2.campus  =  "San Francisco State University" AND t1.year  =  2000

What is the campus fee of " San Francisco State University " in year 2000 ?

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


Question: Find pilots who own planes Piper Cub and B-52 Bomber.

SELECT pilot_name FROM pilotskills WHERE plane_name  =  'Piper Cub' INTERSECT SELECT pilot_name FROM pilotskills WHERE plane_name  =  'B-52 Bomber'

Find pilots who own planes Piper Cub and B-52 Bomber .

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


Question: How many orders has each gender placed?

SELECT T1.gender_code ,  count(*) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.gender_code

How many orders has each gender placed ?


Question: Among the films that the customer RUTH MARTINEZ has rented, how many of them are released in 2006?

SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T4.release_year = 2006 AND T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ'

Among the films that the customer RUTH MARTINEZ has rented , how many of them are released in 2006 ?

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


Question: Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial.

SELECT T1.list_title FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id AND T1.user_id = T2.user_id WHERE T1.user_id = 32172230 AND T2.user_eligible_for_trial = 1

Please list the titles of the movie lists user 32172230 created when he or she was eligible for trial .

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


Question: List all females aged 24 to 26 devices' locations.

SELECT T2.longitude, T2.latitude FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'F24-26' AND T1.gender = 'F'

List all females aged 24 to 26 devices ' locations .


Question: Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois.

SELECT CAST(COUNT(CASE WHEN state = 'Alabama' THEN cognress_rep_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN state = 'Illinois' THEN cognress_rep_id ELSE NULL END) FROM congress

Calculate the ratio between the number of representatives in Alabama and the number of representatives in Illinois .

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


Question: What is the percentage difference of English and non-English-language crime movies in other countries in year 3?

SELECT CAST(SUM(IIF(T1.isEnglish = 'T', 1, 0)) - SUM(IIF(T1.isEnglish = 'F', 1, 0)) AS REAL) * 100 / COUNT(T1.movieid) FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'other' AND T1.year = 3

What is the percentage difference of English and non - English - language crime movies in other countries in year 3 ?

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


Question: Report the number of students in each classroom.

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

Report the number of students in each classroom .


Question: Which countries have a fertility rate between 4 and 5 in 1979? List their names.

SELECT CountryName FROM Indicators WHERE Year = 1979 AND IndicatorName = 'Fertility rate, total (births per woman)' AND value >= 4 AND Value <= 5

Which countries have a fertility rate between 4 and 5 in 1979 ? List their names .

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


Question: List all the full names of patients with a condition described as cystitis.

SELECT DISTINCT T1.first, T1.last FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.patient WHERE T2.DESCRIPTION = 'Cystitis'

List all the full names of patients with a condition described as cystitis .

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


Question: Name the goalies who played for more than two teams from Year 2000 to 2005.

SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year >= 2000 AND T2.year <= 2005 GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.tmID) > 2

Name the goalies who played for more than two teams from Year 2000 to 2005 .

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


Question: What is the URL to the movie director page on Mubi of the movie titled "Red Blooded American Girl"

SELECT director_url FROM movies WHERE movie_title LIKE 'Red Blooded American Girl'

What is the URL to the movie director page on Mubi of the movie titled " Red Blooded American Girl "

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


Question: What are the names of the artists who released a song that has the word love in its title, and where are the artists from?

SELECT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.song_name LIKE "%love%"

What are the names of the artists who released a song that has the word love in its title , and where are the artists from ?

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


Question: List 10 movie titles that were produced in France.

SELECT T1.title FROM movie AS T1 INNER JOIN production_COUNTry AS T2 ON T1.movie_id = T2.movie_id INNER JOIN COUNTry AS T3 ON T2.COUNTry_id = T3.COUNTry_id WHERE T3.COUNTry_name = 'France' LIMIT 10

List 10 movie titles that were produced in France .


Question: Among the facilities that had undergone at least one inspection in 2010, how many of them have the most serious food safety issues?

SELECT COUNT(DISTINCT T2.license_no) FROM inspection AS T1 INNER JOIN establishment AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y', T1.inspection_date) = '2010' AND T2.risk_level = 3

Among the facilities that had undergone at least one inspection in 2010 , how many of them have the most serious food safety issues ?

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


Question: List all information in the item table.

List all information in the item table .


Question: How many body builders are there?


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

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

Please show different denominations and the corresponding number of schools in descending order .

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


Question: In restaurants with a review of 2, how many restaurants have a street number below 500?

SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.review = 2 AND T1.street_num < 500

In restaurants with a review of 2 , how many restaurants have a street number below 500 ?

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


Question: List the locations of schools in descending order of founded year.

SELECT LOCATION FROM school ORDER BY Founded DESC

List the locations of schools in descending order of founded year .

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


Question: List the names of companies in descending order of market value.

SELECT name FROM Companies ORDER BY Market_Value_billion DESC

List the names of companies in descending order of market value .

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


Question: Among the employees who are Trainees, how many of them work in New York?

SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID INNER JOIN position AS T3  ON T3.positionID = T1.positionID WHERE T3.positiontitle = 'Trainee' AND T2.state = 'NY'

Among the employees who are Trainees , how many of them work in New York ?

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


Question: Who was the most clutch player in 1986? Give his full name.

SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Scoring AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 1986 GROUP BY T2.playerID ORDER BY SUM(T2.GWG) DESC LIMIT 1

Who was the most clutch player in 1986 ? Give his full name .

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


Question: Which legislators do not have instagram account?

SELECT T1.first_name, T1.last_name FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.instagram IS NULL

Which legislators do not have instagram account ?


Question: Please indicate store id in the state of California that have been applied 20% discount in store.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.State = 'California' AND T1.`Sales Channel` = 'In-Store' AND T1.`Discount Applied` = 0.2 THEN T2.StoreID END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL

Please indicate store i d in the state of California that have been applied 20 % discount in store .

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


Question: Show the faculty id of each faculty member, along with the number of students he or she advises.

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

Show the faculty i d of each faculty member , along with the number of students he or she advises .

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


Question: What are the ids of the candidates that have an outcome code of Pass?

SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass"

What are the ids of the candidates that have an outcome code of Pass ?

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


Question: Which customer is the most in debt?

SELECT c_name FROM customer WHERE c_acctbal = ( SELECT MIN(c_acctbal) FROM customer )


Question: What address was the document with id 4 mailed to?

SELECT Addresses.address_details FROM Addresses JOIN Documents_Mailed ON Documents_Mailed.mailed_to_address_id = Addresses.address_id WHERE document_id = 4;

What address was the document with i d 4 mailed to ?

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


Question: Find the full name of employee who supported the most number of customers.

SELECT T1.first_name , T1.last_name FROM employees AS T1 JOIN customers AS T2 ON T1.id  =  T2.support_rep_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

Find the full name of employee who supported the most number of customers .

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


Question: Calculate the percentage of the International shipping orders on 2022/11/10.

SELECT CAST(SUM(CASE WHEN T1.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipping_method AS T1 INNER JOIN cust_order AS T2 ON T1.method_id = T2.shipping_method_id WHERE T2.order_date LIKE '2022-11-10%'

Calculate the percentage of the International shipping orders on 2022/11/10 .

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


Question: What was the origin country of the car model ford torino produced in 1970?

SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'ford torino' AND T2.model_year = 1970

What was the origin country of the car model ford torino produced in 1970 ?

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


Question: Tell the number of papers that were presented at "International Symposium on Software Testing and Analysis" conference.

SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Symposium on Software Testing and Analysis'

Tell the number of papers that were presented at " International Symposium on Software Testing and Analysis " conference .

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


Question: How many "all" character names have the "all" abbreviation?

SELECT COUNT(id) FROM characters WHERE Abbrev = 'All'

How many " all " character names have the " all " abbreviation ?

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


Question: When did Shakespeare write the first poem?

SELECT MIN(Date) FROM works WHERE GenreType = 'Poem'

When did Shakespeare write the first poem ?


Question: What are the valid from and valid to dates for the card with the number 4560596484842?

SELECT date_valid_from ,  date_valid_to FROM Customers_cards WHERE card_number  =  "4560596484842"

What are the valid from and valid to dates for the card with the number 4560596484842 ?

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


Question: How many crimes were handled by Brendan Reilly on 7th October 2018?

SELECT SUM(CASE WHEN T2.alderman_last_name = 'Reilly' THEN 1 ELSE 0 END) FROM Crime AS T1 INNER JOIN Ward AS T2 ON T1.ward_no = T2.ward_no WHERE T2.alderman_name_suffix IS NULL AND T2.alderman_first_name = 'Brendan' AND date LIKE '10/7/2018%'

How many crimes were handled by Brendan Reilly on 7th October 2018 ?

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


Question: What are the titles of all paintings and sculpture works made by the artist whose id is 222?

SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.artistID  =  222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID WHERE T3.artistID  =  222

What are the titles of all paintings and sculpture works made by the artist whose i d is 222 ?

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


Question: How much more votes for episode 1 than for episode 5?

SELECT SUM(CASE WHEN T1.episode = 1 THEN T2.votes ELSE 0 END) - SUM(CASE WHEN T1.episode = 5 THEN T2.votes ELSE 0 END) AS diff FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id;

How much more votes for episode 1 than for episode 5 ?

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


Question: What are the names of customers using the most popular payment method?

SELECT customer_name FROM customers WHERE payment_method  =  (SELECT payment_method FROM customers GROUP BY payment_method ORDER BY count(*) DESC LIMIT 1)

What are the names of customers using the most popular payment method ?

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


Question: Give the names of the courses with at least five enrollments.

SELECT T1.CName FROM COURSE AS T1 JOIN ENROLLED_IN AS T2 ON T1.CID  =  T2.CID GROUP BY T2.CID HAVING COUNT(*)  >=  5

Give the names of the courses with at least five enrollments .

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


Question: What is the ID of the university that has only 1% of international students between 2011 to 2015?

SELECT university_id FROM university_year WHERE pct_international_students = 1 AND year BETWEEN 2011 AND 2015

What is the ID of the university that has only 1 % of international students between 2011 to 2015 ?

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


Question: Find the biographical information of the student with the smallest student loan.

SELECT T1.bio_data FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id ORDER BY T2.amount_of_loan ASC LIMIT 1

Find the biographical information of the student with the smallest student loan .


Question: What are the first and last names of all students who are living in a dorm with a TV Lounge?

SELECT T1.fname ,  T1.lname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid WHERE T2.dormid IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid  =  T4.amenid WHERE T4.amenity_name  =  'TV Lounge')

What are the first and last names of all students who are living in a dorm with a TV Lounge ?

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


Question: In Argentina, how many universities are there?

SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Argentina'

In Argentina , how many universities are there ?


Question: Find the names of schools that have some students playing in goalie and mid positions.

SELECT cName FROM  tryout WHERE pPos  =  'goalie' INTERSECT SELECT cName FROM  tryout WHERE pPos  =  'mid'

Find the names of schools that have some students playing in goalie and mid positions .

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


Question: For the product No. S18_3482 in the Order No.10108, how much discount did the customer have?

SELECT (t1.MSRP - t2.priceEach) / t1.MSRP FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode WHERE t1.productCode = 'S18_3482' AND t2.orderNumber = '10108'

For the product No . S18_3482 in the Order No.10108 , how much discount did the customer have ?

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


Question: What are the average, maximum, and minimum number of floors for all buildings?

SELECT avg(floors) ,  max(floors) ,  min(floors) FROM building

What are the average , maximum , and minimum number of floors for all buildings ?

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


Question: What is the name of product purchased with transaction type P?

SELECT ProductID FROM Product WHERE ProductID IN ( SELECT ProductID FROM TransactionHistory WHERE TransactionType = 'P' )

What is the name of product purchased with transaction type P ?

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


Question: Please list the prices of the dish "Clear green turtle" on every menu page it appeared on.

SELECT T2.price FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Clear green turtle'

Please list the prices of the dish " Clear green turtle " on every menu page it appeared on .

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


Question: Find the distinct last names of all the students who have president votes and whose advisor is not 2192.

SELECT DISTINCT T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  PRESIDENT_Vote EXCEPT SELECT DISTINCT LName FROM STUDENT WHERE Advisor  =  "2192"

Find the distinct last names of all the students who have president votes and whose advisor is not 2192 .

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


Question: What was the hottest temperature on the day of trip ID 4080?

SELECT MAX(T2.max_temperature_f) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code AND T2.date = SUBSTR(CAST(T1.start_date AS TEXT), 1, INSTR(T1.start_date, ' ') - 1) WHERE T1.id = 4080

What was the hottest temperature on the day of trip ID 4080 ?

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


Question: What destination has the fewest number of flights?

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

What destination has the fewest number of flights ?


Question: How many neighborhoods are there in Near North Side?

SELECT SUM(CASE WHEN T1.community_area_name = 'Near North Side' THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Neighborhood AS T2 ON T1.community_area_no = T2.community_area_no

How many neighborhoods are there in Near North Side ?

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


Question: List the date of the transcripts and the transcript details.

SELECT date_of_transcript ,  transcript_details FROM Transcripts

List the date of the transcripts and the transcript details .

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


Question: How many authors do we have?


Question: Show the first name, last name, and phone number for all female faculty members.

SELECT Fname ,  Lname ,  phone FROM Faculty WHERE Sex  =  'F'

Show the first name , last name , and phone number for all female faculty members .

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


Question: What are the names of the two people who won an award for their role as directors?

SELECT T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.Result = 'Winner' AND T2.role = 'director'

What are the names of the two people who won an award for their role as directors ?

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


Question: What is the average population ratio of the countries in which organizations were established in 1947?

SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE STRFTIME('%Y', T2.Established) = '1947'

What is the average population ratio of the countries in which organizations were established in 1947 ?

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


Question: Describe the customer names and product names which had over 3800 USD in net profit.

SELECT DISTINCT `Customer Names`, `Product Name` FROM ( SELECT T1.`Customer Names`, T3.`Product Name` , REPLACE(T2.`Unit Price`, ',', '') - REPLACE(T2.`Unit Cost`, ',', '') AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products T3 ON T3.ProductID = T2._ProductID ) WHERE T > 3800

Describe the customer names and product names which had over 3800 USD in net profit .

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


Question: List the names of wrestlers in descending order of days held.

SELECT Name FROM wrestler ORDER BY Days_held DESC

List the names of wrestlers in descending order of days held .

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


Question: Among the role playing game genre, how many are targeted to teens and what is their average sentiment polarity score?

SELECT COUNT(T1.App), AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1."Content Rating" = 'Teen' AND T1.Genres = 'Role Playing'

Among the role playing game genre , how many are targeted to teens and what is their average sentiment polarity score ?

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


Question: List the title of all projects located in Chicago along with the ID of the donor.

SELECT T1.title, T3.donor_acctid FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T2.school_city LIKE 'Chicago'

List the title of all projects located in Chicago along with the ID of the donor .

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


Question: Who is the Pro-Administration senator that runs from March 4, 1789 to December 31, 1791?

SELECT T1.first_name, T1.last_name FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Pro-Administration' AND T2.start = '1789-03-04' AND T2.end = '1791-12-31'

Who is the Pro - Administration senator that runs from March 4 , 1789 to December 31 , 1791 ?

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


Question: What is the name of the marketing region that the store Rob Dinning belongs to?

SELECT T1.Marketing_Region_Name FROM Marketing_Regions AS T1 JOIN Stores AS T2 ON T1.Marketing_Region_Code  =  T2.Marketing_Region_Code WHERE T2.Store_Name  =  "Rob Dinning"

What is the name of the marketing region that the store Rob Dinning belongs to ?

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


Question: List the East Asia & Pacific countries which are under the High income: nonOECD group. Please include their alpha code.

SELECT CountryCode, Alpha2Code FROM Country WHERE Region = 'East Asia & Pacific' AND IncomeGroup = 'High income: nonOECD'

List the East Asia & Pacific countries which are under the High income : nonOECD group . Please include their alpha code .

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


Question: How many different industries are the companies in?

SELECT count(DISTINCT Industry) FROM Companies

How many different industries are the companies in ?


Question: Show the institution type with the largest number of institutions.

SELECT TYPE FROM institution GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1

Show the institution type with the largest number of institutions .


Question: How many airlines does Russia has?

SELECT count(*) FROM airlines WHERE country  =  'Russia'


Question: What is the name of the theater playing the most movies?

SELECT name FROM movietheaters GROUP BY name ORDER BY count(*) DESC LIMIT 1

What is the name of the theater playing the most movies ?


Question: What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts?

SELECT CAST(SUM(CASE WHEN EmailPromotion = 2 THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN PersonType = 'SC' THEN 1 ELSE 0 END) FROM Person WHERE FirstName = 'Mary'

What percentage of people named Mary who wants Receive Email promotions of AdventureWorks and selected partners are store contacts ?

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


Question: For each id of a driver who participated in at most 30 races, how many races did they participate in?

SELECT T1.driverid ,  count(*) FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid HAVING count(*)  <=  30

For each i d of a driver who participated in at most 30 races , how many races did they participate in ?

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


Question: What is the percentage of people who gave the "True North" episode a 1-star rating?

SELECT CAST(SUM(CASE WHEN T2.stars = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'True North' AND T1.episode_id = 'tt0629477'

What is the percentage of people who gave the " True North " episode a 1 - star rating ?

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


Question: List the names of technicians who have not been assigned to repair machines.

SELECT Name FROM technician WHERE technician_id NOT IN (SELECT technician_id FROM repair_assignment)

List the names of technicians who have not been assigned to repair machines .

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


Question: How many female Twitter users are there from Wisconsin?

SELECT COUNT(T1.Likes) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T3 ON T3.UserID = T1.UserID WHERE T2.State = 'Wisconsin' AND T3.Gender = 'Female'

How many female Twitter users are there from Wisconsin ?

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


Question: List the first and last name for players who participated in all star game in 1998.

SELECT name_first ,  name_last FROM player AS T1 JOIN all_star AS T2 ON T1.player_id  =  T2.player_id WHERE YEAR  =  1998

List the first and last name for players who participated in all star game in 1998 .

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


Question: What categories have two or more corresponding books that were made after 1989?

SELECT category FROM book_club WHERE YEAR  >  1989 GROUP BY category HAVING count(*)  >=  2

What categories have two or more corresponding books that were made after 1989 ?

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


Question: What is the count of distinct employees with certificates?

SELECT count(DISTINCT eid) FROM Certificate

What is the count of distinct employees with certificates ?


Question: Among the students who filed for bankruptcy, how many students are disabled?

SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name

Among the students who filed for bankruptcy , how many students are disabled ?

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


Question: List in alphabetical order the titles of all movies.

List in alphabetical order the titles of all movies .


Question: Which role is most common for the staff?

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

Which role is most common for the staff ?


Question: Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk.

SELECT T2.state, T2.type FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.google_entity_id_id = 'kg:/m/02pyzk'

Give the state and type of term of the legislator with the google entity ID of kg:/m/02pyzk .

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


Question: Identify the percentage of teenage users.

SELECT CAST(SUM(IIF(Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(Id) FROM users

Identify the percentage of teenage users .


Question: What types of domestic crimes have occurred the most in the North Lawndale community?

SELECT T2.domestic FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'North Lawndale' AND T2.domestic = 'TRUE' GROUP BY T2.domestic ORDER BY COUNT(T2.domestic) DESC LIMIT 1

What types of domestic crimes have occurred the most in the North Lawndale community ?

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


Question: What are the phone, room, and building of the faculty member called Jerry Prince?

SELECT phone ,  room ,  building FROM Faculty WHERE Fname  =  "Jerry" AND Lname  =  "Prince"

What are the phone , room , and building of the faculty member called Jerry Prince ?

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