Question: Calculate the average of object samples for the image.

SELECT CAST(COUNT(OBJ_SAMPLE_ID) AS REAL) / COUNT(DISTINCT IMG_ID) FROM IMG_OBJ

Calculate the average of object samples for the image .


Question: What is the id of the trip that started from the station with the highest dock count?

SELECT T1.id FROM trip AS T1 JOIN station AS T2 ON T1.start_station_id  =  T2.id ORDER BY T2.dock_count DESC LIMIT 1

What is the i d of the trip that started from the station with the highest dock count ?

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


Question: How many different teams have had eliminated wrestlers?

SELECT COUNT (DISTINCT team) FROM elimination

How many different teams have had eliminated wrestlers ?


Question: What is the list of program origins ordered alphabetically?

SELECT origin FROM program ORDER BY origin

What is the list of program origins ordered alphabetically ?


Question: What are the ids and names of all start stations that were the beginning of at least 200 trips?

SELECT start_station_id ,  start_station_name FROM trip GROUP BY start_station_name HAVING COUNT(*)  >=  200

What are the ids and names of all start stations that were the beginning of at least 200 trips ?

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


Question: What are the countries that participated in both friendly and tournament type competitions?

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

What are the countries that participated in both friendly and tournament type competitions ?

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


Question: What are the elements of the atoms of TR144_8_19?

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

What are the elements of the atoms of TR144_8_19 ?


Question: What is the lowest room count across all the properties?

What is the lowest room count across all the properties ?

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


Question: List down product names of free gifts.

SELECT Name FROM Products WHERE Price = 0


Question: What is the average height in centimeters of all the players in the position of defense?

SELECT CAST(SUM(T2.height_in_cm) AS REAL) / COUNT(T1.ELITEID) FROM PlayerInfo AS T1 INNER JOIN height_info AS T2 ON T1.height = T2.height_id WHERE T1.position_info = 'D'

What is the average height in centimeters of all the players in the position of defense ?

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


Question: How many accounts have an owner disposition and request for a statement to be generated upon a transaction?

SELECT COUNT(T1.account_id) FROM account AS T1 INNER JOIN disp AS T2 ON T1.account_id = T2.account_id WHERE T2.type = 'OWNER' AND T1.frequency = 'POPLATEK PO OBRATU'

How many accounts have an owner disposition and request for a statement to be generated upon a transaction ?

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


Question: When did Peercoin rank fifth?

SELECT T2.date FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T1.name = 'Peercoin' AND T2.cmc_rank = 5


Question: find the event names that have more than 2 records.

SELECT event_name FROM party_events GROUP BY event_name HAVING count(*)  >  2

find the event names that have more than 2 records .

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


Question: Which parties did not have any delegates in elections?

SELECT Party FROM party WHERE Party_ID NOT IN (SELECT Party FROM election)

Which parties did not have any delegates in elections ?


Question: What are the first and last names of all the female students who have president votes?

SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.President_VOTE WHERE T1.sex  =  "F"

What are the first and last names of all the female students who have president votes ?

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


Question: Among the recipes whose source is the National Potato Board, which recipe has the highest calories?

SELECT T1.title FROM Recipe AS T1 INNER JOIN Nutrition AS T2 ON T1.recipe_id = T2.recipe_id WHERE T1.source = 'National Potato Board' ORDER BY T2.calories DESC LIMIT 1

Among the recipes whose source is the National Potato Board , which recipe has the highest calories ?

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


Question: What are the total purchases for members rated at level 6?

SELECT count(*) FROM purchase AS T1 JOIN member AS T2 ON T1.member_id  =  T2.member_id WHERE T2.level  =  6

What are the total purchases for members rated at level 6 ?

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


Question: Show the album names, ids and the number of tracks for each album.

SELECT T1.Title ,  T2.AlbumID ,  COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId GROUP BY T2.AlbumID

Show the album names , ids and the number of tracks for each album .

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


Question: Which course has more teachers, course no.16 or course no.18?

SELECT course_id FROM taughtBy WHERE course_id = 11 OR course_id = 18 GROUP BY course_id ORDER BY COUNT(course_id) DESC LIMIT 1

Which course has more teachers , course no.16 or course no.18 ?


Question: Find the attribute data type for the attribute named "Green".

SELECT attribute_data_type FROM Attribute_Definitions WHERE attribute_name  =  "Green"

Find the attribute data type for the attribute named " Green " .

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


Question: How many reviews are created for the podcast "Scaling Global" under?

SELECT COUNT(T2.content) FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.title = 'Scaling Global'

How many reviews are created for the podcast " Scaling Global " under ?

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


Question: What is the inspection ID of the inspection with critical point level, $500 fine, and inspector comment "CDI ON 5-17-10"?

SELECT T2.inspection_id FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.fine = 500 AND T1.point_level = 'Critical' AND T2.inspector_comment = 'CDI ON 5-17-10'

What is the inspection ID of the inspection with critical point level , $ 500 fine , and inspector comment " CDI ON 5 - 17 - 10 " ?

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


Question: Provide the full address of Ursola Purdy.

SELECT T3.street_number, T3.street_name, T3.city FROM customer AS T1 INNER JOIN customer_address AS T2 ON T1.customer_id = T2.customer_id INNER JOIN address AS T3 ON T3.address_id = T2.address_id INNER JOIN country AS T4 ON T4.country_id = T3.country_id WHERE T1.first_name = 'Ursola' AND T1.last_name = 'Purdy'

Provide the full address of Ursola Purdy .


Question: Which department has the most number of night shifts?

SELECT T3.Name FROM Shift AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.ShiftId = T2.ShiftId INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID GROUP BY T2.DepartmentID ORDER BY COUNT(T1.Name = 'Night') DESC LIMIT 1

Which department has the most number of night shifts ?

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


Question: How many clubs are there?


Question: Find the average height and width of paintings grouped by painters and ordered by name

SELECT avg(height_mm) ,  avg(width_mm) ,  painterID FROM paintings GROUP BY painterID ORDER BY title

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


Question: Which physicians prescribe a medication of brand X? Tell me the name and position of those physicians.

SELECT DISTINCT T1.name ,  T1.position FROM physician AS T1 JOIN prescribes AS T2 ON T1.employeeid = T2.physician JOIN medication AS T3 ON T3.code = T2.medication WHERE T3.Brand  =  "X"

Which physicians prescribe a medication of brand X ? Tell me the name and position of those physicians .

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


Question: What are the last names that are used by customers and staff?

SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff

What are the last names that are used by customers and staff ?

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


Question: What is the department name and corresponding building for the department with the greatest budget?

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

What is the department name and corresponding building for the department with the greatest budget ?

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


Question: What are the names and original artists of the song whose English translation is 'All the streets of love'?

SELECT name ,  original_artist FROM songs WHERE english_translation  =  'All the streets of love'

What are the names and original artists of the song whose English translation is ' All the streets of love ' ?

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


Question: Is it true that more SMEs pay in Czech koruna than in euros? If so, how many more?

SELECT SUM(Currency = 'CZK') - SUM(Currency = 'EUR') FROM customers WHERE Segment = 'SME'

Is it true that more SMEs pay in Czech koruna than in euros ? If so , how many more ?

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


Question: Order the distinct good ids.

SELECT DISTINCT id FROM goods ORDER BY id


Question: Return the total number of distinct customers.

Return the total number of distinct customers .


Question: For the client who made the complaint call "CR0217298", what was his/her birthday？

