Question: How many athletes over the age of 59 competed in the 2016 Summer Olympics?

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

How many athletes over the age of 59 competed in the 2016 Summer Olympics ?

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


Question: What are the names of each scientist, the names of the projects that they work on, and the hours for each of those projects, listed in alphabetical order by project name, then scientist name.

SELECT T1.Name ,  T3.Name ,  T3.Hours FROM Scientists AS T1 JOIN AssignedTo AS T2 ON T1.SSN = T2.Scientist JOIN Projects AS T3 ON T2.Project = T3.Code ORDER BY T3.Name ,  T1.Name

What are the names of each scientist , the names of the projects that they work on , and the hours for each of those projects , listed in alphabetical order by project name , then scientist name .

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


Question: Provide the hair colour of the human superhero who is 185 cm tall.

SELECT DISTINCT T3.colour FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id INNER JOIN colour AS T3 ON T1.hair_colour_id = T3.id WHERE T1.height_cm = 185 AND T2.race = 'Human'

Provide the hair colour of the human superhero who is 185 cm tall .

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


Question: Find the first and last name of the faculty who is involved in the largest number of activities.

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

Find the first and last name of the faculty who is involved in the largest number of activities .

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


Question: What is the maximum rating for sailors?

What is the maximum rating for sailors ?


Question: Among the coaches who are born in the USA, how many of them used to train the Philadelphia Flyers?

SELECT COUNT(DISTINCT T3.coachID) FROM Coaches AS T1 INNER JOIN Teams AS T2 ON T1.year = T2.year AND T1.tmID = T2.tmID INNER JOIN Master AS T3 ON T1.coachID = T3.coachID WHERE T2.name = 'Philadelphia Flyers' AND T3.birthCountry = 'USA'

Among the coaches who are born in the USA , how many of them used to train the Philadelphia Flyers ?

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


Question: How many of the reviews for the app "Brit + Co" have a comment?

SELECT COUNT(App) FROM user_reviews WHERE App = 'Brit + Co' AND Translated_Review IS NOT NULL

How many of the reviews for the app " Brit + Co " have a comment ?

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


Question: How many problems does the product with the most problems have? List the number of the problems and product name.

SELECT count(*) ,  T1.product_name FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id GROUP BY T1.product_name ORDER BY count(*) DESC LIMIT 1

How many problems does the product with the most problems have ? List the number of the problems and product name .

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


Question: Show the tourist attractions visited by the tourist whose detail is 'Vincent'.

SELECT T1.Name FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID JOIN VISITORS AS T3 ON T2.Tourist_ID  =  T3.Tourist_ID WHERE T3.Tourist_Details  =  "Vincent"

Show the tourist attractions visited by the tourist whose detail is ' Vincent ' .

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


Question: What is the average age of all the vivo device users?

SELECT AVG(age) 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 is the average age of all the vivo device users ?

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


Question: What are the first names of the professors who do not teach a class.

SELECT emp_fname FROM employee WHERE emp_jobcode  =  'PROF' EXCEPT SELECT T1.emp_fname FROM employee AS T1 JOIN CLASS AS T2 ON T1.emp_num  =  T2.prof_num

What are the first names of the professors who do not teach a class .

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


Question: Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000.

SELECT Investor FROM entrepreneur WHERE Money_Requested  >  140000 INTERSECT SELECT Investor FROM entrepreneur WHERE Money_Requested  <  120000

Show the investors shared by entrepreneurs that requested more than 140000 and entrepreneurs that requested less than 120000 .

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


Question: For each file format, return the number of artists who released songs in that format.

SELECT count(*) ,  formats FROM files GROUP BY formats

For each file format , return the number of artists who released songs in that format .

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


Question: Count the number of cities.


Question: What are the last names of faculty who are part of the computer science department?

SELECT T2.Lname FROM DEPARTMENT AS T1 JOIN FACULTY AS T2 ON T1.DNO  =  T3.DNO JOIN MEMBER_OF AS T3 ON T2.FacID  =  T3.FacID WHERE T1.DName  =  "Computer Science"

What are the last names of faculty who are part of the computer science department ?

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


Question: What is Disney's highest grossing action movie?

SELECT movie_title FROM movies_total_gross WHERE genre = 'Action' ORDER BY CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL) DESC LIMIT 1

What is Disney 's highest grossing action movie ?


Question: How many inspections were sanitarian Joshua Rosa responsible for in 2010?

SELECT COUNT(T2.inspection_id) FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y', T2.inspection_date) = '2010' AND T1.first_name = 'Joshua' AND T1.last_name = 'Rosa'

How many inspections were sanitarian Joshua Rosa responsible for in 2010 ?

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


Question: List all keywords associated with the episode 'Take My Life, Please'.

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Take My Life, Please';

List all keywords associated with the episode ' Take My Life , Please ' .

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


Question: What percentage of podcasts are "technology" podcasts? List all of them.

