Question: Find details of all the services that have interacted with `` 15 ij '' for the the channel details.

select distinct t1.service_details from services as t1 join customer_interactions as t2 on t1.service_id  =  t2.service_id join channels as t3 on t2.channel_id  =  t3.channel_id where t3.channel_details  =  "15 ij"

Find details of all the services that have interacted with ` ` 15 ij '' for the the channel details .

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


Question: Which countries and cities are included in addresses?

SELECT country ,  town_city FROM Addresses;

Which countries and cities are included in addresses ?


Question: What kind of location in Austin reported the most number of crimes?

SELECT T2.location_description FROM District AS T1 INNER JOIN Crime AS T2 ON T2.district_no = T1.district_no WHERE T1.district_name = 'Austin' GROUP BY T2.location_description ORDER BY COUNT(T2.case_number) DESC LIMIT 1

What kind of location in Austin reported the most number of crimes ?

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


Question: What are the product type code with at least two products?

SELECT product_type_code FROM Products GROUP BY product_type_code HAVING count(*)  >=  2

What are the product type code with at least two products ?

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


Question: What is the region of 1149 El Camino Real?

SELECT T2.region FROM location AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.street_num = 1149 AND T1.street_name = 'el camino real'

What is the region of 1149 El Camino Real ?

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


Question: Please list the top five players with the most steals in the year 1997. Please give their full name.

SELECT DISTINCT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.season_id = 1997 ORDER BY T2.steals DESC LIMIT 5

Please list the top five players with the most steals in the year 1997 . Please give their full name .

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


Question: What is the type of allergy Cat?

SELECT allergytype FROM Allergy_type WHERE allergy  =  "Cat"


Question: What is the height of the mountain on which river 'Lech' is located? Please also provide its longitude and latitude.

SELECT T1.Height, T1.Latitude, T1.Longitude FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province INNER JOIN located AS T4 ON T4.Province = T3.Name WHERE T4.River = 'Lech'

What is the height of the mountain on which river ' Lech ' is located ? Please also provide its longitude and latitude .

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


Question: Which is the country of the city named "Rajkot"?

SELECT T1.Country_Name FROM Country AS T1 INNER JOIN city AS T2 ON T1.Country_Id = T2.Country_Id WHERE city_name = 'Rajkot'

Which is the country of the city named " Rajkot " ?

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


Question: Find the last name and hire date of the professor who is in office DRE 102.

SELECT T1.emp_lname ,  T1.emp_hiredate FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num WHERE T2.prof_office  =  'DRE 102'

Find the last name and hire date of the professor who is in office DRE 102 .

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


Question: In what year did the only team to beat the Houston in the final round of postseason series games earn its lowest ranking?

SELECT T2.year FROM series_post AS T1 INNER JOIN teams AS T2 ON T1.tmIDWinner = T2.tmID WHERE T1.round = 'DSF' AND T1.tmIDLoser = 'HSM' ORDER BY T2.rank ASC LIMIT 1

In what year did the only team to beat the Houston in the final round of postseason series games earn its lowest ranking ?

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


Question: Find the name of customers who are living in Colorado?

SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  "Colorado"

Find the name of customers who are living in Colorado ?


Question: What are the maximum and minimum product prices for each product type?

SELECT product_type_code ,  max(product_price) ,  min(product_price) FROM products GROUP BY product_type_code

What are the maximum and minimum product prices for each product type ?

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


Question: What are the model, class, and construction of the cheapest headphone?

SELECT model ,  CLASS ,  construction FROM headphone ORDER BY price LIMIT 1

What are the model , class , and construction of the cheapest headphone ?

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


Question: List title of albums have the number of tracks greater than 10.

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

List title of albums have the number of tracks greater than 10 .

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


Question: List down film titles from id 1 to 10.

SELECT title FROM film WHERE film_id BETWEEN 1 AND 10

List down film titles from i d 1 to 10 .

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


Question: Count the number of markets that have a number of cities lower than 300.

SELECT count(*) FROM market WHERE Number_cities  <  300

Count the number of markets that have a number of cities lower than 300 .

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


Question: What is all the customer information for customers in NY state?

SELECT * FROM CUSTOMER WHERE State  =  "NY"

What is all the customer information for customers in NY state ?

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


Question: What is the name of the youngest player?

SELECT Player_Name FROM Player ORDER BY DOB DESC LIMIT 1

What is the name of the youngest player ?


Question: List all titles which have year to date sales higher than the average order by pubisher name.

SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.ytd_sales > ( SELECT AVG(ytd_sales) FROM titles )

List all titles which have year to date sales higher than the average order by pubisher name .

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


Question: In the year that the Montreal Canadiens had 24 penalty minutes in the Stanley Cup finals, how many wins did the team had in total?

SELECT T2.W FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens' AND T2.PIM = 24

In the year that the Montreal Canadiens had 24 penalty minutes in the Stanley Cup finals , how many wins did the team had in total ?

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


Question: Which teams won more than 1 race?

SELECT Winning_team FROM race GROUP BY Winning_team HAVING count(*)  >  1


Question: What's the ratio of gender in actors to actress in all the UK movies?

SELECT CAST(SUM(IIF(T3.a_gender = 'M', 1, 0)) AS REAL) / SUM(IIF(T3.a_gender = 'F', 1, 0)) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid INNER JOIN actors AS T3 ON T2.actorid = T3.actorid WHERE T1.country = 'UK'

What 's the ratio of gender in actors to actress in all the UK movies ?

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


Question: List all students that have been absent for 6 months.

SELECT name FROM longest_absense_from_school WHERE `month` = 6

List all students that have been absent for 6 months .


Question: Please show the most common occupation of players.

SELECT Occupation FROM player GROUP BY Occupation ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common occupation of players .


Question: What is the last name of the youngest student?