SELECT T1.month, T1.day FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Complaint ID` = 'CR0217298'

For the client who made the complaint call " CR0217298 " , what was his / her birthday ？

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


Question: What is the category and itune url of the title "Scaling Global"?

SELECT T1.category, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'Scaling Global'

What is the category and itune url of the title " Scaling Global " ?

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


Question: What is the full name of the journals that are published in the database papers whose topic is Sustainability?

SELECT T2.FullName FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.Keyword = 'Sustainability'

What is the full name of the journals that are published in the database papers whose topic is Sustainability ?

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


Question: What are the memories and carriers of phones?

SELECT Memory_in_G ,  Carrier FROM phone

What are the memories and carriers of phones ?


Question: What are the different account ids that have made financial transactions, as well as how many transactions correspond to each?

SELECT account_id ,  count(*) FROM Financial_transactions GROUP BY account_id

What are the different account ids that have made financial transactions , as well as how many transactions correspond to each ?

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


Question: What's the url of user 39115684's rating on the movie 'When Will I Be Loved'?

SELECT T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'A Way of Life' AND T1.user_id = 39115684

What 's the url of user 39115684 's rating on the movie ' When Will I Be Loved ' ?

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


Question: Sort the student answer texts in descending order of their frequency of occurrence.

SELECT Student_Answer_Text FROM Student_Answers GROUP BY Student_Answer_Text ORDER BY COUNT(*) DESC

Sort the student answer texts in descending order of their frequency of occurrence .

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


Question: How many orders were from Hanna Moos company in 1999?

SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE STRFTIME('%Y', T2.OrderDate) = '1999' AND T1.CompanyName = 'Hanna Moos'

How many orders were from Hanna Moos company in 1999 ?

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


Question: Find names of instructors with salary greater than that of some (at least one) instructor in the Biology department.

SELECT name FROM instructor WHERE salary  >  (SELECT min(salary) FROM instructor WHERE dept_name  =  'Biology')

Find names of instructors with salary greater than that of some ( at least one ) instructor in the Biology department .

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


Question: Please list the name of the coach who has served more than 2 NBA teams.

SELECT coachID FROM coaches GROUP BY coachID HAVING COUNT(DISTINCT tmID) > 2

Please list the name of the coach who has served more than 2 NBA teams .

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


Question: State name of students who have been absent for 5 months from school and do not have payment due.

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T1.month = 5 AND T2.bool = 'neg'

State name of students who have been absent for 5 months from school and do not have payment due .

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


Question: Which method has the summary "Write a command to the log"?

SELECT Name FROM Method WHERE Summary = 'Write a command to the log'

Which method has the summary " Write a command to the log " ?

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


Question: According to 2016's survey, what is the number of users with a mental health disorder in the past?

SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2016 AND T1.questiontext LIKE 'Have you had a mental health disorder in the past?' AND T2.AnswerText = 'Yes'

According to 2016 's survey , what is the number of users with a mental health disorder in the past ?

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


Question: How many drivers did not race in 2009?

SELECT count(DISTINCT driverId) FROM results WHERE raceId NOT IN( SELECT raceId FROM races WHERE YEAR != 2009 )

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


Question: List the problem id and log id which are assigned to the staff named Rylan Homenick.

SELECT DISTINCT T2.problem_id ,  T2.problem_log_id FROM staff AS T1 JOIN problem_log AS T2 ON T1.staff_id = T2.assigned_to_staff_id WHERE T1.staff_first_name = "Rylan" AND T1.staff_last_name = "Homenick"

List the problem i d and log i d which are assigned to the staff named Rylan Homenick .

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


Question: Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces?

SELECT DISTINCT T2.owner_name FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.risk_category = 'High Risk' AND T1.violation_type_id = 103109 AND T1.description = 'Unclean or unsanitary food contact surfaces'

Who is the owner of the business that has a high risk violation of 103109 and described as unclean or unsanitary food contact surfaces ?

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


Question: Which make is associated with 3 or more drivers?

SELECT Make FROM driver GROUP BY Make HAVING COUNT(*)  >=  3

Which make is associated with 3 or more drivers ?


Question: Mention the zip code of member who incurred less than 50USD.

SELECT T1.zip FROM member AS T1 INNER JOIN expense AS T2 ON T1.member_id = T2.link_to_member WHERE T2.cost < 50

Mention the zip code of member who incurred less than 50USD .

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


Question: Find the ratio between male superheroes and female superheroes.

SELECT CAST(COUNT(CASE WHEN T2.gender = 'Male' THEN T1.id ELSE NULL END) AS REAL) / COUNT(CASE WHEN T2.gender = 'Female' THEN T1.id ELSE NULL END) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id

Find the ratio between male superheroes and female superheroes .

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


Question: Please list the villains of all the movies directed by Wolfgang Reitherman.

SELECT T2.villian FROM director AS T1 INNER JOIN characters AS T2 ON T1.name = T2.movie_title WHERE T1.director = 'Wolfgang Reitherman' AND T2.villian IS NOT NULL

Please list the villains of all the movies directed by Wolfgang Reitherman .

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


Question: List the flight date of flights with air carrier described as Profit Airlines Inc.: XBH which have an actual elapsed time below 100.

SELECT T2.FL_DATE FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.ACTUAL_ELAPSED_TIME < 100 AND T1.Description = 'Profit Airlines Inc.: XBH'

List the flight date of flights with air carrier described as Profit Airlines Inc. : XBH which have an actual elapsed time below 100 .

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


Question: How many Yelp businesses are there in 'AZ' with less than "3" stars?

SELECT COUNT(business_id) FROM Business WHERE state LIKE 'AZ' AND stars < 3

How many Yelp businesses are there in ' AZ ' with less than " 3 " stars ?

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


Question: List the phone numbers of customers whose order priority is urgent.

SELECT T2.c_phone FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T1.o_orderpriority = '1-URGENT'

List the phone numbers of customers whose order priority is urgent .

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


Question: find the number of players whose points are lower than 30 in each position.

SELECT count(*) ,  POSITION FROM player WHERE points  <  30 GROUP BY POSITION

find the number of players whose points are lower than 30 in each position .

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


Question: Select the name and price of the cheapest product.

SELECT name ,  price FROM Products ORDER BY price ASC LIMIT 1

Select the name and price of the cheapest product .


Question: How many matches did team Mumbai Indians win in 2008?

SELECT COUNT(T.Match_Id) FROM ( SELECT T2.Match_Id FROM Team AS T1 INNER JOIN Match AS T2 ON T1.team_id = T2.match_winner INNER JOIN Player_Match AS T3 ON T1.Team_Id = T3.Team_Id WHERE T1.Team_Name = 'Mumbai Indians' AND T2.Match_Date LIKE '2008%' GROUP BY T2.Match_Id ) T

How many matches did team Mumbai Indians win in 2008 ?

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


Question: State the category of events were held at MU 215.

SELECT DISTINCT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.location = 'MU 215'

State the category of events were held at MU 215 .

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


Question: Is the ingredient "graham cracker crumbs" optional in the recipe "Raspberry Chiffon Pie"?

SELECT T2.optional FROM Recipe AS T1 INNER JOIN Quantity AS T2 ON T1.recipe_id = T2.recipe_id INNER JOIN Ingredient AS T3 ON T3.ingredient_id = T2.ingredient_id WHERE T1.title = 'Raspberry Chiffon Pie' AND T3.name = 'graham cracker crumbs'

Is the ingredient " graham cracker crumbs " optional in the recipe " Raspberry Chiffon Pie " ?

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


Question: Find the emails and phone numbers of all the customers, ordered by email address and phone number.

SELECT email_address ,  phone_number FROM customers ORDER BY email_address ,  phone_number

Find the emails and phone numbers of all the customers , ordered by email address and phone number .

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


Question: Please give the full name of the customer who had made the biggest amount of payment in one single film rental.

SELECT T2.first_name, T2.last_name FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id ORDER BY T1.amount DESC LIMIT 1

Please give the full name of the customer who had made the biggest amount of payment in one single film rental .

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


Question: What are the full names of the top 3 employees who handled the highest number of sales?

SELECT T1.FirstName, T1.MiddleInitial, T1.LastName FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID GROUP BY T2.SalesPersonID, T1.FirstName, T1.MiddleInitial, T1.LastName ORDER BY COUNT(T2.SalesID) DESC LIMIT 3

What are the full names of the top 3 employees who handled the highest number of sales ?

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


Question: How many students are enrolled in smc during month 1?

SELECT COUNT(name) FROM enrolled WHERE school = 'smc' AND month = 1

How many students are enrolled in smc during month 1 ?

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


Question: How many patients with 'allergy to eggs' have been immunized with 'Td (adult) preservative free'?

SELECT COUNT(DISTINCT T2.patient) FROM allergies AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient INNER JOIN immunizations AS T3 ON T2.patient = T3.PATIENT WHERE T1.DESCRIPTION = 'Allergy to eggs' AND T3.DESCRIPTION = 'Td (adult) preservative free'

How many patients with ' allergy to eggs ' have been immunized with ' Td ( adult ) preservative free ' ?

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


Question: What is the largest major?

SELECT major FROM Student GROUP BY major ORDER BY count(*) DESC LIMIT 1


Question: List the distinct positions of pilots older than 30.

SELECT DISTINCT POSITION FROM pilot WHERE Age  >  30

List the distinct positions of pilots older than 30 .


Question: Find out which business is opened for 24/7 and list out what is the business attribute.

SELECT T5.attribute_name FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id INNER JOIN Business_Attributes AS T4 ON T3.business_id = T4.business_id INNER JOIN Attributes AS T5 ON T4.attribute_id = T5.attribute_id WHERE T2.day_id LIKE '1' AND '2' AND '3' AND '4' AND '5' AND '6' AND '7' AND T1.opening_time = T1.closing_time GROUP BY T5.attribute_name

Find out which business is opened for 24/7 and list out what is the business attribute .

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


Question: Who was the customer in the South Region superstore who bought the most “Hon Multipurpose Stacking Arm Chairs"?

SELECT T2.`Customer Name` FROM south_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T3.`Product Name` = 'Hon Multipurpose Stacking Arm Chairs' GROUP BY T2.`Customer Name` ORDER BY COUNT(T2.`Customer Name`) DESC LIMIT 1

Who was the customer in the South Region superstore who bought the most “ Hon Multipurpose Stacking Arm Chairs " ?

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


Question: What are the different ship flags, and how many ships have each?

SELECT count(*) ,  flag FROM ship GROUP BY flag

What are the different ship flags , and how many ships have each ?

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


Question: Lists the set code of all cards translated into Spanish.

SELECT setCode FROM set_translations WHERE language = 'Spanish'

Lists the set code of all cards translated into Spanish .

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


Question: Who is the hero character of the adventure movie which was released on 2016/3/4?

SELECT T1.hero FROM characters AS T1 INNER JOIN movies_total_gross AS T2 ON T2.movie_title = T1.movie_title WHERE T2.genre = 'Adventure' AND T1.release_date = '4-Mar-16'

Who is the hero character of the adventure movie which was released on 2016/3/4 ?

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


Question: Among the country member of 'IOC' organization, which country has the most population?

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

Among the country member of ' IOC ' organization , which country has the most population ?

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


Question: What are the names of the schools with some players in the mid position but no goalies?

SELECT cName FROM  tryout WHERE pPos  =  'mid' EXCEPT SELECT cName FROM  tryout WHERE pPos  =  'goalie'

What are the names of the schools with some players in the mid position but no goalies ?

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


Question: Among the easiest courses, what is the name of the course where most students got an A?

SELECT T2.name FROM registration AS T1 INNER JOIN course AS T2 ON T1.course_id = T2.course_id WHERE T1.grade = 'A' AND T2.diff = 1 GROUP BY T2.name ORDER BY COUNT(T1.student_id) DESC LIMIT 1

Among the easiest courses , what is the name of the course where most students got an A ?

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


Question: List down all the card IDs with converted mana cost of 0.

SELECT id FROM cards WHERE convertedManaCost = 0

List down all the card IDs with converted mana cost of 0 .

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


Question: For all the products, list the product name and its corresponding start date for the current standard cost.

SELECT T1.Name, T2.StartDate FROM Product AS T1 INNER JOIN ProductCostHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T2.EndDate IS NULL

For all the products , list the product name and its corresponding start date for the current standard cost .

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


Question: From 2003 to 2004, how many customers have paid more than three times?

SELECT COUNT(customernumber) FROM ( SELECT customernumber FROM payments WHERE STRFTIME('%Y', paymentDate) >= '2003' AND STRFTIME('%Y', paymentDate) <= '2004' GROUP BY customernumber HAVING COUNT(customernumber) > 3 ) T

From 2003 to 2004 , how many customers have paid more than three times ?

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


Question: Among the orders made by customers in Germany, which one of them has the highest priority in delivery? Please give its order key.

SELECT T3.o_orderkey FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN orders AS T3 ON T2.c_custkey = T3.o_custkey WHERE T1.n_name = 'GERMANY' ORDER BY T3.o_orderdate LIMIT 1

Among the orders made by customers in Germany , which one of them has the highest priority in delivery ? Please give its order key .

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


Question: What is the average base price of different bed type? List bed type and average base price.

SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;

What is the average base price of different bed type ? List bed type and average base price .

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


Question: Show all company names and headquarters in the descending order of market value.

SELECT company ,  headquarters FROM company ORDER BY market_value DESC

Show all company names and headquarters in the descending order of market value .

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


Question: What is the title of the book in the order ID 931?

SELECT T1.title FROM book AS T1 INNER JOIN order_line AS T2 ON T1.book_id = T2.book_id WHERE T2.order_id = 931

What is the title of the book in the order ID 931 ?

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


Question: How many students are taught by teacher TARRING LEIA?

SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T2.firstname  =  "TARRING" AND T2.lastname  =  "LEIA"

How many students are taught by teacher TARRING LEIA ?


Question: Please provide the attribute values of the bussinesses with fashion in Scottsdale.

SELECT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T1.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T4.category_name LIKE 'Fashion' AND T1.city LIKE 'Scottsdale'

Please provide the attribute values of the bussinesses with fashion in Scottsdale .

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


Question: How many eateries applied in 2012?

SELECT COUNT(business_id) FROM businesses WHERE STRFTIME('%Y', application_date) = '2012'


Question: What kind of expression correlation occurs in physical type interacting gene pairs and what percentage of these are negatively correlated?

SELECT Expression_Corr FROM Interactions WHERE Type = 'Physical' UNION ALL SELECT CAST(SUM(Expression_Corr < 0) AS REAL) * 100 / COUNT(*) FROM Interactions WHERE Type = 'Physical'

What kind of expression correlation occurs in physical type interacting gene pairs and what percentage of these are negatively correlated ?

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


Question: Show all the locations where some cinemas were opened in both year 2010 and year 2011.

SELECT LOCATION FROM cinema WHERE openning_year  =  2010 INTERSECT SELECT LOCATION FROM cinema WHERE openning_year  =  2011

Show all the locations where some cinemas were opened in both year 2010 and year 2011 .

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


Question: For the Yelp businesses which received a "5" star review with "uber" number of votes for funny, which one is located in "Phoenix"? Give the business ID.

SELECT T1.business_id FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city = 'Phoenix' AND T2.review_stars = 5 AND T2.review_votes_funny = 'Uber'

For the Yelp businesses which received a " 5 " star review with " uber " number of votes for funny , which one is located in " Phoenix " ? Give the business ID .

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


Question: List the names of recipes that can lead to constipation.

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

List the names of recipes that can lead to constipation .


Question: Which publishers did not publish a book in 1989?

SELECT publisher FROM book_club EXCEPT SELECT publisher FROM book_club WHERE YEAR  =  1989

Which publishers did not publish a book in 1989 ?


Question: Who is the Vice President of Engineering and when did he join the company? Indicate his/her full name.

SELECT T2.FirstName, T2.MiddleName, T2.LastName, T1.HireDate FROM Employee AS T1 INNER JOIN Person AS T2 USING (BusinessEntityID) WHERE T1.JobTitle = 'Vice President of Engineering'

Who is the Vice President of Engineering and when did he join the company ? Indicate his / her full name .

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


Question: Show the people that have been comptroller the most times and the corresponding number of times.

SELECT Comptroller ,  COUNT(*) FROM party GROUP BY Comptroller ORDER BY COUNT(*) DESC LIMIT 1

Show the people that have been comptroller the most times and the corresponding number of times .

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


Question: What are the weights of entrepreneurs in descending order of money requested?

SELECT T2.Weight FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested DESC

What are the weights of entrepreneurs in descending order of money requested ?

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


Question: The book name "The Season: A Candid Look at Broadway" was published by which publisher?

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.title = 'The Season: A Candid Look at Broadway'

The book name " The Season : A Candid Look at Broadway " was published by which publisher ?

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


Question: Find names of all students who took some course and the course description.

SELECT T1.stu_fname ,  T1.stu_lname ,  T4.crs_description FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num JOIN CLASS AS T3 ON T2.class_code  =  T3.class_code JOIN course AS T4 ON T3.crs_code  =  T4.crs_code

Find names of all students who took some course and the course description .

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


Question: Among the most important courses, what is the name of the most difficult course?

SELECT name FROM course WHERE credit = ( SELECT MAX(credit) FROM course ) AND diff = ( SELECT MAX(diff) FROM course )

Among the most important courses , what is the name of the most difficult course ?

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


Question: What is the average enrollment number?


Question: What are the names of oldest pilots for each type of plane?

SELECT pilot_name ,  plane_name ,  max(age) FROM pilotskills GROUP BY plane_name

What are the names of oldest pilots for each type of plane ?

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


Question: Calculate the bmi of the competitor id 147420.

SELECT CAST(T1.weight AS REAL) / (T1.height * T1.height) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T2.id = 147420

Calculate the bmi of the competitor i d 147420 .

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


Question: List the name of clubs whose manufacturer is not "Nike"

SELECT Name FROM club WHERE Manufacturer != "Nike"

List the name of clubs whose manufacturer is not " Nike "

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


Question: What are the distinct payment method codes in all the invoices?

SELECT DISTINCT payment_method_code FROM INVOICES

What are the distinct payment method codes in all the invoices ?

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


Question: List the air carrier's description of the flights with 0 departure delay.

SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.DEP_DELAY = 0 GROUP BY T1.Description

List the air carrier 's description of the flights with 0 departure delay .

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


Question: Find the market shares and names of furnitures which no any company is producing in our records.

SELECT Market_Rate ,  name FROM furniture WHERE Furniture_ID NOT IN (SELECT Furniture_ID FROM furniture_manufacte)

Find the market shares and names of furnitures which no any company is producing in our records .

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


Question: How many wines are produced at Robert Biale winery?

SELECT count(*) FROM WINE WHERE Winery  =  "Robert Biale"

How many wines are produced at Robert Biale winery ?

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


Question: What is the name of the customer with the worst credit score?

SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1

What is the name of the customer with the worst credit score ?

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


Question: List the geographic id of places where the income is above average.

List the geographic i d of places where the income is above average .


Question: For all the deceased players who are good at both left and right hand, list the player's name and the age when he died.

SELECT firstName, lastName, deathYear - birthYear FROM Master WHERE shootCatch IS NULL AND deathYear IS NOT NULL

For all the deceased players who are good at both left and right hand , list the player 's name and the age when he died .

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


Question: Count the number of total papers.


Question: Count the number of different statuses.

Count the number of different statuses .


Question: How much is the processed time of the method whose tokenized name is "about box1 dispose"? Indicate the language of the method.

SELECT DISTINCT T1.ProcessedTime, T2.Lang FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.NameTokenized = 'about box1 dispose'

How much is the processed time of the method whose tokenized name is " about box1 dispose " ? Indicate the language of the method .

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


Question: How many students live in each city?

SELECT city_code ,  count(*) FROM Student GROUP BY city_code


Question: What is the opening time of the active businesses in Surprise that has a low review count.

SELECT T2.opening_time FROM Business AS T1 INNER JOIN Business_Hours AS T2 ON T1.business_id = T2.business_id INNER JOIN Days AS T3 ON T2.day_id = T3.day_id WHERE T1.city LIKE 'Surprise' AND T1.active LIKE 'TRUE' AND T1.review_count LIKE 'Low' GROUP BY T2.opening_time

What is the opening time of the active businesses in Surprise that has a low review count .

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


Question: Find the distinct driver id and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with id 841.

SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  <  (SELECT max(duration) FROM pitstops WHERE raceid  =  841)

Find the distinct driver i d and the stop number of all drivers that have a shorter pit stop duration than some drivers in the race with i d 841 .

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


Question: How many nominations did Law and Order season 9, episode 20 get?

SELECT COUNT(T2.award_id) FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.series = 'Law and Order' AND T1.season = 9 AND T1.episode = 20

How many nominations did Law and Order season 9 , episode 20 get ?

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


Question: Show the names and details of all the staff members.

Show the names and details of all the staff members .

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


Question: Find job id and date of hire for those employees who was hired between November 5th, 2007 and July 5th, 2009.

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

Find job i d and date of hire for those employees who was hired between November 5th , 2007 and July 5th , 2009 .

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


Question: Find the name of medication used on the patient who stays in room 111?

SELECT T4.name FROM stay AS T1 JOIN patient AS T2 ON T1.Patient  =  T2.SSN JOIN Prescribes AS T3 ON T3.Patient  =  T2.SSN JOIN Medication AS T4 ON T3.Medication  =  T4.Code WHERE room  =  111

Find the name of medication used on the patient who stays in room 111 ?

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


Question: How many complaints from female clients born in the year 2000 were not sent through the web?

SELECT COUNT(T2.`Submitted via`) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.sex = 'Female' AND T1.year = 2000 AND T2.`Submitted via` != 'Web'

How many complaints from female clients born in the year 2000 were not sent through the web ?

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


Question: What is the name of the restaurant that is located in El Dorado County, Lake Tahoe region?

SELECT T2.label FROM geographic AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.region = 'lake tahoe' AND T1.county = 'el dorado county'

What is the name of the restaurant that is located in El Dorado County , Lake Tahoe region ?

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


Question: What are the top 5 countries by number of invoices and how many do they have?

SELECT billing_country ,  COUNT(*) FROM invoices GROUP BY billing_country ORDER BY count(*) DESC LIMIT 5;

What are the top 5 countries by number of invoices and how many do they have ?


Question: Other than zero, what is the lowest price paid by a customer for an order?

SELECT MIN(price) FROM order_line WHERE price <> 0

Other than zero , what is the lowest price paid by a customer for an order ?

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


Question: What is the tag and the artist of the most downloaded single?

SELECT T2.tag, T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T1.releaseType = 'single' ORDER BY T1.totalSnatched DESC LIMIT 1

What is the tag and the artist of the most downloaded single ?

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


Question: Show the minimum amount of transactions whose type code is "PUR" and whose share count is bigger than 50.

SELECT min(amount_of_transaction) FROM TRANSACTIONS WHERE transaction_type_code  =  "PUR" AND share_count  >  50

Show the minimum amount of transactions whose type code is " PUR " and whose share count is bigger than 50 .

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


Question: Provide a list of directors from the 1990s.

SELECT T2.director FROM movies_total_gross AS T1 INNER JOIN director AS T2 ON T1.movie_title = T2.name AND CAST(SUBSTR(release_date, INSTR(release_date, ', ') + 1) AS int) BETWEEN 1990 AND 2000 GROUP BY T2.director

Provide a list of directors from the 1990s .


Question: List all of the information about the music department's casts and crews.

SELECT DISTINCT person, name, birthdate, birth_name, birth_place , birth_region, birth_country, height_meters, nickname FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T2.category = 'Music Department';

List all of the information about the music department 's casts and crews .


Question: Provide employees' ID who are in-charge of territory ID from 1000 to 2000.

SELECT EmployeeID FROM EmployeeTerritories WHERE TerritoryID BETWEEN 1000 AND 2000

Provide employees ' ID who are in - charge of territory ID from 1000 to 2000 .

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


Question: Does Yelp business No."4960" have TV?

SELECT DISTINCT CASE WHEN T1.attribute_name LIKE 'Has TV' THEN 'yes' ELSE 'no' END FROM Attributes AS T1 INNER JOIN Business_Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.business_id = 4960

Does Yelp business No . "4960 " have TV ?

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


Question: List the course IDs and levels of person IDs from 40 to 50.

SELECT T1.course_id, T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id BETWEEN 40 AND 50

List the course IDs and levels of person IDs from 40 to 50 .

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


Question: Which work order transaction number has the highest product quantity?

SELECT TransactionID FROM TransactionHistory WHERE TransactionType = 'W' ORDER BY Quantity DESC LIMIT 1

Which work order transaction number has the highest product quantity ?


Question: What are the first and last names of the artists who did not sculpt but could paint.

SELECT T1.lname ,  T1.fname FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID EXCEPT SELECT T3.lname ,  T3.fname FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID

What are the first and last names of the artists who did not sculpt but could paint .

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


Question: Which constructor has the highest point?

SELECT T2.name FROM constructorStandings AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId ORDER BY T1.points DESC LIMIT 1

Which constructor has the highest point ?


Question: Please list the phone numbers of all the store contacts.

SELECT T2.PhoneNumber FROM Person AS T1 INNER JOIN PersonPhone AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'SC'

Please list the phone numbers of all the store contacts .


Question: Show the names and total passengers for all train stations not in London.

SELECT name ,  total_passengers FROM station WHERE LOCATION != 'London'

Show the names and total passengers for all train stations not in London .

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


Question: Which three countries does the Amazonas flow through? Give the full name of the countries.

SELECT DISTINCT T4.Name FROM city AS T1 INNER JOIN located AS T2 ON T1.Name = T2.City INNER JOIN river AS T3 ON T3.Name = T2.River INNER JOIN country AS T4 ON T4.Code = T2.Country WHERE T3.Name = 'Amazonas'

Which three countries does the Amazonas flow through ? Give the full name of the countries .

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


Question: Of all the cards that are designed by Aaron Miller, how many of them are incredibly powerful?

SELECT SUM(CASE WHEN artist = 'Aaron Miller' AND cardKingdomFoilId IS NOT NULL AND cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) FROM cards

Of all the cards that are designed by Aaron Miller , how many of them are incredibly powerful ?

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


Question: Find the distinct driver id of all drivers that have a longer stop duration than some drivers in the race whose id is 841?

SELECT DISTINCT driverid ,  STOP FROM pitstops WHERE duration  >  (SELECT min(duration) FROM pitstops WHERE raceid  =  841)

Find the distinct driver i d of all drivers that have a longer stop duration than some drivers in the race whose i d is 841 ?

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


Question: Which country had the game that Away team made the most goals?

SELECT T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division GROUP BY T2.country ORDER BY SUM(T1.FTAG) DESC LIMIT 1

Which country had the game that Away team made the most goals ?


Question: What are the names of parties that have no members?

SELECT party_name FROM party WHERE party_id NOT IN (SELECT party_id FROM Member)

What are the names of parties that have no members ?

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


Question: Please indicate the closing hours and business days of the businesses with the category named Doctors.

SELECT DISTINCT T3.opening_time, T3.day_id FROM Business_Categories AS T1 INNER JOIN Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business_Hours AS T3 ON T1.business_id = T3.business_id INNER JOIN Days AS T4 ON T3.day_id = T4.day_id WHERE T2.category_name = 'Doctors'

Please indicate the closing hours and business days of the businesses with the category named Doctors .

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


Question: Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64.

SELECT Carrier FROM phone WHERE Memory_in_G  <  32 INTERSECT SELECT Carrier FROM phone WHERE Memory_in_G  >  64

Show the carriers that have both phones with memory smaller than 32 and phones with memory bigger than 64 .

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


Question: In the least populated community, what is the most common location of all the reported crime incidents?

SELECT T2.location_description FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T1.community_area_no = T2.community_area_no WHERE T1.population = ( SELECT MIN(population) FROM Community_Area ) AND T2.location_description IS NOT NULL GROUP BY T2.location_description

In the least populated community , what is the most common location of all the reported crime incidents ?

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


Question: Please list the id of the director of the movie "It's Winter".

SELECT director_id FROM movies WHERE movie_title = 'It''s Winter'

Please list the i d of the director of the movie " It 's Winter " .

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


Question: How many of the matches are Superover?

SELECT SUM(CASE WHEN T2.win_type = 'wickets' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Win_By AS T2 ON T1.Win_Type = T2.Win_Id


Question: What is the description of the most common property type? List the description and code.

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

What is the description of the most common property type ? List the description and code .

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


Question: What is the id of the routes whose source and destination airports are in the United States?

SELECT rid FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  'United States') AND src_apid IN (SELECT apid FROM airports WHERE country  =  'United States')

What is the i d of the routes whose source and destination airports are in the United States ?

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


Question: What are the first names of all the different drivers in alphabetical order?

SELECT DISTINCT forename FROM drivers ORDER BY forename ASC

What are the first names of all the different drivers in alphabetical order ?

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


Question: Find the average yearly order by customer Weimei Corp for 2018, 2019 and 2020.

SELECT COUNT(T1.OrderNumber) / 3 FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE (T1.OrderDate LIKE '%/%/18' AND T2.`Customer Names` = 'Weimei Corp') OR (T1.OrderDate LIKE '%/%/19' AND T2.`Customer Names` = 'Weimei Corp') OR (T1.OrderDate LIKE '%/%/20' AND T2.`Customer Names` = 'Weimei Corp')

Find the average yearly order by customer Weimei Corp for 2018 , 2019 and 2020 .

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


Question: For the drivers who took part in the race in 1983/7/16, what's their race completion rate?

SELECT CAST(COUNT(CASE WHEN T2.time IS NOT NULL THEN T2.driverId END) AS REAL) * 100 / COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '1983-07-16'

For the drivers who took part in the race in 1983/7/16 , what 's their race completion rate ?

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


Question: In zip code 94107, on which day neither Fog nor Rain was not observed?

SELECT date FROM weather WHERE zip_code  =  94107 AND EVENTS != "Fog" AND EVENTS != "Rain"

In zip code 94107 , on which day neither Fog nor Rain was not observed ?

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


Question: Are all stations with zip code 94107 located in San Francisco city?

SELECT DISTINCT T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.zip_code = 94107

Are all stations with zip code 94107 located in San Francisco city ?

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


Question: How many customers paid over the amount of 10 on August 2005?

SELECT COUNT(customer_id) FROM payment WHERE SUBSTR(payment_date, 1, 7) LIKE '2005-08'

How many customers paid over the amount of 10 on August 2005 ?

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


Question: Show all calendar dates and day Numbers.

SELECT calendar_date ,  day_Number FROM Ref_calendar

Show all calendar dates and day Numbers .

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


Question: Among the sales people, who are hired prior to 2010?

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonType = 'SP' AND SUBSTR(T1.HireDate, 0, 4) < 2010

Among the sales people , who are hired prior to 2010 ?

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


Question: How many accounts who choose issuance after transaction are staying in East Bohemia region?

SELECT COUNT(T2.account_id) FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id WHERE T1.A3 = 'east Bohemia' AND T2.frequency = 'POPLATEK PO OBRATU'

How many accounts who choose issuance after transaction are staying in East Bohemia region ?

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


Question: Give the name of the nearest city to Chicago.

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

Give the name of the nearest city to Chicago .

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


Question: State the event name of Basketball.

SELECT T2.event_name FROM sport AS T1 INNER JOIN event AS T2 ON T1.id = T2.sport_id WHERE T1.sport_name = 'Basketball'


Question: Which team did the MVP of 1997 NBA season play in?

SELECT DISTINCT T3.tmID FROM players_teams AS T1 INNER JOIN awards_players AS T2 ON T1.playerID = T2.playerID INNER JOIN teams AS T3 ON T1.tmID = T3.tmID AND T1.year = T3.year WHERE T2.year = 1997 AND T2.award = 'Finals MVP' LIMIT 1

Which team did the MVP of 1997 NBA season play in ?

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


Question: For how long did the complaint filed on 2017/3/27 by Rachel Hicks last?

SELECT T2.ser_time FROM client AS T1 INNER JOIN callcenterlogs AS T2 ON T1.client_id = T2.`rand client` WHERE T1.first = 'Rachel' AND T1.last = 'Hicks' AND T2.`Date received` = '2017-03-27'

For how long did the complaint filed on 2017/3/27 by Rachel Hicks last ?

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


Question: Among the stores in weather station 14 in February 2014, which store had sold no less than 300 quantities for item number 44 in a single day?

SELECT T1.store_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr WHERE T2.station_nbr = 14 AND T1.`date` LIKE '%2014-02%' AND T1.item_nbr = 44 AND units >= 300

Among the stores in weather station 14 in February 2014 , which store had sold no less than 300 quantities for item number 44 in a single day ?

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


Question: What are the different allergy types?

SELECT DISTINCT allergytype FROM Allergy_type


Question: How many airports have a code starting with the letter C?

SELECT COUNT(*) FROM Airports WHERE Code LIKE 'C%'

How many airports have a code starting with the letter C ?

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


Question: What are the genres of all the English-language foreign films having a runtime of two hours or less? List each one.

SELECT T2.genre FROM movies AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T1.runningtime <= 2 AND T1.isEnglish = 'T' AND T1.country = 'other'

What are the genres of all the English - language foreign films having a runtime of two hours or less ? List each one .

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


Question: Show the ids for all the students who participate in an activity and are under 20.

SELECT StuID FROM Participates_in INTERSECT SELECT StuID FROM Student WHERE age  <  20

Show the ids for all the students who participate in an activity and are under 20 .

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


Question: What is the name of the track that has had the greatest number of races?

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

What is the name of the track that has had the greatest number of races ?

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


Question: What is the county that produces the most wines scoring 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

What is the county that produces the most wines scoring higher than 90 ?

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


Question: Indicate the address of the company Eastern Connection whose contact name is Ann Devon.

SELECT Address FROM Customers WHERE CompanyName = 'Eastern Connection' AND ContactName = 'Ann Devon'

Indicate the address of the company Eastern Connection whose contact name is Ann Devon .

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


Question: Find the average age and experience working length of journalists working on different role type.

SELECT avg(t1.age) ,  avg(Years_working) ,  t2.work_type FROM journalist AS t1 JOIN news_report AS t2 ON t1.journalist_id  =  t2.journalist_id GROUP BY t2.work_type

Find the average age and experience working length of journalists working on different role type .

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


Question: What is the name of the hardware product with the greatest price?

SELECT product_name FROM products WHERE product_type_code  =  'Hardware' ORDER BY product_price DESC LIMIT 1

What is the name of the hardware product with the greatest price ?


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

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

How many percent more of the Forks for the repository of solution No.53546 than No.1502 ?

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


Question: Give the color description that is least common across products.

SELECT t2.color_description FROM products AS t1 JOIN ref_colors AS t2 ON t1.color_code  =  t2.color_code GROUP BY t2.color_description ORDER BY count(*) ASC LIMIT 1

Give the color description that is least common across products .

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


Question: Find the forename and surname of drivers whose nationality is German?

SELECT forename ,  surname FROM drivers WHERE nationality = "German"

Find the forename and surname of drivers whose nationality is German ?

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


Question: What are the names of perpetrators whose country is not "China"?

SELECT T1.Name FROM people AS T1 JOIN perpetrator AS T2 ON T1.People_ID  =  T2.People_ID WHERE T2.Country != "China"

What are the names of perpetrators whose country is not " China " ?

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


Question: List in alphabetic order the names of all distinct instructors.

SELECT DISTINCT name FROM  instructor ORDER BY name

List in alphabetic order the names of all distinct instructors .


Question: What is the caption for the prediction class id 12?

SELECT PRED_CLASS FROM PRED_CLASSES WHERE PRED_CLASS_ID = 12

What is the caption for the prediction class i d 12 ?

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


Question: Find the number of distinct currency codes used in drama workshop groups.

SELECT count(DISTINCT Currency_Code) FROM Drama_Workshop_Groups

Find the number of distinct currency codes used in drama workshop groups .

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


Question: List the last name of all current legislators who live in California.

SELECT T1.last_name FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.state = 'CA' GROUP BY T1.last_name

List the last name of all current legislators who live in California .

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


Question: What is the type of card "Benalish Knight"?

SELECT DISTINCT T1.type FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight'

What is the type of card " Benalish Knight " ?

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


Question: How many publications were published by author named 'Howard F. Lipson'?

SELECT COUNT(PaperId) FROM PaperAuthor WHERE Name = 'Howard F. Lipson'

How many publications were published by author named ' Howard F. Lipson ' ?

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


Question: Give the maximum and minimum sale price of books.

SELECT max(saleprice) ,  min(saleprice) FROM Book

Give the maximum and minimum sale price of books .


Question: Give the url of movie which was rated 5 on 2013/5/3 5:11:17.

SELECT T2.movie_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE rating_score = 5 AND rating_timestamp_utc LIKE '2013-05-03 05:11:17'

Give the url of movie which was rated 5 on 2013/5/3 5:11:17 .

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


Question: List package number of package shipped in planet Omicron Persei 8 and sent by Zapp Brannigan.

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON  T1.Sender = T2.AccountNumber JOIN Shipment AS T3 ON T1.Shipment = T3.ShipmentID JOIN Planet AS T4 ON T3.Planet = T4.PlanetID WHERE T2.Name = "Zapp Brannigan" AND T4.Name = "Omicron Persei 8";

List package number of package shipped in planet Omicron Persei 8 and sent by Zapp Brannigan .

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


Question: Show the maximum share count of transactions where the amount is smaller than 10000

SELECT max(share_count) FROM TRANSACTIONS WHERE amount_of_transaction  <  10000

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


Question: What are the city codes of cities with distance greater than average?

SELECT city1_code ,  city2_code FROM Direct_distance WHERE distance  >  (SELECT avg(distance) FROM Direct_distance)

What are the city codes of cities with distance greater than average ?

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


Question: How many episodes have more than 1000 votes?

SELECT COUNT(episode_id) FROM Episode WHERE votes > 1000;

How many episodes have more than 1000 votes ?


Question: Among the products from the mountain product line, how many of them are sold by over 2 vendors?

SELECT SUM(CASE WHEN T1.ProductLine = 'M' THEN 1 ELSE 0 END) FROM Product AS T1 INNER JOIN ProductVendor AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Vendor AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID GROUP BY T1.ProductID HAVING COUNT(T1.Name) > 2

Among the products from the mountain product line , how many of them are sold by over 2 vendors ?

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


Question: Show me all the restaurants.


Question: What are the names of all instructors in the Comp. Sci. department?

SELECT name FROM instructor WHERE dept_name  =  'Comp. Sci.'

What are the names of all instructors in the Comp . Sci . department ?

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


Question: Who is the oldest player that participated in OHL league in the 1997 - 2000 season?

SELECT T1.PlayerName FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.LEAGUE = 'OHL' AND T2.SEASON = '1999-2000' ORDER BY T1.birthdate LIMIT 1

Who is the oldest player that participated in OHL league in the 1997 - 2000 season ?

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


Question: Which customers have both "On Road" and "Shipped" as order status? List the customer names.

SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "On Road" INTERSECT SELECT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Shipped"

Which customers have both " On Road " and " Shipped " as order status ? List the customer names .

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


Question: Compare the numbers of orders between the Eastern and Western stores in 2015.

SELECT east, west FROM ( SELECT COUNT(`Order ID`) AS east , ( SELECT COUNT(`Order ID`) FROM west_superstore WHERE `Order Date` LIKE '2015%' ) AS west FROM east_superstore WHERE `Order Date` LIKE '2015%' )

Compare the numbers of orders between the Eastern and Western stores in 2015 .

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


Question: The sales of how many territories is Nancy Davolio in charge of?

SELECT COUNT(T2.TerritoryID) FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Nancy' AND T1.LastName = 'Davolio'

The sales of how many territories is Nancy Davolio in charge of ?

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


Question: For ever collection named 'Best', what is the name and id of the one with the most documents, and how many documents does it have?

SELECT T1.Collection_Name ,  T1.Collection_ID ,  count(*) FROM Collections AS T1 JOIN Documents_in_Collections AS T2 ON T1.Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Best" GROUP BY T1.Collection_ID ORDER BY count(*) DESC LIMIT 1;

For ever collection named ' Best ' , what is the name and i d of the one with the most documents , and how many documents does it have ?

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


Question: How many characteristics does the product named "laurel" have?

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

How many characteristics does the product named " laurel " have ?

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


Question: Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order.

SELECT pilot_name FROM pilotskills WHERE age BETWEEN 30 AND 40 ORDER BY age

Find the names of all pilots with age between 30 and 40 sorted by their ages in ascending order .

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


Question: Find the name of the instructors who taught C Programming course before.

SELECT T1.name FROM instructor AS T1 JOIN teaches AS T2 ON T1.id  =  T2.id JOIN course AS T3 ON T2.course_id  =  T3.course_id WHERE T3.title  =  'C Programming'

Find the name of the instructors who taught C Programming course before .

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


Question: Find the number of accounts with a savings balance that is higher than the average savings balance.

SELECT count(*) FROM savings WHERE balance  >  (SELECT avg(balance) FROM savings)

Find the number of accounts with a savings balance that is higher than the average savings balance .

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


Question: How many labels belong to the game-card category?

SELECT COUNT(label_id) FROM label_categories WHERE category = 'game-card'

How many labels belong to the game - card category ?

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


Question: For all the complaint callers on 2017/3/27, what percentage of the clients are females?

SELECT CAST(SUM(CASE WHEN T1.sex = 'Female' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.sex) FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Date received` = '2017-03-27'

