Question: Indicate the page id of Wikipedia about Catalan language of all the pages that have a numeric value in their title.

SELECT pid, title FROM pages WHERE title LIKE '%0%' OR '%1%' OR '%2%' OR '%3%' OR '%4%' OR '%5%' OR '%6%' OR '%7%' OR '%8%' OR '%9%'

Indicate the page i d of Wikipedia about Catalan language of all the pages that have a numeric value in their title .

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


Question: What is the name and city of the airport from most of the routes start?

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

What is the name and city of the airport from most of the routes start ?

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


Question: Among the patients with normal anti-SM, how many of them does not have thrombosis?

SELECT COUNT(T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SM IN ('negative','0') AND T1.Thrombosis = 0

Among the patients with normal anti - SM , how many of them does not have thrombosis ?

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


Question: How many persons in total have participated in 12 meter Mixed Sailing competitions?

SELECT COUNT(T1.competitor_id) FROM competitor_event AS T1 INNER JOIN event AS T2 ON T1.event_id = T2.id INNER JOIN sport AS T3 ON T2.sport_id = T3.id WHERE T2.event_name = 'Sailing Mixed 12 metres'

How many persons in total have participated in 12 meter Mixed Sailing competitions ?

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


Question: How many American drivers have puncture status.

SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN results AS T2 on T1.driverId = T2.driverId INNER JOIN status AS T3 on T2.statusId = T3.statusId WHERE T3.status = 'Puncture' AND T1.nationality = 'American'

How many American drivers have puncture status .

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


Question: Among all closed businesses in Avondale, AZ what percent have obtained a 'wonderful experience' rating of the business.

SELECT CAST(SUM(CASE WHEN stars > 3 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(stars) FROM Business WHERE city = 'Avondale' AND active = 'false'

Among all closed businesses in Avondale , AZ what percent have obtained a ' wonderful experience ' rating of the business .

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


Question: What are the maximum and minimum sales of the companies whose industries are not "Banking".

SELECT max(Sales_billion) ,  min(Sales_billion) FROM Companies WHERE Industry != "Banking"

What are the maximum and minimum sales of the companies whose industries are not " Banking " .

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


Question: What percentage of journals whose short name begins with ANN were published in the paper database in 1989?

SELECT CAST((SUM(CASE WHEN T1.ShortName LIKE 'ANN%' THEN 1 ELSE 0 END)) AS REAL) * 100 / COUNT(T1.ShortName) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 1989

What percentage of journals whose short name begins with ANN were published in the paper database in 1989 ?

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


Question: Return the names and ids of all platforms with the download rank of 1.

SELECT Platform_name ,  Platform_ID FROM platform WHERE Download_rank  =  1

Return the names and ids of all platforms with the download rank of 1 .

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


Question: Find the building, room number, semester and year of all courses offered by Psychology department sorted by course titles.

SELECT T2.building ,  T2.room_number ,  T2.semester ,  T2.year FROM course AS T1 JOIN SECTION AS T2 ON T1.course_id  =  T2.course_id WHERE T1.dept_name  =  'Psychology' ORDER BY T1.title

Find the building , room number , semester and year of all courses offered by Psychology department sorted by course titles .

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


Question: What is the quantity of the mountains does Japan have?

SELECT COUNT(DISTINCT T2.Mountain) FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'Japan'

What is the quantity of the mountains does Japan have ?


Question: Provide the name of the author who is affiliated with the organization named 'ABB Electrical Machines'.

SELECT Name FROM Author WHERE Affiliation = 'ABB Electrical Machines'

Provide the name of the author who is affiliated with the organization named ' ABB Electrical Machines ' .

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


Question: Find the type code of the most frequently used policy.

SELECT policy_type_code FROM policies GROUP BY policy_type_code ORDER BY count(*) DESC LIMIT 1

Find the type code of the most frequently used policy .

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


Question: Find the name of accounts whose checking balance is higher than corresponding saving balance.

SELECT T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T2.balance  >  T3.balance

Find the name of accounts whose checking balance is higher than corresponding saving balance .

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


Question: Provide the eye colours of the heroes whose skin colours are gold.

SELECT T2.colour FROM superhero AS T1 INNER JOIN colour AS T2 ON T1.eye_colour_id = T2.id INNER JOIN colour AS T3 ON T1.skin_colour_id = T3.id WHERE T3.colour = 'Gold'

Provide the eye colours of the heroes whose skin colours are gold .

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


Question: What are the names of the games published by American Softworks?

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

What are the names of the games published by American Softworks ?

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


Question: For the patients who are diagnosed with SJS, how many of them have a normal level of total protein?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T1.Diagnosis = 'SJS' AND T2.TP > 6.0 AND T2.TP < 8.5

For the patients who are diagnosed with SJS , how many of them have a normal level of total protein ?

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


Question: What are the document object ids of the related to the document owned by Ransom ?

select t1.document_object_id from document_subset_members as t1 join document_objects as t2 on t1.document_object_id  =  t2.document_object_id where t2.owner  =  'ransom'

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


Question: List down the product id for products with the highest quantity.

SELECT DISTINCT ProductID FROM Sales WHERE Quantity = ( SELECT MAX(Quantity) FROM Sales )

List down the product i d for products with the highest quantity .

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


Question: List the full name of players who are drafted from round 1 in 1973 but not born in USA.

SELECT T1.firstName, T1.middleName, T1.lastName FROM players AS T1 INNER JOIN draft AS T2 ON T1.playerID = T2.playerID WHERE T2.draftRound = 1 AND T1.birthCountry != 'USA' AND T2.draftYear = 1973

List the full name of players who are drafted from round 1 in 1973 but not born in USA .

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


Question: How many trains have 'Express' in their names?

SELECT count(*) FROM train WHERE name LIKE "%Express%"

How many trains have ' Express ' in their names ?

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


Question: Who is the person who appeared the most in the series? Calculate in percentage how many times he or she appeared.

SELECT T2.person_id, CAST(COUNT(T2.person_id) AS REAL) * 100 / ( SELECT COUNT(T2.person_id) AS num FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id ) AS per FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id GROUP BY T2.person_id ORDER BY COUNT(T2.person_id) DESC LIMIT 1

Who is the person who appeared the most in the series ? Calculate in percentage how many times he or she appeared .

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


Question: What is the title of the paper with the most authors?

SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id GROUP BY T1.PaperId ORDER BY COUNT(T1.PaperId) DESC LIMIT 1

What is the title of the paper with the most authors ?

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


Question: Find the name of organizations whose names contain "Party".

SELECT organization_name FROM organizations WHERE organization_name LIKE "%Party%"

Find the name of organizations whose names contain " Party " .


Question: How many students have gone through a detention?

SELECT count(DISTINCT student_id) FROM Detention

How many students have gone through a detention ?


Question: Select the title of all movies.


Question: What are the names of institutions, ordered descending by their number of championships?

SELECT T2.Name FROM championship AS T1 JOIN institution AS T2 ON T1.Institution_ID  =  T2.Institution_ID ORDER BY T1.Number_of_Championships DESC

What are the names of institutions , ordered descending by their number of championships ?

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


Question: List the income and number of inhabitants of customers with an age greater than the 80% of average age of all customers?

SELECT T2.INCOME_K, T2.INHABITANTS_K FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID GROUP BY T2.INCOME_K, T2.INHABITANTS_K HAVING T1.age > 0.8 * AVG(T1.age)

List the income and number of inhabitants of customers with an age greater than the 80 % of average age of all customers ?

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


Question: How much is the total amount of sales handled by Heather McBadden?

SELECT SUM(T2.Quantity * T3.Price) FROM Employees AS T1 INNER JOIN Sales AS T2 ON T1.EmployeeID = T2.SalesPersonID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T1.FirstName = 'Heather' AND T1.LastName = 'McBadden'

How much is the total amount of sales handled by Heather McBadden ?

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


Question: Among the patients whose creatinine level is abnormal, how many of them aren't 70 yet?

SELECT COUNT(DISTINCT T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.CRE >= 1.5 AND STRFTIME('%Y', Date('now')) - STRFTIME('%Y', T1.Birthday) < 70

Among the patients whose creatinine level is abnormal , how many of them are n't 70 yet ?

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


Question: Show the names of members whose country is "United States" or "Canada".

SELECT Name FROM member WHERE Country  =  "United States" OR Country  =  "Canada"

Show the names of members whose country is " United States " or " Canada " .

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


Question: What city in Russia has the least population?

SELECT T2.Name FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'Russian Federation' ORDER BY T2.Population ASC LIMIT 1

What city in Russia has the least population ?

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


Question: What is the total budget amount for school "Glenn" in all years?

SELECT sum(T1.budgeted) FROM budget AS T1 JOIN school AS T2 ON T1.school_id  =  T2.school_id WHERE T2.school_name  =  'Glenn'

What is the total budget amount for school " Glenn " in all years ?

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


Question: How many parks are there in the state of NY?

SELECT count(*) FROM park WHERE state  =  'NY';

How many parks are there in the state of NY ?

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


Question: How many cards that illusrtated in German have been reprinted?

SELECT COUNT(T1.id) FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'German' AND T1.isReprint = 1

How many cards that illusrtated in German have been reprinted ?

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


Question: Find the purchase time, age and address of each member, and show the results in the order of purchase time.

SELECT Time_of_purchase ,  age ,  address FROM member ORDER BY Time_of_purchase

Find the purchase time , age and address of each member , and show the results in the order of purchase time .

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


Question: What city and state is the bank with the name morningside in?

SELECT city ,  state FROM bank WHERE bname  =  'morningside'

What city and state is the bank with the name morningside in ?

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


Question: How many molecules have a double bond type and among these molecule, how many are labeled as carcinogenic compound?

SELECT COUNT(DISTINCT T2.molecule_id), SUM(CASE WHEN T2.label = '+' THEN 1 ELSE 0 END) FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '='

How many molecules have a double bond type and among these molecule , how many are labeled as carcinogenic compound ?

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


Question: display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40.

SELECT * FROM employees WHERE salary BETWEEN 8000 AND 12000 AND commission_pct != "null" OR  department_id != 40

display all the information of employees whose salary is in the range of 8000 and 12000 and commission is not null or department number does not equal to 40 .

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


Question: Calculate the percentage of products supplied by Gai pturage over all products.

SELECT CAST(COUNT(CASE WHEN T2.CompanyName = 'Gai pturage' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T1.SupplierID) FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID

Calculate the percentage of products supplied by Gai pturage over all products .

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


Question: What is the name of the establishment with the lowest inspection score of all time?

SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score = ( SELECT MIN(score) FROM inspections )

What is the name of the establishment with the lowest inspection score of all time ?

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


Question: Write down five rumoured movie titles within the genre of Drama.

SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T1.movie_status = 'Rumored' AND T3.genre_name = 'Drama' LIMIT 5

Write down five rumoured movie titles within the genre of Drama .

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


Question: Show all card type codes.

SELECT DISTINCT card_type_code FROM Customers_Cards


Question: List at least 5 device models that are commonly used by female users.

SELECT T.device_model FROM ( SELECT T2.device_model, COUNT(T2.device_model) AS num FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T1.gender = 'F' GROUP BY T2.device_model ) AS T ORDER BY T.num DESC LIMIT 5

List at least 5 device models that are commonly used by female users .

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


Question: State the address of drivers who transported the shipment with weight greater than 50000 pounds.

SELECT T2.address FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id GROUP BY T2.driver_id HAVING SUM(T1.weight) > 50000

State the address of drivers who transported the shipment with weight greater than 50000 pounds .

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


Question: Among all the residential areas in Delaware, how many of them implement daylight saving?

SELECT COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'DELAWARE' AND T1.daylight_savings = 'Yes'

Among all the residential areas in Delaware , how many of them implement daylight saving ?

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


Question: Give the street number of a bar in Oakland with a 2.7 review.

SELECT T2.street_num FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.review = 2.7 AND T2.city = 'oakland' AND T1.food_type = 'bar'

Give the street number of a bar in Oakland with a 2.7 review .

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


Question: What are the first name and gender of the students who have allergy to milk but can put up with cats?

SELECT fname ,  sex FROM Student WHERE StuID IN (SELECT StuID FROM Has_allergy WHERE Allergy  =  "Milk" EXCEPT SELECT StuID FROM Has_allergy WHERE Allergy  =  "Cat")

What are the first name and gender of the students who have allergy to milk but can put up with cats ?

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


Question: which countries have more than 2 airports?

SELECT country FROM airport GROUP BY country HAVING count(*)  >  2

which countries have more than 2 airports ?


Question: What is the title of the sculpture that was created in the most recent year ?

select title from sculptures order by year desc limit 1

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


Question: How many percent more orders were fulfilled with shipper company "United Package" than with "Speedy Express"?

SELECT CAST((COUNT(CASE WHEN T2.CompanyName = 'United Package' THEN 1 ELSE NULL END) - COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END)) AS REAL) * 100 / COUNT(CASE WHEN T2.CompanyName = 'Speedy Express' THEN 1 ELSE NULL END) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID

How many percent more orders were fulfilled with shipper company " United Package " than with " Speedy Express " ?

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


Question: Show all document ids without a process.

SELECT document_id FROM Documents EXCEPT SELECT document_id FROM Documents_processes

Show all document ids without a process .

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


Question: Show all meeting ids, meeting outcomes, meeting types and the details of the client atttending it.

SELECT T1.meeting_id ,  T1.meeting_outcome ,  T1.meeting_type ,  T2.client_details FROM meetings AS T1 JOIN clients AS T2 ON T1.client_id  =  T2.client_id

Show all meeting ids , meeting outcomes , meeting types and the details of the client atttending it .

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


Question: List all of the papers written by the author "Karin Rengefors."

SELECT T2.Title FROM PaperAuthor AS T1 INNER JOIN Paper AS T2 ON T1.PaperId = T2.Id WHERE T1.Name = 'Karin Rengefors'

List all of the papers written by the author " Karin Rengefors . "

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


Question: What are the countries that have never participated in any friendly-type competitions?

SELECT country FROM competition EXCEPT SELECT country FROM competition WHERE competition_type  =  'Friendly'

What are the countries that have never participated in any friendly - type competitions ?

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


Question: List the hardware model name for the phones that were produced by "Nokia Corporation" or whose screen mode type is "Graphics."

SELECT DISTINCT T2.Hardware_Model_name FROM screen_mode AS T1 JOIN phone AS T2 ON T1.Graphics_mode = T2.screen_mode WHERE T1.Type  =  "Graphics" OR t2.Company_name  =  "Nokia Corporation"

List the hardware model name for the phones that were produced by " Nokia Corporation " or whose screen mode type is " Graphics . "

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


Question: Show writers who have published a book with price more than 4000000.

SELECT T1.Writer FROM book AS T1 JOIN publication AS T2 ON T1.Book_ID  =  T2.Book_ID WHERE T2.Price  >  4000000

Show writers who have published a book with price more than 4000000 .

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


Question: In which regions are there no pizza restaurants?

SELECT DISTINCT T2.region FROM generalinfo AS T1 INNER JOIN geographic AS T2 ON T1.city = T2.city WHERE T1.food_type = 'pizza' AND T2.region != 'unknown'

In which regions are there no pizza restaurants ?


Question: How many drama movie with the rating of 3?

SELECT COUNT(DISTINCT T2.movieid) FROM u2base AS T1 INNER JOIN movies2directors AS T2 ON T1.movieid = T2.movieid WHERE T2.genre = 'drama' AND T1.rating = 3

How many drama movie with the rating of 3 ?

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


Question: List the dates of enrollment and completion of the student with personal name "Karson".

SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.personal_name  =  "Karson"

List the dates of enrollment and completion of the student with personal name " Karson " .

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


Question: how many programs are there?


Question: Give the number of Ukrainian addresses in the database.

SELECT COUNT(*) FROM country AS T1 INNER JOIN address AS T2 ON T1.country_id = T2.country_id WHERE T1.country_name = 'Ukraine'

Give the number of Ukrainian addresses in the database .


Question: What are the locations of the different planes, ordered by plane name?

SELECT LOCATION FROM hangar ORDER BY plane_name

What are the locations of the different planes , ordered by plane name ?

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


Question: What is the title of the post that is owned by csgillespie and has the highest popularity?

SELECT T1.Title FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie' ORDER BY T1.ViewCount DESC LIMIT 1

What is the title of the post that is owned by csgillespie and has the highest popularity ?

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


Question: How many courses do the student whose id is 171 attend?

SELECT count(*) FROM courses AS T1 JOIN student_course_attendance AS T2 ON T1.course_id = T2.course_id WHERE T2.student_id = 171

How many courses do the student whose i d is 171 attend ?

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


Question: Among the games published by 10TACLE Studios, how many of them are puzzles?

SELECT COUNT(T1.id) FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id INNER JOIN genre AS T4 ON T1.genre_id = T4.id WHERE T4.genre_name = 'Puzzle' AND T3.publisher_name = '10TACLE Studios'

Among the games published by 10TACLE Studios , how many of them are puzzles ?

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


Question: Among all the claims, which settlements have a claimed amount that is no more than the average? List the claim start date.

SELECT Date_Claim_Made FROM Claims WHERE Amount_Settled  <=  ( SELECT avg(Amount_Settled) FROM Claims )

Among all the claims , which settlements have a claimed amount that is no more than the average ? List the claim start date .

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


Question: How many cards have infinite power?

SELECT COUNT(*) FROM cards WHERE power = '*'


Question: What is the percentage of incredibly powerful cards in the set Coldsnap?

SELECT CAST(SUM(CASE WHEN T1.cardKingdomFoilId IS NOT NULL AND T1.cardKingdomId IS NOT NULL THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.id) FROM cards AS T1 INNER JOIN sets AS T2 ON T2.code = T1.setCode WHERE T2.name = 'Coldsnap'

What is the percentage of incredibly powerful cards in the set Coldsnap ?

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


Question: What are the ages and genders of the LG L70 users?

SELECT T2.age, T2.gender FROM phone_brand_device_model2 AS T1 INNER JOIN gender_age AS T2 ON T2.device_id = T1.device_id WHERE T1.phone_brand = 'LG' AND T1.device_model = 'L70'

What are the ages and genders of the LG L70 users ?

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


Question: Which community area has the highest number of crimes reported on the street?

SELECT T1.community_area_no FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no WHERE T2.location_description = 'STREET' GROUP BY T1.community_area_no ORDER BY COUNT(T2.location_description) DESC LIMIT 1

Which community area has the highest number of crimes reported on the street ?

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


Question: Which is a high quality product but with the lowest transacted quantity?

SELECT T1.Name FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Class = 'H' ORDER BY T2.Quantity ASC LIMIT 1

Which is a high quality product but with the lowest transacted quantity ?

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


Question: For each sex, what is the name and sex of the candidate with the oppose rate for their sex?

SELECT t1.name ,  t1.sex ,  min(oppose_rate) FROM people AS t1 JOIN candidate AS t2 ON t1.people_id  =  t2.people_id GROUP BY t1.sex

For each sex , what is the name and sex of the candidate with the oppose rate for their sex ?

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


Question: Among the crimes in the Central, calculate the percentage of larceny incidents.

SELECT CAST(COUNT(CASE WHEN T3.title = 'Larceny' THEN T2.report_no END) AS REAL) * 100 / COUNT(T2.report_no) FROM Community_Area AS T1 INNER JOIN Crime AS T2 ON T2.community_area_no = T1.community_area_no INNER JOIN FBI_Code AS T3 ON T3.fbi_code_no = T2.fbi_code_no WHERE T1.side = 'Central'

Among the crimes in the Central , calculate the percentage of larceny incidents .

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


Question: What are the distinct districts for elections?

What are the distinct districts for elections ?


Question: What is average age for different job title?

SELECT avg(age) ,  job FROM Person GROUP BY job

What is average age for different job title ?


Question: Which year was the third movie directed by Quentin Tarantino released? Indicate the user ids of the user who gave it a rating score of 4.

SELECT T2.movie_release_year, T1.user_id FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.movie_id = ( SELECT movie_id FROM movies WHERE director_name = 'Quentin Tarantino' ORDER BY movie_release_year ASC LIMIT 2, 1 ) AND T1.rating_score = 4

Which year was the third movie directed by Quentin Tarantino released ? Indicate the user ids of the user who gave it a rating score of 4 .

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


Question: Give the three most purchased items at this bakery.

SELECT item FROM items GROUP BY item ORDER BY COUNT (*) DESC LIMIT 3

Give the three most purchased items at this bakery .


Question: What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985, and 12/31/1995?

SELECT T2.Diagnosis FROM Examination AS T1 INNER JOIN Patient AS T2 ON T1.ID = T2.ID WHERE T1.`Examination Date` BETWEEN '1985-01-01' AND '1995-12-31' GROUP BY T2.Diagnosis ORDER BY COUNT(T2.Diagnosis) DESC LIMIT 1

What is the most common illness that doctors identified among the patients whose lab work was done between 1/1/1985 , and 12/31/1995 ?

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


Question: Among the coaches whose team has over 30 wins in a year, how many of them are born in the USA?

SELECT COUNT(T2.coachID) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T2.W > 30 AND T1.birthCountry = 'USA'

Among the coaches whose team has over 30 wins in a year , how many of them are born in the USA ?

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


Question: How many movies were made before 2000?

SELECT count(*) FROM Movie WHERE YEAR  <  2000


Question: List the page id of wikipedia about Catalan language which have the appearance of the word 'decimal'?

SELECT T2.pid FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid WHERE T1.word = 'decimal'

List the page i d of wikipedia about Catalan language which have the appearance of the word ' decimal ' ?

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


Question: Among the molecules which contain "c" element, which of them are not carcinogenic?

SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.element = 'c' AND T2.label = '-'

Among the molecules which contain " c " element , which of them are not carcinogenic ?

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


Question: What are the names of the countries, ordered descending by education score?

SELECT name FROM countries ORDER BY education_score DESC

What are the names of the countries , ordered descending by education score ?

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


Question: List all different states .


Question: Give the different hometowns of gymnasts that have a total point score of above 57.5.

SELECT DISTINCT T2.Hometown FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE T1.Total_Points  >  57.5

Give the different hometowns of gymnasts that have a total point score of above 57.5 .

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


Question: How many times is the number of films Gina DeGeneres acted in than Penelope Guinness?

SELECT CAST(SUM(IIF(T2.first_name = 'GINA' AND T2.last_name = 'DEGENERES', 1, 0)) AS REAL) * 100 / SUM(IIF(T2.first_name = 'PENELOPE' AND T2.last_name = 'GUINESS', 1, 0)) FROM film_actor AS T1 INNER JOIN actor AS T2 ON T1.actor_id = T2.actor_id

How many times is the number of films Gina DeGeneres acted in than Penelope Guinness ?

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


Question: What is the category of event which was taken place in 2020-03-24T12:00:00?

SELECT T2.category FROM event AS T1 INNER JOIN budget AS T2 ON T1.event_id = T2.link_to_event WHERE T1.event_date = '2020-03-24T12:00:00'

What is the category of event which was taken place in 2020 - 03 - 24T12:00:00 ?

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


Question: What are the names and trade names of the medcines that are FDA approved?

SELECT name ,  trade_name FROM medicine WHERE FDA_approved  =  'Yes'

What are the names and trade names of the medcines that are FDA approved ?

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


Question: What is the total processed time of all solutions from the repository with the most forks?

SELECT SUM(T2.ProcessedTime) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Forks = ( SELECT MAX(Forks) FROM Repo )

What is the total processed time of all solutions from the repository with the most forks ?

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


Question: What is the total distance between city BAL and all other cities.

SELECT sum(distance) FROM Direct_distance WHERE city1_code  =  "BAL"

What is the total distance between city BAL and all other cities .


Question: Which commander has had to deal with more cases of criminal sexual abuse?

SELECT T3.commander FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN District AS T3 ON T3.district_no = T2.district_no WHERE T1.secondary_description = 'CRIMINAL SEXUAL ABUSE' GROUP BY T3.commander ORDER BY COUNT(T1.secondary_description) DESC LIMIT 1

Which commander has had to deal with more cases of criminal sexual abuse ?

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


Question: What is the total number of faculty members?

What is the total number of faculty members ?


Question: The product 'Mozzarella di Giovanni' belongs in which category? Include the category's description as well.

SELECT T2.CategoryName, T2.Description FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Mozzarella di Giovanni'

The product ' Mozzarella di Giovanni ' belongs in which category ? Include the category 's description as well .

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


Question: What is the age of the oldest male user of the app?

SELECT MAX(age) FROM gender_age WHERE gender = 'M'

What is the age of the oldest male user of the app ?


Question: Which form of government has more countries that have completed the actual external debt reporting between the two types of government accounting concepts, budgetary central government vs. consolidated central government?

SELECT SUM(CASE WHEN GovernmentAccountingConcept = 'Budgetary central government' THEN 1 ELSE 0 END), SUM(CASE WHEN GovernmentAccountingConcept = 'Consolidated central government' THEN 1 ELSE 0 END) central_nums FROM country WHERE ExternalDebtReportingStatus = 'Actual'

Which form of government has more countries that have completed the actual external debt reporting between the two types of government accounting concepts , budgetary central government vs. consolidated central government ?

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


Question: What are the names and colleges of all players, ordered by rank of year descending?

SELECT Player_name ,  College FROM player ORDER BY Rank_of_the_year DESC

What are the names and colleges of all players , ordered by rank of year descending ?

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


Question: Show each location and the number of cinemas there.

SELECT LOCATION ,  count(*) FROM cinema GROUP BY LOCATION

Show each location and the number of cinemas there .


Question: Show all allergies with number of students affected.

SELECT Allergy ,  count(*) FROM Has_allergy GROUP BY Allergy

Show all allergies with number of students affected .


Question: What are the names and distances for all airplanes?

What are the names and distances for all airplanes ?


Question: Show the names of journalists from "England" or "Wales".

SELECT Name FROM journalist WHERE Nationality  =  "England" OR Nationality  =  "Wales"

Show the names of journalists from " England " or " Wales " .

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


Question: Show the different headquarters and number of companies at each headquarter.

SELECT Headquarters ,  COUNT(*) FROM company GROUP BY Headquarters

Show the different headquarters and number of companies at each headquarter .


Question: Count the number of customers who have an account.

SELECT count(DISTINCT customer_id) FROM Accounts

Count the number of customers who have an account .


Question: What are the ids and details of the clients who have attended any meeting or have any invoice?

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

What are the ids and details of the clients who have attended any meeting or have any invoice ?

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


Question: How many patients do each physician take care of? List their names and number of patients they take care of.

SELECT T1.name ,  count(*) FROM physician AS T1 JOIN patient AS T2 ON T1.employeeid  =  T2.PCP GROUP BY T1.employeeid

How many patients do each physician take care of ? List their names and number of patients they take care of .

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


Question: List the full names of the employees who were responsible for inspecting Taqueria La Paz.

SELECT DISTINCT T3.first_name, T3.last_name FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no INNER JOIN employee AS T3 ON T2.employee_id = T3.employee_id WHERE T1.dba_name = 'TAQUERIA LA PAZ'

List the full names of the employees who were responsible for inspecting Taqueria La Paz .

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


Question: Among the businesses with average rating, how many business has attribute of full_bar.

SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Business AS T2 ON T1.business_id = T2.business_id WHERE T1.attribute_value = 'full_bar'

Among the businesses with average rating , how many business has attribute of full_bar .

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


Question: Provide the country with its full name which has the most ethnic group? List them all ethnic group together with its percentage.

SELECT T1.Name, T2.Name, T2.Percentage FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T1.Name = ( SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country GROUP BY T1.Name ORDER BY COUNT(T2.Name) DESC LIMIT 1 ) GROUP BY T1.Name, T2.Name, T2.Percentage

Provide the country with its full name which has the most ethnic group ? List them all ethnic group together with its percentage .

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


Question: How many users are logged in?

SELECT count(*) FROM users WHERE user_login  =  1

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


Question: Find the description and code of the service type that is performed the most times.

SELECT T1.Service_Type_Description , T1.Service_Type_Code FROM Ref_Service_Types AS T1 JOIN Services AS T2 ON T1.Service_Type_Code  =  T2.Service_Type_Code GROUP BY T1.Service_Type_Code ORDER BY COUNT(*) DESC LIMIT 1

Find the description and code of the service type that is performed the most times .

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


Question: Among the biwords pairs with "àbac" as its first word, how many of them have an occurrence of over 10?

SELECT COUNT(T2.w2nd) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st WHERE T1.word = 'àbac' AND T2.occurrences > 10

Among the biwords pairs with " àbac " as its first word , how many of them have an occurrence of over 10 ?

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


Question: What are the all games score and location of the school called Clemson?

SELECT t2.All_Games ,  t1.location FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id WHERE team_name  =  'Clemson'

What are the all games score and location of the school called Clemson ?

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


Question: Among the Yelp_Business in Arizona, how many of them closes at 12PM on Sundays?

SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id WHERE T2.day_of_week LIKE 'Sunday' AND T1.closing_time LIKE '12PM' AND T3.state LIKE 'AZ'

Among the Yelp_Business in Arizona , how many of them closes at 12PM on Sundays ?

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


Question: What is the percentage whereby the away team scored 2 goals during the 2017 seasons?

SELECT CAST(SUM(CASE WHEN FTAG = 2 THEN 1 ELSE 0 END) / COUNT(FTAG) AS REAL) * 100 FROM matchs WHERE season = 2017

What is the percentage whereby the away team scored 2 goals during the 2017 seasons ?

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


Question: What is the effective date of the claim that has the largest amount of total settlement?

SELECT t1.Effective_Date FROM claims AS t1 JOIN settlements AS t2 ON t1.claim_id  =  t2.claim_id GROUP BY t1.claim_id ORDER BY sum(t2.settlement_amount) DESC LIMIT 1

What is the effective date of the claim that has the largest amount of total settlement ?

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


Question: Which country is the oldest driver from?

SELECT nationality FROM drivers WHERE dob IS NOT NULL ORDER BY dob ASC LIMIT 1

Which country is the oldest driver from ?


Question: Show the detail of vehicle with id 1.

SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;


Question: Return the highest acc percent across all basketball matches.

SELECT acc_percent FROM basketball_match ORDER BY acc_percent DESC LIMIT 1

Return the highest acc percent across all basketball matches .

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


Question: How many addresses do we have?


Question: In "Sex, Pies and Idiot Scrapes", how many percentage of votes did the 9 star score has?

SELECT T2.percent FROM Episode AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.title = 'Sex, Pies and Idiot Scrapes' AND T2.stars = 9;

In " Sex , Pies and Idiot Scrapes " , how many percentage of votes did the 9 star score has ?

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


Question: Show the distinct names of mountains climbed by climbers from country "West Germany".

SELECT DISTINCT T2.Name FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID WHERE T1.Country  =  "West Germany"

Show the distinct names of mountains climbed by climbers from country " West Germany " .

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


Question: What are the codes of the locations with at least three documents?

SELECT location_code FROM Document_locations GROUP BY location_code HAVING count(*)  >=  3

What are the codes of the locations with at least three documents ?


Question: List the ids of all the patients with condition that has a prevalence percentage of 18.8%.

SELECT DISTINCT T1.PATIENT FROM conditions AS T1 INNER JOIN all_prevalences AS T2 ON lower(T2.ITEM) = lower(T1.DESCRIPTION) WHERE T2."PREVALENCE PERCENTAGE" = CAST(18.8 AS float)

List the ids of all the patients with condition that has a prevalence percentage of 18.8 % .

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


Question: Show teams that have suffered more than three eliminations.

SELECT Team FROM elimination GROUP BY Team HAVING COUNT(*)  >  3

Show teams that have suffered more than three eliminations .


Question: What payment method was used for Needed Resource Materials For My Students?

SELECT T3.payment_method FROM essays AS T1 INNER JOIN projects AS T2 ON T1.projectid = T2.projectid INNER JOIN donations AS T3 ON T2.projectid = T3.projectid WHERE T1.title = 'Needed Resource Materials For My Students'

What payment method was used for Needed Resource Materials For My Students ?

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


Question: How many cities are in each state?

SELECT state ,  count(*) FROM City GROUP BY state


Question: List out the table name and currency unit of countries using series code as FP.CPI.TOTL

SELECT T1.TableName, T1.CurrencyUnit FROM Country AS T1 INNER JOIN CountryNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T2.SeriesCode = 'FP.CPI.TOTL'

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


Question: What is the geographic ID and total income per year when the average income is above 3300 dollar.

SELECT GEOID, INHABITANTS_K * INCOME_K * 12 FROM Demog WHERE INCOME_K > 3300

What is the geographic ID and total income per year when the average income is above 3300 dollar .

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


Question: Which contact channel codes were used less than 5 times?

SELECT channel_code FROM customer_contact_channels GROUP BY channel_code HAVING count(customer_id)  <  5

Which contact channel codes were used less than 5 times ?

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


Question: What is the birthday of the staff member with first name as Janessa and last name as Sawayn?

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

What is the birthday of the staff member with first name as Janessa and last name as Sawayn ?

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


Question: Provide details of review from reviewer whose name begin with letter 'J'. State the product ID, rating and comments.

SELECT ProductID, Rating, Comments FROM ProductReview WHERE ReviewerName LIKE 'J%'

Provide details of review from reviewer whose name begin with letter ' J ' . State the product ID , rating and comments .

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


Question: What are the different types of forms?

SELECT DISTINCT form_type_code FROM forms


Question: Which superhero has the most durability published by Dark Horse Comics?

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T3.id = T2.attribute_id INNER JOIN publisher AS T4 ON T4.id = T1.publisher_id WHERE T4.publisher_name = 'Dark Horse Comics' AND T3.attribute_name = 'Durability' ORDER BY T2.attribute_value DESC LIMIT 1

Which superhero has the most durability published by Dark Horse Comics ?

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


Question: How many Yelp_Businesses in Scottsdale have received positive comments in the Elitestar rating?

SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Scottsdale' AND stars > 3

How many Yelp_Businesses in Scottsdale have received positive comments in the Elitestar rating ?

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


Question: How many artists do not have any album?

SELECT count(*) FROM ARTIST WHERE artistid NOT IN(SELECT artistid FROM ALBUM)

How many artists do not have any album ?


Question: On which years did Aruba got a footnote on the series code AG.LND.FRST.K2?

SELECT T2.Year FROM Country AS T1 INNER JOIN FootNotes AS T2 ON T1.CountryCode = T2.Countrycode WHERE T1.ShortName = 'Aruba' AND T2.Seriescode = 'AG.LND.FRST.K2'

On which years did Aruba got a footnote on the series code AG.LND.FRST.K2 ?

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


Question: List all the cities in Sonoma County.

SELECT city FROM geographic WHERE county = 'sonoma county'


Question: What was the first award won by the cast or crew member of the show? Give the name of the person who won the said award.

SELECT T2.award, T1.name FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.result = 'Winner' ORDER BY T2.year LIMIT 1;

What was the first award won by the cast or crew member of the show ? Give the name of the person who won the said award .

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


Question: How many images have at least one object sample in the class of "man"?

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

How many images have at least one object sample in the class of " man " ?

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


Question: What is the maximum and minimum resolution of all songs that are approximately 3 minutes long?

SELECT max(T2.resolution) ,  min(T2.resolution) FROM files AS T1 JOIN song AS T2 ON T1.f_id  =  T2.f_id WHERE T1.duration LIKE "3:%"

What is the maximum and minimum resolution of all songs that are approximately 3 minutes long ?

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


Question: What are the famous title of the artists associated with volumes with more than 2 weeks on top?

SELECT T1.Famous_Title FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T2.Weeks_on_Top  >  2

What are the famous title of the artists associated with volumes with more than 2 weeks on top ?

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


Question: List every album ordered by album title in ascending order.

SELECT title FROM albums ORDER BY title;

List every album ordered by album title in ascending order .


Question: In female customers ages from 50 to 60, how many of them has an number of inhabitants ranges from 19 to 24?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.SEX = 'Female' AND T1.age >= 50 AND T1.age <= 60 AND T2.INHABITANTS_K >= 19 AND T2.INHABITANTS_K <= 24

In female customers ages from 50 to 60 , how many of them has an number of inhabitants ranges from 19 to 24 ?

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


Question: Give me the claim date, settlement date for all the claims whose claimed amount is larger than the average.

SELECT Date_Claim_Made ,  Date_Claim_Settled FROM Claims WHERE Amount_Claimed  >  ( SELECT avg(Amount_Claimed) FROM Claims )

Give me the claim date , settlement date for all the claims whose claimed amount is larger than the average .

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


Question: What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction?

SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "254 Ottilie Junction" OR T2.How_to_Get_There  =  "bus"

What are the names of tourist attractions that can be reached by bus or is at address 254 Ottilie Junction ?

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


Question: What is the number of branches that have more than the average number of memberships?

SELECT count(*) FROM branch WHERE membership_amount  >  (SELECT avg(membership_amount) FROM branch)

What is the number of branches that have more than the average number of memberships ?

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


Question: Which 3 players won the most player awards? List their full name and id.

SELECT T1.name_first ,  T1.name_last ,  T1.player_id FROM player AS T1 JOIN player_award AS T2 ON T1.player_id  =  T2.player_id GROUP BY T1.player_id ORDER BY count(*) DESC LIMIT 3;

Which 3 players won the most player awards ? List their full name and i d.

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


Question: List all the films that are rated as PG-13.

SELECT title FROM film WHERE rating = 'PG-13'

List all the films that are rated as PG-13 .


Question: How many posts were created on 21st July, 2010?

SELECT COUNT(id) FROM postHistory WHERE date(CreationDate) = '2010-07-21'

How many posts were created on 21st July , 2010 ?

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


Question: Among the members with t-shirt size of medium, what is the percentage of the amount 50 received by the Student_Club?

SELECT CAST(SUM(CASE WHEN T2.amount = 50 THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(T2.income_id) FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.position = 'Member' AND T1.t_shirt_size = 'Medium'

Among the members with t - shirt size of medium , what is the percentage of the amount 50 received by the Student_Club ?

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


Question: How many victory matches were there in 2008?

SELECT COUNT(Match_Id) FROM Match WHERE Match_Date LIKE '2008%' AND Match_Winner IS NOT NULL

How many victory matches were there in 2008 ?


Question: What is the city with the most number of flagship stores?

SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id  =  t2.store_id JOIN district AS t3 ON t2.district_id  =  t3.district_id GROUP BY t3.headquartered_city ORDER BY count(*) DESC LIMIT 1

What is the city with the most number of flagship stores ?


Question: Give me the first name and last name for all the female members of the club "Bootup Baltimore".

SELECT t3.fname ,  t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Bootup Baltimore" AND t3.sex  =  "F"

Give me the first name and last name for all the female members of the club " Bootup Baltimore " .

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


Question: How many movie ratings have more than 3 stars?

SELECT count(*) FROM Rating WHERE stars  >  3

How many movie ratings have more than 3 stars ?


Question: What is the average rating of the newest movies from France?

SELECT AVG(T1.rating) FROM u2base AS T1 INNER JOIN movies AS T2 ON T1.movieid = T2.movieid WHERE T2.country = 'france' AND T2.year = 4

What is the average rating of the newest movies from France ?

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


Question: Which flag is most widely used among all ships?

SELECT flag FROM ship GROUP BY flag ORDER BY count(*) DESC LIMIT 1

Which flag is most widely used among all ships ?


Question: Among the menu pages on which the dish "Paysanne Soup" had appeared, how many of them had a stable price for the dish?

SELECT SUM(CASE WHEN T1.name = 'Paysanne Soup' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id WHERE T1.highest_price IS NULL

Among the menu pages on which the dish " Paysanne Soup " had appeared , how many of them had a stable price for the dish ?

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


Question: Is there any intercity trip were made during 2014? If yes, list out the city name for the start and end station.

SELECT T1.start_station_name, T1.end_station_name FROM trip AS T1 LEFT JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T1.start_date LIKE '%/%/2014%' AND T1.start_station_name != T1.end_station_name

Is there any intercity trip were made during 2014 ? If yes , list out the city name for the start and end station .

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


Question: How many purchases were made at Sac State American River Courtyard using Master Card?

SELECT COUNT(T1.TransactionID) FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T2.LocationName = 'Sac State American River Courtyard' AND T1.CreditCardType = 'MasterCard'

How many purchases were made at Sac State American River Courtyard using Master Card ?

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


Question: Provide the publisher name of the book with ISBN 76092025986.

SELECT T2.publisher_name FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T1.isbn13 = 76092025986

Provide the publisher name of the book with ISBN 76092025986 .

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


Question: Which category does the podcast titled 'SciFi Tech Talk' belong to?

SELECT T1.category FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.title = 'SciFi Tech Talk'

Which category does the podcast titled ' SciFi Tech Talk ' belong to ?

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


Question: Among the patients with viral sinusitis condition, which patient's gender is most affected? Provide the number for each respectively.

SELECT SUM(CASE WHEN T1.gender = 'F' THEN 1 ELSE 0 END), SUM(CASE WHEN T1.gender = 'M' THEN 1 ELSE 0 END) FROM patients AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Viral sinusitis (disorder)'

Among the patients with viral sinusitis condition , which patient 's gender is most affected ? Provide the number for each respectively .

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


Question: Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9.

SELECT DISTINCT T2.description FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T1.prefix = 'Ms.' AND T1.first = 'Jacquelyn' AND T1.last = 'Shanahan' AND T2.DATE = '2009-08-09'

Give the procedure description of Ms. Jacquelyn Shanahan on 2009/8/9 .

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


Question: Show the ids of all employees who have destroyed a document.

SELECT DISTINCT Destroyed_by_Employee_ID FROM Documents_to_be_destroyed

Show the ids of all employees who have destroyed a document .


Question: What is the team and starting year for each technician?

SELECT Team ,  Starting_Year FROM technician

What is the team and starting year for each technician ?

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


Question: Tell the number of fights landed earlier on Miami Airport on 2018/8/12.

SELECT COUNT(*) FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.DEST WHERE T2.FL_DATE = '2018/8/12' AND T2.DEST = 'MIA' AND T2.ARR_DELAY < 0

Tell the number of fights landed earlier on Miami Airport on 2018/8/12 .

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


Question: Please list 3 businesses along with their IDs that use cellphones.

SELECT T2.BusinessEntityID FROM PhoneNumberType AS T1 INNER JOIN PersonPhone AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID WHERE T1.Name = 'Cell' LIMIT 3

Please list 3 businesses along with their IDs that use cellphones .


Question: How many vocal types are used in the song "Le Pop"?

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

How many vocal types are used in the song " Le Pop " ?

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


Question: List the names of wrestlers and the teams in elimination in descending order of days held.

SELECT T2.Name ,  T1.Team FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID ORDER BY T2.Days_held DESC

List the names of wrestlers and the teams in elimination in descending order of days held .

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


Question: What is the flight number of the flight operated by American Airlines Inc. that had the longest delay in departure?

SELECT T1.OP_CARRIER_FL_NUM FROM Airlines AS T1 INNER JOIN Airports AS T2 ON T2.Code = T1.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T1.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T3.Description = 'American Airlines Inc.: AA' ORDER BY T1.DEP_TIME DESC LIMIT 1

What is the flight number of the flight operated by American Airlines Inc. that had the longest delay in departure ?

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


Question: On how many cards designed by John Avon is its foil non-powerful?

SELECT COUNT(id) FROM cards WHERE (cardKingdomId IS NULL OR cardKingdomFoilId IS NULL) AND artist = 'John Avon'

On how many cards designed by John Avon is its foil non - powerful ?

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


Question: What is the average age of all gymnasts?

SELECT avg(T2.Age) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID

What is the average age of all gymnasts ?


Question: Provide the overview for the movie "The Pacifier".

SELECT overview FROM movie WHERE title = 'The Pacifier'

Provide the overview for the movie " The Pacifier " .

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


Question: Who is the oldest person whose job is student?

SELECT name FROM Person WHERE job  =  'student' AND age  =  (SELECT max(age) FROM person WHERE job  =  'student' )

Who is the oldest person whose job is student ?


Question: In the books published by US publishers, which book has the highest royalty? List these books in the descending order of royalty.

SELECT T1.title FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id WHERE T2.country = 'USA' ORDER BY T1.royalty DESC

In the books published by US publishers , which book has the highest royalty ? List these books in the descending order of royalty .

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


Question: What is the total production of the product that is ordered in the highest quantity in order no. 10248?

SELECT T1.UnitsInStock + T1.UnitsOnOrder FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10248 ORDER BY T2.Quantity DESC LIMIT 1

What is the total production of the product that is ordered in the highest quantity in order no . 10248 ?

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


Question: Find all phones that have word 'Full' in their accreditation types. List the Hardware Model name and Company name.

SELECT Hardware_Model_name ,  Company_name FROM phone WHERE Accreditation_type LIKE 'Full';

Find all phones that have word ' Full ' in their accreditation types . List the Hardware Model name and Company name .

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


Question: What is the name of the parent collection of the collection named Nice?

SELECT T2.Collection_Name FROM Collections AS T1 JOIN Collections AS T2 ON T1.Parent_Collection_ID = T2.Collection_ID WHERE T1.Collection_Name = "Nice";

What is the name of the parent collection of the collection named Nice ?

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


Question: What is the id of the team with the highest number of matches won?

SELECT Match_Id FROM `Match` ORDER BY Match_Winner DESC LIMIT 1

What is the i d of the team with the highest number of matches won ?


Question: What is the full name of the employee with the highest salary?

SELECT FirstName, LastName FROM Employees WHERE Salary = ( SELECT MAX(Salary) FROM Employees )

What is the full name of the employee with the highest salary ?

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


Question: Give the ids of goods that are more than twice as expensive as the average good.

SELECT id FROM goods WHERE price  >  (SELECT avg(price) FROM goods)

Give the ids of goods that are more than twice as expensive as the average good .

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


Question: What are the collection susbset names?

SELECT Collection_Subset_Name FROM Collection_Subsets;


Question: Return the code of the card type that is most common.

SELECT card_type_code FROM Customers_cards GROUP BY card_type_code ORDER BY count(*) DESC LIMIT 1

Return the code of the card type that is most common .


Question: What is the number of students playing as a goalie?

SELECT count(*) FROM tryout WHERE pPos  =  'goalie'

What is the number of students playing as a goalie ?


Question: Find the death year of the artist who made the least number of sculptures?

SELECT T1.deathYear FROM artists AS T1 JOIN sculptures AS T2 ON T1.artistID  =  T2.sculptorID GROUP BY T2.sculptorID ORDER BY count(*) LIMIT 1

Find the death year of the artist who made the least number of sculptures ?

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


Question: Among the countries who uses the 1968 System of National Accounts methodology, how many are in the Middle East & North Africa? Name the country with the highest CO2 emissions from solid fuel consumption in kiloton.

SELECT COUNT(DISTINCT T1.CountryCode) FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' UNION SELECT * FROM ( SELECT T1.CountryName FROM indicators AS T1 INNER JOIN country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T2.Region = 'Middle East & North Africa' AND T2.SystemOfNationalAccounts = 'Country uses the 1968 System of National Accounts methodology.' AND T1.IndicatorName = 'CO2 emissions FROM solid fuel consumption (kt)' GROUP BY T1.CountryName ORDER BY SUM(T1.value) DESC LIMIT 1 )

Among the countries who uses the 1968 System of National Accounts methodology , how many are in the Middle East & North Africa ? Name the country with the highest CO2 emissions from solid fuel consumption in kiloton .

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


Question: Find the number of districts which have no spokesmen.

SELECT count(*) FROM district WHERE district_id NOT IN (SELECT district_id FROM spokesman_district)

Find the number of districts which have no spokesmen .


Question: What is the location of the club named "Tennis Club"?

SELECT clublocation FROM club WHERE clubname  =  "Tennis Club"

What is the location of the club named " Tennis Club " ?

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


Question: Please list the page numbers of all the menu pages on which the dish "Chicken gumbo" had appeared.

SELECT T1.page_number FROM MenuPage AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.menu_page_id INNER JOIN Dish AS T3 ON T2.dish_id = T3.id WHERE T3.name = 'Chicken gumbo'

Please list the page numbers of all the menu pages on which the dish " Chicken gumbo " had appeared .

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


Question: State name of students who have the longest duration of absense from school and do not have payment due.

SELECT T1.name FROM longest_absense_from_school AS T1 INNER JOIN no_payment_due AS T2 ON T1.name = T2.name WHERE T2.bool = 'neg' ORDER BY T1.month DESC LIMIT 1

State name of students who have the longest duration of absense from school and do not have payment due .

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


Question: Which word has the time of occurrences as 340691?

SELECT word FROM words WHERE occurrences = 340691

Which word has the time of occurrences as 340691 ?


Question: Please list the top three most frequently occurring words and their ids.

SELECT word, wid FROM words ORDER BY occurrences DESC LIMIT 3

Please list the top three most frequently occurring words and their ids .

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


Question: Determine the average gross for Disney's PG-13-rated action movies.

SELECT SUM(CAST(REPLACE(trim(total_gross, '$'), ',', '') AS REAL)) / COUNT(movie_title) FROM movies_total_gross WHERE MPAA_rating = 'PG-13'

Determine the average gross for Disney 's PG-13 - rated action movies .

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


Question: In 1998, How many wins were made by team 'CAR' per game played? Who contributed the most goals? State the player ID.

SELECT CAST(T1.W AS REAL) / T1.G, T2.playerID FROM Teams AS T1 INNER JOIN Scoring AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.tmID = 'CAR' AND T1.year = 1998 GROUP BY T1.W / T1.G, T2.playerID ORDER BY SUM(T2.G) DESC LIMIT 1

In 1998 , How many wins were made by team ' CAR ' per game played ? Who contributed the most goals ? State the player ID .

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


Question: Of all the beer styles produced by Stevens Point Brewery, how many percent do they allot for American Adjunct Lager?

SELECT CAST(SUM(IIF(T1.style = 'American Adjunct Lager', 1, 0)) AS REAL) * 100 / COUNT(T1.brewery_id) FROM beers AS T1 INNER JOIN breweries AS T2 ON T1.brewery_id = T2.id WHERE T2.name = 'Stevens Point Brewery'

Of all the beer styles produced by Stevens Point Brewery , how many percent do they allot for American Adjunct Lager ?

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


Question: Show agency details for client with detail 'Mac'.

SELECT T2.agency_details FROM Clients AS T1 JOIN Agencies AS T2 ON T1.agency_id  =  T2.agency_id WHERE T1.client_details  =  'Mac'

Show agency details for client with detail ' Mac ' .

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


Question: Which clubs have one or more members whose advisor is "1121"?

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.advisor  =  1121

Which clubs have one or more members whose advisor is " 1121 " ?

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


Question: What is the name of the product that Aimee Bixby bought?

SELECT DISTINCT T3.`Product Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Aimee Bixby'

What is the name of the product that Aimee Bixby bought ?

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


Question: What are the line 1 of addresses shared by some students and some teachers?

SELECT T1.line_1 FROM Addresses AS T1 JOIN Students AS T2 ON T1.address_id  =  T2.address_id INTERSECT SELECT T1.line_1 FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id

What are the line 1 of addresses shared by some students and some teachers ?

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


Question: What is maximum and minimum RAM size of phone produced by company named "Nokia Corporation"?

SELECT max(T1.RAM_MiB) ,  min(T1.RAM_MiB) FROM chip_model AS T1 JOIN phone AS T2 ON T1.Model_name  =  T2.chip_model WHERE T2.Company_name = "Nokia Corporation";

What is maximum and minimum RAM size of phone produced by company named " Nokia Corporation " ?

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


Question: Show the name of the party that has the most delegates.

SELECT T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID GROUP BY T1.Party ORDER BY COUNT(*) DESC LIMIT 1

Show the name of the party that has the most delegates .


Question: How many different colleges do attend the tryout test?

SELECT count(DISTINCT cName) FROM tryout

How many different colleges do attend the tryout test ?


Question: What are the names and account balances for customers who have taken a total amount of more than 5000 in loans?

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

What are the names and account balances for customers who have taken a total amount of more than 5000 in loans ?

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


Question: List the purchase order whereby all received quantity were rejected? Name those product.

SELECT T1.Name FROM Product AS T1 INNER JOIN PurchaseOrderDetail AS T2 ON T1.ProductID = T2.ProductID WHERE T2.RejectedQty = T2.ReceivedQty AND T2.RejectedQty <> 0

List the purchase order whereby all received quantity were rejected ? Name those product .

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


Question: how many people are there whose weight is higher than 85 for each gender?

SELECT count(*) ,  sex FROM people WHERE weight  >  85 GROUP BY sex

how many people are there whose weight is higher than 85 for each gender ?

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


Question: How many states that have some college students playing in the mid position but not in the goalie position.

SELECT COUNT(*) FROM (SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'mid' EXCEPT SELECT T1.state FROM college AS T1 JOIN tryout AS T2 ON T1.cName  =  T2.cName WHERE T2.pPos  =  'goalie')

How many states that have some college students playing in the mid position but not in the goalie position .

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


Question: What is the theme, date, and attendance for the exhibition in year 2004?

SELECT T2.theme ,  T1.date ,  T1.attendance FROM exhibition_record AS T1 JOIN exhibition AS T2 ON T1.exhibition_id  =  T2.exhibition_id WHERE T2.year  =  2004

What is the theme , date , and attendance for the exhibition in year 2004 ?

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


Question: What is the name of the country with the most number of home airlines?

SELECT country FROM airlines GROUP BY country ORDER BY count(*) DESC LIMIT 1

What is the name of the country with the most number of home airlines ?

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


Question: What is the name of the event where competitors received the most gold medals?

SELECT T2.event_name FROM competitor_event AS T1 INNER JOIN event AS T2 ON T1.event_id = T2.id INNER JOIN medal AS T3 ON T1.medal_id = T3.id WHERE T3.medal_name = 'Gold' GROUP BY T2.id ORDER BY COUNT(T1.event_id) DESC LIMIT 1

What is the name of the event where competitors received the most gold medals ?

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


Question: Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE.

SELECT T2.Dname ,  T2.Room FROM COURSE AS T1 JOIN DEPARTMENT AS T2 ON T1.DNO  =  T2.DNO WHERE T1.CName  =  "INTRODUCTION TO COMPUTER SCIENCE"

Find the department name and room of the course INTRODUCTION TO COMPUTER SCIENCE .

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


Question: List the dates of games by the home team name in descending order.

SELECT Date FROM game ORDER BY home_team DESC

List the dates of games by the home team name in descending order .

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


Question: List every book that Ursola Purdy has ordered.

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

List every book that Ursola Purdy has ordered .

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


Question: How many films have a rental rate of 0.99?

SELECT COUNT(film_id) FROM film WHERE rental_rate = 0.99

How many films have a rental rate of 0.99 ?

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


Question: What is the full name of the driver that has done the most shipments in 2017?

SELECT T2.first_name, T2.last_name FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2017' GROUP BY T2.first_name, T2.last_name ORDER BY COUNT(*) DESC LIMIT 1

What is the full name of the driver that has done the most shipments in 2017 ?

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


Question: What is the average weight of the goods being transported on a single shipment ordered by S K L Enterprises Inc?

SELECT AVG(T2.weight) FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_name = 'S K L Enterprises Inc'

What is the average weight of the goods being transported on a single shipment ordered by S K L Enterprises Inc ?

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


Question: What is the age and gender of the person who uses the device number 29182687948017100 on event number 1?

SELECT T1.age, T1.gender FROM gender_age AS T1 INNER JOIN events_relevant AS T2 ON T1.device_id = T2.device_id WHERE T1.device_id = 29182687948017100 AND T2.event_id = 1

What is the age and gender of the person who uses the device number 29182687948017100 on event number 1 ?

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


Question: What are the campuses that had between 600 and 1000 faculty members in 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

What are the campuses that had between 600 and 1000 faculty members in 2004 ?

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


Question: What degrees were conferred in San Francisco State University in the year 2001?

SELECT degrees FROM campuses AS T1 JOIN degrees AS T2 ON t1.id  =  t2.campus WHERE t1.campus  =  "San Francisco State University" AND t2.year  =  2001

What degrees were conferred in San Francisco State University in the year 2001 ?

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


Question: Find the number of distinct students enrolled in courses.

SELECT count(DISTINCT student_id) FROM Student_Course_Enrolment

Find the number of distinct students enrolled in courses .


Question: Please list the name of the countries with over 5 ethnic groups.

SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country GROUP BY T1.Name HAVING COUNT(T1.Name) > 5

Please list the name of the countries with over 5 ethnic groups .

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


Question: Find the number of activities Mark Giuliano is involved in.

SELECT count(*) FROM Faculty AS T1 JOIN Faculty_participates_in AS T2 ON T1.facID  =  T2.facID WHERE T1.fname  =  "Mark" AND T1.lname  =  "Giuliano"

Find the number of activities Mark Giuliano is involved in .

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


Question: What is the headquarter of the company whose founder is James?

SELECT headquarter FROM manufacturers WHERE founder  =  'James'

What is the headquarter of the company whose founder is James ?

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


Question: Mention the oldest empoyee's full name, title, salary and number of orders which were shipped to USA by him.

SELECT T1.FirstName, T1.LastName, T1.Title, T1.Salary , COUNT(T2.OrderID) FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID WHERE ShipCountry = 'USA' GROUP BY T1.FirstName, T1.LastName, T1.Title, T1.Salary, T1.BirthDate ORDER BY T1.BirthDate LIMIT 1

Mention the oldest empoyee 's full name , title , salary and number of orders which were shipped to USA by him .

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


Question: What is the name of the oldest student?

SELECT name FROM Person WHERE job  =  'student' AND age  =  (SELECT max(age) FROM person WHERE job  =  'student' )

What is the name of the oldest student ?


Question: What are the names of representatives in descending order of votes?

SELECT T2.Name FROM election AS T1 JOIN representative AS T2 ON T1.Representative_ID  =  T2.Representative_ID ORDER BY votes DESC

What are the names of representatives in descending order of votes ?

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


Question: What is the name of the movie whose critic received the highest amount of likes? Indicate the URL to the rating on Mubi.

SELECT T2.movie_title, T1.rating_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id ORDER BY T1.critic_likes DESC LIMIT 1

What is the name of the movie whose critic received the highest amount of likes ? Indicate the URL to the rating on Mubi .

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


Question: Among the motorcycles with product scale of 1:10, which of them is the most ordered by American customers?

SELECT T1.productName FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber INNER JOIN customers AS T4 ON T3.customerNumber = T4.customerNumber WHERE T1.productLine = 'Motorcycles' AND T1.productScale = '1:10' AND T4.country = 'USA' GROUP BY T1.productName ORDER BY SUM(T2.quantityOrdered) DESC LIMIT 1

Among the motorcycles with product scale of 1:10 , which of them is the most ordered by American customers ?

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


Question: How many different jobs are listed?


Question: To which menu does the menu page image ID5189412 belong? Please give its name.

SELECT T1.name FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.image_id = 5189412

To which menu does the menu page image ID5189412 belong ? Please give its name .

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


Question: Among the Production Technicians who are single, how many of them are vendor contact?

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.JobTitle LIKE 'Production Technician%' AND T1.MaritalStatus = 'S' AND T2.PersonType = 'VC'

Among the Production Technicians who are single , how many of them are vendor contact ?

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


Question: What is the percentage of players that are under 180 cm who have an overall strength of more than 70?

SELECT CAST(COUNT(CASE WHEN t2.overall_rating > 70 THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.height < 180

What is the percentage of players that are under 180 cm who have an overall strength of more than 70 ?

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


Question: Show the names of companies in the banking or retailing industry?

SELECT Name FROM company WHERE Industry  =  "Banking" OR Industry  =  "Retailing"

Show the names of companies in the banking or retailing industry ?

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


Question: Please list support, consider, and oppose rates for each candidate in ascending order by unsure rate.

SELECT Support_rate ,  Consider_rate ,  Oppose_rate FROM candidate ORDER BY unsure_rate

Please list support , consider , and oppose rates for each candidate in ascending order by unsure rate .

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


Question: Which two products has the highest and lowest expected profits? Determine the total price for each product in terms of the largest quantity that was ordered.

SELECT T2.productName, SUM(T1.quantityOrdered * T1.priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice DESC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode UNION SELECT T2.productName, SUM(quantityOrdered * priceEach) FROM orderdetails AS T1 INNER JOIN ( SELECT productCode, productName FROM products ORDER BY MSRP - buyPrice ASC LIMIT 1 ) AS T2 ON T1.productCode = T2.productCode

Which two products has the highest and lowest expected profits ? Determine the total price for each product in terms of the largest quantity that was ordered .

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


Question: Among the players from the NBL league, how many of them were born in Spencer?

SELECT COUNT(DISTINCT T1.playerID) FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T1.birthCity = 'Spencer' AND T2.lgID = 'NBL'

Among the players from the NBL league , how many of them were born in Spencer ?

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


Question: What is the percentage of male characters in the movie "Bride Wars"?

SELECT CAST(COUNT(CASE WHEN T3.gender = 'Male' THEN 1 ELSE NULL END) AS REAL) * 100 / COUNT(T3.gender) FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN gender AS T3 ON T2.gender_id = T3.gender_id WHERE T1.title = 'Bride Wars'

What is the percentage of male characters in the movie " Bride Wars " ?

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


Question: What are the name and payment method of customers who have both mailshots in 'Order' outcome and mailshots in 'No Response' outcome.

SELECT T2.customer_name ,  T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.outcome_code  =  'Order' INTERSECT SELECT T2.customer_name ,  T2.payment_method FROM mailshot_customers AS T1 JOIN customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.outcome_code  =  'No Response'

What are the name and payment method of customers who have both mailshots in ' Order ' outcome and mailshots in ' No Response ' outcome .

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


Question: Find the number of movies whose rating is ‘G’.

SELECT count(*) FROM movies WHERE rating  =  'G'

Find the number of movies whose rating is ‘ G ’ .

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


Question: How many Eredivisie teams have played in 2008?

SELECT COUNT(DISTINCT T1.HomeTeam) FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T2.name = 'Eredivisie' AND T1.season = 2008

How many Eredivisie teams have played in 2008 ?


Question: How many students graduated from Central Alabama Community College in 2011 in total?

SELECT T2.grad_cohort FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T1.chronname = 'Central Alabama Community College' AND T2.year = 2011

How many students graduated from Central Alabama Community College in 2011 in total ?

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


Question: List the page number for Catalan language wikipedia pages containing the word 'Art' in the page title.

SELECT page FROM pages WHERE title LIKE 'Art%' OR title LIKE '%Art%' OR title LIKE '%Art'

List the page number for Catalan language wikipedia pages containing the word ' Art ' in the page title .

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


Question: Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010.

SELECT SUM(`Walt Disney Parks and Resorts`) / SUM(Total) * 100 FROM revenue WHERE year = 2010

Find out what proportion of total revenue Walt Disney Parks and Resorts received in 2010 .

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


Question: Which team did the all league rebound champion play in 1997? Give the full name of the team.

SELECT T1.name FROM teams AS T1 INNER JOIN players_teams AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T2.year = 1997 GROUP BY T1.name ORDER BY SUM(rebounds + dRebounds) DESC LIMIT 1

Which team did the all league rebound champion play in 1997 ? Give the full name of the team .

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


Question: List out the top 3 genre for application with a sentiment review greater than 0.5.

SELECT Genres FROM playstore WHERE App IN ( SELECT App FROM user_reviews WHERE Sentiment = 'Positive' AND Sentiment_Polarity > 0.5 ORDER BY Sentiment_Polarity DESC LIMIT 3 )

List out the top 3 genre for application with a sentiment review greater than 0.5 .

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


Question: List venues of all matches in the order of their dates starting from the most recent one.

SELECT venue FROM MATCH ORDER BY date DESC

List venues of all matches in the order of their dates starting from the most recent one .

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


Question: What are the ages of the gymnasts, ordered descending by their total points?

SELECT T2.Age FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID ORDER BY T1.Total_Points DESC

What are the ages of the gymnasts , ordered descending by their total points ?

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


Question: What are the product names of Exotic Liquids?

SELECT T1.ProductName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T2.CompanyName = 'Exotic Liquids'

What are the product names of Exotic Liquids ?

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


Question: Which sales areas are expected to have the highest yearly sales quota?

SELECT T2.Name FROM SalesPerson AS T1 INNER JOIN SalesTerritory AS T2 ON T1.TerritoryID = T2.TerritoryID GROUP BY T1.TerritoryID ORDER BY SUM(T1.SalesQuota) DESC LIMIT 1

Which sales areas are expected to have the highest yearly sales quota ?

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


Question: What is id of the staff who had a Staff Department Assignment earlier than any Clerical Staff?

SELECT staff_id FROM Staff_Department_Assignments WHERE date_assigned_to  <  (SELECT max(date_assigned_to) FROM Staff_Department_Assignments WHERE job_title_code  =  'Clerical Staff')

What is i d of the staff who had a Staff Department Assignment earlier than any Clerical Staff ?

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


Question: How many countries use Portuguese?

SELECT SUM(CASE WHEN Language = 'Portuguese' THEN 1 ELSE 0 END) FROM CountryLanguage


Question: What are the names and average salaries for departments with average salary higher than 42000?

SELECT dept_name ,  AVG (salary) FROM instructor GROUP BY dept_name HAVING AVG (salary)  >  42000

What are the names and average salaries for departments with average salary higher than 42000 ?

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


Question: Which document has most of child? List the document id and the number of child.

SELECT T2.Document_Object_ID ,  count(*) FROM Document_Objects AS T1 JOIN Document_Objects AS T2 ON T1.Parent_Document_Object_ID = T2.Document_Object_ID GROUP BY T2.Document_Object_ID ORDER BY count(*) DESC LIMIT 1;

Which document has most of child ? List the document i d and the number of child .

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


Question: Count the number of clubs for which the student named "Eric Tai" is a member.

SELECT count(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.fname  =  "Eric" AND t3.lname  =  "Tai"

Count the number of clubs for which the student named " Eric Tai " is a member .

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


Question: List all the cities with micro CBSA.

SELECT T2.city FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T1.CBSA_type = 'Micro'


Question: In customers with marital status of never married, what is the percentage of customers with income of 2500 and above?

SELECT CAST(SUM(CASE WHEN T2.INCOME_K > 2500 THEN 1.0 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID WHERE T1.MARITAL_STATUS = 'Never-married'

In customers with marital status of never married , what is the percentage of customers with income of 2500 and above ?

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


Question: Please list the brands of all the root beer that Frank-Paul Santangelo had purchased on 2014/7/7.

SELECT DISTINCT T4.BrandName FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.First = 'Frank-Paul' AND T1.Last = 'Santangelo' AND T2.TransactionDate = '2014-07-07'

Please list the brands of all the root beer that Frank - Paul Santangelo had purchased on 2014/7/7 .

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


Question: How many powers does Amazo hero have?

SELECT COUNT(T1.power_id) FROM hero_power AS T1 INNER JOIN superhero AS T2 ON T1.hero_id = T2.id WHERE T2.superhero_name = 'Amazo'


Question: Count the number of schools that have had basketball matches.

SELECT count(DISTINCT school_id) FROM basketball_match

Count the number of schools that have had basketball matches .

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


Question: List all employees working for publisher 'GGG&G'. State their name and job description.

SELECT T1.fname, T1.lname, T3.job_desc FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN jobs AS T3 ON T1.job_id = T3.job_id WHERE T2.pub_name = 'GGG&G'

List all employees working for publisher ' GGG&G ' . State their name and job description .

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


Question: Find all contents present in warehouses located in Chicago and those located in New York.

SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'Chicago' INTERSECT SELECT T1.contents FROM boxes AS T1 JOIN warehouses AS T2 ON T1.warehouse  =  T2.code WHERE T2.location  =  'New York'

Find all contents present in warehouses located in Chicago and those located in New York .

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


Question: How many lessons have been cancelled?

SELECT count(*) FROM Lessons WHERE lesson_status_code = "Cancelled";


Question: Provide the name of the patient who had a claim on 1947/9/11.

SELECT T1.first, T1.last FROM patients AS T1 INNER JOIN claims AS T2 ON T1.patient = T2.PATIENT WHERE T2.billableperiod = '1947-09-11'

Provide the name of the patient who had a claim on 1947/9/11 .

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


Question: Find the number of routes for each source airport and the airport name.

SELECT count(*) ,  T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid  =  T2.src_apid GROUP BY T1.name

Find the number of routes for each source airport and the airport name .

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


Question: How many community areas are in the Far North side?

SELECT COUNT(*) FROM Community_Area WHERE side = 'Far North '

How many community areas are in the Far North side ?

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


Question: What are the highest and lowest prices of products, grouped by and alphabetically ordered by product type?

SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code

What are the highest and lowest prices of products , grouped by and alphabetically ordered by product type ?

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


Question: What are the states with the most invoices?

SELECT billing_state ,  COUNT(*) FROM invoices WHERE billing_country  =  "USA" GROUP BY billing_state ORDER BY COUNT(*) DESC LIMIT 1;

What are the states with the most invoices ?


Question: Which United States province is home to the greatest number of corporations' corporate headquarters?

SELECT T1.Province FROM country AS T1 INNER JOIN organization AS T2 ON T1.Code = T2.Country WHERE T1.Name = 'United States' GROUP BY T1.Province ORDER BY COUNT(T1.Name) DESC LIMIT 1

Which United States province is home to the greatest number of corporations ' corporate headquarters ?

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


Question: What are the names of all employees who can fly both the Boeing 737-800 and the Airbus A340-300?

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" INTERSECT 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  =  "Airbus A340-300"

What are the names of all employees who can fly both the Boeing 737 - 800 and the Airbus A340 - 300 ?

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


Question: How many staff are the document with id 0 and process with id 9.

SELECT count(*) FROM Staff_in_processes WHERE document_id  =  0 AND process_id  =  9

How many staff are the document with i d 0 and process with i d 9 .

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


Question: What is the ID of the university with the most students in 2011?

SELECT university_id FROM university_year WHERE year = 2011 ORDER BY num_students DESC LIMIT 1

What is the ID of the university with the most students in 2011 ?

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


Question: What are the daily hire costs for the products with substring 'Book' in its name?

SELECT daily_hire_cost FROM Products_for_hire WHERE product_name LIKE '%Book%'

What are the daily hire costs for the products with substring ' Book ' in its name ?

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


Question: Which user has a higher reputation, Harlan or Jarrod Dixon?

SELECT DisplayName FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') AND Reputation = ( SELECT MAX(Reputation) FROM users WHERE DisplayName IN ('Harlan', 'Jarrod Dixon') )

Which user has a higher reputation , Harlan or Jarrod Dixon ?

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


Question: in molecules with triple bonds, how many of them are not carcinogenic?

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

in molecules with triple bonds , how many of them are not carcinogenic ?


Question: What is the average number of sales in Japan?

SELECT AVG(T2.num_sales) * 100000 AS avg_japan FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id WHERE T1.region_name = 'Japan'

What is the average number of sales in Japan ?


Question: Please list the location coordinates of all the devices with an inactive app user when event no.2 happened.

SELECT DISTINCT T2.longitude, T2.latitude FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T2.event_id = 2 AND T1.is_active = 0

Please list the location coordinates of all the devices with an inactive app user when event no.2 happened .

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


Question: How many budget record has a budget amount smaller than the invested amount?

SELECT count(*) FROM budget WHERE budgeted  <  invested

How many budget record has a budget amount smaller than the invested amount ?

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