SELECT LName FROM Student WHERE age  =  (SELECT min(age) FROM Student)

What is the last name of the youngest student ?


Question: In which city is the store with the highest total sales quantity located?

SELECT T2.city FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id GROUP BY T2.city ORDER BY SUM(T1.qty) DESC LIMIT 1

In which city is the store with the highest total sales quantity located ?

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


Question: Count the number of games.


Question: For Peter Kohnke, show the name of his/her region.

SELECT T1.region_name FROM noc_region AS T1 INNER JOIN person_region AS T2 ON T1.id = T2.region_id INNER JOIN person AS T3 ON T2.person_id = T3.id WHERE T3.full_name = 'Peter Kohnke'

For Peter Kohnke , show the name of his / her region .

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


Question: What is the word ID for the second word for the biwords pair with most repetitions?

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

What is the word ID for the second word for the biwords pair with most repetitions ?


Question: Find the number of programs for each channel. Return the name of each channel as well.

SELECT t1.name ,  count(*) FROM channel AS t1 JOIN program AS t2 ON t1.channel_id  =  t2.channel_id GROUP BY t1.channel_id

Find the number of programs for each channel . Return the name of each channel as well .

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


Question: Count the number of items store 1 has in stock.

SELECT count(*) FROM inventory WHERE store_id  =  1

Count the number of items store 1 has in stock .


Question: Of the employees whose vacation hours are no more than 10, what is the age of the oldest employee at the time he/she was hired? Indicate his/her full name.

SELECT STRFTIME('%Y', T1.HireDate) - STRFTIME('%Y', T1.BirthDate), T2.FirstName, T2.MiddleName, T2.LastName FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.VacationHours <= 10 ORDER BY STRFTIME('%Y', T1.HireDate) - STRFTIME('%Y', T1.BirthDate) DESC LIMIT 1

Of the employees whose vacation hours are no more than 10 , what is the age of the oldest employee at the time he / she was hired ? Indicate his / her full name .

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


Question: What are the codes of the airport found in Ankara, Turkey?

SELECT Code FROM Airports WHERE Description LIKE '%Ankara, Turkey%'

What are the codes of the airport found in Ankara , Turkey ?

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


Question: Which authors have last name "Ueno"? List their first names.

SELECT fname FROM authors WHERE lname  =  "Ueno"

Which authors have last name " Ueno " ? List their first names .

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


Question: Return the names of songs for which format is mp3 and resolution is below 1000.

SELECT T2.song_name FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.formats  =  "mp3" INTERSECT SELECT song_name FROM song WHERE resolution  <  1000

Return the names of songs for which format is mp3 and resolution is below 1000 .

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


Question: Please list the official full names of all the current legislators who do not have an account on C-SPAN's video website.

SELECT official_full_name FROM current WHERE cspan_id IS NULL OR cspan_id = ''

Please list the official full names of all the current legislators who do not have an account on C - SPAN 's video website .

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


Question: Tell me the number of orders with "Second time" as order detail.

SELECT count(*) FROM customer_orders WHERE order_details  =  "Second time"

Tell me the number of orders with " Second time " as order detail .

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


Question: When were the products ordered by Cruz & Sons Co. on 2003-03-03 shipped?

SELECT t1.shippedDate FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t2.customerName = 'Cruz & Sons Co.' AND t1.orderDate = '2003-03-03'

When were the products ordered by Cruz & Sons Co. on 2003 - 03 - 03 shipped ?

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


Question: Show distinct first and last names for all customers with an account.

SELECT DISTINCT T1.customer_first_name ,  T1.customer_last_name FROM Customers AS T1 JOIN Accounts AS T2 ON T1.customer_id  =  T2.customer_id

Show distinct first and last names for all customers with an account .


Question: What is the first name of all employees who do not give any lessons?

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

What is the first name of all employees who do not give any lessons ?

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


Question: Indicate category name of soft drinks, coffees, teas, beers, and ales in description list.

SELECT CategoryName FROM Categories WHERE Description = 'Soft drinks, coffees, teas, beers, and ales'

Indicate category name of soft drinks , coffees , teas , beers , and ales in description list .

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


Question: Show the details of all trucks in the order of their license number.

SELECT truck_details FROM trucks ORDER BY truck_licence_number

Show the details of all trucks in the order of their license number .

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


Question: Show all payment method codes and the number of customers in each code.

SELECT payment_method_code ,  count(*) FROM Customers GROUP BY payment_method_code

Show all payment method codes and the number of customers in each code .

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


Question: What is the total number of students impacted by the projects with a donation from a donor with zip code "22205"?

SELECT SUM(T2.students_reached) FROM donations AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.donor_zip = 22205

What is the total number of students impacted by the projects with a donation from a donor with zip code " 22205 " ?

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


Question: What is the name of the university that had the highest number of international students for 6 consecutive years?

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

What is the name of the university that had the highest number of international students for 6 consecutive years ?

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


Question: Among the matches in 2013, what is the percentage of winning of the team "Mumbai Indians"?