For all the complaint callers on 2017/3/27 , what percentage of the clients are females ?

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


Question: Return the structure description of the document that has been accessed the fewest number of times.

SELECT t2.document_structure_description FROM documents AS t1 JOIN document_structures AS t2 ON t1.document_structure_code  =  t2.document_structure_code GROUP BY t1.document_structure_code ORDER BY count(*) DESC LIMIT 1

Return the structure description of the document that has been accessed the fewest number of times .

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


Question: Among the patients who has a normal level of anti-centromere and a normal level of anti-SSB, how many of them are male?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CENTROMEA IN ('negative', '0') AND T2.SSB IN ('negative', '0') AND T1.SEX = 'M'

Among the patients who has a normal level of anti - centromere and a normal level of anti - SSB , how many of them are male ?

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


Question: What are the names of the games that were published by 505 Games?

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 = '505 Games'

What are the names of the games that were published by 505 Games ?

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


Question: What is the name of the superhero that has the most powers?

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id GROUP BY T1.superhero_name ORDER BY COUNT(T2.hero_id) DESC LIMIT 1

What is the name of the superhero that has the most powers ?

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


Question: What star rating is the most common for beers containing corn syrup?

SELECT T2.StarRating FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T1.CornSyrup = 'TRUE' GROUP BY T2.StarRating ORDER BY COUNT(T2.StarRating) DESC LIMIT 1