SELECT CAST(SUM(CASE WHEN T1.category = 'technology' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.title) OR '%' "percentage" FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id

What percentage of podcasts are " technology " podcasts ? List all of them .

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


Question: Please name any three products that have been discontinued in the meat or poultry category.

SELECT T2.ProductName FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.Discontinued = 1 AND T1.CategoryName = 'Meat/Poultry' LIMIT 3

Please name any three products that have been discontinued in the meat or poultry category .

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


Question: What are the job titles, and range of salaries for jobs with maximum salary between 12000 and 18000?

SELECT job_title ,  max_salary - min_salary FROM jobs WHERE max_salary BETWEEN 12000 AND 18000

What are the job titles , and range of salaries for jobs with maximum salary between 12000 and 18000 ?

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


Question: What is the highest amount of bonus earned by the sales person in Canada?

SELECT T2.Bonus FROM SalesTerritory AS T1 INNER JOIN SalesPerson AS T2 ON T1.TerritoryID = T2.TerritoryID WHERE T1.CountryRegionCode = 'CA' ORDER BY T2.SalesQuota DESC LIMIT 1

What is the highest amount of bonus earned by the sales person in Canada ?

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


Question: What are the names of wrestlers and the elimination moves?

SELECT T2.Name ,  T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID

What are the names of wrestlers and the elimination moves ?

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


Question: For laboratory examinations take in 1984, list all patients below 50 years old with normal platelet level.

SELECT DISTINCT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.PLT BETWEEN 100 AND 400 AND STRFTIME('%Y', T2.Date) - STRFTIME('%Y', T1.Birthday) < 50 AND STRFTIME('%Y', T2.Date) = '1984'

For laboratory examinations take in 1984 , list all patients below 50 years old with normal platelet level .

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


Question: Tell me the total quantity of products bought by the customer called "Rodrick Heaney".

SELECT sum(t3.order_quantity) FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id WHERE t1.customer_name  =  "Rodrick Heaney"

Tell me the total quantity of products bought by the customer called " Rodrick Heaney " .

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


Question: Give me the reason, name of the drug, and duration of medication under encounter ID 23c293ec-dbae-4a22-896e-f12cf3c8bac3. Tell me if the patient is still alive.

SELECT T2.REASONDESCRIPTION, T2.DESCRIPTION , strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days , CASE WHEN T1.deathdate IS NULL THEN 'alive' ELSE 'dead' END FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.ENCOUNTER = '23c293ec-dbae-4a22-896e-f12cf3c8bac3'

Give me the reason , name of the drug , and duration of medication under encounter ID 23c293ec - dbae-4a22 - 896e - f12cf3c8bac3 . Tell me if the patient is still alive .

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


Question: When is the last day any resident moved in?

SELECT max(date_moved_in) FROM Residents

When is the last day any resident moved in ?


Question: Find the average and total capacity of dorms for the students with gender X.

SELECT avg(student_capacity) ,  sum(student_capacity) FROM dorm WHERE gender  =  'X'

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


Question: What is the average cost of procedures that physician John Wen was trained in?

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

What is the average cost of procedures that physician John Wen was trained in ?

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


Question: Show the names of companies and the number of employees they have

SELECT T3.Name ,  COUNT(*) FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID GROUP BY T3.Name

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


Question: Please list the top 3 cities with the most number of tweets posted in Canada.

SELECT T.City FROM ( SELECT T2.City, COUNT(T1.TweetID) AS num FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.Country = 'Canada' GROUP BY T2.City ) T ORDER BY T.num DESC LIMIT 3

Please list the top 3 cities with the most number of tweets posted in Canada .

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


Question: Show the number of transaction types.

SELECT count(DISTINCT transaction_type) FROM Financial_Transactions


Question: What are the birth date and birth place of the body builder with the highest total points?

SELECT T2.Birth_Date ,  T2.Birth_Place FROM body_builder AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Total DESC LIMIT 1

What are the birth date and birth place of the body builder with the highest total points ?

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


Question: How many posts were created by Daniel Vassallo?

SELECT COUNT(T1.Id) FROM users AS T1 INNER JOIN postHistory AS T2 ON T1.Id = T2.UserId WHERE T1.DisplayName = 'Daniel Vassallo'

How many posts were created by Daniel Vassallo ?


Question: What is the average high temperature for each day of week?

SELECT avg(high_temperature) ,  day_of_week FROM weekly_weather GROUP BY day_of_week

What is the average high temperature for each day of week ?

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


Question: How many times the circuits were held in Austria? Please give their location and coordinates.

SELECT DISTINCT location, lat, lng FROM circuits WHERE country = 'Austria'

How many times the circuits were held in Austria ? Please give their location and coordinates .

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


Question: What is the series code for Germany and what is its description?

SELECT T1.Seriescode, T1.Description FROM CountryNotes AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.ShortName = 'Germany'

What is the series code for Germany and what is its description ?

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


Question: What type has the most games?

SELECT gtype FROM Video_games GROUP BY gtype ORDER BY count(*) DESC LIMIT 1


Question: Among the donations with a portion using account credits redemption, how many of them are for projects created by teachers working in a public year-round school?

SELECT COUNT(T1.projectid) FROM projects AS T1 INNER JOIN donations AS T2 ON T1.projectid = T2.projectid WHERE T2.payment_included_acct_credit = 't' AND T1.school_year_round = 't'

Among the donations with a portion using account credits redemption , how many of them are for projects created by teachers working in a public year - round school ?

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


Question: Find the number of routes that have destination John F Kennedy International Airport.

SELECT count(*) FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.dst_apid WHERE T1.name  =  'John F Kennedy International Airport'

Find the number of routes that have destination John F Kennedy International Airport .

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


Question: What are all the distinct payment types?

SELECT DISTINCT payment_type_code FROM payments

What are all the distinct payment types ?


Question: What is the name of the plane that is flown the most often?

SELECT plane_name FROM pilotskills GROUP BY plane_name ORDER BY count(*) DESC LIMIT 1

What is the name of the plane that is flown the most often ?


Question: How many pilots whose planes are in Chicago?

SELECT 	count(DISTINCT T1.pilot_name) FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  'Chicago'

How many pilots whose planes are in Chicago ?

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


Question: What are the keywords of the episode which received the 2nd-highest number of votes?

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.votes NOT IN ( SELECT MAX(T1.votes) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id ) ORDER BY T1.votes DESC LIMIT 1

What are the keywords of the episode which received the 2nd - highest number of votes ?

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


Question: Who is the commander of Morgan Park district?

SELECT commander FROM District WHERE district_name = 'Morgan Park'

Who is the commander of Morgan Park district ?

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


Question: Please provide the full name of the conference where one of the papers of Jean-luc Hainaut were published.

SELECT DISTINCT T3.FullName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T2.Name = 'Jean-luc Hainaut' LIMIT 1

Please provide the full name of the conference where one of the papers of Jean - luc Hainaut were published .

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


Question: Return the decor of the room named "Recluse and defiance".

SELECT decor FROM Rooms WHERE roomName  =  "Recluse and defiance";

Return the decor of the room named " Recluse and defiance " .

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


Question: How much amount in total were claimed in the most recently created document?

SELECT sum(t1.amount_claimed) FROM claim_headers AS t1 JOIN claims_documents AS t2 ON t1.claim_header_id  =  t2.claim_id WHERE t2.created_date  =  (SELECT created_date FROM claims_documents ORDER BY created_date LIMIT 1)

How much amount in total were claimed in the most recently created document ?

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


Question: Eduardo Martins is a customer at which company?

SELECT company FROM customers WHERE first_name = "Eduardo" AND last_name = "Martins";

Eduardo Martins is a customer at which company ?

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


Question: On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com?

SELECT COUNT(projectid) FROM resources WHERE vendor_name = 'Quill.com' AND item_quantity BETWEEN 5 AND 10

On how many projects where the teacher has ordered between 5 to 10 items are from are from Quill.com ?

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


Question: Calculate the percentage of directors whose films grossed over $100 million.

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

Calculate the percentage of directors whose films grossed over $ 100 million .

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


Question: Provide the position status and IDs of professor who advised student ID "303".

SELECT T2.hasPosition, T1.p_id_dummy FROM advisedBy AS T1 INNER JOIN person AS T2 ON T1.p_id_dummy = T2.p_id WHERE T1.p_id = 303

Provide the position status and IDs of professor who advised student ID " 303 " .

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


Question: Find the names of customers who have bought by at least three distinct products.

SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN order_items AS T3 ON T2.order_id  =  T3.order_id GROUP BY T1.customer_id HAVING COUNT (DISTINCT T3.product_id)  >=  3

Find the names of customers who have bought by at least three distinct products .

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


Question: How many patients hadn't undergone a medical examination until at least a year following their initial hospital visit?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.Admission = '+' AND STRFTIME('%Y', T2.`Examination Date`) - STRFTIME('%Y', T1.`First Date`) >= 1

How many patients had n't undergone a medical examination until at least a year following their initial hospital visit ?

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


Question: Which advisors are advising more than 2 students?

SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING count(*)  >  2

Which advisors are advising more than 2 students ?


Question: Please provide a list of every volcano mountain in the province of Ecuador.

SELECT T1.Name FROM mountain AS T1 INNER JOIN geo_mountain AS T2 ON T1.Name = T2.Mountain INNER JOIN province AS T3 ON T3.Name = T2.Province WHERE T3.Name = 'Ecuador' AND T1.Type = 'volcano'

Please provide a list of every volcano mountain in the province of Ecuador .

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


Question: Find the id of the product ordered the most often on invoices.

SELECT Product_ID FROM INVOICES GROUP BY Product_ID ORDER BY COUNT(*) DESC LIMIT 1

Find the i d of the product ordered the most often on invoices .

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


Question: What are the names, color descriptions, and product descriptions for products in the 'Herbs' category?

SELECT T1.product_name ,  T2.color_description ,  T1.product_description FROM products AS T1 JOIN Ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE product_category_code  =  "Herbs"

What are the names , color descriptions , and product descriptions for products in the ' Herbs ' category ?

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


Question: How many taverns failed in July 2010?

SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T2.inspection_date) = '2010-07' AND T2.results = 'Fail' AND T1.facility_type = 'Restaurant'


Question: Find all information of on pilots whose age is less than 30.

SELECT * FROM PilotSkills WHERE age  <  30

Find all information of on pilots whose age is less than 30 .

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


Question: Show each school name, its budgeted amount, and invested amount in year 2002 or after.

SELECT T2.school_name ,  T1.budgeted ,  T1.invested FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T1.year  >=  2002

Show each school name , its budgeted amount , and invested amount in year 2002 or after .

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


Question: Between "Standford University" and "Massachusetts Institute of Technolgy", which organization had affiliated with more author.?

SELECT Affiliation FROM Author WHERE Affiliation IN ('Stanford University', 'Massachusetts Institute of Technology') GROUP BY Affiliation ORDER BY COUNT(Id) DESC LIMIT 1

Between " Standford University " and " Massachusetts Institute of Technolgy " , which organization had affiliated with more author . ?

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


Question: Which users have the highest number of views?

SELECT Id, DisplayName FROM users WHERE Views = ( SELECT MAX(Views) FROM users )

Which users have the highest number of views ?


Question: How many complaints on credit cards in the year 2016 were filed by male clients?

SELECT COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE strftime('%Y', T2.`Date received`) = '2016' AND T1.sex = 'Male' AND T2.Product = 'Credit card'

How many complaints on credit cards in the year 2016 were filed by male clients ?

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


Question: Find the ids of the nurses who are on call in block floor 1 and block code 1.

SELECT nurse FROM on_call WHERE blockfloor  =  1 AND blockcode  =  1

Find the ids of the nurses who are on call in block floor 1 and block code 1 .

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


Question: Show all staff role codes and the number of document processes for each role.

SELECT staff_role_code ,  count(*) FROM Staff_in_processes GROUP BY staff_role_code

Show all staff role codes and the number of document processes for each role .

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


Question: List down all of the film IDs with highest rental duration.

SELECT film_id FROM film WHERE rental_duration = ( SELECT MAX(rental_duration) FROM film )

List down all of the film IDs with highest rental duration .

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


Question: Which country had the highest value of indicator belongs to Private Sector & Trade: Exports topic? Please list the country name and indicator name.

SELECT T1.CountryName, T1.IndicatorName FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName WHERE T2.Topic = 'Private Sector & Trade: Exports' ORDER BY T1.Value DESC LIMIT 1

Which country had the highest value of indicator belongs to Private Sector & Trade : Exports topic ? Please list the country name and indicator name .

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


