Question: Show origins of all flights with destination Honolulu.

SELECT origin FROM Flight WHERE destination  =  "Honolulu"

Show origins of all flights with destination Honolulu .

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


Question: What are all the players who played in match season, sorted by college in ascending alphabetical order?

SELECT player FROM match_season ORDER BY College ASC

What are all the players who played in match season , sorted by college in ascending alphabetical order ?

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


Question: How many country uses the 2008 System of National Accounts methodology? List our their table name.

SELECT TableName  FROM Country WHERE SystemOfNationalAccounts = 'Country uses the 2008 System of National Accounts methodology.'

How many country uses the 2008 System of National Accounts methodology ? List our their table name .

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


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

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

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

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


Question: Which professor taught the most courses and what is the position of this person in the university?

SELECT T1.p_id, T1.hasPosition FROM person AS T1 INNER JOIN taughtBy AS T2 ON T1.p_id = T2.p_id GROUP BY T1.p_id ORDER BY COUNT(T2.course_id) DESC LIMIT 1

Which professor taught the most courses and what is the position of this person in the university ?

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


Question: Mention the violation type ID and description of high risk category for STARBUCKS.

SELECT DISTINCT T1.violation_type_id, T1.description FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'STARBUCKS' AND T1.risk_category = 'High Risk'

Mention the violation type ID and description of high risk category for STARBUCKS .

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


Question: Give the names, details, and data types of characteristics that are not found in any product.

SELECT characteristic_name ,  other_characteristic_details ,  characteristic_data_type FROM CHARACTERISTICS EXCEPT SELECT t1.characteristic_name ,  t1.other_characteristic_details ,  t1.characteristic_data_type FROM CHARACTERISTICS AS t1 JOIN product_characteristics AS t2 ON t1.characteristic_id  =  t2.characteristic_id

Give the names , details , and data types of characteristics that are not found in any product .

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


Question: Find the location of businesses that has business hours from 7 am to 7 pm every Wednesday.

SELECT DISTINCT T1.city 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 T2.opening_time = '7AM' AND T2.closing_time = '7PM' AND T3.day_of_week = 'Wednesday'

Find the location of businesses that has business hours from 7 am to 7 pm every Wednesday .

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


Question: Please list the names of methods with the solution path "wallerdev_htmlsharp\HtmlSharp.sln".

SELECT T2.Name FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.Path = 'wallerdev_htmlsharpHtmlSharp.sln'

Please list the names of methods with the solution path " wallerdev_htmlsharp\HtmlSharp.sln " .

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


Question: How many customers did not rent material at Mike's store?

SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.manager_staff_id = T3.staff_id WHERE T3.first_name != 'Mike'

How many customers did not rent material at Mike 's store ?

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


Question: In which country do most of the customers come from?

SELECT T.n_name FROM ( SELECT T2.n_name, COUNT(T1.c_custkey) AS num FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey GROUP BY T2.n_name ) AS T ORDER BY T.num DESC LIMIT 1

In which country do most of the customers come from ?


Question: How many research assistants of Ogdon Zywicki have an average salary?

SELECT COUNT(T1.prof_id) FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.first_name = 'Ogdon' AND T1.salary = 'med' AND T2.last_name = 'Zywicki'

How many research assistants of Ogdon Zywicki have an average salary ?

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


Question: How many reviewers listed?


Question: Among all employees, who have job level greater than 200. State the employee name and job description.

SELECT T1.fname, T1.lname, T2.job_desc FROM employee AS T1 INNER JOIN jobs AS T2 ON T1.job_id = T2.job_id WHERE T1.job_lvl > 200

Among all employees , who have job level greater than 200 . State the employee name and job description .

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


Question: Among the independent countries whose type of government is republic, what is the biggest number of deserts they have?

SELECT COUNT(T3.Desert) FROM country AS T1 INNER JOIN politics AS T2 ON T1.Code = T2.Country INNER JOIN geo_desert AS T3 ON T3.Country = T2.Country WHERE T2.Government = 'republic'

Among the independent countries whose type of government is republic , what is the biggest number of deserts they have ?

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


Question: Indicate the complete address of customers located in Lazaro Cardenas.

SELECT street_number, street_name, city, country_id FROM address WHERE city = 'Lazaro Cardenas'

Indicate the complete address of customers located in Lazaro Cardenas .


Question: How many photos does each owner has of his or her properties? List user id and number of photos.

SELECT T1.owner_user_id ,  count(*) FROM Properties AS T1 JOIN Property_Photos AS T2 ON T1.property_id  =  T2.property_id GROUP BY T1.owner_user_id;

How many photos does each owner has of his or her properties ? List user i d and number of photos .

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


Question: From 2011 to 2012, how many Australian players became the "Man of the Match"?