What star rating is the most common for beers containing corn syrup ?

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


Question: Describe the full names and cities of the customers who rented "DREAM PICKUP".

SELECT T4.first_name, T4.last_name, T6.city FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id INNER JOIN rental AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN customer AS T4 ON T3.customer_id = T4.customer_id INNER JOIN address AS T5 ON T4.address_id = T5.address_id INNER JOIN city AS T6 ON T5.city_id = T6.city_id WHERE T1.title = 'DREAM PICKUP'

Describe the full names and cities of the customers who rented " DREAM PICKUP " .

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


Question: Which episode of The simpson 20s: Season 20 has received the most nominations? Indicate the title.

SELECT T2.title FROM Award AS T1 INNER JOIN Episode AS T2 ON T1.episode_id = T2.episode_id GROUP BY T1.episode_id ORDER BY COUNT(*) DESC LIMIT 1;

Which episode of The simpson 20s : Season 20 has received the most nominations ? Indicate the title .

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


Question: Find the location of the warehouses which have contents Rocks but not Scissors.

SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Rocks' EXCEPT SELECT T2.location FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T1.contents  =  'Scissors'

Find the location of the warehouses which have contents Rocks but not Scissors .

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


Question: Show distinct types of artworks that are nominated in festivals in 2007.

SELECT DISTINCT T2.Type FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID  =  T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID  =  T3.Festival_ID WHERE T3.Year  =  2007

