Question: In the state with the highest state appropriations to higher education in fiscal year 2011 per resident, which institution has the lowest number of undergraduates in 2010?

SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state INNER JOIN institution_grads AS T3 ON T3.unitid = T1.unitid WHERE T1.student_count = ( SELECT MIN(T1.student_count) FROM institution_details AS T1 INNER JOIN state_sector_details AS T2 ON T2.state = T1.state INNER JOIN institution_grads AS T3 ON T3.unitid = T1.unitid WHERE T3.year = 2010 ) AND T3.year = 2010 GROUP BY T1.state ORDER BY SUM(T2.state_appr_value) DESC LIMIT 1

In the state with the highest state appropriations to higher education in fiscal year 2011 per resident , which institution has the lowest number of undergraduates in 2010 ?

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


Question: What is the phone number of all companies where the last name of the contact person starts with the letter M and are not from Germany?

SELECT phone FROM customers WHERE contactLastName LIKE 'M%' AND country != 'Germany'

What is the phone number of all companies where the last name of the contact person starts with the letter M and are not from Germany ?

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


Question: What is the process name for the document "Travel to Brazil"?

SELECT T3.process_name FROM Documents_processes AS T1 JOIN Documents AS T2 ON T1.document_id  =  T2.document_id JOIN Business_processes AS T3 ON T1.process_id  =  T3.process_id WHERE T2.document_name  =  "Travel to Brazil"

What is the process name for the document " Travel to Brazil " ?

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


Question: Calculate the number of students who are not disabled.

SELECT COUNT(CASE  WHEN T2.name IS NULL THEN T1.name END) AS "number" FROM person AS T1 LEFT JOIN disabled AS T2 ON T2.name = T1.name

Calculate the number of students who are not disabled .


Question: Where is the plane F-14 Fighter located?

SELECT LOCATION FROM hangar WHERE plane_name  =  'F-14 Fighter'

Where is the plane F-14 Fighter located ?

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


Question: How many superheroes have a neutral alignment?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id WHERE T2.alignment = 'Neutral'

How many superheroes have a neutral alignment ?


Question: Name the most recent movie rented by Dorothy Taylor.

SELECT T4.title FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.first_name = 'DOROTHY' AND T1.last_name = 'TAYLOR' ORDER BY T2.rental_date DESC LIMIT 1

Name the most recent movie rented by Dorothy Taylor .

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


Question: What is the most common major among female (sex is F) students?

SELECT Major FROM STUDENT WHERE Sex  =  "F" GROUP BY major ORDER BY count(*) DESC LIMIT 1

What is the most common major among female ( sex is F ) students ?

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


Question: What percentage of the total prices of all orders are shipped internationally?

