Question: For patient with albumin level lower than 3.5, list their ID, sex and diagnosis.

SELECT DISTINCT T1.ID, T1.SEX, T1.Diagnosis FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.ALB < 3.5

For patient with albumin level lower than 3.5 , list their ID , sex and diagnosis .

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


Question: Show the names of people and the number of times they have been on the affirmative side of debates.

SELECT T2.Name ,  COUNT(*) FROM debate_people AS T1 JOIN people AS T2 ON T1.Affirmative  =  T2.People_ID GROUP BY T2.Name

Show the names of people and the number of times they have been on the affirmative side of debates .

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


Question: List all the distinct product names, price and descriptions which are bought by female customers.

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

List all the distinct product names , price and descriptions which are bought by female customers .

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


Question: what are name and phone number of patients who had more than one appointment?

SELECT name ,  phone FROM appointment AS T1 JOIN patient AS T2 ON T1.patient  =  T2.ssn GROUP BY T1.patient HAVING count(*)  >  1

what are name and phone number of patients who had more than one appointment ?

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


Question: Find the names and number of works of all artists who have at least one English songs.

SELECT T1.artist_name ,  count(*) FROM artist AS T1 JOIN song AS T2 ON T1.artist_name  =  T2.artist_name WHERE T2.languages  =  "english" GROUP BY T2.artist_name HAVING count(*)  >=  1

Find the names and number of works of all artists who have at least one English songs .

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


Question: For each college, return the college name and the count of authors with submissions from that college.

SELECT College ,  COUNT(*) FROM submission GROUP BY College

For each college , return the college name and the count of authors with submissions from that college .

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


Question: What are all of the package numbers received by Leo Wong?

SELECT T1.PackageNumber FROM PACKAGE AS T1 JOIN Client AS T2 ON T1.Recipient  =  T2.AccountNumber WHERE T2.Name = "Leo Wong";

What are all of the package numbers received by Leo Wong ?

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


Question: What is the owner user id of the most valuable post?

SELECT OwnerUserId FROM posts WHERE FavoriteCount = ( SELECT MAX(FavoriteCount) FROM posts )

What is the owner user i d of the most valuable post ?

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


Question: Which attraction type does the most tourist attractions belong to? Tell me its  attraction type description and code.

SELECT T1.Attraction_Type_Description ,  T2.Attraction_Type_Code FROM Ref_Attraction_Types AS T1 JOIN Tourist_Attractions AS T2 ON T1.Attraction_Type_Code  =  T2.Attraction_Type_Code GROUP BY T2.Attraction_Type_Code ORDER BY COUNT(*) DESC LIMIT 1

Which attraction type does the most tourist attractions belong to ? Tell me its attraction type description and code .

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


Question: What is the total price of Ikura ordered in order no. 10273?

SELECT T2.UnitPrice * T2.Quantity FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T2.OrderID = 10273 AND T1.ProductName = 'Ikura'

What is the total price of Ikura ordered in order no . 10273 ?

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


Question: What are the album titles for albums containing both 'Reggae' and 'Rock' genre tracks?

SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Reggae' INTERSECT SELECT T1.Title FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId  =  T2.AlbumId JOIN Genre AS T3 ON T2.GenreID  =  T3.GenreID WHERE T3.Name  =  'Rock'

What are the album titles for albums containing both ' Reggae ' and ' Rock ' genre tracks ?

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


Question: What products are no longer sold by Northwind?

SELECT ProductName FROM Products WHERE Discontinued = 1

What products are no longer sold by Northwind ?


Question: How many of the patients who underwent a 'bone immobilization' procedure have a driver's license?

SELECT COUNT(DISTINCT T1.patient) FROM patients AS T1 INNER JOIN procedures AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Bone immobilization' AND T1.drivers IS NOT NULL

How many of the patients who underwent a ' bone immobilization ' procedure have a driver 's license ?

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


Question: Calculate the percentage of male clients from Indianapolis City.