Show distinct types of artworks that are nominated in festivals in 2007 .

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


Question: Which catalog publisher has published the most catalogs?

SELECT catalog_publisher FROM catalogs GROUP BY catalog_publisher ORDER BY count(*) DESC LIMIT 1

Which catalog publisher has published the most catalogs ?


Question: Which film has a higher replacement cost, ACE GOLDFINGER or ACADEMY DINOSAUR?

SELECT title FROM film WHERE title IN ('ACE GOLDFINGER', 'ACADEMY DINOSAUR') ORDER BY replacement_cost DESC LIMIT 1

Which film has a higher replacement cost , ACE GOLDFINGER or ACADEMY DINOSAUR ?

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


Question: Please provide the National Center for Educational Statistics school district identification number for all schools with a School Ownership Code that are part of the State Special Schools.

SELECT NCESDist FROM schools WHERE SOC = 31

Please provide the National Center for Educational Statistics school district identification number for all schools with a School Ownership Code that are part of the State Special Schools .

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


Question: What is the brand of the device used by the youngest female user?

SELECT phone_brand FROM phone_brand_device_model2 WHERE device_id IN ( SELECT * FROM ( SELECT device_id FROM gender_age WHERE gender = 'F' ORDER BY age LIMIT 1 ) AS T )

What is the brand of the device used by the youngest female user ?

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