SELECT CAST(SUM(CASE WHEN T2.Match_Winner = 7 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Match_Winner) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner WHERE T2.Match_Date LIKE '2013%'

Among the matches in 2013 , what is the percentage of winning of the team " Mumbai Indians " ?

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


Question: What is the task of method number 2?

SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE Id = 2


Question: Return the name, rate, check in and check out date for the room with the highest rate.

SELECT T2.roomName ,  T1.Rate ,  T1.CheckIn ,  T1.CheckOut FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId GROUP BY T1.Room ORDER BY T1.Rate DESC LIMIT 1;

Return the name , rate , check in and check out date for the room with the highest rate .

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


Question: In Yale University, what is the average number of Black students per year who were bachelor's/equivalent-seeking cohort at 4-year institutions between 2002 to 2005?

SELECT AVG(T2.grad_cohort) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'Yale University' AND T2.year BETWEEN 2002 AND 2005 AND T2.race = 'B' AND T2.cohort = '4y bach'

In Yale University , what is the average number of Black students per year who were bachelor's / equivalent - seeking cohort at 4 - year institutions between 2002 to 2005 ?

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


Question: Tally the dishes that have appeared on the menu for more than 100 years.

SELECT T1.name FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.last_appeared - T1.first_appeared > 100

Tally the dishes that have appeared on the menu for more than 100 years .

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


Question: Identify the border's coordinates on the X and Y axes that enclose a folk in image no. 6.

SELECT T1.X, T1.Y FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 6 AND T2.OBJ_CLASS = 'folk'

Identify the border 's coordinates on the X and Y axes that enclose a folk in image no . 6 .

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


Question: Which state special schools have the highest number of enrollees from grades 1 through 12?

SELECT T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T2.DOC = 31 ORDER BY T1.`Enrollment (K-12)` DESC LIMIT 1

Which state special schools have the highest number of enrollees from grades 1 through 12 ?

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


Question: In which episodes was Anthony Azzara not credited?

SELECT T1.title FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id INNER JOIN Person AS T3 ON T3.person_id = T2.person_id WHERE T2.credited = 'false' AND T3.name = 'Anthony Azzara'

In which episodes was Anthony Azzara not credited ?

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


Question: What are the distinct first names and cities of the students who have allergy either to milk or to cat?

SELECT DISTINCT T1.fname ,  T1.city_code FROM Student AS T1 JOIN Has_Allergy AS T2 ON T1.stuid  =  T2.stuid WHERE T2.Allergy  =  "Milk" OR T2.Allergy  =  "Cat"

What are the distinct first names and cities of the students who have allergy either to milk or to cat ?

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


Question: For each product type, return the maximum and minimum price.

SELECT product_type_code ,  max(product_price) ,  min(product_price) FROM products GROUP BY product_type_code

For each product type , return the maximum and minimum price .


Question: Who is the tallest superhero?

SELECT superhero_name FROM superhero ORDER BY height_cm DESC LIMIT 1


Question: What are the usernames and passwords of all customers whose phone number starts with '+12'?

SELECT login_name ,  login_password FROM Customers WHERE phone_number LIKE '+12%'

What are the usernames and passwords of all customers whose phone number starts with ' +12 ' ?

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


Question: Give the publisher ID of Star Trek.

SELECT id FROM publisher WHERE publisher_name = 'Star Trek'

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


Question: What is the label with the most albums?

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

What is the label with the most albums ?


Question: For the paper which was presented by "Zvezdan Protić", was it preprinted?

SELECT CASE WHEN T1.Year = 0 THEN 'TRUE' ELSE 'FALSE' END FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T2.Name = 'Zvezdan Protić' AND T1.ConferenceId = 0 AND T1.JournalId = 0

For the paper which was presented by " Zvezdan Protić " , was it preprinted ?

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


Question: Return the title and inventory id of the film that is rented most often.

SELECT T1.title ,  T2.inventory_id FROM film AS T1 JOIN inventory AS T2 ON T1.film_id  =  T2.film_id JOIN rental AS T3 ON T2.inventory_id  =  T3.inventory_id GROUP BY T2.inventory_id ORDER BY count(*) DESC LIMIT 1

Return the title and inventory i d of the film that is rented most often .

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


Question: How many online purchases did Ole Group make in May 2019?

SELECT SUM(CASE WHEN T1.`Sales Channel` = 'Online' AND T2.`Customer Names` = 'Ole Group' AND T1.OrderDate LIKE '5/%/19' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID

How many online purchases did Ole Group make in May 2019 ?

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


Question: Find the name of the user who has the largest number of followers.

SELECT name FROM user_profiles ORDER BY followers DESC LIMIT 1

Find the name of the user who has the largest number of followers .

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


Question: Select the code of the product that is cheapest in each product category.

SELECT code ,  name ,  min(price) FROM products GROUP BY name

Select the code of the product that is cheapest in each product category .

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


Question: How many cards of legalities whose status is restricted have text boxes?

SELECT COUNT(DISTINCT T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T2.status = 'Restricted' AND T1.isTextless = 0

How many cards of legalities whose status is restricted have text boxes ?

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


Question: In February 2012, what percentage of customers consumed more than 528.3?

SELECT CAST(SUM(IIF(Consumption > 528.3, 1, 0)) AS FLOAT) * 100 / COUNT(CustomerID) FROM yearmonth WHERE Date = '201202'

In February 2012 , what percentage of customers consumed more than 528.3 ?

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


Question: Which event has the lowest cost?

SELECT T1.event_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget ORDER BY T3.cost LIMIT 1


Question: Find all the items that have chocolate flavor but were not bought more than 10 times.

SELECT DISTINCT T1.item FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.flavor  =  "Chocolate" GROUP BY item HAVING count(*)  <=  10

Find all the items that have chocolate flavor but were not bought more than 10 times .

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


Question: What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap?

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

What is the percentage of the cards with a converted mana cost of 7 in the set Coldsnap ?

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


Question: What are the albums produced in year 2010?

SELECT * FROM Albums WHERE YEAR  =  2010

What are the albums produced in year 2010 ?


Question: How many events were there on 30th April, 2016?

SELECT COUNT(event_id) FROM events WHERE SUBSTR(`timestamp`, 1, 10) = '2016-04-30'

How many events were there on 30th April , 2016 ?


Question: What are the names of institutions that have 1 or more championships?

SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID WHERE T1.Number_of_Championships  >=  1

What are the names of institutions that have 1 or more championships ?

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


Question: At what numbers on 9th Avenue of San Francisco there are restaurants?

SELECT id_restaurant FROM location WHERE City = 'san francisco' AND street_name = '9th avenue'

At what numbers on 9th Avenue of San Francisco there are restaurants ?

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


Question: What is the most ordered products by customers?

SELECT T1.ProductID FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY COUNT(*) DESC LIMIT 1

What is the most ordered products by customers ?


Question: State the width and height of the object with the class of 'van' in image 1.

SELECT T1.H, T1.W FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.IMG_ID = 1 AND T2.OBJ_CLASS = 'van'

State the width and height of the object with the class of ' van ' in image 1 .

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


Question: Among all the claims, what is the amount claimed in the claim with the least amount settled? List both the settlement amount and claim amount.

SELECT Amount_Settled ,  Amount_Claimed FROM Claims ORDER BY Amount_Settled ASC LIMIT 1

Among all the claims , what is the amount claimed in the claim with the least amount settled ? List both the settlement amount and claim amount .

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


Question: What are the vehicle ids and models of the vehicle which have been driven by two drivers or been manufactured by 'Ziyang'.

SELECT T1.vehicle_id ,  T1.model FROM vehicle AS T1 JOIN vehicle_driver AS T2 ON T1.vehicle_id  =  T2.vehicle_id GROUP BY T2.vehicle_id HAVING count(*)  =  2 OR T1.builder  =  'Ziyang'

What are the vehicle ids and models of the vehicle which have been driven by two drivers or been manufactured by ' Ziyang ' .

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


Question: What are the names of courses without prerequisites?

SELECT title FROM course WHERE course_id NOT IN (SELECT course_id FROM prereq)

What are the names of courses without prerequisites ?


Question: What is the full name of the alderman of ward no.21?

SELECT alderman_first_name, alderman_last_name, alderman_name_suffix FROM Ward WHERE ward_no = 21

What is the full name of the alderman of ward no.21 ?

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


Question: Find the first and last names of all artists who were born after 1850.

SELECT lname ,  fname FROM artists WHERE birthYear  >  1850

Find the first and last names of all artists who were born after 1850 .

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


Question: What is the city with the smallest GDP? Return the city and its GDP.

SELECT city ,  GDP FROM city ORDER BY GDP LIMIT 1

What is the city with the smallest GDP ? Return the city and its GDP .

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


Question: Find the players whose names contain letter 'a'.

SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%'

Find the players whose names contain letter ' a ' .


Question: In which country is the publisher of the book "Life Without Fear" located?

SELECT T2.country FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.title = 'Life Without Fear'

In which country is the publisher of the book " Life Without Fear " located ?

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


Question: Show the names of sponsors of players whose residence is either "Brandon" or "Birtle".

SELECT Sponsor_name FROM player WHERE Residence  =  "Brandon" OR Residence  =  "Birtle"

Show the names of sponsors of players whose residence is either " Brandon " or " Birtle " .

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


Question: Who is the clerk in charge of handling the item with the highest amount of extended price?

SELECT T1.o_clerk FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T2.l_extendedprice DESC LIMIT 1

Who is the clerk in charge of handling the item with the highest amount of extended price ?

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


Question: Among the zero-budget movie titles, which one has made the highest revenue?

SELECT title FROM movie WHERE budget = 0 ORDER BY revenue DESC LIMIT 1

Among the zero - budget movie titles , which one has made the highest revenue ?

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


Question: Return the budget type codes, budget type descriptions and document ids for documents with expenses.

SELECT T2.budget_type_code ,  T2.budget_type_description ,  T1.document_id FROM Documents_with_expenses AS T1 JOIN Ref_budget_codes AS T2 ON T1.budget_type_code  =  T2.budget_type_code

Return the budget type codes , budget type descriptions and document ids for documents with expenses .

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


Question: Show the dates, places, and names of events in descending order of the attendance.

SELECT Date ,  Name ,  venue FROM event ORDER BY Event_Attendance DESC

Show the dates , places , and names of events in descending order of the attendance .

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


Question: What is the ID of university with the largest percentage of international students?

SELECT university_id FROM university_year ORDER BY pct_international_students DESC LIMIT 1

What is the ID of university with the largest percentage of international students ?

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


Question: Find the name of physicians who are affiliated with both Surgery and Psychiatry departments.

SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Psychiatry'

Find the name of physicians who are affiliated with both Surgery and Psychiatry departments .

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


Question: How many competitors over the age of 30 participated in the 1992 Winter Olympics?

SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '1992 Winter' AND T2.age > 30

How many competitors over the age of 30 participated in the 1992 Winter Olympics ?

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


Question: What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic?

SELECT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR004_7' AND T2.label = '-'

What is the element with the atom ID of TR004_7 in molecule that is not carcinogenic ?

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


Question: What are the maximum and minimum budget of the departments?

SELECT max(budget_in_billions) ,  min(budget_in_billions) FROM department

What are the maximum and minimum budget of the departments ?


Question: What is the average age of pilots for different types of planes?

SELECT avg(age) ,  plane_name FROM pilotskills GROUP BY plane_name

What is the average age of pilots for different types of planes ?

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


Question: What are the names and cities of bank branches that offer loans for business?

SELECT T1.bname ,  T1.city FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.loan_type  =  'Business'

What are the names and cities of bank branches that offer loans for business ?

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


Question: Please list the name and id of all artists that have at least 3 albums in alphabetical order.

SELECT T2.Name ,  T1.ArtistId FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistID GROUP BY T1.ArtistId HAVING COUNT(*)  >=  3 ORDER BY T2.Name

Please list the name and i d of all artists that have at least 3 albums in alphabetical order .

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


Question: Among the orders from 2016 in the Central region, what is the product with the lowest profit?

SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Region = 'Central' AND STRFTIME('%Y', T1.`Order Date`) = '2016' ORDER BY T1.Profit ASC LIMIT 1

Among the orders from 2016 in the Central region , what is the product with the lowest profit ?

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


Question: What are the flavors of cakes that cost more than 10 dollars?

SELECT flavor FROM goods WHERE food  =  "Cake" AND price  >  10

What are the flavors of cakes that cost more than 10 dollars ?

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


Question: Count the number of members in club "Bootup Baltimore" whose age is below 18.

SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.age  <  18

Count the number of members in club " Bootup Baltimore " whose age is below 18 .

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


Question: What is the description of role code ED?

SELECT role_description FROM ROLES WHERE role_code = "ED";

What is the description of role code ED ?

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


Question: Which non capital city has the most people of all?

SELECT T3.Name FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T3.Name <> T1.Capital ORDER BY T3.Population DESC LIMIT 1

Which non capital city has the most people of all ?


Question: What is the average price for each food type?

SELECT avg(price) ,  food FROM goods GROUP BY food

What is the average price for each food type ?


Question: List the types and results of the inspections done on Riverwalk café.

SELECT T2.inspection_type, T2.results FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.facility_type = 'RIVERWALK CAFE'

List the types and results of the inspections done on Riverwalk café .

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


Question: Write down homepage URL of journal for paper "364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results".

SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Title = '364: Induction of Mixed Chimerism and Transplantation Tolerance in a Non-Human Primate Lung Allograft Model: Early Results'

Write down homepage URL of journal for paper " 364 : Induction of Mixed Chimerism and Transplantation Tolerance in a Non - Human Primate Lung Allograft Model : Early Results " .

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


Question: List the air carrier description and code of the flight with the shortest arrival time.

SELECT T1.Description, T1.Code FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID ORDER BY T2.ARR_TIME ASC LIMIT 1

List the air carrier description and code of the flight with the shortest arrival time .

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


Question: Find the name of the item with the lowest average rating.

SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id GROUP BY T2.i_id ORDER BY avg(T2.rating) LIMIT 1

Find the name of the item with the lowest average rating .


Question: Find the state, account type, and credit score of the customer whose number of loan is 0.

SELECT state ,  acc_type ,  credit_score FROM customer WHERE no_of_loans  =  0

Find the state , account type , and credit score of the customer whose number of loan is 0 .

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


Question: In 2015, how many complaints about Billing disputes were sent by clients in Portland?

SELECT COUNT(T1.client_id) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.city = 'Portland' AND T2.`Date received` LIKE '2015%' AND T2.Issue = 'Billing disputes'

In 2015 , how many complaints about Billing disputes were sent by clients in Portland ?

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


Question: Calculate the total profit made by chocolate floral blue coral cyan.

SELECT SUM(T3.l_extendedprice * (1 - T3.l_discount) - T2.ps_supplycost * T3.l_quantity) FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN lineitem AS T3 ON T2.ps_partkey = T3.l_partkey AND T2.ps_suppkey = T3.l_suppkey WHERE T1.p_name = 'chocolate floral blue coral cyan'

Calculate the total profit made by chocolate floral blue coral cyan .

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


Question: Which customer has the most reviews? State the full name.

SELECT T1.First, T1.Last FROM customers AS T1 INNER JOIN rootbeerreview AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY COUNT(T2.CustomerID) DESC LIMIT 1

Which customer has the most reviews ? State the full name .

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


Question: Find the male friend of Alice whose job is a doctor?

SELECT T2.friend FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T2.name  =  'Alice' AND T1.gender  =  'male' AND T1.job  =  'doctor'

Find the male friend of Alice whose job is a doctor ?

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


Question: What is the least purchased product by stores in the city of Santa Clarita?

SELECT T1.`Product Name` FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Santa Clarita' GROUP BY T1.`Product Name` ORDER BY COUNT(T1.`Product Name`) ASC LIMIT 1

What is the least purchased product by stores in the city of Santa Clarita ?

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


Question: How many times did SC Ganguly be the man of the match?

SELECT COUNT(T2.Man_of_the_Match) FROM Player AS T1 INNER JOIN Match AS T2 ON T1.Player_Id = T2.Man_of_the_Match INNER JOIN Player_Match AS T3 ON T3.Player_Id = T1.Player_Id WHERE T1.Player_Name = 'SC Ganguly'

How many times did SC Ganguly be the man of the match ?

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


Question: Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security.

SELECT T1.Installs , CAST(SUM(CASE WHEN T2.Sentiment = 'Positive' THEN 1 ELSE 0 END) * 100 / SUM(CASE WHEN T2.Sentiment IS NOT NULL THEN 1.0 ELSE 0 END) AS REAL) FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = 'FREEDOME VPN Unlimited anonymous Wifi Security'

Indicate the number of installs and include the percentage of positive sentiments of FREEDOME VPN Unlimited anonymous Wifi Security .

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


Question: What are the names of the top 5 universities with the highest number of international students?

SELECT DISTINCT T2.university_name FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id ORDER BY (CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) DESC LIMIT 5

What are the names of the top 5 universities with the highest number of international students ?

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


Question: Which vocal type has the band mate with first name "Solveig" played the most?

SELECT TYPE FROM vocals AS T1 JOIN band AS T2 ON T1.bandmate  =  T2.id WHERE firstname  =  "Solveig" GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1

Which vocal type has the band mate with first name " Solveig " played the most ?

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


Question: How many male (sex is M) students have class senator votes in the fall election cycle?

SELECT count(*) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  Class_Senator_Vote WHERE T1.Sex  =  "M" AND T2.Election_Cycle  =  "Fall"

How many male ( sex is M ) students have class senator votes in the fall election cycle ?

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


Question: Which teacher teaches the most courses? Give me the id of the teacher and the number of courses he or she teaches.

SELECT count(*) ,  teacher_id FROM Classes GROUP BY teacher_id ORDER BY count(*) DESC LIMIT 1

Which teacher teaches the most courses ? Give me the i d of the teacher and the number of courses he or she teaches .

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


Question: What is the name of the product with the id "475"?

SELECT Name FROM Product WHERE ProductID = 475

What is the name of the product with the i d " 475 " ?

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


Question: List the marital status and response of female customers with an level of education of 8 and above.

SELECT DISTINCT T1.MARITAL_STATUS, T2.RESPONSE FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T1.EDUCATIONNUM > 8 AND T1.SEX = 'Female'

List the marital status and response of female customers with an level of education of 8 and above .

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


Question: Return the booking start date and end date for the apartments that have type code "Duplex".

SELECT T1.booking_start_date ,  T1.booking_start_date FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T2.apt_type_code  =  "Duplex"

Return the booking start date and end date for the apartments that have type code " Duplex " .

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


Question: How many different clients have rented materials from Jon Stephens?

SELECT COUNT(T1.customer_id) FROM rental AS T1 INNER JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Jon' AND T2.last_name = 'Stephens'

How many different clients have rented materials from Jon Stephens ?


Question: Find the number of matches in different competitions.

SELECT count(*) ,  Competition FROM MATCH GROUP BY Competition

Find the number of matches in different competitions .


Question: What is the average age of first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department?

SELECT AVG(T1.age) FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID WHERE T2.RESPONSE = 'true'

What is the average age of first 60,000 customers who sent a true response to the incentive mailing sent by the marketing department ?

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


Question: How many professional or master/graduate courses are there?

SELECT COUNT(*) FROM course WHERE courseLevel = 'Level_500'

How many professional or master / graduate courses are there ?


Question: Name the deceased players whose death country is different from his birth country order by birth year.

SELECT firstName, lastName FROM Master WHERE birthCountry != deathCountry ORDER BY birthYear

Name the deceased players whose death country is different from his birth country order by birth year .

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


Question: How many albums has Billy Cobam released?

SELECT count(*) FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "Billy Cobham";

How many albums has Billy Cobam released ?


Question: What award did the episode that aired on 11/30/2008 win?

SELECT T1.award FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE T1.result = 'Winner' AND T2.air_date = '2008-11-30';

What award did the episode that aired on 11/30/2008 win ?

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


Question: What is the average number of followers of the lists created by the user who rated the movie "Pavee Lackeen: The Traveller Girl" on 3/27/2011 at 2:06:34 AM?

SELECT CAST(SUM(T4.list_followers) AS REAL) / COUNT(T2.list_id) FROM ratings AS T1 INNER JOIN lists_users AS T2 ON T1.user_id = T2.user_id INNER JOIN movies AS T3 ON T1.movie_id = T3.movie_id INNER JOIN lists AS T4 ON T2.list_id = T4.list_id WHERE T3.movie_title LIKE 'Pavee Lackeen: The Traveller Girl' AND T1.rating_timestamp_utc LIKE '2011-03-27 02:06:34'

What is the average number of followers of the lists created by the user who rated the movie " Pavee Lackeen : The Traveller Girl " on 3/27/2011 at 2:06:34 AM ?

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


Question: How many shipments were delivered to a customer from New York?

SELECT COUNT(*) FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.state = 'NY'

How many shipments were delivered to a customer from New York ?

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


Question: What are the labels for TR000, TR001 and TR002?

SELECT molecule_id, T.label FROM molecule AS T WHERE T.molecule_id IN ('TR000', 'TR001', 'TR002')

What are the labels for TR000 , TR001 and TR002 ?

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


Question: How many state universities are there?

SELECT COUNT(*) FROM university WHERE university_name LIKE '%State%'


Question: What are the names of the directors who created a movie with a 5 star rating, and what was the name of those movies?

SELECT T1.director ,  T1.title FROM Movie AS T1 JOIN Rating AS T2 ON T1.mID  =  T2.mID WHERE T2.stars  =  5

What are the names of the directors who created a movie with a 5 star rating , and what was the name of those movies ?

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


Question: How many student have the position of president?

SELECT COUNT(member_id) FROM member WHERE position = 'President'

How many student have the position of president ?


Question: How many customers do we have?


Question: Among the faculty affiliated professor, how many professors teaches professional or master/undergraduate courses?

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

Among the faculty affiliated professor , how many professors teaches professional or master / undergraduate courses ?

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


Question: List the distinct ids of all customers who bought a cake with lemon flavor?

SELECT DISTINCT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.Id  =  T2.Item JOIN receipts AS T3 ON T2.Receipt  =  T3.ReceiptNumber WHERE T1.Flavor  =  "Lemon" AND T1.Food  =  "Cake"

List the distinct ids of all customers who bought a cake with lemon flavor ?

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


Question: List the category of the business with high review count but received 2 stars.

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.stars = 2 AND T1.review_count LIKE 'High'

List the category of the business with high review count but received 2 stars .

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


Question: List the product code of the top five motorcycles, by descending order, the number of quantity in stock.

SELECT productCode, quantityInStock FROM products WHERE productLine = 'Motorcycles' ORDER BY quantityInStock DESC LIMIT 5

List the product code of the top five motorcycles , by descending order , the number of quantity in stock .

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


Question: Name the project titles meant for school whereby 65% of the students are on reduced lunch.

SELECT T1.title FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level LIKE 'highest%'

Name the project titles meant for school whereby 65 % of the students are on reduced lunch .

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


Question: Give me a list of the names of all songs ordered by their resolution.

SELECT song_name FROM song ORDER BY resolution

Give me a list of the names of all songs ordered by their resolution .

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


Question: List the infant mortality of country with the least Amerindian.

SELECT T1.Infant_Mortality FROM population AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Country = T2.Country WHERE T2.Name = 'Amerindian' ORDER BY T2.Percentage ASC LIMIT 1

List the infant mortality of country with the least Amerindian .

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


Question: Show the addresses of the buildings that have apartments with more than 2 bathrooms.

SELECT T1.building_address FROM Apartment_Buildings AS T1 JOIN Apartments AS T2 ON T1.building_id  =  T2.building_id WHERE T2.bathroom_count  >  2

Show the addresses of the buildings that have apartments with more than 2 bathrooms .

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


Question: How many distinct artists have volumes?

SELECT COUNT(DISTINCT Artist_ID) FROM volume

How many distinct artists have volumes ?


Question: List the names of aircrafts and the number of times it won matches.

SELECT T1.Aircraft ,  COUNT(*) FROM aircraft AS T1 JOIN MATCH AS T2 ON T1.Aircraft_ID  =  T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft

List the names of aircrafts and the number of times it won matches .


Question: How many furniture cushions orders which have date of order in 2018?

SELECT SUM(CASE WHEN T1.OrderDate LIKE '%/%/18' AND T2.`Product Name` = 'Furniture Cushions' THEN 1 ELSE 0 END) FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID

How many furniture cushions orders which have date of order in 2018 ?

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


Question: Show the census ranking of cities whose status are not "Village".

SELECT Census_Ranking FROM city WHERE Status !=  "Village"

Show the census ranking of cities whose status are not " Village " .

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


Question: List the full names of superheroes with missing weight.

SELECT DISTINCT full_name FROM superhero WHERE full_name IS NOT NULL AND (weight_kg IS NULL OR weight_kg = 0)

List the full names of superheroes with missing weight .

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


Question: What is the population gap between the United Kingdom and Italy?

SELECT MAX(Population) - MIN(Population) FROM country WHERE Name = 'United Kingdom' OR Name = 'Italy'

What is the population gap between the United Kingdom and Italy ?

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


Question: Identify the gender of the superhero who has the ability of Phoenix Force.

SELECT T4.gender 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 INNER JOIN gender AS T4 ON T1.gender_id = T4.id WHERE T3.power_name = 'Phoenix Force'

Identify the gender of the superhero who has the ability of Phoenix Force .

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


Question: Locate players with vision scores of 90 and above, state the country of these players.

SELECT DISTINCT t4.name FROM Player_Attributes AS t1 INNER JOIN Player AS t2 ON t1.player_api_id = t2.player_api_id INNER JOIN Match AS t3 ON t2.player_api_id = t3.home_player_8 INNER JOIN Country AS t4 ON t3.country_id = t4.id WHERE t1.vision > 89

Locate players with vision scores of 90 and above , state the country of these players .

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


Question: Which business had the most number of high risk violations? Give the name of the business.

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

Which business had the most number of high risk violations ? Give the name of the business .

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


Question: How many patients who underwent testing in 1997 had protein levels outside the normal range?

SELECT COUNT(ID) FROM Laboratory WHERE (ALB <= 6.0 OR ALB >= 8.5) AND STRFTIME('%Y', Date) = '1997'

How many patients who underwent testing in 1997 had protein levels outside the normal range ?


Question: What are the file sizes and formats for all songs with a resolution lower than 800?

SELECT DISTINCT T1.file_size ,  T1.formats FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T2.resolution  <  800

What are the file sizes and formats for all songs with a resolution lower than 800 ?

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


Question: How many of the businesses are located at 1825 POST St #223, San Francisco?

SELECT COUNT(business_id) FROM businesses WHERE address = '1825 POST St #223' AND city = 'SAN FRANCISCO'

How many of the businesses are located at 1825 POST St # 223 , San Francisco ?

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


Question: What is the closing and opening time of businesses located at Tempe with highest star rating?

SELECT T2.closing_time, T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Tempe' ORDER BY T1.stars DESC LIMIT 1

What is the closing and opening time of businesses located at Tempe with highest star rating ?

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


Question: How many of the papers are preprinted or not published?

SELECT COUNT(Id) FROM Paper WHERE Year = 0

How many of the papers are preprinted or not published ?


Question: What are the names of the aircraft that the least people are certified to fly?

SELECT T2.name FROM Certificate AS T1 JOIN Aircraft AS T2 ON T2.aid  =  T1.aid GROUP BY T1.aid ORDER BY count(*) DESC LIMIT 1

What are the names of the aircraft that the least people are certified to fly ?

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


Question: What are the distinct names and nationalities of the architects who have ever built a mill?

SELECT DISTINCT T1.name ,  T1.nationality FROM architect AS T1 JOIN mill AS t2 ON T1.id  =  T2.architect_id

What are the distinct names and nationalities of the architects who have ever built a mill ?

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


Question: How many episodes did J.K. Simmons' role appear on the show?

SELECT COUNT(T1.role) FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T2.name = 'J.K. Simmons'

How many episodes did J.K. Simmons ' role appear on the show ?

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


Question: What is the description of the chapter where the character whose abrreviated name is 1Play appeared first?

SELECT T2.Description FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id INNER JOIN characters AS T3 ON T1.character_id = T3.id WHERE T3.Abbrev = '1Play' ORDER BY T1.chapter_id LIMIT 1

What is the description of the chapter where the character whose abrreviated name is 1Play appeared first ?

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


Question: Count the number of entries for each plane name.

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

Count the number of entries for each plane name .


Question: Name the publisher which has the most titles published in 1991.

SELECT T2.pub_name FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE STRFTIME('%Y', T1.pubdate) = '1991' GROUP BY T1.pub_id, T2.pub_name ORDER BY COUNT(T1.title_id) DESC LIMIT 1

Name the publisher which has the most titles published in 1991 .

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


Question: How many teams playing in divisions in Greece have ever scored 4 or more goals?

SELECT COUNT(DISTINCT CASE WHEN T1.FTHG >= 4 THEN HomeTeam ELSE NULL end) + COUNT(DISTINCT CASE WHEN T1.FTAG >= 4 THEN AwayTeam ELSE NULL end) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.country = 'Greece'

How many teams playing in divisions in Greece have ever scored 4 or more goals ?

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


Question: How are all the achievements described? List the achievement detail and the type description.

SELECT T1.achievement_details ,  T2.achievement_type_description FROM Achievements AS T1 JOIN Ref_Achievement_Type AS T2 ON T1.achievement_type_code  =  T2.achievement_type_code

How are all the achievements described ? List the achievement detail and the type description .

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


Question: What are the titles and paper ids for papers written by Mckeown?

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 T3.author_id  =  T2.author_id WHERE T3.name LIKE "%Mckeown%"

What are the titles and paper ids for papers written by Mckeown ?

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


Question: What is the total number of crimes that happened in Bridgeport with beat less than 1000?

SELECT SUM(CASE WHEN T2.beat < 1000 THEN 1 ELSE 0 END) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T1.community_area_name = 'Bridgeport'

What is the total number of crimes that happened in Bridgeport with beat less than 1000 ?

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


Question: Which supplier supplies the most amount of products?

SELECT T2.CompanyName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID GROUP BY T2.SupplierID, T2.CompanyName ORDER BY COUNT(T1.ProductName) DESC LIMIT 1

Which supplier supplies the most amount of products ?


Question: Find the title of the movie that is played in the Odeon theater.

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

Find the title of the movie that is played in the Odeon theater .

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


Question: Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers.

SELECT DISTINCT LOCATION FROM station WHERE number_of_platforms  >=  15 AND total_passengers  >  25

Show all locations that have train stations with at least 15 platforms and train stations with more than 25 total passengers .

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


Question: How many owners are located in Mexico?

SELECT COUNT(ContactTitle) FROM Customers WHERE Country = 'Mexico' AND ContactTitle = 'Owner'


Question: What credit card is the most used in the purchase of non-alcoholic beer?

SELECT T2.CreditCardType FROM rootbeer AS T1 INNER JOIN `transaction` AS T2 ON T1.RootBeerID = T2.RootBeerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T3.Alcoholic = 'FALSE' GROUP BY T2.CreditCardType ORDER BY COUNT(T2.CreditCardType) DESC LIMIT 1

What credit card is the most used in the purchase of non - alcoholic beer ?

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


Question: What is the profit from selling the "O'Sullivan Living Dimensions 2-Shelf Bookcases"?

SELECT DISTINCT T1.Profit FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'O''Sullivan Living Dimensions 2-Shelf Bookcases'

What is the profit from selling the " O'Sullivan Living Dimensions 2 - Shelf Bookcases " ?

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


Question: Among the actors starred in Die Hard 2, list their net worth and birth date of actors with a height between 60 to 65.

SELECT T3.NetWorth, T3.`Date of Birth` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Title = 'Die Hard 2' AND T3.`Height (Inches)` BETWEEN 60 AND 65

Among the actors starred in Die Hard 2 , list their net worth and birth date of actors with a height between 60 to 65 .

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


Question: List all counties where there is no Bakers Square Restaurant & Pie Shop.

SELECT DISTINCT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.label != 'bakers square restaurant & pie shop'

List all counties where there is no Bakers Square Restaurant & Pie Shop .

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


Question: List all islands that are greater than the island on which Warwickshire is located.

SELECT DISTINCT Name FROM island WHERE Area > ( SELECT DISTINCT T3.Area FROM city AS T1 INNER JOIN locatedOn AS T2 ON T1.Name = T2.City INNER JOIN island AS T3 ON T3.Name = T2.Island WHERE T1.Province = 'Warwickshire' )

List all islands that are greater than the island on which Warwickshire is located .

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


Question: Return the names and locations of shops, ordered by name in alphabetical order.

SELECT Shop_Name ,  LOCATION FROM shop ORDER BY Shop_Name ASC

Return the names and locations of shops , ordered by name in alphabetical order .

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


Question: What is the average distance and average price for flights from Los Angeles.

SELECT avg(distance) ,  avg(price) FROM Flight WHERE origin  =  "Los Angeles"

What is the average distance and average price for flights from Los Angeles .

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


Question: Find employee with ID and name of the country presently where (s)he is working.

SELECT T1.employee_id ,  T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id

Find employee with ID and name of the country presently where ( s)he is working .

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


Question: State the number of students do not have payment due.

SELECT COUNT(name) FROM no_payment_due WHERE bool = 'neg'

State the number of students do not have payment due .

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


Question: Tell me the price ranges for all the hotels.

Tell me the price ranges for all the hotels .


Question: Which crytocurrency was not opened on 2013/5/3?

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-05-03' AND T2.open IS NULL

Which crytocurrency was not opened on 2013/5/3 ?


Question: Give me the average and minimum price (in Euro) of the products.

SELECT avg(price_in_euros) ,  min(price_in_euros) FROM catalog_contents

Give me the average and minimum price ( in Euro ) of the products .

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


Question: What are the total enrollments of universities of each affiliation type?

SELECT sum(enrollment) ,  affiliation FROM university GROUP BY affiliation

What are the total enrollments of universities of each affiliation type ?

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


Question: Calculate the total quantity of products purchased by customer called Adrian.

SELECT SUM(T2.Quantity) FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.FirstName = 'Adam'

Calculate the total quantity of products purchased by customer called Adrian .

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


Question: Please list the full names of all the students who are research assistants with the highest research capability.

SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN RA AS T2 ON T1.student_id = T2.student_id WHERE T2.capability = 5

Please list the full names of all the students who are research assistants with the highest research capability .

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


Question: Show the names of aircrafts that are associated with both an airport named "London Heathrow" and an airport named "London Gatwick"

SELECT T1.Aircraft 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.Airport_Name  =  "London Heathrow" INTERSECT SELECT T1.Aircraft 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.Airport_Name  =  "London Gatwick"

Show the names of aircrafts that are associated with both an airport named " London Heathrow " and an airport named " London Gatwick "

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