Question: For each publisher, state the type of titles they published order by the publisher name.

SELECT DISTINCT T2.pub_name, T1.type FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id ORDER BY T2.pub_name

For each publisher , state the type of titles they published order by the publisher name .

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


Question: Indicate the name of all the journals published in the paper database in the year 2001.

SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Year = 2001 AND T1.ConferenceId > 0 AND T1.JournalId > 0

Indicate the name of all the journals published in the paper database in the year 2001 .

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


Question: Among the pairs of genes that are both located in the nucleus, what is the highest expression correlation score?

SELECT T2.Expression_Corr FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 INNER JOIN Genes AS T3 ON T3.GeneID = T2.GeneID2 WHERE T1.Localization = 'nucleus' AND T3.Localization = 'nucleus' ORDER BY T2.Expression_Corr DESC LIMIT 1

Among the pairs of genes that are both located in the nucleus , what is the highest expression correlation score ?

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


Question: State the shipping company of order id 10260.

SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.OrderID = 10260

State the shipping company of order i d 10260 .

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


Question: What is the most common property type, and what is its description.

SELECT T1.property_type_description ,  T1.property_type_code FROM Ref_Property_Types AS T1 JOIN Properties AS T2 ON T1.property_type_code  =  T2.property_type_code GROUP BY T1.property_type_code ORDER BY count(*) DESC LIMIT 1;

What is the most common property type , and what is its description .


Question: Among customers with the last name of Valdez, who purchased the highest quantity?

SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.LastName = 'Valdez' ORDER BY T2.Quantity DESC LIMIT 1

Among customers with the last name of Valdez , who purchased the highest quantity ?

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


Question: How many stores belong to the station with the highest recorded heat of all time?

SELECT COUNT(T2.store_nbr) FROM ( SELECT station_nbr FROM weather ORDER BY heat DESC LIMIT 1 ) AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr

How many stores belong to the station with the highest recorded heat of all time ?

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


Question: What is the number of different different airports that are destinations for American Airlines?

SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  'American Airlines'

What is the number of different different airports that are destinations for American Airlines ?

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


Question: Show the title of games that are not played by any player who is in the Guard position.

SELECT Title FROM game EXCEPT SELECT T1.Title FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.Position  =  "Guard"

Show the title of games that are not played by any player who is in the Guard position .

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


Question: What is the average price of clothes?

SELECT avg(product_price) FROM products WHERE product_type_code  =  'Clothes'


Question: What are the different first names for customers from Brazil who have also had an invoice?

SELECT DISTINCT T1.FirstName FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.country  =  "Brazil"

What are the different first names for customers from Brazil who have also had an invoice ?

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


Question: What were the products supplied by the company in Spain?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Spain'

What were the products supplied by the company in Spain ?


Question: Which city and address has zip code of above 90000?

SELECT locationcity, address FROM location WHERE zipcode > 90000

Which city and address has zip code of above 90000 ?

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


Question: How many number of paragraphs are there in chapter ID 18881?

SELECT COUNT(ParagraphNum) FROM paragraphs WHERE chapter_id = 18881

How many number of paragraphs are there in chapter ID 18881 ?

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


Question: Which player is the tallest?

SELECT player_name FROM Player ORDER BY height DESC LIMIT 1


Question: List the name of musicals that do not have actors.

SELECT Name FROM musical WHERE Musical_ID NOT IN (SELECT Musical_ID FROM actor)

List the name of musicals that do not have actors .

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


Question: How many faculty is there in total in the year of 2002?

SELECT sum(faculty) FROM faculty WHERE YEAR  =  2002

How many faculty is there in total in the year of 2002 ?

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


Question: Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5.

SELECT CAST(SUM(IIF(T1.ShipMethodID = 5, T3.OrderQty, 0)) AS REAL) / COUNT(T3.ProductID) FROM ShipMethod AS T1 INNER JOIN PurchaseOrderHeader AS T2 ON T1.ShipMethodID = T2.ShipMethodID INNER JOIN PurchaseOrderDetail AS T3 ON T2.PurchaseOrderID = T3.PurchaseOrderID

Calculate the average of the total ordered quantity of products purchased whose shipping method was Cargo Transport 5 .

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


Question: Return the maximum and minimum age across drivers.

Return the maximum and minimum age across drivers .


Question: What is the average salary of the employees who work as a Trainee?

SELECT AVG(CAST(REPLACE(SUBSTR(T1.salary, 4), ',', '') AS REAL)) AS avg FROM employee AS T1  INNER JOIN position AS T2  ON T1.positionID = T2.positionID WHERE T2.positiontitle = 'Trainee'

What is the average salary of the employees who work as a Trainee ?

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


Question: How many events did not have any participants?

SELECT count(*) FROM EVENTS WHERE event_id NOT IN (SELECT event_id FROM Participants_in_Events)

How many events did not have any participants ?


Question: What was the build up play speed class for "Willem II" on 2011/2/22?

SELECT t2.buildUpPlaySpeedClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Willem II' AND SUBSTR(t2.`date`, 1, 10) = '2011-02-22'

What was the build up play speed class for " Willem II " on 2011/2/22 ?

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


Question: Give the city name of the city with greatest distance from Boston.

SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code JOIN City AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.city_name  =  "Boston" ORDER BY distance DESC LIMIT 1

Give the city name of the city with greatest distance from Boston .

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


Question: Return the descriptions and names of the courses that have more than two students enrolled in.

SELECT T1.course_description ,  T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name HAVING COUNT(*)  >  2

Return the descriptions and names of the courses that have more than two students enrolled in .

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


Question: What are the names of parties with at least 2 events?

SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id HAVING count(*)  >=  2

What are the names of parties with at least 2 events ?

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


Question: How many authors are affiliated with NASA Langley Research Center?

SELECT COUNT(Name) FROM Author WHERE Affiliation = 'NASA Langley Research Center'

How many authors are affiliated with NASA Langley Research Center ?

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


Question: How many female characters are there in the movie "Spider-Man 3"?

SELECT COUNT(*) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Spider-Man 3' AND T3.gender = 'Female'

How many female characters are there in the movie " Spider - Man 3 " ?

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


Question: Which papers have "Stephanie Weirich" as an author?

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t1.fname  =  "Stephanie" AND t1.lname  =  "Weirich"

Which papers have " Stephanie Weirich " as an author ?

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


Question: How many elements are there for single bond molecules?

SELECT COUNT(DISTINCT T.element) FROM ( SELECT DISTINCT T2.molecule_id, T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id INNER JOIN bond AS T3 ON T2.molecule_id = T3.molecule_id WHERE T3.bond_type = '-' ) AS T

How many elements are there for single bond molecules ?


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

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

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

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


Question: What are the ids of songs that are available in either mp4 format or have resolution above 720?

SELECT f_id FROM files WHERE formats  =  "mp4" UNION SELECT f_id FROM song WHERE resolution  >  720

What are the ids of songs that are available in either mp4 format or have resolution above 720 ?

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


Question: List the names of all distinct medications, ordered in an alphabetical order.

SELECT DISTINCT name FROM medication ORDER BY name

List the names of all distinct medications , ordered in an alphabetical order .

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


Question: How many posts did Jay Stevens have in 2010?

SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T2.CreaionDate) = '2010' AND T1.DisplayName = 'Jay Stevens'

How many posts did Jay Stevens have in 2010 ?

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


Question: Among the cards that doesn't have multiple faces on the same card, who is the illustrator of the card art that has the highest cost of converted mana?

SELECT artist FROM cards WHERE side IS NULL ORDER BY convertedManaCost DESC LIMIT 1

Among the cards that does n't have multiple faces on the same card , who is the illustrator of the card art that has the highest cost of converted mana ?

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


Question: What is the border color of card "Ancestor's Chosen"?

SELECT DISTINCT borderColor FROM cards WHERE name = 'Ancestor''s Chosen'

What is the border color of card " Ancestor 's Chosen " ?

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


Question: How many art products were ordered in 2013 in the east superstore?