Question: Find the number of tweets in record.


Question: How many customers are located in London?

SELECT COUNT(CustomerID) FROM Customers WHERE City = 'London'

How many customers are located in London ?


Question: Find the id for the trips that lasted at least as long as the average duration of trips in zip code 94103.

SELECT id FROM trip WHERE duration  >=  (SELECT avg(duration) FROM trip WHERE zip_code  =  94103)

Find the i d for the trips that lasted at least as long as the average duration of trips in zip code 94103 .

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


Question: Who is the script supervisor of the series in episode tt0629204?

SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.episode_id = 'tt0629204' AND T1.role = 'script supervisor'

Who is the script supervisor of the series in episode tt0629204 ?

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


Question: What is the title of the Catalan language Wikipedia page that has the highest number of different words?

SELECT title FROM pages WHERE words = ( SELECT MAX(words) FROM pages )

What is the title of the Catalan language Wikipedia page that has the highest number of different words ?

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


Question: When was the document named "Marry CV" stored? Give me the date.

SELECT date_stored FROM All_documents WHERE Document_name  =  "Marry CV"

When was the document named " Marry CV " stored ? Give me the date .

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


Question: Find the total population of the top 3 districts with the largest area.

SELECT sum(city_population) FROM district ORDER BY city_area DESC LIMIT 3

