Question: What is the full name and id of the customer who has the lowest total amount of payment?

SELECT T1.first_name ,  T1.last_name ,  T1.customer_id FROM customer AS T1 JOIN payment AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id ORDER BY sum(amount) ASC LIMIT 1

What is the full name and i d of the customer who has the lowest total amount of payment ?

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


Question: How many songs, on average, are sung by a female artist?

SELECT avg(T2.rating) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T1.gender  =  "Female"

How many songs , on average , are sung by a female artist ?

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


Question: What is the job position currently occupied by Ken J SÃ¡nchez?

SELECT T1.JobTitle FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.FirstName = 'Ken' AND T2.MiddleName = 'J' AND T2.LastName = 'Sánchez'

What is the job position currently occupied by Ken J SÃ¡nchez ?

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


Question: Please list the IDs of all the cars with double sides on trains that run in the west direction.

SELECT T1.id FROM cars AS T1 INNER JOIN trains AS T2 ON T1.train_id = T2.id WHERE T2.direction = 'east' AND T1.sides = 'double'

Please list the IDs of all the cars with double sides on trains that run in the west direction .

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


Question: Show the ids of the students who don't participate in any activity.

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Participates_in

Show the ids of the students who do n't participate in any activity .

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


Question: What are the average and total values across all boxes?

SELECT avg(value) ,  sum(value) FROM boxes

What are the average and total values across all boxes ?


Question: How many courses are offered?

SELECT count(DISTINCT crs_code) FROM CLASS


Question: Which restaurant has the highest total number of high risk violations?

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

Which restaurant has the highest total number of high risk violations ?

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


Question: display all the details from Employees table for those employees who was hired before 2002-06-21.

SELECT * FROM employees WHERE hire_date  <  '2002-06-21'

display all the details from Employees table for those employees who was hired before 2002 - 06 - 21 .

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


Question: What are the names of representatives with more than 10000 votes in election?

SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID WHERE Votes  >  10000

What are the names of representatives with more than 10000 votes in election ?

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


Question: List the name of all rooms sorted by their prices.

SELECT roomName FROM Rooms ORDER BY basePrice;

List the name of all rooms sorted by their prices .

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


Question: From 1980 to 1983, how many of the NBA All-Star players have more than 60% three point rate?

SELECT DISTINCT T2.playerID FROM player_allstar AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.year BETWEEN 1980 AND 1983 AND T1.three_made / T1.three_attempted > 0.6

From 1980 to 1983 , how many of the NBA All - Star players have more than 60 % three point rate ?

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


Question: What are the names of all male British artists?

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

What are the names of all male British artists ?


Question: What is the long passing score of the oldest player?

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

What is the long passing score of the oldest player ?

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


Question: How many trucks were manufactured in year 2009?

SELECT COUNT(truck_id) FROM truck WHERE model_year = 2009

How many trucks were manufactured in year 2009 ?


Question: Which publisher has published the most games in the 'Puzzle' genre?

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

Which publisher has published the most games in the ' Puzzle ' genre ?

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


Question: Count the number of different official languages corresponding to countries that players who play Defender are from.

SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"

Count the number of different official languages corresponding to countries that players who play Defender are from .

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


Question: Please list the top 5 products with the most orders.

SELECT T1.Name FROM Product AS T1 INNER JOIN SalesOrderDetail AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.Name ORDER BY SUM(T2.OrderQty) DESC LIMIT 0, 5

Please list the top 5 products with the most orders .


Question: Which indicator name uses the Weighted average method and has the lowest value?

SELECT T1.IndicatorName, MIN(T1.Value) FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.AggregationMethod = 'Weighted average'

Which indicator name uses the Weighted average method and has the lowest value ?

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


Question: What is the difference in the most populated city of Allentown-Bethlehem-Easton, PA-NJ in 2020 against its population in 2010?

SELECT T1.population_2020 - T1.population_2010 AS result_data FROM zip_data AS T1 INNER JOIN CBSA AS T2 ON T1.CBSA = T2.CBSA WHERE T2.CBSA_name = 'Allentown-Bethlehem-Easton, PA-NJ' ORDER BY T1.population_2020 DESC LIMIT 1

What is the difference in the most populated city of Allentown - Bethlehem - Easton , PA - NJ in 2020 against its population in 2010 ?

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


Question: In which city the 2004 Summer was held?

SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_name = '2004 Summer'

In which city the 2004 Summer was held ?


Question: Return the average, maximum, and minimum budgets in millions for movies made before the year 2000.

SELECT avg(budget_million) ,  max(budget_million) ,  min(budget_million) FROM movie WHERE YEAR  <  2000

Return the average , maximum , and minimum budgets in millions for movies made before the year 2000 .

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


Question: List the carriers of devices that have no devices in stock.

SELECT Carrier FROM device WHERE Device_ID NOT IN (SELECT Device_ID FROM stock)

List the carriers of devices that have no devices in stock .

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


Question: List the title and location of all sculptures.

SELECT title ,  LOCATION FROM sculptures

List the title and location of all sculptures .


Question: Return the gender and name of artist who produced the song with the lowest resolution.

SELECT T1.gender ,  T1.artist_name FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name ORDER BY T2.resolution LIMIT 1

Return the gender and name of artist who produced the song with the lowest resolution .

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


Question: How many scenes are there on average in one act in Twelfth Night?

SELECT SUM(T2.Scene) / COUNT(T2.Act) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.Title = 'Twelfth Night'

How many scenes are there on average in one act in Twelfth Night ?

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


Question: How many percent of orders in 2020 used international shipping?

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

How many percent of orders in 2020 used international shipping ?

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


Question: What is the phone and email for customer with first name Aniyah and last name Feest?

SELECT customer_phone ,  customer_email FROM Customers WHERE customer_first_name  =  "Aniyah" AND customer_last_name  =  "Feest"

What is the phone and email for customer with first name Aniyah and last name Feest ?

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


Question: What is the percentage of all the trains with at least 4 cars? List the directions of the said trains.

