Question: Which of the two courses, "Advanced Operating System" or "Intro to BlockChain', did most of the students receive an A in?

SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.name IN ('Advanced Operating System', 'Intro to BlockChain') GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1

Which of the two courses , " Advanced Operating System " or " Intro to BlockChain ' , did most of the students receive an A in ?

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


Question: List the first name and last name of all customers.

SELECT first_name ,  last_name FROM Customers;

List the first name and last name of all customers .

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


Question: How many types of tax did the sales happen in Quebec have?

SELECT COUNT(DISTINCT T1.Name) FROM SalesTaxRate AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T2.Name = 'Quebec'

How many types of tax did the sales happen in Quebec have ?


Question: How many of the movies rated 5 are rated by a user between the ages of 25 and 35?

SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN users AS T2 ON T1.userid = T2.userid WHERE T1.rating = 5 AND T2.age BETWEEN 25 AND 35

How many of the movies rated 5 are rated by a user between the ages of 25 and 35 ?

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


Question: What are the names of all tracks that belong to the Rock genre and whose media type is MPEG?

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

What are the names of all tracks that belong to the Rock genre and whose media type is MPEG ?

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


Question: Find the name and country of origin for all artists who have release at least one song of resolution above 900.

SELECT T1.artist_name ,  T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.resolution  >  900 GROUP BY T2.artist_name HAVING count(*)  >=  1

Find the name and country of origin for all artists who have release at least one song of resolution above 900 .

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


Question: In which city has the greatest population, what is its percentage to its country population?

SELECT T3.Name, CAST(T3.Population AS REAL) * 100 / T1.Population FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Country = T2.Country ORDER BY T3.Population DESC LIMIT 1

In which city has the greatest population , what is its percentage to its country population ?

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


Question: Name chemical elements that form a bond TR001_10_11.

SELECT T1.element FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_id = 'TR001_10_11'

Name chemical elements that form a bond TR001_10_11 .

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


Question: Give the product type codes of product types that have two or more products.

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

Give the product type codes of product types that have two or more products .

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


Question: What is the name of the tourist attraction that is associated with the photo "game1"?

SELECT T2.Name FROM PHOTOS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T1.Name  =  "game1"

What is the name of the tourist attraction that is associated with the photo " game1 " ?

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


Question: display the employee number, name( first name and last name ), and salary for all employees who earn more than the average salary and who work in a department with any employee with a 'J' in their first name.

SELECT employee_id ,  first_name ,  last_name ,  salary FROM employees WHERE salary  >  ( SELECT AVG (salary) FROM employees ) AND department_id IN ( SELECT department_id FROM employees WHERE first_name LIKE '%J%')

display the employee number , name ( first name and last name ) , and salary for all employees who earn more than the average salary and who work in a department with any employee with a ' J ' in their first name .

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


Question: State the different ethnic group and percentage of the language in Singapore.

SELECT T1.Name, T1.Percentage FROM ethnicGroup AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T2.Name = 'Singapore' GROUP BY T1.Name, T1.Percentage

State the different ethnic group and percentage of the language in Singapore .

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


Question: Find the names of procedures which physician John Wen was trained in.

SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"

Find the names of procedures which physician John Wen was trained in .

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


Question: List the vehicle flight number, date and pilot of all the flights, ordered by altitude.

SELECT vehicle_flight_number ,  date ,  pilot FROM flight ORDER BY altitude ASC

List the vehicle flight number , date and pilot of all the flights , ordered by altitude .

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


Question: List the names of the countries with the below-average number of customers in ascending order of customer numbers.

SELECT T2.n_name FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey GROUP BY T2.n_name HAVING COUNT(T1.c_name) > ( SELECT COUNT(customer.c_name) / COUNT(DISTINCT nation.n_name) FROM customer INNER JOIN nation ON customer.c_nationkey = nation.n_nationkey ) ORDER BY COUNT(T1.c_name)

List the names of the countries with the below - average number of customers in ascending order of customer numbers .

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


Question: Return the name of the organization which has the most contact individuals.

SELECT t1.organization_name FROM organizations AS t1 JOIN organization_contact_individuals AS t2 ON t1.organization_id  =  t2.organization_id GROUP BY t1.organization_name ORDER BY count(*) DESC LIMIT 1

Return the name of the organization which has the most contact individuals .

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


Question: How many enzymes do not have any interactions?

SELECT count(*) FROM enzyme WHERE id NOT IN ( SELECT enzyme_id FROM medicine_enzyme_interaction );

How many enzymes do not have any interactions ?


Question: Give the city that the student whose family name is Kim lives in.

SELECT city_code FROM Student WHERE LName  =  "Kim"

Give the city that the student whose family name is Kim lives in .

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


Question: Which college has any student who is a goalie and succeeded in the tryout.

SELECT cName FROM  tryout WHERE decision  =  'yes' AND pPos  =  'goalie'

Which college has any student who is a goalie and succeeded in the tryout .

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


Question: Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross.

SELECT title ,  director FROM movie WHERE YEAR  <=  2000 ORDER BY gross_worldwide DESC LIMIT 1

Return the title and director of the movie released in the year 2000 or earlier that had the highest worldwide gross .

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


Question: Who made the purchase order with the greatest total due before freight? Indicate her employee ID and calculate for his/her age when he/she was hired.

SELECT T2.BusinessEntityID, STRFTIME('%Y', T2.HireDate) - STRFTIME('%Y', T2.BirthDate) FROM PurchaseOrderHeader AS T1 INNER JOIN Employee AS T2 ON T1.EmployeeID = T2.BusinessEntityID ORDER BY T1.TotalDue DESC LIMIT 1

Who made the purchase order with the greatest total due before freight ? Indicate her employee ID and calculate for his / her age when he / she was hired .

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


Question: Among orders in 2020, name the customers who had the greatest discount applied for 'Cocktail Glasses'

SELECT DISTINCT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND SUBSTR(T2.OrderDate, -2) = '20' AND T2.`Discount Applied` = ( SELECT T2.`Discount Applied` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN Products AS T3 ON T3.ProductID = T2._ProductID WHERE T3.`Product Name` = 'Cocktail Glasses' AND T2.OrderDate LIKE '%/%/20' ORDER BY T2.`Discount Applied` DESC LIMIT 1 )

Among orders in 2020 , name the customers who had the greatest discount applied for ' Cocktail Glasses '

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


Question: What is the review with the title "Hosts bring the show down" for?

SELECT title FROM podcasts WHERE podcast_id = ( SELECT podcast_id FROM reviews WHERE title = 'Hosts bring the show down' )

What is the review with the title " Hosts bring the show down " for ?

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


Question: List out the country name of upper middle income group. Which country has the earliest national account base year? List out the region where this country locates.

SELECT DISTINCT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IncomeGroup = 'Upper middle income' UNION SELECT longname FROM ( SELECT longname FROM country WHERE NationalAccountsBaseYear <> '' ORDER BY NationalAccountsBaseYear ASC LIMIT 1 )

List out the country name of upper middle income group . Which country has the earliest national account base year ? List out the region where this country locates .

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


Question: Among the episodes which have star score greater than 5, how many episodes have air date in 2008?

SELECT COUNT(DISTINCT T2.episode_id) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE strftime('%Y', T1.air_date) = '2008' AND T2.stars > 5;

Among the episodes which have star score greater than 5 , how many episodes have air date in 2008 ?

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


Question: How many products are never booked with amount higher than 200?

SELECT count(*) FROM Products_for_hire WHERE product_id NOT IN ( SELECT product_id FROM products_booked WHERE booked_amount  >  200 )

How many products are never booked with amount higher than 200 ?

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


Question: In the branch where the largest number of crimes were committed in 1996, how many accounts were opened?

SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id GROUP BY T1.A16 ORDER BY T1.A16 DESC LIMIT 1

In the branch where the largest number of crimes were committed in 1996 , how many accounts were opened ?

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


Question: Find the names of the authors who did not have any book with the "Accor" press.

SELECT name FROM author EXCEPT SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id JOIN press AS t3 ON t2.press_id  =  t3.press_id WHERE t3.name  =  'Accor'

Find the names of the authors who did not have any book with the " Accor " press .

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


Question: List all patients who were born in 1937 whose total cholesterol was beyond the normal range.

SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', T1.Birthday) = '1937' AND T2.`T-CHO` >= 250

List all patients who were born in 1937 whose total cholesterol was beyond the normal range .

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


Question: Which song has the most vocals?

SELECT title FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid GROUP BY T1.songid ORDER BY count(*) DESC LIMIT 1


Question: Sort the names of all counties in descending alphabetical order.

