Question: User No.3025 gave a comment at 20:29:39 on 2014/4/23 to a post, how many favorite counts did that post get?

SELECT T1.FavoriteCount FROM posts AS T1 INNER JOIN comments AS T2 ON T1.Id = T2.PostId WHERE T2.CreationDate = '2014-04-23 20:29:39.0' AND T2.UserId = 3025

User No.3025 gave a comment at 20:29:39 on 2014/4/23 to a post , how many favorite counts did that post get ?

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


Question: List the top nine districts, by descending order, from the highest to the lowest, the number of female account holders.

SELECT T2.A2, COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'F' GROUP BY T2.district_id, T2.A2 ORDER BY COUNT(T1.client_id) DESC LIMIT 9

List the top nine districts , by descending order , from the highest to the lowest , the number of female account holders .

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


Question: Which superheroes have blue eyes with brown hair?

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T2.colour = 'Blue' AND T3.colour = 'Brown'

Which superheroes have blue eyes with brown hair ?


Question: How many unemployed students have never been absent?

SELECT COUNT(T2.name) FROM longest_absense_from_school AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.month = 0

How many unemployed students have never been absent ?


Question: What is the name of the party form that is most common?

SELECT t1.form_name FROM forms AS t1 JOIN party_forms AS t2 ON t1.form_id  =  t2.form_id GROUP BY t2.form_id ORDER BY count(*) DESC LIMIT 1

What is the name of the party form that is most common ?

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


Question: Return the themes of farm competitions, sorted by year ascending.

SELECT Theme FROM farm_competition ORDER BY YEAR ASC

Return the themes of farm competitions , sorted by year ascending .

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


Question: Calculate the win rate of the toss-winners in 2012.