Question: Give the author's name of the books that cost 19 dollars and above.

SELECT DISTINCT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id INNER JOIN order_line AS T4 ON T4.book_id = T1.book_id WHERE T4.price > 19

Give the author 's name of the books that cost 19 dollars and above .

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


Question: What is the highest total price paid for an order?

SELECT UnitPrice * Quantity * (1 - Discount) AS THETOP FROM `Order Details` ORDER BY UnitPrice * Quantity * (1 - Discount) DESC LIMIT 1

What is the highest total price paid for an order ?


Question: State the nick name of the tallest player? If the player had left NHL, mention the last season he was with NHL.

SELECT nameNick, lastNHL FROM Master ORDER BY height DESC LIMIT 1

State the nick name of the tallest player ? If the player had left NHL , mention the last season he was with NHL .

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


Question: List all the streets with more than 10 restaurants in Alameda county.

SELECT T2.street_name FROM geographic AS T1 INNER JOIN location AS T2 ON T1.city = T2.city WHERE T1.county = 'alameda county' GROUP BY T2.street_name HAVING COUNT(T2.id_restaurant) > 10

List all the streets with more than 10 restaurants in Alameda county .

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


Question: What is the full name of the actor who has acted the most times in comedy films?

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

What is the full name of the actor who has acted the most times in comedy films ?

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


Question: What types of food are served at the 4 top-reviewed restaurants?

SELECT food_type FROM generalinfo WHERE review = ( SELECT MAX(review) FROM generalinfo ) LIMIT 4

What types of food are served at the 4 top - reviewed restaurants ?

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


Question: Find the id and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix?

SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Australian Grand Prix" INTERSECT SELECT T2.driverid ,  T3.forename FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid JOIN drivers AS T3 ON T2.driverid  =  T3.driverid WHERE T1.name = "Chinese Grand Prix"

Find the i d and forenames of drivers who participated both the races with name Australian Grand Prix and the races with name Chinese Grand Prix ?

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


Question: Show all company names with a movie directed in year 1999.

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

Show all company names with a movie directed in year 1999 .

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


Question: Find the number of rooms with a king bed.

SELECT count(*) FROM Rooms WHERE bedType  =  "King";

Find the number of rooms with a king bed .


Question: List down the bond type for molecules from molecule id TR000 to TR050.

SELECT T2.molecule_id, T2.bond_type FROM molecule AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id BETWEEN 'TR000' AND 'TR050'

List down the bond type for molecules from molecule i d TR000 to TR050 .

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


Question: Provide the players' names in both teams of the match that was held in June 2014.

SELECT T1.Player_Name FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id WHERE SUBSTR(T3.Match_Date, 1, 4) = '2014' AND SUBSTR(T3.Match_Date, 7, 1) = '6' LIMIT 2

Provide the players ' names in both teams of the match that was held in June 2014 .

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


Question: Find the county where produces the most number of wines with score higher than 90.

SELECT T1.County FROM APPELLATIONS AS T1 JOIN WINE AS T2 ON T1.Appelation  =  T2.Appelation WHERE T2.Score  >  90 GROUP BY T1.County ORDER BY count(*) DESC LIMIT 1

Find the county where produces the most number of wines with score higher than 90 .

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


Question: For each document, list the number of employees who have showed up in the circulation history of that document. List the document ids and number of employees.

SELECT document_id ,  count(DISTINCT employee_id) FROM Circulation_History GROUP BY document_id;

For each document , list the number of employees who have showed up in the circulation history of that document . List the document ids and number of employees .

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


Question: How many cities are in Australia?

SELECT count(*) FROM city AS T1 JOIN country AS T2 ON T1.country_id  =  T2.country_id WHERE T2.country  =  'Australia'


Question: What is the height and weight for coaches who have won awards in 1930?

SELECT T1.height, T1.weight FROM Master AS T1 INNER JOIN AwardsCoaches AS T2 ON T1.coachID = T2.coachID WHERE T2.year = '1930'

What is the height and weight for coaches who have won awards in 1930 ?

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


Question: How many cars on train no.1 have the roof open?

SELECT COUNT(id) FROM cars WHERE train_id = 1 AND roof = 'none'

How many cars on train no.1 have the roof open ?

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


Question: Calculate the percentage of times that the same word appears in a pair.