SELECT County_name FROM county ORDER BY County_name DESC

Sort the names of all counties in descending alphabetical order .


Question: Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names.

SELECT T2.Name ,  T1.College_Location FROM college AS T1 JOIN member AS T2 ON T1.College_ID  =  T2.College_ID ORDER BY T2.Name ASC

Show the names of members and the locations of colleges they go to in ascending alphabetical order of member names .

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


Question: State the coordinate of Sac State American River Courtyard.

SELECT T2.Latitude, T2.Longitude FROM location AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID WHERE T1.LocationName = 'Sac State American River Courtyard'

State the coordinate of Sac State American River Courtyard .

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


Question: List 5 solution path that has sampling time of 636431758961741000.

SELECT DISTINCT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.SampledAt = 636431758961741000 LIMIT 5

List 5 solution path that has sampling time of 636431758961741000 .

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


Question: How many students in the Air Force?

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


Question: List all headquarters and the number of companies in each headquarter.

SELECT headquarters ,  count(*) FROM company GROUP BY headquarters

List all headquarters and the number of companies in each headquarter .


Question: What are the register ids of electoral registries that have the cross reference source system code 'Electoral' or 'Tax'?

SELECT T1.electoral_register_id FROM Electoral_Register AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id WHERE T2.source_system_code  =  'Electoral' OR T2.source_system_code  =  'Tax'

What are the register ids of electoral registries that have the cross reference source system code ' Electoral ' or ' Tax ' ?

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


Question: Name and describe all projects created by New York teachers.

SELECT T1.title, T1.short_description FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.teacher_ny_teaching_fellow = 't'

Name and describe all projects created by New York teachers .


Question: How many poems did Shakespeare write?

SELECT COUNT(id) FROM works WHERE GenreType = 'Poem'


Question: List down the MapLight ID of the representatives in Maine.

SELECT T1.maplight_id FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.type = 'rep' AND T2.state = 'ME' GROUP BY T1.maplight_id

List down the MapLight ID of the representatives in Maine .


Question: What are the match IDs that were played at Brabourne Stadium?

SELECT T1.Match_Id FROM Match AS T1 INNER JOIN Venue AS T2 ON T2.Venue_Id = T1.Venue_Id WHERE T2.Venue_Name = 'Brabourne Stadium'

What are the match IDs that were played at Brabourne Stadium ?

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


Question: Show all customer ids and customer names.

SELECT customer_id ,  customer_name FROM Customers

Show all customer ids and customer names .

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


Question: Return the name of the oldest pilot.

SELECT pilot_name FROM PilotSkills ORDER BY age DESC LIMIT 1


Question: When and for what role did the youngest player appear in his first match?

SELECT T1.Match_Date, T4.Role_Desc FROM `Match` AS T1 INNER JOIN Player_Match AS T2 ON T1.Match_Id = T2.Match_Id INNER JOIN Player AS T3 ON T2.Player_Id = T3.Player_Id INNER JOIN Rolee AS T4 ON T2.Role_Id = T4.Role_Id ORDER BY T3.DOB DESC LIMIT 1

When and for what role did the youngest player appear in his first match ?

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


Question: How many donations does the project "Look, Look, We Need a Nook!" have?

SELECT SUM(T3.donation_total) FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Look, Look, We Need a Nook!'

How many donations does the project " Look , Look , We Need a Nook ! " have ?

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


Question: Among the papers with conference ID of 0, list down the authors of papers with a journal ID less than 100.

SELECT DISTINCT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.ConferenceId = 0 AND T1.JournalId < 100

Among the papers with conference ID of 0 , list down the authors of papers with a journal ID less than 100 .

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


Question: Provide the contact email of Moss Zarb.

SELECT email FROM customer WHERE first_name = 'Moss' AND last_name = 'Zarb'

Provide the contact email of Moss Zarb .


Question: What is the percentage of the number of 4-year public schools from Madison Area Technical College's home state in the Alabama?