SELECT CAST(SUM(CASE WHEN T3.method_name = 'International' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id INNER JOIN shipping_method AS T3 ON T3.method_id = T1.shipping_method_id

What percentage of the total prices of all orders are shipped internationally ?

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


Question: Show the next process id, process name, process description for process with id 9.

SELECT next_process_id ,  process_name ,  process_description FROM Business_processes WHERE process_id  =  9

Show the next process i d , process name , process description for process with i d 9 .

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


Question: List down person's name who has nickname.

SELECT name FROM Person WHERE nickname IS NOT NULL;

List down person 's name who has nickname .


Question: What are the titles and genres of the one-act works of Shakespeare?

SELECT DISTINCT T1.Title, T1.GenreType FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T2.Act = 1

What are the titles and genres of the one - act works of Shakespeare ?

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


Question: What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection?

SELECT name ,  operating_system FROM web_client_accelerator WHERE CONNECTION != 'Broadband'

What are the name and os of web client accelerators that do not work with only a ' Broadband ' type connection ?

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


Question: Which city in Japan has the most people in the country?

SELECT T2.Name FROM country AS T1 INNER JOIN city AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Japan' ORDER BY T2.Population DESC LIMIT 1

Which city in Japan has the most people in the country ?

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


Question: What are the resident details containing the substring 'Miss'?

SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%'

What are the resident details containing the substring ' Miss ' ?

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


Question: How many percent more of the watchers for the repository of solution No.83855 than No.1502?

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

How many percent more of the watchers for the repository of solution No.83855 than No.1502 ?

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


Question: Among the objects that have multiple relations, how many images whose captions for the prediction class ids are "on"?

SELECT COUNT(T2.PRED_CLASS_ID) FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.OBJ1_SAMPLE_ID != T1.OBJ2_SAMPLE_ID AND T2.PRED_CLASS = 'on'

Among the objects that have multiple relations , how many images whose captions for the prediction class ids are " on " ?

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


Question: Please list the flight numbers of all the flights operated by American Airlines Inc. that were scheduled to depart from John F. Kennedy International.

SELECT T2.OP_CARRIER_FL_NUM FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA' AND T1.Description = 'New York, NY: John F. Kennedy International' AND T2.FL_DATE = '2018/8/1'

Please list the flight numbers of all the flights operated by American Airlines Inc. that were scheduled to depart from John F. Kennedy International .

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


Question: List restaurant ids located in Danville city.

SELECT id_restaurant FROM location WHERE city = 'Danville'

List restaurant ids located in Danville city .

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


Question: Find the minimum salary for the departments whose average salary is above the average payment of all instructors.

SELECT min(salary) ,  dept_name FROM instructor GROUP BY dept_name HAVING avg(salary)  >  (SELECT avg(salary) FROM instructor)

Find the minimum salary for the departments whose average salary is above the average payment of all instructors .

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


Question: List the make that are associated with most drivers.

SELECT Make FROM driver GROUP BY Make ORDER BY COUNT(*) DESC LIMIT 1

List the make that are associated with most drivers .


Question: Who wrote the largest number of books? Give me the author name and gender.

SELECT t1.name ,  t1.gender FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id GROUP BY t2.author_id ORDER BY count(*) DESC LIMIT 1

Who wrote the largest number of books ? Give me the author name and gender .

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


Question: Please list the birth date of the player who has won the most MVPs.

SELECT T1.birthDate FROM players AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Most Valuable Player' GROUP BY T1.playerID, T1.birthDate ORDER BY COUNT(award) DESC LIMIT 1

Please list the birth date of the player who has won the most MVPs .

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


Question: Find the number and time of the train that goes from Chennai to Guruvayur.

SELECT train_number ,  TIME FROM train WHERE origin  =  'Chennai' AND destination  =  'Guruvayur'

Find the number and time of the train that goes from Chennai to Guruvayur .

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


Question: Indicate the cost of posters for 'September Speaker' event.

SELECT T3.cost FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget WHERE T1.event_name = 'September Speaker' AND T3.expense_description = 'Posters'

Indicate the cost of posters for ' September Speaker ' event .

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


Question: What is the number of faculty at Long Beach State University in 2002?

SELECT faculty FROM faculty AS T1 JOIN campuses AS T2 ON T1.campus  =  T2.id WHERE T1.year  =  2002 AND T2.campus  =  "Long Beach State University"

What is the number of faculty at Long Beach State University in 2002 ?

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


Question: What is the id of the vehicle driven for the least times for the vehicles ever used?

SELECT vehicle_id FROM vehicle_driver GROUP BY vehicle_id ORDER BY count(*) ASC LIMIT 1

What is the i d of the vehicle driven for the least times for the vehicles ever used ?

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


Question: What is the average and maximum damage in millions for storms that had a max speed over 1000?

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

What is the average and maximum damage in millions for storms that had a max speed over 1000 ?

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


Question: Show the case burden of counties in descending order of population.

SELECT Case_burden FROM county_public_safety ORDER BY Population DESC

Show the case burden of counties in descending order of population .

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


Question: Write all the review titles and the contents belonging to the podcast 'More Stupider: A 90-Day Fiance Podcast' with a review rating of 1.

SELECT title, content FROM reviews WHERE podcast_id = ( SELECT podcast_id FROM podcasts WHERE title = 'More Stupider: A 90-Day Fiance Podcast' ) AND rating = 1

Write all the review titles and the contents belonging to the podcast ' More Stupider : A 90 - Day Fiance Podcast ' with a review rating of 1 .

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


Question: How many students attended universities were there in 2011?

SELECT SUM(num_students) FROM university_year WHERE year = 2011

How many students attended universities were there in 2011 ?


Question: Find the first names of teachers whose email address contains the word "man".

SELECT first_name FROM Teachers WHERE email_address LIKE '%man%'

Find the first names of teachers whose email address contains the word " man " .

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


Question: What is the description for process status code ct?

SELECT process_status_description FROM Process_status WHERE process_status_code  =  "ct"

What is the description for process status code ct ?

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


Question: What is the average GPA of the students with the highest research capability and high salary? List the full names of the students.

SELECT AVG(T2.gpa), T2.f_name, T2.l_name FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T1.salary = 'high' AND T1.capability = 5 GROUP BY T2.student_id

What is the average GPA of the students with the highest research capability and high salary ? List the full names of the students .

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


Question: Among the customers with customer ID of 100 and below, how many of them have Thomas as their last name?

SELECT COUNT(customer_id) FROM customer WHERE last_name = 'Thomas' AND customer_id < 100

Among the customers with customer ID of 100 and below , how many of them have Thomas as their last name ?

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


Question: Find the number of channels that do not run any program.

SELECT count(*) FROM channel WHERE channel_id NOT IN (SELECT channel_id FROM program)

Find the number of channels that do not run any program .


Question: Calculate the difference between the number of cars that has a horsepower of 130 with the model year 1970 and model year 1976

SELECT SUM(CASE WHEN T2.model_year = 1970 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.model_year = 1976 THEN 1 ELSE 0 END) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.horsepower = 130

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


Question: How many teachers are faculty employees?

SELECT COUNT(*) FROM person WHERE hasPosition = 'Faculty_eme'

How many teachers are faculty employees ?


Question: What is the date of birth for the staff member named Janessa Sawayn?

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

What is the date of birth for the staff member named Janessa Sawayn ?

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


Question: Return names of songs in volumes that are by artists that are at least 32 years old.

SELECT T2.Song FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  >=  32

Return names of songs in volumes that are by artists that are at least 32 years old .

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


Question: How many students are attending English courses?

SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T1.course_name = "English"

How many students are attending English courses ?

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


Question: Among the players born before the year 1986, how many of them would remain in his position and defense while the team attacked?

SELECT COUNT(DISTINCT t1.player_name) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE STRFTIME('%Y',t1.birthday) < '1986' AND t2.defensive_work_rate = 'high'

Among the players born before the year 1986 , how many of them would remain in his position and defense while the team attacked ?

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


Question: What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte?

SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  <  ( SELECT min(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Lysanne" AND T4.staff_last_name = "Turcotte" )

What are the ids of the problems reported before the date of any problem reported by Lysanne Turcotte ?

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


Question: What are the name of the players who received a card in descending order of the hours of training?

SELECT pName FROM Player WHERE yCard  =  'yes' ORDER BY HS DESC

What are the name of the players who received a card in descending order of the hours of training ?

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


Question: How many Credit Card complaints did Sharon handle?

SELECT COUNT(T1.`Complaint ID`) FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Product = 'Credit card' AND T1.server = 'SHARON'

How many Credit Card complaints did Sharon handle ?

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


Question: Which region has the highest number of restaurants?

SELECT T1.region FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city GROUP BY T1.region ORDER BY COUNT(T2.id_restaurant) DESC LIMIT 1

Which region has the highest number of restaurants ?


Question: Please list all the female students that have filed for bankruptcy.

SELECT name FROM filed_for_bankrupcy WHERE name NOT IN ( SELECT name FROM male )

Please list all the female students that have filed for bankruptcy .

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


Question: Show the name, location, and number of platforms for all stations.

SELECT name ,  LOCATION ,  number_of_platforms FROM station

Show the name , location , and number of platforms for all stations .

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


Question: What percentage of customers who paid with a Discover Credit Card gave a 3-star rating?

SELECT CAST(COUNT(CASE WHEN T1.StarRating = 3 THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) FROM rootbeerreview AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.CreditCardType = 'Discover'

What percentage of customers who paid with a Discover Credit Card gave a 3 - star rating ?

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


Question: Please list the years of film market estimations when the market is in country "Japan" in descending order.

SELECT T1.Year FROM film_market_estimation AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID WHERE T2.Country  =  "Japan" ORDER BY T1.Year DESC

Please list the years of film market estimations when the market is in country " Japan " in descending order .

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


Question: What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools?

SELECT CAST(SUM(CASE WHEN DOC = 54 THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN DOC = 52 THEN 1 ELSE 0 END) FROM schools WHERE StatusType = 'Merged' AND County = 'Orange'

What is the ratio of merged Unified School District schools in Orange County to merged Elementary School District schools ?

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


Question: List the email addresses of the drama workshop groups located in Alaska state.

SELECT T2.Store_Email_Address FROM Addresses AS T1 JOIN Drama_Workshop_Groups AS T2 ON T1.Address_ID  =  T2.Address_ID WHERE T1.State_County  =  "Alaska"

List the email addresses of the drama workshop groups located in Alaska state .

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


Question: What are the names of entrepreneurs?

SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID


Question: Find the titles of all movies directed by steven spielberg.

SELECT title FROM Movie WHERE director = 'Steven Spielberg'

Find the titles of all movies directed by steven spielberg .

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


Question: Please list the name of the cards in the set Coldsnap with the highest converted mana cost.

SELECT T1.name FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap' ORDER BY T1.convertedManaCost DESC LIMIT 1

Please list the name of the cards in the set Coldsnap with the highest converted mana cost .

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


Question: Indicate if there is any pair formed by the words fukunaga and d'egees.

SELECT CASE WHEN COUNT(T1.wid) > 0 THEN 'yes' ELSE 'no' END FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st OR T1.wid = T2.w2nd WHERE T2.w1st = ( SELECT wid FROM words WHERE T1.word = 'fukunaga' ) AND T2.w2nd = ( SELECT wid FROM words WHERE word LIKE 'd%egees' )

Indicate if there is any pair formed by the words fukunaga and d'egees .

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


Question: Calculate the average percentage of word appearance in the page that have revision page id smaller than 106680.

SELECT CAST(SUM(T1.words) AS REAL) * 100 / SUM(T2.occurrences) FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.revision < 106680

Calculate the average percentage of word appearance in the page that have revision page i d smaller than 106680 .

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


Question: Please name three communities that experience the fraud incident.

SELECT T3.community_area_name FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T1.title = 'Criminal Sexual Assault' LIMIT 3

Please name three communities that experience the fraud incident .


Question: Which student has been entrusted to manage the budget for the Yearly Kickoff?

SELECT T4.first_name, T4.last_name FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event INNER JOIN expense AS T3 ON T2.budget_id = T3.link_to_budget INNER JOIN member AS T4 ON T3.link_to_member = T4.member_id WHERE T1.event_name = 'Yearly Kickoff'

Which student has been entrusted to manage the budget for the Yearly Kickoff ?

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


Question: How many games in total did team Boston Red Stockings attend from 2000 to 2010?

SELECT sum(T1.attendance) FROM home_game AS T1 JOIN team AS T2 ON T1.team_id  =  T2.team_id_br WHERE T2.name  =  'Boston Red Stockings' AND T1.year BETWEEN 2000 AND 2010;

How many games in total did team Boston Red Stockings attend from 2000 to 2010 ?

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


Question: What is the average rating of the podcast "Please Excuse My Dead Aunt Sally"?

SELECT AVG(T2.rating) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Please Excuse My Dead Aunt Sally'

What is the average rating of the podcast " Please Excuse My Dead Aunt Sally " ?

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


Question: Show all locations with only 1 station.

SELECT LOCATION FROM station GROUP BY LOCATION HAVING count(*)  =  1

Show all locations with only 1 station .


Question: Identify by papers title those in which conferences have been published that do not have a website..

SELECT T2.Title FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T1.HomePage = '' AND T2.Title <> ''

Identify by papers title those in which conferences have been published that do not have a website ..

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


Question: What are the ids, names, and FDA approval status for medicines ordered by descending number of possible enzyme interactions?

SELECT T1.id ,  T1.Name ,  T1.FDA_approved FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC

What are the ids , names , and FDA approval status for medicines ordered by descending number of possible enzyme interactions ?

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


Question: Where can I find the Valley Bicycle Specialists store?

SELECT T2.AddressLine1, T2.AddressLine2 FROM BusinessEntityAddress AS T1 INNER JOIN Address AS T2 ON T1.AddressID = T2.AddressID INNER JOIN Store AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T3.Name = 'Valley Bicycle Specialists'

Where can I find the Valley Bicycle Specialists store ?

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


Question: Find the first names and last names of teachers in alphabetical order of last name.

SELECT first_name ,  last_name FROM Teachers ORDER BY last_name

Find the first names and last names of teachers in alphabetical order of last name .

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


Question: Which team has the oldest player?

SELECT Team FROM player ORDER BY Age DESC LIMIT 1


Question: Name the oldest employee who is working on night shift. How old is the employee?

SELECT T1.FirstName, T1.LastName , STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', BirthDate) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeeDepartmentHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T3.ShiftId = 3 ORDER BY STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', BirthDate) DESC LIMIT 1

Name the oldest employee who is working on night shift . How old is the employee ?

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


Question: Calculate the average net profit for bakeware product.

SELECT AVG(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', ''))  FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE T2.`Product Name` = 'Bakeware'

Calculate the average net profit for bakeware product .

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


Question: Which ingredient appeared the most in recipes? Calculate its amount of appearance in percentage.

SELECT T1.name, CAST(COUNT(T2.ingredient_id) AS FLOAT) * 100 / ( SELECT COUNT(T2.ingredient_id) FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id ) AS "percentage" FROM Ingredient AS T1 INNER JOIN Quantity AS T2 ON T2.ingredient_id = T1.ingredient_id GROUP BY T2.ingredient_id ORDER BY COUNT(T2.ingredient_id) DESC LIMIT 1

Which ingredient appeared the most in recipes ? Calculate its amount of appearance in percentage .


Question: Name products and their quantity ordered by the company 'GROSELLA-Restaurante' in the sales order that was processed by Nancy Davolio.

SELECT T4.ProductName, T3.Quantity FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID INNER JOIN Customers AS T5 ON T2.CustomerID = T5.CustomerID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio' AND T5.CompanyName = 'GROSELLA-Restaurante'

Name products and their quantity ordered by the company ' GROSELLA - Restaurante ' in the sales order that was processed by Nancy Davolio .

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


Question: If funded, which are the projects that could impact at least 600 students for a school with moderate level of poverty? Name the projects and state the project cost.

SELECT DISTINCT T2.title, T1.total_price_excluding_optional_support FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T1.students_reached >= 600 AND T1.poverty_level LIKE 'moderate poverty'

If funded , which are the projects that could impact at least 600 students for a school with moderate level of poverty ? Name the projects and state the project cost .

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


Question: Which school requested the highest amount of resources from Amazon? State the school's ID.

SELECT T2.schoolid FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name LIKE 'Amazon' GROUP BY T2.schoolid ORDER BY COUNT(T1.vendor_name) DESC LIMIT 1

Which school requested the highest amount of resources from Amazon ? State the school 's ID .

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


Question: Show the name and location of track with 1 race.

SELECT T2.name ,  T2.location FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id GROUP BY T1.track_id HAVING count(*)  =  1

Show the name and location of track with 1 race .

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


Question: What category does the item ordered by Katherine Murray on 11/4/2018 in the South region belong to?

SELECT DISTINCT T3.Category FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Katherine Murray' AND T1.`Order Date` = '2018-11-04' AND T2.Region = 'South'

What category does the item ordered by Katherine Murray on 11/4/2018 in the South region belong to ?

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


Question: List the full names, Twitter IDs, and YouTube IDs of legislators who have Richard as their first name.

SELECT T2.official_full_name, T1.twitter_id, T1.youtube_id FROM `social-media` AS T1 INNER JOIN current AS T2 ON T1.bioguide = T2.bioguide_id WHERE T2.first_name = 'Richard'

List the full names , Twitter IDs , and YouTube IDs of legislators who have Richard as their first name .

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


Question: List the name of ships in ascending order of tonnage.

SELECT Name FROM ship ORDER BY Tonnage ASC

List the name of ships in ascending order of tonnage .

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


Question: List all the first words of the biwords pair where the second word is 'antic'.

SELECT T1.word FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T2.w2nd = ( SELECT wid FROM words WHERE word = 'antic' )

List all the first words of the biwords pair where the second word is ' antic ' .

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


Question: Find the names of customers who either have an deputy policy or uniformed policy.

SELECT DISTINCT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.policy_type_code  =  "Deputy" OR t1.policy_type_code  =  "Uniform"

Find the names of customers who either have an deputy policy or uniformed policy .

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


Question: Show the names of countries and their official languages.

SELECT T1.name ,  T3.name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id

Show the names of countries and their official languages .

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


Question: Among the products, how many of them are freebies?

SELECT COUNT(ProductID) FROM Products WHERE Price = 0

Among the products , how many of them are freebies ?


Question: What is the description of the service type which offers both the photo product and the film product?

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

What is the description of the service type which offers both the photo product and the film product ?

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


Question: What is the first and last name of each distinct artists who made a sculpture before 1900?

SELECT DISTINCT T1.lname ,  T1.fname FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID WHERE T2.year  <  1900

What is the first and last name of each distinct artists who made a sculpture before 1900 ?

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


Question: How many students got the most common result in the behavioral monitoring details? Also list the result details.

SELECT count(DISTINCT student_id) ,  behaviour_monitoring_details FROM Behaviour_Monitoring GROUP BY behaviour_monitoring_details ORDER BY count(*) DESC LIMIT 1

How many students got the most common result in the behavioral monitoring details ? Also list the result details .

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


Question: What is the name and major of members who had to spend more than a hundred dollars on an expense?

SELECT DISTINCT T1.first_name, T1.last_name, T2.major_name FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major INNER JOIN expense AS T3 ON T1.member_id = T3.link_to_member WHERE T3.cost > 100

What is the name and major of members who had to spend more than a hundred dollars on an expense ?

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


Question: What are the names, ages, and jobs of all people who are friends with Alice for the longest amount of time?

SELECT T1.name ,  T1.age ,  T1.job FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend =  'Alice' AND T2.year  =  (SELECT max(YEAR) FROM PersonFriend WHERE friend =  'Alice')

What are the names , ages , and jobs of all people who are friends with Alice for the longest amount of time ?

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


Question: What are the names of races held between 2009 and 2011?

SELECT name FROM races WHERE YEAR BETWEEN 2009 AND 2011

What are the names of races held between 2009 and 2011 ?

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


Question: Which positions are suitable with 4 years degree education?

SELECT positiontitle FROM position WHERE educationrequired = '4 year degree'

Which positions are suitable with 4 years degree education ?

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


Question: How many Annual Meeting events happened in the United Kingdom region?

SELECT count(*) FROM region AS t1 JOIN party AS t2 ON t1.region_id  =  t2.region_id JOIN party_events AS t3 ON t2.party_id  =  t3.party_id WHERE t1.region_name  =  "United Kingdom" AND t3.Event_Name  =  "Annaual Meeting"

How many Annual Meeting events happened in the United Kingdom region ?

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


Question: What instrument did the musician with last name "Heilo" use in the song "Badlands"?

SELECT T4.instrument FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId JOIN Instruments AS T4 ON T4.songid  =  T3.songid AND T4.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo" AND T3.title  =  "Badlands"

What instrument did the musician with last name " Heilo " use in the song " Badlands " ?

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


Question: Calculate the total sales ids that were sales of Flat Washer 8.

SELECT COUNT(T1.SalesID) FROM Sales AS T1 INNER JOIN Products AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Name = 'Flat Washer 8'

Calculate the total sales ids that were sales of Flat Washer 8 .

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


Question: Sort the names of products in ascending order of their price.

SELECT Product_Name FROM Products ORDER BY Product_Price ASC

Sort the names of products in ascending order of their price .


Question: How many products with the highest expected profits were sold in total?

SELECT SUM(t2.quantityOrdered) FROM orderdetails AS t2 INNER JOIN ( SELECT t1.productCode FROM products AS t1 ORDER BY t1.MSRP - t1.buyPrice DESC LIMIT 1 ) AS t3 ON t2.productCode = t3.productCode

How many products with the highest expected profits were sold in total ?


Question: How many flights on 2018/8/1 were operated by American Airlines Inc.?

SELECT COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1' AND T3.Description = 'American Airlines Inc.: AA'

How many flights on 2018/8/1 were operated by American Airlines Inc. ?

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


Question: Find the maximum and total number of followers of all users.

SELECT max(followers) ,  sum(followers) FROM user_profiles

Find the maximum and total number of followers of all users .


Question: List collection subset id, name and number of collections in each subset.

SELECT T2.Collection_Subset_ID ,  T1.Collection_Subset_Name ,  count(*) FROM Collection_Subsets AS T1 JOIN Collection_Subset_Members AS T2 ON T1.Collection_Subset_ID =  T2.Collection_Subset_ID GROUP BY T2.Collection_Subset_ID;

List collection subset i d , name and number of collections in each subset .

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


Question: What is the document type description for document type named Film?

SELECT document_type_description FROM Ref_document_types WHERE document_type_name  =  "Film"

What is the document type description for document type named Film ?

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


Question: List the names of players who played as a keeper.

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T3.Role_Desc = 'Keeper' GROUP BY T1.Player_Name

List the names of players who played as a keeper .

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


Question: Show the dates of performances with attending members whose roles are "Violin".

SELECT T3.Date FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID  =  T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID  =  T3.Performance_ID WHERE T2.Role  =  "Violin"

Show the dates of performances with attending members whose roles are " Violin " .

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


Question: How many paintings were created before 1900 in different locations?

SELECT count(*) ,  LOCATION FROM paintings WHERE YEAR  <  1900 GROUP BY LOCATION

How many paintings were created before 1900 in different locations ?

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


Question: List out the total pages of Wikipedia in Catalan language.

List out the total pages of Wikipedia in Catalan language .


Question: What is the language of the method ''PixieTests.SqlConnectionLayerTests.TestSqlCreateGuidColumn"?

SELECT Lang FROM Method WHERE Name = 'PixieTests.SqlConnectionLayerTests.TestSqlCreateGuidColumn'

What is the language of the method '' PixieTests . SqlConnectionLayerTests . TestSqlCreateGuidColumn " ?

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


Question: Calculate the total purchases made by customers using their Visa credit cards in the Sac State American River Courtyard between 6/3/2014 and 11/27/2015.

SELECT SUM(T1.PurchasePrice) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'Visa' AND T1.TransactionDate BETWEEN '2014-06-03' AND '2015-11-27'

Calculate the total purchases made by customers using their Visa credit cards in the Sac State American River Courtyard between 6/3/2014 and 11/27/2015 .

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


Question: How many carcinogenic molecules that consisted of Nitrogen?

SELECT COUNT(DISTINCT T1.molecule_id) FROM molecule AS T1 INNER JOIN atom AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.element = 'n' AND T1.label = '+'

How many carcinogenic molecules that consisted of Nitrogen ?


Question: State the product name, product line, rating and the selling price of product with the lowest rating.

SELECT T1.Name, T1.ProductLine, T2.Rating, T1.ListPrice FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID ORDER BY T2.Rating ASC LIMIT 1

State the product name , product line , rating and the selling price of product with the lowest rating .

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


Question: Please list the full names of all the male clients born after the year 1990.

SELECT first, middle, last FROM client WHERE year > 1990

Please list the full names of all the male clients born after the year 1990 .

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


Question: Which apartments have bookings with both status codes "Provisional" and "Confirmed"? Give me the apartment numbers.

SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Confirmed" INTERSECT SELECT T2.apt_number FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"

Which apartments have bookings with both status codes " Provisional " and " Confirmed " ? Give me the apartment numbers .

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


Question: Among the patients who were diagnosed with SLE, who is the oldest with normal hemoglobin level. Provide the ID and sex.

SELECT T1.ID, T1.SEX FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SLE' AND T2.HGB > 10 AND T2.HGB < 17 ORDER BY T1.Birthday ASC LIMIT 1

Among the patients who were diagnosed with SLE , who is the oldest with normal hemoglobin level . Provide the ID and sex .

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


Question: How many mountains are there in the country with the greatest population?

SELECT COUNT(T2.Mountain) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country GROUP BY T1.Name ORDER BY T1.Population DESC LIMIT 1

How many mountains are there in the country with the greatest population ?

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


Question: Which ship mode has more "deliver in person" instructions, rail or mail?

SELECT IIF(SUM(IIF(l_shipmode = 'RAIL', 1, 0)) - SUM(IIF(l_shipmode = 'MAIL', 1, 0)), 'RAIL', 'MAIL') AS result FROM lineitem WHERE l_shipinstruct = 'DELIVER IN PERSON'

Which ship mode has more " deliver in person " instructions , rail or mail ?

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


Question: Find the full name of members whose t-shirt size is extra large.

SELECT first_name, last_name FROM member WHERE t_shirt_size = 'X-Large'

Find the full name of members whose t - shirt size is extra large .

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


Question: List names of all authors who have only 1 paper.

SELECT T1.name FROM Author AS T1 JOIN Author_list AS T2 ON T1.author_id  =  T2.author_id GROUP BY T1.author_id HAVING count(*)  =  1

List names of all authors who have only 1 paper .

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


Question: Please show the names and ages of the drivers who participated in at least two races.

SELECT T1.Driver_Name ,  T1.Age FROM driver AS T1 JOIN race AS T2 ON T1.Driver_ID  =  T2.Driver_ID GROUP BY T1.Driver_ID HAVING COUNT(*)  >=  2

Please show the names and ages of the drivers who participated in at least two races .

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


Question: What is the google entity ID of Benjamin Hawkins?

SELECT google_entity_id_id FROM historical WHERE first_name = 'Benjamin' AND last_name = 'Hawkins'

What is the google entity ID of Benjamin Hawkins ?

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


Question: display the department name and number of employees in each of the department.

SELECT T2.department_name ,  COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id GROUP BY T2.department_name

display the department name and number of employees in each of the department .

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


Question: List out the name of the top 10 spenders and what credit card type are they using.

SELECT T1.First, T1.Last, T2.CreditCardType FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID GROUP BY T1.CustomerID ORDER BY SUM(T2.PurchasePrice) DESC LIMIT 10

List out the name of the top 10 spenders and what credit card type are they using .

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


Question: What are the names of the county that the delegates on "Appropriations" committee belong to?

SELECT T1.County_name FROM county AS T1 JOIN election AS T2 ON T1.County_id  =  T2.District WHERE T2.Committee  =  "Appropriations"

What are the names of the county that the delegates on " Appropriations " committee belong to ?

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


Question: Show ids for orders including both "Pride and Prejudice" and "The Little Prince".

SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "Pride and Prejudice" INTERSECT SELECT idOrder FROM Book AS T1 JOIN Books_Order AS T2 ON T1.isbn  =  T2.isbn WHERE T1.title  =  "The Little Prince"

Show ids for orders including both " Pride and Prejudice " and " The Little Prince " .

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


Question: What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst?

SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop" AND T2.staff_last_name = "Berge" INTERSECT SELECT product_id FROM problems AS T1 JOIN staff AS T2 ON T1.closure_authorised_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Ashley" AND T2.staff_last_name = "Medhurst"

What are the product ids for the problems reported by Christop Berge with closure authorised by Ashley Medhurst ?

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


Question: Find the average height and weight for all males (sex is M).

SELECT avg(height) ,  avg(weight) FROM people WHERE sex  =  'M'

Find the average height and weight for all males ( sex is M ) .

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


Question: How many employees have a first name of Ludie?

SELECT count(*) FROM Staff WHERE first_name = "Ludie";

How many employees have a first name of Ludie ?

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


Question: How long is the Yelp business No. 15098 opened on Monday?

SELECT SUBSTR(T1.closing_time, 1, 2) + 12 - SUBSTR(T1.opening_time, 1, 2) AS YYSJ FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week = 'Monday' AND T1.business_id = 15098

How long is the Yelp business No . 15098 opened on Monday ?

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


Question: Name the store with ID 7066 and calculate the percentage of the the quantity ordered that were on 'Net 30' payment terms.

SELECT T2.stor_name , CAST(SUM(CASE WHEN payterms = 'Net 30' THEN qty ELSE 0 END) AS REAL) * 100 / SUM(qty) FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id WHERE T1.stor_id = '7066' GROUP BY T2.stor_name

Name the store with ID 7066 and calculate the percentage of the the quantity ordered that were on ' Net 30 ' payment terms .

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


Question: Of complaints with the type code "Product Failure", how many had each different status code?

SELECT complaint_status_code ,  count(*) FROM complaints WHERE complaint_type_code  =  "Product Failure" GROUP BY complaint_status_code

Of complaints with the type code " Product Failure " , how many had each different status code ?

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


Question: Provide the current legislators' official full names who are from the Independent party.

SELECT T1.official_full_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.party = 'Independent' GROUP BY T1.official_full_name

Provide the current legislators ' official full names who are from the Independent party .

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


Question: List all products with the color yellow.

SELECT ProductID FROM Product WHERE Color = 'Yellow'

List all products with the color yellow .


Question: Show the name of track with most number of races.

SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id GROUP BY T1.track_id ORDER BY count(*) DESC LIMIT 1

Show the name of track with most number of races .

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


Question: What is the total shipping cost of all the orders made by Page Holsey? Indicate how many of the said orders were ordered in 2022.

SELECT SUM(T3.cost) FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T1.first_name = 'Page' AND T1.last_name = 'Holsey' AND STRFTIME('%Y', T2.order_date) = '2022'

What is the total shipping cost of all the orders made by Page Holsey ? Indicate how many of the said orders were ordered in 2022 .

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


Question: For how many times has SC Ganguly played as team captain in a match?

SELECT SUM(CASE WHEN T3.Role_Desc = 'Captain' THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Rolee AS T3 ON T2.Role_Id = T3.Role_Id WHERE T1.Player_Name = 'SC Ganguly'

For how many times has SC Ganguly played as team captain in a match ?

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


Question: List the name of physicians who took some appointment.

SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.Physician  =  T2.EmployeeID

List the name of physicians who took some appointment .


Question: In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12?

SELECT COUNT(CDSCode) FROM frpm WHERE `County Name` = 'Los Angeles' AND `Free Meal Count (K-12)` > 500 AND `FRPM Count (K-12)`< 700

In Los Angeles how many schools have more than 500 free meals but less than 700 free or reduced price meals for K-12 ?

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


Question: Show the average overall scores of countries whose official language is "English".

SELECT avg(T1.overall_score) FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id JOIN languages AS T3 ON T2.language_id  =  T3.id WHERE T3.name  =  "English"

Show the average overall scores of countries whose official language is " English " .

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


Question: What is the highest price at which a customer bought the book 'The Prophet'?

SELECT MAX(T2.price) FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T1.title = 'The Prophet'

What is the highest price at which a customer bought the book ' The Prophet ' ?

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


Question: Find the the date of enrollment of the "Spanish" course.

SELECT T2.date_of_enrolment FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id WHERE T1.course_name  =  "Spanish"

Find the the date of enrollment of the " Spanish " course .

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


Question: Find the GPD for Bosnia and Herzegovina and the type of government it belongs to.

SELECT T1.GDP, T2.Government FROM economy AS T1 INNER JOIN politics AS T2 ON T1.Country = T2.Country INNER JOIN country AS T3 ON T3.Code = T2.Country WHERE T3.Name = 'Bosnia and Herzegovina'

Find the GPD for Bosnia and Herzegovina and the type of government it belongs to .

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


Question: Find the login names of all senior citizen users ordered by their first names.

SELECT login_name FROM Users WHERE user_category_code  =  'Senior Citizen' ORDER BY first_name

Find the login names of all senior citizen users ordered by their first names .

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


Question: Who is the coach for 'BOS' team in year 1950. List the coach ID together with the number of game won and lost.

SELECT coachID, won, lost FROM coaches WHERE year = 1950 AND tmID = 'BOS'

Who is the coach for ' BOS ' team in year 1950 . List the coach ID together with the number of game won and lost .

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


Question: What is the id of the longest song?

SELECT f_id FROM files ORDER BY duration DESC LIMIT 1


Question: Which bike traveled the most often in zip code 94002?

SELECT bike_id FROM trip WHERE zip_code  =  94002 GROUP BY bike_id ORDER BY COUNT(*) DESC LIMIT 1

Which bike traveled the most often in zip code 94002 ?

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


Question: What is the difference in the average age of players when they are drafted in the ABA vs when they are drafted in the NBA between the years 1970 and 1970?

SELECT CAST(SUM(IIF(T2.lgID = 'ABA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'ABA', 1, 0)) - CAST(SUM(IIF(T2.lgID = 'NBA', 1970 - strftime('%Y', T3.birthDate), 0)) AS REAL) / COUNT(IIF(T2.lgID = 'NBA', 1, 0)) FROM draft AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID INNER JOIN players AS T3 ON T2.playerID = T3.playerID WHERE T1.draftYear BETWEEN 1970 AND 1970

What is the difference in the average age of players when they are drafted in the ABA vs when they are drafted in the NBA between the years 1970 and 1970 ?

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


Question: Find the id of the order made most recently.

SELECT order_id FROM orders ORDER BY date_order_placed DESC LIMIT 1

Find the i d of the order made most recently .

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


Question: How old was the goaltender who scored the fewest goals while on the ice when he retired from the NHL?

SELECT T2.lastNHL - T2.birthYear FROM GoaliesSC AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T2.lastNHL IS NOT NULL GROUP BY T2.lastNHL, T2.birthYear ORDER BY SUM(GA) LIMIT 1

How old was the goaltender who scored the fewest goals while on the ice when he retired from the NHL ?

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


Question: Show the names of products and the number of events they are in, sorted by the number of events in descending order.

SELECT T1.Product_Name ,  COUNT(*) FROM Products AS T1 JOIN Products_in_Events AS T2 ON T1.Product_ID  =  T2.Product_ID GROUP BY T1.Product_Name ORDER BY COUNT(*) DESC

Show the names of products and the number of events they are in , sorted by the number of events in descending order .

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


Question: Show the names of club leaders that joined their club before 2018.

SELECT T3.Name ,  T2.Club_Name FROM club_leader AS T1 JOIN club AS T2 ON T1.Club_ID  =  T2.Club_ID JOIN member AS T3 ON T1.Member_ID  =  T3.Member_ID WHERE T1.Year_Join  <  2018

Show the names of club leaders that joined their club before 2018 .

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


Question: Please list all the keywords of the episode "Refuge: Part 1".

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Refuge: Part 1'

Please list all the keywords of the episode " Refuge : Part 1 " .

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


Question: Please show the categories of the music festivals and the count.

SELECT Category ,  COUNT(*) FROM music_festival GROUP BY Category

Please show the categories of the music festivals and the count .

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


Question: How many students have absent from school?

SELECT COUNT(name) FROM longest_absense_from_school WHERE month > 1

How many students have absent from school ?


Question: How many business ids have opening hours from 8AM to 6PM?

SELECT DISTINCT business_id FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'

How many business ids have opening hours from 8AM to 6PM ?

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


Question: For the publisher which published the most books, show its name.

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id GROUP BY T2.publisher_name ORDER BY COUNT(T2.publisher_id) DESC LIMIT 1

For the publisher which published the most books , show its name .


Question: State the short description for the project which got the donation at 14:44:29 on 2012/9/6.

SELECT T1.short_description FROM essays AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.donation_timestamp LIKE '2012-09-06 14:44:29'

State the short description for the project which got the donation at 14:44:29 on 2012/9/6 .

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


Question: Please list the names of the movies that received more than 20 likes?

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.critic_likes > 20

Please list the names of the movies that received more than 20 likes ?

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


Question: Find the name of customers who do not have a loan with a type of Mortgages.

SELECT cust_name FROM customer EXCEPT SELECT T1.cust_name FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id WHERE T2.loan_type  =  'Mortgages'

Find the name of customers who do not have a loan with a type of Mortgages .

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


Question: What are the payment date of the payment with amount paid higher than 300 or with payment type is 'Check'

SELECT payment_date FROM payments WHERE amount_paid  >  300 OR payment_type_code  =  'Check'

What are the payment date of the payment with amount paid higher than 300 or with payment type is ' Check '

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


Question: What are the SSN and names of scientists working on the project with the most hours?

SELECT T3.ssn ,  T3.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T2.hours  =  (SELECT max(hours) FROM projects)

What are the SSN and names of scientists working on the project with the most hours ?

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


Question: Which customers have used the service named "Close a policy" or "Upgrade a policy"? Give me the customer names.

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

Which customers have used the service named " Close a policy " or " Upgrade a policy " ? Give me the customer names .

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


Question: For each order, return the customer name and the dish name.

SELECT T1.Name ,  T2.Dish_Name FROM customer AS T1 JOIN customer_order AS T2 ON T1.Customer_ID  =  T2.Customer_ID

For each order , return the customer name and the dish name .

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


Question: How many flights of Endeavor Air Inc. were faster than scheduled on 2018/8/31?

SELECT SUM(CASE WHEN T1.ACTUAL_ELAPSED_TIME < CRS_ELAPSED_TIME THEN 1 ELSE 0 END) AS count FROM Airlines AS T1 INNER JOIN `Air Carriers` AS T2 ON T1.OP_CARRIER_AIRLINE_ID = T2.Code WHERE T1.FL_DATE = '2018/8/31' AND T2.Description = 'Endeavor Air Inc.: 9E'

How many flights of Endeavor Air Inc. were faster than scheduled on 2018/8/31 ?

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


Question: List the most common type of competition.

SELECT Competition_type FROM competition GROUP BY Competition_type ORDER BY COUNT(*) DESC LIMIT 1

List the most common type of competition .


Question: Name 5 students with due payments that are enlisted alongside which organization they were enlisted.

SELECT T2.organ, T1.name FROM no_payment_due AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.bool = 'pos' LIMIT 5

Name 5 students with due payments that are enlisted alongside which organization they were enlisted .

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


Question: What is the code of Mississippi Valley Airlines?

SELECT Code FROM `Air Carriers` WHERE Description LIKE 'Mississippi Valley Airlines%'

What is the code of Mississippi Valley Airlines ?

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


Question: List the titles of books in descending order of pages.

SELECT Title FROM book ORDER BY Pages DESC

List the titles of books in descending order of pages .

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


Question: Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop.

SELECT T1.problem_description FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE T2.staff_first_name = "Christop"

Give me a list of descriptions of the problems that are reported by the staff whose first name is Christop .

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


Question: Who are the ministers, when did they take office, and when did they leave office, ordered by when they left office?

SELECT minister ,  took_office ,  left_office FROM party ORDER BY left_office

Who are the ministers , when did they take office , and when did they leave office , ordered by when they left office ?

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


Question: Count the number of characteristics of the product named 'laurel'.

SELECT count(*) FROM products AS t1 JOIN product_characteristics AS t2 ON t1.product_id  =  t2.product_id JOIN CHARACTERISTICS AS t3 ON t2.characteristic_id  =  t3.characteristic_id WHERE t1.product_name  =  "laurel"

Count the number of characteristics of the product named ' laurel ' .

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


Question: State the birth name of crews who are director and have birth country in South Korea.

SELECT T1.birth_name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.role = 'director' AND T1.birth_country = 'South Korea';

State the birth name of crews who are director and have birth country in South Korea .

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


Question: Find the number of vocal types used in song "Le Pop"

SELECT count(*) FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid WHERE title  =  "Le Pop"

Find the number of vocal types used in song " Le Pop "

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


Question:
How many matches in the 2015/2016 season were held in Scotland Premier League
?

SELECT COUNT(t2.id) FROM League AS t1 INNER JOIN Match AS t2 ON t1.id = t2.league_id WHERE t2.season = '2015/2016' AND t1.name = 'Scotland Premier League'

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


Question: How many counties correspond to each police force?

SELECT Police_force ,  COUNT(*) FROM county_public_safety GROUP BY Police_force

How many counties correspond to each police force ?


Question: For each delegate, find the names of the party they are part of.

SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID

For each delegate , find the names of the party they are part of .

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


Question: What are the names and headquarters of all companies ordered by descending market value?

SELECT company ,  headquarters FROM company ORDER BY market_value DESC

What are the names and headquarters of all companies ordered by descending market value ?

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


Question: Find the name and checking balance of the account with the lowest saving balance.

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

Find the name and checking balance of the account with the lowest saving balance .

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


Question: Among the cities with an area code 939, which city has the highest Asian population?

SELECT T2.city FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 939 ORDER BY T2.asian_population DESC LIMIT 1

Among the cities with an area code 939 , which city has the highest Asian population ?

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


Question: What are the names, ages, and countries of artists, sorted by the year they joined?

SELECT name ,  age ,  country FROM artist ORDER BY Year_Join

What are the names , ages , and countries of artists , sorted by the year they joined ?

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


Question: How many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with Behcet disease did not stay in the hospital for treatment?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T2.Diagnosis = 'Behcet' AND T1.SEX = 'M' AND STRFTIME('%Y', T2.`Examination Date`) BETWEEN '1995' AND '1997' AND T1.Admission = '-'

How many male patients who underwent testing between 1995 and 1997 and were subsequently diagnosed with Behcet disease did not stay in the hospital for treatment ?

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


Question: What is the maximum enrollment across all schools?

What is the maximum enrollment across all schools ?


Question: Which date corresponds to when a customer purchased a good costing over 15 dollars?

SELECT DISTINCT T1.date FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id WHERE T3.price  >  15

Which date corresponds to when a customer purchased a good costing over 15 dollars ?

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


Question: Find the states where have the colleges whose enrollments are less than the largest size.

SELECT DISTINCT state FROM college WHERE enr  <  (SELECT max(enr) FROM college)

Find the states where have the colleges whose enrollments are less than the largest size .

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


Question: What are the courses taught by the advisors who gave advice to student with ID 376?

SELECT T3.course_id FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id = T2.p_id INNER JOIN taughtBy AS T3 ON T2.p_id = T3.p_id WHERE T1.p_id = 141

What are the courses taught by the advisors who gave advice to student with ID 376 ?

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


Question: What proportion of patients who had signs of thrombocytopenia had SLE diagnosed?

SELECT CAST(SUM(CASE WHEN Diagnosis = 'SLE' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(ID) FROM Examination WHERE Symptoms = 'thrombocytopenia'

What proportion of patients who had signs of thrombocytopenia had SLE diagnosed ?

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


Question: What are the keywords for episode 426 of the series?

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.number_in_series = 426;

What are the keywords for episode 426 of the series ?


Question: What is the homepage URL for the journal that published the most papers?

SELECT T2.HomePage FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id GROUP BY T1.JournalId ORDER BY COUNT(T1.JournalId) DESC LIMIT 1

What is the homepage URL for the journal that published the most papers ?

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


Question: List down the district number of the representative of the house named Jonathan Grout.

SELECT T2.district FROM historical AS T1 INNER JOIN `historical-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.last_name = 'Grout' AND T1.first_name = 'Jonathan' AND T2.type = 'rep'

List down the district number of the representative of the house named Jonathan Grout .

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


Question: In the Y coordinate of image ID 12, how many are 0?

SELECT COUNT(IMG_ID) FROM IMG_OBJ WHERE IMG_ID = 12 AND Y = 0

In the Y coordinate of image ID 12 , how many are 0 ?

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


Question: How much is the tax amount of the purchase order with the biggest tax amount? Indicate the purchase order ID.

SELECT TaxAmt, PurchaseOrderID FROM PurchaseOrderHeader ORDER BY TaxAmt DESC LIMIT 1

How much is the tax amount of the purchase order with the biggest tax amount ? Indicate the purchase order ID .

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


Question: How many scenes can be found in "Twelfth Night, Or What You Will"?

SELECT COUNT(T2.Scene) AS cnt FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id WHERE T1.LongTitle = 'Cymbeline, King of Britain'

How many scenes can be found in " Twelfth Night , Or What You Will " ?

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


Question: What is the name of the wrestler with the fewest days held?

SELECT Name FROM wrestler ORDER BY Days_held ASC LIMIT 1

What is the name of the wrestler with the fewest days held ?

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


Question: State the origin country of the fastest car in the database.

SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.horsepower DESC LIMIT 1

State the origin country of the fastest car in the database .

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


Question: What is the name of the author with most number of documents?

SELECT author_name FROM Documents GROUP BY author_name ORDER BY count(*) DESC LIMIT 1

What is the name of the author with most number of documents ?


Question: What is the average vacation hours taken by Sales person?

SELECT CAST(SUM(T1.VacationHours) AS REAL) / COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP'

What is the average vacation hours taken by Sales person ?

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


Question: How many rentals did Ella Oliver hire in June 2016?

SELECT COUNT(T1.rental_id) FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'ELLA' AND T2.last_name = 'ELLA' AND date(T1.rental_date) BETWEEN '2005-06-01' AND '2005-06-30'

How many rentals did Ella Oliver hire in June 2016 ?

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


Question: List all the scraped work orders for handling damage reason.

SELECT T2.WorkOrderID FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Handling damage'

List all the scraped work orders for handling damage reason .

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


Question: Please list the first name of the players from the NBA league with the forward position.

SELECT DISTINCT T1.firstName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE (T1.pos = 'F' OR T1.pos = 'F-C') AND T2.lgID = 'NBA'

Please list the first name of the players from the NBA league with the forward position .

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


Question: Return the names of entrepreneurs do no not have the investor Rachel Elnaugh.

SELECT T2.Name FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID WHERE T1.Investor != "Rachel Elnaugh"

Return the names of entrepreneurs do no not have the investor Rachel Elnaugh .

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


Question: What is the average quantity of Ikura ordered in one order?

SELECT CAST(SUM(T2.Quantity) AS REAL) / COUNT(T2.OrderID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductName = 'Ikura'

What is the average quantity of Ikura ordered in one order ?

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


Question: List all movies with the best rating score. State the movie title and number of Mubi user who loves the movie.

SELECT DISTINCT T2.movie_title, T2.movie_popularity FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5

List all movies with the best rating score . State the movie title and number of Mubi user who loves the movie .

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


Question: What is the tail number of a Compass Airline's plane that flew the most number of flights from LAX to ABQ?

SELECT T2.OP_CARRIER_AIRLINE_ID FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Compass Airlines: CP' AND T2.ORIGIN = 'LAX' AND T2.DEST = 'ABQ' GROUP BY T2.OP_CARRIER_AIRLINE_ID ORDER BY COUNT(T2.OP_CARRIER_AIRLINE_ID) DESC LIMIT 1

What is the tail number of a Compass Airline 's plane that flew the most number of flights from LAX to ABQ ?

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


Question: In businesses with a score lower than 95 and located around the postal code of 94110, what is the percentage of businesses with a risk category of low risk?

SELECT CAST(SUM(CASE WHEN T1.risk_category = 'Low Risk' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.risk_category) FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T2.score < 95 AND T3.postal_code = 94110

In businesses with a score lower than 95 and located around the postal code of 94110 , what is the percentage of businesses with a risk category of low risk ?

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


Question: Show the distinct transmitters of radios that are not associated with any city channel.

SELECT Transmitter FROM radio WHERE Radio_ID NOT IN (SELECT Radio_ID FROM city_channel_radio)

Show the distinct transmitters of radios that are not associated with any city channel .

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


Question: What is the placement date of the order whose invoice number is 10?

SELECT T1.date_order_placed FROM orders AS T1 JOIN shipments AS T2 ON T1.order_id = T2.order_id WHERE T2.invoice_number = 10

What is the placement date of the order whose invoice number is 10 ?

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


Question: What is the payment method that most customers use?

SELECT Payment_method_code FROM Customer_Payment_Methods GROUP BY Payment_method_code ORDER BY count(*) DESC LIMIT 1

What is the payment method that most customers use ?

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


Question: Among male legislators, state number of the legislators who are not the senator.

SELECT COUNT(T3.state) FROM ( SELECT T2.state FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.gender_bio = 'M' AND (T2.class IS NULL OR T2.class = '') GROUP BY T2.state ) T3

Among male legislators , state number of the legislators who are not the senator .


Question: What is the first and last name of all employees who live in the city Damianfort?

SELECT T2.first_name ,  T2.last_name FROM Addresses AS T1 JOIN Staff AS T2 ON T1.address_id = T2.staff_address_id WHERE T1.city = "Damianfort";

What is the first and last name of all employees who live in the city Damianfort ?

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


Question: Find the names of the students who are in the position of striker and got a yes tryout decision.

SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID  =  T2.pID WHERE T2.decision  =  'yes' AND T2.pPos  =  'striker'

Find the names of the students who are in the position of striker and got a yes tryout decision .

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


Question: Which team was the home team in the match of the Bundesliga division on 2020/10/2?

SELECT T1.HomeTeam FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2020-10-02' AND T2.name = 'Bundesliga'

Which team was the home team in the match of the Bundesliga division on 2020/10/2 ?

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


Question: What is the name of the author who has co-authored the most papers with Mckeown , Kathleen ?

select t4.name from author_list as t1 join author_list as t2 on t1.paper_id  =  t2.paper_id and t1.author_id != t2.author_id join author as t3 on t1.author_id  =  t3.author_id join author as t4 on t2.author_id  =  t4.author_id where t3.name = "mckeown ,  kathleen" group by t2.author_id order by count(*) desc limit 1

What is the name of the author who has co - authored the most papers with Mckeown , Kathleen ?

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


Question: What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students?

SELECT building ,  room_number FROM classroom WHERE capacity BETWEEN 50 AND 100

What are the room numbers and corresponding buildings for classrooms which can seat between 50 to 100 students ?

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


Question: How many female customers have an education level of over 11?

SELECT COUNT(ID) FROM Customers WHERE EDUCATIONNUM > 11 AND SEX = 'Female'

How many female customers have an education level of over 11 ?

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


Question: What is the average ranking episodes that are nominated for an award?

SELECT SUM(T1.rating) / COUNT(T1.episode) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id

What is the average ranking episodes that are nominated for an award ?

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


Question: What are the isbns of books ordered by both clients named Peter Doe and James Smith?

SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "Peter Doe" INTERSECT SELECT T2.isbn FROM Orders AS T1 JOIN Books_Order AS T2 ON T1.idOrder  =  T2.idOrder JOIN Client AS T3 ON T1.idClient  =  T3.idClient WHERE T3.name  =  "James Smith"

What are the isbns of books ordered by both clients named Peter Doe and James Smith ?

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


Question: Give me the social number and state of the client whose phone number is 100-121-8371.

SELECT T1.social, T1.state FROM client AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN state AS T3 ON T2.state_abbrev = T3.StateCode WHERE T1.phone = '100-121-8371'

Give me the social number and state of the client whose phone number is 100 - 121 - 8371 .

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


Question: List the courses' IDs and students' IDs who failed to pass the course.

SELECT course_id, student_id FROM registration WHERE grade IS NULL OR grade = ''

List the courses ' IDs and students ' IDs who failed to pass the course .

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


Question: What is the least common game genre?

SELECT T.game_name FROM ( SELECT T2.game_name, COUNT(T2.id) FROM genre AS T1 INNER JOIN game AS T2 ON T1.id = T2.genre_id GROUP BY T2.game_name ORDER BY COUNT(T2.id) ASC LIMIT 1 ) t


Question: Provide the genre of a movie title with a tagline of "A long time ago in a galaxy far, far away…".

SELECT T3.genre_name FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T3.genre_id = T2.genre_id WHERE T1.tagline = 'A long time ago in a galaxy far, far away...'

Provide the genre of a movie title with a tagline of " A long time ago in a galaxy far , far away … " .

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


Question: Show the leader names and locations of colleges.

SELECT Leader_Name ,  College_Location FROM college

Show the leader names and locations of colleges .

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


Question: What are the codes and names for all regions, sorted by codes?

SELECT region_code ,  region_name FROM region ORDER BY region_code

What are the codes and names for all regions , sorted by codes ?


Question: Find the name of dorms that do not have amenity TV Lounge.

SELECT dorm_name FROM dorm EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge'

Find the name of dorms that do not have amenity TV Lounge .

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


Question: Among the male customers in Sacramento, what percentage bought Dominion root beer in 2013?

SELECT CAST(COUNT(CASE WHEN T4.BrandName = 'Dominion' THEN T1.CustomerID ELSE NULL END) AS REAL) * 100 / COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.City = 'Sacramento' AND T1.Gender = 'M' AND T2.TransactionDate LIKE '2014%'

Among the male customers in Sacramento , what percentage bought Dominion root beer in 2013 ?

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


Question: What are the maximum and minimum number of chapters for each book?

SELECT max(Chapters) ,  min(Chapters) FROM book

What are the maximum and minimum number of chapters for each book ?


Question: What percentage of vivo devices belong to users with no information?

SELECT SUM(IIF(T1.gender IS NULL AND T1.age IS NULL AND T1.`group` IS NULL, 1, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'

What percentage of vivo devices belong to users with no information ?


Question: In episodes aired in 2009, how many of them are credited to Sam Im for additional timer?

SELECT COUNT(*) FROM Episode AS T1 INNER JOIN Credit AS T2 ON T1.episode_id = T2.episode_id WHERE T2.credited = 'true' AND T2.person = 'Sam Im' AND SUBSTR(T1.air_date, 1, 4) = '2009' AND T2.role = 'additional timer';

In episodes aired in 2009 , how many of them are credited to Sam I m for additional timer ?

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


Question: Which store has the headphones in stock? Give me the store name and the total quantity.

SELECT t1.name ,  sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id GROUP BY t2.store_id ORDER BY sum(t2.quantity) DESC LIMIT 1

Which store has the headphones in stock ? Give me the store name and the total quantity .

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


Question: Among the male users, how many users use device model of Desire 820?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Desire 820' AND T1.gender = 'M'

Among the male users , how many users use device model of Desire 820 ?

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


Question: Who is the daughter of Capulet?

SELECT CharName FROM characters WHERE Description = 'Daughter to Capulet'


Question: How many Olympic events did Michael Phelps II join in total? Find the percentage of the events where he won a gold medal.

SELECT COUNT(T3.event_id) , CAST(COUNT(CASE WHEN T4.id = '1' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T4.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'Michael Fred Phelps, II'

How many Olympic events did Michael Phelps II join in total ? Find the percentage of the events where he won a gold medal .

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


Question: Name the patients who had an allergy to soy.

SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Allergy to soya'

Name the patients who had an allergy to soy .

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


Question: For each zip code, find the ids of all trips that have a higher average mean temperature above 60?

SELECT T1.id FROM trip AS T1 JOIN weather AS T2 ON T1.zip_code  =  T2.zip_code GROUP BY T2.zip_code HAVING avg(T2.mean_temperature_f)  >  60

For each zip code , find the ids of all trips that have a higher average mean temperature above 60 ?

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


Question: What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015?

SELECT CAST(COUNT(T2.`Complaint ID`) AS REAL) / 3 AS average FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) BETWEEN '2015' AND '2017' AND T1.city = 'New York City' AND T2.Product = 'Credit card'

What is the average number of complaints on credit cards filed by clients from New York in the 3 consecutive years starting from 2015 ?

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


Question: How many items were sold by store 9 during a snowy day?

SELECT COUNT(DISTINCT item_nbr) FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr INNER JOIN sales_in_weather AS T3 ON T2.store_nbr = T3.store_nbr WHERE T3.store_nbr = 9 AND T1.snowfall <> 0 AND T1.snowfall IS NOT NULL

How many items were sold by store 9 during a snowy day ?

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


Question: Find the last names of the teachers that teach fifth grade.

SELECT DISTINCT T2.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE grade  =  5

Find the last names of the teachers that teach fifth grade .

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


Question: Provide the population of the city of the 'World Tourism Organization' headquarter.

SELECT T2.Population FROM organization AS T1 INNER JOIN city AS T2 ON T1.City = T2.Name WHERE T1.Name = 'World Tourism Organization'

Provide the population of the city of the ' World Tourism Organization ' headquarter .

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


Question: Name the coins that were not opened on May 2013.

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

Name the coins that were not opened on May 2013 .

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


Question: What are the languages that are used most often in songs?

SELECT languages FROM song GROUP BY languages ORDER BY count(*) DESC LIMIT 1

What are the languages that are used most often in songs ?


Question: Which allergy type has most number of allergies?

SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1

Which allergy type has most number of allergies ?


Question: How many professors who has a either Ph.D. or MA degree?

SELECT count(*) FROM professor WHERE prof_high_degree  =  'Ph.D.' OR prof_high_degree  =  'MA'

How many professors who has a either Ph.D. or MA degree ?

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


Question: Find products with max page size as "A4" or pages per minute color smaller than 5.

SELECT product FROM product WHERE max_page_size  =  "A4" OR pages_per_minute_color  <  5

Find products with max page size as " A4 " or pages per minute color smaller than 5 .

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


Question: What is the average number of units sold in millions of games played by players with position "Guard"?

SELECT avg(Units_sold_Millions) FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T3.Position  =  "Guard"

What is the average number of units sold in millions of games played by players with position " Guard " ?

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


Question: What is the interaction type of the enzyme named 'ALA synthase' and the medicine named 'Aripiprazole'?

SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id  =  T2.id JOIN enzyme AS T3 ON T1.enzyme_id  =  T3.id WHERE T3.name  =  'ALA synthase' AND T2.name  =  'Aripiprazole'

What is the interaction type of the enzyme named ' ALA synthase ' and the medicine named ' Aripiprazole ' ?

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


Question: List the detail and id of the teacher who teaches the most courses.

SELECT T1.teacher_details ,  T1.teacher_id FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id GROUP BY T1.teacher_id ORDER BY count(*) DESC LIMIT 1

List the detail and i d of the teacher who teaches the most courses .

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


Question: Please provide the age group of any LG Nexus 4 device users.

SELECT T1.`group` FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'LG' AND T2.device_model = 'Nexus 4'

Please provide the age group of any LG Nexus 4 device users .

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


Question: Return the names of cities, ordered alphabetically.

Return the names of cities , ordered alphabetically .


Question: List the titles of books that are not published.

SELECT Title FROM book WHERE Book_ID NOT IN (SELECT Book_ID FROM publication)

List the titles of books that are not published .


Question: Which problem log was created most recently? Give me the log id.

SELECT problem_log_id FROM problem_log ORDER BY log_entry_date DESC LIMIT 1

Which problem log was created most recently ? Give me the log i d.


Question: How many of the actors are named "Dan"?

SELECT COUNT(actor_id) FROM actor WHERE first_name = 'Dan'

How many of the actors are named " Dan " ?


Question: What was the chance creation crossing class for "Hull City" on 2010/2/22?

SELECT t2.chanceCreationCrossingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hull City' AND SUBSTR(t2.`date`, 1, 10) = '2010-02-22'

What was the chance creation crossing class for " Hull City " on 2010/2/22 ?

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


Question: Which staff handled least number of payments? List the full name and the id.

SELECT T1.first_name ,  T1.last_name ,  T1.staff_id FROM staff AS T1 JOIN payment AS T2 ON T1.staff_id  =  T2.staff_id GROUP BY T1.staff_id ORDER BY count(*) ASC LIMIT 1

Which staff handled least number of payments ? List the full name and the i d.

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


Question: Which country has the most crowded city in the world?

SELECT T1.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode ORDER BY T2.Population DESC LIMIT 1

Which country has the most crowded city in the world ?

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


Question: What are invoices status of all the orders which have not been shipped?

SELECT invoice_status_code FROM Invoices WHERE invoice_number NOT IN ( SELECT invoice_number FROM Shipments )

What are invoices status of all the orders which have not been shipped ?

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


Question: Name the county that has the bad alias of Druid Hills.

SELECT T2.county FROM avoid AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Druid Hills'

Name the county that has the bad alias of Druid Hills .

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


Question: Among the books published by publisher ID 1929, how many of them have over 500 pages?

SELECT COUNT(*) FROM book WHERE publisher_id = 1929 AND num_pages > 500

Among the books published by publisher ID 1929 , how many of them have over 500 pages ?

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


Question: What proportion of rivers have a length of more than 3,000 miles? Please provide the name of a Russian river that is more than 3,000 miles long.

SELECT CAST(SUM(CASE WHEN T1.Length > 3000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Name) FROM river AS T1 INNER JOIN located AS T2 ON T1.Name = T2.River INNER JOIN country AS T3 ON T3.Code = T2.Country

What proportion of rivers have a length of more than 3,000 miles ? Please provide the name of a Russian river that is more than 3,000 miles long .

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


Question: List the active business ID and its stars of the businesses fall under the category of Pets.

SELECT T1.business_id, T1.stars FROM Business AS T1 INNER JOIN Business_Categories ON T1.business_id = Business_Categories.business_id INNER JOIN Categories AS T3 ON Business_Categories.category_id = T3.category_id WHERE T1.active LIKE 'TRUE' AND T3.category_name LIKE 'Pets'

List the active business ID and its stars of the businesses fall under the category of Pets .

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


Question: When did Wing Hung Chop Suey Restaurant have its first inspection?

SELECT MIN(T2.inspection_date) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.aka_name = 'WING HUNG CHOP SUEY RESTAURANT'

When did Wing Hung Chop Suey Restaurant have its first inspection ?

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


Question: What is the name of the deparment with the highest enrollment?

SELECT dept_name FROM student GROUP BY dept_name ORDER BY count(*) DESC LIMIT 1

What is the name of the deparment with the highest enrollment ?


Question: In which year are there festivals both inside the 'United States' and outside the 'United States'?

SELECT YEAR FROM festival_detail WHERE LOCATION  =  'United States' INTERSECT SELECT YEAR FROM festival_detail WHERE LOCATION != 'United States'

In which year are there festivals both inside the ' United States ' and outside the ' United States ' ?

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


Question: What are the names of catalog entries with level number 8?

SELECT t1.catalog_entry_name FROM Catalog_Contents AS t1 JOIN Catalog_Contents_Additional_Attributes AS t2 ON t1.catalog_entry_id  =  t2.catalog_entry_id WHERE t2.catalog_level_number  =  "8"

What are the names of catalog entries with level number 8 ?

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


Question: Which country has the shortest life expectancy?

SELECT Name FROM Country ORDER BY LifeExpectancy LIMIT 1

Which country has the shortest life expectancy ?


Question: Which company had the most orders in 1998?

SELECT T1.CompanyName FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1998' GROUP BY T1.CompanyName ORDER BY COUNT(T2.OrderID) DESC LIMIT 1

Which company had the most orders in 1998 ?

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


Question: Which country is the driver with the highest points from? Give me the capital of the country.

SELECT T1.Capital FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country ORDER BY T2.Points DESC LIMIT 1

Which country is the driver with the highest points from ? Give me the capital of the country .

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


Question: What are the titles of albums by the artist "AC/DC"?

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

What are the titles of albums by the artist " AC / DC " ?

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


Question: Order denominations in descending order of the count of schools with the denomination. Return each denomination with the count of schools.

SELECT Denomination ,  COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC

Order denominations in descending order of the count of schools with the denomination . Return each denomination with the count of schools .

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


Question: Give the number of claims did Ms. Abbie Cole have in the year of 2011.

SELECT COUNT(T2.BILLABLEPERIOD) FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Abbie' AND T1.last = 'Cole' AND T2.BILLABLEPERIOD BETWEEN '2010-12-31' AND '2012-01-01'

Give the number of claims did Ms. Abbie Cole have in the year of 2011 .

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