SELECT SUM(CASE WHEN T1.Match_Date BETWEEN '2011%' AND '2012%' THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Player AS T2 ON T2.Player_Id = T1.Man_of_the_Match INNER JOIN Country AS T3 ON T3.Country_Id = T2.Country_Name WHERE T3.Country_Name = 'Australia'

From 2011 to 2012 , how many Australian players became the " Man of the Match " ?

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


Question: For the driver who set the fastest lap speed in race No.933, where does he come from?

SELECT T1.nationality FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T2.raceId = 933 AND T2.fastestLapTime IS NOT NULL ORDER BY T2.fastestLapSpeed DESC LIMIT 1

For the driver who set the fastest lap speed in race No.933 , where does he come from ?

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


Question: How many episodes have the keyword "2d animation"?

SELECT COUNT(episode_id) FROM Keyword WHERE keyword = '2d animation';

How many episodes have the keyword " 2d animation " ?

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


Question: What are the ids of paintings that are taller than 500 and shorter than 2000?

SELECT paintingID FROM paintings WHERE height_mm  >  500 AND height_mm  <  2000

What are the ids of paintings that are taller than 500 and shorter than 2000 ?

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


Question: Among the inspections carried out in 2016, how many of them are routine?

SELECT COUNT(`date`) FROM inspections WHERE STRFTIME('%Y', `date`) = '2016' AND type = 'Routine - Unscheduled'

Among the inspections carried out in 2016 , how many of them are routine ?

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


Question: list the local authorities and services provided by all stations.

SELECT local_authority ,  services FROM station

list the local authorities and services provided by all stations .

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


Question: Provide the name of superhero with superhero ID 294.

SELECT superhero_name FROM superhero WHERE id = 294

Provide the name of superhero with superhero ID 294 .


Question: List the manufacturers that are associated with more than one club.

SELECT Manufacturer FROM club GROUP BY Manufacturer HAVING COUNT(*)  >  1

List the manufacturers that are associated with more than one club .


Question: What are the titles and categories of all the podcasts with a review that has "Absolutely fantastic" in it?

SELECT T2.title, T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.content LIKE '%Absolutely fantastic%'

What are the titles and categories of all the podcasts with a review that has " Absolutely fantastic " in it ?

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


Question: Calculate the percentage of running business among all business.

SELECT CAST(SUM(CASE WHEN active = 'true' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(business_id) FROM Business

Calculate the percentage of running business among all business .


Question: Show the book title and purchase price of the book that has had the greatest amount in orders.

SELECT T2.title ,  T2.PurchasePrice FROM Books_Order AS T1 JOIN BOOk AS T2 ON T1.isbn  =  T2.isbn GROUP BY T1.isbn ORDER BY sum(amount) DESC LIMIT 1

Show the book title and purchase price of the book that has had the greatest amount in orders .

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


Question: Which employee has created the least order and please indicates the employee's title?

SELECT T1.Title FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID GROUP BY T1.Title ORDER BY COUNT(T2.OrderID) LIMIT 1

Which employee has created the least order and please indicates the employee 's title ?

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


Question: Which orders have at least 2 products on it? List the order id and date.

SELECT T1.order_id ,  T1.date_order_placed FROM Orders AS T1 JOIN Order_items AS T2 ON T1.order_id  =  T2.order_id GROUP BY T1.order_id HAVING count(*)  >=  2

Which orders have at least 2 products on it ? List the order i d and date .

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


Question: What are the mascots for schools with enrollments above the average?

SELECT mascot FROM school WHERE enrollment  >  (SELECT avg(enrollment) FROM school)

What are the mascots for schools with enrollments above the average ?

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


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

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

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

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


Question: Find the id and surname of the driver who participated the most number of races?

SELECT T1.driverid ,  T1.surname FROM drivers AS T1 JOIN results AS T2 ON T1.driverid = T2.driverid JOIN races AS T3 ON T2.raceid = T3.raceid GROUP BY T1.driverid ORDER BY count(*) DESC LIMIT 1

Find the i d and surname of the driver who participated the most number of races ?

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


Question: Which division had the most games with more than 5 total field goals on 2020/2/22? Give the full name of the division?

SELECT T2.division, T2.name FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.Date = '2020-02-22' AND T1.FTAG + T1.FTHG > 5 ORDER BY T1.FTAG + T1.FTHG DESC LIMIT 1

Which division had the most games with more than 5 total field goals on 2020/2/22 ? Give the full name of the division ?

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


Question: What are the names of pilots whose age is below the average age, ordered by age?

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

What are the names of pilots whose age is below the average age , ordered by age ?

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


Question: Which paper ID cited the most word? In which class label does it belongs to?

SELECT T1.paper_id, T1.class_label FROM paper AS T1 INNER JOIN content AS T2 ON T1.paper_id = T2.paper_id GROUP BY T1.paper_id, T1.class_label ORDER BY COUNT(T2.word_cited_id) DESC LIMIT 1

Which paper ID cited the most word ? In which class label does it belongs to ?

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


Question: Among the players whose height is over 180, how many of them have a volley score of over 70?

SELECT COUNT(DISTINCT t1.id) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height > 180 AND t2.volleys > 70

Among the players whose height is over 180 , how many of them have a volley score of over 70 ?

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


Question: How many employees are there in the "Miami" office?

SELECT COUNT(*) FROM employee AS T1  INNER JOIN location AS T2  ON T1.locationID = T2.locationID WHERE T2.locationcity = 'Miami'

How many employees are there in the " Miami " office ?


Question: Find the details of the customer who has never used any services .

select customer_details from customers where customer_id not in (select customer_id from customers_and_services)

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


Question: What is the region of stores which have type of "Town" in the list?

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.Type = 'Town' THEN T1.Region END AS T FROM Regions T1 INNER JOIN `Store Locations` T2 ON T2.StateCode = T1.StateCode ) WHERE T IS NOT NULL

What is the region of stores which have type of " Town " in the list ?

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


Question: What product category got the least sales in the west superstore?

SELECT T2.Category FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` ORDER BY T1.Sales LIMIT 1

What product category got the least sales in the west superstore ?

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


Question: Among the users who uses a vivo device, how many of them are female and under 30?

SELECT COUNT(T1.device_id) FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' AND T2.phone_brand = 'vivo' AND T1.age < 30

Among the users who uses a vivo device , how many of them are female and under 30 ?

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


Question: List all books published by ADV Manga.

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


Question: Show the names of members and the decoration themes they have.

SELECT T1.Name ,  T2.Decoration_Theme FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID

Show the names of members and the decoration themes they have .

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


Question: Who is the sales agent of the distinct customer who paid the highest amount in the year 2004?

SELECT DISTINCT T3.lastName, T3.firstName FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber INNER JOIN employees AS T3 ON T2.salesRepEmployeeNumber = T3.employeeNumber WHERE STRFTIME('%Y', T1.paymentDate) = '2004' ORDER BY T1.amount DESC LIMIT 1

Who is the sales agent of the distinct customer who paid the highest amount in the year 2004 ?

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


Question: How many users lived in Canada according to 2018's survey?

SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2018 AND T1.questiontext = 'What country do you live in?' AND T2.AnswerText = 'Canada'

How many users lived in Canada according to 2018 's survey ?

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


Question: What is the email of the customers who place their orders with priority method?

SELECT T1.email FROM customer AS T1 INNER JOIN cust_order AS T2 ON T1.customer_id = T2.customer_id INNER JOIN shipping_method AS T3 ON T3.method_id = T2.shipping_method_id WHERE T3.method_name = 'Priority'

What is the email of the customers who place their orders with priority method ?

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


Question: How many films are in English?

SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN language AS T2 ON T1.language_id = T2.language_id WHERE T2.name = 'English'


Question: Find the product type whose average price is higher than the average price of all products.

SELECT product_type_code FROM products GROUP BY product_type_code HAVING avg(product_price)  >  (SELECT avg(product_price) FROM products)

Find the product type whose average price is higher than the average price of all products .

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


Question: How tall is the player from Yale University who picked up 28 penalty minutes in the 2005-2006 season?

SELECT T3.height_in_cm FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN height_info AS T3 ON T2.height = T3.height_id WHERE T1.SEASON = '2005-2006' AND T1.TEAM = 'Yale Univ.' AND T1.PIM = 28

How tall is the player from Yale University who picked up 28 penalty minutes in the 2005 - 2006 season ?

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


Question: Which country does Chevy C20 come from?

SELECT T3.country FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country WHERE T1.car_name = 'chevy c20'

Which country does Chevy C20 come from ?


Question: Among the Yelp_Businesses which are still running, how many of them fall under the category of "Food"?

SELECT COUNT(T3.business_id) FROM Categories AS T1 INNER JOIN Business_Categories AS T2 ON T1.category_id = T2.category_id INNER JOIN Business AS T3 ON T2.business_id = T3.business_id INNER JOIN Tips AS T4 ON T3.business_id = T4.business_id WHERE T1.category_name LIKE 'Food' AND T3.active LIKE 'TRUE'

Among the Yelp_Businesses which are still running , how many of them fall under the category of " Food " ?

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


Question: Return the average money requested across all entrepreneurs.

SELECT avg(Money_Requested) FROM entrepreneur

Return the average money requested across all entrepreneurs .


Question: Find the last name of female (sex is F) students in the descending order of age.

SELECT LName FROM STUDENT WHERE Sex  =  "F" ORDER BY Age DESC

Find the last name of female ( sex is F ) students in the descending order of age .

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


Question: Show the name of the country that has the greatest number of official languages.

SELECT T1.Name FROM countries AS T1 JOIN official_languages AS T2 ON T1.id  =  T2.country_id GROUP BY T1.id ORDER BY COUNT(*) DESC LIMIT 1

Show the name of the country that has the greatest number of official languages .

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


Question: Which cmi cross reference id is not related to any parking taxes?

SELECT cmi_cross_ref_id FROM cmi_cross_references EXCEPT SELECT cmi_cross_ref_id FROM parking_fines

Which cmi cross reference i d is not related to any parking taxes ?

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


Question: What are the total order quantities of photo products?

SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_Name  =  "photo"

What are the total order quantities of photo products ?

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


Question: Which programs are never broadcasted in the morning? Give me the names of the programs.

SELECT name FROM program EXCEPT SELECT t1.name FROM program AS t1 JOIN broadcast AS t2 ON t1.program_id  =  t2.program_id WHERE t2.Time_of_day  =  "Morning"

Which programs are never broadcasted in the morning ? Give me the names of the programs .

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


Question: Of all the shipments made by United Package throughout the year 1996, what percentage correspond to the month of September?

SELECT CAST(COUNT(CASE WHEN T1.ShippedDate LIKE '1996-09%' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.ShipVia) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package' AND T1.ShippedDate LIKE '1996%'

Of all the shipments made by United Package throughout the year 1996 , what percentage correspond to the month of September ?

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


Question: What are the name, origin and owner of each program?

SELECT name ,  origin ,  OWNER FROM program

What are the name , origin and owner of each program ?

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


Question: Please list the businesses names whose length of user review is long with business id from 1 to 20.

SELECT T4.category_name FROM Reviews AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id INNER JOIN Business_Categories AS T3 ON T2.business_id = T3.business_id INNER JOIN Categories AS T4 ON T3.category_id = T4.category_id WHERE T1.review_length LIKE 'Long' AND T3.category_id BETWEEN 1 AND 20 GROUP BY T4.category_name

Please list the businesses names whose length of user review is long with business i d from 1 to 20 .

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


Question: What are the names and ids of sailors who reserved red and blue boats?

SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  'red' INTERSECT SELECT DISTINCT T2.sid ,  T3.name FROM Boats AS T1 JOIN Reserves AS T2 ON  T1.bid  =  T2.bid JOIN Sailors AS T3 ON T2.sid  =  T3.sid WHERE T1.color  =  "blue"

What are the names and ids of sailors who reserved red and blue boats ?

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


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

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

Mention the category of events which were held at MU 215 .

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


Question: What is the total number of purchases for members with level 6?

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

What is the total number of purchases for members with level 6 ?

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


Question: For all the employees that have left the Engineering Department, what is the average time of their stay?

SELECT CAST(SUM(365 * (STRFTIME('%Y', T1.EndDate) - STRFTIME('%Y', T1.StartDate)) + 30 * (STRFTIME('%m', T1.EndDate) - STRFTIME('%m', T1.StartDate)) + STRFTIME('%d', T1.EndDate) - STRFTIME('%d', T1.StartDate)) AS REAL) / COUNT(T1.BusinessEntityID) FROM EmployeeDepartmentHistory AS T1 INNER JOIN Department AS T2 ON T1.DepartmentID = T2.DepartmentID WHERE T2.Name = 'Engineering' AND T1.EndDate IS NOT NULL

For all the employees that have left the Engineering Department , what is the average time of their stay ?

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


Question: Show the name, role code, and date of birth for the employee with name 'Armani'.

SELECT employee_name ,  role_code ,  date_of_birth FROM Employees WHERE employee_Name  =  'Armani'

Show the name , role code , and date of birth for the employee with name ' Armani ' .

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


Question: List the name of the top ten items with the most quantity available in the descending order of availability.

SELECT T1.p_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey ORDER BY T2.ps_availqty DESC LIMIT 10

List the name of the top ten items with the most quantity available in the descending order of availability .

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


Question: Find all earpads that do not use plastic construction.

SELECT earpads FROM headphone EXCEPT SELECT earpads FROM headphone WHERE construction  =  'Plastic'

Find all earpads that do not use plastic construction .


Question: List all information about the assessment notes sorted by date in ascending order.

SELECT * FROM Assessment_Notes ORDER BY date_of_notes ASC

List all information about the assessment notes sorted by date in ascending order .


Question: How many films released between 1/2/1990 and 12/30/2000 starred Uma Thurman?

SELECT COUNT(T1.movie_id) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Uma Thurman' AND T1.release_date BETWEEN '1990-01-01' AND '2000-12-31'

How many films released between 1/2/1990 and 12/30/2000 starred Uma Thurman ?

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


Question: Was Anthony Azzara's role in episode tt0629204 displayed in the credits at the end of the episode?

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

Was Anthony Azzara 's role in episode tt0629204 displayed in the credits at the end of the episode ?

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


Question: How many users are awarded with more than 5 badges?

SELECT COUNT(UserId) FROM ( SELECT UserId, COUNT(Name) AS num FROM badges GROUP BY UserId ) T WHERE T.num > 5

How many users are awarded with more than 5 badges ?

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


Question: Find the wineries that have at least four wines.

SELECT Winery FROM WINE GROUP BY Winery HAVING count(*)  >=  4

Find the wineries that have at least four wines .


Question: Find the names of all the clubs that have at least a member from the city with city code "BAL".

SELECT DISTINCT t1.clubname 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 t3.city_code  =  "BAL"

Find the names of all the clubs that have at least a member from the city with city code " BAL " .

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


Question: Find the names of the candidates whose support percentage is lower than their oppose rate.

SELECT t1.name FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id WHERE t2.support_rate  <  t2.oppose_rate

Find the names of the candidates whose support percentage is lower than their oppose rate .

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


Question: How many cities which belong to New Jersey have transported weight greater than 20000?

SELECT COUNT(*) FROM ( SELECT T2.city_id AS CITYID FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T2.state = 'New Jersey' GROUP BY T2.city_id HAVING SUM(T1.weight) > 20000 )

How many cities which belong to New Jersey have transported weight greater than 20000 ?

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


Question: Which genre has the most games? Show its id.

SELECT genre_id FROM ( SELECT T.genre_id, COUNT(T.id) FROM game AS T GROUP BY T.genre_id ORDER BY COUNT(T.id) DESC LIMIT 1 )

Which genre has the most games ? Show its i d.

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


Question: Provide the facility type and license number of establishments with the lowest risk level but failed the inspection.

SELECT DISTINCT T1.facility_type, T1.license_no FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE T1.risk_level = 1 AND T2.results = 'Fail'

Provide the facility type and license number of establishments with the lowest risk level but failed the inspection .

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


Question: When did the Senior Tool Designer, who was 33 years old at the time he was hired, stopped working in the Engineering department?

SELECT T2.EndDate FROM Employee AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T1.JobTitle = 'Senior Tool Designer' AND STRFTIME('%Y', T1.HireDate) - STRFTIME('%Y', T1.BirthDate) = 33 AND T2.EndDate IS NOT NULL

When did the Senior Tool Designer , who was 33 years old at the time he was hired , stopped working in the Engineering department ?

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


Question: What are the names of movies that get 3 star and 4 star?

SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  3 INTERSECT SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars  =  4

What are the names of movies that get 3 star and 4 star ?

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


Question: What are the first names for all students who are from the major numbered 600?

SELECT Fname FROM Student WHERE Major  =  600

What are the first names for all students who are from the major numbered 600 ?

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


Question: Which city were the Olympic games held in 1992?

SELECT T2.city_name FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T3.games_year = 1992

Which city were the Olympic games held in 1992 ?


Question: Describe what happened in the episode of award no.296.

SELECT T1.summary FROM Episode AS T1 INNER JOIN Award AS T2 ON T1.episode_id = T2.episode_id WHERE T2.award_id = 296

Describe what happened in the episode of award no.296 .


Question: Give the names of pilots who have planes in Austin and Boston.

SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin" INTERSECT SELECT T1.pilot_name FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.LOCATION  =  "Boston"

Give the names of pilots who have planes in Austin and Boston .

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


Question: Which level of courses is taught by professor ID 297?

SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 297

Which level of courses is taught by professor ID 297 ?

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


Question: List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received.

SELECT T1.App, COUNT(T1.App) COUNTNUMBER FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T2.Sentiment = 'Negative' GROUP BY T1.App ORDER BY T1.Rating LIMIT 5

List the top 5 lowest rated puzzle games and count the number of negative sentiments the games received .

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


Question: Give the name of the airline to which tail number N202NN belongs to.

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

Give the name of the airline to which tail number N202NN belongs to .

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


Question: What is the name and date of the most recent race?

SELECT name ,  date FROM races ORDER BY date DESC LIMIT 1

What is the name and date of the most recent race ?

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


Question: How many films rented to the customer RUTH MARTINEZ were returned in August, 2005?

SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'RUTH' AND T1.last_name = 'MARTINEZ' AND STRFTIME('%m',T2.return_date) = '8' AND STRFTIME('%Y', T2.return_date) = '2005'

How many films rented to the customer RUTH MARTINEZ were returned in August , 2005 ?

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


Question: What are the names of all directors who have made one movie except for the director named NULL?

SELECT director FROM Movie WHERE director != "null" GROUP BY director HAVING count(*)  =  1

What are the names of all directors who have made one movie except for the director named NULL ?

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


Question: Show cinema name, film title, date, and price for each record in schedule.

SELECT T3.name ,  T2.title ,  T1.date ,  T1.price FROM schedule AS T1 JOIN film AS T2 ON T1.film_id  =  T2.film_id JOIN cinema AS T3 ON T1.cinema_id  =  T3.cinema_id

Show cinema name , film title , date , and price for each record in schedule .

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


Question: What are the order date and product name of the order ID CA-2011-137274 from the Central region?

SELECT T1.`Order Date`, T2.`Product Name` FROM central_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T1.`Order ID` = 'CA-2011-137274' AND T2.Region = 'Central'

What are the order date and product name of the order ID CA-2011 - 137274 from the Central region ?

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


Question: What are the dates of every shipment in the database?

What are the dates of every shipment in the database ?


Question: What is the payment method code used by the most orders?

SELECT payment_method_code FROM INVOICES GROUP BY payment_method_code ORDER BY count(*) DESC LIMIT 1

What is the payment method code used by the most orders ?

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


Question: How many Summer games are there that were held in Paris?

SELECT COUNT(T3.id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id INNER JOIN games AS T3 ON T1.games_id = T3.id WHERE T2.city_name = 'Paris' AND T3.season = 'Summer'

How many Summer games are there that were held in Paris ?

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


Question: Please list the various phone number types in the following order, from most to least common among businesses.

SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID GROUP BY T2.Name ORDER BY COUNT(T2.Name) DESC

Please list the various phone number types in the following order , from most to least common among businesses .

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


Question: List the campus that have between 600 and 1000 faculty lines in year 2004.

SELECT T1.campus FROM campuses AS t1 JOIN faculty AS t2 ON t1.id  =  t2.campus WHERE t2.faculty  >=  600 AND t2.faculty  <=  1000 AND T1.year  =  2004

List the campus that have between 600 and 1000 faculty lines in year 2004 .

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


Question: What is the number of the sub categories for bikes?

SELECT COUNT(*) FROM ProductCategory AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductCategoryID = T2.ProductCategoryID WHERE T1.Name = 'Bikes'

What is the number of the sub categories for bikes ?

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


Question: What are the first names of students in room 108?

SELECT firstname FROM list WHERE classroom  =  108

What are the first names of students in room 108 ?

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


Question: How many allergies have type animal?

SELECT count(*) FROM Allergy_type WHERE allergytype  =  "animal"


Question: In users yelping since 2011 to 2013, how many of them have high count of fans?

SELECT COUNT(user_id) FROM Users WHERE user_yelping_since_year BETWEEN 2011 AND 2013 AND user_fans LIKE 'High'

In users yelping since 2011 to 2013 , how many of them have high count of fans ?

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


Question: List all the books published by BBC Audiobooks.

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

List all the books published by BBC Audiobooks .

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


Question: When and in what zip code did max temperature reach 80?

SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80

When and in what zip code did max temperature reach 80 ?

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


Question: Calculate the difference between the total number of students and the number of international international students in Univeristy of Tokyo from 2011 to 2014.

SELECT SUM(T1.num_students) - SUM(CAST(T1.num_students * T1.pct_international_students AS REAL) / 100) FROM university_year AS T1 INNER JOIN university AS T2 ON T1.university_id = T2.id WHERE T1.year BETWEEN 2011 AND 2014 AND T2.university_name = 'University of Tokyo'

Calculate the difference between the total number of students and the number of international international students in Univeristy of Tokyo from 2011 to 2014 .

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


Question: How many black border cards are only available on mtgo?

SELECT COUNT(id) FROM cards WHERE availability = 'mtgo' AND borderColor = 'black'

How many black border cards are only available on mtgo ?

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


Question: What are all of the products whose name includes the substring "Scanner"?

SELECT product FROM product WHERE product LIKE "%Scanner%"

What are all of the products whose name includes the substring " Scanner " ?

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


Question: What is the predicate class of image ID 68?

SELECT T2.PRED_CLASS FROM IMG_REL AS T1 INNER JOIN PRED_CLASSES AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.IMG_ID = 68

What is the predicate class of image ID 68 ?

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


Question: How many stars on average does a Yelp_Business in Anthem get from a user review?

SELECT AVG(T2.review_stars) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Anthem'

How many stars on average does a Yelp_Business in Anthem get from a user review ?

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


Question: What is the code of the school where the accounting department belongs to?

SELECT school_code FROM department WHERE dept_name  =  "Accounting"

What is the code of the school where the accounting department belongs to ?

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


Question: Of the matches in all seasons of the Bundesliga division, how many of them ended with a tie?

SELECT COUNT(T1.Div) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Bundesliga' AND T1.FTR = 'D'

Of the matches in all seasons of the Bundesliga division , how many of them ended with a tie ?

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


Question: Which film is rented for the most times by the customers? Please give its title.

SELECT T.title FROM ( SELECT T1.title, COUNT(T3.rental_id) AS num 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 GROUP BY T1.title ) AS T ORDER BY T.num DESC LIMIT 1

Which film is rented for the most times by the customers ? Please give its title .

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


Question: Find the id of the papers whose title has the key word 'translation'.

SELECT paper_id FROM Paper WHERE title LIKE "%translation%"

Find the i d of the papers whose title has the key word ' translation ' .

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


Question: Describe any five matches IDs that reached over ID 20.

SELECT Match_Id FROM Ball_by_Ball WHERE Over_Id = 20 GROUP BY Match_Id LIMIT 5

Describe any five matches IDs that reached over ID 20 .

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


Question: Show me the city code of two cities with a distance greater than the average.

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

Show me the city code of two cities with a distance greater than the average .

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


Question: How many stars does each of the 3 top users with the most likes in their reviews have?

SELECT T2.user_average_stars FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id GROUP BY T2.user_id ORDER BY SUM(T1.likes) DESC LIMIT 3

How many stars does each of the 3 top users with the most likes in their reviews have ?

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


Question: List the area code of the city with the highest Hispanic population.

SELECT T1.area_code FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T2.hispanic_population = ( SELECT MAX(hispanic_population) FROM zip_data )

List the area code of the city with the highest Hispanic population .

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


Question: List the school districts that have bought resources from Barnes and Noble.

SELECT T2.school_district FROM resources AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid WHERE T1.vendor_name = 'Barnes and Noble'

List the school districts that have bought resources from Barnes and Noble .

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


Question: What is the average age of employee in Adventure Works?

SELECT AVG(STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', BirthDate)) FROM Employee

What is the average age of employee in Adventure Works ?


Question: What type of store is most popular in the South?

SELECT DISTINCT CASE WHEN MAX(T2.Population) THEN T2.Type END FROM Regions AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StateCode = T1.StateCode

What type of store is most popular in the South ?

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


Question: List the file size and format for all songs that have resolution lower than 800.

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

List the file size and format for all songs that have resolution lower than 800 .

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


Question: What is the full name of the non-sales employee who made the most number of rejected purchase orders?

SELECT T2.FirstName, T2.LastName FROM PurchaseOrderHeader AS T1 INNER JOIN Person AS T2 ON T1.EmployeeID = T2.BusinessEntityID WHERE T2.PersonType = 'EM' AND T1.Status = 3 GROUP BY T2.FirstName, T2.LastName ORDER BY COUNT(T1.PurchaseOrderID) DESC LIMIT 1

What is the full name of the non - sales employee who made the most number of rejected purchase orders ?

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


Question: Who is the voice actor for the villain of the movie "Alice in Wonderland"?

SELECT T1.`voice-actor` FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T1.character LIKE '%' OR T2.villian OR '%' AND T2.movie_title = 'Alice in Wonderland'

Who is the voice actor for the villain of the movie " Alice in Wonderland " ?

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


Question: What are the type codes and descriptions of each budget type?

SELECT budget_type_code ,  budget_type_description FROM Ref_budget_codes

What are the type codes and descriptions of each budget type ?

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


Question: Who is the winner of the Best Television Episode award for the Edgar category in 2000? Include his or her name and role.

SELECT T1.name, T2.role FROM Person AS T1 INNER JOIN Award AS T2 ON T1.person_id = T2.person_id WHERE T2.year = 2000 AND T2.award_category = 'Edgar' AND T2.award = 'Best Television Episode'

Who is the winner of the Best Television Episode award for the Edgar category in 2000 ? Include his or her name and role .

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


Question: What are the names of clubs that do not have any players?

SELECT Name FROM club WHERE Club_ID NOT IN (SELECT Club_ID FROM player)

What are the names of clubs that do not have any players ?

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


Question: List the codes and descriptions for all process outcomes.

SELECT process_outcome_code ,  process_outcome_description FROM Process_outcomes

List the codes and descriptions for all process outcomes .


Question: What is the difference in the number of cities with P.O. box only and cities with Post Office among the cities with area code 787?

SELECT COUNT(CASE WHEN T2.type = 'P.O. Box Only' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.type = 'Post Office' THEN 1 ELSE NULL END) AS DIFFERENCE FROM area_code AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.area_code = 787

What is the difference in the number of cities with P.O. box only and cities with Post Office among the cities with area code 787 ?

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


Question: What proportion of sales orders are made from the United Kingdom?

SELECT CAST(SUM(CASE WHEN T2.Name = 'United Kingdom' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.SalesOrderID) FROM SalesOrderHeader AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID

What proportion of sales orders are made from the United Kingdom ?

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


Question: What is the nickname of the institution with the smallest enrollment?

SELECT T1.Nickname FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T2.Enrollment ASC LIMIT 1

What is the nickname of the institution with the smallest enrollment ?

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


Question: Show the average room count of the apartments that have booking status code "Provisional".

SELECT avg(room_count) FROM Apartment_Bookings AS T1 JOIN Apartments AS T2 ON T1.apt_id  =  T2.apt_id WHERE T1.booking_status_code  =  "Provisional"

Show the average room count of the apartments that have booking status code " Provisional " .

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


Question: How many devices are of the brand vivo?

SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE phone_brand = 'vivo'

How many devices are of the brand vivo ?

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


Question: Calculate the ratio of disabled students who have never been absent from school.

SELECT 100 * SUM(IIF(T2.month = 0, 1, 0)) AS num FROM disabled AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name = T2.name

Calculate the ratio of disabled students who have never been absent from school .

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


Question: How many cards does customer Art Turcotte have?

SELECT count(*) FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Art" AND T2.customer_last_name  =  "Turcotte"

How many cards does customer Art Turcotte have ?


Question: What is the diffrence between the number of games produced by Culture Brain that can be played on SNES and DS?

SELECT COUNT(CASE WHEN T1.platform_name = 'SNES' THEN T3.game_id ELSE NULL END) - COUNT(CASE WHEN T1.platform_name = 'DS' THEN T3.game_id ELSE NULL END) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id INNER JOIN publisher AS T4 ON T3.publisher_id = T4.id WHERE T4.publisher_name = 'Culture Brain'

What is the diffrence between the number of games produced by Culture Brain that can be played on SNES and DS ?

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


Question: For how many terms has current legislator Sherrod Brown served?

SELECT COUNT(*) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.official_full_name = 'Sherrod Brown'

For how many terms has current legislator Sherrod Brown served ?


Question: For patients with abnormal platelet level, state the number of patients with lower than normal range. How is it compare to the number of patients with higher than normal range?

SELECT SUM(CASE WHEN T2.PLT <= 100 THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.PLT >= 400 THEN 1 ELSE 0 END) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID

For patients with abnormal platelet level , state the number of patients with lower than normal range . How is it compare to the number of patients with higher than normal range ?

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


Question: Find the number of students in one classroom.

SELECT count(*) ,  classroom FROM list GROUP BY classroom

Find the number of students in one classroom .


Question: What is the percentage, by number of sales order units, for orders with quantities not greater than 3 and a discount of 0.2?

SELECT CAST(SUM(CASE WHEN OrderQty < 3 AND UnitPriceDiscount = 0.2 THEN 1 ELSE 0 END) AS REAL) / COUNT(SalesOrderID) FROM SalesOrderDetail

What is the percentage , by number of sales order units , for orders with quantities not greater than 3 and a discount of 0.2 ?

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


Question: What are the names and capitals of each country?

SELECT Country_name ,  Capital FROM country

What are the names and capitals of each country ?


Question: Among the sets whose expansion type is Commander, which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications? Indicate the id of the set.

SELECT id FROM sets WHERE type = 'commander' ORDER BY totalSetSize DESC LIMIT 1

Among the sets whose expansion type is Commander , which set has the highest total number of cards including promotional and related supplemental products but excluding Alchemy modifications ? Indicate the i d of the set .

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


Question: What are the distinct details of invoices created before 1989-09-03 or after 2007-12-25?

SELECT DISTINCT invoice_details FROM invoices WHERE invoice_date < "1989-09-03" OR invoice_date > "2007-12-25"

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


Question: How many solutions does the repository which has 1445 Forks contain?

SELECT COUNT(T2.RepoId) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = 1445

How many solutions does the repository which has 1445 Forks contain ?

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


Question: How many documents does has the author Era Kerluke written?

SELECT count(*) FROM Documents WHERE author_name  =  "Era Kerluke"

How many documents does has the author Era Kerluke written ?

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


Question: Which territory does Ms. Laura Callahan's direct supervisor work in? Give the name of the territory.

SELECT T3.TerritoryDescription FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T1.EmployeeID = ( SELECT ReportsTo FROM Employees WHERE TitleOfCourtesy = 'Ms.' AND FirstName = 'Laura' AND LastName = 'Callahan' )

Which territory does Ms. Laura Callahan 's direct supervisor work in ? Give the name of the territory .

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


Question: How many products were on the LL Road Frame Sale?

SELECT COUNT(DISTINCT ProductID) FROM SpecialOffer AS T1 INNER JOIN SpecialOfferProduct AS T2 ON T1.SpecialOfferID = T2.SpecialOfferID WHERE T1.Description = 'LL Road Frame Sale'

How many products were on the LL Road Frame Sale ?

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


Question: How many teams did the heaviest player drafted by Arizona Coyotes have played for?

SELECT COUNT(T2.TEAM) FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID INNER JOIN weight_info AS T3 ON T1.weight = T3.weight_id WHERE T1.overallby = 'Arizona Coyotes' ORDER BY T3.weight_in_lbs DESC LIMIT 1

How many teams did the heaviest player drafted by Arizona Coyotes have played for ?

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


Question: Who are the friends of Alice that are doctors?

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

Who are the friends of Alice that are doctors ?


Question: What are the names of all the races that occurred in the year 2017?

SELECT name FROM races WHERE YEAR = 2017

What are the names of all the races that occurred in the year 2017 ?

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


Question: List all the name of users that obtained the Organizer Badges.

SELECT T1.DisplayName FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T2.`Name` = 'Organizer'

List all the name of users that obtained the Organizer Badges .

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


Question: Describe the full names and graduated universities of the professors who advised Olia Rabier.

SELECT T1.first_name, T1.last_name, T1.graduate_from FROM prof AS T1 INNER JOIN RA AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T2.student_id = T3.student_id WHERE T3.f_name = 'Olia' AND T3.l_name = 'Rabier'

Describe the full names and graduated universities of the professors who advised Olia Rabier .

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


Question: What percentage of genes located in the cytoskeleton are of unknown class? And of these, how many are not conditional phenotypes?

SELECT SUM(Localization = 'cytoskeleton' AND Phenotype = 'Conditional phenotypes') , CAST(SUM(Localization = 'cytoskeleton') AS REAL) * 100 / COUNT(GeneID) FROM Genes;

What percentage of genes located in the cytoskeleton are of unknown class ? And of these , how many are not conditional phenotypes ?

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


Question: Find the busiest source airport that runs most number of routes in China.

SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid WHERE T1.country  =  'China' GROUP BY T1.name ORDER BY count(*) DESC LIMIT 1

Find the busiest source airport that runs most number of routes in China .

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


Question: What are the names of all campuses located at Chico?

SELECT campus FROM campuses WHERE LOCATION  =  "Chico"

What are the names of all campuses located at Chico ?

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


Question: Percentage of games lost out of total games played by the Houston Mavericks

SELECT CAST(SUM(lost) AS REAL) * 100 / SUM(games) FROM teams WHERE name = 'Houston Mavericks'

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


Question: Which district has the largest population?

SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1

Which district has the largest population ?


Question: What is the id of the repository with the highest number of solution path?

SELECT RepoId FROM solution GROUP BY RepoId ORDER BY COUNT(Path) DESC LIMIT 1

What is the i d of the repository with the highest number of solution path ?

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


Question: Indicate the full name of the patients who have 3 different allergies.

SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT GROUP BY T1.patient ORDER BY COUNT(DISTINCT T2.DESCRIPTION) > 3

Indicate the full name of the patients who have 3 different allergies .

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


Question: How many video game publishers have Interactive in their names?

SELECT COUNT(T.id) FROM publisher AS T WHERE T.publisher_name LIKE '%Interactive%'

How many video game publishers have Interactive in their names ?

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


Question: What is the average sale price of books written by George Orwell?

SELECT avg(saleprice) FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name  =  "George Orwell"

What is the average sale price of books written by George Orwell ?

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


Question: What is the name of the client who has ordered the greatest total amount of books?

SELECT T2.name FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient JOIN Books_Order AS T3 ON T3.idOrder  =  T1.idOrder GROUP BY T1.idClient ORDER BY sum(T3.amount) DESC LIMIT 1

What is the name of the client who has ordered the greatest total amount of books ?

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


Question: What are the ids of documents with the type code CV that do not have expenses.

SELECT document_id FROM Documents WHERE document_type_code  =  "CV" EXCEPT SELECT document_id FROM Documents_with_expenses

What are the ids of documents with the type code CV that do not have expenses .

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


Question: Where is store number 2 located?

SELECT T1.address, T1.address2, T1.district FROM address AS T1 INNER JOIN store AS T2 ON T1.address_id = T2.address_id WHERE T2.store_id = 2


Question: How many students did not have any course enrollment?

SELECT count(*) FROM Students WHERE student_id NOT IN (SELECT student_id FROM Student_Course_Enrolment)

How many students did not have any course enrollment ?

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


Question: Of the products that has a reorder inventory point of no more than 600, how many manufactured in-house products that takes 1 day to manufacture with BOM Level 4 are there?

SELECT COUNT(T1.ProductID) FROM Product AS T1 INNER JOIN BillOfMaterials AS T2 ON T1.ProductID = T2.ProductAssemblyID WHERE T1.MakeFlag = 1 AND T1.DaysToManufacture = 1 AND T2.BOMLevel = 4 AND T1.ReorderPoint <= 600

Of the products that has a reorder inventory point of no more than 600 , how many manufactured in - house products that takes 1 day to manufacture with BOM Level 4 are there ?

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


Question: What are the names of the different banks that have provided loans?

SELECT DISTINCT T1.bname FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id

What are the names of the different banks that have provided loans ?

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


Question: What proportion of suppliers are from Asia?

SELECT CAST(SUM(IIF(T1.r_name = 'ASIA', 1, 0)) AS REAL) * 100 / COUNT(T1.r_regionkey) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey INNER JOIN supplier AS T3 ON T2.n_nationkey = T3.s_nationkey

What proportion of suppliers are from Asia ?


Question: Find the last name of the author with first name "Amal".

SELECT lname FROM authors WHERE fname  =  "Amal"

Find the last name of the author with first name " Amal " .

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


Question: How many schools which have suburban metro are there in Bethlehem?

SELECT COUNT(schoolid) FROM projects WHERE school_city = 'Bethlehem' AND school_metro = 'suburban'

How many schools which have suburban metro are there in Bethlehem ?

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


Question: What is the name of the planet with the most shipments?

SELECT T2.Name FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID GROUP BY T1.Planet ORDER BY count(*) DESC LIMIT 1;

What is the name of the planet with the most shipments ?

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


Question: What is the average number of bedrooms of all apartments?

SELECT avg(bedroom_count) FROM Apartments

What is the average number of bedrooms of all apartments ?


Question: What is the percentage of male students in the navy department?

SELECT CAST(COUNT(T2.name) AS REAL) * 100 / COUNT(T1.name) FROM enlist AS T1 LEFT JOIN male AS T2 ON T1.`name` = T2.`name` WHERE T1.organ = 'navy'

What is the percentage of male students in the navy department ?


Question: Find the name and account balance of the customers who have loans with a total amount of more than 5000.

SELECT T1.cust_name ,  T1.acc_type FROM customer AS T1 JOIN loan AS T2 ON T1.cust_id  =  T2.cust_id GROUP BY T1.cust_name HAVING sum(T2.amount)  >  5000

Find the name and account balance of the customers who have loans with a total amount of more than 5000 .

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


Question: List the actor's last name that starred the film with the description of "A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies".

SELECT T1.last_name FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T3.description = 'A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies'

List the actor 's last name that starred the film with the description of " A Thoughtful Drama of a Composer And a Feminist who must Meet a Secret Agent in The Canadian Rockies " .

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


Question: What is the name of the department with the fewest professors?

SELECT T2.dept_name FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code GROUP BY T1.dept_code ORDER BY count(*) LIMIT 1

What is the name of the department with the fewest professors ?


Question: What are the official languages used in Belgium?

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Belgium' AND T2.IsOfficial = 'T'

What are the official languages used in Belgium ?


Question: In papers with journal IDs from 200 to 300 and with its short name starts with A, what is the percentage of papers with conference ID of 0?

SELECT CAST(SUM(CASE WHEN T1.ConferenceId = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.ConferenceId) FROM Paper AS T1 INNER JOIN Journal AS T2 ON T1.JournalId = T2.Id WHERE T1.JournalId BETWEEN 200 AND 300 AND T2.ShortName LIKE 'A%'

In papers with journal IDs from 200 to 300 and with its short name starts with A , what is the percentage of papers with conference ID of 0 ?

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


Question: Count the number of B-52 Bombers owned by pilots under 35.

SELECT count(*) FROM pilotskills WHERE age  <  35 AND plane_name  =  'B-52 Bomber'

Count the number of B-52 Bombers owned by pilots under 35 .

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


Question: Find the total value and number of boxes for each content type.

SELECT sum(value) ,  count(*) ,  CONTENTS FROM boxes GROUP BY CONTENTS

Find the total value and number of boxes for each content type .

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


Question: How many workshops did each author submit to? Return the author name and the number of workshops.

SELECT T2.Author ,  COUNT(DISTINCT T1.workshop_id) FROM acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID  =  T2.Submission_ID GROUP BY T2.Author

How many workshops did each author submit to ? Return the author name and the number of workshops .

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


Question: Which authors have written a paper with title containing the word "Monadic"? Return their last names.

SELECT t1.lname FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid WHERE t3.title LIKE "%Monadic%"

Which authors have written a paper with title containing the word " Monadic " ? Return their last names .

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


Question: For the players who belongs to the east conference, please list the name of the college they went to.

SELECT DISTINCT T1.college FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T2.conference = 'East'

For the players who belongs to the east conference , please list the name of the college they went to .

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


Question: Please list the title of the pages on which the word "grec" occurred for over 20 times.

SELECT T3.title FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec' AND T2.occurrences > 20

Please list the title of the pages on which the word " grec " occurred for over 20 times .

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


Question: Among the Olympic games held in Los Angeles, what is the name of the Olympic game that has the most number of competitors?

SELECT T1.games_name FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_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 T4.city_name = 'Los Angeles' GROUP BY T1.id ORDER BY COUNT(T2.person_id) DESC LIMIT 1

Among the Olympic games held in Los Angeles , what is the name of the Olympic game that has the most number of competitors ?

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


Question: What is the average rating for each episode in season 9?

SELECT SUM(rating) / COUNT(episode_id) FROM Episode WHERE season = 9

What is the average rating for each episode in season 9 ?

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


Question: List down the name of countries whereby English is their official language.

SELECT T1.Name FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' AND T2.IsOfficial = 'T'

List down the name of countries whereby English is their official language .

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


Question: Name the sales team name who had orders with the greatest net profit in 2020.

SELECT T2.`Sales Team` FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T1.OrderDate LIKE '%/%/20' GROUP BY T2.`Sales Team` ORDER BY SUM(REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '')) DESC LIMIT 1

Name the sales team name who had orders with the greatest net profit in 2020 .

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


Question: Please indicate the total price of order key 32.

SELECT o_totalprice FROM orders WHERE o_orderkey = 32

Please indicate the total price of order key 32 .

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


Question: What are the names, codes, states, and countries for all cities?

SELECT city_name ,  city_code ,  state ,  country FROM City

What are the names , codes , states , and countries for all cities ?

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


Question: What is the percentage of words in the Catalan language that have a repetition of more than 16,000 times?

SELECT CAST(COUNT(CASE WHEN occurrences > 16000 THEN lid ELSE NULL END) AS REAL) * 100 / COUNT(lid) FROM langs_words

What is the percentage of words in the Catalan language that have a repetition of more than 16,000 times ?

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


Question: What is the percentage of respositories that receive more than 2,000 stars?

SELECT CAST(SUM(CASE WHEN Stars > 2000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(Stars) FROM Repo

What is the percentage of respositories that receive more than 2,000 stars ?


Question: On what dates were books ordered at a price of 16.54?

SELECT T1.order_date FROM cust_order AS T1 INNER JOIN order_line AS T2 ON T1.order_id = T2.order_id WHERE T2.price = 16.54

On what dates were books ordered at a price of 16.54 ?

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


Question: What are the different names for each station that has ever had 7 bikes available?

SELECT DISTINCT T1.name FROM station AS T1 JOIN status AS T2 ON T1.id  =  T2.station_id WHERE T2.bikes_available  =  7

What are the different names for each station that has ever had 7 bikes available ?

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


Question: Among the most rated UK movies, how many of them has running time of less than 2?

SELECT COUNT(T1.movieid) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'UK' AND T2.runningtime < 2 AND T1.rating = 5

Among the most rated UK movies , how many of them has running time of less than 2 ?

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


Question: What are the names of every person who has a friend over 40 and under 30?

SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  >  40) INTERSECT SELECT T1.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend IN (SELECT name FROM Person WHERE age  <  30)

What are the names of every person who has a friend over 40 and under 30 ?

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


Question: Tally the product name and quantity of the first ten sales.

SELECT T3.Name, T2.Quantity FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.SalesID BETWEEN 1 AND 10

Tally the product name and quantity of the first ten sales .

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


Question: How many sailors whose name starts with letter D exist ?

select count(*) from sailors where name like 'd%'

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


Question: What percentage of male employees hired throughout the years 2009 are married?

SELECT CAST(SUM(CASE WHEN MaritalStatus = 'M' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(BusinessEntityID) FROM Employee WHERE SUBSTR(HireDate, 1, 4) = '2009' AND Gender = 'M'

What percentage of male employees hired throughout the years 2009 are married ?

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


Question: Find the number of airports whose name contain the word 'International'.

SELECT count(*) FROM airports WHERE name LIKE '%International%'

Find the number of airports whose name contain the word ' International ' .

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


Question: How many papers whose authors include Thomas Wiegand were published in 1995?

SELECT COUNT(T2.Title) FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Thomas Wiegand' AND T2.Year = 1995

How many papers whose authors include Thomas Wiegand were published in 1995 ?

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


Question: What percentage of Slovakian gas stations are premium?

SELECT CAST(SUM(IIF(Segment = 'Premium', 1, 0)) AS FLOAT) * 100 / COUNT(GasStationID) FROM gasstations WHERE Country = 'SVK'

What percentage of Slovakian gas stations are premium ?


Question: List the area and county of all appelations.

List the area and county of all appelations .


Question: Calculate the average number of female students who are disabled and who joined Foreign Legion organization.

SELECT CAST(SUM(IIF(T3.name IS NULL, 1, 0)) AS REAL) / COUNT(T1.name) FROM disabled AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T2.name = T3.name WHERE T2.organ = 'foreign_legion'

Calculate the average number of female students who are disabled and who joined Foreign Legion organization .

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


Question: List all the cities where Zachery Hicks transported goods.

SELECT DISTINCT T3.city_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id INNER JOIN city AS T3 ON T1.city_id = T3.city_id WHERE T2.first_name = 'Zachery' AND T2.last_name = 'Hicks'

List all the cities where Zachery Hicks transported goods .


Question:
cards are not directly linked to language but through table 'set'. you need to add set in covered table & rephrase your question
What are the languages available for the set that card 'Angel of Mercy' is in?

SELECT language FROM set_translations WHERE id IN ( SELECT id FROM cards WHERE name = 'Angel of Mercy' )

cards are not directly linked to language but through table ' set ' . you need to add set in covered table & rephrase your question What are the languages available for the set that card ' Angel of Mercy ' is in ?

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


Question: For all the budgets for "November Meeting", how many of them had exceeded the budget?

SELECT COUNT(T2.event_id) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T2.event_name = 'November Meeting' AND T1.remaining < 0

For all the budgets for " November Meeting " , how many of them had exceeded the budget ?

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


Question: Count the number of exhibitions that happened in or after 2005.

SELECT count(*) FROM exhibition WHERE YEAR  >=  2005

Count the number of exhibitions that happened in or after 2005 .


Question: What are the different names, prices, and descriptions for all products bought by female customers?

SELECT DISTINCT T1.product_name ,  T1.product_price ,  T1.product_description FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id JOIN Orders AS T3 ON T2.order_id  =  T3.order_id JOIN Customers AS T4 ON T3.customer_id  =  T4.customer_id WHERE T4.gender_code  =  'Female'

What are the different names , prices , and descriptions for all products bought by female customers ?

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


Question: What are the names of all employees who have a certificate to fly Boeing 737-800?

SELECT T1.name FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid JOIN Aircraft AS T3 ON T3.aid  =  T2.aid WHERE T3.name  =  "Boeing 737-800"

What are the names of all employees who have a certificate to fly Boeing 737 - 800 ?

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


Question: Show all home cities except for those having a driver older than 40.

SELECT home_city FROM driver EXCEPT SELECT home_city FROM driver WHERE age  >  40

Show all home cities except for those having a driver older than 40 .

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


Question: What are all the receipt numbers that have a good with a price above 10 or have the earliest date?

SELECT T1.Receipt FROM items AS T1 JOIN goods AS T2 ON T1.item  =  T2.id WHERE T2.price  >  10 UNION SELECT ReceiptNumber FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date LIMIT 1)

What are all the receipt numbers that have a good with a price above 10 or have the earliest date ?

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


Question: How many cities are in counties that have populations of over 20000?

SELECT count(*) FROM city WHERE county_ID IN (SELECT county_ID FROM county_public_safety WHERE population  >  20000)

How many cities are in counties that have populations of over 20000 ?

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


Question: What is the name of the player with the highest earnings?

SELECT Name FROM player ORDER BY Earnings DESC LIMIT 1

What is the name of the player with the highest earnings ?

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


Question: What are the first names and last names of the students who are 18 years old and have vice president votes.

SELECT DISTINCT T1.Fname ,  T1.LName FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.VICE_President_VOTE WHERE T1.age  =  18

What are the first names and last names of the students who are 18 years old and have vice president votes .

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


Question: Give the X and Y coordinates of the sample object of image ID 23 that has the 'cast' attribute class.

SELECT T3.OBJ_SAMPLE_ID, T3.X, T3.Y FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.IMG_ID = 23 AND T1.ATT_CLASS = 'cast'

Give the X and Y coordinates of the sample object of image ID 23 that has the ' cast ' attribute class .

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


Question: How many keywords are there in the episode Disciple?

SELECT COUNT(T2.keyword) FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.title = 'Disciple'

How many keywords are there in the episode Disciple ?


Question: How many businesses of Yelp are in Scottsdale?

SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Scottsdale'

How many businesses of Yelp are in Scottsdale ?


Question: What are the names of all songs that are ordered by their resolution numbers?

SELECT song_name FROM song ORDER BY resolution

What are the names of all songs that are ordered by their resolution numbers ?

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


Question: List the order dates of all the bookings.

List the order dates of all the bookings .


Question: Who is the author of the book with the biggest page count?

SELECT T3.author_name FROM book AS T1 INNER JOIN book_author AS T2 ON T1.book_id = T2.book_id INNER JOIN author AS T3 ON T3.author_id = T2.author_id ORDER BY T1.num_pages DESC LIMIT 1

Who is the author of the book with the biggest page count ?

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


Question: Find the ids of all distinct customers who made order after some orders that were Cancelled.

SELECT DISTINCT customer_id FROM Customer_Orders WHERE order_date  >  (SELECT min(order_date) FROM Customer_Orders WHERE order_status_code  =  "Cancelled")

Find the ids of all distinct customers who made order after some orders that were Cancelled .

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


Question: Please list the levels of the all courses taught by teacher no.79.

SELECT T1.courseLevel FROM course AS T1 INNER JOIN taughtBy AS T2 ON T1.course_id = T2.course_id WHERE T2.p_id = 79

Please list the levels of the all courses taught by teacher no.79 .

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


Question: When was the game ID 156 released?

SELECT T1.release_year FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id WHERE T2.game_id = 156

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


Question: How many volcanic mountains are there in countries whose population is no more than 5000000?

SELECT COUNT(DISTINCT T3.Name) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country INNER JOIN mountain AS T3 ON T3.Name = T2.Mountain WHERE T3.Type = 'volcanic' AND T1.Population <= 5000000

How many volcanic mountains are there in countries whose population is no more than 5000000 ?

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


Question: Calculate the GPA of the semester for Laughton Antonio.

SELECT CAST(SUM(T3.credit * CASE T1.grade WHEN 'A' THEN 4 WHEN 'B' THEN 3 WHEN 'C' THEN 2 WHEN 'D' THEN 1 ELSE 1 END) AS REAL) / COUNT(T3.credit) FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T2.f_name = 'Laughton' AND T2.l_name = 'Antonio'

Calculate the GPA of the semester for Laughton Antonio .


Question: How many patients have a normal anti-SSB and are diagnosed with SLE in the examination?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR '0' AND T1.Diagnosis = 'SLE'

How many patients have a normal anti - SSB and are diagnosed with SLE in the examination ?

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


Question: What are the ids and full names of customers who hold two or more cards?

SELECT T1.customer_id ,  T2.customer_first_name ,  T2.customer_last_name FROM Customers_cards AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2

What are the ids and full names of customers who hold two or more cards ?


Question: For each product with some problems, list the count of problems and the product id.

SELECT count(*) ,  T2.product_id FROM problems AS T1 JOIN product AS T2 ON T1.product_id = T2.product_id GROUP BY T2.product_id

For each product with some problems , list the count of problems and the product i d.

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


Question: How many orders were handled by Michael Suyama. State the order ID.

SELECT COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE T1.FirstName = 'Michael' AND T1.LastName = 'Suyama'

How many orders were handled by Michael Suyama . State the order ID .

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


Question: What are the ids and names of the web accelerators that are compatible with two or more browsers?

SELECT T1.id ,  T1.Name FROM web_client_accelerator AS T1 JOIN accelerator_compatible_browser AS T2 ON T2.accelerator_id  =  T1.id GROUP BY T1.id HAVING count(*)  >=  2

What are the ids and names of the web accelerators that are compatible with two or more browsers ?

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


Question: What are the names of all clubs that do not have any players?

SELECT name FROM CLub WHERE Club_ID NOT IN (SELECT Club_ID FROM player)

What are the names of all clubs that do not have any players ?

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


Question: What are the names of all products?


Question: What are the names of all students taking a course who received an A or C?

SELECT T1.stu_fname ,  T1.stu_lname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num  =  T2.stu_num WHERE T2.enroll_grade  =  'C' OR T2.enroll_grade  =  'A'

What are the names of all students taking a course who received an A or C ?

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


Question: What is the average duration time of the films starring PENELOPE GUINESS?

SELECT AVG(T3.length) FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'PENELOPE' AND T1.last_name = 'GUINESS'

What is the average duration time of the films starring PENELOPE GUINESS ?

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


Question: What is the rate of increase of users with a current mental disorder from 2019's survey to 2016's survey?

SELECT CAST(( SELECT COUNT(T2.UserID) FROM Question AS T1 INNER JOIN Answer AS T2 ON T1.questionid = T2.QuestionID WHERE T2.SurveyID = 2019 AND T1.questiontext LIKE 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' ) - ( 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 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' ) AS REAL) * 100 / ( 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 'Do you currently have a mental health disorder?' AND T2.AnswerText = 'Yes' )

What is the rate of increase of users with a current mental disorder from 2019 's survey to 2016 's survey ?

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


Question: What are the names of drivers, returned in alphbetical order?

What are the names of drivers , returned in alphbetical order ?


Question: Return the total and minimum enrollments across all schools.

SELECT sum(enrollment) ,  min(enrollment) FROM university

Return the total and minimum enrollments across all schools .


Question: Among the patients who has a normal anti-scl70, how many of them are female and does not have any symptom?

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.SC170 = 'negative' OR T2.SC170 = '0') AND T1.SEX = 'F' AND T3.Symptoms IS NULL

Among the patients who has a normal anti - scl70 , how many of them are female and does not have any symptom ?

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


Question: What is the campus fee for San Jose State University in 1996?

SELECT campusfee FROM campuses AS T1 JOIN csu_fees AS T2 ON T1.id  =  t2.campus WHERE t1.campus  =  "San Jose State University" AND T2.year  =  1996

What is the campus fee for San Jose State University in 1996 ?

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


Question: What are the ranks of captains that are both in the Cutter and Armed schooner classes?

SELECT rank FROM captain WHERE CLASS  =  'Cutter' INTERSECT SELECT rank FROM captain WHERE CLASS  =  'Armed schooner'

What are the ranks of captains that are both in the Cutter and Armed schooner classes ?

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


Question: Show the date valid from and the date valid to for the card with card number '4560596484842'.

SELECT date_valid_from ,  date_valid_to FROM Customers_cards WHERE card_number  =  "4560596484842"

Show the date valid from and the date valid to for the card with card number ' 4560596484842 ' .

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


Question: Find the number of different airports which are the destinations of the American Airlines.

SELECT count(DISTINCT dst_apid) FROM airlines AS T1 JOIN routes AS T2 ON T1.alid  =  T2.alid WHERE T1.name  =  'American Airlines'

Find the number of different airports which are the destinations of the American Airlines .

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


Question: What are the average, minimum, and maximum ticket prices for exhibitions that happened prior to 2009?

SELECT avg(ticket_price) ,  min(ticket_price) ,  max(ticket_price) FROM exhibition WHERE YEAR  <  2009

What are the average , minimum , and maximum ticket prices for exhibitions that happened prior to 2009 ?

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


Question: Show all agency ids and details.

SELECT agency_id ,  agency_details FROM Agencies


Question: Name all products and total quantity for each item for shopping cart ID 14951.

SELECT T1.Name, T2.Quantity FROM Product AS T1 INNER JOIN ShoppingCartItem AS T2 ON T1.ProductID = T2.ProductID WHERE T2.ShoppingCartID = 14951

Name all products and total quantity for each item for shopping cart ID 14951 .

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


Question: How many students has the longest absense from school for 5 months?

SELECT COUNT(name) FROM longest_absense_from_school WHERE month = 5

How many students has the longest absense from school for 5 months ?

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


Question: How long was Mr. Major D'Amore prescribed with Amoxicillin 250 MG / Clavulanate 125 MG [Augmentin]?

SELECT strftime('%J', T2.STOP) - strftime('%J', T2.START) AS days FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = ' Amoxicillin 250 MG / Clavulanate 125 MG [Augmentin]' AND T1.first = 'Major' AND T1.last = 'D''Amore'

How long was Mr. Major D'Amore prescribed with Amoxicillin 250 MG / Clavulanate 125 MG [ Augmentin ] ?

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


Question: Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti-scl70.

SELECT T1.ID FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SC170 IN ('negative','0') AND T2.Date > 1997-01-01

Please list the IDs of the patients who had the examination done after 1997/1/1 and had a normal anti - scl70 .

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


Question: Find the name of physicians whose position title contains the word 'senior'.

SELECT name FROM physician WHERE POSITION LIKE '%senior%'

Find the name of physicians whose position title contains the word ' senior ' .

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


Question: Please give the contact name for Tokyo Traders.

SELECT ContactName FROM Suppliers WHERE CompanyName = 'Tokyo Traders'

Please give the contact name for Tokyo Traders .

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


Question: What are the ratings of the film featuring behind the scenes?

SELECT rating FROM film WHERE special_features LIKE '%Behind the Scenes%'

What are the ratings of the film featuring behind the scenes ?

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


Question: Show the number of documents with document type code CV or BK.

SELECT count(*) FROM All_documents WHERE document_type_code  =  "CV" OR document_type_code  =  "BK"

Show the number of documents with document type code CV or BK .

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


Question: List titles of all books published by an author whose name contains the string 'Plato'?

SELECT T1.title FROM Book AS T1 JOIN Author_book AS T2 ON T1.isbn  =  T2.isbn JOIN Author AS T3 ON T2.Author  =  T3.idAuthor WHERE T3.name LIKE "%Plato%"

List titles of all books published by an author whose name contains the string ' Plato ' ?

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


Question: What is the peak height of the highest volcanic type of mountain? Give it's name.

SELECT Height, Name FROM mountain WHERE Type = 'volcanic' ORDER BY Height DESC LIMIT 1

What is the peak height of the highest volcanic type of mountain ? Give it 's name .

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


Question: List out the set name of the set code "ALL".

SELECT name FROM sets WHERE code = 'ALL'

List out the set name of the set code " ALL " .

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


Question: How many customers live in Prague city?

SELECT count(*) FROM customers WHERE city = "Prague";

How many customers live in Prague city ?


Question: Find the id and number of shops for the company that produces the most expensive furniture.

SELECT t1.manufacturer_id ,  t1.num_of_shops FROM manufacturer AS t1 JOIN furniture_manufacte AS t2 ON t1.manufacturer_id  =  t2.manufacturer_id ORDER BY t2.Price_in_Dollar DESC LIMIT 1

Find the i d and number of shops for the company that produces the most expensive furniture .

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


Question: Identify the top customer of the store located in Gilbert, Arizona based on net profit associated with the customer relationship in 2019.

SELECT T1.`Customer Names` FROM Customers AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._CustomerID = T1.CustomerID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T3.`City Name` = 'Gilbert' AND T2.ProcuredDate LIKE '%/%/19' ORDER BY REPLACE(T2.`Unit Price`, ',', '') - REPLACE(T2.`Unit Cost`, ',', '') DESC LIMIT 1

Identify the top customer of the store located in Gilbert , Arizona based on net profit associated with the customer relationship in 2019 .

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


Question: Among the shipments delivered by Maria Craft, how many shipments were delivered in 2017?

SELECT COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE T2.first_name = 'Maria' AND T2.last_name = 'Craft' AND STRFTIME('%Y', T1.ship_date) = '2017'

Among the shipments delivered by Maria Craft , how many shipments were delivered in 2017 ?

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


Question: Who are the different players and how many years has each played?

SELECT Player ,  Years_Played FROM player

Who are the different players and how many years has each played ?

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


Question: At what age did Michael Fred Phelps, II join the Olympics?

SELECT T2.age FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id WHERE T1.full_name = 'Michael Fred Phelps, II' ORDER BY T2.age LIMIT 1

At what age did Michael Fred Phelps , II join the Olympics ?

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


Question: Identify by their id all the devices that are used by women who are in the age range of 29 to 31 years.

SELECT device_id FROM gender_age_train WHERE age BETWEEN 29 AND 31 AND gender = 'F'

Identify by their i d all the devices that are used by women who are in the age range of 29 to 31 years .

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


Question: What are the ids of the problems reported after the date of any problems reported by Rylan Homenick?

SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported  >  ( SELECT max(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick" )

What are the ids of the problems reported after the date of any problems reported by Rylan Homenick ?

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


Question: List the course name of courses sorted by credits.

SELECT CName FROM COURSE ORDER BY Credits

List the course name of courses sorted by credits .


Question: Show the maximum amount of transaction.

SELECT max(amount_of_transaction) FROM TRANSACTIONS

Show the maximum amount of transaction .


Question: Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling.

SELECT T1.account_name ,  T1.other_account_details FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T2.customer_first_name  =  "Meaghan" AND T2.customer_last_name  =  "Keeling"

Show the account name and other account detail for all accounts by the customer with first name Meaghan and last name Keeling .

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


Question: What's the title of the episode that got the most 7-star votes in star score?

SELECT T1.title FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T2.stars = 7 ORDER BY T2.votes DESC LIMIT 1;

What 's the title of the episode that got the most 7 - star votes in star score ?

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


Question: Give the title of the course offered in Chandler during the Fall of 2010.

SELECT T1.title FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE building  =  'Chandler' AND semester  =  'Fall' AND YEAR  =  2010

Give the title of the course offered in Chandler during the Fall of 2010 .

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


Question: What is the total checking balance in all accounts?

What is the total checking balance in all accounts ?


Question: Show the name of country id 66.

SELECT country_name FROM country WHERE id = 66

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


Question: Show the names of all the clients with no booking.

SELECT Customer_Name FROM Clients EXCEPT SELECT T2.Customer_Name FROM Bookings AS T1 JOIN Clients AS T2 ON T1.Customer_ID  =  T2.Client_ID

Show the names of all the clients with no booking .


Question: Compute the total order quantities of the product "photo".

SELECT sum(T1.Order_Quantity) FROM ORDER_ITEMS AS T1 JOIN Products AS T2 ON T1.Product_ID  =  T2.Product_ID WHERE T2.Product_Name  =  "photo"

Compute the total order quantities of the product " photo " .

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


Question: What is the average age of the female students with secretary votes in the spring election cycle?

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

What is the average age of the female students with secretary votes in the spring election cycle ?

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


Question: Find the name of customer who has the lowest credit score.

SELECT cust_name FROM customer ORDER BY credit_score LIMIT 1

Find the name of customer who has the lowest credit score .

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