Find the total population of the top 3 districts with the largest area .

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


Question: What are the communities that are grouped together on the central side?

SELECT community_area_name FROM Community_Area WHERE side = 'Central'

What are the communities that are grouped together on the central side ?

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


Question: What are the maximum and minimum number of cows across all farms.

What are the maximum and minimum number of cows across all farms .


Question: Calculate the average profit of prom brushed steel products.

SELECT SUM(T2.l_extendedprice * (1 - T2.l_discount) - T1.ps_supplycost * T2.l_quantity) / COUNT(T1.ps_partkey) FROM partsupp AS T1 INNER JOIN lineitem AS T2 ON T1.ps_suppkey = T2.l_suppkey INNER JOIN part AS T3 ON T1.ps_partkey = T3.p_partkey WHERE T3.p_type = 'PROMO BRUSHED STEEL'

Calculate the average profit of prom brushed steel products .

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


Question: Name the suppliers that supply products under the category 'cheeses.'

SELECT DISTINCT T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN Categories AS T3 ON T2.CategoryID = T3.CategoryID WHERE T3.Description = 'Cheeses'

Name the suppliers that supply products under the category ' cheeses . '

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


Question: Give the game publisher ID of records with platform ID 15.

SELECT T.game_publisher_id FROM game_platform AS T WHERE T.platform_id = 15

Give the game publisher ID of records with platform ID 15 .

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


Question: Which team got the most bench minor penalties in 2006?

SELECT name FROM Teams WHERE year = 2006 GROUP BY tmID, name ORDER BY CAST(SUM(BenchMinor) AS REAL) / 2 DESC LIMIT 1

Which team got the most bench minor penalties in 2006 ?

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


Question: In which year has the most hired employees?

SELECT STRFTIME('%Y', hire_date) FROM employee GROUP BY STRFTIME('%Y', hire_date) ORDER BY COUNT(emp_id) DESC LIMIT 1

In which year has the most hired employees ?


Question: How many flights have a velocity larger than 200?

SELECT count(*) FROM flight WHERE velocity  >  200

How many flights have a velocity larger than 200 ?


Question: How many users are there?


Question: How many different types of contents are stored in each warehouse?

SELECT count(DISTINCT CONTENTS) ,  warehouse FROM boxes GROUP BY warehouse

How many different types of contents are stored in each warehouse ?


Question: Please list the titles of the top 3 films with the highest replacement cost.

SELECT title FROM film WHERE replacement_cost = ( SELECT MAX(replacement_cost) FROM film ) LIMIT 3

Please list the titles of the top 3 films with the highest replacement cost .

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


Question: Show total hours per week and number of games played for student David Shieber.

SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.Fname  =  "David" AND T2.Lname  =  "Shieber"

Show total hours per week and number of games played for student David Shieber .

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


Question: What time does the business with ID no.12 open on Monday?

SELECT T1.opening_time FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T1.business_id = 12 AND T2.day_of_week = 'Monday'

What time does the business with ID no.12 open on Monday ?


Question: What are the first name and last name of each male member in club "Hopkins Student Enterprises"?

SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Hopkins Student Enterprises" AND t3.sex  =  "M"

What are the first name and last name of each male member in club " Hopkins Student Enterprises " ?

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


Question: How many employees report to Andrew Fuller?

SELECT COUNT(EmployeeID) FROM Employees WHERE ReportsTo = ( SELECT EmployeeID FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' )

How many employees report to Andrew Fuller ?

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


Question: How many months did a student in the Air Force miss school the most?

SELECT T1.month FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name ORDER BY T1.month DESC LIMIT 1

How many months did a student in the Air Force miss school the most ?


Question: List the names of entrepreneurs and their companies in descending order of money requested?

SELECT T2.Name ,  T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T1.Money_Requested

List the names of entrepreneurs and their companies in descending order of money requested ?

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


Question: Please indicate total order quantity of product Geitost and calculate the percentage of such product among all the order quantity.

SELECT SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS sum , CAST(SUM(IF(T1.ProductName = 'Geitost', 1, 0)) AS REAL) / COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID

Please indicate total order quantity of product Geitost and calculate the percentage of such product among all the order quantity .

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


Question: How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID INNER JOIN Examination AS T3 ON T3.ID = T2.ID WHERE (T2.RA = '-' OR T2.RA = '+-') AND T3.KCT = '+'

How many patients with a normal Rhuematoid Factor has a positive measure of degree of coagulation ?

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


Question: State the name of major that Vice President has joined.

SELECT T1.major_name FROM major AS T1 INNER JOIN member AS T2 ON T1.major_id = T2.link_to_major WHERE T2.position = 'Vice President'

State the name of major that Vice President has joined .


Question: Which services have been rated as "unsatisfied" in customers and services details? Give me the service_details.

SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customers_and_services AS t2 ON t1.service_id  =  t2.service_id WHERE t2.customers_and_services_details  =  "Unsatisfied"

Which services have been rated as " unsatisfied " in customers and services details ? Give me the service_details .

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


Question: Find the titles of paintings and sculpture works made by the artist whose id is 222?

SELECT T2.title FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.artistID  =  222 UNION SELECT T4.title FROM artists AS T3 JOIN sculptures AS T4 ON T3.artistID  =  T4.sculptorID WHERE T3.artistID  =  222

Find the titles of paintings and sculpture works made by the artist whose i d is 222 ?

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


Question: Which country is the youngest player from?

SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T1.Country_Id = T2.Country_Name ORDER BY T2.DOB DESC LIMIT 1

Which country is the youngest player from ?


Question: What are the names of the cities where Carl Lewis Borack competed?

SELECT T4.city_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN games_city AS T3 ON T2.games_id = T3.games_id INNER JOIN city AS T4 ON T3.city_id = T4.id WHERE T1.full_name = 'Carl Lewis Borack'

What are the names of the cities where Carl Lewis Borack competed ?

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


Question: Please list the username of the current official Facebook presence of all the current legislators that are famous or impact.

SELECT T2.facebook FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.wikipedia_id IS NOT NULL GROUP BY T2.facebook

Please list the username of the current official Facebook presence of all the current legislators that are famous or impact .

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


Question: What is the most common competition type?

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

What is the most common competition type ?


Question: What are the names of customers with credit score less than the average credit score across customers?

SELECT cust_name FROM customer WHERE credit_score  <  (SELECT avg(credit_score) FROM customer)

What are the names of customers with credit score less than the average credit score across customers ?

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


Question: What is the name of the ranking system for Teaching criteria?

SELECT T1.system_name FROM ranking_system AS T1 INNER JOIN ranking_criteria AS T2 ON T1.id = T2.ranking_system_id WHERE T2.criteria_name = 'Teaching'

What is the name of the ranking system for Teaching criteria ?

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


Question: Which airport did Republic Airline fly the most from?

SELECT T2.DEST FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Republic Airline: YX' GROUP BY T2.DEST ORDER BY COUNT(T2.DEST) DESC LIMIT 1

Which airport did Republic Airline fly the most from ?


Question: Which accounts placed orders for household payment in Pisek?

SELECT DISTINCT T2.account_id FROM trans AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN district AS T3 ON T2.district_id = T3.district_id WHERE T1.k_symbol = 'SIPO' AND T3.A2 = 'Pisek'

Which accounts placed orders for household payment in Pisek ?


Question: Find the names of the artists who have produced English songs but have never received rating higher than 8.

SELECT DISTINCT artist_name FROM song WHERE languages  =  "english" EXCEPT SELECT DISTINCT artist_name FROM song WHERE rating  >  8

Find the names of the artists who have produced English songs but have never received rating higher than 8 .

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


Question: In the reviews of September 2014. Which brand of beers obtained the highest star ratings?

SELECT DISTINCT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.StarRating = 5 AND T2.ReviewDate BETWEEN '2014-09-01' AND '2014-09-30'

In the reviews of September 2014 . Which brand of beers obtained the highest star ratings ?

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


Question: What is the total number of establishments with the highest risk level?

SELECT COUNT(license_no) FROM establishment WHERE risk_level = 3

What is the total number of establishments with the highest risk level ?

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


Question: Return the prices of wines produced before 2010.

SELECT Price FROM WINE WHERE YEAR  <  2010

Return the prices of wines produced before 2010 .


Question: For the customers who paid in the euro, what is their average total price of the transactions?

SELECT AVG(T1.Price) FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN customers AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Currency = 'EUR'

For the customers who paid in the euro , what is their average total price of the transactions ?

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


Question: How many students play each sport?

SELECT sportname ,  count(*) FROM Sportsinfo GROUP BY sportname


Question: What is the title of the episode that got the most 10-star votes?

SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T1.episode_id = T2.episode_id WHERE T2.stars = 10 ORDER BY T2.votes DESC LIMIT 1

What is the title of the episode that got the most 10 - star votes ?

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


Question: When was the project with the highest quantity went live on the site? Indicate the grade level for which the project materials are intended.

SELECT T2.date_posted, T2.grade_level FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid ORDER BY T1.item_quantity DESC LIMIT 1

When was the project with the highest quantity went live on the site ? Indicate the grade level for which the project materials are intended .

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


Question: Which company was started by the entrepreneur with the greatest height?

SELECT T1.Company FROM entrepreneur AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID ORDER BY T2.Height DESC LIMIT 1

Which company was started by the entrepreneur with the greatest height ?

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


Question: List down the record ID of records released between 2000 to 2003.

SELECT T.id FROM game_platform AS T WHERE T.release_year BETWEEN 2000 AND 2003

List down the record ID of records released between 2000 to 2003 .

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


Question: Find the email and phone number of the customers who have never filed a complaint before.

SELECT email_address ,  phone_number FROM customers WHERE customer_id NOT IN (SELECT customer_id FROM complaints)

Find the email and phone number of the customers who have never filed a complaint before .

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


Question: Please show the categories of the music festivals with count more than 1.

SELECT Category FROM music_festival GROUP BY Category HAVING COUNT(*)  >  1

Please show the categories of the music festivals with count more than 1 .

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


Question: Find the number of rooms with king bed for each decor type.

SELECT decor ,  count(*) FROM Rooms WHERE bedType = "King" GROUP BY decor;

Find the number of rooms with king bed for each decor type .

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


Question: What are the id, language and original artist of the songs whose name is not 'Love'?

SELECT id ,  LANGUAGE ,  original_artist FROM songs WHERE name != 'Love'

What are the i d , language and original artist of the songs whose name is not ' Love ' ?

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


Question: What are the full names of students minoring in department 140?

SELECT T2.Fname ,  T2.Lname FROM MINOR_IN AS T1 JOIN STUDENT AS T2 ON T1.StuID  =  T2.StuID WHERE T1.DNO  =  140

What are the full names of students minoring in department 140 ?

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


Question: Find the last name and age of the student who has allergy to both milk and cat.

SELECT lname ,  age FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "Milk" INTERSECT SELECT StuID FROM Has_allergy WHERE Allergy  =  "Cat")