SELECT CAST(COUNT(CASE WHEN w1st = w2nd THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(w1st) FROM biwords

Calculate the percentage of times that the same word appears in a pair .


Question: How many appelations are in Napa Country?

SELECT count(*) FROM APPELLATIONS WHERE County  =  "Napa"

How many appelations are in Napa Country ?


Question: What are all the company names that have a book published by Alyson?

SELECT T1.company_name FROM culture_company AS T1 JOIN book_club AS T2 ON T1.book_club_id  =  T2.book_club_id WHERE T2.publisher  =  'Alyson'

What are all the company names that have a book published by Alyson ?

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


Question: Which country has more "value for money" gas stations? Please give a total number of "value for money" gas stations in each country.

SELECT Country , ( SELECT COUNT(GasStationID) FROM gasstations WHERE Segment = 'Value for money' ) FROM gasstations WHERE Segment = 'Value for money' GROUP BY Country ORDER BY COUNT(GasStationID) DESC LIMIT 1

Which country has more " value for money " gas stations ? Please give a total number of " value for money " gas stations in each country .

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


Question: Which rank is the most common among captains?

SELECT rank FROM captain GROUP BY rank ORDER BY count(*) DESC LIMIT 1

Which rank is the most common among captains ?


Question: Among the budgets for Advertising, list out top three which have the most budgeted amount?

SELECT budget_id FROM budget WHERE category = 'Advertisement' ORDER BY amount DESC LIMIT 3

Among the budgets for Advertising , list out top three which have the most budgeted amount ?

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


Question: What are the distinct warehouses that have boxes with Rocks or Scissors as contents?

SELECT DISTINCT warehouse FROM boxes WHERE CONTENTS  =  'Rocks' OR CONTENTS  =  'Scissors'

What are the distinct warehouses that have boxes with Rocks or Scissors as contents ?

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


Question: Whare the names, friends, and ages of all people who are older than the average age of a person?

SELECT DISTINCT T2.name ,  T2.friend ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.age  >  (SELECT avg(age) FROM person)

Whare the names , friends , and ages of all people who are older than the average age of a person ?

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


Question: How many different payment methods are there?

SELECT count(DISTINCT Payment_method_code) FROM Customer_Payment_Methods

How many different payment methods are there ?


Question: What is the minimum, maximum, and average seating for all tracks.

SELECT min(seating) ,  max(seating) ,  avg(seating) FROM track

What is the minimum , maximum , and average seating for all tracks .

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


Question: What is the fastest car made by Japan?

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


Question: What are the first names, office locations, and departments of all instructors, and also what are the descriptions of the courses they teach?

SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code

What are the first names , office locations , and departments of all instructors , and also what are the descriptions of the courses they teach ?

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


Question: What is the name of the state that Racine belongs to?

SELECT T2.Name FROM Address AS T1 INNER JOIN StateProvince AS T2 ON T1.StateProvinceID = T2.StateProvinceID WHERE T1.City = 'Racine'

What is the name of the state that Racine belongs to ?

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


Question: Please write down the footnote descriptions of Albania in 1981.

SELECT DISTINCT T1.Description FROM FootNotes AS T1 INNER JOIN Country AS T2 ON T1.Countrycode = T2.CountryCode WHERE T1.Year = 'YR1981' AND T2.ShortName = 'Albania'

Please write down the footnote descriptions of Albania in 1981 .

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


Question: For each position, what is the minimum time students spent practicing?

SELECT min(T2.HS) ,   T1.pPos FROM tryout AS T1 JOIN player AS T2 ON T1.pID  =  T2.pID GROUP BY T1.pPos

For each position , what is the minimum time students spent practicing ?


Question: List down 5 non English adventure movies from UK?

SELECT T1.movieid FROM movies2directors AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T1.genre = 'Adventure' AND T2.isEnglish = 'F' LIMIT 5

List down 5 non English adventure movies from UK ?

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


Question: What is the role of the employee named Koby?

SELECT T1.role_description FROM ROLES AS T1 JOIN Employees AS T2 ON T1.role_code = T2.role_code WHERE T2.employee_name = "Koby";

What is the role of the employee named Koby ?

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


Question: Report all advisors that advise more than 2 students.

SELECT Advisor FROM STUDENT GROUP BY Advisor HAVING COUNT(*)  >  2

Report all advisors that advise more than 2 students .


Question: Provide the categories and fines for the inspections done by Lisa Tillman in January 2014.

SELECT DISTINCT T4.category, T3.fine FROM inspection AS T1 INNER JOIN employee AS T2 ON T1.employee_id = T2.employee_id INNER JOIN violation AS T3 ON T1.inspection_id = T3.inspection_id INNER JOIN inspection_point AS T4 ON T3.point_id = T4.point_id WHERE T2.first_name = 'Lisa' AND T2.last_name = 'Tillman' AND strftime('%Y-%m', T1.inspection_date) = '2014-01'

Provide the categories and fines for the inspections done by Lisa Tillman in January 2014 .

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


Question: What is the average age of the people who participated in the winter season?

SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.season = 'Winter'

What is the average age of the people who participated in the winter season ?

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


Question: What is the twitter name of the legislator whose birthday was on 5/27/1946?

SELECT T2.twitter FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.birthday_bio = '1946-05-27'

What is the twitter name of the legislator whose birthday was on 5/27/1946 ?

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


Question: Show names of technicians and the number of machines they are assigned to repair.

SELECT T2.Name ,  COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_ID  =  T2.technician_ID GROUP BY T2.Name

Show names of technicians and the number of machines they are assigned to repair .

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


Question: Among papers that were published in 2005, provide the author name of paper with key words of "LOAD; IDE; SNP; haplotype; asso- ciation studies".

SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Year = 2005 AND T1.Keyword = 'KEY WORDS: LOAD IDE SNP haplotype asso- ciation studies'

Among papers that were published in 2005 , provide the author name of paper with key words of " LOAD ; IDE ; SNP ; haplotype ; asso- ciation studies " .

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


Question: Find all invoice dates corresponding to customers with first name Astrid and last name Gruber.

SELECT T2.InvoiceDate FROM CUSTOMER AS T1 JOIN INVOICE AS T2 ON T1.CustomerId  =  T2.CustomerId WHERE T1.FirstName  =  "Astrid" AND LastName  =  "Gruber"

Find all invoice dates corresponding to customers with first name Astrid and last name Gruber .

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


Question: List the names of editors in ascending order of age.

SELECT Name FROM editor ORDER BY Age ASC

List the names of editors in ascending order of age .

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


Question: Calculate the percentage of inspections with the fine for a minor food safety problem.

SELECT CAST(COUNT(CASE WHEN fine = 100 THEN inspection_id END) AS REAL) * 100 / COUNT(inspection_id) FROM violation

Calculate the percentage of inspections with the fine for a minor food safety problem .

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


Question: How many employees in total are in charge of the sales in the Eastern Region?

SELECT COUNT(T.EmployeeID) FROM ( SELECT T3.EmployeeID FROM Region AS T1 INNER JOIN Territories AS T2 ON T1.RegionID = T2.RegionID INNER JOIN EmployeeTerritories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.RegionDescription = 'Eastern' GROUP BY T3.EmployeeID ) T

How many employees in total are in charge of the sales in the Eastern Region ?

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


Question: Return the names of pilots who are younger than average, ordered by age ascending.

SELECT pilot_name FROM PilotSkills WHERE age  <  (SELECT avg(age) FROM PilotSkills) ORDER BY age

Return the names of pilots who are younger than average , ordered by age ascending .

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


Question: Show the account id and name with at least 4 transactions.

SELECT T1.account_id ,  T2.account_name FROM Financial_transactions AS T1 JOIN Accounts AS T2 ON T1.account_id  =  T2.account_id GROUP BY T1.account_id HAVING count(*)  >=  4

Show the account i d and name with at least 4 transactions .

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


Question: Among the english methods,please list the tokenized names of methods whose solutions need to be compiled.

SELECT NameTokenized FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE Lang = 'en' AND WasCompiled = 0

Among the english methods , please list the tokenized names of methods whose solutions need to be compiled .

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


Question: Which is the most valuable post in 2010? Please give its id and the owner's display name.

SELECT T2.OwnerUserId, T1.DisplayName FROM users AS T1 INNER JOIN posts AS T2 ON T1.Id = T2.OwnerUserId WHERE STRFTIME('%Y', T1.CreationDate) = '2010' ORDER BY T2.FavoriteCount DESC LIMIT 1

Which is the most valuable post in 2010 ? Please give its i d and the owner 's display name .

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


Question: show all years and the number of conferences in each year.

SELECT YEAR ,  count(*) FROM conference GROUP BY YEAR

show all years and the number of conferences in each year .


Question: Show the account id with most number of transactions.

SELECT account_id FROM Financial_transactions GROUP BY account_id ORDER BY count(*) DESC LIMIT 1

Show the account i d with most number of transactions .

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


Question: Give the last names of customers who have been to the bakery more than 10 times?

SELECT T2.LastName FROM receipts AS T1 JOIN customers AS T2 ON T1.CustomerId  =  T2.id GROUP BY T2.id HAVING count(*)  >  10

Give the last names of customers who have been to the bakery more than 10 times ?

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


Question: Among the bad superheroes, what is the percentage of female superheroes?

SELECT CAST(COUNT(CASE WHEN T3.gender = 'Female' THEN T1.id ELSE NULL END) AS REAL) * 100 / COUNT(T1.id) FROM superhero AS T1 INNER JOIN alignment AS T2 ON T1.alignment_id = T2.id INNER JOIN gender AS T3 ON T1.gender_id = T3.id WHERE T2.alignment = 'Bad'

Among the bad superheroes , what is the percentage of female superheroes ?

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


Question: What is the total number of projects that was created by the teachers that teach 3-5 grades in Boston Public School District?

SELECT COUNT(projectid) FROM projects WHERE school_district = 'Boston Public School District' AND grade_level = 'Grades 3-5'

What is the total number of projects that was created by the teachers that teach 3 - 5 grades in Boston Public School District ?

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


Question: Which faculty members are playing either Canoeing or Kayaking? Tell me their first names.

SELECT DISTINCT T1.lname FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID JOIN activity AS T3 ON T2.actid  =  T2.actid WHERE T3.activity_name  =  'Canoeing' OR T3.activity_name  =  'Kayaking'

Which faculty members are playing either Canoeing or Kayaking ? Tell me their first names .

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


Question: How many more black female victims than white female victims were discovered?

SELECT SUM(race = 'B') - SUM(race = 'W') FROM subjects WHERE gender = 'F'

How many more black female victims than white female victims were discovered ?


Question: How many times is married non sales employees against single non-sales employees?

SELECT CAST(SUM(CASE WHEN T1.MaritalStatus = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / SUM(CASE WHEN T1.MaritalStatus = 'S' THEN 1 ELSE 0 END) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'EM'

How many times is married non sales employees against single non - sales employees ?

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


Question: List the title of the books purchased by the customer named Zia Roizin.

SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id INNER JOIN cust_order AS T3 ON T3.order_id = T2.order_id INNER JOIN customer AS T4 ON T4.customer_id = T3.customer_id WHERE T4.first_name = 'Zia' AND T4.last_name = 'Roizin'

List the title of the books purchased by the customer named Zia Roizin .

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


Question: List all the name of organizations in order of the date formed.

SELECT organization_name FROM organizations ORDER BY date_formed ASC

List all the name of organizations in order of the date formed .

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


Question: Of the students with high salaries, how many took the computer vision course?

SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN registration AS T2 ON T2.student_id = T1.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T1.salary = 'high' AND T3.name = 'Computer Vision'

Of the students with high salaries , how many took the computer vision course ?

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


Question: Among the adult films, how many of them have a rental duration of fewer than 4 days?

SELECT COUNT(film_id) FROM film WHERE rating = 'NC-17' AND rental_duration < 4

Among the adult films , how many of them have a rental duration of fewer than 4 days ?

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


Question: Which city has hosted the most events?

SELECT T1.city FROM city AS T1 JOIN hosting_city AS T2 ON T1.city_id  =  T2.host_city GROUP BY T2.host_city ORDER BY count(*) DESC LIMIT 1


Question: What is the ship ID of shipments shipped to the city with the largest area?

SELECT T1.ship_id FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id ORDER BY T2.area DESC LIMIT 1

What is the ship ID of shipments shipped to the city with the largest area ?

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


Question: How many authors are of age above 30 for each gender?

SELECT count(*) ,  gender FROM author WHERE age  >  30 GROUP BY gender

How many authors are of age above 30 for each gender ?

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


Question: What is the full name of the Document Control Manager who is in charge of all Level 1 approved documents?

SELECT T1.FirstName, T1.MiddleName, T1.LastName FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Document AS T3 ON T3.Owner = T2.BusinessEntityID WHERE T2.JobTitle = 'Document Control Manager' AND T3.DocumentLevel = 1 AND T3.Status = 2 GROUP BY T1.FirstName, T1.MiddleName, T1.LastName

What is the full name of the Document Control Manager who is in charge of all Level 1 approved documents ?

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


Question: Show all branch names with the number of members in each branch registered after 2015.

SELECT T2.name ,  count(*) FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  >  2015 GROUP BY T2.branch_id

Show all branch names with the number of members in each branch registered after 2015 .

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


Question: List the games from the publisher "Activision".

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

List the games from the publisher " Activision " .


Question: What are the titles and platform names of all games?

SELECT T1.Title ,  T2.Platform_name FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID  =  T2.Platform_ID

What are the titles and platform names of all games ?

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


Question: List the document ids of documents with the status done and type Paper, which not shipped by the shipping agent named USPS.

SELECT document_id FROM Documents WHERE document_status_code  =  "done" AND document_type_code = "Paper" EXCEPT SELECT document_id FROM Documents JOIN Ref_Shipping_Agents ON Documents.shipping_agent_code = Ref_Shipping_Agents.shipping_agent_code WHERE Ref_Shipping_Agents.shipping_agent_name = "USPS";

List the document ids of documents with the status done and type Paper , which not shipped by the shipping agent named USPS .

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


Question: What is the number of employees?


Question: How long did Isadora Moen's allergy last? Tell me what kind of allergy she has.

SELECT CASE WHEN SUBSTR(T1.STOP, -2, 1) != '9' THEN SUBSTR(T1.STOP, LENGTH(T1.STOP) - 1) + 2000 END - CASE WHEN SUBSTR(T1.START, -2, 1) = '9' THEN SUBSTR(T1.START, LENGTH(T1.START) - 1) + 1900 ELSE SUBSTR(T1.START, LENGTH(T1.START) - 1) + 2000 END AS years , T1.DESCRIPTION FROM allergies AS T1 INNER JOIN patients AS T2 ON T2.patient = T1.PATIENT WHERE T1.STOP IS NOT NULL AND T1.START IS NOT NULL AND T2.first = 'Isadora' AND T2.last = 'Moen'

How long did Isadora Moen 's allergy last ? Tell me what kind of allergy she has .

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


Question: On 8/29/2013 at 6:14:01 PM, how many bikes were borrowed from San Jose Diridon Caltrain Station?

SELECT SUM(T1.dock_count - T2.bikes_available) FROM station AS T1 INNER JOIN status AS T2 ON T1.id = T2.station_id WHERE T1.name = 'San Jose Diridon Caltrain Station' AND T2.time = '2013/08/29 06:14:01'

On 8/29/2013 at 6:14:01 PM , how many bikes were borrowed from San Jose Diridon Caltrain Station ?

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


Question: In Scotland Premier League, which away team won the most during the 2010 season?

SELECT teamInfo.team_long_name FROM League AS leagueData INNER JOIN Match AS matchData ON leagueData.id = matchData.league_id INNER JOIN Team AS teamInfo ON matchData.away_team_api_id = teamInfo.team_api_id WHERE leagueData.name = 'Scotland Premier League' AND matchData.season = '2009/2010' AND matchData.away_team_goal - matchData.home_team_goal > 0 GROUP BY matchData.away_team_api_id ORDER BY COUNT(*) DESC LIMIT 1

In Scotland Premier League , which away team won the most during the 2010 season ?

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


Question: Indicate the slug and the itunes url of the podcast whose review content was written Can't stop listening.

SELECT slug, itunes_url FROM podcasts WHERE podcast_id IN ( SELECT podcast_id FROM reviews WHERE content = 'Can''t stop listening' )

Indicate the slug and the itunes url of the podcast whose review content was written Ca n't stop listening .

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


Question: Which countries have at least 3 cities?

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

Which countries have at least 3 cities ?


Question: What is the names of movies whose created year is after all movies directed by Steven Spielberg?

SELECT title FROM Movie WHERE YEAR  >  (SELECT max(YEAR) FROM Movie WHERE director  =  "Steven Spielberg")

What is the names of movies whose created year is after all movies directed by Steven Spielberg ?

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


Question: List the name of the pilots who have flied for both a company that mainly provide 'Cargo' services and a company that runs 'Catering services' activities.

SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T1.principal_activities  =  'Cargo' INTERSECT SELECT T2.pilot FROM operate_company AS T1 JOIN flight AS t2 ON T1.id  =  T2.company_id WHERE T1.principal_activities  =  'Catering services'

List the name of the pilots who have flied for both a company that mainly provide ' Cargo ' services and a company that runs ' Catering services ' activities .

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


Question: Provide the alias and elevation of the city with zip code 1028.

SELECT T1.alias, T2.elevation FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 1028

Provide the alias and elevation of the city with zip code 1028 .

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


Question: Please list the location coordinates of all the Galaxy Note 2 devices when an event happened.

SELECT T1.longitude, T1.latitude FROM events AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.device_model = 'Galaxy Note 2'

Please list the location coordinates of all the Galaxy Note 2 devices when an event happened .

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


Question: Which team wins the toss during the match ID 336011, and can you tell me whether they decided to bat or field?

SELECT T2.Toss_Name, T1.Toss_Decide, T1.Toss_Winner FROM `Match` AS T1 INNER JOIN Toss_Decision AS T2 ON T1.Toss_Decide = T2.Toss_Id WHERE T1.Match_Id = '336011'

Which team wins the toss during the match ID 336011 , and can you tell me whether they decided to bat or field ?

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


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

SELECT title FROM Movie WHERE YEAR  =  (SELECT max(YEAR) FROM Movie)

What is the name of the most recent movie ?


Question: How many customers do not have a listed payment method?

SELECT count(*) FROM Customers WHERE customer_id NOT IN ( SELECT customer_id FROM Customer_Payment_Methods )

How many customers do not have a listed payment method ?

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


Question: Which city does staff with first name as Janessa and last name as Sawayn live?

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

Which city does staff with first name as Janessa and last name as Sawayn live ?

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


Question: Find the states where have some college students in tryout.

SELECT DISTINCT state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName

Find the states where have some college students in tryout .

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


Question: What is the name of the publisher of the book "The Illuminati"?

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Illuminati'

What is the name of the publisher of the book " The Illuminati " ?

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


Question: How many animators does Movie No. 129 have?

SELECT COUNT(movie_id) FROM movie_crew WHERE movie_id = 129 AND job = 'Animation'

How many animators does Movie No . 129 have ?


Question: Which football player has the shortest height?

SELECT player_name FROM player ORDER BY height ASC LIMIT 1

Which football player has the shortest height ?


Question: What is the best selling colour for HL Mountain Frame, 42?

SELECT IIF(SUM(IIF(T1.Name = 'HL Mountain Frame - Silver, 42', T2.SalesID, 0)) - SUM(IIF(T1.Name = 'HL Mountain Frame - Black, 42', T2.SalesID, 0)) > 0, 'Silver', 'Black') FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID

What is the best selling colour for HL Mountain Frame , 42 ?

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


Question: Find the number of distinct bed types available in this inn.

SELECT count(DISTINCT bedType) FROM Rooms;

Find the number of distinct bed types available in this inn .


Question: Please list the business ID of the Yelp_Business with the highest Elitestar rating under the category "Food".

SELECT T2.business_id FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id WHERE T1.category_name LIKE 'Food' ORDER BY T3.stars DESC LIMIT 1

Please list the business ID of the Yelp_Business with the highest Elitestar rating under the category " Food " .

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


Question: How many users in Mubi give the movie "White Night Wedding for 5"?

SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.rating_score = 5 AND T2.movie_title = 'White Night Wedding'

How many users in Mubi give the movie " White Night Wedding for 5 " ?

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


Question: How many models of Ford Maverick were produced?

SELECT COUNT(DISTINCT T2.model_year) FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'ford maverick'

How many models of Ford Maverick were produced ?

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


Question: Give the location of the university ID 112.

SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.id = 112

Give the location of the university ID 112 .


Question: List by their id all customers who have a debit balance in their accounts.

SELECT c_custkey FROM customer WHERE c_acctbal < 0

List by their i d all customers who have a debit balance in their accounts .


Question: List the cities where the product 'Mishi Kobe Niku' were shipped to.

SELECT T1.ShipCity FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T3.ProductName = 'Mishi Kobe Niku'

List the cities where the product ' Mishi Kobe Niku ' were shipped to .

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


Question: Please give the order number and product name of the order which has the lowest unit price.

SELECT T1.OrderNumber, T2.`Product Name` FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID WHERE REPLACE(T1.`Unit Price`, ',', '') = ( SELECT REPLACE(T1.`Unit Price`, ',', '') FROM `Sales Orders` AS T1 INNER JOIN Products AS T2 ON T2.ProductID = T1._ProductID ORDER BY REPLACE(T1.`Unit Price`, ',', '') LIMIT 1 )

Please give the order number and product name of the order which has the lowest unit price .

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


Question: There was only one tip that user No. 69722 gave to the Yelp business, what was the ratings of that business?

SELECT T2.stars FROM Tips AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.user_id = 69722

There was only one tip that user No . 69722 gave to the Yelp business , what was the ratings of that business ?

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


Question: Please list the notes for Aruba on the indicators under the topic of Environment: Energy production & use.

SELECT T2.Description FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T1.ShortName = 'Aruba' AND T3.Topic = 'Environment: Energy production & use'

Please list the notes for Aruba on the indicators under the topic of Environment : Energy production & use .

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


Question: How many papers were published in International Workshop on Inductive Logic Programming from 2001 to 2009?

SELECT COUNT(T1.Id) FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.FullName = 'International Workshop on Inductive Logic Programming' AND T1.Year BETWEEN 2001 AND 2009

How many papers were published in International Workshop on Inductive Logic Programming from 2001 to 2009 ?

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


Question: What is the id and last name of the driver with the longest laptime?

SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN laptimes AS T2 ON T1.driverid = T2.driverid ORDER BY T2.milliseconds DESC LIMIT 1

What is the i d and last name of the driver with the longest laptime ?

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


Question: What is the gender of the teacher with last name "Medhurst"?

SELECT gender FROM TEACHERS WHERE last_name  =  "Medhurst"

What is the gender of the teacher with last name " Medhurst " ?

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


Question: State the male population for all zip code which were under the Berlin, NH CBSA.

SELECT T2.male_population FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_name = 'Berlin, NH' GROUP BY T2.male_population

State the male population for all zip code which were under the Berlin , NH CBSA .

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


Question: How many professors who are from either Accounting or Biology department?

SELECT count(*) FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T2.dept_name  =  'Accounting' OR T2.dept_name  =  'Biology'

How many professors who are from either Accounting or Biology department ?

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


Question: Among the products under the office supplies category, what is the product that made the highest sales in the Central region?

SELECT T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.Category = 'Office Supplies' AND T2.Region = 'Central' ORDER BY T1.Sales DESC LIMIT 1

Among the products under the office supplies category , what is the product that made the highest sales in the Central region ?

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


Question: Who made the latest order?

SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id ORDER BY t2.order_date DESC LIMIT 1


Question: Which customers use "Cash" for payment method? Return the customer names.

SELECT customer_name FROM customers WHERE payment_method  =  "Cash"

Which customers use " Cash " for payment method ? Return the customer names .

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


Question: How much is the Volkswagen Dasher with 14.1 mph acceleration?

SELECT T2.price FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.car_name = 'volkswagen dasher' AND T1.acceleration = '14.1'

How much is the Volkswagen Dasher with 14.1 mph acceleration ?

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


Question: How many members have education major in the College of Education & Human Services?

SELECT COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Member' AND T2.major_name LIKE '%Education%' AND T2.college = 'College of Education & Human Services'

How many members have education major in the College of Education & Human Services ?

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


Question: Find all the policy type codes associated with the customer "Dayana Robel"

SELECT policy_type_code FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.customer_details  =  "Dayana Robel"

Find all the policy type codes associated with the customer " Dayana Robel "

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


Question: Among the users who obtained the "Organizer" badges, calculate the percentage of users who are teenagers.

SELECT CAST(SUM(IIF(T2.Age BETWEEN 13 AND 18, 1, 0)) AS REAL) * 100 / COUNT(T1.Id) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.`Name` = 'Organizer'

Among the users who obtained the " Organizer " badges , calculate the percentage of users who are teenagers .

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


Question: Among all the shipments to Florida, what is the percentage of the shipment to Jacksonville?

SELECT CAST(SUM(CASE WHEN T2.city_name = 'Jacksonville' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'Florida'

Among all the shipments to Florida , what is the percentage of the shipment to Jacksonville ?

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


Question: Who are the sales representatives in New York City? List their full names.

SELECT t1.lastName, t1.firstName FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t2.city = 'NYC' AND t1.jobTitle = 'Sales Rep'

Who are the sales representatives in New York City ? List their full names .

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


Question: Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971?

SELECT T1.playerID FROM draft AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID WHERE T2.award = 'Rookie of the Year' AND T1.draftYear = 1971 AND T1.draftRound = 2

Which player selected by Portland in 2nd draftRound won Rookie of the Year in 1971 ?

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


Question: What is the percentage of businesses with "Good for Kids" attribute over the other attributes?

SELECT CAST(SUM(CASE WHEN attribute_name = 'Good for Kids' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.business_id) FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_value = 'true'

What is the percentage of businesses with " Good for Kids " attribute over the other attributes ?

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


Question: How many executive producers are the nominees for the award of "Outstanding Animated Program (For Programming Less Than One Hour)"?

SELECT COUNT(*) FROM Award WHERE role = 'executive producer' AND result = 'Nominee' AND award = 'Outstanding Animated Program (For Programming Less Than One Hour)';

How many executive producers are the nominees for the award of " Outstanding Animated Program ( For Programming Less Than One Hour ) " ?

O O B-VALUE I-VALUE O O B-VALUE 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


Question: How many classes are professor whose last name is Graztevski has?

SELECT count(*) FROM employee AS T1 JOIN CLASS AS T2 ON T1.EMP_NUM  =  T2.PROF_NUM WHERE T1.EMP_LNAME  =  'Graztevski'

How many classes are professor whose last name is Graztevski has ?

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


Question: Return the ids and details of clients who have attended a meeting or had an invoice.

SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN meetings AS T2 ON T1.client_id  =  T2.client_id UNION SELECT T1.client_id ,  T1.client_details FROM Clients AS T1 JOIN invoices AS T2 ON T1.client_id  =  T2.client_id

Return the ids and details of clients who have attended a meeting or had an invoice .

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


Question: In which country does Johns Hopkins University located?

SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'Johns Hopkins University'

In which country does Johns Hopkins University located ?

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


Question: Among all the suppliers providing the part "hot spring dodger dim light", how many of them are in Europe?

SELECT COUNT(T1.r_regionkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.s_nationkey WHERE T1.r_name = 'EUROPE'

Among all the suppliers providing the part " hot spring dodger dim light " , how many of them are in Europe ?

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


Question: Please show the most common type of ships.

SELECT TYPE FROM ship GROUP BY TYPE ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common type of ships .


Question: Which headphone model has the largest quantity of stock across all the stores?

SELECT t1.model FROM headphone AS t1 JOIN stock AS t2 ON t1.headphone_id  =  t2.headphone_id GROUP BY t1.model ORDER BY sum(t2.quantity) DESC LIMIT 1

Which headphone model has the largest quantity of stock across all the stores ?

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


Question: List the products ordered by customers in Coachella.

SELECT DISTINCT T3.`Product Name` FROM west_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.City = 'Coachella'

List the products ordered by customers in Coachella .

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


Question: Among the recipes with alcohol content over 10, which recipe takes the longest to prepare?

SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T2.alcohol > 10 ORDER BY T1.prep_min DESC LIMIT 1

Among the recipes with alcohol content over 10 , which recipe takes the longest to prepare ?

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


Question: List the name of all awards along with the award category, nominated by Marc Wilmore.

SELECT award_id, award_category FROM Award WHERE person = 'Marc Wilmore';

List the name of all awards along with the award category , nominated by Marc Wilmore .

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


Question: What are the maximum and minimum week on top of all volumes?

SELECT max(Weeks_on_Top) ,  min(Weeks_on_Top) FROM volume

What are the maximum and minimum week on top of all volumes ?

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


Question: List all the customers with name containing the word 'Group'.

SELECT T FROM ( SELECT IIF(`Customer Names` LIKE '%Group%', `Customer Names`, NULL) AS T FROM Customers ) WHERE T IS NOT NULL

List all the customers with name containing the word ' Group ' .

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


Question: What is the total sales of 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' in the Central region?

SELECT SUM(T1.Sales) FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Avery Hi-Liter EverBold Pen Style Fluorescent Highlighters, 4/Pack' AND T2.Region = 'Central'

What is the total sales of ' Avery Hi - Liter EverBold Pen Style Fluorescent Highlighters , 4 / Pack ' in the Central region ?

O 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 I-VALUE I-VALUE O O O B-VALUE B-COLUMN O


Question: What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents?

SELECT District_name ,  City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000

What are the district names and city populations for all districts that between 200,000 and 2,000,000 residents ?

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


Question: How many employees is a UK citizen and are they all covering the same region?

SELECT COUNT(T1.EmployeeID), T3.RegionID FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.Country = 'UK' GROUP BY T3.RegionID

How many employees is a UK citizen and are they all covering the same region ?

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


Question: What is the name of the product with the color description 'yellow'?

SELECT T1.product_name FROM products AS T1 JOIN ref_colors AS T2 ON T1.color_code  =  T2.color_code WHERE T2.color_description  =  'yellow'

What is the name of the product with the color description ' yellow ' ?

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


Question: What is the total rating of channel for each channel owner?

SELECT sum(Rating_in_percent) ,  OWNER FROM channel GROUP BY OWNER

What is the total rating of channel for each channel owner ?


Question: What are the details of the shops that can be accessed by walk?

SELECT T1.Shop_Details FROM SHOPS AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Shop_ID  =  T2.Tourist_Attraction_ID WHERE T2.How_to_Get_There  =  "walk"

What are the details of the shops that can be accessed by walk ?

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


Question: What is the average writing score of each of the schools managed by Ricci Ulrich? List the schools and the corresponding average writing scores.

SELECT T2.School, T1.AvgScrWrite FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.AdmFName1 = 'Ricci' AND T2.AdmLName1 = 'Ulrich'

What is the average writing score of each of the schools managed by Ricci Ulrich ? List the schools and the corresponding average writing scores .

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


Question: What is the date of enrollment of the course named "Spanish"?

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"

What is the date of enrollment of the course named " Spanish " ?

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


Question: Return all platform names and corresponding market districts.

SELECT Platform_name ,  Market_district FROM platform

Return all platform names and corresponding market districts .

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


Question: What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds?

SELECT CAST(SUM(CASE WHEN T2.weight < 70000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'wholesaler'

What is the percentage of wholesaler customers who have shipment weight of not greater than 70000 pounds ?

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


Question: For all trips which took less 5 minutes, state the station name where the bike were borrowed and returned. Indicate mean temperature of the day.

SELECT T1.start_station_name, T1.end_station_name, T2.mean_temperature_f FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T1.duration < 300

For all trips which took less 5 minutes , state the station name where the bike were borrowed and returned . Indicate mean temperature of the day .

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


Question: Please list three types of film along with their IDs and the latest update.

SELECT DISTINCT name, category_id, last_update FROM category LIMIT 3

Please list three types of film along with their IDs and the latest update .

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


Question: What is the name and category of the app with the highest amount of -1 sentiment polarity score?

SELECT DISTINCT T1.App, T1.Category FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment_Polarity = '-1.0'

What is the name and category of the app with the highest amount of -1 sentiment polarity score ?

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


Question: The person named Al Jean achieved the Primetime Emmy Award category in 2009, which episode did AI Jean achieve?

SELECT T2.episode_id FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id WHERE SUBSTR(T1.year, 1, 4) = '2009' AND T1.person = 'Al Jean' AND T1.award_category = 'Primetime Emmy';

The person named Al Jean achieved the Primetime Emmy Award category in 2009 , which episode did AI Jean achieve ?

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


Question: What are the usernames and passwords of users that have the most common role?

SELECT user_name ,  password FROM users GROUP BY role_code ORDER BY count(*) DESC LIMIT 1

What are the usernames and passwords of users that have the most common role ?

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


Question: List the dates of debates with number of audience bigger than 150

SELECT Date FROM debate WHERE Num_of_Audience  >  150

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


Question: How many crew members worked as producer in the movie "Pirates of the Caribbean: At World's End"?

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

How many crew members worked as producer in the movie " Pirates of the Caribbean : At World 's End " ?

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


Question: What is the order date of each booking?

What is the order date of each booking ?


Question: Who is the heaviest athlete from Russia?

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

Who is the heaviest athlete from Russia ?


Question: List the name and the number of enrolled student for each course.

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

List the name and the number of enrolled student for each course .


Question: What is the locale of the language of the page titled "Asclepi"?

SELECT T2.locale FROM pages AS T1 INNER JOIN langs AS T2 ON T1.lid = T2.lid WHERE T1.title = 'Asclepi'

What is the locale of the language of the page titled " Asclepi " ?

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


Question: Who is the top sales person who achived highest percentage of projected sales quota in 2013?

SELECT BusinessEntityID FROM SalesPerson WHERE BusinessEntityID IN ( SELECT BusinessEntityID FROM SalesPersonQuotaHistory WHERE STRFTIME('%Y', QuotaDate) = '2013' ) ORDER BY CAST(SalesLastYear AS REAL) / SalesQuota DESC LIMIT 1

Who is the top sales person who achived highest percentage of projected sales quota in 2013 ?

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


Question: What is the membership card held by both members living in Hartford and ones living in Waterbury address?

SELECT membership_card FROM member WHERE address  =  'Hartford' INTERSECT SELECT membership_card FROM member WHERE address  =  'Waterbury'

What is the membership card held by both members living in Hartford and ones living in Waterbury address ?

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


Question: What is the ratio of Asian male graduates to Asian female graduates from Harvard University in 2013?

SELECT CAST(SUM(CASE WHEN T2.Gender = 'M' THEN T2.grad_cohort ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.Gender = 'F' THEN T2.grad_cohort ELSE 0 END) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Harvard University' AND T2.year = 2013 AND T2.race = 'A'

What is the ratio of Asian male graduates to Asian female graduates from Harvard University in 2013 ?

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


Question: How many short cars are in the shape of hexagon?

SELECT COUNT(id) FROM cars WHERE shape = 'hexagon' AND len = 'short'

How many short cars are in the shape of hexagon ?

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


Question: List all the pairs of buyer first names and product names.

SELECT T1.customer_first_name ,  T4.product_name FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id  =  T2.customer_id JOIN Order_items AS T3 ON T2.order_id  =  T3.order_id JOIN Products AS T4 ON T3.product_id  =  T4.product_id

List all the pairs of buyer first names and product names .

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


Question: How many disabled male students joined an organization?

SELECT COUNT(T1.name) FROM disabled AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name INNER JOIN enlist AS T3 ON T3.name = T2.name

How many disabled male students joined an organization ?


Question: What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix?

SELECT CAST(SUM(IIF(T1.time IS NOT NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.resultId) FROM results AS T1 INNER JOIN races AS T2 ON T1.raceId = T2.raceId WHERE T2.name = 'Australian Grand Prix' AND T2.year = 2008

What is the rate of drivers completing all the laps in the 2008 Australian Grand Prix ?

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


Question: Please list the phone numbers of the schools with the top 3 SAT excellence rate.

SELECT T1.Phone FROM schools AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds ORDER BY CAST(T2.NumGE1500 AS REAL) / T2.NumTstTakr DESC LIMIT 3

Please list the phone numbers of the schools with the top 3 SAT excellence rate .

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


Question: What is the total amount of products purchased before 2018-03-17 07:13:53?

SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id  =  t2.order_id WHERE t1.order_date  <  "2018-03-17 07:13:53"

What is the total amount of products purchased before 2018 - 03 - 17 07:13:53 ?

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


Question: Show order ids and the number of products in each order.

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

Show order ids and the number of products in each order .

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


Question: How old was Mrs. Laronda Bernier at the time of her most recent medical encounter?

SELECT T2.DATE - T1.birthdate AS age FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Laronda' AND T1.last = 'Bernier' ORDER BY T2.DATE DESC LIMIT 1

How old was Mrs. Laronda Bernier at the time of her most recent medical encounter ?

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


Question: How many games are there?


Question: What is the average age for each city and what are those cities?

SELECT avg(age) ,  city_code FROM student GROUP BY city_code

What is the average age for each city and what are those cities ?

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


Question: Name the coin that has the highest market capitalization for all transactions in 2018.

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date LIKE '2018%' AND T2.market_cap = ( SELECT MAX(market_cap) FROM historical WHERE STRFTIME('%Y', date) = '2018' )

Name the coin that has the highest market capitalization for all transactions in 2018 .

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


Question: How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual?

SELECT COUNT(DISTINCT T2.School) FROM satscores AS T1 INNER JOIN schools AS T2 ON T1.cds = T2.CDSCode WHERE T2.Virtual = 'F' AND T1.AvgScrMath > 400

How many schools with an average score in Math greater than 400 in the SAT test are exclusively virtual ?

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


Question: List the achievement type code, achievement details and the date of the achievements.

SELECT achievement_type_code ,  achievement_details ,  date_achievement FROM Achievements

List the achievement type code , achievement details and the date of the achievements .

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


Question: For businesses with long length reviews, which state are they located?

SELECT DISTINCT T1.state FROM Business AS T1 INNER JOIN Tips AS T2 ON T1.business_id = T2.business_id WHERE T2.tip_length = 'Long'

For businesses with long length reviews , which state are they located ?

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


Question: What are the famous titles of artists who do not have any volumes?

SELECT Famous_Title FROM artist WHERE Artist_ID NOT IN(SELECT Artist_ID FROM volume)

What are the famous titles of artists who do not have any volumes ?

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


Question: List the first name, last name and team name of players who are drafted from 'Seattle' between year 1965 to 1970.

SELECT DISTINCT T1.firstName, T1.lastName, T3.name FROM players AS T1 INNER JOIN draft AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T2.tmID = T3.tmID WHERE T2.draftFrom = 'Seattle' AND T2.draftYear BETWEEN 1965 AND 1970

List the first name , last name and team name of players who are drafted from ' Seattle ' between year 1965 to 1970 .

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


Question: Which city was the host of 1936 Winter Olympic Games?

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

Which city was the host of 1936 Winter Olympic Games ?

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


Question: What is the first names of the professors from the history department who do not teach a class.

SELECT T1.emp_fname FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T2.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' EXCEPT SELECT T4.emp_fname FROM employee AS T4 JOIN CLASS AS T5 ON T4.emp_num  =  T5.prof_num

What is the first names of the professors from the history department who do not teach a class .

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


Question: List the patient ids whose disease has the most occurrences.

SELECT T1.patient FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT INNER JOIN all_prevalences AS T3 ON T3.ITEM = T2.DESCRIPTION ORDER BY T3.OCCURRENCES DESC LIMIT 1

List the patient ids whose disease has the most occurrences .


Question: Show the distinct addresses of buildings.

Show the distinct addresses of buildings .


Question: Indicate the top source of funds received in September 2019 based on their amount.

SELECT source FROM income WHERE date_received BETWEEN '2019-09-01' and '2019-09-30' ORDER BY source DESC LIMIT 1

Indicate the top source of funds received in September 2019 based on their amount .

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


Question: In cities that do not implement daylight savings, what is the total number of cities?

SELECT COUNT(T1.area_code) FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.daylight_savings = 'No'

In cities that do not implement daylight savings , what is the total number of cities ?

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


Question: How many male users have a Galaxy Note 3?

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 = 'Galaxy Note 3' AND T1.gender = 'M'

How many male users have a Galaxy Note 3 ?


Question: What is the age of the patient with hypertension named Giovanni Russel?

SELECT strftime('%Y', T2.deathdate) - strftime('%Y', T2.birthdate) AS age FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Giovanni' AND T2.last = 'Russel' AND T1.DESCRIPTION = 'Hypertension'

What is the age of the patient with hypertension named Giovanni Russel ?

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


Question: What is the name of the publisher that has published the most puzzle games?

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

What is the name of the publisher that has published the most puzzle games ?

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


Question: List the attribute value of the superhero named Aquababy.

SELECT T2.attribute_value FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id WHERE T1.superhero_name = 'Aquababy'

List the attribute value of the superhero named Aquababy .

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


Question: Among students registered for the most difficult course, list the students' full names who got grade A.

SELECT T1.f_name, T1.l_name FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T2.grade = 'A' ORDER BY T3.diff DESC LIMIT 1

Among students registered for the most difficult course , list the students ' full names who got grade A.

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


Question: What is the third least common genre?

SELECT T2.genre_name FROM movie_genres AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.genre_id GROUP BY T2.genre_id ORDER BY COUNT(T1.movie_id) LIMIT 2, 1


Question: What are the names of players and the corresponding clubs that they are in?

SELECT T2.Name ,  T1.Name FROM club AS T1 JOIN player AS T2 ON T1.Club_ID  =  T2.Club_ID

What are the names of players and the corresponding clubs that they are in ?

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


Question: Please list the location coordinates of the circuits whose lap record is 1:29.488.

SELECT T3.lat, T3.lng FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId INNER JOIN circuits AS T3 on T2.circuitId = T3.circuitId WHERE T1.time = '1:29.488'

Please list the location coordinates of the circuits whose lap record is 1:29.488 .

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


Question: What are the names of all universities in ascending order of reputation points?

SELECT T1.university_name FROM University AS T1 JOIN Overall_ranking AS T2 ON T1.university_id  =  T2.university_id ORDER BY T2.reputation_point

What are the names of all universities in ascending order of reputation points ?

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


Question: Find the names of movies that are played in any theater and the name of the corresponding theater.

SELECT T1.title ,  T2.name FROM movies AS T1 JOIN movietheaters AS T2 ON T1.code  =  T2.movie

Find the names of movies that are played in any theater and the name of the corresponding theater .

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


Question: Which winning team in the final round of the postseason series games against the LAL won more than 60 games in the NBA league during the year 1996?

SELECT DISTINCT T2.tmID FROM series_post AS T1 INNER JOIN teams AS T2 ON T1.tmIDWinner = T2.tmID WHERE T2.won > 60 AND T1.year = 1996 AND T1.round = 'CSF' AND T1.tmIDLoser = 'LAL'

Which winning team in the final round of the postseason series games against the LAL won more than 60 games in the NBA league during the year 1996 ?

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


Question: How many shipments take place on each planet?

SELECT T2.Name ,  count(*) FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet;

How many shipments take place on each planet ?


Question: List the names of institutions in ascending alphabetical order.

SELECT Name FROM institution ORDER BY Name ASC

List the names of institutions in ascending alphabetical order .


Question: List the information of all instructors ordered by their salary in ascending order.

SELECT * FROM instructor ORDER BY salary

List the information of all instructors ordered by their salary in ascending order .

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


Question: Find the name of the oldest pilot for each type of plane, and order the results by plane name.

SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name ORDER BY plane_name

Find the name of the oldest pilot for each type of plane , and order the results by plane name .

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


Question: How much dollars was a Bitcoin worth on 2013/4/28 according to the coin market?

SELECT T2.market_cap FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.date = '2013-04-28' AND T1.name = 'Bitcoin'

How much dollars was a Bitcoin worth on 2013/4/28 according to the coin market ?

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


Question: What are the titles of all albums that start with A in alphabetical order?

SELECT title FROM albums WHERE title LIKE 'A%' ORDER BY title;

What are the titles of all albums that start with A in alphabetical order ?

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


Question: Return the code of the document type that is most common.

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

Return the code of the document type that is most common .


Question: Count the number of payments.


Question: Of all the carcinogenic molecules, which one has the most double bonds?

SELECT T.molecule_id FROM ( SELECT T3.molecule_id, COUNT(T1.bond_type) FROM bond AS T1 INNER JOIN molecule AS T3 ON T1.molecule_id = T3.molecule_id WHERE T3.label = '+' AND T1.bond_type = '=' GROUP BY T3.molecule_id ORDER BY COUNT(T1.bond_type) DESC LIMIT 1 ) AS T

Of all the carcinogenic molecules , which one has the most double bonds ?


Question: Find the list of cities that no customer is living in.

SELECT city FROM addresses WHERE city NOT IN ( SELECT DISTINCT t3.city FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id)

Find the list of cities that no customer is living in .

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


Question: In books published by Ace Book, what is the percentage of English books published?

SELECT CAST(SUM(CASE WHEN T1.language_name = 'English' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM book_language AS T1 INNER JOIN book AS T2 ON T1.language_id = T2.language_id INNER JOIN publisher AS T3 ON T3.publisher_id = T2.publisher_id WHERE T3.publisher_name = 'Ace Book'

In books published by Ace Book , what is the percentage of English books published ?

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


Question: Among the movies with drama genre, what is the percentage of the actors with net worth greater than $400,000,000.00?

SELECT SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) > 400000000 THEN 1 ELSE 0 END) - SUM(CASE WHEN CAST(REPLACE(REPLACE(T3.NetWorth, ',', ''), '$', '') AS REAL) < 400000000 THEN 1 ELSE 0 END) FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T1.Genre = 'Drama'

Among the movies with drama genre , what is the percentage of the actors with net worth greater than $ 400,000,000.00 ?

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


Question: What is the name of all tracks in the Rock genre?

SELECT T2.name FROM genres AS T1 JOIN tracks AS T2 ON T1.id = T2.genre_id WHERE T1.name = "Rock";

What is the name of all tracks in the Rock genre ?

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


Question: Where can I find the office of the President of the company?

SELECT t2.addressLine1, t2.addressLine2 FROM employees AS t1 INNER JOIN offices AS t2 ON t1.officeCode = t2.officeCode WHERE t1.jobTitle = 'President'

Where can I find the office of the President of the company ?


Question: Which students identify their gender as "F" or "M"? Give me their last names.

SELECT Last_Name FROM Students WHERE Gender_MFU  =  "F" OR Gender_MFU  =  "M"

Which students identify their gender as " F " or " M " ? Give me their last names .

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


Question: Find the ids of orders whose status is 'Success'.

SELECT actual_order_id FROM actual_orders WHERE order_status_code  =  'Success'

Find the ids of orders whose status is ' Success ' .

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


Question: Find the name of dorms that can accommodate more than 300 students.

SELECT dorm_name FROM dorm WHERE student_capacity  >  300

Find the name of dorms that can accommodate more than 300 students .

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