SELECT CAST(SUM(CASE WHEN sex = 'Male' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(client_id) FROM client WHERE city = 'Indianapolis'

Calculate the percentage of male clients from Indianapolis City .

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


Question: how many degrees were conferred between 1998 and 2002?

SELECT T1.campus ,  sum(T2.degrees) FROM campuses AS T1 JOIN degrees AS T2 ON T1.id  =  T2.campus WHERE T2.year  >=  1998 AND T2.year  <=  2002 GROUP BY T1.campus

how many degrees were conferred between 1998 and 2002 ?


Question: What is the id of every employee who has at least a salary of  100000?

SELECT eid FROM Employee WHERE salary  >  100000

What is the i d of every employee who has at least a salary of 100000 ?

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


Question: What are the famous titles of the artist "Triumfall"?

SELECT Famous_Title FROM artist WHERE Artist  =  "Triumfall"

What are the famous titles of the artist " Triumfall " ?

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


Question: Give the name of the film for inventory No.3479.

SELECT T1.title FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T2.inventory_id = 3479

Give the name of the film for inventory No.3479 .


Question: Find the average points and average ages of all spokesmen whose rank position is 1.

SELECT avg(points) ,  avg(age) FROM spokesman WHERE rank_position  =  1

Find the average points and average ages of all spokesmen whose rank position is 1 .

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


Question: What is the name of the product with the almost highest review score?

SELECT T1.Name FROM Product AS T1 INNER JOIN ProductReview AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Rating = ( SELECT Rating FROM ProductReview ORDER BY Rating DESC LIMIT 1 )

What is the name of the product with the almost highest review score ?

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


Question: Among the matches of Delhi Daredevils in 2009, what is the percentage of their matches won by wickets?

SELECT CAST(SUM(CASE WHEN T3.Win_Type = 'wickets' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T3.Win_Type) FROM Team AS T1 INNER JOIN Match AS T2 ON T1.Team_Id = T2.Match_Winner INNER JOIN Win_By AS T3 ON T2.Win_Type = T3.Win_Id WHERE T1.Team_Name = 'Delhi Daredevils'

Among the matches of Delhi Daredevils in 2009 , what is the percentage of their matches won by wickets ?

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


Question: For the on going assembly item Component ID No. 494, what's the Unit measure for it?

SELECT T2.Name FROM BillOfMaterials AS T1 INNER JOIN UnitMeasure AS T2 ON T1.UnitMeasureCode = T2.UnitMeasureCode WHERE T1.ComponentID = 494 AND T1.EndDate IS NULL GROUP BY T2.name

For the on going assembly item Component ID No . 494 , what 's the Unit measure for it ?

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


Question: Select the name of the products with a price less than or equal to $200.

SELECT name FROM products WHERE price  <=  200

Select the name of the products with a price less than or equal to $ 200 .

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


Question: Among the countries that have GNP greater than 1500, what is the percentage of the countries have English as its language?

SELECT CAST(SUM(IIF(T2.Language = 'English', 1, 0)) AS REAL) * 100 / COUNT(T1.Code) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.GNP > 1500

Among the countries that have GNP greater than 1500 , what is the percentage of the countries have English as its language ?

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


Question: What is the average weight of all female superheroes?

SELECT AVG(T1.weight_kg) FROM superhero AS T1 INNER JOIN gender AS T2 ON T1.gender_id = T2.id WHERE T2.gender = 'Female'

What is the average weight of all female superheroes ?


Question: How many persons are not body builders?

SELECT count(*) FROM people WHERE people_id NOT IN (SELECT People_ID FROM body_builder)

How many persons are not body builders ?


Question: How many different source system code for the cmi cross references are there?

SELECT count(DISTINCT source_system_code) FROM CMI_cross_references

How many different source system code for the cmi cross references are there ?

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


Question: What are the names of customers who live in Colorado state?

SELECT t1.customer_name FROM customers AS t1 JOIN customer_addresses AS t2 ON t1.customer_id  =  t2.customer_id JOIN addresses AS t3 ON t2.address_id  =  t3.address_id WHERE t3.state_province_county  =  "Colorado"

What are the names of customers who live in Colorado state ?


Question: How many patients on average receive combined chemotherapy and radiation therapy procedures each year?

SELECT CAST(COUNT(PATIENT) AS REAL) / COUNT(DISTINCT strftime('%Y', DATE)) FROM procedures WHERE DESCRIPTION = 'Combined chemotherapy and radiation therapy (procedure)'

How many patients on average receive combined chemotherapy and radiation therapy procedures each year ?

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


Question: How many tweets are seen by more than 1000 unique users?

SELECT COUNT(TweetID) AS tweet_number FROM twitter WHERE Reach > 1000

How many tweets are seen by more than 1000 unique users ?


Question: Please list the websites where I can purchase the cards that have the promotional type of "bundle".

SELECT DISTINCT purchaseUrls FROM cards WHERE promoTypes = 'bundle'

Please list the websites where I can purchase the cards that have the promotional type of " bundle " .

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


Question: What is the name of the client who has the largest quantity of rented material without returning it?

SELECT T.first_name FROM ( SELECT T2.first_name, COUNT(T1.rental_date) AS num FROM rental AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id GROUP BY T2.first_name ) AS T ORDER BY T.num DESC LIMIT 1

What is the name of the client who has the largest quantity of rented material without returning it ?

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


Question: List apps whose rating is 3.9 and state the translated review of each app.

SELECT T1.App, T2.Translated_Review FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.Rating = 3.9

List apps whose rating is 3.9 and state the translated review of each app .

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


Question: List down the first name of customers who placed order for product id 1.

SELECT T1.FirstName FROM Customers AS T1 INNER JOIN Sales AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE T2.ProductID = 1

List down the first name of customers who placed order for product i d 1 .

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


Question: List the names of all distinct paintings in alphabetical order.

SELECT DISTINCT title FROM paintings ORDER BY title

List the names of all distinct paintings in alphabetical order .


Question: Find the number of songs in all the studio albums.

SELECT count(DISTINCT T3.title) FROM albums AS T1 JOIN tracklists AS T2 ON T1.aid  =  T2.albumid JOIN songs AS T3 ON T2.songid  =  T3.songid WHERE t1.type  =  "Studio"

Find the number of songs in all the studio albums .

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


Question: Find the policy type the most customers choose.

SELECT Policy_Type_Code FROM Customer_Policies GROUP BY Policy_Type_Code ORDER BY count(*) DESC LIMIT 1

Find the policy type the most customers choose .


Question: Show the document name and the document date for all documents on project with details 'Graph Database project'.

SELECT document_name ,  document_date FROM Documents AS T1 JOIN projects AS T2 ON T1.project_id  =  T2.project_id WHERE T2.project_details  =  'Graph Database project'

Show the document name and the document date for all documents on project with details ' Graph Database project ' .

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


Question: Among the countries with over 3 organizations, how many of them have an inflation rate of over 5%?

SELECT COUNT(T2.Country) FROM economy AS T1 INNER JOIN organization AS T2 ON T1.Country = T2.Country WHERE T2.Country IN ( SELECT Country FROM organization GROUP BY Country HAVING COUNT(Country) > 3 ) AND T1.Inflation > 5

Among the countries with over 3 organizations , how many of them have an inflation rate of over 5 % ?

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


Question: List the invoice dates and ids of the invoices causing at least 2 shipments.

SELECT T1.invoice_date ,  T1.invoice_number FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number  =  T2.invoice_number GROUP BY T1.invoice_number HAVING count(*)  >=  2

List the invoice dates and ids of the invoices causing at least 2 shipments .

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


Question: How many directors have directed atleast 10 movies between 1960 to 1985? Indicate the name of the movie in those years of each director that received the highest amount of 5 rating score.

SELECT T2.director_name FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year BETWEEN 1960 AND 1985 GROUP BY T2.director_name HAVING COUNT(T2.movie_id) > 10

How many directors have directed atleast 10 movies between 1960 to 1985 ? Indicate the name of the movie in those years of each director that received the highest amount of 5 rating score .

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


Question: Find the number of followers for each user.

SELECT count(*) FROM follows GROUP BY f1

Find the number of followers for each user .


Question: Which teachers teach a class that has the substring 'data' in its detail but do not teach a class that has prefix 'net' in its detail? Give me the teacher details.

SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.class_details LIKE '%data%' EXCEPT SELECT T1.teacher_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id WHERE T2.class_details LIKE 'net%'

Which teachers teach a class that has the substring ' data ' in its detail but do not teach a class that has prefix ' net ' in its detail ? Give me the teacher details .

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


Question: What are all the employee ids and the names of the countries in which they work?

SELECT T1.employee_id ,  T4.country_name FROM employees AS T1 JOIN departments AS T2 ON T1.department_id  =  T2.department_id JOIN locations AS T3 ON T2.location_id  =  T3.location_id JOIN countries AS T4 ON T3.country_id  =  T4.country_id

What are all the employee ids and the names of the countries in which they work ?

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


Question: Show all customer ids and the number of accounts for each customer.

SELECT customer_id ,  count(*) FROM Accounts GROUP BY customer_id

Show all customer ids and the number of accounts for each customer .

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


Question: Which nation and region does the Customer#000000008 come from?

SELECT T1.n_name, T3.r_name FROM nation AS T1 INNER JOIN customer AS T2 ON T1.n_nationkey = T2.c_nationkey INNER JOIN region AS T3 ON T1.n_regionkey = T3.r_regionkey WHERE T2.c_name = 'Customer#000000008'

Which nation and region does the Customer#000000008 come from ?

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


Question: What buildings have faculty offices?


Question: Count the number of products.


Question: For the patients who have an abnormal level of anti-DNA, please list the diseases they are diagnosed with.

SELECT DISTINCT(T1.Diagnosis) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.DNA >= 8

For the patients who have an abnormal level of anti - DNA , please list the diseases they are diagnosed with .

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


Question: What are the first and last name of all biology professors?

SELECT T3.EMP_FNAME ,  T3.EMP_LNAME FROM professor AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code JOIN employee AS T3 ON T1.EMP_NUM  =  T3.EMP_NUM WHERE DEPT_NAME  =  "Biology"

What are the first and last name of all biology professors ?

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


Question: Write down the Social Security numbers of patients who have latex allergies.

SELECT T1.ssn FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Latex allergy'

Write down the Social Security numbers of patients who have latex allergies .

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


Question: Which document subset has most of number of distinct documents ? List subset id , name and number of documents .

select t1.document_subset_id ,  t2.document_subset_name , count(distinct t1.document_object_id) from document_subset_members as t1 join document_subsets as t2 on t1.document_subset_id =  t2.document_subset_id group by t1.document_subset_id order by count(*) desc limit 1;

Which document subset has most of number of distinct documents ? List subset i d , name and number of documents .

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


Question: How many unemployed students filed for bankruptcy?

SELECT COUNT(T1.name) FROM unemployed AS T1 INNER JOIN filed_for_bankrupcy AS T2 ON T2.name = T1.name

How many unemployed students filed for bankruptcy ?


Question: How many documents have the status code done?

SELECT count(*) FROM Documents WHERE document_status_code = "done";

How many documents have the status code done ?

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


Question: What are the region names affected by the storm with a number of deaths of least 10?

SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id WHERE T3.number_deaths  >=  10

What are the region names affected by the storm with a number of deaths of least 10 ?

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


Question: Return the titles of films that include 'Deleted Scenes' in their special feature section.

SELECT title FROM film WHERE special_features LIKE '%Deleted Scenes%'

Return the titles of films that include ' Deleted Scenes ' in their special feature section .

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


Question: Please show the themes of competitions with host cities having populations larger than 1000.

SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID WHERE T1.Population  >  1000

Please show the themes of competitions with host cities having populations larger than 1000 .

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


Question: What is the age of the friend of Zach with longest year relationship?

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

What is the age of the friend of Zach with longest year relationship ?

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


Question: Which territory has the most customers as of 9/12/2014?

SELECT TerritoryID FROM Customer WHERE ModifiedDate < '2014-12-09' GROUP BY TerritoryID ORDER BY COUNT(TerritoryID) DESC LIMIT 1

Which territory has the most customers as of 9/12/2014 ?


Question: Return the name, phone number and email address for the customer with the most orders.

SELECT T1.customer_name ,  T1.customer_phone ,  T1.customer_email FROM customers AS T1 JOIN customer_orders AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T2.customer_id ORDER BY count(*) DESC LIMIT 1

Return the name , phone number and email address for the customer with the most orders .


Question: What is the website of the constructor who tallied the most total wins.

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

What is the website of the constructor who tallied the most total wins .

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


Question: Provide the names of competitors who received a gold medal.

SELECT DISTINCT T1.full_name FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T4.medal_name = 'Gold'

Provide the names of competitors who received a gold medal .

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


Question: What type of bond is there between the atoms TR004_8 and TR004_20?

SELECT T1.bond_type FROM bond AS T1 INNER JOIN connected AS T2 ON T1.bond_id = T2.bond_id WHERE T2.atom_id = 'TR004_8' AND T2.atom_id2 = 'TR004_20' OR T2.atom_id2 = 'TR004_8' AND T2.atom_id = 'TR004_20'

What type of bond is there between the atoms TR004_8 and TR004_20 ?

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


Question: What are the titles of books with the highest purchase price across all books ?

select title from book order by purchaseprice  desc limit 1

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


Question: How many likes did short comment left by users who joined in 2010 get?

SELECT SUM(T2.likes) FROM Users AS T1 INNER JOIN Tips AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2010

How many likes did short comment left by users who joined in 2010 get ?

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


Question: Find the name of the affiliation whose address contains 'China' and publishes the greatest number of papers.

SELECT T1.name FROM Affiliation AS T1 JOIN Author_list AS T2 ON T1.affiliation_id  =  T2.affiliation_id WHERE T1.address LIKE "%China%" GROUP BY T1.affiliation_id ORDER BY count(*) DESC LIMIT 1

Find the name of the affiliation whose address contains ' China ' and publishes the greatest number of papers .

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


Question: Which physicians are affiliated with both Surgery and Psychiatry departments? Tell me their names.

SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Surgery' INTERSECT SELECT T1.name FROM physician AS T1 JOIN affiliated_with AS T2 ON T1.EmployeeID  =  T2.physician JOIN department AS T3 ON T2.department  =  T3.DepartmentID WHERE T3.name  =  'Psychiatry'

Which physicians are affiliated with both Surgery and Psychiatry departments ? Tell me their names .

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


Question: How many crews were born in the USA?

SELECT COUNT(name) FROM Person WHERE birth_country = 'USA';


Question: Show all investor details.


Question: How many photos does each property have?

SELECT count(*) ,  property_id FROM Property_Photos GROUP BY property_id;

How many photos does each property have ?


Question: What are different types of affiliations of institutions and the corresponding number of institutions?

SELECT Affiliation ,  COUNT(*) FROM institution GROUP BY Affiliation

What are different types of affiliations of institutions and the corresponding number of institutions ?

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


Question: Which range contains the most mountains?

SELECT Range FROM mountain GROUP BY Range ORDER BY COUNT(*) DESC LIMIT 1

Which range contains the most mountains ?


Question: How many establishments that are doing business as Homemade Pizza have a risk level of 2?

SELECT COUNT(license_no) FROM establishment WHERE risk_level = 2 AND dba_name = 'HOMEMADE PIZZA'

How many establishments that are doing business as Homemade Pizza have a risk level of 2 ?

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


Question: Calculate the average number of shipments that Zachery Hicks shipped in year 2017.

SELECT CAST(SUM(CASE WHEN T2.first_name = 'Zachery' AND T2.last_name = 'Hicks' THEN T1.ship_id ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM shipment AS T1 INNER JOIN driver AS T2 ON T1.driver_id = T2.driver_id WHERE STRFTIME('%Y', T1.ship_date) = '2017'

Calculate the average number of shipments that Zachery Hicks shipped in year 2017 .

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


Question: How many customers are there?


Question: Find the number of teachers who teach the student called MADLOCK RAY.

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

Find the number of teachers who teach the student called MADLOCK RAY .

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


Question: Find the average ride time of the bikes that started at Steuart at Market station and ended at Embarcadero at Sansome station in July 2014.

SELECT AVG(duration) FROM trip WHERE start_date = '7/1/2014%' AND end_date = '7/31/2014%' AND start_station_name = 'Steuart at Market' AND end_station_name = 'Embarcadero at Sansome'

Find the average ride time of the bikes that started at Steuart at Market station and ended at Embarcadero at Sansome station in July 2014 .

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


Question: Find the average number of ornaments sold each month in 2018.

SELECT CAST(SUM(T2.`Order Quantity`) AS REAL) / 12 FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID WHERE T1.`Product Name` = 'Ornaments' AND T2.OrderDate LIKE '%/%/18'

Find the average number of ornaments sold each month in 2018 .


Question: Name all lists created by a user who was a subcriber when created the list.

SELECT DISTINCT T2.list_id FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T1.user_subscriber = 1

Name all lists created by a user who was a subcriber when created the list .

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


Question: Calculate the percentage of order via in-store channel of customer "Medline".

SELECT CAST(SUM(CASE WHEN T1.`Sales Channel` = 'In-Store' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1._CustomerID) FROM `Sales Orders` AS T1 INNER JOIN Customers AS T2 ON T2.CustomerID = T1._CustomerID WHERE T2.`Customer Names` = 'Medline '

Calculate the percentage of order via in - store channel of customer " Medline " .

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


Question: Which country has the most number of suppliers whose account is in debt?

SELECT T.n_name FROM ( SELECT T2.n_name, SUM(T1.s_acctbal) AS num FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 GROUP BY T2.n_name ) AS T ORDER BY T.num LIMIT 1

Which country has the most number of suppliers whose account is in debt ?

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


Question: Return the last name for the members of the club named "Hopkins Student Enterprises".

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

Return the last name for the members of the club named " Hopkins Student Enterprises " .

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


Question: List all process ids with no document.

SELECT process_id FROM Business_processes EXCEPT SELECT process_id FROM Documents_processes


Question: How many people were there in the Engineering Department in the year 2009?

SELECT COUNT(T1.BusinessEntityID) FROM Person AS T1 INNER JOIN EmployeeDepartmentHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN Department AS T3 ON T2.DepartmentID = T3.DepartmentID WHERE T3.Name = 'Engineering' AND STRFTIME('%Y', T2.EndDate) > '2009' AND STRFTIME('%Y', T2.StartDate) < '2009'

How many people were there in the Engineering Department in the year 2009 ?

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


Question: What are the names of wines, sorted in alphabetical order?

SELECT DISTINCT Name FROM WINE ORDER BY Name

What are the names of wines , sorted in alphabetical order ?


Question: What is the height of the tallest player? Indicate his name.

SELECT player_name FROM Player ORDER BY height DESC LIMIT 1

What is the height of the tallest player ? Indicate his name .


Question: List the names and origins of people who are not body builders.

SELECT Name ,  birth_place FROM people EXCEPT SELECT T1.Name ,  T1.birth_place FROM people AS T1 JOIN body_builder AS T2 ON T1.people_id  =  T2.people_id

List the names and origins of people who are not body builders .

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


Question: What are the email address, town and county of the customers who are of the least common gender?

SELECT email_address ,  town_city ,  county FROM Customers WHERE gender_code  =  ( SELECT gender_code FROM Customers GROUP BY gender_code ORDER BY count(*) ASC LIMIT 1 )

What are the email address , town and county of the customers who are of the least common gender ?

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


Question: Show the ids and details of the investors who have at least two transactions with type code "SALE".

SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id WHERE T2.transaction_type_code  =  "SALE" GROUP BY T2.investor_id HAVING COUNT(*)  >=  2

Show the ids and details of the investors who have at least two transactions with type code " SALE " .

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


Question: How many items weren't sold in store 2 on 1/1/2012?

SELECT COUNT(item_nbr) FROM sales_in_weather WHERE store_nbr = 2 AND units = 0 AND `date` = '2012-01-01'

How many items were n't sold in store 2 on 1/1/2012 ?

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


Question: Find the number of employees whose title is IT Staff from each city?

SELECT count(*) ,  city FROM employees WHERE title  =  'IT Staff' GROUP BY city

Find the number of employees whose title is IT Staff from each city ?

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


Question: What is the velocity of the pilot named 'Thompson'?

SELECT avg(velocity) FROM flight WHERE pilot  =  'Thompson'

What is the velocity of the pilot named ' Thompson ' ?

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


Question: Among the account opened, how many female customers who were born before 1950 and stayed in Sokolov?

SELECT COUNT(T2.client_id) FROM district AS T1 INNER JOIN client AS T2 ON T1.district_id = T2.district_id WHERE T2.gender = 'F' AND STRFTIME('%Y', T2.birth_date) < '1950' AND T1.A2 = 'Sokolov'

Among the account opened , how many female customers who were born before 1950 and stayed in Sokolov ?

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


Question: How much is the total purchase price, including freight, of the top 2 most expensive products?

SELECT T2.UnitPrice * T2.Quantity + T1.Freight FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID ORDER BY T2.UnitPrice * T2.Quantity + T1.Freight DESC LIMIT 2

How much is the total purchase price , including freight , of the top 2 most expensive products ?

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


Question: Please list the release dates of all the movies in which Alan Tudyk is a voice actor.

SELECT T2.release_date FROM `voice-actors` AS T1 INNER JOIN characters AS T2 ON T1.movie = T2.movie_title WHERE T1.`voice-actor` = 'Alan Tudyk'

Please list the release dates of all the movies in which Alan Tudyk is a voice actor .

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


Question: What are the department ids, full names, and salaries for employees who make the most in their departments?

SELECT first_name ,   last_name ,   salary ,  department_id ,  MAX(salary) FROM employees GROUP BY department_id

What are the department ids , full names , and salaries for employees who make the most in their departments ?

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


Question: Provide the title of the movie that is most-liked by a large number of people.

SELECT title FROM movie ORDER BY popularity DESC LIMIT 1

Provide the title of the movie that is most - liked by a large number of people .

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


Question: What is the rule of playing card "Benalish Knight"?

SELECT T2.format FROM cards AS T1 INNER JOIN legalities AS T2 ON T1.uuid = T2.uuid WHERE T1.name = 'Benalish Knight'

What is the rule of playing card " Benalish Knight " ?

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


Question: Which year had the most number of trips that started at stations in San Francisco?

SELECT SUBSTR(CAST(T1.start_date AS TEXT), INSTR(T1.start_date, ' '), -4) FROM trip AS T1 INNER JOIN station AS T2 ON T2.name = T1.start_station_name WHERE T2.city = 'San Francisco' GROUP BY T1.start_station_name ORDER BY COUNT(T1.id) DESC LIMIT 1

Which year had the most number of trips that started at stations in San Francisco ?

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


Question: How many "cool" compliments did user number 33 receive?

SELECT COUNT(T2.compliment_type) FROM Users_Compliments AS T1 INNER JOIN Compliments AS T2 ON T1.compliment_id = T2.compliment_id WHERE T1.user_id = 33 AND T2.compliment_type LIKE 'cool'

How many " cool " compliments did user number 33 receive ?

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


Question: What are the sculptures called and where are they located?

SELECT title ,  LOCATION FROM sculptures

What are the sculptures called and where are they located ?


Question: Which category does "tofu" belong to?

SELECT T2.CategoryName FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T1.ProductName = 'Tofu'

Which category does " tofu " belong to ?


Question: Find details of all the services that have been marked as `` unsatisfied '' in customers and services details .

select distinct t1.service_details from services as t1 join customers_and_services as t2 on t1.service_id  =  t2.service_id where t2.customers_and_services_details  =  "unsatisfied"

Find details of all the services that have been marked as ` ` unsatisfied '' in customers and services details .

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


Question: How many matches did Rajasthan Royals play in Season 8?

SELECT SUM(CASE WHEN T1.Season_Id = 8 THEN 1 ELSE 0 END) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Rajasthan Royals'

How many matches did Rajasthan Royals play in Season 8 ?

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


Question: Who created the list that has 142 comments? Indicate the user id of the user, if there are multiple lists with 142 comments, list the user id of the person who created the list

SELECT user_id FROM lists WHERE list_comments = 142

Who created the list that has 142 comments ? Indicate the user i d of the user , if there are multiple lists with 142 comments , list the user i d of the person who created the list

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


Question: Please list player names which are higher than 180.

SELECT player_name FROM Player WHERE height > 180

Please list player names which are higher than 180 .

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


Question: What are the ages of the oldest and youngest user that were surveyed? Indicate their user id.

SELECT MAX(T1.AnswerText), MIN(T1.AnswerText) , ( SELECT T1.UserID FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1 ORDER BY T1.AnswerText LIMIT 1 ) AS "youngest id" FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questionid = 1

What are the ages of the oldest and youngest user that were surveyed ? Indicate their user i d.

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


Question: Among all the times event no.2 happened when the app user was not active, when was the earliest time this situation happened?

SELECT T2.timestamp FROM app_events AS T1 INNER JOIN events AS T2 ON T2.event_id = T1.event_id WHERE T1.is_active = 0 AND T2.event_id = 2 ORDER BY T2.timestamp LIMIT 1

Among all the times event no.2 happened when the app user was not active , when was the earliest time this situation happened ?

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


Question: What are the names of products that have never been ordered?

SELECT product_name FROM Products EXCEPT SELECT T1.product_name FROM Products AS T1 JOIN Order_items AS T2 ON T1.product_id  =  T2.product_id

What are the names of products that have never been ordered ?


Question: Indicate the id of the reviewer whose itunes id is 1516665400.

SELECT T2.author_id FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.itunes_id = 1516665400

Indicate the i d of the reviewer whose itunes i d is 1516665400 .

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


Question: What is the latitude, longitude, city of the station from which the shortest trip started?

SELECT T1.lat ,  T1.long ,  T1.city FROM station AS T1 JOIN trip AS T2 ON T1.id  =  T2.start_station_id ORDER BY T2.duration LIMIT 1

What is the latitude , longitude , city of the station from which the shortest trip started ?

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


Question: Find the biographical data and details for students whose student loan is above the average amount.

SELECT T1.bio_data ,  T1.student_details FROM Students AS T1 JOIN Student_Loans AS T2 ON T1.student_id  =  T2.student_id WHERE T2.amount_of_loan  >  ( SELECT avg(amount_of_loan) FROM Student_Loans )

Find the biographical data and details for students whose student loan is above the average amount .

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


Question: Indicate the name of the categories to which the products of order number 10933 belong.

SELECT T3.CategoryName FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Categories AS T3 ON T1.CategoryID = T3.CategoryID WHERE T2.OrderID = 10933

Indicate the name of the categories to which the products of order number 10933 belong .

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


Question: Give the average quantity of stocks.


Question: Which bicycle is the least used bike. Check if the start and end station are from the same city and calculate the total duration travelled by the bicycle in hours for a trip made within the same city.

SELECT T2.bike_id, T2.start_station_name, T2.end_station_name, T1.city , CAST(T2.duration AS REAL) / 3600 FROM station AS T1 INNER JOIN trip AS T2 ON T1.name = T2.start_station_name GROUP BY T2.bike_id ORDER BY COUNT(T2.id) DESC LIMIT 1

Which bicycle is the least used bike . Check if the start and end station are from the same city and calculate the total duration travelled by the bicycle in hours for a trip made within the same city .

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


Question: Which city does the student whose last name is "Kim" live in?

SELECT city_code FROM Student WHERE LName  =  "Kim"

Which city does the student whose last name is " Kim " live in ?

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


Question: Sum the total number of products rejected for having a trim length that is too long.

SELECT SUM(T2.ScrappedQty) FROM ScrapReason AS T1 INNER JOIN WorkOrder AS T2 ON T1.ScrapReasonID = T2.ScrapReasonID WHERE T1.Name = 'Trim length too long'

Sum the total number of products rejected for having a trim length that is too long .

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


Question: Among all the users who use a vivo device, what is the percentage of the users in the M23-26 user group?

SELECT SUM(IIF(T1.`group` = 'M23-26', 1.0, 0)) / COUNT(T1.device_id) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo'

Among all the users who use a vivo device , what is the percentage of the users in the M23 - 26 user group ?

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


Question: List the quantity and price of the product bought by Abigail Henderson.

SELECT T2.Quantity, T1.Price FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID INNER JOIN Customers AS T3 ON T2.CustomerID = T3.CustomerID WHERE T3.FirstName = 'Abigail' AND T3.LastName = 'Henderson'

List the quantity and price of the product bought by Abigail Henderson .

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


Question: What are the companies and investors that correspond to each entrepreneur?

SELECT Company ,  Investor FROM entrepreneur

What are the companies and investors that correspond to each entrepreneur ?

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


Question: How many orders did "Laughing Bacchus Wine Cellars" make?

SELECT COUNT(T2.OrderID) FROM Customers AS T1 INNER JOIN Orders AS T2 ON T1.CustomerID = T2.CustomerID WHERE T1.CompanyName = 'Laughing Bacchus Wine Cellars'

How many orders did " Laughing Bacchus Wine Cellars " make ?

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


Question: Find the id of instructors who taught a class in Fall 2009 but not in Spring 2010.

SELECT id FROM teaches WHERE semester  =  'Fall' AND YEAR  =  2009 EXCEPT SELECT id FROM teaches WHERE semester  =  'Spring' AND YEAR  =  2010

Find the i d of instructors who taught a class in Fall 2009 but not in Spring 2010 .

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


Question: State the date Connor Hilton paid his/her dues.

SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Connor' AND T1.last_name = 'Hilton' AND T2.source = 'Dues'

State the date Connor Hilton paid his / her dues .


Question: How many games were released on PS4 in 2014?

SELECT COUNT(DISTINCT T3.game_id) FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id WHERE T1.platform_name = 'PS4' AND T2.release_year = 2014

How many games were released on PS4 in 2014 ?

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


Question: How much is the total rental payment for the first 10 rentals?

SELECT SUM(amount) FROM payment WHERE rental_id BETWEEN 1 AND 10

How much is the total rental payment for the first 10 rentals ?

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


Question: Find flavor of cakes that cost more than 10 dollars.

SELECT flavor FROM goods WHERE food  =  "Cake" AND price  >  10

Find flavor of cakes that cost more than 10 dollars .

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


Question: What's the task of the method whose tokenized name is "html parser feed"?

SELECT SUBSTR(SUBSTR(Name, INSTR(Name, '.') + 1), 1, INSTR(SUBSTR(Name, INSTR(Name, '.') + 1), '.') - 1) task FROM Method WHERE NameTokenized = 'html parser feed'

What 's the task of the method whose tokenized name is " html parser feed " ?

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


Question: How many animation film titles are rated for adults only?

SELECT COUNT(T1.title) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'animation' AND T1.rating = 'NC-17'

How many animation film titles are rated for adults only ?

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


Question: What is the location of the perpetrator with the largest kills.

SELECT LOCATION FROM perpetrator ORDER BY Killed DESC LIMIT 1

What is the location of the perpetrator with the largest kills .

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


Question: What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people.

SELECT roomName ,  RoomId FROM Rooms WHERE basePrice  >  160 AND maxOccupancy  >  2;

What are the room names and ids of all the rooms that cost more than 160 and can accommodate more than two people .

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


Question: Return the invoice ids, statuses, and details for invoices with the most payments?

SELECT T1.invoice_id ,  T2.invoice_status ,  T2.invoice_details FROM Payments AS T1 JOIN Invoices AS T2 ON T1.invoice_id  =  T2.invoice_id GROUP BY T1.invoice_id ORDER BY count(*) DESC LIMIT 1

Return the invoice ids , statuses , and details for invoices with the most payments ?

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


Question: List the creation year, name and budget of each department.

SELECT creation ,  name ,  budget_in_billions FROM department

List the creation year , name and budget of each department .

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


Question: How many storms occured in each region?

SELECT T1.region_name ,  count(*) FROM region AS T1 JOIN affected_region AS T2 ON T1.region_id = T2.region_id GROUP BY T1.region_id

How many storms occured in each region ?


Question: What are the names and prices of products that cost at least 180, sorted by price decreasing and name ascending?

SELECT name ,  price FROM products WHERE price  >=  180 ORDER BY price DESC ,  name ASC

What are the names and prices of products that cost at least 180 , sorted by price decreasing and name ascending ?

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


Question: Please provide the id of the solution whose repository has the most watchers.

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

Please provide the i d of the solution whose repository has the most watchers .

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


Question: Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats.

SELECT LOCATION FROM track WHERE seating  >  90000 INTERSECT SELECT LOCATION FROM track WHERE seating  <  70000

Find the locations where have both tracks with more than 90000 seats and tracks with less than 70000 seats .

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


Question: Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened.

SELECT year_opened FROM track WHERE seating BETWEEN 4000 AND 5000

Show year where a track with a seating at least 5000 opened and a track with seating no more than 4000 opened .

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


Question: How many teachers does the student named MADLOCK RAY have?

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

How many teachers does the student named MADLOCK RAY have ?

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


Question: Which city did Victoria P Ashworth work in?

SELECT T2.city FROM employee AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id WHERE T1.fname = 'Victoria' AND T1.minit = 'P' AND T1.lname = 'Ashworth'

Which city did Victoria P Ashworth work in ?

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


Question: How many Yelp_Business close after 8PM on Mondays?

SELECT COUNT(T1.business_id) FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id WHERE T2.day_of_week LIKE 'Monday' AND T1.closing_time > '8PM'

How many Yelp_Business close after 8PM on Mondays ?

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


Question: How many of the patients with the most serious thrombosis cases examined in 1997 are women?

SELECT  COUNT(*) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE T1.SEX = 'F' AND STRFTIME('%Y', T2.`Examination Date`) = '1997' AND T2.Thrombosis = 1

How many of the patients with the most serious thrombosis cases examined in 1997 are women ?

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


Question: Show all distinct franchises of games.


Question: How many unique labels are there for albums?

SELECT count(DISTINCT label) FROM albums

How many unique labels are there for albums ?


Question: Which nation has the lowest proportion of people who speak an African language? Please state the nation's full name.

SELECT T1.Name FROM country AS T1 INNER JOIN ethnicGroup AS T2 ON T1.Code = T2.Country WHERE T2.Name = 'African' ORDER BY T2.Percentage ASC LIMIT 1

Which nation has the lowest proportion of people who speak an African language ? Please state the nation 's full name .

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


Question: Among the patients who have been using Penicillin V Potassium 250 MG, what percentage of patients are female?

SELECT CAST(SUM(CASE WHEN T1.gender = 'F' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient) FROM patients AS T1 INNER JOIN medications AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Penicillin V Potassium 250 MG'

Among the patients who have been using Penicillin V Potassium 250 MG , what percentage of patients are female ?

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


Question: Show all customer names, ids and the number of orders by each customer.

SELECT T2.customer_name ,  T1.customer_id ,  count(*) FROM Customer_orders AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id GROUP BY T1.customer_id

Show all customer names , ids and the number of orders by each customer .

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


Question: Mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability.

SELECT T5.name, T5.credit FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id INNER JOIN student AS T3 ON T1.student_id = T3.student_id INNER JOIN registration AS T4 ON T3.student_id = T4.student_id INNER JOIN course AS T5 ON T4.course_id = T5.course_id WHERE T2.gender = 'Female' ORDER BY T2.teachingability DESC LIMIT 1

Mention the names and credits of course registered by the students who were under the supervision of female professor with the highest teaching ability .

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


Question: Find the id of the customers who have order status both "On Road" and "Shipped".

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

Find the i d of the customers who have order status both " On Road " and " Shipped " .

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


Question: Who has the highest reputation? Please give the display name.

SELECT DisplayName FROM users WHERE Reputation = ( SELECT MAX(Reputation) FROM users )

Who has the highest reputation ? Please give the display name .

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


Question: Which product ID do not have any work order ID?

SELECT ProductID FROM Product WHERE ProductID NOT IN ( SELECT T1.ProductID FROM Product AS T1 INNER JOIN WorkOrder AS T2 ON T1.ProductID = T2.ProductID )

Which product ID do not have any work order ID ?

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


Question: What is the party that has the largest number of representatives?

SELECT Party ,  COUNT(*) FROM representative GROUP BY Party ORDER BY COUNT(*) DESC LIMIT 1

What is the party that has the largest number of representatives ?


Question: What are the names of the staff members who have been both a speaker and a sponsor at some conference?

SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.role  =  'Speaker' INTERSECT SELECT T1.name FROM staff AS T1 JOIN conference_participation AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.role  =  'Sponsor'

What are the names of the staff members who have been both a speaker and a sponsor at some conference ?

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


Question: What are the air carriers of the flights that flew on August 25, 2018 that have departure delay of -5?

SELECT T1.Description FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T2.FL_DATE = '2018/8/25' GROUP BY T1.Description

What are the air carriers of the flights that flew on August 25 , 2018 that have departure delay of -5 ?

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


Question: Return the characters for actors, ordered by age descending.

SELECT Character FROM actor ORDER BY age DESC

Return the characters for actors , ordered by age descending .

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


Question: How many employees work for AdvertureWorks that is single?

SELECT COUNT(T1.BusinessentityID) FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T1.PersonType = 'EM' AND T2.MaritalStatus = 'S'

How many employees work for AdvertureWorks that is single ?


Question: How many American movies have cast number more than 1?

SELECT COUNT(T2.actorid) FROM movies AS T1 INNER JOIN movies2actors AS T2 ON T1.movieid = T2.movieid WHERE T1.country = 'USA' AND T2.cast_num > 1

How many American movies have cast number more than 1 ?

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


Question: What is the name of the customer that has purchased the most items?

SELECT t1.customer_name FROM customers AS t1 JOIN customer_orders AS t2 ON t1.customer_id  =  t2.customer_id JOIN order_items AS t3 ON t2.order_id  =  t3.order_id GROUP BY t1.customer_name ORDER BY sum(t3.order_quantity) DESC LIMIT 1

What is the name of the customer that has purchased the most items ?


Question: How many students enrolled in class ACCT-211?

SELECT count(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code  =  T2.class_code WHERE T1.crs_code  =  'ACCT-211'

How many students enrolled in class ACCT-211 ?


Question: Tell the path of the solution for the method "ExportToRTF.RTFStyleSheet.H6Write".

SELECT T1.Path FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.Name = 'ExportToRTF.RTFStyleSheet.H6Write'

Tell the path of the solution for the method " ExportToRTF.RTFStyleSheet . H6Write " .

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


Question: What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there?

SELECT zip_code FROM weather GROUP BY zip_code HAVING avg(mean_humidity)  <  70 INTERSECT SELECT zip_code FROM trip GROUP BY zip_code HAVING count(*)  >=  100

What are the zip codes that have an average mean humidity below 70 and had at least 100 trips come through there ?

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


Question: What is the attribute value of an active business with a low review count and 3 stars which is located at Goodyear, AZ?

SELECT DISTINCT T2.attribute_value FROM Business AS T1 INNER JOIN Business_Attributes AS T2 ON T1.business_id = T2.business_id INNER JOIN Attributes AS T3 ON T2.attribute_id = T3.attribute_id WHERE T1.state = 'AZ' AND T1.city = 'Goodyear' AND T1.active = 'true' AND T1.stars = 3 AND T1.review_count = 'Low'

What is the attribute value of an active business with a low review count and 3 stars which is located at Goodyear , AZ ?

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


Question: In the players, how many were out by hit wicket?

SELECT Player_Out FROM Wicket_Taken AS T1 INNER JOIN Out_Type AS T2 ON T1.Kind_Out = T2.Out_Id WHERE Out_Name = 'hit wicket'

In the players , how many were out by hit wicket ?

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


Question: Return the address of store 1.

SELECT T2.address FROM store AS T1 JOIN address AS T2 ON T1.address_id  =  T2.address_id WHERE store_id  =  1


Question: What was the serve time for the complaint call from client "C00007127" on 2017/2/22?

SELECT T1.ser_time FROM callcenterlogs AS T1 INNER JOIN events AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.Client_ID = 'C00007127' AND T1.`Date received` = '2017-02-22'

What was the serve time for the complaint call from client " C00007127 " on 2017/2/22 ?

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


Question: What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature?

SELECT date ,  zip_code FROM weather WHERE max_temperature_f  >=  80

What zip codes have a station with a max temperature greater than or equal to 80 and when did it reach that temperature ?

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


Question: Which make has more than one team?

SELECT make FROM team GROUP BY team HAVING count(*)  >  1


Question: What are the names of the events under Art Competitions?

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

What are the names of the events under Art Competitions ?

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


Question: List Aerosmith's albums.

SELECT T1.title FROM albums AS T1 JOIN artists AS T2 ON  T1.artist_id = T2.id WHERE T2.name = "Aerosmith";


Question: Who among the players in season 2000-2001 has committed the highest rule violations or penalty minutes?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2000-2001' ORDER BY T1.PIM DESC LIMIT 1

Who among the players in season 2000 - 2001 has committed the highest rule violations or penalty minutes ?

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


Question: Find the name of the nurse who has the largest number of appointments.

SELECT T1.name FROM nurse AS T1 JOIN appointment AS T2 ON T1.employeeid  =  T2.prepnurse GROUP BY T1.employeeid ORDER BY count(*) DESC LIMIT 1

Find the name of the nurse who has the largest number of appointments .

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


Question: What are the crime rates of counties that contain cities that have white percentages of over 90?

SELECT T2.Crime_rate FROM city AS T1 JOIN county_public_safety AS T2 ON T1.County_ID  =  T2.County_ID WHERE T1.White  >  90

What are the crime rates of counties that contain cities that have white percentages of over 90 ?

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


Question: How many postal points are there under the congress representative in Puerto Rico?

SELECT COUNT(T2.zip_code) FROM congress AS T1 INNER JOIN zip_congress AS T2 ON T1.cognress_rep_id = T2.district WHERE T1.state = 'Puerto Rico'

How many postal points are there under the congress representative in Puerto Rico ?

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


Question: Please list the genre of the movies that are directed by the directors with the highest level of average revenue.

SELECT T2.genre FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.avg_revenue = 4

Please list the genre of the movies that are directed by the directors with the highest level of average revenue .

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


Question: What is the name of the university with the highest score in teaching in the year 2011?

SELECT T3.university_name FROM ranking_criteria AS T1 INNER JOIN university_ranking_year AS T2 ON T1.id = T2.ranking_criteria_id INNER JOIN university AS T3 ON T3.id = T2.university_id WHERE T1.criteria_name = 'Teaching' AND T2.year = 2011 ORDER BY T2.score DESC LIMIT 1

What is the name of the university with the highest score in teaching in the year 2011 ?

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


Question: When was the order with the highest amount of total price shipped?

SELECT T2.l_shipdate FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey ORDER BY T1.o_totalprice DESC LIMIT 1

When was the order with the highest amount of total price shipped ?

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


Question: Count the number of types of cake this bakery sells.

SELECT count(*) FROM goods WHERE food  =  "Cake"

Count the number of types of cake this bakery sells .


Question: Which year has the lowest speed of lap time?

SELECT T2.year FROM lapTimes AS T1 INNER JOIN races AS T2 on T1.raceId = T2.raceId ORDER BY T1.time DESC LIMIT 1

Which year has the lowest speed of lap time ?


Question: List all companies who worked in the movie 'Ultramarines: A Warhammer 40,000 Movie.'

SELECT T1.company_name FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T3.title = 'Ultramarines: A Warhammer 40,000 Movie'

List all companies who worked in the movie ' Ultramarines : A Warhammer 40,000 Movie . '

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


Question: What is the name and opening year for the branch that registered the most members in 2016?

SELECT T2.name ,  T2.open_year FROM membership_register_branch AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.register_year  =  2016 GROUP BY T2.branch_id ORDER BY count(*) DESC LIMIT 1

What is the name and opening year for the branch that registered the most members in 2016 ?

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


Question: What is the name of the contact person of the Pavlova supplier company?

SELECT T2.ContactName FROM Products AS T1 INNER JOIN Suppliers AS T2 ON T1.SupplierID = T2.SupplierID WHERE T1.ProductName = 'Pavlova'

What is the name of the contact person of the Pavlova supplier company ?

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


Question: List out genre that have downloads more than 1000000000.

SELECT Genres FROM playstore WHERE Installs = '1,000,000,000+' GROUP BY Genres

List out genre that have downloads more than 1000000000 .


Question: Among the providers in Argentina, which supplier has an account that is in debt?

SELECT T1.s_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal < 0 AND T2.n_name = 'ARGENTINA'

Among the providers in Argentina , which supplier has an account that is in debt ?

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


Question: How many menus include puree of split peas aux croutons?

SELECT SUM(CASE WHEN T1.name = 'Puree of split peas aux croutons' THEN 1 ELSE 0 END) FROM Dish AS T1 INNER JOIN MenuItem AS T2 ON T1.id = T2.dish_id

How many menus include puree of split peas aux croutons ?

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


Question: What are the names of all movies made before 1980 or had James Cameron as the director?

SELECT title FROM Movie WHERE director  =  "James Cameron" OR YEAR   <  1980

What are the names of all movies made before 1980 or had James Cameron as the director ?

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


Question: Find the name, rating and age of all sailors ordered by rating and age.

SELECT name ,  rating ,  age FROM Sailors ORDER BY rating ,  age

Find the name , rating and age of all sailors ordered by rating and age .

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


Question: How many films rented on 26th May, 2005 were returned on 30th May, 2005?

SELECT COUNT(DISTINCT rental_id) FROM rental WHERE date(rental_date) BETWEEN '2005-05-26' AND '2005-05-30'

How many films rented on 26th May , 2005 were returned on 30th May , 2005 ?


Question: List down at least five full name of Demi-God superheroes.

SELECT T1.full_name FROM superhero AS T1 INNER JOIN race AS T2 ON T1.race_id = T2.id WHERE T2.race = 'Demi-God'

List down at least five full name of Demi - God superheroes .

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


Question: How many times the number of adults and kids staying in a room reached the maximum capacity of the room?

SELECT count(*) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room  =  T2.RoomId WHERE T2.maxOccupancy  =  T1.Adults + T1.Kids;

How many times the number of adults and kids staying in a room reached the maximum capacity of the room ?

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


Question: Find the name of companies that do not make DVD drive.

SELECT name FROM manufacturers EXCEPT SELECT T2.name FROM products AS T1 JOIN manufacturers AS T2 ON T1.Manufacturer  =  T2.code WHERE T1.name  =  'DVD drive'

Find the name of companies that do not make DVD drive .

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


Question: What are all isbns for each book, and how many times has each been ordered?

SELECT isbn ,  count(*) FROM Books_Order GROUP BY isbn

What are all isbns for each book , and how many times has each been ordered ?

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


Question: Which sales person achieved the highest sales YTD? What is the projected yearly sales quota in 2011 for this person?

SELECT T1.BusinessEntityID, SUM(T1.SalesQuota) FROM SalesPerson AS T1 INNER JOIN SalesPersonQuotaHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.QuotaDate) = '2011' GROUP BY T1.BusinessEntityID ORDER BY SUM(T1.SalesYTD) DESC LIMIT 1

Which sales person achieved the highest sales YTD ? What is the projected yearly sales quota in 2011 for this person ?

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


Question: How many part supplies are close to being out of stock?

SELECT COUNT(ps_suppkey) FROM partsupp WHERE ps_availqty < 10

How many part supplies are close to being out of stock ?


Question: Return the search strings and corresonding time stamps for all user searches, sorted by search string descending.

SELECT search_datetime ,  search_string FROM User_Searches ORDER BY search_string DESC;

Return the search strings and corresonding time stamps for all user searches , sorted by search string descending .

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


Question: Please list all the cities in Argentina.

SELECT City FROM location WHERE City IS NOT NULL AND Country = 'Argentina'

Please list all the cities in Argentina .


Question: Compute the mean price of procedures physician John Wen was trained in.

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

Compute the mean price of procedures physician John Wen was trained in .

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


Question: Return the hosts of competitions for which the theme is not Aliens?

SELECT Hosts FROM farm_competition WHERE Theme !=  'Aliens'

Return the hosts of competitions for which the theme is not Aliens ?

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


Question: What is the total sales amount of all discontinued products?

SELECT SUM(T2.UnitPrice * T2.Quantity) FROM Products AS T1 INNER JOIN `Order Details` AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Discontinued = 1

What is the total sales amount of all discontinued products ?


Question: How many words are there on the page titled "Asclepi"?

SELECT words FROM pages WHERE title = 'Asclepi'

How many words are there on the page titled " Asclepi " ?

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


Question: What are the drivers' last names and id who had 11 pit stops and participated in more than 5 race results?

SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN pitstops AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  =  11 INTERSECT SELECT T1.surname ,  T1.driverid FROM drivers AS T1 JOIN results AS T2 ON T1.driverid  =  T2.driverid GROUP BY T1.driverid HAVING count(*)  >  5

What are the drivers ' last names and i d who had 11 pit stops and participated in more than 5 race results ?

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


Question: What is the average amount of rent that Christy Vargas paid?

SELECT AVG(T2.amount) FROM customer AS T1 INNER JOIN payment AS T2 ON T1.customer_id = T2.customer_id WHERE T1.first_name = 'CHRISTY' AND T1.Last_name = 'VARGAS'

What is the average amount of rent that Christy Vargas paid ?

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


Question: Give me the title and category name of films whose price per day is more than $30. Please include their special features.

SELECT T1.title, T3.name, T1.special_features FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T1.rental_duration * T1.rental_rate > 30

Give me the title and category name of films whose price per day is more than $ 30 . Please include their special features .

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


Question: What are the distinct entrant types of drivers aged 20 or older?

SELECT DISTINCT Entrant FROM driver WHERE Age  >=  20

What are the distinct entrant types of drivers aged 20 or older ?

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


Question: List the hero ID of superheroes have intellegence as their power.

SELECT T1.hero_id FROM hero_power AS T1 INNER JOIN superpower AS T2 ON T1.power_id = T2.id WHERE T2.power_name = 'Intelligence'

List the hero ID of superheroes have intellegence as their power .

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


Question: In Barcelona, how many Olympic games were held?

SELECT COUNT(T1.games_id) FROM games_city AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.id WHERE T2.city_name = 'Barcelona'

In Barcelona , how many Olympic games were held ?


Question: When did the member, Casey Mason, received the income?

SELECT T2.date_received FROM member AS T1 INNER JOIN income AS T2 ON T1.member_id = T2.link_to_member WHERE T1.first_name = 'Casey' AND T1.last_name = 'Mason'

When did the member , Casey Mason , received the income ?

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


Question: What are the names and ages of pilots who have planes located in Austin?

SELECT T1.pilot_name ,  T1.age FROM pilotskills AS T1 JOIN hangar AS T2 ON T1.plane_name  =  T2.plane_name WHERE T2.location  =  "Austin"

What are the names and ages of pilots who have planes located in Austin ?

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


Question: What is the address of the Peking Duck restaurant?

SELECT T2.street_name FROM generalinfo AS T1 INNER JOIN location AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.label = 'peking duck restaurant'

What is the address of the Peking Duck restaurant ?


Question: What is the total number of hours per week and number of games played by students under 20?

SELECT sum(hoursperweek) ,  sum(gamesplayed) FROM Sportsinfo AS T1 JOIN Student AS T2 ON T1.StuID  =  T2.StuID WHERE T2.age  <  20

What is the total number of hours per week and number of games played by students under 20 ?

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


Question: How many states have a college with more students than average?

SELECT count(DISTINCT state) FROM college WHERE enr  >  (SELECT avg(enr) FROM college)

How many states have a college with more students than average ?


Question: List all the songs associated with drama movies.

SELECT song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Drama' GROUP BY song

List all the songs associated with drama movies .


Question: What is the number of inhabitants and income of geographic identifier 239?

SELECT INHABITANTS_K FROM Demog WHERE GEOID = 239

What is the number of inhabitants and income of geographic identifier 239 ?


Question: What is the maximum total amount paid by a customer? List the customer id and amount.

SELECT customer_id ,  sum(amount_paid) FROM Payments GROUP BY customer_id ORDER BY sum(amount_paid) DESC LIMIT 1

What is the maximum total amount paid by a customer ? List the customer i d and amount .

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


Question: What are the hometowns of gymnasts and the corresponding number of gymnasts?

SELECT T2.Hometown ,  COUNT(*) FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID GROUP BY T2.Hometown

What are the hometowns of gymnasts and the corresponding number of gymnasts ?


Question: Show all allergies and their types.

SELECT allergy ,  allergytype FROM Allergy_type


Question: What's the cover image of the user who created the movie list 'Georgia related films'?

SELECT T1.user_cover_image_url FROM lists_users AS T1 INNER JOIN lists AS T2 ON T1.list_id = T2.list_id WHERE T2.list_title LIKE 'Georgia related films'

What 's the cover image of the user who created the movie list ' Georgia related films ' ?

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


Question: Which is the most fuel efficient car in 1975?

SELECT T1.car_name FROM data AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID WHERE T2.model_year = '1975' ORDER BY T1.mpg DESC LIMIT 1

Which is the most fuel efficient car in 1975 ?


Question: List all people names in the order of their date of birth from old to young.

SELECT name FROM people ORDER BY date_of_birth

List all people names in the order of their date of birth from old to young .

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


Question: Which manufacturer has the most number of shops? List its name and year of opening.

SELECT open_year ,  name FROM manufacturer ORDER BY num_of_shops DESC LIMIT 1

Which manufacturer has the most number of shops ? List its name and year of opening .

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


Question: What is the first and last name of all the German drivers?

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

What is the first and last name of all the German drivers ?

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


Question: Find the names of all the employees whose the role name is "Editor".

SELECT T1.employee_name FROM Employees AS T1 JOIN ROLES AS T2 ON T1.role_code  =  T2.role_code WHERE T2.role_name  =  "Editor"

Find the names of all the employees whose the role name is " Editor " .

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


Question: Who are the authors of the paper "Determination of Planetary Meteorology from Aerobot Flight Sensors"?

SELECT T2.Name FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId WHERE T1.Title = 'Determination of Planetary Meteorology FROM Aerobot Flight Sensors'

Who are the authors of the paper " Determination of Planetary Meteorology from Aerobot Flight Sensors " ?

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


Question: Calculate the percentage of members who are major Business in the list?

SELECT CAST(SUM(CASE WHEN T2.major_name = 'Business' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.member_id) FROM member AS T1 INNER JOIN major AS T2 ON T2.major_id = T1.link_to_major WHERE T1.position = 'Member'

Calculate the percentage of members who are major Business in the list ?

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


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

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

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

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


Question: What is the total price of the order made by Cruz & Sons Co. on 2003/3/3?

SELECT SUM(t1.priceEach * t1.quantityOrdered) FROM orderdetails AS t1 INNER JOIN orders AS t2 ON t1.orderNumber = t2.orderNumber INNER JOIN customers AS t3 ON t2.customerNumber = t3.customerNumber WHERE t3.customerName = 'Cruz & Sons Co.' AND t2.orderDate = '2003-03-03'

What is the total price of the order made by Cruz & Sons Co. on 2003/3/3 ?

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


Question: Show the names of people, and dates and venues of debates they are on the negative side, ordered in ascending alphabetical order of name.

SELECT T3.Name ,  T2.Date ,  T2.Venue FROM debate_people AS T1 JOIN debate AS T2 ON T1.Debate_ID  =  T2.Debate_ID JOIN people AS T3 ON T1.Negative  =  T3.People_ID ORDER BY T3.Name ASC

Show the names of people , and dates and venues of debates they are on the negative side , ordered in ascending alphabetical order of name .

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


Question: Find the policy type used by more than 4 customers.

SELECT policy_type_code FROM available_policies GROUP BY policy_type_code HAVING count(*)  >  4

Find the policy type used by more than 4 customers .

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


Question: List all shipment ids on the planet Mars or under the management of Turanga Leela.

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Planet AS T2 ON T1.Planet = T2.PlanetID JOIN Employee AS T3 ON T3.EmployeeID = T1.Manager WHERE T2.Name = "Mars" OR T3.Name = "Turanga Leela";

List all shipment ids on the planet Mars or under the management of Turanga Leela .

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


Question: What are the inspector's comments and clean operating requirement code for inspection ID 54216 and point ID 34?

SELECT T2.inspector_comment, T1.code FROM inspection_point AS T1 INNER JOIN violation AS T2 ON T1.point_id = T2.point_id WHERE T2.inspection_id = 54216 AND T2.point_id = 34

What are the inspector 's comments and clean operating requirement code for inspection ID 54216 and point ID 34 ?

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


Question: What is the name of the solution path with the highest processed time?

SELECT Path FROM Solution WHERE ProcessedTime = ( SELECT MAX(ProcessedTime) FROM Solution )

What is the name of the solution path with the highest processed time ?

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


Question: How many cards available in paper have a positive starting maximum hand size?

SELECT SUM(CASE WHEN availability = 'paper' AND hAND = '3' THEN 1 ELSE 0 END) FROM cards

How many cards available in paper have a positive starting maximum hand size ?

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


Question: How wide were the paintings by the artist who was born prior to 1850?

SELECT T2.width_mm FROM artists AS T1 JOIN paintings AS T2 ON T1.artistID  =  T2.painterID WHERE T1.birthYear  <  1850

How wide were the paintings by the artist who was born prior to 1850 ?

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


Question: Please give the url of the repository whose files are contained in solution ID 9?

SELECT T1.Url FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T2.Id = 9

Please give the url of the repository whose files are contained in solution ID 9 ?

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


Question: How many tasks does each project have? List the task count and the project detail.

SELECT count(*) ,  T1.project_details FROM Projects AS T1 JOIN Tasks AS T2 ON T1.project_id  =  T2.project_id GROUP BY T1.project_id

How many tasks does each project have ? List the task count and the project detail .

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


Question: How many of the approved documents are confidential?

SELECT COUNT(DocumentNode) FROM Document WHERE Status = 2 AND DocumentSummary IS NULL

How many of the approved documents are confidential ?


Question: Which employee is in charge of the sales in Hollis? Please give the employee's full name.

SELECT T1.FirstName, T1.LastName FROM Employees AS T1 INNER JOIN EmployeeTerritories AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN Territories AS T3 ON T2.TerritoryID = T3.TerritoryID WHERE T3.TerritoryDescription = 'Hollis'

Which employee is in charge of the sales in Hollis ? Please give the employee 's full name .

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


Question: For each driver, return his or her name and country.

SELECT T2.Driver ,  T1.Country FROM country AS T1 JOIN driver AS T2 ON T1.Country_ID  =  T2.Country

For each driver , return his or her name and country .


Question: How many different levels do members have?

SELECT count(DISTINCT LEVEL) FROM member

How many different levels do members have ?


Question: List down the restaurant ID of restaurants located in Sunnyvale.

SELECT id_restaurant FROM location WHERE city = 'sunnyvale'

List down the restaurant ID of restaurants located in Sunnyvale .

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


Question: Among the products that have price ranges from 100 to 150, what is the customer ID and sales ID of the product with a quantity lower than 25?

SELECT T2.CustomerID, T2.SalesID FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price BETWEEN 100 AND 150 AND T2.Quantity < 25

Among the products that have price ranges from 100 to 150 , what is the customer ID and sales ID of the product with a quantity lower than 25 ?

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


Question: What is the maximum fastest lap speed in race named 'Monaco Grand Prix' in 2008 ?

SELECT max(T2.fastestlapspeed) FROM races AS T1 JOIN results AS T2 ON T1.raceid = T2.raceid WHERE T1.year = 2008 AND T1.name = "Monaco Grand Prix"

What is the maximum fastest lap speed in race named ' Monaco Grand Prix ' in 2008 ?

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


Question: Show all client names and the number of orders each has made.

SELECT T2.name ,  count(*) FROM Orders AS T1 JOIN Client AS T2 ON T1.idClient  =  T2.idClient GROUP BY T1.idClient

Show all client names and the number of orders each has made .

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


Question: Show total and average points of all drivers.

SELECT sum(Points) ,  avg(Points) FROM driver

Show total and average points of all drivers .


Question: List the medicine name and trade name which can both interact as 'inhibitor' and 'activitor' with enzymes.

SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'inhibitor' INTERSECT SELECT T1.name ,  T1.trade_name FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id  =  T1.id WHERE interaction_type  =  'activitor'

List the medicine name and trade name which can both interact as ' inhibitor ' and ' activitor ' with enzymes .

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


Question: What are the ids of the documents that have more than one child?

SELECT T2.Document_Object_ID 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 HAVING count(*)  >  1;

What are the ids of the documents that have more than one child ?


Question: Among the customers who have rented the film ACADEMY DINOSAUR, how many of them are active?

SELECT COUNT(T1.customer_id) FROM customer AS T1 INNER JOIN rental AS T2 ON T1.customer_id = T2.customer_id INNER JOIN inventory AS T3 ON T2.inventory_id = T3.inventory_id INNER JOIN film AS T4 ON T3.film_id = T4.film_id WHERE T1.active = 1 AND T4.title = 'ACADEMY DINOSAUR'

Among the customers who have rented the film ACADEMY DINOSAUR , how many of them are active ?

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


Question: Find the headphone model whose total quantity in stock is the largest.

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

Find the headphone model whose total quantity in stock is the largest .

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


Question: List down the app IDs under the category of game-Rowing .

SELECT T2.app_id FROM label_categories AS T1 INNER JOIN app_labels AS T2 ON T1.label_id = T2.label_id WHERE T1.category = 'game-Rowing'

List down the app IDs under the category of game - Rowing .

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


Question: List the name of artworks whose type is not "Program Talent Show".

SELECT Name FROM artwork WHERE TYPE != "Program Talent Show"

List the name of artworks whose type is not " Program Talent Show " .

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


Question: List all content reviewed for podcast with the best rating under the 'fiction' category. State the podcast title.

SELECT DISTINCT T2.title FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id INNER JOIN reviews AS T3 ON T3.podcast_id = T2.podcast_id WHERE T3.rating = 5 AND T1.category = 'fiction'

List all content reviewed for podcast with the best rating under the ' fiction ' category . State the podcast title .

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


Question: What are the first, middle, last, and login names for all users who are sellers?

SELECT first_name ,  middle_name ,  last_name ,  login_name FROM Users WHERE is_seller  =  1;

What are the first , middle , last , and login names for all users who are sellers ?

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


Question: Show all staff name who are above the average age.

SELECT name FROM staff WHERE age  >  (SELECT avg(age) FROM staff)

Show all staff name who are above the average age .

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


Question: Find the location of the warehouses which store contents Rocks and Scissors.

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

Find the location of the warehouses which store contents Rocks and Scissors .

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


Question: What are the build year, model name and builder of the vehicles?

SELECT build_year ,  model ,  builder FROM vehicle

What are the build year , model name and builder of the vehicles ?

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


Question: Find the distinct names of all songs that have a higher resolution than some songs in English.

SELECT DISTINCT song_name FROM song WHERE resolution  >  (SELECT min(resolution) FROM song WHERE languages  =  "english")

Find the distinct names of all songs that have a higher resolution than some songs in English .

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


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

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

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

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


Question: Please give me a list of cities whose regional population is over 10000000.

SELECT city FROM city WHERE regional_population  >  10000000

Please give me a list of cities whose regional population is over 10000000 .

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


Question: How many different levels of heat are there for the cyclists?

SELECT count(DISTINCT heat) FROM cyclist

How many different levels of heat are there for the cyclists ?


Question: What is the percentage of total orders of Stephen Payne that had a net profit of over 1000?

SELECT CAST(SUM(CASE WHEN REPLACE(T1.`Unit Price`, ',', '') - REPLACE(T1.`Unit Cost`, ',', '') > 1000 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.OrderNumber) FROM `Sales Orders` AS T1 INNER JOIN `Sales Team` AS T2 ON T2.SalesTeamID = T1._SalesTeamID WHERE T2.`Sales Team` = 'Stephen Payne'

What is the percentage of total orders of Stephen Payne that had a net profit of over 1000 ?

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


Question: What is the best seller root beer brand and what is the average star rating for this root beer?

SELECT T1.BrandID, AVG(T1.StarRating) FROM rootbeerreview AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID GROUP BY T3.BrandID ORDER BY COUNT(T1.BrandID) DESC LIMIT 1

What is the best seller root beer brand and what is the average star rating for this root beer ?

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


Question: What are the average maximum and minimum temperatures in May 2015 when the mean humidity is between 65 and 75?

SELECT AVG(max_temperature_f), AVG(min_temperature_f) FROM weather WHERE date LIKE '5/%/2015' AND mean_humidity BETWEEN 65 AND 75

What are the average maximum and minimum temperatures in May 2015 when the mean humidity is between 65 and 75 ?

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


Question: List ids for all student who are on scholarship.

SELECT StuID FROM Sportsinfo WHERE onscholarship  =  'Y'

List ids for all student who are on scholarship .

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


Question: Please list the stores that ordered the book "Life Without Fear".

SELECT T2.stor_name FROM sales AS T1 INNER JOIN stores AS T2 ON T1.stor_id = T2.stor_id INNER JOIN titles AS T3 ON T1.title_id = T3.title_id WHERE T3.title = 'Life Without Fear'

Please list the stores that ordered the book " Life Without Fear " .

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


Question: What is the average surface area of all countries?

What is the average surface area of all countries ?


Question: How many Brazilian Portuguese translated sets are inside the Commander block?

SELECT COUNT(T1.id) FROM sets AS T1 INNER JOIN set_translations AS T2 ON T1.code = T2.setCode WHERE T2.language = 'Portuguese (Brazil)' AND T1.block = 'Commander'

How many Brazilian Portuguese translated sets are inside the Commander block ?

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


Question: What is the role of SC Ganguly?

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

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


Question: Count the number of services.


Question: Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games.

SELECT lname ,  sex FROM Student WHERE StuID IN (SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Call of Destiny" INTERSECT SELECT T1.StuID FROM Plays_games AS T1 JOIN Video_games AS T2 ON T1.GameID  =  T2.GameID WHERE T2.Gname  =  "Works of Widenius")

Find the last name and gender of the students who are playing both Call of Destiny and Works of Widenius games .

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


Question: Name all the organisations that were established from 1970 to 1980.

SELECT Name FROM organization WHERE STRFTIME('%Y', Established) BETWEEN '1970' AND '1980'

Name all the organisations that were established from 1970 to 1980 .

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


Question: Among the" Mumbai Indians" team that played in 2009, how many percent of the matches did they win?

SELECT CAST(SUM(CASE WHEN T1.Match_Winner = T2.Team_Id THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.Match_Id) FROM `Match` AS T1 INNER JOIN Team AS T2 ON T1.Team_1 = T2.Team_Id OR T1.Team_2 = T2.Team_Id WHERE T2.Team_Name = 'Mumbai Indians' AND T1.Match_Date LIKE '2009%'

Among the " Mumbai Indians " team that played in 2009 , how many percent of the matches did they win ?

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


Question: Between 1/1/2017 to 12/31/2017, how many users who were eligible for trial when they rated the movie "Patti Smith: Dream of Life"and what is the image URL to the movie on Mubi?

SELECT COUNT(T1.user_id), T2.movie_image_url FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE datetime(T1.rating_timestamp_utc) BETWEEN '2017-01-01 00:00:00' AND '2017-12-31 00:00:00'

Between 1/1/2017 to 12/31/2017 , how many users who were eligible for trial when they rated the movie " Patti Smith : Dream of Life"and what is the image URL to the movie on Mubi ?

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


Question: What is the average age of the athletes from the United States of America who competed in the 2016 Summer Olympics?

SELECT AVG(T2.age) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person_region AS T3 ON T2.person_id = T3.person_id INNER JOIN noc_region AS T4 ON T3.region_id = T4.id WHERE T1.games_name = '2016 Summer' AND T4.region_name = 'USA'

What is the average age of the athletes from the United States of America who competed in the 2016 Summer Olympics ?

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


Question: What is the name of sailors whose names contain letter e?

SELECT name FROM Sailors WHERE name LIKE '%e%'

What is the name of sailors whose names contain letter e ?


Question: Which are the top ten withdrawals (non-credit card) by district names for the month of January 1996?

SELECT DISTINCT T1.A2 FROM district AS T1 INNER JOIN account AS T2 ON T1.district_id = T2.district_id INNER JOIN trans AS T3 ON T2.account_id = T3.account_id WHERE T3.type = 'VYDAJ' AND T3.date LIKE '1996-01%' ORDER BY A2 ASC LIMIT 10

Which are the top ten withdrawals ( non - credit card ) by district names for the month of January 1996 ?

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


Question: List all the main characters of the movie that are comedy genre.

SELECT T2.hero FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE T1.genre = 'Comedy'

List all the main characters of the movie that are comedy genre .

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


Question: Among the immunizations in 2017, calculate the percentage of patients who received the Influenza seasonal injectable preservative free. Among them, how many patients are English?

SELECT CAST(SUM(CASE WHEN T2.DESCRIPTION = 'Influenza seasonal injectable preservative free' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.patient), SUM(CASE WHEN T1.ethnicity = 'english' THEN 1 ELSE 0 END) FROM patients AS T1 INNER JOIN immunizations AS T2 ON T1.patient = T2.PATIENT WHERE strftime('%Y', T2.DATE) = '2017'

Among the immunizations in 2017 , calculate the percentage of patients who received the Influenza seasonal injectable preservative free . Among them , how many patients are English ?

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