Find the last name and age of the student who has allergy to both milk and cat .

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


Question: Return the issue dates of volumes by artists who are at most 23 years old?

SELECT Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.age  <=  23

Return the issue dates of volumes by artists who are at most 23 years old ?

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


Question: Please list the e-mail addresses of all the employees who wish to receive e-mail promotions from Adventureworks and selected partners.

SELECT T2.EmailAddress FROM Person AS T1 INNER JOIN EmailAddress AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.EmailPromotion = 2

Please list the e - mail addresses of all the employees who wish to receive e - mail promotions from Adventureworks and selected partners .

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


Question: How many object elements can be detected on image no. 31?

SELECT COUNT(OBJ_CLASS_ID) FROM IMG_OBJ WHERE IMG_ID = 31

How many object elements can be detected on image no . 31 ?


Question: How many order items correspond to each order id?

SELECT order_id ,  count(*) FROM Order_items GROUP BY order_id

How many order items correspond to each order i d ?

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


Question: How many conferences occur every year?

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


Question: Which wineries produce at least four wines?

SELECT Winery FROM WINE GROUP BY Winery HAVING count(*)  >=  4

Which wineries produce at least four wines ?


Question: Which apartment type code is the most common among apartments with more than one bathroom?

SELECT apt_type_code FROM Apartments WHERE bathroom_count  >  1 GROUP BY apt_type_code ORDER BY count(*) DESC LIMIT 1

Which apartment type code is the most common among apartments with more than one bathroom ?

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


Question: What is the most common device model among female users between the ages 27 to 28?

SELECT T2.device_model FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.`group` = 'F27-28' AND T1.gender = 'F' ORDER BY T2.device_id DESC LIMIT 1

What is the most common device model among female users between the ages 27 to 28 ?

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


Question: List the names of all players who have a crossing score higher than 90 and prefer their right foot.

SELECT DISTINCT T1.player_name FROM Player AS T1 JOIN Player_Attributes AS T2 ON T1.player_api_id = T2.player_api_id WHERE T2.crossing  >  90 AND T2.preferred_foot  =  "right"

List the names of all players who have a crossing score higher than 90 and prefer their right foot .

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


Question: What is the country of origin of the artist who is female and produced a song in Bangla?

SELECT T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T1.gender  =  "Female" AND T2.languages  =  "bangla"

What is the country of origin of the artist who is female and produced a song in Bangla ?

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


Question: What are all the different food allergies?

SELECT DISTINCT allergy FROM Allergy_type WHERE allergytype  =  "food"

What are all the different food allergies ?


Question: Calculate how many percent of customers were located in India.

SELECT CAST(SUM(IIF(T1.country = 'India', 1, 0)) AS REAL) * 100 / COUNT(T4.customer_id) FROM country AS T1 INNER JOIN city AS T2 ON T1.country_id = T2.country_id INNER JOIN address AS T3 ON T2.city_id = T3.city_id INNER JOIN customer AS T4 ON T3.address_id = T4.address_id

Calculate how many percent of customers were located in India .


Question: Name the first organisation established in the Paris city. State its abbreviation, full name and date of establishment.

SELECT Abbreviation, Name, Established FROM organization WHERE City = 'Paris' ORDER BY Established ASC LIMIT 1

Name the first organisation established in the Paris city . State its abbreviation , full name and date of establishment .

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


Question: Provide the eye colour of the superhero who has Karen Beecher-Duncan as their full name.

SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id WHERE T1.full_name = 'Karen Beecher-Duncan'

Provide the eye colour of the superhero who has Karen Beecher - Duncan as their full name .

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


Question: What is the current official Youtube username of Chris Van Hollen?

SELECT T2.youtube FROM current AS T1 INNER JOIN `social-media` AS T2 ON T2.bioguide = T1.bioguide_id WHERE T1.official_full_name = 'Chris Van Hollen'

What is the current official Youtube username of Chris Van Hollen ?

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


Question: In which city's station is a bike borrowed on trip ID4069?

SELECT T2.city FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.id = 4069

In which city 's station is a bike borrowed on trip ID4069 ?

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


Question: How many percent of the toss-winners decided to bowl first on the pitch from 2010 to 2016?

SELECT CAST(SUM(CASE WHEN T2.Toss_Name = 'field' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.Toss_Id) FROM Match AS T1 INNER JOIN Toss_Decision AS T2 ON T2.Toss_Id = T1.Toss_Decide WHERE T1.Match_Date BETWEEN '2010-01-01' AND '2016-12-31'

How many percent of the toss - winners decided to bowl first on the pitch from 2010 to 2016 ?

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


Question: Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London.

SELECT min(membership_amount) ,  max(membership_amount) FROM branch WHERE open_year  =  2011 OR city  =  'London'

Show minimum and maximum amount of memberships for all branches opened in 2011 or located at city London .

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


Question: How many customers live in the city of Miyakonojo?

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

How many customers live in the city of Miyakonojo ?


Question: Which molecule does the atom TR001_10 belong to? Please state whether this molecule is carcinogenic or not.

SELECT T2.molecule_id , IIF(T2.label = '+', 'YES', 'NO') AS flag_carcinogenic FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.atom_id = 'TR001_10'

Which molecule does the atom TR001_10 belong to ? Please state whether this molecule is carcinogenic or not .

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


Question: Which product gets the most reviews?

SELECT T2.Name FROM ProductReview AS T1 INNER JOIN Product AS T2 ON T1.ProductID = T2.ProductID GROUP BY T1.ProductID ORDER BY COUNT(T1.ProductReviewID) DESC LIMIT 1