SELECT COUNT(DISTINCT T1.`Product ID`) FROM east_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Sub-Category` = 'Art' AND T1.Region = 'East' AND STRFTIME('%Y', T1.`Order Date`) = '2013'

How many art products were ordered in 2013 in the east superstore ?

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


Question: What is the comment format of method number 50 with the solution path "managedfusion_managedfusion\ManagedFusion.sln"?

SELECT CASE WHEN T2.CommentIsXml = 0 THEN 'isNotXMLFormat' WHEN T2.CommentIsXml = 1 THEN 'isXMLFormat' END format FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Id = 50 AND T1.Path = 'managedfusion_managedfusionManagedFusion.sln'

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


Question: What is the label for bond ID TR001_10_11?

SELECT T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_id = 'TR001_10_11'

What is the label for bond ID TR001_10_11 ?

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


Question: How many lessons were taught by a staff member whose first name has the letter 'a' in it?

SELECT count(*) FROM Lessons AS T1 JOIN Staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name LIKE "%a%"

How many lessons were taught by a staff member whose first name has the letter ' a ' in it ?

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


Question: Please show each industry and the corresponding number of companies in that industry.

SELECT Industry ,  COUNT(*) FROM Companies GROUP BY Industry

Please show each industry and the corresponding number of companies in that industry .

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


Question: In the branch where the second-highest number of crimes were committed in 1995 occurred, how many male clients are there?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.gender = 'M' AND T2.A15 = (SELECT T3.A15 FROM district AS T3 ORDER BY T3.A15 DESC LIMIT 1, 1)

In the branch where the second - highest number of crimes were committed in 1995 occurred , how many male clients are there ?

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


Question: In which league did the player who weighs 40% less than the heaviest player and whose height is 80 inches play?

SELECT T2.lgID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID GROUP BY T2.lgID, T1.weight HAVING T1.weight = MAX(T1.weight) - MAX(T1.weight) * 0.4

In which league did the player who weighs 40 % less than the heaviest player and whose height is 80 inches play ?

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


Question: What is the percentage of the units of item no.5 sold among all units of items sold in store no.3 on the day with the highest max temperature in 2012?

SELECT CAST(SUM(CASE WHEN T1.item_nbr = 5 THEN units * 1 ELSE 0 END) AS REAL) * 100 / SUM(units) 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.`date` LIKE '%2012%' AND T3.tmax = ( SELECT MAX(T3.tmax) 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.`date` LIKE '%2012%' )

What is the percentage of the units of item no.5 sold among all units of items sold in store no.3 on the day with the highest max temperature in 2012 ?

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


Question: Please list the home teams in the matches of the Bundesliga division that ended with a home victory in the 2021 season.

SELECT DISTINCT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2021 AND T1.FTR = 'H' AND T2.name = 'Bundesliga'

Please list the home teams in the matches of the Bundesliga division that ended with a home victory in the 2021 season .

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


Question: What is the organization level for Human Resources Manager?

SELECT OrganizationLevel FROM Employee WHERE JobTitle = 'Human Resources Manager'

What is the organization level for Human Resources Manager ?

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


Question: How many customers have never married?

SELECT COUNT(ID) FROM Customers WHERE MARITAL_STATUS = 'Never-married'


Question: Return the invoice status that has the most invoices.

SELECT invoice_status FROM Invoices GROUP BY invoice_status ORDER BY count(*) DESC LIMIT 1

Return the invoice status that has the most invoices .


Question: What are the names and ids of products costing between 600 and 700?

SELECT product_name ,  product_id FROM products WHERE product_price BETWEEN 600 AND 700

What are the names and ids of products costing between 600 and 700 ?

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


Question: Among the American casts, how many were uncredited on episode ID tt0629228?

SELECT COUNT(T1.person_id) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.episode_id = 'tt0629228' AND T1.category = 'Cast' AND T1.credited = 'false' AND T2.birth_country = 'USA'

Among the American casts , how many were uncredited on episode ID tt0629228 ?

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


Question: What are the names of storms that did not affect any regions?

SELECT name FROM storm WHERE storm_id NOT IN (SELECT storm_id FROM affected_region)

What are the names of storms that did not affect any regions ?

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


Question: How many aircrafts are there?


Question: What is the ID of the item that sold the best on the day with the highest max temperature in store no.3 in 2012?

SELECT T1.item_nbr 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.`date` LIKE '%2012%' AND tmax = ( SELECT MAX(tmax) 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.`date` LIKE '%2012%' ) GROUP BY T1.item_nbr ORDER BY SUM(units) DESC LIMIT 1

What is the ID of the item that sold the best on the day with the highest max temperature in store no.3 in 2012 ?

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


Question: Describe the students' full names and grades in Intro to BlockChain course.

SELECT T1.f_name, T1.l_name, T2.grade FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.name = 'Intro to BlockChain'

Describe the students ' full names and grades in Intro to BlockChain course .

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


Question: List the expenses that spend more than fifty dollars on average.

SELECT expense_description FROM expense GROUP BY expense_description HAVING AVG(cost) > 50

List the expenses that spend more than fifty dollars on average .


Question: Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907?

SELECT T1.Name FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country INNER JOIN politics AS T3 ON T3.Country = T2.Country WHERE STRFTIME('%Y', T2.Established) > '1907' AND T3.Government = 'constitutional monarchy' GROUP BY T1.Name ORDER BY COUNT(DISTINCT T2.Name) DESC LIMIT 1

Which constitutional monarchy nations saw the greatest growth in the number of organizations after 1907 ?

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


Question: Calculate the actual profit for order number 10100.

SELECT SUM((t1.priceEach - t2.buyPrice) * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN products AS t2 ON t1.productCode = t2.productCode WHERE t1.orderNumber = '10100'

Calculate the actual profit for order number 10100 .


Question: What are the locations that have both tracks with more than 90000 seats, and tracks with fewer than 70000 seats?

SELECT LOCATION FROM track WHERE seating  >  90000 INTERSECT SELECT LOCATION FROM track WHERE seating  <  70000

What are the locations that have both tracks with more than 90000 seats , and tracks with fewer than 70000 seats ?

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


Question: Calculate the percentage of the weight of goods being transported by Zachery Hicks to California in year 2016.

SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.weight ELSE 0 END) AS REAL) * 100 / SUM(T1.weight) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2016'

Calculate the percentage of the weight of goods being transported by Zachery Hicks to California in year 2016 .

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


Question: Among all the root beers purchased by Frank-Paul Santangelo, how many of them were non-sweetened?

SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T4.ArtificialSweetener = 'FALSE' AND T4.Honey = 'FALSE'

Among all the root beers purchased by Frank - Paul Santangelo , how many of them were non - sweetened ?

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


Question: Please list the names of all the teams that have played against the Buffalo Sabres.

SELECT DISTINCT T3.name FROM TeamVsTeam AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.oppID = T2.tmID INNER JOIN Teams AS T3 ON T1.year = T3.year AND T1.tmID = T3.tmID WHERE T2.name = 'Buffalo Sabres'

Please list the names of all the teams that have played against the Buffalo Sabres .

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


Question: What is the quantity of the part "burnished seashell gainsboro navajo chocolate" ordered in order no.1?

SELECT T1.l_quantity FROM lineitem AS T1 INNER JOIN part AS T2 ON T1.l_partkey = T2.p_partkey WHERE T1.l_orderkey = 1 AND T2.p_name = 'burnished seashell gainsboro navajo chocolate'

What is the quantity of the part " burnished seashell gainsboro navajo chocolate " ordered in order no.1 ?

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


Question: What is the number of distinct countries of all players?

SELECT COUNT (DISTINCT Country) FROM player

What is the number of distinct countries of all players ?


Question: Calculate the average budget of the movies directed by Jaume Collet-Serra.

SELECT CAST(SUM(T1.budget) AS REAL) / COUNT(T1.movie_id) 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 T3.person_name = 'Jaume Collet-Serra' AND T2.job = 'Director'

Calculate the average budget of the movies directed by Jaume Collet - Serra .

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


Question: What are the names of races that were held after 2017 and the circuits were in the country of Spain?

SELECT T1.name FROM races AS T1 JOIN circuits AS T2 ON T1.circuitid = T2.circuitid WHERE T2.country = "Spain" AND T1.year > 2017

What are the names of races that were held after 2017 and the circuits were in the country of Spain ?

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


Question: What is the average number of dishes per menu in the Souper de Luxe menus? Identify what is the name of the dish that appeared the most in all of its menus.

SELECT COUNT(*), T1.dish_id FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id INNER JOIN Dish AS T4 ON T1.dish_id = T4.id WHERE T3.name = 'Souper de Luxe' GROUP BY T3.id ORDER BY COUNT(T1.dish_id) DESC LIMIT 1

What is the average number of dishes per menu in the Souper de Luxe menus ? Identify what is the name of the dish that appeared the most in all of its menus .

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


Question: What is the name of the department and office location for the professor with the last name of Heffington?

SELECT T3.dept_name  ,  T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T2.dept_code  =  T3.dept_code WHERE T1.emp_lname  =  'Heffington'

What is the name of the department and office location for the professor with the last name of Heffington ?

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


Question: Return the poll source corresponding to the candidate who has the oppose rate.

SELECT poll_source FROM candidate ORDER BY oppose_rate DESC LIMIT 1

Return the poll source corresponding to the candidate who has the oppose rate .

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


Question: Count the number of different customers who have bought a Monitor Product.

SELECT count(DISTINCT T3.customer_id) FROM Order_items AS T1 JOIN Products AS T2 ON T1.product_id  =  T2.product_id JOIN Customer_orders AS T3 ON T3.order_id  =  T1.order_id WHERE T2.product_name  =  "Monitor"

Count the number of different customers who have bought a Monitor Product .

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


Question: What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10+?

SELECT AVG(Price) FROM playstore WHERE 'Content Rating' = 'Everyone 10+' AND Genres = 'Arcade'

What is the average price of games belonging in the arcade genre which has a content rating of Everyone 10 + ?

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


Question: How many sailors exist?


Question: Find all different planes whose names contain substring 'Bomber'.

SELECT DISTINCT plane_name FROM pilotskills WHERE plane_name LIKE '%Bomber%'

Find all different planes whose names contain substring ' Bomber ' .

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


Question: Of the projects whose resources are provided by the vendor Lakeshore Learning Materials, the school of which project has the highest cost of labor fulfillment? Please give its school ID.

SELECT T2.schoolid FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Lakeshore Learning Materials' ORDER BY T2.fulfillment_labor_materials DESC LIMIT 1

Of the projects whose resources are provided by the vendor Lakeshore Learning Materials , the school of which project has the highest cost of labor fulfillment ? Please give its school ID .

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


Question: Show the employee ids for all employees with role name "Human Resource" or "Manager".

SELECT T1.employee_id FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Human Resource" OR T2.role_name  =  "Manager"

Show the employee ids for all employees with role name " Human Resource " or " Manager " .

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


Question: Find the count and code of the job has most employees.

SELECT emp_jobcode ,  count(*) FROM employee GROUP BY emp_jobcode ORDER BY count(*) DESC LIMIT 1

Find the count and code of the job has most employees .


Question: Name the recipes which can lead to constipation.

SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.iron > 20

Name the recipes which can lead to constipation .


Question: What is the average annual amount of shipped sales from 1997 to 1998?

SELECT SUM(T2.UnitPrice * T2.Quantity * (1 - T2.Discount)) / 3 FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID WHERE T1.ShippedDate BETWEEN '1996-01-01 00:00:00' AND '1998-12-31 23:59:59'

What is the average annual amount of shipped sales from 1997 to 1998 ?


Question: How many documents owned by Marlin?

SELECT count(*) FROM Document_Objects WHERE OWNER = "Marlin";


Question: What is the channel code and contact number of the customer contact channel that was active for the longest time?

SELECT channel_code ,  contact_number FROM customer_contact_channels WHERE active_to_date - active_from_date  =  (SELECT active_to_date - active_from_date FROM customer_contact_channels ORDER BY (active_to_date - active_from_date) DESC LIMIT 1)

What is the channel code and contact number of the customer contact channel that was active for the longest time ?

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


Question: What are the top 5 most popular movie directors?

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 T2.job = 'Director' ORDER BY T1.popularity DESC LIMIT 5

What are the top 5 most popular movie directors ?


Question: How long does track Fast As a Shark has?

SELECT milliseconds FROM tracks WHERE name = "Fast As a Shark";

How long does track Fast As a Shark has ?

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


Question: What are the ids and names of the architects who built at least 3 bridges ?

SELECT T1.id ,  T1.name FROM architect AS T1 JOIN bridge AS T2 ON T1.id  =  T2.architect_id GROUP BY T1.id HAVING count(*)  >=  3

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


Question: How many patients' prescriptions are made by physician John Dorian?

SELECT count(T1.SSN) FROM patient AS T1 JOIN prescribes AS T2 ON T1.SSN  =  T2.patient JOIN physician AS T3 ON T2.physician  =  T3.employeeid WHERE T3.name = "John Dorian"

How many patients ' prescriptions are made by physician John Dorian ?

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


Question: List the names of 5 users followed by the largest number of other users.

SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 5

List the names of 5 users followed by the largest number of other users .

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


Question: Who has the highest salary? Please give their first name.

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

Who has the highest salary ? Please give their first name .

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


Question: Show all artist names with an average exhibition attendance over 200.

SELECT T3.name FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id  =  T2.exhibition_id JOIN artist AS T3 ON T3.artist_id  =  T2.artist_id GROUP BY T3.artist_id HAVING avg(T1.attendance)  >  200

Show all artist names with an average exhibition attendance over 200 .

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


Question: How many team franchises are active, with active value 'Y'?

SELECT count(*) FROM team_franchise WHERE active = 'Y';

How many team franchises are active , with active value ' Y ' ?

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


Question: Provide all ID, sex and birthday of patients whose urea nitrogen (UN) just within the borderline of passing?

SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.UN = 29

Provide all ID , sex and birthday of patients whose urea nitrogen ( UN ) just within the borderline of passing ?

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


Question: Calculate the difference in the average retail price of parts shipped via ship and air.

SELECT (CAST(SUM(IIF(T3.l_shipmode = 'SHIP', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'SHIP', 1, 0))) - (CAST(SUM(IIF(T3.l_shipmode = 'AIR', T1.p_retailprice, 0)) AS REAL) / SUM(IIF(T3.l_shipmode = 'AIR', 1, 0))) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_suppkey = T3.l_suppkey

Calculate the difference in the average retail price of parts shipped via ship and air .

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


Question: Return the average age for customers who have membership above the average across all customers.

SELECT avg(age) FROM customers WHERE membership_credit  >  (SELECT avg(membership_credit) FROM customers)

Return the average age for customers who have membership above the average across all customers .

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


Question: How many male competitors were there who participated in 1948 Summer?

SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T1.games_name = '1948 Summer' AND T3.gender = 'M'

How many male competitors were there who participated in 1948 Summer ?

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


Question: In the calls from the mountain division, how many are from teenage clients?

SELECT COUNT(T1.age) FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id WHERE T1.age BETWEEN 12 AND 20 AND T2.division = 'Mountain'

In the calls from the mountain division , how many are from teenage clients ?

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


Question: How many schools are in the basketball match?

SELECT count(DISTINCT school_id) FROM basketball_match

How many schools are in the basketball match ?


Question: Which country is 9 Green Ridge Point, Arendal located at?

SELECT T2.country_name FROM address AS T1 INNER JOIN country AS T2 ON T2.country_id = T1.country_id WHERE T1.street_number = 9 AND T1.street_name = 'Green Ridge Point' AND T1.city = 'Arendal'

Which country is 9 Green Ridge Point , Arendal located at ?

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


Question: What is the most frequently ordered product? Tell me the detail of the product

SELECT t2.product_details FROM order_items AS t1 JOIN products AS t2 ON t1.product_id  =  t2.product_id GROUP BY t1.product_id ORDER BY count(*) DESC LIMIT 1

What is the most frequently ordered product ? Tell me the detail of the product

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


Question: List the name of browsers in descending order by market share.

SELECT name FROM browser ORDER BY market_share DESC

List the name of browsers in descending order by market share .

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


Question: Count the total venues located in Pune City.

SELECT SUM(T1.Venue_Name) FROM Venue AS T1 INNER JOIN City AS T2 ON T1.City_Id = T2.City_Id WHERE T2.City_Name = 'Pune'

Count the total venues located in Pune City .


Question: How many distinct characteristic names does the product "cumin" have?

SELECT count(DISTINCT t3.characteristic_name) 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 WHERE t1.product_name  =  "sesame"

How many distinct characteristic names does the product " cumin " have ?

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


Question: List all of the ids for left-footed players with a height between 180cm and 190cm.

SELECT player_api_id FROM Player WHERE height  >=  180 AND height  <=  190 INTERSECT SELECT player_api_id FROM Player_Attributes WHERE preferred_foot  =  "left"

List all of the ids for left - footed players with a height between 180 cm and 190 cm .

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


Question: What is the most common hometown of gymnasts?

SELECT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID GROUP BY T2.Hometown ORDER BY COUNT(*) DESC LIMIT 1

What is the most common hometown of gymnasts ?


Question: What are the three journals that the papers written by Andrew Cain were published in? Please provide your answer with the full name of each journal.

SELECT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Journal AS T3 ON T1.JournalId = T3.Id WHERE T2.Name = 'Andrew Cain'

What are the three journals that the papers written by Andrew Cain were published in ? Please provide your answer with the full name of each journal .

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


Question: Which of Shakespeare's work has chapter description of "A field near Windsor"?

SELECT T2.Title FROM chapters AS T1 INNER JOIN works AS T2 ON T1.work_id = T2.id WHERE T1.Description = 'A field near Windsor.'

Which of Shakespeare 's work has chapter description of " A field near Windsor " ?

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


Question: How many students enlist in the air force organization?

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

How many students enlist in the air force organization ?

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


Question: Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment.

SELECT cName FROM College WHERE enr  <  13000 AND state = "AZ" UNION SELECT cName FROM College WHERE enr  >  15000 AND state = "LA"

Find the names of either colleges in LA with greater than 15000 size or in state AZ with less than 13000 enrollment .

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


Question: What is the list of drivers ordered by points in descending order?

SELECT Driver FROM driver ORDER BY Points DESC

What is the list of drivers ordered by points in descending order ?


Question: What is the name corresponding to the accoung with the lowest sum of checking and savings balances?

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

What is the name corresponding to the accoung with the lowest sum of checking and savings balances ?

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


Question: Please list the types of resources that the vendor Lakeshore Learning Materials has provided for the projects.

SELECT DISTINCT project_resource_type FROM resources WHERE vendor_name = 'Lakeshore Learning Materials'

Please list the types of resources that the vendor Lakeshore Learning Materials has provided for the projects .

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


Question: Who is responsible for most of the inspections? Give the full name.

SELECT T.first_name, T.last_name FROM ( SELECT T2.employee_id, T2.first_name, T2.last_name, COUNT(T1.inspection_id) FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id GROUP BY T2.employee_id, T2.first_name, T2.last_name ORDER BY COUNT(T1.inspection_id) DESC LIMIT 1 ) AS T

Who is responsible for most of the inspections ? Give the full name .

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


Question: List all the members of the "School of Applied Sciences, Technology and Education" department.

SELECT T1.first_name, T1.last_name FROM member AS T1 INNER JOIN major AS T2 ON T1.link_to_major = T2.major_id WHERE T2.department = 'School of Applied Sciences, Technology and Education'

List all the members of the " School of Applied Sciences , Technology and Education " department .

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


Question: List the nicknames of institutions in descending order of capacity.

SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Capacity DESC

List the nicknames of institutions in descending order of capacity .

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


Question: Show the name and age of the customer with maximum membership credit.

SELECT name ,  age FROM customers ORDER BY membership_credit DESC LIMIT 1

Show the name and age of the customer with maximum membership credit .

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


Question: Which manufacturers work for more than 1 club?

SELECT Manufacturer FROM club GROUP BY Manufacturer HAVING COUNT(*)  >  1

Which manufacturers work for more than 1 club ?


Question: Which repository has the longest amount of processed time of downloading? Indicate whether the solution paths in the repository can be implemented without needs of compilation.

SELECT DISTINCT T1.id, T2.WasCompiled FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Repo )

Which repository has the longest amount of processed time of downloading ? Indicate whether the solution paths in the repository can be implemented without needs of compilation .

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


Question: What is the average population for all cities location at Baltic Sea?

SELECT AVG(T1.Population) FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN sea AS T3 ON T3.Name = T2.Sea WHERE T3.Name = 'Baltic Sea'

What is the average population for all cities location at Baltic Sea ?

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


Question: Who was the actor who was portraying "Alex Brown" and has been credited?

SELECT T1.name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.person_id = T2.person_id WHERE T2.role = 'Alex Brown' AND T2.credited = 'true'

Who was the actor who was portraying " Alex Brown " and has been credited ?

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


Question: What are the state and country of all the cities that have post codes starting with 4.\

SELECT state_province_county ,  country FROM addresses WHERE zip_postcode LIKE "4%"

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


Question: Find the name and building of the department with the highest budget.

SELECT dept_name ,  building FROM department ORDER BY budget DESC LIMIT 1

Find the name and building of the department with the highest budget .

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


Question: How many papers were cited by schmidt99advanced cited word3555?

SELECT COUNT(T2.paper_id) FROM cites AS T1 INNER JOIN content AS T2 ON T1.cited_paper_id = T2.paper_id WHERE T1.citing_paper_id = 'schmidt99advanced' AND T2.word_cited_id = 'word3555'

How many papers were cited by schmidt99advanced cited word3555 ?

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


Question: List the titles of all items in alphabetic order .


Question: How many customers have email that contains "gmail.com"?

SELECT COUNT(*) FROM CUSTOMER WHERE Email LIKE "%gmail.com%"

How many customers have email that contains " gmail.com " ?

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


Question: List down the movies produced by Lucasfilm.

SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Lucasfilm'

List down the movies produced by Lucasfilm .


Question: Please list the top three shortest black players.

SELECT firstName, lastName FROM players WHERE race = 'B' AND height > 0 ORDER BY height ASC LIMIT 3

Please list the top three shortest black players .


Question: List down the first name of patients who encountered normal pregnancy.

SELECT DISTINCT T1.first FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T2.REASONDESCRIPTION = 'Normal pregnancy'

List down the first name of patients who encountered normal pregnancy .

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


Question: What are the names of the students who joined the Marines?

SELECT name FROM enlist WHERE organ = 'marines'

What are the names of the students who joined the Marines ?


Question: What elements are in the TR004_8_9 bond atoms?

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

What elements are in the TR004_8_9 bond atoms ?

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


Question: What are the GDP and population of the city that already served as a host more than once?

SELECT t1.gdp ,  t1.Regional_Population FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city GROUP BY t2.Host_City HAVING count(*)  >  1

What are the GDP and population of the city that already served as a host more than once ?

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


Question: List down the geographic identifier with an number of inhabitants less than 30.

SELECT GEOID FROM Demog WHERE INHABITANTS_K < 30

List down the geographic identifier with an number of inhabitants less than 30 .

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


Question: What are the names of the product that has the lowest rating?

SELECT T2.Name FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Rating = ( SELECT Rating FROM ProductReview ORDER BY Rating ASC LIMIT 1 )

What are the names of the product that has the lowest rating ?

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


Question: Give the name of the publisher of the game ID 75.

SELECT T2.publisher_name FROM game_publisher AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.game_id = 75

Give the name of the publisher of the game ID 75 .

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


Question: In year 2009, what is the percentage of the episode titled by "Gone Maggie Gone" being nominated?

SELECT CAST((SUM(CASE WHEN T1.result = 'Nominee' THEN 1 ELSE 0 END) - SUM(CASE WHEN T1.result = 'Winner' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.result) FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T2.title = 'Gone Maggie Gone' AND T1.year = 2009;

In year 2009 , what is the percentage of the episode titled by " Gone Maggie Gone " being nominated ?

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


Question: For the set of cards with "Ancestor's Chosen" in it, is there a Korean version of it?

SELECT IIF(SUM(CASE WHEN T2.language = 'Korean' AND T2.translation IS NOT NULL THEN 1 ELSE 0 END) > 0, 'YES', 'NO') FROM cards AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.setCode WHERE T1.name = 'Ancestor''s Chosen'

For the set of cards with " Ancestor 's Chosen " in it , is there a Korean version of it ?

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


Question: What are the countries that contain 3 or more cities?

SELECT T2.country FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id GROUP BY T2.country_id HAVING count(*)  >=  3

What are the countries that contain 3 or more cities ?


Question: What are the first name, last name, and gender of all the good customers? Order by their last name.

SELECT first_name ,  last_name ,  gender_mf FROM customers WHERE good_or_bad_customer  =  'good' ORDER BY last_name

What are the first name , last name , and gender of all the good customers ? Order by their last name .

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


Question: For the method which got the tokenized name as 'interp parser expr', what is the processed time for its solution?

SELECT T1.ProcessedTime FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'interp parser expr'

For the method which got the tokenized name as ' interp parser expr ' , what is the processed time for its solution ?

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


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

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

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

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


Question: Find the name of instructors who are advisors of the students from the Math department, and sort the results by students' total credit.

SELECT T2.name FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id  =  T2.id JOIN student AS T3 ON T1.s_id  =  T3.id WHERE T3.dept_name  =  'Math' ORDER BY T3.tot_cred

Find the name of instructors who are advisors of the students from the Math department , and sort the results by students ' total credit .

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


Question: What are all payment ids and payment details for invoices with status Working?

SELECT T1.payment_id ,  T1.payment_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id WHERE T2.invoice_status  =  'Working'

What are all payment ids and payment details for invoices with status Working ?

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


Question: What is the average distance between Boston and all other cities.

SELECT avg(distance) FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code WHERE T2.city_name  =  "Boston"

What is the average distance between Boston and all other cities .

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


Question: When did the user known as 'IrishStat' create his or her account?

SELECT CreationDate FROM users WHERE DisplayName = 'IrishStat'

When did the user known as ' IrishStat ' create his or her account ?

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


Question: Calculate the total rental rate for animation film titles.

SELECT SUM(T1.rental_rate) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.`name` = 'Animation'

Calculate the total rental rate for animation film titles .

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


Question: Find the names of all distinct wines that have appellations in North Coast area.

SELECT DISTINCT T2.Name FROM APPELLATIONs AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T1.Area  =  "North Coast"

Find the names of all distinct wines that have appellations in North Coast area .

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


Question: In which country and state does Janessa Sawayn live?

SELECT T1.country ,  T1.state_province_county FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T2.first_name = "Janessa" AND T2.last_name = "Sawayn";

In which country and state does Janessa Sawayn live ?

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


Question: How many FIFA games are there across all platforms?

SELECT COUNT(*) FROM ( SELECT T.game_name FROM game AS T WHERE T.game_name LIKE '%FIFA%' )

How many FIFA games are there across all platforms ?


Question: What is the total credit does each department offer?

SELECT sum(crs_credit) ,  dept_code FROM course GROUP BY dept_code

What is the total credit does each department offer ?


Question: List the IDs and full names of legislators from the Liberal Republican party.

SELECT T2.bioguide_id, 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 = 'Liberal Republican'

List the IDs and full names of legislators from the Liberal Republican party .

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


Question: What is the total number of all football games played by scholarship students?

SELECT sum(gamesplayed) FROM Sportsinfo WHERE sportname  =  "Football" AND onscholarship  =  'Y'

What is the total number of all football games played by scholarship students ?

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


Question: what are the name of players who get more than the average points.

SELECT name FROM player WHERE points  >  (SELECT avg(points) FROM player)

what are the name of players who get more than the average points .

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


Question: What is the nickname of staff with first name as Janessa and last name as Sawayn?

SELECT nickname FROM Staff WHERE first_name = "Janessa" AND last_name = "Sawayn";

What is the nickname of staff with first name as Janessa and last name as Sawayn ?

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


Question: Show the number of documents.


Question: How many scientists do not have any projects assigned to them?

SELECT count(*) FROM scientists WHERE ssn NOT IN (SELECT scientist FROM AssignedTo)

How many scientists do not have any projects assigned to them ?

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


Question: What type of promotion is of card 'Duress'?

SELECT promoTypes FROM cards WHERE name = 'Duress' AND promoTypes IS NOT NULL

What type of promotion is of card ' Duress ' ?

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


Question: Show names for all employees who do not have certificate of Boeing 737-800.

SELECT name FROM Employee EXCEPT SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "Boeing 737-800"

Show names for all employees who do not have certificate of Boeing 737 - 800 .

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


Question: How many dishes are there on the menu "Zentral Theater Terrace"?

SELECT SUM(CASE WHEN T3.name = 'Zentral Theater Terrace' THEN 1 ELSE 0 END) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id

How many dishes are there on the menu " Zentral Theater Terrace " ?

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


Question: How many businesses have a romantic ambiance?

SELECT COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value = 'true' AND T1.attribute_name = 'ambience_romantic'

How many businesses have a romantic ambiance ?


Question: What is the average height and width of paintings that are oil medium in gallery 241?

SELECT avg(height_mm) ,  avg(width_mm) FROM paintings WHERE medium  =  "oil" AND LOCATION  =  "Gallery 241"

What is the average height and width of paintings that are oil medium in gallery 241 ?

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


Question: Write down the website address which stores the episode image of episode 5.

SELECT episode_image FROM Episode WHERE episode = 5;

Write down the website address which stores the episode image of episode 5 .

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


Question: Find the full name of the player born in Atlanta and have the highest number of blocks. Also, in which team did this player perform the most number of blocks?

SELECT T1.firstName, T1.lastName, T2.tmID FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCity = 'Atlanta' ORDER BY T2.blocks DESC LIMIT 1

Find the full name of the player born in Atlanta and have the highest number of blocks . Also , in which team did this player perform the most number of blocks ?

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


Question: List the platform ID of the game titled Airborne Troops: Countdown to D-Day.

SELECT T1.platform_id FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN game AS T3 ON T2.game_id = T3.id WHERE T3.game_name = 'Airborne Troops: Countdown to D-Day'

List the platform ID of the game titled Airborne Troops : Countdown to D - Day .

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


Question: What percentage of the violations for "Melody Lounge" are moderate risks?

SELECT CAST(SUM(CASE WHEN T2.risk_category = 'Moderate Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM businesses AS T1 INNER JOIN violations AS T2 ON T1.business_id = T2.business_id WHERE T1.name = 'Melody Lounge'

What percentage of the violations for " Melody Lounge " are moderate risks ?

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


Question: How many PG adventure movies did Ron Clements direct?

SELECT COUNT(*) FROM director AS T1 INNER JOIN movies_total_gross AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Ron Clements' AND T2.MPAA_rating = 'PG' AND T2.genre = 'Adventure'

How many PG adventure movies did Ron Clements direct ?

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


Question: How many people in total can stay in the modern rooms of this inn?

SELECT sum(maxOccupancy) FROM Rooms WHERE decor  =  'modern';

How many people in total can stay in the modern rooms of this inn ?

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


Question: Find the captain rank that has no captain in Third-rate ship of the line class.

SELECT rank FROM captain EXCEPT SELECT rank FROM captain WHERE CLASS  =  'Third-rate ship of the line'

Find the captain rank that has no captain in Third - rate ship of the line class .

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


Question: Give the ids of Cookies or Cakes that cost between 3 and 7 dollars.

SELECT id FROM goods WHERE food  =  "Cookie" OR food  =  "Cake" AND price BETWEEN 3 AND 7

Give the ids of Cookies or Cakes that cost between 3 and 7 dollars .

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


Question: Which publisher created more superheroes: DC or Marvel Comics? Find the difference in the number of superheroes.

SELECT SUM(CASE WHEN T2.publisher_name = 'DC Comics' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id

Which publisher created more superheroes : DC or Marvel Comics ? Find the difference in the number of superheroes .

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


Question: Show the names and descriptions for all documents.

SELECT document_name ,  document_description FROM Documents

Show the names and descriptions for all documents .


Question: How many female crews are in the movie "Mr. Smith Goes to Washington"?

SELECT COUNT(T3.gender) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Mr. Smith Goes to Washington' AND T3.gender = 'Female'

How many female crews are in the movie " Mr. Smith Goes to Washington " ?

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


Question: During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix?

SELECT T1.lap FROM pitStops AS T1 INNER JOIN drivers AS T2 on T1.driverId = T2.driverId INNER JOIN races AS T3 on T1.raceId = T3.raceId WHERE T2.forename = 'Lewis' AND T2.surname = 'Hamilton' AND T3.year = 2011 AND T3.name = 'Australian Grand Prix'

During which lap did Lewis Hamilton take a pit stop during the 2011 Australian Grand Prix ?

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


Question: What is the precise coordinate of the location where simple assault incidents happened the most in Chatham?

SELECT T2.latitude, T2.longitude FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Simple Assault' AND T3.community_area_name = 'Chatham' AND T3.community_area_no = 44 ORDER BY T2.latitude DESC, T2.longitude DESC LIMIT 1

What is the precise coordinate of the location where simple assault incidents happened the most in Chatham ?

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


Question: Sort all captain names by their ages from old to young.

SELECT name FROM captain ORDER BY age DESC

Sort all captain names by their ages from old to young .

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


Question: Find the name of the movie that is on in both Odeon and Imperial theaters.

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

Find the name of the movie that is on in both Odeon and Imperial theaters .

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


Question: List the id of students who registered course statistics in the order of registration date.

SELECT T2.student_id FROM courses AS T1 JOIN student_course_registrations AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "statistics" ORDER BY T2.registration_date

List the i d of students who registered course statistics in the order of registration date .

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


Question: What are the names of the dishes shown in the lower right corner of menu page 48706?

SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.xpos > 0.75 AND T1.ypos > 0.75 AND T1.menu_page_id = 48706

What are the names of the dishes shown in the lower right corner of menu page 48706 ?

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


Question: What is the label that has the most albums?

SELECT label FROM albums GROUP BY label ORDER BY count(*) DESC LIMIT 1

What is the label that has the most albums ?


Question: List all of the books that were published in 1995.

SELECT title FROM book WHERE STRFTIME('%Y', publication_date) = '1995'

List all of the books that were published in 1995 .


Question: What are the average prices of products, grouped by manufacturer code?

SELECT AVG(Price) ,  Manufacturer FROM Products GROUP BY Manufacturer

What are the average prices of products , grouped by manufacturer code ?

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


Question: Give the number of 30-year-old users who were active in the events on 2016/5/2.

SELECT COUNT(T3.device_id) FROM app_events AS T1 INNER JOIN events AS T2 ON T1.event_id = T2.event_id INNER JOIN gender_age AS T3 ON T2.device_id = T3.device_id WHERE SUBSTR(`timestamp`, 1, 10) = '2016-05-02' AND T1.is_active = 1 AND T3.age = '30'

Give the number of 30 - year - old users who were active in the events on 2016/5/2 .

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


Question: Return the name of the youngest captain.

SELECT name FROM captain ORDER BY age LIMIT 1

Return the name of the youngest captain .


Question: What is the longest students absence duration from school?

SELECT name, month FROM longest_absense_from_school WHERE `month` = ( SELECT MAX(month) FROM longest_absense_from_school )

What is the longest students absence duration from school ?

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


Question: What is the name of the player who won the "man of the match" award in the match on 2008/4/18?

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

What is the name of the player who won the " man of the match " award in the match on 2008/4/18 ?

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


Question: Name the product that sold the most quantity.

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

Name the product that sold the most quantity .


Question: What is the name of the stadium which held the most events?

SELECT t1.name FROM stadium AS t1 JOIN event AS t2 ON t1.id  =  t2.stadium_id GROUP BY t2.stadium_id ORDER BY count(*) DESC LIMIT 1

What is the name of the stadium which held the most events ?

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


Question: Was the total cholesterol status for the patient id 2927464 on 1995-9-4 at the normal level?

SELECT CASE WHEN `T-CHO` < 250 THEN 'Normal' ELSE 'Abnormal' END FROM Laboratory WHERE ID = 2927464 AND Date = '1995-09-04'

Was the total cholesterol status for the patient i d 2927464 on 1995 - 9 - 4 at the normal level ?

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


Question: Give the total money requested by entrepreneurs who are taller than 1.85.

SELECT sum(T1.Money_Requested) FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Height  >  1.85

Give the total money requested by entrepreneurs who are taller than 1.85 .

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


Question: What's Christof Nielson's zip code type?

SELECT T2.type FROM member AS T1 INNER JOIN zip_code AS T2 ON T1.zip = T2.zip_code WHERE T1.first_name = 'Christof' AND T1.last_name = 'Nielson'

What 's Christof Nielson 's zip code type ?

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


Question: Tell the host city of the 1968 Winter Olympic Games.

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 = '1968 Winter'

Tell the host city of the 1968 Winter Olympic Games .

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


Question: Find the name of all customers.


Question: Which game has sold the fewest units?

SELECT T.game_name FROM ( 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 ORDER BY T4.num_sales LIMIT 1 ) t


Question: How many customers are from the city of Lethbridge?

SELECT COUNT(T3.customer_id) FROM city AS T1 INNER JOIN address AS T2 ON T1.city_id = T2.city_id INNER JOIN customer AS T3 ON T2.address_id = T3.address_id WHERE T1.city = 'Lethbridge'

How many customers are from the city of Lethbridge ?

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


Question: How many assets can each parts be used in? List the part name and the number.

SELECT T1.part_name ,  count(*) FROM Parts AS T1 JOIN Asset_Parts AS T2 ON T1.part_id  =  T2.part_id GROUP BY T1.part_name

How many assets can each parts be used in ? List the part name and the number .

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


Question: Show the average and maximum damage for all storms with max speed higher than 1000.

SELECT avg(damage_millions_USD) ,  max(damage_millions_USD) FROM storm WHERE max_speed  >  1000

Show the average and maximum damage for all storms with max speed higher than 1000 .

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


Question: What is the average time for a disabled student to be absent from school?

SELECT AVG(T1.month) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.`name` = T2.`name`

What is the average time for a disabled student to be absent from school ?

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


Question: What are the roles of the cast and crew from countries other than the USA?

SELECT T2.role FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.birth_country != 'USA';

What are the roles of the cast and crew from countries other than the USA ?

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


Question: How many images have a total of 10 attribute classes?

SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE OBJ_CLASS_ID = 10

How many images have a total of 10 attribute classes ?


Question: What is the title of the restricted film, whose length is 71 minutes and whose replacement cost is $29.99?

SELECT title FROM film WHERE replacement_cost = 29.99 AND rating = 'R' AND length = 71

What is the title of the restricted film , whose length is 71 minutes and whose replacement cost is $ 29.99 ?

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


Question: In drug abuse crimes, what percentage is related to cannabis?

SELECT CAST(COUNT(CASE WHEN T1.secondary_description LIKE '%CANNABIS%' THEN T1.secondary_description END) AS REAL) * 100 / COUNT(T1.secondary_description) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T3.title = 'Drug Abuse'

In drug abuse crimes , what percentage is related to cannabis ?

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


Question: Find the names of customers who have used either the service "Close a policy" or the service "Upgrade a policy".

SELECT t1.customer_name FROM customers AS t1 JOIN first_notification_of_loss AS t2 ON t1.customer_id  =  t2.customer_id JOIN services AS t3 ON t2.service_id  =  t3.service_id WHERE t3.service_name  =  "Close a policy" OR t3.service_name  =  "Upgrade a policy"

Find the names of customers who have used either the service " Close a policy " or the service " Upgrade a policy " .

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


Question: Find the id and name of the stadium where the largest number of injury accidents occurred.

SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

Find the i d and name of the stadium where the largest number of injury accidents occurred .

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


Question: What date did the project with he 'Lets Share Ideas essay' went live?

SELECT T1.date_posted FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Lets Share Ideas'

What date did the project with he ' Lets Share Ideas essay ' went live ?

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


Question: What is the date when the document "Marry CV" was stored?

SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry CV"

What is the date when the document " Marry CV " was stored ?

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


Question: Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10.

SELECT T2.c_name FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderdate = '1997-12-10' AND T1.o_clerk = 'Clerk#000000803'

Give the name of the customer who made an order with Clerk#000000803 on 1997/12/10 .

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


Question: What are the names of artists who did not have an exhibition in 2004?

SELECT name FROM artist EXCEPT SELECT T2.name FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id  =  T2.artist_id WHERE T1.year  =  2004

What are the names of artists who did not have an exhibition in 2004 ?

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


Question: What is average and maximum salary of all employees.

SELECT avg(salary) ,  max(salary) FROM Employee

What is average and maximum salary of all employees .


Question: What are the enrollments of schools whose denomination is not "Catholic"?

SELECT Enrollment FROM school WHERE Denomination != "Catholic"

What are the enrollments of schools whose denomination is not " Catholic " ?

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


Question: Give the NOC code and region name of the heaviest competitor.

SELECT T1.noc, T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id ORDER BY T3.weight DESC LIMIT 1

Give the NOC code and region name of the heaviest competitor .

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


Question: What's the finish time for the driver who ranked second in 2008's AustChineseralian Grand Prix?

SELECT T1.time FROM results AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId WHERE T1.rank = 2 AND T2.name = 'Chinese Grand Prix' AND T2.year = 2008

What 's the finish time for the driver who ranked second in 2008 's AustChineseralian Grand Prix ?

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


Question: For all the full attendence players in 1995, which player had most turnovers? Give the full name of the player.

SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.GP = 82 AND T2.year = 1995 ORDER BY T2.turnovers DESC LIMIT 1

For all the full attendence players in 1995 , which player had most turnovers ? Give the full name of the player .

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


Question: Please list down the last name of players from "BLB" team.

SELECT T1.lastName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.tmID = 'BLB'

Please list down the last name of players from " BLB " team .

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


Question: Give the full name of the actor who acted the most in drama movies?

SELECT T.first_name, T.last_name FROM ( SELECT T1.first_name, T1.last_name, COUNT(T2.film_id) AS num FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film_category AS T3 ON T2.film_id = T3.film_id WHERE T3.category_id = 7 GROUP BY T1.first_name, T1.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Give the full name of the actor who acted the most in drama movies ?

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


Question: Show ids for all students who live in CHI.

SELECT StuID FROM Student WHERE city_code  =  "CHI"

Show ids for all students who live in CHI .


Question: Indicate the coordinates of all the deserts whose area is in more than one country.

SELECT T1.Latitude, T1.Longitude FROM desert AS T1 INNER JOIN geo_desert AS T2 ON T1.Name = T2.Desert GROUP BY T1.Name, T1.Latitude, T1.Longitude HAVING COUNT(T1.Name) > 1

Indicate the coordinates of all the deserts whose area is in more than one country .


Question: Name the store with the highest quantity in sales? What is the least quantity title from the store's sale?

SELECT T3.stor_id, T2.title FROM sales AS T1 INNER JOIN titles AS T2 ON T1.title_id = T2.title_id INNER JOIN stores AS T3 ON T3.stor_id = T1.stor_id WHERE T3.stor_id = ( SELECT stor_id FROM sales GROUP BY stor_id ORDER BY SUM(qty) DESC LIMIT 1 ) GROUP BY T3.stor_id, T2.title ORDER BY SUM(T1.qty) ASC LIMIT 1

Name the store with the highest quantity in sales ? What is the least quantity title from the store 's sale ?

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


Question: Count the total number of counties.


Question: Show the number of accounts.


Question: Which buildings do not have any company office? Give me the building names.

SELECT name FROM buildings WHERE id NOT IN (SELECT building_id FROM Office_locations)

Which buildings do not have any company office ? Give me the building names .

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


Question: Find the maximum and minimum durations of tracks in milliseconds.

SELECT max(Milliseconds) ,  min(Milliseconds) FROM TRACK

Find the maximum and minimum durations of tracks in milliseconds .


Question: Calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts.

SELECT ROUND(CAST(COUNT(CASE WHEN T1.secondary_description = 'VEHICULAR HIJACKING' THEN T1.iucr_no END) AS REAL) / CAST(COUNT(DISTINCT CASE WHEN T1.secondary_description = 'VEHICULAR HIJACKING' THEN T3.district_name END) AS REAL) - CAST(COUNT(CASE WHEN T1.secondary_description = 'AGGRAVATED VEHICULAR HIJACKING' THEN T1.iucr_no END) AS REAL) / CAST(COUNT(DISTINCT CASE WHEN T1.secondary_description = 'AGGRAVATED VEHICULAR HIJACKING' THEN T3.district_name END) AS REAL), 4) AS "difference" FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no

Calculate the difference in the average number of vehicular hijackings and aggravated vehicular hijackings in the districts .

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


Question: List the user ID, business ID with review length of the business which received the most likes in tips.

SELECT T1.user_id, T1.business_id, T2.review_length FROM Tips AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id ORDER BY T1.likes DESC LIMIT 1

List the user ID , business ID with review length of the business which received the most likes in tips .

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


Question: List out full name of patients who have "Diabetic diet" in the description of the care plan.

SELECT DISTINCT T2.first, T2.last FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Diabetic diet'

List out full name of patients who have " Diabetic diet " in the description of the care plan .

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


Question: How many images have "vegetable" and "fruits" as their object classes?

SELECT COUNT(T1.IMG_ID) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'vegetables' OR T2.OBJ_CLASS = 'fruits'

How many images have " vegetable " and " fruits " as their object classes ?

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


Question: List the categories of all active businesses that were not in Arizona.

SELECT T3.category_name FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'TRUE' AND T1.state NOT LIKE 'AZ'

List the categories of all active businesses that were not in Arizona .

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


Question: What is the description for the CIS-220 and how many credits does it have?

SELECT crs_credit ,  crs_description FROM course WHERE crs_code  =  'CIS-220'

What is the description for the CIS-220 and how many credits does it have ?

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


Question: What product have the highest unit price and how many quantity have been being sold?

SELECT T1.ProductName, T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID ORDER BY T1.UnitPrice DESC LIMIT 1

What product have the highest unit price and how many quantity have been being sold ?

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


Question: Please list the full names of all the customers who have rented the film with the highest replacement cost.

SELECT T1.first_name, T1.last_name FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id ORDER BY T4.replacement_cost DESC LIMIT 1

Please list the full names of all the customers who have rented the film with the highest replacement cost .

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


Question: Please give the additional contact information of the oldest employee with the jod position of sales person.

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

Please give the additional contact information of the oldest employee with the jod position of sales person .

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


Question: Show the biographical information of the students whose details include the substring 'Suite'.

SELECT bio_data FROM Students WHERE student_details LIKE '%Suite%'

Show the biographical information of the students whose details include the substring ' Suite ' .

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


Question: How many players were included in the Hall of Fame on average between 1950 and 1980?

SELECT CAST(COUNT(name) AS REAL) / 30 FROM HOF WHERE year BETWEEN 1950 AND 1980 AND category = 'Player'

How many players were included in the Hall of Fame on average between 1950 and 1980 ?

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


Question: Which actor plays Optimus Prime?

SELECT DISTINCT T1.person_name FROM person AS T1 INNER JOIN movie_cast AS T2 ON T1.person_id = T2.person_id WHERE T2.character_name = 'Optimus Prime (voice)'


Question: Provide superheroes' names who have the adaptation power.

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

Provide superheroes ' names who have the adaptation power .

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


Question: What are the titles and paper ids which have Mckeown as an author, but not Rambow?

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

What are the titles and paper ids which have Mckeown as an author , but not Rambow ?

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


Question: List the cities located in U.A.E.

SELECT T1.City_Name FROM City AS T1 INNER JOIN Country AS T2 ON T2.Country_Id = T1.Country_id WHERE T2.Country_Name = 'U.A.E'


Question: Which campus has the most degrees conferred in all times?

SELECT campus FROM degrees GROUP BY campus ORDER BY sum(degrees) DESC LIMIT 1

Which campus has the most degrees conferred in all times ?


Question: What is the name of the establishment with the highest number of low risk violations in 2014?

SELECT T2.name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE STRFTIME('%Y', T1.`date`) = '2014' AND T1.risk_category = 'Low Risk' GROUP BY T2.name ORDER BY COUNT(T2.business_id) DESC LIMIT 1

What is the name of the establishment with the highest number of low risk violations in 2014 ?

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


Question: Describe the display name of the parent ID for child post with the highest score.

SELECT DisplayName FROM users WHERE Id = ( SELECT OwnerUserId FROM posts WHERE ParentId IS NOT NULL ORDER BY Score DESC LIMIT 1 )

Describe the display name of the parent ID for child post with the highest score .

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


Question: Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000.

SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000

Please show the names and descriptions of aircrafts associated with airports that have a total number of passengers bigger than 10000000 .

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


Question: List the first names of all the students in room 107.

SELECT DISTINCT firstname FROM list WHERE classroom  =  107

List the first names of all the students in room 107 .

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


Question: find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30.

SELECT t1.name ,  t1.age FROM pilot AS t1 JOIN MATCH AS t2 ON t1.pilot_id  =  t2.winning_pilot WHERE t1.age  <  30 GROUP BY t2.winning_pilot ORDER BY count(*) DESC LIMIT 1

find the name and age of the pilot who has won the most number of times among the pilots who are younger than 30 .

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


Question: What are the job ids and dates of hire for employees hired after November 5th, 2007 and before July 5th, 2009?

SELECT job_id ,  hire_date FROM employees WHERE hire_date BETWEEN '2007-11-05' AND '2009-07-05'

What are the job ids and dates of hire for employees hired after November 5th , 2007 and before July 5th , 2009 ?

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


Question: What was the role of Jason Kuschner in episode 9?

SELECT T1.role FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id INNER JOIN Episode AS T3 ON T1.episode_id = T3.episode_id WHERE T3.episode = 9 AND T2.name = 'Jason Kuschner'

What was the role of Jason Kuschner in episode 9 ?

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


Question: Identify the players with the same height as Brian Gionta. How tall are they?

SELECT T2.PlayerName, T1.height_in_cm FROM height_info AS T1 INNER JOIN PlayerInfo AS T2 ON T1.height_id = T2.height WHERE T2.height = ( SELECT height FROM PlayerInfo WHERE PlayerName = 'Brian Gionta' )

Identify the players with the same height as Brian Gionta . How tall are they ?

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


Question: How many publishers published the Minecraft game?

SELECT COUNT(T2.publisher_id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id WHERE T1.game_name = 'Minecraft'

How many publishers published the Minecraft game ?

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


Question: How many comments and answers were left by the users on the post with the title 'Clustering 1D data'?

SELECT CommentCount, AnswerCount FROM posts WHERE Title = 'Clustering 1D data'

How many comments and answers were left by the users on the post with the title ' Clustering 1D data ' ?

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


Question: What is the Island Trading customer's complete address?

SELECT Address, City, Region, Country, PostalCode FROM Customers WHERE CompanyName = 'Island Trading'

What is the Island Trading customer 's complete address ?

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


Question: What is the name of the most rented movie?

SELECT T.title FROM ( SELECT T1.title, COUNT(T3.rental_id) AS num FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id GROUP BY T1.title ) AS T ORDER BY T.num DESC LIMIT 1

What is the name of the most rented movie ?


Question: In which counties are there A&W Root Beer Restaurants?

SELECT DISTINCT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label = 'a & w root beer'

In which counties are there A&W Root Beer Restaurants ?

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


Question: On what dates did the billable period begin for patients with the last name Dickinson?

SELECT DISTINCT T2.BILLABLEPERIOD FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.last = 'Dickinson'

On what dates did the billable period begin for patients with the last name Dickinson ?

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


Question: List the character's name of actress born in Sherman Oaks and starred in the movie Bruce Almighty with height greater than the 50% of average height of all actors listed.

SELECT T3.Name FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Gender = 'Female' AND T1.Title = 'Godzilla' AND T3.`Birth City` = 'Sherman Oaks' AND T3.`Height (Inches)` * 100 > ( SELECT AVG(`Height (Inches)`) FROM actor ) * 50

List the character 's name of actress born in Sherman Oaks and starred in the movie Bruce Almighty with height greater than the 50 % of average height of all actors listed .

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


Question: What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt: Balance of payments: Capital & financial account?

SELECT IndicatorName, AggregationMethod FROM Series WHERE Topic = 'Economic Policy & Debt: Balance of payments: Capital & financial account'

What are the Indicator names and aggregation methods when the topic is Economic Policy & Debt : Balance of payments : Capital & financial account ?

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


Question: What percentage of male clients request for weekly statements to be issued?

SELECT CAST(SUM(T1.gender = 'M') AS REAL) * 100 / COUNT(T1.client_id) FROM client AS T1 INNER JOIN district AS T3 ON T1.district_id = T3.district_id INNER JOIN account AS T2 ON T2.district_id = T3.district_id INNER JOIN disp as T4 on T1.client_id = T4.client_id AND T2.account_id = T4.account_id WHERE T2.frequency = 'POPLATEK TYDNE'

What percentage of male clients request for weekly statements to be issued ?


Question: What are the names of ships, ordered by year they were built and their class?

SELECT name FROM ship ORDER BY built_year ,  CLASS

What are the names of ships , ordered by year they were built and their class ?

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


Question: What is the last name of the staff member in charge of the complaint on the product with the lowest price?

SELECT t1.last_name FROM staff AS t1 JOIN complaints AS t2 ON t1.staff_id  =  t2.staff_id JOIN products AS t3 ON t2.product_id  =  t3.product_id ORDER BY t3.product_price LIMIT 1

What is the last name of the staff member in charge of the complaint on the product with the lowest price ?

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


Question: Please list all the medication that are prescribed to Elly Koss.

SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss'

Please list all the medication that are prescribed to Elly Koss .

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


Question: For the flight with the tail number 'N702SK', which air carrier does it belong to?

SELECT T2.Description FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.TAIL_NUM = 'N702SK' GROUP BY T2.Description

For the flight with the tail number ' N702SK ' , which air carrier does it belong to ?

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


Question: What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000?

SELECT T1.Aircraft ,  T1.Description FROM aircraft AS T1 JOIN airport_aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN airport AS T3 ON T2.Airport_ID  =  T3.Airport_ID WHERE T3.Total_Passengers  >  10000000

What are the names and descriptions of aircrafts associated with an airport that has more total passengers than 10000000 ?

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


Question: Which countries are dependent on the British Crown?

SELECT Country FROM politics WHERE Government = 'British crown dependency'

Which countries are dependent on the British Crown ?


Question: How many orders were shipped in 1998?

SELECT COUNT(l_orderkey) FROM lineitem WHERE STRFTIME('%Y', l_shipdate) = '1998'


Question: What are the names, checking balances, and savings balances of customers, ordered by the total of checking and savings balances descending?

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

What are the names , checking balances , and savings balances of customers , ordered by the total of checking and savings balances descending ?

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


Question: What are the name and active date of the customers whose contact channel code is email?

SELECT t1.customer_name ,  t2.active_from_date FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.channel_code  =  'Email'

What are the name and active date of the customers whose contact channel code is email ?

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


Question: How many players, whose shooting/catching hand is both left and right, debuted their first NHL in 2011?

SELECT COUNT(playerID) FROM Master WHERE shootCatch IS NULL AND firstNHL = '2011'

How many players , whose shooting / catching hand is both left and right , debuted their first NHL in 2011 ?

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


Question: How many male clients are from the state of Massachusetts?

SELECT COUNT(T3.sex) FROM state AS T1 INNER JOIN district AS T2 ON T1.StateCode = T2.state_abbrev INNER JOIN client AS T3 ON T2.district_id = T3.district_id WHERE T1.state = 'Massachusetts' AND T3.sex = 'Male'

How many male clients are from the state of Massachusetts ?

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


Question: List at least 10 device models that male users over the age of 39 usually use.

SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.`group` = 'M39+' AND T2.gender = 'M' LIMIT 10

List at least 10 device models that male users over the age of 39 usually use .

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


Question: Please list all the cities from where tweets with neutral sentiments were posted.

SELECT DISTINCT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE Sentiment = 0

Please list all the cities from where tweets with neutral sentiments were posted .

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


Question: Show the lieutenant governor and comptroller from the democratic party.

SELECT Lieutenant_Governor ,  Comptroller FROM party WHERE Party  =  "Democratic"

Show the lieutenant governor and comptroller from the democratic party .

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


Question: How many customer cards are there?


Question: What is the characteristic name used by most number of the products?

SELECT t3.characteristic_name 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 GROUP BY t3.characteristic_name ORDER BY count(*) DESC LIMIT 1

What is the characteristic name used by most number of the products ?

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


Question: When did the first-through-twelfth-grade school with the largest enrollment open?

SELECT T2.OpenDate FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1

When did the first - through - twelfth - grade school with the largest enrollment open ?

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


Question: What is the average value of Adolescent fertility rate in the country whose Alpha2Code is 1A?

SELECT CAST(SUM(T2.Value) AS REAL) * 100 / COUNT(T2.Year) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)'

What is the average value of Adolescent fertility rate in the country whose Alpha2Code is 1A ?

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


Question: Show the id and name of the aircraft with the maximum distance.

SELECT aid ,  name FROM Aircraft ORDER BY distance DESC LIMIT 1

Show the i d and name of the aircraft with the maximum distance .

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


Question: What are the names of people who have a height greater than 200 or less than 190?

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

What are the names of people who have a height greater than 200 or less than 190 ?

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


Question: Please name the latest historical work.

SELECT LongTitle FROM works WHERE GenreType = 'History' ORDER BY Date DESC LIMIT 1

Please name the latest historical work .


Question: Calculate the total quantity ordered for 18th Century Vintage Horse Carriage and the average price.

SELECT SUM(T2.quantityOrdered) , SUM(T2.quantityOrdered * T2.priceEach) / SUM(T2.quantityOrdered) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode WHERE T1.productName = '18th Century Vintage Horse Carriage'

Calculate the total quantity ordered for 18th Century Vintage Horse Carriage and the average price .

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


Question: What are the post history type IDs for post ID 3720 and how many unique users have commented on the post?

SELECT T1.PostHistoryTypeId, (SELECT COUNT(DISTINCT UserId) FROM comments WHERE PostId = 3720) AS NumberOfUsers FROM postHistory AS T1 WHERE T1.PostId = 3720

What are the post history type IDs for post ID 3720 and how many unique users have commented on the post ?

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


Question: How many double bonds does TR006 have and is it carcinogenic?

SELECT COUNT(T1.bond_id), T2.label FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '=' AND T2.molecule_id = 'TR006' GROUP BY T2.label

How many double bonds does TR006 have and is it carcinogenic ?


Question: List all movie title rated in April 2020 from user who was a trialist.

SELECT T1.movie_title FROM movies AS T1 INNER JOIN ratings AS T2 ON T1.movie_id = T2.movie_id WHERE T2.user_trialist = 1 AND T2.rating_timestamp_utc LIKE '2020-04%'

List all movie title rated in April 2020 from user who was a trialist .

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