SELECT CAST(COUNT(CASE WHEN T2.trailPosi >= 4 THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id UNION ALL SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars t GROUP BY train_id ) AS T2 ON T1.id = T2.train_id AND T2.trailPosi >= 4

What is the percentage of all the trains with at least 4 cars ? List the directions of the said trains .

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


Question: List all the ID of the images that have an attribute class of "horse".

SELECT T2.IMG_ID FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.ATT_CLASS = 'horse'

List all the ID of the images that have an attribute class of " horse " .

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


Question: State the explanation about object class 10.

SELECT OBJ_CLASS FROM OBJ_CLASSES WHERE OBJ_CLASS_ID = 10

State the explanation about object class 10 .


Question: What is the name of the director of photography of the movie "Pirates of the Caribbean: At World's End"?

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

What is the name of the director of photography of the movie " Pirates of the Caribbean : At World 's End " ?

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


Question: What is the name of the 3 employees who get paid the least?

SELECT name FROM Employee ORDER BY salary ASC LIMIT 3

What is the name of the 3 employees who get paid the least ?

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


Question: Please list any three Wikipedia pages that are written in Catalan, together with their titles and revision page numbers.

SELECT title, revision FROM pages WHERE lid = 1 LIMIT 3

Please list any three Wikipedia pages that are written in Catalan , together with their titles and revision page numbers .

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


Question: What is the name, type, and flag of the ship that was built in the most recent year?

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

What is the name , type , and flag of the ship that was built in the most recent year ?

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


Question: How many schools in Suffolk County have Ph.D. teachers?

SELECT COUNT(schoolid) FROM projects WHERE teacher_prefix = 'Dr.' AND school_county = 'Suffolk'

How many schools in Suffolk County have Ph.D. teachers ?

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


Question: How many owners have 5 or more establishments?

SELECT COUNT(T1.owner_name) FROM ( SELECT owner_name FROM businesses GROUP BY owner_name HAVING COUNT(owner_name) > 5 ) T1

How many owners have 5 or more establishments ?


Question: In how many movie does Dariusz Wolski work as the director of photography?

SELECT COUNT(T2.movie_id) FROM person AS T1 INNER JOIN movie_crew AS T2 ON T1.person_id = T2.person_id WHERE T1.person_name = 'Dariusz Wolski' AND T2.job = 'Director of Photography'

In how many movie does Dariusz Wolski work as the director of photography ?

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


Question: Find the average number of followers for the users who had some tweets.

SELECT avg(followers) FROM user_profiles WHERE UID IN (SELECT UID FROM tweets)

Find the average number of followers for the users who had some tweets .

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


Question: List down the name of cards with original types of Creature - Elf and the date of rulings for these cards.

SELECT T1.id, T2.date FROM cards AS T1 INNER JOIN rulings AS T2 ON T1.uuid = T2.uuid WHERE T1.originalType = 'Creature - Elf'

List down the name of cards with original types of Creature - Elf and the date of rulings for these cards .

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


Question: When did researchers start and stop working?

SELECT date_from ,  date_to FROM Project_Staff WHERE role_code  =  'researcher'

When did researchers start and stop working ?


Question: What are the names of companies that do not make DVD drives?

SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T1.name  =  'DVD drive'

What are the names of companies that do not make DVD drives ?

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


Question: In 1980, how many singles were released by sugar daddy?

SELECT COUNT(releaseType) FROM torrents WHERE artist LIKE 'sugar daddy' AND releaseType LIKE 'Single' AND groupYear = 1980

In 1980 , how many singles were released by sugar daddy ?

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


Question: Give me a list of all the distinct building descriptions.

SELECT DISTINCT building_description FROM Apartment_Buildings

Give me a list of all the distinct building descriptions .

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


Question: Provide the game publisher's name of the game with sales greater than 90% of the average sales in Japan.

SELECT DISTINCT T5.publisher_name FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T2.num_sales * 10000000 > ( SELECT AVG(T2.num_sales) * 100000 * 90 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan' )

Provide the game publisher 's name of the game with sales greater than 90 % of the average sales in Japan .

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


Question: Calculate the average number of different words that appear on all pages whose title begins with A.

SELECT AVG(words) FROM pages WHERE title LIKE 'A%'

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


Question: Provide IDs for male patients with ALT glutamic pylvic transaminase (GPT) that have history of ALT glutamic pylvic transaminase (GPT) exceed the normal range.

SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'M' AND T2.GPT >= 60

Provide IDs for male patients with ALT glutamic pylvic transaminase ( GPT ) that have history of ALT glutamic pylvic transaminase ( GPT ) exceed the normal range .

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


Question: What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to?

SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name  =  'Michael Rogers' OR T3.name  =  'Carol Smith'

What is the sum of hours for projects that scientists with the name Michael Rogers or Carol Smith are assigned to ?

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


Question: Find out which hotel and travel business having the most review? Calculate the standard deviation of the review star for this business.

SELECT T2.category_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Reviews AS T3 ON T3.business_id = T1.business_id WHERE T2.category_name = 'Hotels & Travel' GROUP BY T2.category_id ORDER BY COUNT(T2.category_id) DESC LIMIT 1

Find out which hotel and travel business having the most review ? Calculate the standard deviation of the review star for this business .

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


Question: What are the ids of all moviest hat have not been reviewed by Britanny Harris?

SELECT mID FROM Rating EXCEPT SELECT T1.mID FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T2.name  =  "Brittany Harris"

What are the ids of all moviest hat have not been reviewed by Britanny Harris ?

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


Question: Write down the image ID, full height, and full width of the menu that were used in the "100TH ANNIVERSARY OF BIRTH OF DANIEL WEBSTER" event.

SELECT T1.image_id, T1.full_height, T1.full_width FROM MenuPage AS T1 INNER JOIN Menu AS T2 ON T2.id = T1.menu_id WHERE T2.event = '100TH ANNIVERSARY OF BIRTH OF DANIEL WEBSTER'

Write down the image ID , full height , and full width of the menu that were used in the " 100TH ANNIVERSARY OF BIRTH OF DANIEL WEBSTER " event .

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


Question: What are the names of the criteria under Center for World University Rankings?

SELECT T2.criteria_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T1.system_name = 'Center for World University Rankings'

What are the names of the criteria under Center for World University Rankings ?

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


Question: Calculate the total price of products purchased by Adam.

SELECT SUM(T3.Price * T2.quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Adam'

Calculate the total price of products purchased by Adam .


Question: What was the best discount applied to sales orders in 2020?

SELECT MAX(`Discount Applied`) FROM `Sales Orders` WHERE OrderDate LIKE '%/%/20'

What was the best discount applied to sales orders in 2020 ?

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


Question: How many athletes took part in the Olympic games held in Barcelona?

SELECT COUNT(T1.person_id) FROM games_competitor AS T1 INNER JOIN games_city AS T2 ON T1.games_id = T2.games_id INNER JOIN city AS T3 ON T2.city_id = T3.id WHERE T3.city_name = 'Barcelona'

How many athletes took part in the Olympic games held in Barcelona ?


Question: List the business located in Mesa that have alcohol attribute.

SELECT T1.business_id FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.city = 'Mesa' AND T3.attribute_name = 'Alcohol'

List the business located in Mesa that have alcohol attribute .

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


Question: In which segment does the customer who purchased the product from the east superstore with the highest original price belong?

SELECT T2.Segment FROM east_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 T1.Region = 'East' ORDER BY (T1.Sales / (1 - T1.Discount)) DESC LIMIT 1

In which segment does the customer who purchased the product from the east superstore with the highest original price belong ?

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


Question: How many medicines are offered by each trade name?

SELECT trade_name ,  count(*) FROM medicine GROUP BY trade_name

How many medicines are offered by each trade name ?


Question: What are the clerks of orders with line items shipped by mail?

SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey WHERE T2.l_shipmode = 'MAIL'

What are the clerks of orders with line items shipped by mail ?

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


Question: What is the date of all orders that have been placed by customers with at least 2 payment methods?

SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2 )

What is the date of all orders that have been placed by customers with at least 2 payment methods ?

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


Question: Among all the tweets sent by male users in Argentina, what is the text of the one with the most number of likes?

SELECT T2.text FROM user AS T1 INNER JOIN twitter AS T2 ON T1.UserID = T2.UserID INNER JOIN location AS T3 ON T2.LocationID = T3.LocationID WHERE T3.Country = 'Argentina' AND T1.Gender = 'Male' ORDER BY T2.Likes DESC LIMIT 1

Among all the tweets sent by male users in Argentina , what is the text of the one with the most number of likes ?

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


Question: Which problems were reported by the staff named Dameon Frami or Jolie Weber? Give me the ids of the problems.

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

Which problems were reported by the staff named Dameon Frami or Jolie Weber ? Give me the ids of the problems .

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


Question: How many flights from Charlotte Douglas International Airport to Austin - Bergstrom International Airport experienced serious reasons that cause flight cancellation?

SELECT COUNT(*) FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T1.ORIGIN = T2.Code WHERE T1.ORIGIN = 'CLT' AND T1.DEST = 'AUS' AND T2.Description = 'Charlotte, NC: Charlotte Douglas International' AND T1.CANCELLATION_CODE = 'A'

How many flights from Charlotte Douglas International Airport to Austin - Bergstrom International Airport experienced serious reasons that cause flight cancellation ?

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


Question: What is the full name of the artist with a sculpture whose title includes the word "female"?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.title LIKE "%female%"

What is the full name of the artist with a sculpture whose title includes the word " female " ?

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


Question: What was the percentage for the answer of "Yes" was given to the question "Has your employer ever formally discussed mental health (for example, as part of a wellness campaign or other official communication)?"?

SELECT CAST(SUM(CASE  WHEN T1.AnswerText LIKE 'Yes' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext LIKE 'Has your employer ever formally discussed mental health (for example, as part of a wellness campaign or other official communication)?'

What was the percentage for the answer of " Yes " was given to the question " Has your employer ever formally discussed mental health ( for example , as part of a wellness campaign or other official communication ) ? " ?

O O O O O O B-TABLE O O B-VALUE O O O O O B-TABLE O B-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE I-VALUE 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 name, address road, and city for all branches sorted by open year.

SELECT name ,  address_road ,  city FROM branch ORDER BY open_year

Show name , address road , and city for all branches sorted by open year .

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


Question: For the female client who was born in 1976/1/29, which district did she opened her account?

SELECT T1.A2 FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.birth_date = '1976-01-29' AND T2.gender = 'F'

For the female client who was born in 1976/1/29 , which district did she opened her account ?

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


Question: What is the description and film title of ID 996?

SELECT description, title FROM film_text WHERE film_id = 996

What is the description and film title of ID 996 ?

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


Question: How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1?

SELECT COUNT(id) FROM cards WHERE hAND = '-1' AND artist = 'UDON' AND Availability = 'mtgo'

How many cards designed by UDON and available in mtgo print type has a starting maximum hand size of -1 ?

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


Question: For the genes that are located in the plasma membrane, please list their number of chromosomes.

SELECT T1.Chromosome FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID WHERE T2.Localization = 'plasma membrane'

For the genes that are located in the plasma membrane , please list their number of chromosomes .

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


Question: How many medicines were not approved by the FDA?

SELECT count(*) FROM medicine WHERE FDA_approved  =  'No'

How many medicines were not approved by the FDA ?


Question: What are the names of the vendor with the second lowest minimum order quantity?

SELECT T2.Name FROM ProductVendor AS T1 INNER JOIN Vendor AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T1.MaxOrderQty ASC LIMIT 1, 1

What are the names of the vendor with the second lowest minimum order quantity ?

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


Question: Among players who were born after 1950, who had offence rebounds rates more than 30%? Please list their last names and first names.

SELECT DISTINCT T1.lastName, T1.firstName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.birthDate > 1950 AND CAST(T2.o_rebounds AS REAL) * 100 / T2.rebounds > 30

Among players who were born after 1950 , who had offence rebounds rates more than 30 % ? Please list their last names and first names .

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


Question: Find the id and last name of the teacher that has the most detentions with detention type code "AFTER"?

SELECT T1.teacher_id ,  T2.last_name FROM Detention AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T1.detention_type_code  =  "AFTER" GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1

Find the i d and last name of the teacher that has the most detentions with detention type code " AFTER " ?

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


Question: Which flight carrier operator flies from Atlantic City to Fort Lauderdale?

SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.ORIGIN = 'ACY' AND T1.DEST = 'FLL' GROUP BY T2.Description

Which flight carrier operator flies from Atlantic City to Fort Lauderdale ?


Question: Which school has the highest number of disabled students?

SELECT T.school FROM ( SELECT T2.school, COUNT(T2.name) AS num FROM disabled AS T1 INNER JOIN enrolled AS T2 ON T1.name = T2.name GROUP BY T2.school ) T ORDER BY T.num DESC LIMIT 1

Which school has the highest number of disabled students ?


Question: Of the black officers, how many of them investigated cases between the years 2010 and 2015?

SELECT COUNT(T1.case_number) FROM officers AS T1 INNER JOIN incidents AS T2 ON T2.case_number = T1.case_number WHERE T1.race = 'B' AND T2.date BETWEEN '2010-01-01' AND '2015-12-31'

Of the black officers , how many of them investigated cases between the years 2010 and 2015 ?

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


Question: What are the speed in which attacks are put together of the top 4 teams with the highest build Up Play Speed?

SELECT t1.buildUpPlaySpeed FROM Team_Attributes AS t1 INNER JOIN Team AS t2 ON t1.team_api_id = t2.team_api_id ORDER BY t1.buildUpPlaySpeed ASC LIMIT 4

What are the speed in which attacks are put together of the top 4 teams with the highest build Up Play Speed ?

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


Question: What are the dates of birth of entrepreneurs with investor "Simon Woodroffe" or "Peter Jones"?

SELECT T2.Date_of_Birth FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor  =  "Simon Woodroffe" OR T1.Investor  =  "Peter Jones"

What are the dates of birth of entrepreneurs with investor " Simon Woodroffe " or " Peter Jones " ?

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


Question: Find the name of the campuses that is in Northridge, Los Angeles or in San Francisco, San Francisco.

SELECT campus FROM campuses WHERE LOCATION  =  "Northridge" AND county  =  "Los Angeles" UNION SELECT campus FROM campuses WHERE LOCATION  =  "San Francisco" AND county  =  "San Francisco"

Find the name of the campuses that is in Northridge , Los Angeles or in San Francisco , San Francisco .

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


Question: What are the ids of all aircrafts that can cover a distance of more than 1000?

SELECT aid FROM Aircraft WHERE distance  >  1000

What are the ids of all aircrafts that can cover a distance of more than 1000 ?

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


Question: What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500?

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

What is the phone number of the school that has the highest number of test takers with an SAT score of over 1500 ?

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


Question: What are the different plane names of planes with an average pilot age of below 35, and how many pilots have flown each of them?

SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name HAVING avg(age)  <  35

What are the different plane names of planes with an average pilot age of below 35 , and how many pilots have flown each of them ?

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


Question: What is the average age of the sales agents in the company by 12/31/2009?

SELECT AVG(2009 - STRFTIME('%Y', T2.BirthDate)) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SP'

What is the average age of the sales agents in the company by 12/31/2009 ?


Question: Show the date of the tallest perpetrator.

SELECT T2.Date FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Height DESC LIMIT 1

Show the date of the tallest perpetrator .


Question: In games that can be played on Wii, what is the percentage of games released in 2007?

SELECT CAST(COUNT(CASE WHEN T2.release_year = 2007 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 T1.platform_name = 'Wii'

In games that can be played on Wii , what is the percentage of games released in 2007 ?

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


Question: What type of food is there in the restaurants on Adeline Street in Berkeley city?

SELECT T1.food_type FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.street_name = 'adeline st' AND T2.city = 'berkeley'

What type of food is there in the restaurants on Adeline Street in Berkeley city ?

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


Question: What are all the calendar dates and day Numbers?

SELECT calendar_date ,  day_Number FROM Ref_calendar

What are all the calendar dates and day Numbers ?

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


Question: How many different students are involved in sports?

SELECT count(DISTINCT StuID) FROM Sportsinfo

How many different students are involved in sports ?


Question: How many bonds which involved atom 12 does molecule TR009 have?

SELECT COUNT(T2.bond_id) FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.molecule_id = 'TR009' AND T2.atom_id = T1.molecule_id || '_1' AND T2.atom_id2 = T1.molecule_id || '_2'

How many bonds which involved atom 12 does molecule TR009 have ?

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


Question: What are the minimum and maximum crime rate of counties?

SELECT min(Crime_rate) ,  max(Crime_rate) FROM county_public_safety

What are the minimum and maximum crime rate of counties ?


Question: How many games did Electronic Arts publish?

SELECT COUNT(DISTINCT T2.game_id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id WHERE T1.publisher_name = 'Electronic Arts'

How many games did Electronic Arts publish ?

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


Question: What is the maximum fastest lap speed in the Monaco Grand Prix in 2008?

SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"

What is the maximum fastest lap speed in the Monaco Grand Prix in 2008 ?

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


Question: Find the total revenue created by the companies whose headquarter is located at Austin.

SELECT sum(revenue) FROM manufacturers WHERE headquarter  =  'Austin'

Find the total revenue created by the companies whose headquarter is located at Austin .

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


Question: What is the sum of checking and savings balances for all customers, ordered by the total balance?

SELECT T1.balance + T2.balance FROM checking AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid ORDER BY T1.balance + T2.balance

What is the sum of checking and savings balances for all customers , ordered by the total balance ?

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


Question: How many video games have type Massively multiplayer online game?

SELECT count(*) FROM Video_games WHERE gtype  =  "Massively multiplayer online game"

How many video games have type Massively multiplayer online game ?

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


Question: In which city is the brewery AJ Stephans Beverages located?

SELECT City FROM rootbeerbrand WHERE BreweryName = 'AJ Stephans Beverages'

In which city is the brewery AJ Stephans Beverages located ?

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


Question: List down player ID of players who have passed away.

SELECT DISTINCT playerID FROM Master WHERE deathYear IS NOT NULL AND playerID IS NOT NULL

List down player ID of players who have passed away .


Question: What is the id of the reviewer whose name includes the word "Mike"?

SELECT rID FROM Reviewer WHERE name LIKE "%Mike%"

What is the i d of the reviewer whose name includes the word " Mike " ?

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


Question: Among the users who use a Galaxy Note 2, how many of them are female?

SELECT COUNT(T1.device_id) FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T2.gender = 'F' AND T1.device_model = 'Galaxy Note 2'

Among the users who use a Galaxy Note 2 , how many of them are female ?

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


Question: What are the product sizes of the products whose name has the substring 'Dell'?

SELECT product_size FROM Products WHERE product_name LIKE '%Dell%'

What are the product sizes of the products whose name has the substring ' Dell ' ?

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


Question: Calculate the average payment amount per customer.

SELECT AVG(amount) FROM payment GROUP BY customer_id

Calculate the average payment amount per customer .


Question: How many categories in total do the app users who were not active when event no.2 happened belong to?

SELECT COUNT(*) FROM ( SELECT COUNT(DISTINCT T1.category) AS result FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id INNER JOIN app_events AS T3 ON T2.app_id = T3.app_id WHERE T3.event_id = 2 AND T3.is_active = 0 GROUP BY T1.category ) T

How many categories in total do the app users who were not active when event no.2 happened belong to ?

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


Question: What are the first and last name of the artist who had a sculpture work whose title has the word “female” in it?

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.title LIKE "%female%"

What are the first and last name of the artist who had a sculpture work whose title has the word “ female ” in it ?

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


Question: How many orders did Antonia Poltun return?

SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T1.status_value = 'Returned' AND T4.first_name = 'Antonia' AND T4.last_name = 'Poltun'

How many orders did Antonia Poltun return ?

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


Question: Among the countries whose government type is republic, how many of them shares a border that's longer than 200?

SELECT COUNT(DISTINCT T1.Name) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN borders AS T3 ON T3.Country1 = T2.Country WHERE T2.Government = 'republic' AND T3.Length > 200

Among the countries whose government type is republic , how many of them shares a border that 's longer than 200 ?

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


Question: What is the name of the department with the student that has the lowest GPA?

SELECT T2.dept_name FROM student AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code ORDER BY stu_gpa LIMIT 1

What is the name of the department with the student that has the lowest GPA ?

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


Question: What are the zip code for the Senate house?

SELECT T2.zip_code FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.House = 'House of Repsentatives' GROUP BY T2.zip_code

What are the zip code for the Senate house ?

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


Question: What are all the fault descriptions and the fault status of all the faults recoreded in the logs?

SELECT T1.fault_description ,  T2.fault_status FROM Fault_Log AS T1 JOIN Fault_Log_Parts AS T2 ON T1.fault_log_entry_id  =  T2.fault_log_entry_id

What are all the fault descriptions and the fault status of all the faults recoreded in the logs ?

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


Question: List all ship names in the order of built year and class.

SELECT name FROM ship ORDER BY built_year ,  CLASS

List all ship names in the order of built year and class .

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


Question: How many mountains are there on the African Continent?

SELECT COUNT(T3.Name) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN province AS T4 ON T4.Country = T1.Code INNER JOIN geo_mountain AS T5 ON T5.Province = T4.Name WHERE T3.Name = 'European'

How many mountains are there on the African Continent ?


Question: Who sent more than one packages? List the client's name.

SELECT T2.Name ,  count(*) FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber GROUP BY T1.Sender HAVING count(*)  >  1;

Who sent more than one packages ? List the client 's name .

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


Question: What are the client id and details for the client with the most invoices?

SELECT T1.client_id ,  T2.client_details FROM Invoices AS T1 JOIN Clients AS T2 ON T1.client_id  =  T2.client_id GROUP BY T1.client_id ORDER BY count(*) DESC LIMIT 1

What are the client i d and details for the client with the most invoices ?

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


Question: How many customers are there?


Question: How many students are enlisted in the Navy organization?

SELECT COUNT(name) FROM enlist WHERE organ = 'navy'

How many students are enlisted in the Navy organization ?


Question: Please state the segment, the name, the address, and the phone number of customer number 3.

SELECT c_mktsegment, c_name, c_address, c_phone FROM customer WHERE c_custkey = 3

Please state the segment , the name , the address , and the phone number of customer number 3 .

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


Question: How many universities have at least 80,000 students in the year 2011?

SELECT COUNT(*) FROM university_year WHERE num_students > 80000 AND year = 2011

How many universities have at least 80,000 students in the year 2011 ?

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


Question: Among the active employees with over 10 hours of sick leave, what is the percentage of the employees with over 20 vacation hours?

SELECT CAST(SUM(CASE WHEN T2.VacationHours > 20 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM EmployeePayHistory AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.CurrentFlag = 1 AND T2.SickLeaveHours > 10

Among the active employees with over 10 hours of sick leave , what is the percentage of the employees with over 20 vacation hours ?

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


Question: Among the Italian players, who has the shortest height?

SELECT T2.PlayerName FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.nation = 'Italy' ORDER BY T1.height_in_cm ASC LIMIT 1

Among the Italian players , who has the shortest height ?

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


Question: Show the ids of the employees who don't authorize destruction for any document.

SELECT employee_id FROM Employees EXCEPT SELECT Destruction_Authorised_by_Employee_ID FROM Documents_to_be_destroyed

Show the ids of the employees who do n't authorize destruction for any document .


Question: For all words cited in paper ID 315017, state the other paper ID and class label which also cited those words.

SELECT T1.class_label, T2.word_cited_id FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id WHERE T1.paper_id = 315017

For all words cited in paper ID 315017 , state the other paper ID and class label which also cited those words .

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


Question: Which professor is Oliy Spratling working with? Give the full name.

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

Which professor is Oliy Spratling working with ? Give the full name .

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


Question: List the branch name and city without any registered members.

SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)

List the branch name and city without any registered members .

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


Question: Which colleges does each player with a name that starts with the letter D  who tried out go to?

SELECT T1.cName FROM  tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID WHERE T2.pName LIKE 'D%'

Which colleges does each player with a name that starts with the letter D who tried out go to ?

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


Question: Among paragraphs with paragraph number between 1900 to 1950, list the texts said by a character described as a sea captain, friend to Sebatian.

SELECT T1.description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.PlainText = 'a sea captain, friend to Sebastian' AND T2.ParagraphNum BETWEEN 1500 AND 1950

Among paragraphs with paragraph number between 1900 to 1950 , list the texts said by a character described as a sea captain , friend to Sebatian .

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


Question: What is the receipt number with the latest date, and what is that date?

SELECT ReceiptNumber ,  date FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date DESC LIMIT 1)

What is the receipt number with the latest date , and what is that date ?

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


Question: How many players enter hall of fame each year?

SELECT yearid ,  count(*) FROM hall_of_fame GROUP BY yearid;

How many players enter hall of fame each year ?

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


Question: For grants with both documents described as 'Regular' and documents described as 'Initial Application', list its start date.

SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Regular' INTERSECT SELECT T1.grant_start_date FROM Grants AS T1 JOIN Documents AS T2 ON T1.grant_id  =  T2.grant_id JOIN Document_Types AS T3 ON T2.document_type_code  =  T3.document_type_code WHERE T3.document_description  =  'Initial Application'

For grants with both documents described as ' Regular ' and documents described as ' Initial Application ' , list its start date .

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


Question: Among the genes with nucleic acid metabolism defects, how many of them can be found in the vacuole?

SELECT COUNT(T1.GeneID) FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID WHERE T2.Localization = 'vacuole' AND T1.Phenotype = 'Nucleic acid metabolism defects'

Among the genes with nucleic acid metabolism defects , how many of them can be found in the vacuole ?

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


Question: How many project staff worked as leaders or started working before '1989-04-24 23:51:54'?

SELECT count(*) FROM Project_Staff WHERE role_code  =  'leader' OR date_from  <  '1989-04-24 23:51:54'

How many project staff worked as leaders or started working before ' 1989 - 04 - 24 23:51:54 ' ?

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


Question: Which party does Christopher Henderson Clark belong to?

SELECT T1.party FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T2.first_name OR T2.middle_name OR T2.last_name = 'ChristopherHendersonClark'

Which party does Christopher Henderson Clark belong to ?

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


Question: Among the cards with converted mana cost higher than 5 in the set Coldsnap, how many of them have unknown power?

SELECT SUM(CASE WHEN T1.power LIKE '*' OR T1.power IS NULL THEN 1 ELSE 0 END) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.convertedManaCost > 5

Among the cards with converted mana cost higher than 5 in the set Coldsnap , how many of them have unknown power ?

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


Question: What are the average, minimum, and max ages for each of the different majors?

SELECT major ,  avg(age) ,  min(age) ,  max(age) FROM Student GROUP BY major

What are the average , minimum , and max ages for each of the different majors ?

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


Question: Tweets posted from which city has a higher number of average likes, Bangkok or Chiang Mai?

SELECT SUM(CASE WHEN T2.City = 'Bangkok' THEN Likes ELSE NULL END) / COUNT(CASE WHEN T2.City = 'Bangkok' THEN 1 ELSE 0 END) AS bNum , SUM(CASE WHEN City = 'Chiang Mai' THEN Likes ELSE NULL END) / COUNT(CASE WHEN City = 'Chiang Mai' THEN TweetID ELSE NULL END) AS cNum FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.City IN ('Bangkok', 'Chiang Mai')

Tweets posted from which city has a higher number of average likes , Bangkok or Chiang Mai ?

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


Question: What is the average number of employees of the departments whose rank is between 10 and 15?

SELECT avg(num_employees) FROM department WHERE ranking BETWEEN 10 AND 15

What is the average number of employees of the departments whose rank is between 10 and 15 ?

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


Question: Find the distinct names of all races held between 2014 and 2017?

SELECT DISTINCT name FROM races WHERE YEAR BETWEEN 2014 AND 2017

Find the distinct names of all races held between 2014 and 2017 ?

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


Question: Who directed Avatar?

SELECT director FROM Movie WHERE title  = 'Avatar'


Question: Which budget category does the expense 'Posters' fall to?

SELECT DISTINCT T2.category FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Posters'

Which budget category does the expense ' Posters ' fall to ?

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


Question: Among the students with payment due, how many of them are unemployed?

SELECT COUNT(T1.name) FROM no_payment_due AS T1 INNER JOIN unemployed AS T2 ON T2.name = T1.name WHERE T1.bool = 'pos'

Among the students with payment due , how many of them are unemployed ?

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


Question: How many inches of total precipitation was recorded by the weather station of store no.2 on 2012/12/25?

SELECT T1.preciptotal FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2012-12-25' AND T2.store_nbr = 2

How many inches of total precipitation was recorded by the weather station of store no.2 on 2012/12/25 ?

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


Question: List out the full name of employee who has birth day on "3/4/1955 12:00:00 AM".

SELECT FirstName, LastName FROM Employees WHERE BirthDate = '1955-03-04 00:00:00'

List out the full name of employee who has birth day on " 3/4/1955 12:00:00 AM " .

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


Question: Give the different positions of players who play for the country with the capital Dublin.

SELECT DISTINCT T2.Position FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T1.Capital  =  "Dublin"

Give the different positions of players who play for the country with the capital Dublin .

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


Question: Name 10 products that were shipped first class from the East region.

SELECT T2.`Product Name` FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Ship Mode` = 'First Class' AND T2.Region = 'East' LIMIT 10

Name 10 products that were shipped first class from the East region .

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


Question: Which historical legislators are members of the National Greenbacker party? Write their first and last names.

SELECT T2.first_name, T2.last_name FROM `historical-terms` AS T1 INNER JOIN historical AS T2 ON T2.bioguide_id = T1.bioguide WHERE T1.party = 'National Greenbacker'

Which historical legislators are members of the National Greenbacker party ? Write their first and last names .

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


Question: Give the name of the lowest earning instructor in the Statistics department.

SELECT name FROM instructor WHERE dept_name  =  'Statistics' ORDER BY salary LIMIT 1

Give the name of the lowest earning instructor in the Statistics department .

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


Question: List names of countries in descending order of education_score.

SELECT name FROM countries ORDER BY education_score DESC

List names of countries in descending order of education_score .


Question: Who is the commanding officer in the district with the highest number of reported crimes where no arrest has been made?

SELECT T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.arrest = 'FALSE' GROUP BY T2.commander ORDER BY COUNT(T1.report_no) DESC LIMIT 1

Who is the commanding officer in the district with the highest number of reported crimes where no arrest has been made ?

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


Question: For all patients with normal uric acid (UA), what is the average UA index based on their latest laboratory examination result?

SELECT AVG(T2.UA) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE (T2.UA < 6.5 AND T1.SEX = 'F') OR (T2.UA < 8.0 AND T1.SEX = 'M') AND T2.Date = ( SELECT MAX(Date) FROM Laboratory )

For all patients with normal uric acid ( UA ) , what is the average UA index based on their latest laboratory examination result ?

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


Question: Show all product type codes and the average price for each type.

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

Show all product type codes and the average price for each type .

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


Question: How many orders were delivered in December 2019?

SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Delivered' AND STRFTIME('%Y', T2.status_date) = '2019'

How many orders were delivered in December 2019 ?


Question: What are the names of the tourist attractions that have parking or shopping as their feature details?

SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'park' UNION SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN Tourist_Attraction_Features AS T2 ON T1.tourist_attraction_id  =  T2.tourist_attraction_id JOIN Features AS T3 ON T2.Feature_ID  =  T3.Feature_ID WHERE T3.feature_Details  =  'shopping'

What are the names of the tourist attractions that have parking or shopping as their feature details ?

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


Question: How many paintings did the artist with the longest life make ?

select count(*) from artists as t1 join paintings as t2 on t1.artistid  =  t2.painterid group by t2.painterid order by t1.deathyear - t1.birthyear desc limit 1


Question: Which word has the most appearances in the Wikipedia page revision ID No. 28278070? Give the word ID.

SELECT pid FROM pages_words WHERE pid = ( SELECT pid FROM pages WHERE revision = 28278070 ) ORDER BY occurrences DESC LIMIT 1

Which word has the most appearances in the Wikipedia page revision ID No . 28278070 ? Give the word ID .

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


Question: How much is the total bonus received by sales person and what is the percentage of it against the projected yearly sales quota in 2013?

SELECT SUM(T1.Bonus) , CAST(SUM(T1.Bonus) AS REAL) * 100 / SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2013'

How much is the total bonus received by sales person and what is the percentage of it against the projected yearly sales quota in 2013 ?

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


Question: What is the difference between the actual manufacturing cost of product number 818 and the estimated manufacturing cost?

SELECT PlannedCost - ActualCost FROM WorkOrderRouting WHERE ProductID = 818

What is the difference between the actual manufacturing cost of product number 818 and the estimated manufacturing cost ?

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


Question: Show first name and id for all customers with at least 2 accounts.

SELECT T2.customer_first_name ,  T1.customer_id FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2

Show first name and i d for all customers with at least 2 accounts .

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


Question: Indicating the bounding box of "kitchen" in image id 250.

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

Indicating the bounding box of " kitchen " in image i d 250 .

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


Question: How many students were there in University of Michigan in 2011?

SELECT COUNT(*) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id WHERE T1.university_name = 'University of Michigan' AND T2.year = 2011

How many students were there in University of Michigan in 2011 ?

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


Question: Among all the tweets that are reshared, how many of them are posted by a user in Buenos Aires?

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.City = 'Buenos Aires' AND T1.IsReshare = 'TRUE'

Among all the tweets that are reshared , how many of them are posted by a user in Buenos Aires ?

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


Question: How many distinct kinds of injuries happened after season 2010?

SELECT count(DISTINCT T1.injury) FROM injury_accident AS T1 JOIN game AS T2 ON T1.game_id  =  T2.id WHERE T2.season  >  2010

How many distinct kinds of injuries happened after season 2010 ?

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


Question: What is the total number of Asian patients who are allergic to peanuts?

SELECT COUNT(T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Allergy to peanuts' AND T2.race = 'asian'

What is the total number of Asian patients who are allergic to peanuts ?

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


Question: Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase.

SELECT DISTINCT T1.ID FROM Laboratory AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Thrombosis = 0 AND T1.CPK < 250

Please list the IDs of the patients with no thrombosis and an abnormal level of creatinine phosphokinase .

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


Question: Count the products that have the color description "white" or have the characteristic name "hot".

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id JOIN ref_colors AS t4 ON t1.color_code  =  t4.color_code WHERE t4.color_description  =  "white" OR t3.characteristic_name  =  "hot"

Count the products that have the color description " white " or have the characteristic name " hot " .

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


Question: When did Shakespeare create his work that has 154 scenes?

SELECT T1.Date, T1.id FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Scene = 154

When did Shakespeare create his work that has 154 scenes ?

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


Question: List the order date of the orders who are placed by customers with at least 2 payment methods.

SELECT date_order_placed FROM Orders WHERE customer_id IN ( SELECT T1.customer_id FROM Customers AS T1 JOIN Customer_Payment_Methods AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2 )

List the order date of the orders who are placed by customers with at least 2 payment methods .

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


Question: Return the unique name for stations that have ever had 7 bikes available.

SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  =  7

Return the unique name for stations that have ever had 7 bikes available .

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


Question: Find the Yelp user with the average 5-star rating of all reviews who has been yelping the longest.

SELECT user_id FROM Users WHERE user_average_stars = 5 ORDER BY user_yelping_since_year ASC LIMIT 1

Find the Yelp user with the average 5 - star rating of all reviews who has been yelping the longest .

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


Question: How many days did it take to end the work order "425"?

SELECT 365 * (STRFTIME('%Y', ActualEndDate) - STRFTIME('%Y', ActualStartDate)) + 30 * (STRFTIME('%m', ActualEndDate) - STRFTIME('%m', ActualStartDate)) + STRFTIME('%d', ActualEndDate) - STRFTIME('%d', ActualStartDate) FROM WorkOrderRouting WHERE WorkOrderID = 425

How many days did it take to end the work order " 425 " ?

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


Question: What are the title and maximum price of each film?

SELECT T2.title ,  max(T1.price) FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id GROUP BY T1.film_id

What are the title and maximum price of each film ?

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


Question: When does Yelp_Business no.1 open on Tuesdays?

SELECT T1.opening_time FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Tuesday' AND T1.business_id = 1

When does Yelp_Business no.1 open on Tuesdays ?


Question: Find the number of planes for each type.

SELECT count(*) ,  plane_name FROM pilotskills GROUP BY plane_name

Find the number of planes for each type .


Question: Of the wickets taken in the third overs, how many are without the involvement of fielders?

SELECT SUM(CASE WHEN Fielders = '' THEN 1 ELSE 0 END) FROM Wicket_Taken WHERE Over_Id = 3

Of the wickets taken in the third overs , how many are without the involvement of fielders ?

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


Question: Among the sales ID ranges from 1 to 200, what is the percentage of the products with a price ranging from 200 to 300?

SELECT CAST(SUM(IIF(T2.Price BETWEEN 200 AND 300, 1, 0)) AS REAL) * 100 / COUNT(T2.Price) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T1.SalesID BETWEEN 1 AND 200

Among the sales ID ranges from 1 to 200 , what is the percentage of the products with a price ranging from 200 to 300 ?

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


Question: How many followers do the most followed repository on Github have? Give the github address of the repository.

SELECT Forks, Url FROM Repo WHERE Forks = ( SELECT MAX(Forks) FROM Repo )

How many followers do the most followed repository on Github have ? Give the github address of the repository .


Question: State the name of the city with the most venues.

SELECT T1.City_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T1.City_Id = T2.City_Id GROUP BY T1.City_Id ORDER BY COUNT(T2.Venue_Id) DESC LIMIT 1

State the name of the city with the most venues .

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


Question: How many different movies are playing?

SELECT count(DISTINCT T1.code) FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie


Question: Select the codes of all the boxes located in Chicago.

SELECT T1.code FROM boxes AS T1 JOIN Warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago'

Select the codes of all the boxes located in Chicago .

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


Question: How many meetings are there for each meeting type?

SELECT meeting_type ,  count(*) FROM Meetings GROUP BY meeting_type

How many meetings are there for each meeting type ?


Question: Provide the email of the customers that purchased books with a price range of 3 to 5 dollars.

SELECT DISTINCT T3.email FROM order_line AS T1 INNER JOIN cust_order AS T2 ON T2.order_id = T1.order_id INNER JOIN customer AS T3 ON T3.customer_id = T2.customer_id WHERE T1.price BETWEEN 3 AND 5

Provide the email of the customers that purchased books with a price range of 3 to 5 dollars .

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


Question: What is the description for the character mentioned in paragraph No.640171?

SELECT T1.Description FROM characters AS T1 INNER JOIN paragraphs AS T2 ON T1.id = T2.character_id WHERE T2.id = '640171'

What is the description for the character mentioned in paragraph No.640171 ?

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


Question: What are the type come, name, and description of the document that has either the name 'Noel CV' or 'King Book'?

SELECT document_type_code ,  document_name ,  document_description FROM Documents WHERE document_name  =  'Noel CV' OR document_name  =  'King Book'

What are the type come , name , and description of the document that has either the name ' Noel CV ' or ' King Book ' ?

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


Question: List out of players whose preferred foot is left.

SELECT DISTINCT t1.id, t1.player_name FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t2.preferred_foot = 'left'

List out of players whose preferred foot is left .

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


Question: Name the title with the highest price published by 'Binnet & Hardley'.

SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T2.pub_name = 'Binnet & Hardley' ORDER BY T1.price DESC LIMIT 1

Name the title with the highest price published by ' Binnet & Hardley ' .

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


Question: Among the trains that run in the east direction, how many of them have more than 2 long cars?

SELECT SUM(CASE WHEN T2.longCarsNum > 2 THEN 1 ELSE 0 END)as count FROM trains AS T1 INNER JOIN ( SELECT train_id, COUNT(id) AS longCarsNum FROM cars WHERE len = 'long' GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T1.direction = 'west'

Among the trains that run in the east direction , how many of them have more than 2 long cars ?

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


Question: What are the names of all employees with clearance on Omega III?

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  =  "Omega III";

What are the names of all employees with clearance on Omega III ?

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


Question: What are the ids of all male students who do not play football?

SELECT StuID FROM Student WHERE sex  =  'M' EXCEPT SELECT StuID FROM Sportsinfo WHERE sportname  =  "Football"

What are the ids of all male students who do not play football ?

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


Question: How many clients under the age of 35 gave Eagle National Mortgage 1 star?

SELECT COUNT(T2.age) FROM reviews AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T1.Product = 'Eagle National Mortgage' AND T1.Stars = 1 AND T2.age < 35

How many clients under the age of 35 gave Eagle National Mortgage 1 star ?

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


Question: How many Sports games did Nintendo publish?

SELECT COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Sports' AND T1.publisher_name = 'Nintendo'

How many Sports games did Nintendo publish ?

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


Question: What are the ids and names of the participants who have performed at least two songs?

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

What are the ids and names of the participants who have performed at least two songs ?

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


Question: How many users used Vivo Xplay3S model?

SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = 'Xplay3S' AND phone_brand = 'vivo'

How many users used Vivo Xplay3S model ?


Question: What county did Sherri Ramsey grew up?

SELECT T2.county FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Sherri' AND T1.last_name = 'Ramsey'


Question: Find the name of the scientist who worked on both a project named 'Matter of Time' and a project named 'A Puzzling Parallax'.

SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'Matter of Time' INTERSECT SELECT T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.name  =  'A Puzzling Parallax'

Find the name of the scientist who worked on both a project named ' Matter of Time ' and a project named ' A Puzzling Parallax ' .

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


Question: Please list the diagnosis of the patients whose total protein is lower than normal.

SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.TP < 6.0

Please list the diagnosis of the patients whose total protein is lower than normal .

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


Question: How many customers are associated with each nationality? List the nationality and the number of customers.

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

How many customers are associated with each nationality ? List the nationality and the number of customers .

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


Question: What is the sea level and average speed for store number 3 and store number 4?

SELECT T1.sealevel, T1.avgspeed FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 3 OR T2.store_nbr = 4

What is the sea level and average speed for store number 3 and store number 4 ?

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


Question: Please list the positions of the players who were born in Canada and have won the All-Rookie award.

SELECT DISTINCT T1.pos FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCountry = 'Canada' AND T2.award = 'All-Rookie'

Please list the positions of the players who were born in Canada and have won the All - Rookie award .

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


Question: What is the count of aircrafts that have a distance between 1000 and 5000?

SELECT count(*) FROM Aircraft WHERE distance BETWEEN 1000 AND 5000

What is the count of aircrafts that have a distance between 1000 and 5000 ?

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


Question: Who is the voice actor of the hero character from the movie The Little Mermaid?

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

Who is the voice actor of the hero character from the movie The Little Mermaid ?

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


Question: Show different carriers of phones together with the number of phones with each carrier.

SELECT Carrier ,  COUNT(*) FROM phone GROUP BY Carrier

Show different carriers of phones together with the number of phones with each carrier .

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


Question: On 8/29/2013, who took the longest to arrive in California Ave Caltrain Station from University and Emerson? Indicate the bike id.

SELECT bike_id FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' AND end_station_name = 'California Ave Caltrain Station' AND start_station_name = 'University and Emerson' AND duration = ( SELECT MAX(duration) FROM trip WHERE start_date LIKE '8/29/2013%' AND end_date LIKE '8/29/2013%' AND end_station_name = 'California Ave Caltrain Station' AND start_station_name = 'University and Emerson' )

On 8/29/2013 , who took the longest to arrive in California Ave Caltrain Station from University and Emerson ? Indicate the bike i d.

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


Question: What is the name of the university that has the lowest number of students of all time?

SELECT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY T1.num_students LIMIT 1

What is the name of the university that has the lowest number of students of all time ?

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


Question: For the shipment received by Leszek Kieltyka on 2017/9/25, what was its weight?

SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Leszek' AND T2.last_name = 'Kieltyka' AND T1.ship_date = '2017-09-25'

For the shipment received by Leszek Kieltyka on 2017/9/25 , what was its weight ?

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


Question: Give the detailed address for store No.2.

SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2

Give the detailed address for store No.2 .


Question: List all products with minimum order quantity of 100 and order them by product name in descending order.

SELECT DISTINCT T1.Name FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID WHERE T2.MinOrderQty = 100 ORDER BY T1.Name DESC

List all products with minimum order quantity of 100 and order them by product name in descending order .

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


Question: What is the name of the department htat has no students minoring in it?

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

What is the name of the department htat has no students minoring in it ?

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


Question: Show the locations that have more than one railways.

SELECT LOCATION FROM railway GROUP BY LOCATION HAVING COUNT(*)  >  1

Show the locations that have more than one railways .


Question: What are the home conferences with the fewest number of people enrolled?

SELECT home_conference FROM University GROUP BY home_conference ORDER BY sum(enrollment) LIMIT 1

What are the home conferences with the fewest number of people enrolled ?

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


Question: Please list the disease names of the patients that have a proteinuria level higher than normal.

SELECT T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`U-PRO` >= 30

Please list the disease names of the patients that have a proteinuria level higher than normal .


Question: Among the crimes happened in the neighborhood called "Avalon Park", what is the percentage of crimes that happened inside the house?

SELECT CAST(SUM(CASE WHEN T2.location_description = 'HOUSE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.location_description) AS persent FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.neighborhood_name = 'Avalon Park'

Among the crimes happened in the neighborhood called " Avalon Park " , what is the percentage of crimes that happened inside the house ?

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


Question: List the name of all games published in Japan.

SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN region_sales AS T4 ON T3.id = T4.game_platform_id INNER JOIN region AS T5 ON T4.region_id = T5.id WHERE T5.region_name = 'Japan'

List the name of all games published in Japan .

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


Question: What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre?

SELECT min(T1.duration) ,  min(T2.rating) ,  T2.genre_is FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id GROUP BY T2.genre_is ORDER BY T2.genre_is

What are the shortest duration and lowest rating of songs grouped by genre and ordered by genre ?

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


Question: Return all the information for all employees without any department number.

SELECT * FROM employees WHERE department_id  =  "null"

Return all the information for all employees without any department number .


Question: What are the dates and ids of the invoices that are related to at least 2 shipments?

SELECT T1.invoice_date ,  T1.invoice_number FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number HAVING count(*)  >=  2

What are the dates and ids of the invoices that are related to at least 2 shipments ?

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


Question: How much higher in percentage is the highest supply cost of the part "hot spring dodger dim light" than the lowest supply cost?

SELECT CAST((MAX(T1.ps_supplycost) - MIN(T1.ps_supplycost)) AS REAL) * 100 / MIN(T1.ps_supplycost) FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light'

How much higher in percentage is the highest supply cost of the part " hot spring dodger dim light " than the lowest supply cost ?

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


Question: What are the account details with the largest value or with value having char '5' in it?

SELECT max(Account_details) FROM Accounts UNION SELECT Account_details FROM Accounts WHERE Account_details LIKE "%5%"

What are the account details with the largest value or with value having char ' 5 ' in it ?

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


Question: What is the number of all packages that Leo Wong sent?

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Sender  =  T2.AccountNumber WHERE T2.Name  =  "Leo Wong";

What is the number of all packages that Leo Wong sent ?

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


Question: What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance?

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

What are the balances of checking accounts belonging to people with savings balances greater than the average savings balance ?

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


Question: What is the ID of the Publications Rank criteria?

SELECT id FROM ranking_criteria WHERE criteria_name = 'Publications Rank'

What is the ID of the Publications Rank criteria ?

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


Question: State the number of addresses in the Nordrhein-Westfalen district.

SELECT COUNT(address_id) FROM address WHERE district = 'Nordrhein-Westfalen'

State the number of addresses in the Nordrhein - Westfalen district .

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


Question: How many students enlisted in the Navy?

SELECT COUNT(name) FROM enlist WHERE organ = 'navy'

How many students enlisted in the Navy ?


Question: Which attribute definitions have attribute value 0? Give me the attribute name and attribute ID.

SELECT t1.attribute_name ,  t1.attribute_id FROM Attribute_Definitions AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.attribute_id  =  t2.attribute_id WHERE t2.attribute_value  =  0

Which attribute definitions have attribute value 0 ? Give me the attribute name and attribute ID .

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


Question: Among all Disney movies directed by Gary Trousdale, determine the percentage that earned over USD100m based on actual grossing.

SELECT CAST(COUNT(CASE WHEN CAST(REPLACE(trim(T1.total_gross, '$'), ',', '') AS REAL) > 100000000 THEN T1.movie_title ELSE NULL END) AS REAL) * 100 / COUNT(T1.movie_title) FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name WHERE T2.director = 'Gary Trousdale'

Among all Disney movies directed by Gary Trousdale , determine the percentage that earned over USD100 m based on actual grossing .

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


Question: Please list any three events that have the longitude and latitude of 0.

SELECT event_id FROM events WHERE longitude = 0 AND latitude = 0 LIMIT 3

Please list any three events that have the longitude and latitude of 0 .

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


Question: Find the titles of all movies not reviewed by Chris Jackson.

SELECT DISTINCT title FROM Movie EXCEPT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID JOIN Reviewer AS T3 ON T1.rID  =  T3.rID WHERE T3.name  =  'Chris Jackson'

Find the titles of all movies not reviewed by Chris Jackson .

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


Question: How many 2 stars rated business located in Phoenix, Arizona?

SELECT COUNT(business_id) FROM Business WHERE city = 'Phoenix' AND state = 'AZ' AND stars = 2

How many 2 stars rated business located in Phoenix , Arizona ?

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


Question: What is the wikipedia page id of Arqueozoologia?

SELECT page FROM pages WHERE title = 'Arqueozoologia'

What is the wikipedia page i d of Arqueozoologia ?


Question: How many distinct types of accounts are there?

SELECT count(DISTINCT acc_type) FROM customer

How many distinct types of accounts are there ?


Question: What is the average height of an East conference All-star player?

SELECT AVG(DISTINCT height) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE conference = 'East'

What is the average height of an East conference All - star player ?

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


Question: Find how many different affiliation types there are.

SELECT count(DISTINCT affiliation) FROM university

Find how many different affiliation types there are .


Question: What is the first name of students enrolled in class ACCT-211 and got grade C?

SELECT T3.stu_fname FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code JOIN student AS T3 ON T2.stu_num  =  T3.stu_num WHERE T1.crs_code  =  'ACCT-211' AND T2.enroll_grade  =  'C'

What is the first name of students enrolled in class ACCT-211 and got grade C ?

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


Question: How many paragraphs contain the character Lord Abergavenny?

SELECT SUM(T1.ParagraphNum) FROM paragraphs AS T1 INNER JOIN characters AS T2 ON T1.character_id = T2.id WHERE T2.CharName = 'Lord Abergavenny'

How many paragraphs contain the character Lord Abergavenny ?

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


Question: How many different professors are there for the different schools?

SELECT count(*) ,  T1.school_code FROM department AS T1 JOIN professor AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.school_code

How many different professors are there for the different schools ?

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


Question: Which country has the lowest percentage of arable land?

SELECT CountryName FROM Indicators WHERE IndicatorName LIKE 'Arable land (% of land area)' ORDER BY Value DESC LIMIT 1

Which country has the lowest percentage of arable land ?


Question: How many characteristics are there?


Question: List down app that does not have negative sentiment and give their average rating?

SELECT T1.App, AVG(T2.Sentiment_Polarity) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment != 'Negative' GROUP BY T1.App

List down app that does not have negative sentiment and give their average rating ?

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


Question: Show all distinct product categories along with the number of mailshots in each category.

SELECT product_category ,  count(*) FROM mailshot_campaigns GROUP BY product_category

Show all distinct product categories along with the number of mailshots in each category .

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


Question: What is the position coordinate on the page menu of the "Small Hominy" dish and how long did it appear?

SELECT T2.xpos, T2.ypos, T1.last_appeared - T1.first_appeared FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.name = 'Small Hominy'

What is the position coordinate on the page menu of the " Small Hominy " dish and how long did it appear ?

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


Question: What is the product name and the color of the ordered items which have been shipped?

SELECT T1.product_name ,  T1.product_color FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Shipment_Items AS T3 ON T2.order_item_id  =  T3.order_item_id JOIN Shipments AS T4 ON T3.shipment_id  =  T4.shipment_id

What is the product name and the color of the ordered items which have been shipped ?

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


Question: What is the name of the tallest building?

SELECT name FROM building ORDER BY height_feet DESC LIMIT 1

What is the name of the tallest building ?


Question: What are the apartment number, start date, and end date of each apartment booking?

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

What are the apartment number , start date , and end date of each apartment booking ?

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


Question: List the names of the coins above the average price on April 28, 2013.

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2018-04-28' AND T2.price > ( SELECT AVG(price) FROM historical WHERE date = '2018-04-28' )

List the names of the coins above the average price on April 28 , 2013 .

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


Question: How many students are filed for bankruptcy?

SELECT COUNT(name) FROM filed_for_bankrupcy

How many students are filed for bankruptcy ?


Question: Please list the event IDs of the events that have happened on the device of the oldest user.

SELECT T2.event_id FROM gender_age AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.device_id ORDER BY T1.age DESC LIMIT 1

Please list the event IDs of the events that have happened on the device of the oldest user .

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


Question: What are the different descriptions of all the parent documents?

SELECT DISTINCT T2.Description FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID

What are the different descriptions of all the parent documents ?

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


Question: Count the total number of roles listed.

Count the total number of roles listed .


Question: What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror?

SELECT CAST(SUM(CASE WHEN T1.convertedManaCost = 10 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id), T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T1.name = 'Abyssal Horror'

What is percentage of the cards with a converted Mana Cost of 10 in set of Abyssal Horror ?

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


Question: Find the total number of drivers.


Question: Please list the top 3 discounts with the highest discount percentage and fall under the reseller category.

SELECT Description, DiscountPct FROM SpecialOffer WHERE Category = 'Reseller' ORDER BY DiscountPct DESC LIMIT 0, 3

Please list the top 3 discounts with the highest discount percentage and fall under the reseller category .

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


Question: How strong is the Hulk?

SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T1.superhero_name = 'Hulk' AND T3.attribute_name = 'Strength'


Question: To the products which could make the profit as 21.9037, what were their list price after October of 2012?

SELECT T1.ListPrice FROM Product AS T1 INNER JOIN ProductListPriceHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ListPrice - T1.StandardCost > 21.9037 AND STRFTIME('%Y-%m-%d', T2.StartDate) >= '2012-10-01'

To the products which could make the profit as 21.9037 , what were their list price after October of 2012 ?

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


Question: Find the names of the artists who are from Bangladesh and have never received rating higher than 7.

SELECT DISTINCT artist_name FROM artist WHERE country  =  "Bangladesh" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating  >  7

Find the names of the artists who are from Bangladesh and have never received rating higher than 7 .

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


Question: Identify customer IDs who bought products priced from 1000 to 2000.

SELECT DISTINCT T2.CustomerID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 1000 AND 2000

Identify customer IDs who bought products priced from 1000 to 2000 .

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


Question: What is the release title of the single under the "funk" tag that was released the oldest?

SELECT T1.groupName FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag LIKE 'funk' AND T1.releaseType = 'single' ORDER BY T1.groupYear LIMIT 1

What is the release title of the single under the " funk " tag that was released the oldest ?

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


Question: What are the names of all races that occurred after 12:00:00 or before 09:00:00?

SELECT name FROM races WHERE TIME > "12:00:00" OR TIME < "09:00:00"

What are the names of all races that occurred after 12:00:00 or before 09:00:00 ?

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


Question: Please list all album titles in alphabetical order.

Please list all album titles in alphabetical order .


Question: What are the opening years in which at least two shops opened?

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

What are the opening years in which at least two shops opened ?


Question: Calculate customers' total payment amount in August, 2005.

SELECT SUM(amount) FROM payment WHERE SUBSTR(payment_date, 1, 7) = '2005-08'

Calculate customers ' total payment amount in August , 2005 .

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


Question: Find the texts of assessment notes for teachers with last name "Schuster".

SELECT T1.text_of_notes FROM Assessment_Notes AS T1 JOIN Teachers AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.last_name  =  "Schuster"

Find the texts of assessment notes for teachers with last name " Schuster " .

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


Question: How many students are there?


Question: What the full names, ids of each employee and the name of the country they are in?

SELECT T1.first_name ,  T1.last_name , T1.employee_id ,  T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id

What the full names , ids of each employee and the name of the country they are in ?

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


Question: What is the average gpa of the students enrolled in the course with code ACCT-211?

SELECT avg(T2.stu_gpa) FROM enroll AS T1 JOIN student AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T1.class_code  =  T3.class_code WHERE T3.crs_code  =  'ACCT-211'

What is the average gpa of the students enrolled in the course with code ACCT-211 ?

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


Question: Name all products supplied by Zaanse Snoepfabriek.

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Zaanse Snoepfabriek'

Name all products supplied by Zaanse Snoepfabriek .


Question: Give the name and score of the university ID 124.

SELECT T2.university_name, T1.score FROM university_ranking_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T2.id = 124

Give the name and score of the university ID 124 .

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


Question: How many units of item no.5 were sold in store no.3 on average on the days when the max temperature exceeded 90?

SELECT CAST(SUM(T1.units) AS REAL) / COUNT(T1.`date`) FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN weather AS T3 ON T2.station_nbr = T3.station_nbr WHERE T1.store_nbr = 3 AND T1.item_nbr = 5 AND T3.tmax > 90

How many units of item no.5 were sold in store no.3 on average on the days when the max temperature exceeded 90 ?

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


Question: Among all the matches SC Ganguly has played in, what is the highest winning margin?

SELECT MAX(T3.Win_Margin) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id WHERE T1.Player_Name = 'SC Ganguly'

Among all the matches SC Ganguly has played in , what is the highest winning margin ?

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


Question: How many current legislators do not have an account on ballotpedia.org ?

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


Question: What is the average bike availability in stations that are not located in Palo Alto?

SELECT avg(bikes_available) FROM status WHERE station_id NOT IN (SELECT id FROM station WHERE city  =  "Palo Alto")

What is the average bike availability in stations that are not located in Palo Alto ?

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


Question: State the Wikipedia page title that has revision page id of 28040864.

SELECT title FROM pages WHERE revision = 28040864

State the Wikipedia page title that has revision page i d of 28040864 .

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