SELECT CAST(COUNT(DISTINCT CASE WHEN T1.state = ( SELECT T1.state FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state WHERE T1.chronname = 'Madison Area Technical College' ) AND T1.level = '4-year' AND T1.control = 'Public' THEN T1.chronname ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT CASE WHEN T2.state = 'Alabama' THEN T1.chronname ELSE NULL END) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state

What is the percentage of the number of 4 - year public schools from Madison Area Technical College 's home state in the Alabama ?

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


Question: Provide the genre ID of the movie with the title of "The Dark Knight".

SELECT T2.genre_id FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id WHERE T1.title = 'The Dark Knight'

Provide the genre ID of the movie with the title of " The Dark Knight " .

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


Question: What is the average words of the 10 fewest words title?

SELECT CAST(SUM(CASE WHEN words >= 10 THEN words ELSE 0 END) AS REAL) / SUM(CASE WHEN words >= 10 THEN 1 ELSE 0 END) FROM pages

What is the average words of the 10 fewest words title ?


Question: Between device ID of "-9215352913819630000" and "-9222956879900150000", mention the age and gender of device user who participated more events.

SELECT T.age, T.gender FROM ( SELECT T2.age, T2.gender, COUNT(T1.device_id) AS num FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.device_id BETWEEN -9215352913819630000 AND -9222956879900150000 GROUP BY T2.age, T2.gender ) AS T ORDER BY T.num DESC LIMIT 1

Between device ID of " -9215352913819630000 " and " -9222956879900150000 " , mention the age and gender of device user who participated more events .

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


Question: Why did Mrs. Annabelle Pouros take leucovorin 100 mg injection on 1970/12/19? State the reason.

SELECT T2.reasondescription FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Mrs.' AND T1.first = 'Annabelle' AND T1.last = 'Pouros' AND T2.start = '1970-12-19' AND T2.description = 'Leucovorin 100 MG Injection'

Why did Mrs. Annabelle Pouros take leucovorin 100 mg injection on 1970/12/19 ? State the reason .

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


Question: Give the height of the tallest athlete from Portugal.

SELECT T3.height 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 T1.region_name = 'Portugal' ORDER BY T3.height DESC LIMIT 1

Give the height of the tallest athlete from Portugal .


Question: What are the names of all tracks that are on the Movies playlist but not in the music playlist?

SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id  =  T2.track_id JOIN playlists AS T3 ON T2.playlist_id  =  T3.id WHERE T3.name  =  'Movies' EXCEPT SELECT T1.name FROM tracks AS T1 JOIN playlist_tracks AS T2 ON T1.id  =  T2.track_id JOIN playlists AS T3 ON T2.playlist_id  =  T3.id WHERE T3.name  =  'Music'

What are the names of all tracks that are on the Movies playlist but not in the music playlist ?

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


Question: What are the names of instructors who advise more than one student?

SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id  =  T2.i_id GROUP BY T2.i_id HAVING count(*)  >  1

What are the names of instructors who advise more than one student ?

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


Question: How many percent more of the stars for the repository of solution No.51424 than No.167053?

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

How many percent more of the stars for the repository of solution No.51424 than No.167053 ?

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


Question: Return the full name of the customer who made the first rental.

SELECT T1.first_name ,  T1.last_name FROM customer AS T1 JOIN rental AS T2 ON T1.customer_id  =  T2.customer_id ORDER BY T2.rental_date ASC LIMIT 1

Return the full name of the customer who made the first rental .

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


Question: For the race happened in 2015/11/29, how many drivers did not finish the game?

SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NULL

For the race happened in 2015/11/29 , how many drivers did not finish the game ?

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


Question: Among the papers published in 2009, pick 10 and list down the conference's short name of these papers.

SELECT T2.PaperId, T4.ShortName FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId INNER JOIN Paper AS T3 ON T2.PaperId = T3.Id INNER JOIN Conference AS T4 ON T3.ConferenceId = T4.Id WHERE T3.Year = 2009 LIMIT 10

Among the papers published in 2009 , pick 10 and list down the conference 's short name of these papers .

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


Question: List the titles of all the books that Peter H. Smith wrote.

SELECT T1.title FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T3.author_name = 'Peter H. Smith'

List the titles of all the books that Peter H. Smith wrote .

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


Question: Find the total number of students in each department.

SELECT count(*) ,  dept_name FROM student GROUP BY dept_name

Find the total number of students in each department .


Question: IN which year did city "Taizhou ( Zhejiang )" serve as a host city?

SELECT T2.year FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city WHERE T1.city  =  "Taizhou ( Zhejiang )"

IN which year did city " Taizhou ( Zhejiang ) " serve as a host city ?

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


Question: From 1962 to 1975, how many coaches received the award?

SELECT COUNT(DISTINCT coachID) FROM awards_coaches WHERE year BETWEEN 1962 AND 1975

From 1962 to 1975 , how many coaches received the award ?

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


Question: What is the birth name of the person who voiced 'Helen Lovejoy?'

SELECT DISTINCT T1.birth_name FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.role = 'Helen Lovejoy';

What is the birth name of the person who voiced ' Helen Lovejoy ? '

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


Question: Give the color of the grape whose wine products have the highest average price?

SELECT T1.Color FROM GRAPES AS T1 JOIN WINE AS T2 ON T1.Grape  =  T2.Grape GROUP BY T2.Grape ORDER BY AVG(Price) DESC LIMIT 1

Give the color of the grape whose wine products have the highest average price ?

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


Question: Find the names of the artists who are from UK and have produced English songs.

SELECT artist_name FROM artist WHERE country  =  "UK" INTERSECT SELECT artist_name FROM song WHERE languages  =  "english"

Find the names of the artists who are from UK and have produced English songs .

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


Question: Count the number of buildings.


Question: List the first name, last name, height and weight of the players who has all free throw attempted successfully made.

SELECT DISTINCT T1.firstName, T1.lastName, T1.height, T1.weight FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.ft_attempted > 0 AND ft_attempted = ft_made

List the first name , last name , height and weight of the players who has all free throw attempted successfully made .

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


Question: Find the names of all swimmers, sorted by their 100 meter scores in ascending order.

SELECT name FROM swimmer ORDER BY meter_100

Find the names of all swimmers , sorted by their 100 meter scores in ascending order .

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


Question: How many calories does the turkey tenderloin bundles recipe have?

SELECT T2.calories FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.title = 'Turkey Tenderloin Bundles'

How many calories does the turkey tenderloin bundles recipe have ?

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


Question: How many disabled students have payment due?

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

How many disabled students have payment due ?


Question: What are the names of people in ascending alphabetical order?

SELECT Name FROM People ORDER BY Name ASC

What are the names of people in ascending alphabetical order ?


Question: What are the dates and locations of performances?

SELECT Date ,  LOCATION FROM performance

What are the dates and locations of performances ?


Question: Among all the customers in Germany, how many of them have an account balance of over 1000?

SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'GERMANY' AND T1.c_acctbal > 1000

Among all the customers in Germany , how many of them have an account balance of over 1000 ?

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


Question: When was the latest date the items of order no.1 were shipped?

SELECT MAX(l_shipdate) FROM lineitem WHERE l_orderkey = 1

When was the latest date the items of order no.1 were shipped ?

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


Question: What are the names of Robert King's territories?

SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.LastName = 'King' AND T1.FirstName = 'Robert'

What are the names of Robert King 's territories ?

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


Question: Why did Elly Koss need to take Acetaminophen?

SELECT T2.REASONDESCRIPTION FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Elly' AND T1.last = 'Koss' AND T2.description LIKE 'Acetaminophen%'

Why did Elly Koss need to take Acetaminophen ?


Question: Show the range that has the most number of mountains.

SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1

Show the range that has the most number of mountains .


Question: Show the product ids and the number of unique orders containing each product.

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

Show the product ids and the number of unique orders containing each product .

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


Question: Please calculate the total number of orders by each city in 2019.

SELECT COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T1.OrderDate LIKE '%/%/19' GROUP BY T2.`City Name` HAVING COUNT(T1.OrderNumber)

Please calculate the total number of orders by each city in 2019 .

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


Question: What is the category of the label that represented the behavior category of app id 5902120154267990000?

SELECT T1.category FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T2.app_id = 5902120154267990000

What is the category of the label that represented the behavior category of app i d 5902120154267990000 ?

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


Question: Provide the weight of the shipment to U-haul Center Of N Syracuse on 2016/9/21.

SELECT T1.weight FROM shipment AS T1 INNER JOIN customer AS T2 ON T1.cust_id = T2.cust_id WHERE T2.cust_name = 'U-haul Center Of N Syracuse' AND T1.ship_date = '2016-09-21'

Provide the weight of the shipment to U - haul Center Of N Syracuse on 2016/9/21 .

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


Question: Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000.

SELECT district_id ,  name FROM district WHERE area_km  >  3000 OR population  >  4000

Return the ids and names of the districts whose population is larger than 4000 or area bigger than 3000 .

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


Question: Return the sum of all payment amounts.


Question: Indicate the title of all the pages in which the word comunitat appears.

SELECT T3.title FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'comunitat'

Indicate the title of all the pages in which the word comunitat appears .

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


Question: Among the employees who wish to receive e-mail promotion from AdventureWorks, how many percent of them are female?

SELECT CAST(SUM(CASE WHEN T1.Gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 1

Among the employees who wish to receive e - mail promotion from AdventureWorks , how many percent of them are female ?

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


Question: Among the root beers sold in bottles, how many are sold at the location 38.559615, -121.42243?

SELECT COUNT(T4.BrandID) FROM `transaction` AS T1 INNER JOIN geolocation AS T2 ON T1.LocationID = T2.LocationID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID INNER JOIN rootbeer AS T4 ON T1.RootBeerID = T4.RootBeerID WHERE T2.Latitude = 38.559615 AND T2.Longitude = -121.42243 AND T4.ContainerType = 'Bottle'

Among the root beers sold in bottles , how many are sold at the location 38.559615 , -121.42243 ?

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


Question: Please list the vendor providing resources for the projects of a school with the highest poverty level.

SELECT T1.vendor_name FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T2.poverty_level = 'highest poverty'

Please list the vendor providing resources for the projects of a school with the highest poverty level .

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


Question: What are the different movie ratings?


Question: Show all locations and the number of gas stations in each location ordered by the count.

SELECT LOCATION ,  count(*) FROM gas_station GROUP BY LOCATION ORDER BY count(*)

Show all locations and the number of gas stations in each location ordered by the count .

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


Question: For the player who was drafted in the 1st round, 6th position in 1976, which team did he play in that year?

SELECT T2.tmID FROM draft AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.draftYear = T2.year WHERE T1.draftRound = 1 AND T1.draftSelection = 6 AND T1.draftYear = 1976

For the player who was drafted in the 1st round , 6th position in 1976 , which team did he play in that year ?

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


Question: What are the names of projects that have taken longer than the average number of hours for all projects?

SELECT name FROM projects WHERE hours  >  (SELECT avg(hours) FROM projects)

What are the names of projects that have taken longer than the average number of hours for all projects ?

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


Question: Find the average and oldest age for students with different sex.

SELECT avg(age) ,  max(age) ,  sex FROM student GROUP BY sex

Find the average and oldest age for students with different sex .

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


Question: Show ids for all female (sex is F) students living in state PA.

SELECT StuID FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code WHERE T1.state  =  "PA"  AND T2.sex  =  'F'

Show ids for all female ( sex is F ) students living in state PA .

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


Question: What are the names of the recipes that will cause stomach pain?

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

What are the names of the recipes that will cause stomach pain ?


Question: What is the percentage of superheroes who act in their own self-interest or make decisions based on their own moral code? Indicate how many of the said superheroes were published by Marvel Comics.

SELECT (CAST(COUNT(*) AS REAL) * 100 / (SELECT COUNT(*) FROM superhero)), CAST(SUM(CASE WHEN T2.publisher_name = 'Marvel Comics' THEN 1 ELSE 0 END) AS REAL) FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id INNER JOIN alignment AS T3 ON T3.id = T1.alignment_id WHERE T3.alignment = 'Bad'

What is the percentage of superheroes who act in their own self - interest or make decisions based on their own moral code ? Indicate how many of the said superheroes were published by Marvel Comics .

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


Question: Who wrote "The Prophet"?

SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id WHERE T1.title = 'The Prophet'


Question: Find the name of the company that has the least number of phone models. List the company name and the number of phone model produced by that company.

SELECT Company_name ,  count(*) FROM phone GROUP BY Company_name ORDER BY count(*) ASC LIMIT 1;

Find the name of the company that has the least number of phone models . List the company name and the number of phone model produced by that company .

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


Question: State name of female students who filed for bankruptcy.

SELECT T1.name FROM person AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T1.name = T3.name WHERE T3.name IS NULL

State name of female students who filed for bankruptcy .

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


Question: Find the names of stadiums which have never had any event.

SELECT name FROM stadium WHERE id NOT IN (SELECT stadium_id FROM event)

Find the names of stadiums which have never had any event .

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


Question: State all the tags used by Mark Meckes in his posts that doesn't have comments.

SELECT T3.Tags FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId INNER JOIN posts AS T3 ON T3.Id = T2.PostId WHERE T1.DisplayName = 'Mark Meckes' AND T3.CommentCount = 0

State all the tags used by Mark Meckes in his posts that does n't have comments .

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


Question: What is the email and phone number of Astrid Gruber the customer?

SELECT email ,  phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber";

What is the email and phone number of Astrid Gruber the customer ?

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


Question: How many players born in Toronto have won the All-Rookie award?

SELECT COUNT(T1.playerID) FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'All-Rookie' AND T1.birthCity = 'Toronto'

How many players born in Toronto have won the All - Rookie award ?

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


Question: Name the most common predicate class of image ID 4434.

SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 4434 ORDER BY T2.PRED_CLASS DESC LIMIT 1

Name the most common predicate class of image ID 4434 .

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


Question: How many students are there?


Question: Please list the names of all the suppliers for the part "hot spring dodger dim light".

SELECT T2.s_name FROM partsupp AS T1 INNER JOIN supplier AS T2 ON T1.ps_suppkey = T2.s_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_name = 'hot spring dodger dim light'

Please list the names of all the suppliers for the part " hot spring dodger dim light " .

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


Question: Compute the average price of all the products.

Compute the average price of all the products .


Question: What is the name of the project that has a scientist assigned to it whose name contains 'Smith'?

SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name LIKE '%Smith%'

What is the name of the project that has a scientist assigned to it whose name contains ' Smith ' ?

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


Question: What are the locations that have gas stations owned by a company with a market value greater than 100?

SELECT T3.location FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id WHERE T2.market_value  >  100

What are the locations that have gas stations owned by a company with a market value greater than 100 ?

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


Question: List the football players with a birthyear of 1970 and a birthmonth of October.

SELECT player_name FROM Player WHERE SUBSTR(birthday, 1, 7) = '1970-10'

List the football players with a birthyear of 1970 and a birthmonth of October .

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


Question: How many students are there?


Question: display the full name (first and last name ) of employee with ID and name of the country presently where (s)he is working.

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

display the full name ( first and last name ) of employee with ID and name of the country presently where ( s)he is working .

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


Question: Find the names of goods that receive a rating of 10.

SELECT T1.title FROM item AS T1 JOIN review AS T2 ON T1.i_id  =  T2.i_id WHERE T2.rating  =  10

Find the names of goods that receive a rating of 10 .

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


Question: What campus started in year 1956, has more than 200 full time students, and more than 400 students enrolled?

SELECT T1.campus FROM campuses AS t1 JOIN enrollments AS t2 ON t1.id  =  t2.campus WHERE t2.year  =  1956 AND totalenrollment_ay  >  400 AND FTE_AY  >  200

What campus started in year 1956 , has more than 200 full time students , and more than 400 students enrolled ?

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


Question: What is the name of all clients who sent more than one package?

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

What is the name of all clients who sent more than one package ?

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


Question: How many customers are in Brazil?

SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T2.n_name = 'BRAZIL'


Question: Among the products with product ID lower than 15, how many of them costs 10 and below?

SELECT COUNT(ProductID) FROM Products WHERE ProductID < 15 AND Price <= 10

Among the products with product ID lower than 15 , how many of them costs 10 and below ?

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


Question: What is the rental price per day of the most expensive children's film?

SELECT 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 = 'Children' ORDER BY T1.rental_rate / T1.rental_duration DESC LIMIT 1

What is the rental price per day of the most expensive children 's film ?

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


Question: what is the name of the instructor who is in Statistics department and earns the lowest salary?

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

what is the name of the instructor who is in Statistics department and earns the lowest salary ?

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


Question: How many female customers permit the company to send regular emails to them?

SELECT COUNT(CustomerID) FROM customers WHERE Gender = 'F' AND SubscribedToEmailList = 'TRUE'

How many female customers permit the company to send regular emails to them ?

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


Question: Tell the number of "hair removal" Yelp businesses.

SELECT COUNT(T1.category_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id WHERE T1.category_name LIKE 'Hair Removal'

Tell the number of " hair removal " Yelp businesses .


Question: Please list the titles of the papers published in the journal "Concepts in Magnetic Resonance Part A" in 2008.

SELECT T2.Title FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T1.FullName = 'Concepts in Magnetic Resonance Part A' AND T2.Year = 2008

Please list the titles of the papers published in the journal " Concepts in Magnetic Resonance Part A " in 2008 .

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


Question: In which counties can you find the restaurant with the highest number of branches?

SELECT T2.county FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city GROUP BY T2.county ORDER BY COUNT(T1.label) DESC LIMIT 1

In which counties can you find the restaurant with the highest number of branches ?


Question: What is the name of the aircraft that was on flight number 99?

SELECT T2.name FROM Flight AS T1 JOIN Aircraft AS T2 ON T1.aid  =  T2.aid WHERE T1.flno  =  99

What is the name of the aircraft that was on flight number 99 ?

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


Question: For the oldest movie listed, what is its average rating and title?

SELECT avg(T1.stars) ,  T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT min(YEAR) FROM Movie)

For the oldest movie listed , what is its average rating and title ?

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


Question: What is business number 1580's net profit?

SELECT LastReceiptCost - StandardPrice FROM ProductVendor WHERE BusinessEntityID = 1580

What is business number 1580 's net profit ?


Question: List out the age of users who located in Vienna, Austria obtained the badge?

SELECT T1.Age FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Vienna, Austria'

List out the age of users who located in Vienna , Austria obtained the badge ?

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


Question: What are the id and price for the good with "70" in its id?

SELECT id ,  price FROM goods WHERE id LIKE "%70%"

What are the i d and price for the good with " 70 " in its i d ?

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


Question: What are the ids of the students who registered for course 301 most recently?

SELECT student_id FROM student_course_attendance WHERE course_id = 301 ORDER BY date_of_attendance DESC LIMIT 1

What are the ids of the students who registered for course 301 most recently ?

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


Question: Who is the winning team in a match held on April 26, 2009 with a winning margin of 6 points?

SELECT T1.Team_Name FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner WHERE T2.Win_Margin = 6 AND T2.Match_Date = '2009-04-26'

Who is the winning team in a match held on April 26 , 2009 with a winning margin of 6 points ?

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


Question: How many users manage to get uber votes for all of the review category? Find out what are the user average star.

SELECT COUNT(T2.user_id) AS USER_IDS, T2.user_average_stars FROM Reviews AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.review_votes_funny = 'Uber' AND T1.review_votes_useful = 'Uber' AND T1.review_votes_cool = 'Uber'

How many users manage to get uber votes for all of the review category ? Find out what are the user average star .

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


Question: In which country is the store where Hector Poinexter rents equipment located?

SELECT T5.country FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN address AS T3 ON T2.address_id = T3.address_id INNER JOIN city AS T4 ON T3.city_id = T4.city_id INNER JOIN country AS T5 ON T4.country_id = T5.country_id WHERE T1.first_name = 'HECTOR' AND T1.last_name = 'POINDEXTER'

In which country is the store where Hector Poinexter rents equipment located ?

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


Question: List the year, team and coach that with winning rate of above 75%.

SELECT DISTINCT T1.year, T2.name, T1.coachID FROM coaches AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID WHERE CAST(T1.won AS REAL) / CAST((T1.won + T1.lost) AS REAL) > 0.75

List the year , team and coach that with winning rate of above 75 % .

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


Question: How many of the customer's reference ID that has a TRUE response?

SELECT COUNT(REFID) FROM Mailings1_2 WHERE RESPONSE = 'true'

How many of the customer 's reference ID that has a TRUE response ?

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


Question: In 2006, how many trips ended at stations in Mountain View?

SELECT COUNT(T2.city) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.end_station_name WHERE T2.city = 'Mountain View' AND T1.start_date LIKE '%2006%'

In 2006 , how many trips ended at stations in Mountain View ?

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


Question: How many different songs have shared vocals?

SELECT count(DISTINCT title) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE TYPE  =  "shared"

How many different songs have shared vocals ?


Question: Show the first and last name of all the faculty members who participated in some activity, together with the number of activities they participated in.

SELECT  T1.fname ,  T1.lname ,  count(*) ,  T1.FacID FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID GROUP BY T1.FacID

Show the first and last name of all the faculty members who participated in some activity , together with the number of activities they participated in .

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


Question: Show the name of the earliest platform in the database.

SELECT T2.platform_name FROM game_platform AS T1 INNER JOIN platform AS T2 ON T1.platform_id = T2.id ORDER BY T1.release_year ASC LIMIT 1

Show the name of the earliest platform in the database .


Question: Which tests have "Pass" results? Return the dates when the tests were taken.

SELECT date_test_taken FROM Student_Tests_Taken WHERE test_result  =  "Pass"

Which tests have " Pass " results ? Return the dates when the tests were taken .

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


Question: State the order number where Qualitest ordered the highest product quantity.

SELECT T1.OrderNumber FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Qualitest ' ORDER BY T1.`Order Quantity` DESC LIMIT 1

State the order number where Qualitest ordered the highest product quantity .

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


Question: Find the original artists who sing songs with rhythm tempo above 5 , and list results in descending order of voice sound quality .

select t2.original_artist from performance_score as t1 join songs as t2 on t2.id  =  t1.songs_id where t1.rhythm_tempo  >  5 order by t1.voice_sound_quality desc

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


Question: Among the flights of the air carrier described as American Airlines, what is the percentage of the flights with earlier departure?

SELECT CAST(SUM(CASE WHEN T2.DEP_DELAY < 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%American Airlines%'

Among the flights of the air carrier described as American Airlines , what is the percentage of the flights with earlier departure ?

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


Question: List the biographical data of the students who never had a detention or student loan .

select bio_data from students where student_id not in (select t1.student_id from students as t1 join detention as t2 on t1.student_id  =  t2.student_id union select t1.student_id from students as t1 join student_loans as t2 on t1.student_id  =  t2.student_id)

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


Question: Name all bonds with single bond types and what atoms are connected to the molecules.

SELECT T1.bond_id, T2.atom_id, T2.atom_id2 FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T1.bond_type = '-'

Name all bonds with single bond types and what atoms are connected to the molecules .

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


Question: Find the id of songs that are available in mp4 format and have resolution lower than 1000.

SELECT f_id FROM files WHERE formats  =  "mp4" INTERSECT SELECT f_id FROM song WHERE resolution  <  1000

Find the i d of songs that are available in mp4 format and have resolution lower than 1000 .

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


Question: What are the dates in which the mean sea level pressure was between 30.3 and 31?

SELECT date FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31

What are the dates in which the mean sea level pressure was between 30.3 and 31 ?

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


Question: Among the customers over 30, how many of them are Machine-op-inspcts?

SELECT COUNT(ID) FROM Customers WHERE OCCUPATION = 'Machine-op-inspct' AND age > 30

Among the customers over 30 , how many of them are Machine - op - inspcts ?

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


Question: Please list the zip_codes of all the residential areas in Huntingdon county with over 30 employees.

SELECT DISTINCT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'HUNTINGDON' AND T1.employees > 30

Please list the zip_codes of all the residential areas in Huntingdon county with over 30 employees .

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


Question: What is the total number of people who could stay in the modern rooms in this inn?

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

What is the total number of people who could stay in the modern rooms in this inn ?

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


Question: What is the percentage of the tweets from California are positive?

SELECT SUM(CASE WHEN T1.Sentiment > 0 THEN 1.0 ELSE 0 END) / COUNT(T1.TweetID) AS percentage FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE State = 'California'

What is the percentage of the tweets from California are positive ?


Question: What is the person's business ID with a vista credit card number "11113366963373"?

SELECT T2.BusinessEntityID FROM CreditCard AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.CreditCardID = T2.CreditCardID WHERE T1.CardNumber = 11113366963373

What is the person 's business ID with a vista credit card number " 11113366963373 " ?

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


Question: Find the id of the order which is shipped most recently.

SELECT order_id FROM shipments WHERE shipment_date  =  (SELECT max(shipment_date) FROM shipments)

Find the i d of the order which is shipped most recently .


Question: Show the name and number of employees for the departments managed by heads whose temporary acting value is 'Yes'?

SELECT T1.name ,  T1.num_employees FROM department AS T1 JOIN management AS T2 ON T1.department_id  =  T2.department_id WHERE T2.temporary_acting  =  'Yes'

Show the name and number of employees for the departments managed by heads whose temporary acting value is ' Yes ' ?

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


Question: What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance?

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

What are the names of accounts with checking balances greater than the average checking balance and savings balances below the average savings balance ?

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


Question: List the names and symbols of the coins that were added on June 14, 2013.

SELECT name, symbol FROM coins WHERE date_added LIKE '2013-06-14%'

List the names and symbols of the coins that were added on June 14 , 2013 .

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


Question: What character did Dan Castellaneta play that won him an award for Outstanding Voice-Over Performance in 2009 in the Primetime Emmy Awards?

SELECT DISTINCT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.person = 'Dan Castellaneta' AND T1.award = 'Outstanding Voice-Over Performance' AND T1.organization = 'Primetime Emmy Awards' AND T1.year = 2009;

What character did Dan Castellaneta play that won him an award for Outstanding Voice - Over Performance in 2009 in the Primetime Emmy Awards ?

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


Question: What are the names of all customers, ordered by account balance?

SELECT cust_name FROM customer ORDER BY acc_bal

What are the names of all customers , ordered by account balance ?


Question: Find the title and star rating of the movie that got the least rating star for each reviewer.

SELECT T2.title ,  T1.rID ,  T1.stars ,  min(T1.stars) FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID GROUP BY T1.rID

Find the title and star rating of the movie that got the least rating star for each reviewer .

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


Question: What is the age of the oldest device user?

What is the age of the oldest device user ?


Question: What is the lending category of the country with a cereal production of 6140000 metric tons for the year 1966?

SELECT T1.LendingCategory FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.IndicatorName = 'Cereal production (metric tons)' AND T2.Value = 6140000 AND T2.Year = 1966

What is the lending category of the country with a cereal production of 6140000 metric tons for the year 1966 ?

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


Question: How many airports are there per city in the United States? Order the cities by decreasing number of airports.

SELECT count(*) ,  city FROM airports WHERE country  =  'United States' GROUP BY city ORDER BY count(*) DESC

How many airports are there per city in the United States ? Order the cities by decreasing number of airports .

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


Question: Tell me the height and id number of the widest painting in gallery 240.

SELECT paintingID ,  height_mm FROM paintings WHERE LOCATION  =  'Gallery 240' ORDER BY width_mm DESC LIMIT 1

Tell me the height and i d number of the widest painting in gallery 240 .

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


Question: Show the most common builder of railways.

SELECT Builder FROM railway GROUP BY Builder ORDER BY COUNT(*) DESC LIMIT 1

Show the most common builder of railways .


Question: Which student has the hometown of Lincolnton, North Carolina with the zip code of 28092? List their full name and position.

SELECT T1.first_name, T1.last_name, T1.position FROM member AS T1 INNER JOIN zip_code AS T2 ON T2.zip_code = T1.zip WHERE T2.city = 'Lincolnton' AND T2.state = 'North Carolina' AND T2.zip_code = 28092

Which student has the hometown of Lincolnton , North Carolina with the zip code of 28092 ? List their full name and position .

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


Question: What are the ids of documents with letter 's' in the name with any expense budgets.

SELECT T1.document_id FROM Documents AS T1 JOIN Documents_with_expenses AS T2 ON T1.document_id  =  T2.document_id WHERE T1.document_name LIKE '%s%'

What are the ids of documents with letter 's ' in the name with any expense budgets .

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


Question: Which states have more than 2 parks?

SELECT state FROM park GROUP BY state HAVING count(*)  >  2;


Question: List down all film titles starred by Jane Jackman.

SELECT T1.title FROM film AS T1 INNER JOIN film_actor AS T2 ON T1.film_id = T2.film_id INNER JOIN actor AS T3 ON T2.actor_id = T3.actor_id WHERE T3.first_name = 'JANE' AND T3.last_name = 'JACKMAN'

List down all film titles starred by Jane Jackman .

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


Question: Write the message of the donor of the project with the title of Lets Share Ideas who paid with a credit card.

SELECT T3.donation_message FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Lets Share Ideas' AND T3.payment_method = 'creditcard'

Write the message of the donor of the project with the title of Lets Share Ideas who paid with a credit card .

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


Question: What is the annual revenue of Klett & Sons Repair?

SELECT annual_revenue FROM customer WHERE cust_name = 'Klett & Sons Repair'

What is the annual revenue of Klett & Sons Repair ?

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


Question: What type of label is not on molecules with atoms with tin?

SELECT DISTINCT T2.label FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element != 'sn'

What type of label is not on molecules with atoms with tin ?

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


Question: How many colors are never used by any product?

SELECT count(*) FROM Ref_colors WHERE color_code NOT IN ( SELECT color_code FROM products )

How many colors are never used by any product ?


Question: What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department?

SELECT name ,  salary FROM instructor WHERE salary  <  (SELECT avg(salary) FROM instructor WHERE dept_name  =  'Physics')

What are the names and salaries for instructors who earn less than the average salary of instructors in the Physics department ?

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


Question: How long does Yelp_Business no.1 open on Tuesdays?

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

How long does Yelp_Business no.1 open on Tuesdays ?


Question: What's the full name of the team that won the most games in 2001 but didn't make the playoffs?

SELECT T2.tmID FROM players_teams AS T1 INNER JOIN teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.PostGP = 0 ORDER BY T2.won DESC LIMIT 1

What 's the full name of the team that won the most games in 2001 but did n't make the playoffs ?

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


Question: Which district had the most number of first degree murders? Give the district number.

SELECT T2.district_no FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T1.iucr_no = T2.iucr_no WHERE T1.secondary_description = 'FIRST DEGREE MURDER' GROUP BY T2.district_no ORDER BY COUNT(*) DESC LIMIT 1

Which district had the most number of first degree murders ? Give the district number .

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


Question: Average of the last receipt cost of the products whose average lead time is 60 days.

SELECT SUM(LastReceiptCost) / COUNT(ProductID) FROM ProductVendor WHERE AverageLeadTime = 60

Average of the last receipt cost of the products whose average lead time is 60 days .

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


Question: What is the total number of active business in AZ with a high review count?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND review_count LIKE 'High' AND active LIKE 'True'

What is the total number of active business in AZ with a high review count ?

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


Question: Tally the toxicology element of the 4th atom of each molecule that was carcinogenic.

SELECT DISTINCT T1.element FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '+' AND SUBSTR(T1.atom_id, -1) = '4' AND LENGTH(T1.atom_id) = 7

Tally the toxicology element of the 4th atom of each molecule that was carcinogenic .

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


Question: Identify all the restaurants in Yolo County by their label.

SELECT T1.id_restaurant, T1.label FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T2.county = 'yolo county'

Identify all the restaurants in Yolo County by their label .

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


Question: Find the "date became customers" of the customers whose ID is between 10 and 20.

SELECT date_became_customer FROM customers WHERE customer_id BETWEEN 10 AND 20

Find the " date became customers " of the customers whose ID is between 10 and 20 .

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


Question: What are the names, classes, and dates for all races?

What are the names , classes , and dates for all races ?

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


Question: which countries did participated in both Friendly and Tournament type competitions.

SELECT country FROM competition WHERE competition_type  =  'Friendly' INTERSECT SELECT country FROM competition WHERE competition_type  =  'Tournament'

which countries did participated in both Friendly and Tournament type competitions .

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


Question: How many complaints made by women and served after 3 pm received a timely response from the company?

SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN client AS T2 ON T1.`rand client` = T2.client_id INNER JOIN events AS T3 ON T1.`Complaint ID` = T3.`Complaint ID` WHERE T2.sex = 'Female' AND T1.ser_start BETWEEN '15:00:01' AND '23:59:59' AND T3.`Timely response?` = 'Yes'

How many complaints made by women and served after 3 pm received a timely response from the company ?

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


Question: How many businesses id are rated more than 4?

SELECT COUNT(business_id) FROM Business WHERE stars > 4

How many businesses i d are rated more than 4 ?

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


Question: What are the total enrollment of institutions in city `` Vancouver '' or `` Calgary '' ?

select sum(enrollment) from institution where city  =  "vancouver" or city  =  "calgary"

What are the total enrollment of institutions in city ` ` Vancouver '' or ` ` Calgary '' ?

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


Question: Among the chapters in "As You Like It", how many chapters have a paragraph number of no more than 50?

SELECT COUNT(T3.chapter_id) FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T1.Title = 'As You Like It' AND T3.ParagraphNum < 50

Among the chapters in " As You Like It " , how many chapters have a paragraph number of no more than 50 ?

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


Question: What are the names of all colleges with a larger enrollment than the largest college in Florida?

SELECT cName FROM college WHERE enr  >  (SELECT max(enr) FROM college WHERE state  =  'FL')

What are the names of all colleges with a larger enrollment than the largest college in Florida ?

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


Question: Indicates the number of cards with pre-modern format, ruling text "This is a triggered mana ability." that do not have multiple faces.

SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid INNER JOIN rulings AS T3 ON T1.uuid = T3.uuid WHERE T2.format = 'premodern' AND T3.text = 'This is a triggered mana ability.' AND T1.Side IS NULL

Indicates the number of cards with pre - modern format , ruling text " This is a triggered mana ability . " that do not have multiple faces .

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


Question: What are the behavior categories that user number -9222198347540750000 belongs to?

SELECT T3.category FROM app_all AS T1 INNER JOIN app_labels AS T2 ON T1.app_id = T2.app_id INNER JOIN label_categories AS T3 ON T2.label_id = T3.label_id WHERE T1.app_id = -9222198347540750000

What are the behavior categories that user number -9222198347540750000 belongs to ?


Question: How many of the single bond type molecules are non-carcinogenic?

SELECT COUNT(DISTINCT T2.molecule_id) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.label = '-' AND T1.bond_type = '-'

How many of the single bond type molecules are non - carcinogenic ?

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


Question: How many latest released dramas and action movies?

SELECT COUNT(T1.movieid) FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.year = 4 AND T1.genre IN ('Action', 'drama')

How many latest released dramas and action movies ?


Question: What are the positions of both players that have more than 20 20 points and less than 10 points?

SELECT POSITION FROM player WHERE Points  >  20 INTERSECT SELECT POSITION FROM player WHERE Points  <  10

What are the positions of both players that have more than 20 20 points and less than 10 points ?

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


Question: How many atoms with iodine and with sulfur type elements are there in single bond molecules?

SELECT COUNT(DISTINCT CASE WHEN T1.element = 'i' THEN T1.atom_id ELSE NULL END) AS iodine_nums , COUNT(DISTINCT CASE WHEN T1.element = 's' THEN T1.atom_id ELSE NULL END) AS sulfur_nums FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id INNER JOIN bond AS T3 ON T2.bond_id = T3.bond_id WHERE T3.bond_type = '-'

How many atoms with iodine and with sulfur type elements are there in single bond molecules ?

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


Question: How many different digital terrestrial channels are there?

SELECT count(DISTINCT Digital_terrestrial_channel) FROM channel

How many different digital terrestrial channels are there ?


Question: Which order has the most recent shipment? Give me the order id.

SELECT order_id FROM shipments WHERE shipment_date  =  (SELECT max(shipment_date) FROM shipments)

Which order has the most recent shipment ? Give me the order i d.

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


Question: What are the first names of the teachers who teach grade 1?

SELECT DISTINCT T2.firstname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  1

What are the first names of the teachers who teach grade 1 ?

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


Question: What are the first names of all students in Smith Hall?

SELECT T1.fname FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid JOIN dorm AS T3 ON T3.dormid  =  T2.dormid WHERE T3.dorm_name  =  'Smith Hall'

What are the first names of all students in Smith Hall ?

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


Question: What is the percentage of star score 5 that was collected by title "Sex, Pies and Idiot Scrapes"?

SELECT CAST(SUM(CASE WHEN T2.stars = 5 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Sex, Pies and Idiot Scrapes';

What is the percentage of star score 5 that was collected by title " Sex , Pies and Idiot Scrapes " ?

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


Question: What percentage of legendary frame effect cards that are only available in online game variations?

SELECT SUM(CASE WHEN isOnlineOnly = 1 THEN 1.0 ELSE 0 END) / COUNT(id) * 100 FROM cards WHERE frameEffects = 'legendary'

What percentage of legendary frame effect cards that are only available in online game variations ?

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


Question: In 2014, what is the shortest duration of trips by subscribers which started at 2nd at Folsom and ended in the 5th at Howard stations, and by how much shorter than the average? Give me the minimum temperature, maximum gust speed and weather event on that trip.

SELECT MIN(T1.duration) , MIN(T1.duration) - AVG(T1.duration), T2.min_temperature_f FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.start_date = '1/1/2014 0:00' AND T1.end_date = '12/31/2014 11:59' AND T1.start_station_name = '2nd at Folsom' AND T1.end_station_name = '5th at Howard' AND T1.subscription_type = 'Subscriber'

In 2014 , what is the shortest duration of trips by subscribers which started at 2nd at Folsom and ended in the 5th at Howard stations , and by how much shorter than the average ? Give me the minimum temperature , maximum gust speed and weather event on that trip .

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


Question: What are the average download times for the a release tagged "1980s"?

SELECT CAST(SUM(T1.totalSnatched) AS REAL) / COUNT(T2.tag) FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = '1980s'

What are the average download times for the a release tagged " 1980s " ?

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


Question: What is the contact name for product Teatime Chocolate Biscuits?

SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Teatime Chocolate Biscuits'

What is the contact name for product Teatime Chocolate Biscuits ?

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


Question: Show all agency ids and details for agencies with a client.

SELECT T1.agency_id ,  T1.agency_details FROM Agencies AS T1 JOIN Clients AS T2 ON T1.agency_id  =  T2.agency_id

Show all agency ids and details for agencies with a client .

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


Question: Give the number of images containing the object sample of "suit".

SELECT COUNT(T.IMG_ID) FROM ( SELECT T2.IMG_ID FROM OBJ_CLASSES AS T1 INNER JOIN IMG_OBJ AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T1.OBJ_CLASS = 'suit' GROUP BY T2.IMG_ID ) T

Give the number of images containing the object sample of " suit " .


Question: How many businesses are with high review count?

SELECT COUNT(business_id) FROM Business WHERE review_count LIKE 'High'

How many businesses are with high review count ?

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


Question: What are the names of all planets with one employee that has clearance?

SELECT T3.Name FROM Has_Clearance AS T1 JOIN Employee AS T2 ON T1.Employee = T2.EmployeeID JOIN Planet AS T3 ON T1.Planet = T3.PlanetID GROUP BY T1.Planet HAVING count(*)  =  1;

What are the names of all planets with one employee that has clearance ?

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


Question: How many papers were preprinted between the years 1990 and 2000?

SELECT COUNT(id) FROM Paper WHERE Year BETWEEN '1990' AND '2000' AND ConferenceId = 0 AND JournalId = 0

How many papers were preprinted between the years 1990 and 2000 ?

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


Question: What are the average ages for male and female students?

SELECT avg(age) ,  sex FROM Student GROUP BY sex

What are the average ages for male and female students ?


Question: How many "Mountain-100 Silver, 38" were sold by Stearns MacFeather?

SELECT SUM(T2.Quantity) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Stearns' AND T1.LastName = 'MacFeather' AND T3.Name = 'Mountain-100 Silver, 38'

How many " Mountain-100 Silver , 38 " were sold by Stearns MacFeather ?

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


Question: What is the entry name of the most expensive catalog (in USD)?

SELECT catalog_entry_name FROM catalog_contents ORDER BY price_in_dollars DESC LIMIT 1

What is the entry name of the most expensive catalog ( in USD ) ?

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


Question: Give the score and number of international students in university ID 100 in 2015.

SELECT CAST(T1.num_students * T1.pct_international_students AS REAL) / 100, T2.score FROM university_year AS T1 INNER JOIN university_ranking_year AS T2 ON T1.university_id = T2.university_id WHERE T2.year = 2015 AND T1.university_id = 100

Give the score and number of international students in university ID 100 in 2015 .

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


Question: What are the titles of all movies that were not reviewed by Chris Jackson?

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

What are the titles of all movies that were not reviewed by Chris Jackson ?

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


Question: Find the total savings balance of all accounts except the account with name ‘Brown’.

SELECT sum(T2.balance) FROM accounts AS T1 JOIN savings AS T2 ON T1.custid  =  T2.custid WHERE T1.name != 'Brown'

Find the total savings balance of all accounts except the account with name ‘ Brown ’ .

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


Question: For each building, show the name of the building and the number of institutions in it.

SELECT T1.name ,  count(*) FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id GROUP BY T1.building_id

For each building , show the name of the building and the number of institutions in it .

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


Question: What is card number 4 in the set Coldsnap?

SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' AND T1.number = 4

What is card number 4 in the set Coldsnap ?

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


Question: What are all company names that have a corresponding movie directed in the year 1999?

SELECT T2.company_name FROM movie AS T1 JOIN culture_company AS T2 ON T1.movie_id  =  T2.movie_id WHERE T1.year  =  1999

What are all company names that have a corresponding movie directed in the year 1999 ?

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


Question: How many of the crew members who are taller than 1.70m were born in Canada?

SELECT COUNT(name) FROM Person WHERE height_meters > 1.70 AND birth_country = 'Canada';

How many of the crew members who are taller than 1.70 m were born in Canada ?

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


Question: List down the customer's geographic identifier who are handlers or cleaners.

SELECT GEOID FROM Customers WHERE OCCUPATION = 'Handlers-cleaners'

List down the customer 's geographic identifier who are handlers or cleaners .

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


Question: Who are the distinct managers of branches?

Who are the distinct managers of branches ?


Question: Which business ID received the review of 4 star and above by 65% of user? Describe their active status and city.

SELECT DISTINCT T2.business_id, T2.city FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 AND ( SELECT CAST(( SELECT COUNT(DISTINCT T1.user_id) FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.review_stars >= 4 ) AS REAL) * 100 / ( SELECT COUNT(user_id) FROM Users ) > 65 )

Which business ID received the review of 4 star and above by 65 % of user ? Describe their active status and city .

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


Question: Calculate the percentage salary of employees who handled orders shipped in 1996.

SELECT CAST(SUM(CASE WHEN STRFTIME('%Y', T2.ShippedDate) = '1996' THEN T1.Salary ELSE 0 END) AS REAL) * 100 / SUM(T1.Salary) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID

Calculate the percentage salary of employees who handled orders shipped in 1996 .

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


Question: Find the names of the workshop groups where services with product name "film" are performed.

SELECT T1.Store_Phone ,  T1.Store_Email_Address FROM Drama_Workshop_Groups AS T1 JOIN Services AS T2 ON T1.Workshop_Group_ID  =  T2.Workshop_Group_ID WHERE T2.Product_Name  =  "film"

Find the names of the workshop groups where services with product name " film " are performed .

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


Question: Which car consumes fuel the most and has the highest price?

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T1.mpg DESC, T2.price DESC LIMIT 1

Which car consumes fuel the most and has the highest price ?

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


Question: What is the average age of students who have city code "NYC" and have secretary votes for the spring election cycle?

SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.city_code  =  "NYC" AND T2.Election_Cycle  =  "Spring"

What is the average age of students who have city code " NYC " and have secretary votes for the spring election cycle ?

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


Question: Are the comments for the method "HtmlSharp.HtmlParser.Feed" in XML format?

SELECT CASE WHEN CommentIsXml = 0 THEN 'No' WHEN CommentIsXml = 1 THEN 'Yes' END isXMLFormat FROM Method WHERE Name = 'HtmlSharp.HtmlParser.Feed'

Are the comments for the method " HtmlSharp . HtmlParser . Feed " in XML format ?

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


Question: List down the name of games published by 3DO.

SELECT T1.game_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T3.publisher_name = '3DO'

List down the name of games published by 3DO .

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


Question: Name the products via wholesale channel of the store under Pacific/Honolulu time zone.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T3.`Time Zone` = 'Pacific/Honolulu' AND T2.`Sales Channel` = 'Wholesale' THEN T1.`Product Name` ELSE NULL END AS T FROM Products T1 INNER JOIN `Sales Orders` T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` T3 ON T3.StoreID = T2._StoreID ) WHERE T IS NOT NULL

Name the products via wholesale channel of the store under Pacific / Honolulu time zone .

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


Question: Find the title of all the albums of the artist "AC/DC".

SELECT Title FROM ALBUM AS T1 JOIN ARTIST AS T2 ON T1.ArtistId  =  T2.ArtistId WHERE T2.Name  =  "AC/DC"

Find the title of all the albums of the artist " AC / DC " .

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


Question: List all meeting type codes and details.

SELECT meeting_type ,  other_details FROM meetings

List all meeting type codes and details .


Question: Calculate the percentage of country which gained independence as republic after 1970.

SELECT CAST(SUM(CASE WHEN Government = 'republic' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Country) FROM politics WHERE STRFTIME('%Y', Independence) > '1970'

Calculate the percentage of country which gained independence as republic after 1970 .

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


Question: Calculate the total profit by Cisco SPA301 for all regions.

SELECT SUM(T1.Profit) + SUM(T2.Profit) + SUM(T3.Profit) + SUM(T4.Profit) AS totalProfit FROM west_superstore AS T1 INNER JOIN east_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN central_superstore AS T3 ON T3.`Customer ID` = T2.`Customer ID` INNER JOIN south_superstore AS T4 ON T4.`Customer ID` = T3.`Customer ID` INNER JOIN product AS T5 ON T5.`Product ID` = T4.`Product ID` WHERE T5.`Product Name` = 'Cisco SPA301'

Calculate the total profit by Cisco SPA301 for all regions .

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


Question: Find the emails of customers who has filed a complaints of the product with the most complaints.

SELECT t1.email_address FROM customers AS t1 JOIN complaints AS t2 ON t1.customer_id  =  t2.customer_id GROUP BY t1.customer_id ORDER BY count(*) LIMIT 1

Find the emails of customers who has filed a complaints of the product with the most complaints .

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


Question: How many calendar items do we have?


Question: Where is the place that menu with ID 12472 was created for?

SELECT location FROM Menu WHERE id = 12472

Where is the place that menu with ID 12472 was created for ?

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


Question: Among the posts that were voted by user 1465, what is the id of the most valuable post?

SELECT T2.Id FROM votes AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T1.UserId = 1465 ORDER BY T2.FavoriteCount DESC LIMIT 1

Among the posts that were voted by user 1465 , what is the i d of the most valuable post ?

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


Question: How many of the professors are female?

SELECT COUNT(prof_id) FROM prof WHERE gender = 'Female'


Question: Among the universities in United States of America, what is the percentage of female students in year 2016?

SELECT SUM(CAST(T2.pct_female_students * T2.num_students AS REAL) / 100) * 100 / SUM(T2.num_students) FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T3.country_name = 'United States of America' AND T2.year = 2016

Among the universities in United States of America , what is the percentage of female students in year 2016 ?

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


Question: Show the different affiliations of city channels and the number of city channels with each affiliation.

SELECT Affiliation ,  COUNT(*) FROM city_channel GROUP BY Affiliation

Show the different affiliations of city channels and the number of city channels with each affiliation .

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


Question: List out all stations name that having a mean temperature 20 degree Celsius in year 2014.

SELECT DISTINCT T2.start_station_name, T2.end_station_name FROM weather AS T1 INNER JOIN trip AS T2 ON T1.zip_code = T2.zip_code WHERE T1.date LIKE '%2014' AND T1.mean_temperature_f = 20 * 1.8 + 32

List out all stations name that having a mean temperature 20 degree Celsius in year 2014 .

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


Question: Which college have both players with position midfielder and players with position defender?

SELECT College FROM match_season WHERE POSITION  =  "Midfielder" INTERSECT SELECT College FROM match_season WHERE POSITION  =  "Defender"

Which college have both players with position midfielder and players with position defender ?

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


Question: What are the titles of all the albums?


Question: Give me the ids of Cakes whose price is at least as much as the average price of Tart?

SELECT id FROM goods WHERE food  =  "Cake" AND price  >=  (SELECT avg(price) FROM goods WHERE food  =  "Tart")

Give me the ids of Cakes whose price is at least as much as the average price of Tart ?

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


Question: Return the type of transaction with the highest total amount.

SELECT transaction_type FROM Financial_transactions GROUP BY transaction_type ORDER BY sum(transaction_amount) DESC LIMIT 1

Return the type of transaction with the highest total amount .


Question: What are the type and nationality of ships?

What are the type and nationality of ships ?


Question: What is the price of a Chevrolet Bel Air?

SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'chevrolet bel air'

What is the price of a Chevrolet Bel Air ?

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


Question: What is the weight of the shipment delivered by Andrea Simons on March 7, 2016?

SELECT T1.weight FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Andrea' AND T2.last_name = 'Simons' AND T1.ship_date = '2016-03-07'

What is the weight of the shipment delivered by Andrea Simons on March 7 , 2016 ?

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


Question: What are the different names for all songs that have a higher resolution than English songs?

SELECT DISTINCT song_name FROM song WHERE resolution  >  (SELECT min(resolution) FROM song WHERE languages  =  "english")

What are the different names for all songs that have a higher resolution than English songs ?

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


Question: For a game had a score of 1-8 in the year of 2011, what division was that game in? Give the full name of the division.

SELECT T2.division, T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.season = 2011 AND T1.FTHG = 1 AND T1.FTAG = 8

For a game had a score of 1 - 8 in the year of 2011 , what division was that game in ? Give the full name of the division .

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


Question: Name the goaltenders who had played in both PCHA and NHL league.

SELECT T1.firstName, T1.lastName FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID IN ('PCHA', 'NHL') GROUP BY T2.playerID HAVING COUNT(DISTINCT T2.lgID) > 1

Name the goaltenders who had played in both PCHA and NHL league .

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


Question: Calculate the total production for each product which were supplied from Japan

SELECT SUM(T1.UnitsInStock + T1.UnitsOnOrder) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.Country = 'Japan'

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


Question: What is the id and trade name of the medicines can interact with at least 3 enzymes?

SELECT T1.id ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id HAVING COUNT(*)  >=  3

What is the i d and trade name of the medicines can interact with at least 3 enzymes ?

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


Question: When did the staff member Janessa Sawayn leave the company?

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

When did the staff member Janessa Sawayn leave the company ?

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


Question: Give the postal code for the address No.65.

SELECT postal_code FROM address WHERE address_id = 65

Give the postal code for the address No.65 .


Question: What kind of mountain is Ampato? Which province and nation does this mountain belong to?

SELECT T1.Type, T3.Name, T4.Name 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 country AS T4 ON T3.Country = T4.Code WHERE T1.Name = 'Ampato'

What kind of mountain is Ampato ? Which province and nation does this mountain belong to ?

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


Question: What kind of printing is on the card that Daren Bader created?

SELECT DISTINCT availability FROM cards WHERE artist = 'Daren Bader'

What kind of printing is on the card that Daren Bader created ?

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


Question: Find the name of all students who were in the tryout sorted in alphabetic order.

SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID ORDER BY T1.pName

Find the name of all students who were in the tryout sorted in alphabetic order .

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


Question: What are the last names of the customers in alphabetical order?

SELECT DISTINCT LastName FROM customers ORDER BY LastName

What are the last names of the customers in alphabetical order ?

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


Question: In the molecule containing sodium atoms, how many are non-carcinogenic?

SELECT COUNT(DISTINCT T2.molecule_id) FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'na' AND T2.label = '-'

In the molecule containing sodium atoms , how many are non - carcinogenic ?

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


Question: How many appearances does the word ID No. 2823 have in the Wikipedia page "Astre"?

SELECT SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Astre' AND T2.wid = 2823

How many appearances does the word ID No . 2823 have in the Wikipedia page " Astre " ?

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


Question: What is the most expensive cake and its flavor?

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

What is the most expensive cake and its flavor ?


Question: How many books were published in Japanese?

SELECT COUNT(T2.book_id) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id WHERE T1.language_name = 'Japanese'

How many books were published in Japanese ?


Question: What are the names of all instructors who have taught a course, as well as the corresponding course id?

SELECT name ,  course_id FROM instructor AS T1 JOIN teaches AS T2 ON T1.ID  =  T2.ID

What are the names of all instructors who have taught a course , as well as the corresponding course i d ?

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


Question: What is the airport description of the airport code A11?

SELECT Description FROM Airports WHERE Code = 'A11'

What is the airport description of the airport code A11 ?

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


Question: How many types of cards does the artist Aaron Boyd illustrated about card art?

SELECT COUNT(type) FROM cards WHERE artist = 'Aaron Boyd'

How many types of cards does the artist Aaron Boyd illustrated about card art ?

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


Question: What are the numbers of all flights coming from Los Angeles?

SELECT flno FROM Flight WHERE origin  =  "Los Angeles"

What are the numbers of all flights coming from Los Angeles ?

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


Question: Provide the last name of the youngest student.

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

Provide the last name of the youngest student .


Question: What are the maximum and minumum grade points?

SELECT max(gradepoint) ,  min(gradepoint) FROM GRADECONVERSION

What are the maximum and minumum grade points ?


Question: List the project details of the projects with the research outcome described with the substring 'Published'.

SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id JOIN Research_outcomes AS T3 ON T2.outcome_code  =  T3.outcome_code WHERE T3.outcome_description LIKE '%Published%'

List the project details of the projects with the research outcome described with the substring ' Published ' .

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


Question: How far do Linda (first name) Smith (last name) and Tracy (first name) Kim (last name) live?

SELECT distance FROM Direct_distance AS T1 JOIN Student AS T2 ON T1.city1_code  =  T2.city_code JOIN Student AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.Fname  =  "Linda" AND T2.Lname  =  "Smith" AND T3.Fname  =  "Tracy" AND T3.Lname  =  "Kim"

How far do Linda ( first name ) Smith ( last name ) and Tracy ( first name ) Kim ( last name ) live ?

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


Question: How many countries using the 1993 System of National Accounts methodology?

SELECT COUNT(CountryCode) FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 1993 System of National Accounts methodology.'

How many countries using the 1993 System of National Accounts methodology ?

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


Question: Find the name and id of the good with the highest average rank.

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

Find the name and i d of the good with the highest average rank .

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


Question: What was the title for the project which got the biggest donation?

SELECT T1.title FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_total = ( SELECT MAX(donation_total) FROM donations )

What was the title for the project which got the biggest donation ?

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