SELECT CAST(SUM(CASE WHEN Toss_Winner = Match_Winner THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN Match_Date LIKE '2012%' THEN 1 ELSE 0 END) FROM `Match`

Calculate the win rate of the toss - winners in 2012 .

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


Question: How many words have repetitions greater than 2000 and lower than 5000?

SELECT COUNT(wid) FROM langs_words WHERE occurrences BETWEEN '2000' AND '5000'

How many words have repetitions greater than 2000 and lower than 5000 ?

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


Question: How many times was Bytecoin traded in June 2013?

SELECT COUNT(T2.coin_id) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Bytecoin' AND STRFTIME('%Y-%m', T2.date) = '2013-06'

How many times was Bytecoin traded in June 2013 ?


Question: What is the average snatch score of body builders?

What is the average snatch score of body builders ?


Question: Which rooms cost between 120 and 150? Give me the room names.

SELECT roomname FROM rooms WHERE baseprice BETWEEN 120 AND 150

Which rooms cost between 120 and 150 ? Give me the room names .

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


Question: Calculate the ratio of the total number of images with an object class of "man" and "person".

SELECT CAST(COUNT(CASE WHEN T2.OBJ_CLASS = 'man' THEN 1 ELSE 0 END) AS REAL) / COUNT(CASE WHEN T2.OBJ_CLASS = 'person' THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID

Calculate the ratio of the total number of images with an object class of " man " and " person " .

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


Question: Please list the titles of all the films that have more than 2 special features.

SELECT title FROM ( SELECT title, COUNT(special_features) AS num FROM film GROUP BY title ) AS T ORDER BY T.num > 2

Please list the titles of all the films that have more than 2 special features .

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


Question: Name the vendors that sell the item Classroom Keepers Management Center.

SELECT DISTINCT vendor_name FROM resources WHERE item_name = 'Classroom Keepers Management Center'

Name the vendors that sell the item Classroom Keepers Management Center .

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


Question: Identify the customer, which placed the largest order in terms of value.

SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID GROUP BY T2.CustomerID ORDER BY SUM(T3.UnitPrice * T3.Quantity * (1 - T3.Discount)) DESC LIMIT 1

Identify the customer , which placed the largest order in terms of value .

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


Question: State the company name of all suppliers in USA.

SELECT CompanyName FROM Suppliers WHERE Country = 'USA'

State the company name of all suppliers in USA .

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


Question: Find the names of all person sorted in the descending order using age.

SELECT name FROM Person ORDER BY age DESC

Find the names of all person sorted in the descending order using age .

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


Question: Find the description of the claim status "Open".

SELECT claim_status_description FROM claims_processing_stages WHERE claim_status_name  =  "Open"

Find the description of the claim status " Open " .

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


Question: Show the head portrait of the user who gave the most "5" ratings.

SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id WHERE T1.rating_score = 5

Show the head portrait of the user who gave the most " 5 " ratings .

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


Question: How many songs have used the instrument "drums"?

SELECT count(*) FROM instruments WHERE instrument  =  "drums"

How many songs have used the instrument " drums " ?


Question: What is the name of the product with the lowest quantity?

SELECT T2.Name FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.Quantity LIMIT 1

What is the name of the product with the lowest quantity ?

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


Question: How many of the apps belong in the "Equity Fund" category?

SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'Equity Fund'

How many of the apps belong in the " Equity Fund " category ?

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


Question: Name all countries in which have border with Bulgaria.

SELECT T3.Name FROM country AS T1 INNER JOIN borders AS T2 ON T1.Code = T2.Country1 INNER JOIN country AS T3 ON T3.Code = T2.Country2 WHERE T1.Name = 'Bulgaria'

Name all countries in which have border with Bulgaria .

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


Question: How many male users have the log of events at the same longitude of 114?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T2.longitude = 114 AND T1.gender = 'M'

How many male users have the log of events at the same longitude of 114 ?

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


Question: List the actors' IDs who have "KILMER" as last name.

SELECT actor_id FROM actor WHERE last_name = 'KILMER'

List the actors ' IDs who have " KILMER " as last name .

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


Question: Which city has the most bad aliases?

SELECT T2.city FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code GROUP BY T1.bad_alias ORDER BY COUNT(T1.zip_code) DESC LIMIT 1


Question: What is the anti-nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range?

SELECT T3.ANA FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T1.ID = T3.ID WHERE T2.`T-BIL` < 2.0 ORDER BY T2.`T-BIL` DESC LIMIT 1

What is the anti - nucleus antibody concentration of the patient whose total bilirubin is the highest in the normal range ?

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


Question: List the app users IDs and installed status for the event ID of 844.

SELECT app_id , IIF(is_installed = 1, 'YES', 'NO') AS status FROM app_events WHERE event_id = 844

List the app users IDs and installed status for the event ID of 844 .

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


Question: Name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22.

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2020-06-22' GROUP BY T1.name HAVING AVG(T2.percent_change_24h) > T2.PRICE

Name the coin that have higher than average percentage price changed from the previous 24 hours for transaction on 2013/6/22 .

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


Question: How many friends does Dan have?

SELECT count(T2.friend) FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T1.name  =  'Dan'


Question: What is the number of complaints related to Credit cards came from female clients?

SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T2.Product = 'Credit card'

What is the number of complaints related to Credit cards came from female clients ?

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


Question: What are all the distinct details of the customers?

SELECT DISTINCT customer_details FROM Customers

What are all the distinct details of the customers ?


Question: How many professors are teaching course ID 18?

SELECT COUNT(DISTINCT p_id) FROM taughtBy WHERE course_id = 18

How many professors are teaching course ID 18 ?


Question: Write down the name of players whose bowling skill is Legbreak.

SELECT T2.Player_Name FROM Bowling_Style AS T1 INNER JOIN Player AS T2 ON T1.Bowling_Id = T2.Bowling_skill WHERE T1.Bowling_skill = 'Legbreak'

Write down the name of players whose bowling skill is Legbreak .

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


Question: What are the ids for all shipments on the planet Mars that Turanga Leela manages?

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";

What are the ids for all shipments on the planet Mars that Turanga Leela manages ?

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


Question: List all payment methods and number of payments using each payment methods.

SELECT payment_method_code ,  count(*) FROM Customer_Payments GROUP BY payment_method_code;

List all payment methods and number of payments using each payment methods .

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


Question: Show the solution path for the method "Mosa.Platform.x86.Instructions.IMul.EmitLegacy"?

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'Mosa.Platform.x86.Instructions.IMul.EmitLegacy'

Show the solution path for the method " Mosa . Platform.x86.Instructions . IMul . EmitLegacy " ?

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


Question: List the names of regions that do not have any buildings.

SELECT Name FROM region WHERE Region_ID NOT IN (SELECT Region_ID FROM building)

List the names of regions that do not have any buildings .

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


Question: How many cities are located in the Bay Area?

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

How many cities are located in the Bay Area ?


Question: What is the highest elevation of an airport in the country of Iceland?

SELECT max(elevation) FROM airports WHERE country  =  'Iceland'

What is the highest elevation of an airport in the country of Iceland ?

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


Question: Find the number of professors in accounting department.

SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE DEPT_NAME  =  "Accounting"

Find the number of professors in accounting department .


Question: How many color cards with no borders have been ranked higher than 12000 on EDHRec?

SELECT COUNT(id) FROM cards WHERE edhrecRank > 12000 AND borderColor = 'borderless'

How many color cards with no borders have been ranked higher than 12000 on EDHRec ?

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


Question: List the names of all authors affiliated with Birkbeck University of London.

SELECT Name FROM Author WHERE Affiliation = 'Birkbeck University of London'

List the names of all authors affiliated with Birkbeck University of London .

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


Question: What are the names and locations of festivals?

SELECT Festival_Name ,  LOCATION FROM festival_detail

What are the names and locations of festivals ?


Question: Among the facilities that have undergone at least one inspection in 2010, how many of them are in ward no.42?

SELECT COUNT(DISTINCT T1.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.ward = 42

Among the facilities that have undergone at least one inspection in 2010 , how many of them are in ward no.42 ?

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


Question: What is the essay title of the project that have the highest total price excluding optional support and who is the biggest donor? Identify the donor and calculate how many percent did he/she donated in the project.

SELECT T1.title, T3.donor_acctid, CAST(T3.donation_to_project AS REAL) / T2.total_price_excluding_optional_support FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid ORDER BY T3.donation_to_project DESC LIMIT 1

What is the essay title of the project that have the highest total price excluding optional support and who is the biggest donor ? Identify the donor and calculate how many percent did he / she donated in the project .

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


Question: What is the district code for the School that does not offer a magnet program in the city of Fresno?

SELECT T1.`District Code` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.City = 'Fresno' AND T2.Magnet = 0

What is the district code for the School that does not offer a magnet program in the city of Fresno ?

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


Question: Show all advisors who have at least two students.

SELECT advisor FROM Student GROUP BY advisor HAVING count(*)  >=  2

Show all advisors who have at least two students .


Question: Who are the players that tend to be attacking when their mates were doing attack moves? List down their name.

SELECT DISTINCT t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.attacking_work_rate = 'high'

Who are the players that tend to be attacking when their mates were doing attack moves ? List down their name .

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


Question: Find the name and account balance of the customer whose name includes the letter ‘a’.

SELECT cust_name ,  acc_bal FROM customer WHERE cust_name LIKE '%a%'

Find the name and account balance of the customer whose name includes the letter ‘ a ’ .

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


Question: Count the number of papers.


Question: Find the name of the department that has no students minored in?

SELECT DName FROM DEPARTMENT EXCEPT SELECT T1.DName FROM DEPARTMENT AS T1 JOIN MINOR_IN AS T2 ON T1.DNO  =  T2.DNO

Find the name of the department that has no students minored in ?

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


Question: What was the percentage of the Bitcoins verifiably burned until 2018/4/28?

SELECT CAST((SUM(T2.max_supply) - SUM(T2.total_supply)) AS REAL) / SUM(T2.total_supply) FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date < '2018-04-28' AND T1.name = 'Bitcoin'

What was the percentage of the Bitcoins verifiably burned until 2018/4/28 ?


Question: What is the average writing score of the school who has the highest number of test takers whose total SAT sscores are greater or equal to 1500? Indicate the city to where the school is situated.

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

What is the average writing score of the school who has the highest number of test takers whose total SAT sscores are greater or equal to 1500 ? Indicate the city to where the school is situated .

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


Question: What are the numbers of constructors for different nationalities?

SELECT count(*) ,  nationality FROM constructors GROUP BY nationality

What are the numbers of constructors for different nationalities ?


Question: What is the total and maximum duration of trips with bike id 636?

SELECT sum(duration) ,  max(duration) FROM trip WHERE bike_id  =  636

What is the total and maximum duration of trips with bike i d 636 ?

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


Question: What is the pair of words that is repeated the most times? Identify them by their ID.

SELECT w1st, w2nd FROM biwords WHERE occurrences = ( SELECT MAX(occurrences) FROM biwords )

What is the pair of words that is repeated the most times ? Identify them by their ID .

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


Question: Indicate the name of the closed event whose cost has exceeded the budget the most.

SELECT T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T2.event_id = T1.link_to_event WHERE T1.event_status = 'Closed' AND T1.remaining < 0 ORDER BY T1.remaining LIMIT 1

Indicate the name of the closed event whose cost has exceeded the budget the most .

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


Question: How many solutions are in "https://github.com/derickbailey/presentations-and-training.git"?

SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/derickbailey/presentations-and-training.git'


Question: Count the number of different affiliation types.

SELECT count(DISTINCT affiliation) FROM university

Count the number of different affiliation types .


Question: What is the description of the category that tofu belongs to?

SELECT T1.Description FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.ProductName = 'tofu'

What is the description of the category that tofu belongs to ?

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


Question: Among the games released in 2004, what is the percentage of games on PSP?

SELECT CAST(COUNT(CASE WHEN T1.platform_name = 'PSP' THEN T3.game_id ELSE NULL END) AS REAL) * 100 / COUNT(T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T2.release_year = 2004

Among the games released in 2004 , what is the percentage of games on PSP ?

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


Question: Give the order ids for all orders, as well as the total product quantity in each.

SELECT order_id ,  sum(product_quantity) FROM Order_items GROUP BY order_id

Give the order ids for all orders , as well as the total product quantity in each .

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


Question: What are the names of parties that have both delegates on "Appropriations" committee and

SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Appropriations" INTERSECT SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID WHERE T1.Committee  =  "Economic Matters"

What are the names of parties that have both delegates on " Appropriations " committee and

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


Question: What is the race of the superhero with maximum attribute value?

SELECT T3.race FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN race AS T3 ON T1.race_id = T3.id ORDER BY T2.attribute_value DESC LIMIT 1

What is the race of the superhero with maximum attribute value ?

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


Question: What is the series note description of the series "SP.DYN.TO65.MA.ZS" which covers the topic "Health: Mortality" in 1967?

SELECT T2.Description FROM Series AS T1 INNER JOIN SeriesNotes AS T2 ON T1.SeriesCode = T2.Seriescode WHERE T1.SeriesCode = 'SP.DYN.TO65.MA.ZS' AND T1.Topic = 'Health: Mortality' AND T2.Year = 'YR1967'

What is the series note description of the series " SP.DYN.TO65.MA.ZS " which covers the topic " Health : Mortality " in 1967 ?

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


Question: Among public magnet schools,what percentage of schools that receive the donated resources as books?

SELECT CAST(SUM(CASE WHEN T1.project_resource_type = 'Books' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.projectid) FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.school_magnet = 't'

Among public magnet schools , what percentage of schools that receive the donated resources as books ?

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


Question: Find all the distinct id and nationality of drivers who have had laptime more than 100000 milliseconds?

SELECT DISTINCT T1.driverid ,  T1.nationality FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid WHERE T2.milliseconds >  100000

Find all the distinct i d and nationality of drivers who have had laptime more than 100000 milliseconds ?

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


Question: What is the average rating of inactive businesses?

SELECT CAST(SUM(stars) AS REAL) / COUNT(business_id) AS "average" FROM Business WHERE active LIKE 'FALSE'

What is the average rating of inactive businesses ?


Question: On which island does South Yorkshire situated? State it's longtitude and latitude.

SELECT DISTINCT T3.Longitude, T3.Latitude FROM city AS T1 INNER JOIN locatedOn AS T2 ON T1.Name = T2.City INNER JOIN island AS T3 ON T3.Name = T2.Island WHERE T1.Province = 'South Yorkshire'

On which island does South Yorkshire situated ? State it 's longtitude and latitude .

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


Question: What is the project in which 320 students will be impacted if the project is funded? Name the project and state the project cost.

SELECT T1.title, T2.total_price_excluding_optional_support FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.students_reached = 320

What is the project in which 320 students will be impacted if the project is funded ? Name the project and state the project cost .

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


Question: What is the name of the department that offers a course that has a description including the word "Statistics"?

SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'

What is the name of the department that offers a course that has a description including the word " Statistics " ?

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


Question: For the male users no older than 18, how many times have they given the highest rating?

SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age < 18 AND T2.u_gender = 'M'

For the male users no older than 18 , how many times have they given the highest rating ?

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


Question: State the number of questions that were asked in the "mental health survey for 2018".

SELECT COUNT(T1.QuestionID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2018'

State the number of questions that were asked in the " mental health survey for 2018 " .

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


Question: Name the Sales Manager of Europe, Middle East, and Africa region. In which office does he/she report to?

SELECT t2.firstName, t2.lastName FROM offices AS t1 INNER JOIN employees AS t2 ON t1.officeCode = t2.officeCode WHERE t2.jobTitle = 'Sale Manager (EMEA)'

Name the Sales Manager of Europe , Middle East , and Africa region . In which office does he / she report to ?

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


Question: What is the maximum length in meters for the bridges and what are the architects' names?

SELECT max(T1.length_meters) ,  T2.name FROM bridge AS T1 JOIN architect AS T2 ON T1.architect_id  =  T2.id

What is the maximum length in meters for the bridges and what are the architects ' names ?

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


Question: What are the names of the products that were ordered by Alejandro Grove?

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` = 'Alejandro Grove'

What are the names of the products that were ordered by Alejandro Grove ?

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


Question: The character Donald Duck has appeared in two Disney movies, which one has more grossing?

SELECT T1.movie_title FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T2.hero = 'Donald Duck' ORDER BY CAST(REPLACE(SUBSTR(total_gross, 2), ',', '') AS REAL) DESC LIMIT 1

The character Donald Duck has appeared in two Disney movies , which one has more grossing ?

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


Question: What are the start date and end date of the apartment bookings made by female guests (gender code "Female")?

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

What are the start date and end date of the apartment bookings made by female guests ( gender code " Female " ) ?

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


Question: What is the social number of the client who has the longest delay in his/her complaint? Calculate the days of delay and state the company's response to the consumer.

SELECT T1.social , 365 * (strftime('%Y', T2.`Date sent to company`) - strftime('%Y', T2.`Date received`)) + 30 * (strftime('%M', T2.`Date sent to company`) - strftime('%M', T2.`Date received`)) + (strftime('%d', T2.`Date sent to company`) - strftime('%d', T2.`Date received`)), T2.`Company response to consumer` FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID ORDER BY 365 * (strftime('%Y', T2.`Date sent to company`) - strftime('%Y', T2.`Date received`)) + 30 * (strftime('%M', T2.`Date sent to company`) - strftime('%M', T2.`Date received`)) + (strftime('%d', T2.`Date sent to company`) - strftime('%d', T2.`Date received`)) DESC LIMIT 1

What is the social number of the client who has the longest delay in his / her complaint ? Calculate the days of delay and state the company 's response to the consumer .

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


Question: Show the nations that have at least two members.

SELECT Nationality FROM member GROUP BY Nationality HAVING COUNT(*)  >=  2

Show the nations that have at least two members .


Question: What is the most common keyword among all the movies released in 2006?

SELECT T3.keyword_name FROM movie AS T1 INNER JOIN movie_keywords AS T2 ON T1.movie_id = T2.movie_id INNER JOIN keyword AS T3 ON T2.keyword_id = T3.keyword_id WHERE T1.release_date LIKE '2006%' GROUP BY T3.keyword_name ORDER BY COUNT(T3.keyword_name) DESC LIMIT 1

What is the most common keyword among all the movies released in 2006 ?

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


Question: Who is the youngest employee in the company? List employee's first and last name.

SELECT first_name , last_name FROM employees ORDER BY birth_date DESC LIMIT 1;

Who is the youngest employee in the company ? List employee 's first and last name .

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


Question: What are the names and balances of checking accounts belonging to the customer with the lowest savings balance?

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

What are the names and balances of checking accounts belonging to the customer with the lowest savings balance ?

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


Question: Provide the average revenue of all the French movies.

SELECT AVG(T1.revenue) 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'

Provide the average revenue of all the French movies .


Question: Show the names of customers having an order with shipping method FedEx and order status Paid.

SELECT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id WHERE shipping_method_code  =  'FedEx' AND order_status_code  =  'Paid'

Show the names of customers having an order with shipping method FedEx and order status Paid .

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


Question: If there are any, what are the websites address of the schools with a free meal count of 1,900-2,000 to students aged 5-17? Include the name of the school.

SELECT T2.Website, T1.`School Name` FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`Free Meal Count (Ages 5-17)` BETWEEN 1900 AND 2000 AND T2.Website IS NOT NULL

If there are any , what are the websites address of the schools with a free meal count of 1,900 - 2,000 to students aged 5 - 17 ? Include the name of the school .

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


Question: Which type of policy is most frequently used? Give me the policy type code.

SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1

Which type of policy is most frequently used ? Give me the policy type code .

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


Question: What are the countries of all airlines whose names start with Orbit?

SELECT country FROM airlines WHERE name LIKE 'Orbit%'

What are the countries of all airlines whose names start with Orbit ?

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


Question: What are the facility codes of the apartments with more than four bedrooms?

SELECT T1.facility_code FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.bedroom_count  >  4

What are the facility codes of the apartments with more than four bedrooms ?

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


Question: How many distinct order ids correspond to each product?

SELECT product_id ,  count(DISTINCT order_id) FROM Order_items GROUP BY product_id

How many distinct order ids correspond to each product ?

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


Question: Show all author names.


Question: Among the products under grains/cereals category, provide the contact person and title of the supplier with one digit ID.

SELECT DISTINCT T1.ContactName, T1.ContactTitle FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T3.CategoryName = 'Grains/Cereals' AND T1.SupplierID BETWEEN 1 AND 10 LIMIT 1

Among the products under grains / cereals category , provide the contact person and title of the supplier with one digit ID .

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


Question: What movies did director Jack Kinney direct?

SELECT name FROM director WHERE director = 'Jack Kinney'

What movies did director Jack Kinney direct ?


Question: What are the distinct grant amount for the grants where the documents were sent before '1986-08-26 20:49:27' and grant were ended after '1989-03-16 18:27:16'?

SELECT T1.grant_amount FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id WHERE T2.sent_date  <  '1986-08-26 20:49:27' INTERSECT SELECT grant_amount FROM grants WHERE grant_end_date  >  '1989-03-16 18:27:16'

What are the distinct grant amount for the grants where the documents were sent before ' 1986 - 08 - 26 20:49:27 ' and grant were ended after ' 1989 - 03 - 16 18:27:16 ' ?

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


Question: give me the name of channels that have both a director younger than 40 and a director older than 60.

SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id  =  t2.channel_id JOIN director AS t3 ON t2.director_id  =  t3.director_id WHERE t3.age  <  40 INTERSECT SELECT t1.name FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id  =  t2.channel_id JOIN director AS t3 ON t2.director_id  =  t3.director_id WHERE t3.age  >  60

give me the name of channels that have both a director younger than 40 and a director older than 60 .

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


Question: How many different colleges were represented at tryouts?

SELECT count(DISTINCT cName) FROM tryout

How many different colleges were represented at tryouts ?


Question: What are the number of packages shipped on Omicron Persei 8 planet or sent by Zapp Brannigan?

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name  =  "Zapp Brannigan" OR T4.Name  =  "Omicron Persei 8";

What are the number of packages shipped on Omicron Persei 8 planet or sent by Zapp Brannigan ?

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


Question: Calculate the difference between the average satisfaction of the students with high salaries and no salary.

SELECT AVG(T2.sat) - ( SELECT AVG(T2.sat) FROM RA AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'free' ) AS diff FROM RA AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'high'

Calculate the difference between the average satisfaction of the students with high salaries and no salary .

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


Question: How many orders in total have the customers in the household segment made?

SELECT COUNT(T1.o_orderkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_mktsegment = 'HOUSEHOLD'

How many orders in total have the customers in the household segment made ?

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


Question: Which region has the highest number of games sold on all platforms?

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

Which region has the highest number of games sold on all platforms ?

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


Question: Which accelerator name contains substring "Opera"?

SELECT name FROM web_client_accelerator WHERE name LIKE "%Opera%"

Which accelerator name contains substring " Opera " ?


Question: Please list the precise location coordinates of all the crimes in Central Chicago.

SELECT T2.latitude, T2.longitude FROM District AS T1 INNER JOIN Crime AS T2 ON T1.district_no = T2.district_no WHERE T1.district_name = 'Central'

Please list the precise location coordinates of all the crimes in Central Chicago .


Question: Indicates groups with id from 10 to 20 with singles downloaded at least 20.

SELECT groupName FROM torrents WHERE totalSnatched >= 20 AND releaseType LIKE 'single' AND id BETWEEN 10 AND 20

Indicates groups with i d from 10 to 20 with singles downloaded at least 20 .

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


Question: Find the university from which the professor who advised most undergraduate students graduated.

SELECT T1.graduate_from FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.type = 'UG' GROUP BY T1.prof_id ORDER BY COUNT(T2.student_id) DESC LIMIT 1

Find the university from which the professor who advised most undergraduate students graduated .

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


Question: Find the product category description of the product category with code "Spices".

SELECT product_category_description FROM ref_product_categories WHERE product_category_code  =  "Spices"

Find the product category description of the product category with code " Spices " .

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


Question: Find the the name of the customers who have a loan with amount more than 3000.

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE amount  >  3000

Find the the name of the customers who have a loan with amount more than 3000 .

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


Question: Provide all the transactions whereby the quantiy is more than 10,000 pieces. State the product name and the selling price.

SELECT DISTINCT T1.Name, T1.ListPrice FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 10000

Provide all the transactions whereby the quantiy is more than 10,000 pieces . State the product name and the selling price .

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


Question: State the full name of clients with server time of 20 minutes and above.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE strftime('%M', T2.ser_time) > '20'

State the full name of clients with server time of 20 minutes and above .

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


Question: Show the number of cities in counties that have a population more than 20000.

SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population  >  20000)

Show the number of cities in counties that have a population more than 20000 .

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


Question: What is the name and price of the cheapest product?

SELECT name ,  price FROM Products ORDER BY price ASC LIMIT 1

What is the name and price of the cheapest product ?

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


Question: Provide the inspection ID of the inspection with the comment "MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA" and sanitary operating requirement code of 7-38-030, 015, 010 (A), 005 (A).

SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspector_comment = 'MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA' AND T1.code = '7-38-030, 015, 010 (A), 005 (A)'

Provide the inspection ID of the inspection with the comment " MUST CLEAN AND BETTER ORGANIZE HALLWAY AREA " and sanitary operating requirement code of 7 - 38 - 030 , 015 , 010 ( A ) , 005 ( A ) .

O O B-COLUMN I-COLUMN O O B-TABLE B-COLUMN I-COLUMN I-COLUMN O B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O O 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 I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE O


Question: Show the hometowns shared by people older than 23 and younger than 20.

SELECT Hometown FROM people WHERE Age  >  23 INTERSECT SELECT Hometown FROM people WHERE Age  <  20

Show the hometowns shared by people older than 23 and younger than 20 .

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


Question: Please list the social security numbers of all the employees who work in California.

SELECT T1.ssn FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'CA'

Please list the social security numbers of all the employees who work in California .

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


Question: What are the names of customers who have taken out more than one loan?

SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING count(*)  >  1

What are the names of customers who have taken out more than one loan ?

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


Question: Which plane does the pilot Jones with age 32 has?

SELECT plane_name FROM pilotskills WHERE pilot_name  =  'Jones'  AND age  =  32

Which plane does the pilot Jones with age 32 has ?

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


Question: State the name of teams ranked first five or more times and lost a league two or more times between 1980 and 2000?

SELECT T1.name FROM teams AS T1 INNER JOIN series_post AS T2 ON T1.tmID = T2.tmIDLoser AND T1.year = T2.year WHERE T1.rank < 5 AND T2.lgIDLoser > 2 AND T2.year BETWEEN 1980 AND 2000

State the name of teams ranked first five or more times and lost a league two or more times between 1980 and 2000 ?

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


Question: Find the id and name of the staff who has been assigned for the shortest period.

SELECT T1.staff_id ,  T1.staff_name FROM staff AS T1 JOIN Staff_Department_Assignments AS T2 ON T1.staff_id  =  T2.staff_id ORDER BY date_assigned_to - date_assigned_from LIMIT 1

Find the i d and name of the staff who has been assigned for the shortest period .

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


Question: For the movie in which Tress MacNeille was the voice actor for its character "Hyacinth Hippo", what was the release date of that movie?

SELECT T1.release_date FROM characters AS T1 INNER JOIN `voice-actors` AS T2 ON T2.movie = T1.movie_title WHERE T2.character = 'Hyacinth Hippo' AND T2.`voice-actor` = 'Tress MacNeille'

For the movie in which Tress MacNeille was the voice actor for its character " Hyacinth Hippo " , what was the release date of that movie ?

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


Question: How many more stars in percentage are there for the repository of solution "1" than solution "2"?

SELECT CAST(SUM(CASE WHEN T2.Id = 1 THEN T1.Stars ELSE 0 END) - SUM(CASE WHEN T2.Id = 2 THEN T1.Stars ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T2.Id = 2 THEN T1.Stars ELSE 0 END) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId

How many more stars in percentage are there for the repository of solution " 1 " than solution " 2 " ?

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


Question: Which city is the address of the store named "FJA Filming" located in?

SELECT T1.City_Town FROM Addresses AS T1 JOIN Stores AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T2.Store_Name  =  "FJA Filming"

Which city is the address of the store named " FJA Filming " located in ?

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


Question: What is the highest pay rate of the employees who are exempt from collective bargaining?

SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.SalariedFlag = 1 ORDER BY T1.Rate DESC LIMIT 1

What is the highest pay rate of the employees who are exempt from collective bargaining ?

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


Question: Among the superheroes with height from 170 to 190, list the names of the superheroes with no eye color.

SELECT DISTINCT T1.superhero_name FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.height_cm BETWEEN 170 AND 190 AND T2.colour = 'No Colour'

Among the superheroes with height from 170 to 190 , list the names of the superheroes with no eye color .

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


Question: Find the average age and number of male students (with sex M) from each city.

SELECT count(*) ,  avg(age) ,  city_code FROM student WHERE sex  =  'M' GROUP BY city_code

Find the average age and number of male students ( with sex M ) from each city .

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


Question: Among the legislators who will end in 2009, how many are from the Republican party?

SELECT `END`, party FROM `current-terms` WHERE STRFTIME('%Y', `END`) = '2009' AND party = 'Republican'

Among the legislators who will end in 2009 , how many are from the Republican party ?

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


Question: For how many times has Aimee Bixby ordered the product Xerox 1952?

SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T1.`Customer Name` = 'Aimee Bixby' AND T3.`Product Name` = 'Xerox 1952'

For how many times has Aimee Bixby ordered the product Xerox 1952 ?

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


Question: What are the open and close dates of all the policies used by the customer who have "Diana" in part of their names?

SELECT t2.date_opened ,  t2.date_closed FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name LIKE "%Diana%"

What are the open and close dates of all the policies used by the customer who have " Diana " in part of their names ?

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


Question: Show the completed years shared by buildings with more than 20 stories and buildings with less than 15 stories.

SELECT Completed_Year FROM building WHERE Number_of_Stories  >  20 INTERSECT SELECT Completed_Year FROM building WHERE Number_of_Stories  <  15

Show the completed years shared by buildings with more than 20 stories and buildings with less than 15 stories .

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


Question: How many movies had a 'G' rating?

SELECT count(*) FROM movies WHERE rating  =  'G'


Question: Which city does has most number of customers?

SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY count(*) DESC LIMIT 1;

Which city does has most number of customers ?


Question: Wat is the tax source system code and master customer id of the taxes related to each parking fine id?

SELECT T1.source_system_code ,  T1.master_customer_id ,  T2.council_tax_id FROM CMI_Cross_References AS T1 JOIN Parking_Fines AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id

Wat is the tax source system code and master customer i d of the taxes related to each parking fine i d ?

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


Question: Please calculate the total value of Motorcycles orders.

SELECT SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN products AS T2 ON T1.productCode = T2.productCode WHERE T2.productLine = 'Motorcycles'

Please calculate the total value of Motorcycles orders .


Question: Which artist has the most albums?

SELECT T2.Name FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId GROUP BY T2.Name ORDER BY COUNT(*) DESC LIMIT 1


Question: How old is the youngest Japanese driver? What is his name?

SELECT STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', dob), forename , surname FROM drivers WHERE nationality = 'Japanese' ORDER BY dob DESC LIMIT 1

How old is the youngest Japanese driver ? What is his name ?

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


Question: What are the product assembly ID that come with unit measure code EA and BOM level of 2, at the same time have per assembly quantity of more than 10?

SELECT ProductAssemblyID FROM BillOfMaterials WHERE UnitMeasureCode = 'EA' AND BOMLevel = 2 AND PerAssemblyQty > 10

What are the product assembly ID that come with unit measure code EA and BOM level of 2 , at the same time have per assembly quantity of more than 10 ?

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


Question: What details are there on the research staff? List the result in ascending alphabetical order.

SELECT staff_details FROM Research_Staff ORDER BY staff_details ASC

What details are there on the research staff ? List the result in ascending alphabetical order .

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


Question: For each project id, how many staff does it have? List them in increasing order.

SELECT T1.project_id ,  count(*) FROM Project_Staff AS T1 JOIN Projects AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id ORDER BY count(*) ASC

For each project i d , how many staff does it have ? List them in increasing order .

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


Question: What are the names of people who are not entrepreneurs?

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

What are the names of people who are not entrepreneurs ?

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


Question: In which categories does the only business located in the city of Arcadia appear?

SELECT T1.category_name FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T3.city = 'Arcadia'

In which categories does the only business located in the city of Arcadia appear ?

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


Question: Work out the difference in revenues made between the English and Latin movies.

SELECT SUM(CASE WHEN T3.language_name = 'English' THEN T1.revenue ELSE 0 END) - SUM(CASE WHEN T3.language_name = 'Latin' THEN T1.revenue ELSE 0 END) AS DIFFERENCE FROM movie AS T1 INNER JOIN movie_languages AS T2 ON T1.movie_id = T2.movie_id INNER JOIN language AS T3 ON T2.language_id = T3.language_id

Work out the difference in revenues made between the English and Latin movies .

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


Question: How many students got an A in Applied Deep Learning?

SELECT COUNT(T2.student_id) FROM course AS T1 INNER JOIN registration AS T2 ON T1.course_id = T2.course_id WHERE T2.grade = 'A' AND T1.name = 'Applied Deep Learning '

How many students got an A in Applied Deep Learning ?

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


Question: More crimes happened in which community area in January, 2018, Woodlawn or Lincoln Square?

SELECT T1.community_area_name FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.community_area_name IN ('Woodlawn', 'Lincoln Square') AND T2.date LIKE '%1/2018%' GROUP BY T1.community_area_name ORDER BY COUNT(T1.community_area_name) DESC LIMIT 1

More crimes happened in which community area in January , 2018 , Woodlawn or Lincoln Square ?

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


Question: What are the card numbers of members from Kentucky?

SELECT card_number FROM member WHERE Hometown LIKE "%Kentucky%"

What are the card numbers of members from Kentucky ?

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


Question: Return the client ids for clients with two or more invoices?

SELECT client_id FROM Invoices GROUP BY client_id HAVING count(*)  >=  2

Return the client ids for clients with two or more invoices ?

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


Question: What is the name of the course with the highest satisfaction from students?

SELECT DISTINCT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.sat = 5

What is the name of the course with the highest satisfaction from students ?

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


Question: What is the publisher that has published the most expensive book?

SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T1.price DESC LIMIT 1

What is the publisher that has published the most expensive book ?


Question: What are the names of pilots between the ages of 30 and 40, ordered by age ascending?

SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age

What are the names of pilots between the ages of 30 and 40 , ordered by age ascending ?

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


Question: Write the person ID and character name of casts between order numbers 1 and 10 in Movie No. 285.

SELECT person_id, character_name FROM movie_cast WHERE movie_id = 285 AND cast_order BETWEEN 1 AND 10

Write the person ID and character name of casts between order numbers 1 and 10 in Movie No . 285 .

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


Question: Please list any three orders that caused a loss to the company.

SELECT `Order ID` FROM central_superstore WHERE Profit < 0 LIMIT 3

Please list any three orders that caused a loss to the company .


Question: What are the first year and last year of the parties whose theme is "Spring" or "Teqnology"?

SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "Spring" OR Party_Theme  =  "Teqnology"

What are the first year and last year of the parties whose theme is " Spring " or " Teqnology " ?

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


Question: How many games can be played on the Wii platform?

SELECT COUNT(T1.id) FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id WHERE T2.platform_name = 'Wii'

How many games can be played on the Wii platform ?


Question: What is the average number of review received by each business given that the user is an elite?

SELECT CAST(COUNT(T1.user_id) AS REAL) / COUNT(DISTINCT T1.business_id) FROM Reviews AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id

What is the average number of review received by each business given that the user is an elite ?

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


Question: Find the difference in percentage of the movies under keywords of "woman director" and "independent film".

SELECT CAST((SUM(CASE WHEN T1.keyword_name = 'woman director' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN T1.keyword_name = 'independent film' THEN 1 ELSE 0 END) FROM keyword AS T1 INNER JOIN movie_keywords AS T2 ON T1.keyword_id = T2.keyword_id

Find the difference in percentage of the movies under keywords of " woman director " and " independent film " .

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


Question: Among the players with a height of over 6'2" inches, how many of them were born in Sweden?

SELECT COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T2.height_in_inch > '6''2"' AND T1.nation = 'Sweden'

Among the players with a height of over 6'2 " inches , how many of them were born in Sweden ?

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


Question: What are the starting time and ending time of each detention record?

SELECT datetime_detention_start ,  datetime_detention_end FROM Detention

What are the starting time and ending time of each detention record ?

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


Question: In how many games in which the batting team was the Delhi Daredevils were no runs scored?

SELECT COUNT(T1.Runs_Scored) FROM Batsman_Scored AS T1 INNER JOIN Ball_by_Ball AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id INNER JOIN Team AS T4 ON T3.Team_1 = T4.Team_Id WHERE T2.Team_Batting = 1 OR T2.Team_Batting = 2 AND T4.Team_Name = 'Delhi Daredevils'

In how many games in which the batting team was the Delhi Daredevils were no runs scored ?

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


Question: What are the names of all the customers?

What are the names of all the customers ?


Question: What is the current address of customer Kandy?

SELECT T3.street_number, T3.street_name, T3.city FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN address_status AS T4 ON T4.status_id = T2.status_id WHERE T1.first_name = 'Kandy'

What is the current address of customer Kandy ?


Question: What is the total max price of the properties owned by single mothers or students?

SELECT sum(T1.price_max) FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id  =  T2.user_id WHERE T2.user_category_code  =  'Single Mother' OR T2.user_category_code  =  'Student';

What is the total max price of the properties owned by single mothers or students ?

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


Question: List the names of buildings in ascending order of number of stories.

SELECT Name FROM building ORDER BY Number_of_Stories ASC

List the names of buildings in ascending order of number of stories .

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


Question: Please list the names of the movies that have been rated the most times in 2020.

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_timestamp_utc LIKE '2020%' GROUP BY T2.movie_title ORDER BY COUNT(T2.movie_title) DESC LIMIT 1

Please list the names of the movies that have been rated the most times in 2020 .

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


Question: Please list all of the paragraphs that have the character name Aedile.

SELECT T2.ParagraphNum FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T1.CharName = 'Aedile'

Please list all of the paragraphs that have the character name Aedile .

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


Question: What are the different cities that have more than 100 memberships?

SELECT DISTINCT city FROM branch WHERE membership_amount  >=  100

What are the different cities that have more than 100 memberships ?

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


Question: What was Lewis Hamilton's final rank in the 2008 Chinese Grand Prix?

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

What was Lewis Hamilton 's final rank in the 2008 Chinese Grand Prix ?

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


Question: What is the name of the director who is in the "Dracula" program?

SELECT t2.name FROM program AS t1 JOIN director AS t2 ON t1.director_id  =  t2.director_id WHERE t1.title  =  'Dracula'

What is the name of the director who is in the " Dracula " program ?

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


Question: When was the movie Cops released?

SELECT movie_release_year FROM movies WHERE movie_title = 'Cops'


Question: Show the names of the buildings that have more than one company offices.

SELECT T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id GROUP BY T1.building_id HAVING COUNT(*)  >  1

Show the names of the buildings that have more than one company offices .

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


Question: What was the longest time a driver had ever spent at a pit stop?

SELECT duration FROM pitStops ORDER BY duration DESC LIMIT 1

What was the longest time a driver had ever spent at a pit stop ?

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


Question: Find the job ID for those jobs which average salary is above 8000.

SELECT job_id FROM employees GROUP BY job_id HAVING AVG(salary) > 8000

Find the job ID for those jobs which average salary is above 8000 .

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


Question: Find the details of the customers who have used the least-used service .

select distinct t1.customer_details from customers as t1 join customers_and_services as t2 on t1.customer_id  =  t2.customer_id where t2.service_id  =  (select service_id from services group by service_id order by count(*) asc limit 1)

Find the details of the customers who have used the least - used service .

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


Question: How many games are held after season 2007?

SELECT count(*) FROM game WHERE season  >  2007

How many games are held after season 2007 ?


Question: What is the email of the student with first name "Emma" and last name "Rohan"?

SELECT email_address FROM Students WHERE first_name  =  "Emma" AND last_name  =  "Rohan"

What is the email of the student with first name " Emma " and last name " Rohan " ?

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


Question: In total, how many orders were shipped via United Package?

SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package'

In total , how many orders were shipped via United Package ?

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


Question: For each branch id, what are the names of the branches that were registered after 2015?

SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id

For each branch i d , what are the names of the branches that were registered after 2015 ?

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


Question: Please list the titles of all the films under the category of "Horror" and has a rental rate of $2.99.

SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rental_rate = 2.99

Please list the titles of all the films under the category of " Horror " and has a rental rate of $ 2.99 .

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


Question: Which recipes contain almond extract?

SELECT T1.title FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T3.name = 'almond extract'


Question: What is the name of the product with the highest net profit?

SELECT T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') DESC LIMIT 1

What is the name of the product with the highest net profit ?

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


Question: Return the names of shops, ordered by year of opening ascending.

SELECT Shop_Name FROM shop ORDER BY Open_Year ASC

Return the names of shops , ordered by year of opening ascending .


Question: Which distinct source system code includes the substring 'en'?

SELECT DISTINCT source_system_code FROM cmi_cross_references WHERE source_system_code LIKE '%en%'

Which distinct source system code includes the substring ' en ' ?

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


Question: How many routine inspections did Tiramisu Kitchen have?

SELECT COUNT(T1.business_id) FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.type = 'Routine - Unscheduled' AND T2.name = 'Tiramisu Kitchen'

How many routine inspections did Tiramisu Kitchen have ?

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


Question: How many schools are there?


Question: what are the average and maximum profit of a year for all presses?

SELECT avg(Year_Profits_billion) ,  max(Year_Profits_billion) FROM press

what are the average and maximum profit of a year for all presses ?


Question: Which countries do not have any drivers?

SELECT country FROM country WHERE country_id NOT IN (SELECT country FROM driver)

Which countries do not have any drivers ?


Question: For patients with alkaliphophatase (ALP) within normal range, were they treated as inpatient or outpatient?

SELECT T1.Admission FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALP < 300

For patients with alkaliphophatase ( ALP ) within normal range , were they treated as inpatient or outpatient ?

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


Question: Which are the cards that have incredibly powerful foils.

SELECT id FROM cards WHERE cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL

Which are the cards that have incredibly powerful foils .


Question: What are the titles of all movies that James Cameron directed after 2000?

SELECT title FROM Movie WHERE director = 'James Cameron' AND YEAR  >  2000

What are the titles of all movies that James Cameron directed after 2000 ?

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


Question: Which one is the cheapest business book?

SELECT title FROM titles WHERE type = 'business' ORDER BY price LIMIT 1

Which one is the cheapest business book ?


Question: How many music festivals have had each kind of result, ordered descending by count?

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

How many music festivals have had each kind of result , ordered descending by count ?

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


Question: List the names of alcohol free recipes.

SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol = 0

List the names of alcohol free recipes .


Question: How much is the total fine given to Ron of Japan Inc in its inspection done on February 2014?

SELECT SUM(T3.fine) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN violation AS T3 ON T2.inspection_id = T3.inspection_id WHERE strftime('%Y-%m', T2.inspection_date) = '2014-02' AND T1.dba_name = 'RON OF JAPAN INC'

How much is the total fine given to Ron of Japan Inc in its inspection done on February 2014 ?

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


Question: How many mountains are there in the country with the most land area?

SELECT COUNT(Mountain) FROM geo_mountain WHERE Country = ( SELECT Code FROM country ORDER BY Area DESC LIMIT 1 )

How many mountains are there in the country with the most land area ?

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


Question: What is the maximum elevation of all airports in the country of Iceland?

SELECT max(elevation) FROM airports WHERE country  =  'Iceland'

What is the maximum elevation of all airports in the country of Iceland ?

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


Question: What's the rating of the episode in which Dan Castellaneta won the Outstanding Voice-Over Performance award in 2009?

SELECT T2.rating FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.award = 'Outstanding Voice-Over Performance' AND SUBSTR(T1.year, 1, 4) = '2009' AND T1.person = 'Dan Castellaneta';

What 's the rating of the episode in which Dan Castellaneta won the Outstanding Voice - Over Performance award in 2009 ?

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


Question: Count the number of staff in each meeting by meeting id.

SELECT meeting_id ,  count(*) FROM Staff_in_meetings GROUP BY meeting_id

Count the number of staff in each meeting by meeting i d.

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


Question: Which category does the product named "flax" belong to?

SELECT product_category_code FROM products WHERE product_name  =  "flax"

Which category does the product named " flax " belong to ?

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


Question: List the Title and Developers of all games ordered by units sold from large to small.

SELECT Title ,  Developers FROM game ORDER BY Units_sold_Millions DESC

List the Title and Developers of all games ordered by units sold from large to small .

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


Question: Count the number of pilots with age greater than 40.

SELECT count(*) FROM pilotskills WHERE age  >  40

Count the number of pilots with age greater than 40 .

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


Question: How many districts are there in the police district building with a zip code of 60608?

SELECT COUNT(*) AS cnt FROM District WHERE zip_code = 60608

How many districts are there in the police district building with a zip code of 60608 ?

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


Question: Among all asian restaurants in N. Milpitas Blvd., Milpitas, how many of them have restaurant ID greater than 385?

SELECT COUNT(T1.id_restaurant) AS num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.city = 'milpitas' AND T2.food_type = 'asian' AND T1.street_name = 'n milpitas blvd' AND T1.id_restaurant > 385

Among all asian restaurants in N. Milpitas Blvd . , Milpitas , how many of them have restaurant ID greater than 385 ?

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


Question: Show all order status and the number of orders in each status.

SELECT order_status_code ,  count(*) FROM Customer_orders GROUP BY order_status_code

Show all order status and the number of orders in each status .

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


Question: Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23, 2010.

SELECT Adults FROM Reservations WHERE CheckIn  =  "2010-10-23" AND FirstName  =  "CONRAD" AND LastName  =  "SELBIG";

Find the number of adults for the room reserved and checked in by CONRAD SELBIG on Oct 23 , 2010 .

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


Question: What is the company where Eduardo Martins is a customer?

SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins";

What is the company where Eduardo Martins is a customer ?

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


Question: Among the schools whose donators are teachers, what is the percentage of schools that are in Brooklyn?

SELECT CAST(SUM(CASE WHEN T1.school_city LIKE 'Brooklyn' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.teacher_acctid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.is_teacher_acct = 't'

Among the schools whose donators are teachers , what is the percentage of schools that are in Brooklyn ?

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


Question: How many movies have "vi" as their language code?

SELECT COUNT(T1.movie_id) FROM movie_languages AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.language_code = 'vi'

How many movies have " vi " as their language code ?

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


Question: Tell me the location of the club "Hopkins Student Enterprises".

SELECT clublocation FROM club WHERE clubname  =  "Hopkins Student Enterprises"

Tell me the location of the club " Hopkins Student Enterprises " .

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


Question: What are the names of climbers and the corresponding names of mountains that they climb?

SELECT T1.Name ,  T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

What are the names of climbers and the corresponding names of mountains that they climb ?

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


Question: What is the shipment ID of the heaviest shipment that Zachery Hicks transported?

SELECT T1.ship_id FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' ORDER BY T1.weight DESC LIMIT 1

What is the shipment ID of the heaviest shipment that Zachery Hicks transported ?

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


Question: Among all addresses provided by customers, identify the percentage that are not in use anymore.

SELECT CAST(SUM(CASE WHEN T2.address_status = 'Inactive' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer_address AS T1 INNER JOIN address_status AS T2 ON T2.status_id = T1.status_id

Among all addresses provided by customers , identify the percentage that are not in use anymore .

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


Question: How many companies operates airlines in each airport?

SELECT T3.id ,  count(*) FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id JOIN airport AS T3 ON T2.airport_id  =  T3.id GROUP BY T3.id

How many companies operates airlines in each airport ?


Question: Give the number of orders that were shipped by "Federal Shipping".

SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'Federal Shipping'

Give the number of orders that were shipped by " Federal Shipping " .

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


Question: What are the total account balances for each customer from Utah or Texas?

SELECT sum(acc_bal) FROM customer WHERE state  =  'Utah' OR state  =  'Texas'

What are the total account balances for each customer from Utah or Texas ?

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


Question: What is the total number of hours for all projects?

What is the total number of hours for all projects ?


Question: Please list the descriptions of all the high risk violations of Tiramisu Kitchen.

SELECT DISTINCT T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T2.name = 'Tiramisu Kitchen'

Please list the descriptions of all the high risk violations of Tiramisu Kitchen .

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


Question: How many crime against property are there?

SELECT COUNT(*) AS cnt FROM FBI_Code WHERE crime_against = 'Property'

How many crime against property are there ?


Question: List the game IDs that were released in 2017.

SELECT T.id FROM game_platform AS T WHERE T.release_year = 2017

List the game IDs that were released in 2017 .


Question: Mention the titile of paper writen by Joe Lograsso.

SELECT T1.Title FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Joe Lograsso'

Mention the titile of paper writen by Joe Lograsso .

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


Question: What is the occurrence of the word "nombre"?

SELECT occurrences FROM words WHERE word = 'nombre'

What is the occurrence of the word " nombre " ?

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


Question: Find the number of spokesmen for each district, and the show district names as well.

SELECT t1.name ,  count(*) FROM district AS t1 JOIN spokesman_district AS t2 ON t1.District_ID  =  t2.District_ID GROUP BY t2.District_ID

Find the number of spokesmen for each district , and the show district names as well .

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


Question: Find the percentage of discontinued products in Northwind's portfolio of products.

SELECT CAST(COUNT(CASE WHEN Discontinued = 1 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(ProductID) FROM Products

Find the percentage of discontinued products in Northwind 's portfolio of products .

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


Question: Of the clients whose businesses are located in the city of Boston, calculate which of them has a higher average amount of payment.

SELECT T1.customerNumber FROM customers AS T1 INNER JOIN payments AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.city = 'Boston' GROUP BY T1.customerNumber ORDER BY SUM(T2.amount) / COUNT(T2.paymentDate) DESC LIMIT 1

Of the clients whose businesses are located in the city of Boston , calculate which of them has a higher average amount of payment .

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


Question: Which employees do not have clearance in Mars? List employee's name.

SELECT Name FROM Employee EXCEPT SELECT T2.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID WHERE T3.Name = "Mars";

Which employees do not have clearance in Mars ? List employee 's name .

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


Question: Return the ids, sic codes, and agency ids of clients who have attended 1 meeting and had an invoice.

SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id HAVING count(*)  =  1 INTERSECT SELECT T1.client_id ,  T1.sic_code ,  T1.agency_id FROM clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id

Return the ids , sic codes , and agency ids of clients who have attended 1 meeting and had an invoice .

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


Question: What city is the headquarter of the store Blackville?

SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id WHERE t1.store_name  =  "Blackville"

What city is the headquarter of the store Blackville ?


Question: Show the park of the roller coaster with the highest speed.

SELECT Park FROM roller_coaster ORDER BY Speed DESC LIMIT 1

Show the park of the roller coaster with the highest speed .

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


Question: Mention the full name, hired date and performance status of the employee whose location is in Utah state.

SELECT T1.firstname, T1.lastname, T1.hiredate, T1.performance FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.state = 'UT'

Mention the full name , hired date and performance status of the employee whose location is in Utah state .

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


Question: What is the stories of highest building?

SELECT Stories FROM buildings ORDER BY Height DESC LIMIT 1

What is the stories of highest building ?


Question: How many matches did the Sunrisers Hyderabad team win in 2013?

SELECT SUM(CASE WHEN Match_Date LIKE '2013%' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Match_Winner = T2.Team_Id WHERE T2.Team_Name = 'Sunrisers Hyderabad'

How many matches did the Sunrisers Hyderabad team win in 2013 ?

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


Question: How many different advisors are listed?

SELECT count(DISTINCT advisor) FROM Student

How many different advisors are listed ?


Question: Show home city where at least two drivers older than 40 are from.

SELECT home_city FROM driver WHERE age  >  40 GROUP BY home_city HAVING count(*)  >=  2

Show home city where at least two drivers older than 40 are from .

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


Question: How many distinct parties are there for representatives?

SELECT count(DISTINCT Party) FROM representative

How many distinct parties are there for representatives ?


Question: List the names of the schools without any endowment.

SELECT school_name FROM school WHERE school_id NOT IN (SELECT school_id FROM endowment)

List the names of the schools without any endowment .


Question: Among all the employees who don't wish to receive promotion e-mails, how many of them belong to or once belonged to the Engineering Department?

SELECT COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T1.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' AND T2.EmailPromotion = 0

Among all the employees who do n't wish to receive promotion e - mails , how many of them belong to or once belonged to the Engineering Department ?

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


Question: Determine the number of shipments delivered by Andrea Simons to Huntsville in 2016.

SELECT COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN driver AS T3 ON T3.driver_id = T1.driver_id WHERE T3.first_name = 'Andrea' AND T3.last_name = 'Simons' AND T2.city_name = 'Huntsville' AND STRFTIME('%Y', T1.ship_date) = '2016'

Determine the number of shipments delivered by Andrea Simons to Huntsville in 2016 .

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


Question: Indicate street and number of the Adelitas Taqueria Restaurants.

SELECT T1.street_name, T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'adelitas taqueria'

Indicate street and number of the Adelitas Taqueria Restaurants .

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


Question: Give me the description of the service type that offers not only the photo product but also the film product.

SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'photo' INTERSECT SELECT T1.Service_Type_Description FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code WHERE T2.Product_Name  =  'film'

Give me the description of the service type that offers not only the photo product but also the film product .

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


Question: Find the ids of the problems reported after 1978-06-26.

SELECT problem_id FROM problems WHERE date_problem_reported > "1978-06-26"

Find the ids of the problems reported after 1978 - 06 - 26 .

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


Question: What is the largest quantity of "Manjimup Dried Apples" for an order?

SELECT T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T2.ProductID = T1.ProductID WHERE T1.ProductName = 'Manjimup Dried Apples' ORDER BY T2.Quantity DESC LIMIT 1

What is the largest quantity of " Manjimup Dried Apples " for an order ?

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


Question: How many basic or medium undergraduate courses are taught by a professor?

SELECT COUNT(*) FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id INNER JOIN person AS T3 ON T3.p_id = T2.p_id WHERE T1.courseLevel = 'Level_300' AND T3.professor = 1

How many basic or medium undergraduate courses are taught by a professor ?

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


Question: Return the types of film market estimations in 1995.

SELECT TYPE FROM film_market_estimation WHERE YEAR  =  1995

Return the types of film market estimations in 1995 .

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


Question: Show the number of all customers without an account.

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

Show the number of all customers without an account .


Question: Give the different locations of tracks.

Give the different locations of tracks .


Question: How much is the car with the highest sweep volume?

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

How much is the car with the highest sweep volume ?


Question: How many distinct companies are there?

SELECT count(DISTINCT Company) FROM entrepreneur


Question: Find the name of customers who have both saving and checking account types.

SELECT cust_name FROM customer WHERE acc_type  =  'saving' INTERSECT SELECT cust_name FROM customer WHERE acc_type  =  'checking'

Find the name of customers who have both saving and checking account types .

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


Question: What is the average price for products with type Clothes?

SELECT avg(product_price) FROM Products WHERE product_type_code  =  "Clothes"

What is the average price for products with type Clothes ?

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


Question: What is the winery at which the wine with the highest score was made?

SELECT Winery FROM WINE ORDER BY SCORE LIMIT 1

What is the winery at which the wine with the highest score was made ?

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


Question: What is reference name of Robert Kubica?

SELECT driverRef FROM drivers WHERE forename = 'Robert' AND surname = 'Kubica'

What is reference name of Robert Kubica ?


Question: In 1975, what was the average point of all-star players coming from the USA?

SELECT AVG(T2.points) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.season_id = 1975

In 1975 , what was the average point of all - star players coming from the USA ?

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


Question: Convert all temperature recorded at San Francisco city during August 2013 into degree Celsius.

SELECT (max_temperature_f - 32) / 1.8000 , (mean_temperature_f - 32) / 1.8000 , (min_temperature_f - 32) / 1.8000 FROM weather WHERE SUBSTR(CAST(date AS TEXT), 1, INSTR(date, '/') - 1) = '8' AND SUBSTR(CAST(date AS TEXT), -4) = '2013' AND zip_code = 94107

Convert all temperature recorded at San Francisco city during August 2013 into degree Celsius .

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


Question: How many times more is the number of games which were published by Atari than Athena?

SELECT CAST(COUNT(CASE WHEN T1.publisher_name = 'Atari' THEN T2.game_id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T1.publisher_name = 'Athena' THEN T2.game_id ELSE NULL END) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id

How many times more is the number of games which were published by Atari than Athena ?

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


Question: What are the maximum and minimum age of students with major 600?

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

What are the maximum and minimum age of students with major 600 ?

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


Question: List the employees' full names and ages in 2022 who lived in London.

SELECT TitleOfCourtesy, FirstName, LastName , TIMESTAMPDIFF(YEAR, BirthDate, NOW()) AS ages FROM Employees WHERE City = 'London'

List the employees ' full names and ages in 2022 who lived in London .

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


Question: What is the last name of the student who received an A in the class with the code 10018?

SELECT T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'A' AND T2.class_code  =  10018

What is the last name of the student who received an A in the class with the code 10018 ?

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


Question: List down the game ID of games with genre ID 2.

SELECT T.id FROM game AS T WHERE T.genre_id = 2

List down the game ID of games with genre ID 2 .

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


Question: Show names of parties that does not have any members.

SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)

Show names of parties that does not have any members .


Question: Show the name and date for each race and its track name.

SELECT T1.name ,  T1.date ,  T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id

Show the name and date for each race and its track name .

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


Question: Show the album names and ids for albums that contain tracks with unit price bigger than 1.

SELECT T1.Title ,  T2.AlbumID FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId WHERE T2.UnitPrice  >  1 GROUP BY T2.AlbumID

Show the album names and ids for albums that contain tracks with unit price bigger than 1 .

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


Question: What are department ids for departments with managers managing more than 3 employees?

SELECT DISTINCT department_id FROM employees GROUP BY department_id ,  manager_id HAVING COUNT(employee_id)  >= 4

What are department ids for departments with managers managing more than 3 employees ?

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


Question: In 1976, how many goals achieved by team 'BIR' in Division 'EW'?

SELECT SUM(T2.G) FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.divID = 'EW' AND T1.tmID = 'BIR' AND T1.year = 1976

In 1976 , how many goals achieved by team ' BIR ' in Division ' EW ' ?

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


Question: List the dates of all shipments.


Question: What is the shipment duration for order number CA-2011-134103?

SELECT DISTINCT strftime('%J', `Ship Date`) - strftime('%J', `Order Date`) AS duration FROM central_superstore WHERE `Order ID` = 'CA-2011-134103'

What is the shipment duration for order number CA-2011 - 134103 ?

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


Question: List all schools and their nicknames in the order of founded year.

SELECT school ,  nickname FROM university ORDER BY founded

List all schools and their nicknames in the order of founded year .

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


Question: Find the name of the customer who made the order of the largest amount of goods.

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

Find the name of the customer who made the order of the largest amount of goods .

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


Question: Among the legislators who have served in the U.S. House, provide the party and the state of the legislators who were born in 1738.

SELECT T1.party, T1.state FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.house_history_id IS NOT NULL AND T2.birthday_bio LIKE '%1738%'

Among the legislators who have served in the U.S. House , provide the party and the state of the legislators who were born in 1738 .

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


Question: Please list the names of all the customers who had ordered the product "Telescoping Adjustable Floor Lamp".

SELECT DISTINCT T1.`Customer Name` FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T2.`Product ID` WHERE T3.`Product Name` = 'Telescoping Adjustable Floor Lamp'

Please list the names of all the customers who had ordered the product " Telescoping Adjustable Floor Lamp " .

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


Question: Show card number, name, and hometown for all members in a descending order of level.

SELECT card_number ,  name ,  hometown FROM member ORDER BY LEVEL DESC

Show card number , name , and hometown for all members in a descending order of level .

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


Question: Show ids for all employees who don't have a certificate.

SELECT eid FROM Employee EXCEPT SELECT eid FROM Certificate

Show ids for all employees who do n't have a certificate .

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


Question: What is the longest trip duration according? Convert the it to number of days.

SELECT MAX(duration), CAST(MAX(duration) AS REAL) / 86400 FROM trip

What is the longest trip duration according ? Convert the it to number of days .

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


Question: How many students did Harvard University have in 2011?

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

How many students did Harvard University have in 2011 ?

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


Question: What is total amount claimed summed across all the claims?

What is total amount claimed summed across all the claims ?

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


Question: Give the ids of documents that have expenses and contain the letter s in their names.

SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T1.document_name LIKE '%s%'

Give the ids of documents that have expenses and contain the letter s in their names .

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


Question: Select contents of all boxes with a value larger than $150.

SELECT CONTENTS FROM boxes WHERE Value  >  150

Select contents of all boxes with a value larger than $ 150 .

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


Question: State the total number of the attribute classes.

SELECT COUNT(ATT_CLASS_ID) FROM ATT_CLASSES

State the total number of the attribute classes .


Question: What is the zip code of the customer Carole Bernhard?

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

What is the zip code of the customer Carole Bernhard ?

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


Question: Count the number of properties with at least two features.

SELECT count(*) FROM Properties GROUP BY property_id HAVING count(*)  >= 2;

Count the number of properties with at least two features .


Question: What is the pay rate of the employee who has the longest vacation hours?

SELECT T1.Rate FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.VacationHours DESC LIMIT 1

What is the pay rate of the employee who has the longest vacation hours ?

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


Question: Return the hispanic percentage for cities in which the black percentage is greater than 10.

SELECT Hispanic FROM city WHERE Black  >  10

Return the hispanic percentage for cities in which the black percentage is greater than 10 .

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


Question: What are the names and types of the dorms that have a capacity greater than 300 or less than 100?

SELECT dorm_name ,  gender FROM dorm WHERE student_capacity  >  300 OR student_capacity  <  100

What are the names and types of the dorms that have a capacity greater than 300 or less than 100 ?

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


Question: Please list the numbers of males in all the residential areas in Arecibo county.

SELECT SUM(T1.male_population) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO'

Please list the numbers of males in all the residential areas in Arecibo county .

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


Question: Provide the order ID of Frank Olsen of the South region.

SELECT T1.`Order ID` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T2.Region = 'South' AND T2.`Customer Name` = 'Frank Olsen'

Provide the order ID of Frank Olsen of the South region .

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


Question: What is the most liked repository? Indicate its github address and the amount of stars it has received.

SELECT Url, Stars FROM Repo WHERE Stars = ( SELECT MAX(Stars) FROM Repo )

What is the most liked repository ? Indicate its github address and the amount of stars it has received .

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


Question: How many stroke patients have married?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Stroke' AND T1.marital = 'M'


Question: List the names of people that are not perpetrators.

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

List the names of people that are not perpetrators .


Question: Return the minimum, maximum, and average seating across all tracks.

SELECT min(seating) ,  max(seating) ,  avg(seating) FROM track

Return the minimum , maximum , and average seating across all tracks .


Question: Count the number of tests with "Fail" result.

SELECT count(*) FROM Student_Tests_Taken WHERE test_result  =  "Fail"

Count the number of tests with " Fail " result .