Question: List all the public institutes from the state with the least number of graduate cohort in 2013.

SELECT T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2013 AND T1.control = 'Public' ORDER BY T2.grad_cohort LIMIT 1

List all the public institutes from the state with the least number of graduate cohort in 2013 .

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


Question: Count how many appointments have been made in total.

Count how many appointments have been made in total .


Question: How many females were members of the past legislators?

SELECT COUNT(*) FROM historical WHERE gender_bio = 'F'

How many females were members of the past legislators ?


Question: What are the team and the location of school each player belongs to?

SELECT T1.Team ,  T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID  =  T2.School_ID

What are the team and the location of school each player belongs to ?

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


Question: For each city, list their names in decreasing order by their highest station latitude.

SELECT city FROM station GROUP BY city ORDER BY max(lat) DESC

For each city , list their names in decreasing order by their highest station latitude .

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


Question: Find the number of schools that have more than one donator whose donation amount is less than 8.5.

SELECT count(*) FROM (SELECT * FROM endowment WHERE amount  >  8.5 GROUP BY school_id HAVING count(*)  >  1)

Find the number of schools that have more than one donator whose donation amount is less than 8.5 .

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


Question: How many "cute" type of compliments does user No. 57400 get?

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

How many " cute " type of compliments does user No . 57400 get ?

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


Question: How many high risks violations did the Tiramisu Kitchen violate?

SELECT COUNT(T1.business_id) FROM violations AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T2.name = 'Tiramisu Kitchen' AND T1.risk_category = 'High Risk'

How many high risks violations did the Tiramisu Kitchen violate ?

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


Question: In which Wikipedia page does the word ID No. 174 have the most appearances? Give the title.

SELECT title FROM pages WHERE pid = ( SELECT pid FROM pages_words WHERE wid = 174 ORDER BY occurrences DESC LIMIT 1 )

In which Wikipedia page does the word ID No . 174 have the most appearances ? Give the title .

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


Question: Please provide the id of the respository that received the most forks among the respositories that receive 21 stars.

SELECT Id FROM Repo WHERE Stars = 21 AND Forks = ( SELECT MAX(Forks) FROM Repo WHERE Stars = 21 )

Please provide the i d of the respository that received the most forks among the respositories that receive 21 stars .

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


Question: Show the id and details of the investor that has the largest number of transactions.

SELECT T2.investor_id ,  T1.Investor_details FROM INVESTORS AS T1 JOIN TRANSACTIONS AS T2 ON T1.investor_id  =  T2.investor_id GROUP BY T2.investor_id ORDER BY COUNT(*) DESC LIMIT 1

Show the i d and details of the investor that has the largest number of transactions .

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


Question: Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages.

SELECT CAST(SUM(IIF(T2.Language = 'Chinese', T1.SurfaceArea, 0)) AS REAL) * 100 / SUM(T1.SurfaceArea) FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode

Calculate the percentage of the surface area of all countries that uses Chinese as one of their languages .

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


Question: What is the average population for all regions?

What is the average population for all regions ?


Question: List the patient ID, sex and birthday who has abnormal white blood cell count. Group them by sex and list the patient by age in ascending order.

SELECT DISTINCT T1.ID, T1.SEX, T1.Birthday FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.WBC <= 3.5 OR T2.WBC >= 9.0 GROUP BY T1.SEX,T1.ID ORDER BY T1.Birthday ASC

List the patient ID , sex and birthday who has abnormal white blood cell count . Group them by sex and list the patient by age in ascending order .

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


Question: What is the brand name of the root beer that gained a 1-star rating from customer ID 331115 while saying, "Yuk, more like licorice soda"?

SELECT T1.BrandName FROM rootbeerbrand AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID WHERE T2.CustomerID = 331115 AND T2.Review = 'Yuk, more like licorice soda.' AND T2.StarRating = 1

What is the brand name of the root beer that gained a 1 - star rating from customer ID 331115 while saying , " Yuk , more like licorice soda " ?

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


Question: What is the total shipment by "cargo transport 5" cost of all purchase orders created on 12/14/2011?

SELECT SUM(t2.freight) FROM ShipMethod AS t1 INNER JOIN PurchaseOrderHeader AS t2 ON t1.shipmethodid = t2.shipmethodid WHERE t1.name = 'cargo transport 5' AND t2.orderdate = '2011-12-14'

What is the total shipment by " cargo transport 5 " cost of all purchase orders created on 12/14/2011 ?

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


Question: List the name of all the distinct customers who have orders with status "Packing".

SELECT DISTINCT T1.customer_name FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T2.order_status = "Packing"

List the name of all the distinct customers who have orders with status " Packing " .

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


Question: What are the emails and phone numbers of all customers, sorted by email address and phone number?

SELECT email_address ,  phone_number FROM customers ORDER BY email_address ,  phone_number

What are the emails and phone numbers of all customers , sorted by email address and phone number ?

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


Question: Find the maximum and minimum settlement amount.

SELECT max(settlement_amount) ,  min(settlement_amount) FROM settlements

Find the maximum and minimum settlement amount .


Question: What is the precise location of the establishment with the highest number of failed inspections?

SELECT T1.latitude, T1.longitude FROM establishment AS T1 INNER JOIN ( SELECT license_no FROM inspection WHERE results = 'Fail' GROUP BY license_no ORDER BY COUNT(results) DESC LIMIT 1 ) AS T2 ON T1.license_no = T2.license_no

What is the precise location of the establishment with the highest number of failed inspections ?

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


Question: Show the number of buildings with a height above the average or a number of floors above the average.

SELECT count(*) FROM building WHERE height_feet  >  (SELECT avg(height_feet) FROM building) OR floors  >  (SELECT avg(floors) FROM building)

Show the number of buildings with a height above the average or a number of floors above the average .

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


Question: Give the classes that have more than two captains.

SELECT CLASS FROM captain GROUP BY CLASS HAVING count(*)  >  2

Give the classes that have more than two captains .


Question: What are the names and year of joining for artists that do not have the country "United States"?

SELECT name ,  year_join FROM artist WHERE country != 'United States'

What are the names and year of joining for artists that do not have the country " United States " ?

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


Question: How many council taxes are collected for renting arrears ?


Question: Find the types of documents with more than 4 documents.

SELECT document_type_code FROM documents GROUP BY document_type_code HAVING count(*)  >  4

Find the types of documents with more than 4 documents .

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


Question: Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards?

SELECT Nominee FROM musical WHERE Award  =  "Tony Award" OR Award  =  "Cleavant Derricks"

Who are the nominees who were nominated for either of the Bob Fosse or Cleavant Derricks awards ?

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


Question: How many times have coaches who were from CHI been awarded as NBA Coach of the Year?

SELECT COUNT(DISTINCT T2.coachID) FROM coaches AS T1 INNER JOIN awards_coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.tmID = 'CHI' AND T2.award = 'NBA Coach of the Year'

How many times have coaches who were from CHI been awarded as NBA Coach of the Year ?

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


Question: State the description of the reason why Angelo Buckridge needs the care plan.

SELECT DISTINCT T1.REASONDESCRIPTION FROM careplans AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T2.first = 'Angelo' AND T2.last = 'Buckridge'

State the description of the reason why Angelo Buckridge needs the care plan .

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


Question: What is the name of the claim processing stage that most of the claims are on?

SELECT t2.claim_status_name FROM claims_processing AS t1 JOIN claims_processing_stages AS t2 ON t1.claim_stage_id  =  t2.claim_stage_id GROUP BY t1.claim_stage_id ORDER BY count(*) DESC LIMIT 1

What is the name of the claim processing stage that most of the claims are on ?

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


Question: Please calculate the average of Arms imports (SIPRI trend indicator values) of the European & Central Asian countries.

SELECT CAST(SUM(T2.Value) AS REAL) / COUNT(T1.CountryCode) FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Region = 'Europe & Central Asia' AND T2.IndicatorName = 'Arms imports (SIPRI trend indicator values)'

Please calculate the average of Arms imports ( SIPRI trend indicator values ) of the European & Central Asian countries .

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


Question: Show all main industry and total market value in each industry.

SELECT main_industry ,  sum(market_value) FROM company GROUP BY main_industry

Show all main industry and total market value in each industry .

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


Question: Which customer ordered 1939 'Chevrolet Deluxe Coupe' at the highest price?

SELECT t4.customerName FROM products AS t1 INNER JOIN orderdetails AS t2 ON t1.productCode = t2.productCode INNER JOIN orders AS t3 ON t2.orderNumber = t3.orderNumber INNER JOIN customers AS t4 ON t3.customerNumber = t4.customerNumber WHERE t1.productName = '1939 Chevrolet Deluxe Coupe' ORDER BY t2.priceEach DESC LIMIT 1

Which customer ordered 1939 ' Chevrolet Deluxe Coupe ' at the highest price ?

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


Question: Among the current legislators who have accounts on both http://thomas.gov, how many of them have accounts on instagram?

SELECT COUNT(DISTINCT T1.bioguide_id) FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T1.thomas_id IS NOT NULL AND T2.instagram IS NOT NULL

Among the current legislators who have accounts on both http://thomas.gov , how many of them have accounts on instagram ?

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


Question: Please list the names of the characters in the movie Look Who's Talking.

SELECT T2.`Character Name` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T1.Title = 'Look Who''s Talking'

Please list the names of the characters in the movie Look Who 's Talking .

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


Question: Find the supply key of the top ten suppliers with the most account balance, and list the supply key along with the account balance in descending order of account balance.

SELECT s_suppkey, s_acctbal FROM supplier ORDER BY s_acctbal DESC LIMIT 10

Find the supply key of the top ten suppliers with the most account balance , and list the supply key along with the account balance in descending order of account balance .

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


Question: Find the full name and id of the college that has the most baseball players.

SELECT T1.name_full ,  T1.college_id FROM college AS T1 JOIN player_college AS T2 ON T1.college_id  =  T2.college_id GROUP BY T1.college_id ORDER BY count(*) DESC LIMIT 1;

Find the full name and i d of the college that has the most baseball players .

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


Question: Show all main industry for all companies.

SELECT DISTINCT main_industry FROM company

Show all main industry for all companies .


Question: What is the maximum and minimum temperature for station number 1 on 15 January 2012?

SELECT tmax, tmin FROM weather WHERE station_nbr = 1 AND `date` = '2012-01-15'

What is the maximum and minimum temperature for station number 1 on 15 January 2012 ?

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


Question: Find the name of the conferences that have the top 2 most number of attendants.

SELECT T1.conference_name FROM Conference AS T1 JOIN Conference_participation AS T2 ON T1.conference_id  =  T2.conference_id GROUP BY T2.conference_id ORDER BY count(*) DESC LIMIT 2

Find the name of the conferences that have the top 2 most number of attendants .

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


Question: What are the names for tracks without a race in class 'GT'.

SELECT name FROM track EXCEPT SELECT T2.name FROM race AS T1 JOIN track AS T2 ON T1.track_id  =  T2.track_id WHERE T1.class  =  'GT'

What are the names for tracks without a race in class ' GT ' .

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


Question: What is the unique id of the set that has the highest number of cards?

SELECT id FROM sets ORDER BY baseSetSize DESC LIMIT 1

What is the unique i d of the set that has the highest number of cards ?

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


Question: Who are the congress representatives of the postal points in Garfield?

SELECT T3.first_name, T3.last_name FROM zip_data AS T1 INNER JOIN zip_congress AS T2 ON T1.zip_code = T2.zip_code INNER JOIN congress AS T3 ON T2.district = T3.cognress_rep_id WHERE T1.city = 'Garfield'

Who are the congress representatives of the postal points in Garfield ?


Question: Which last names are both used by customers and by staff?

SELECT last_name FROM Customers INTERSECT SELECT last_name FROM Staff

Which last names are both used by customers and by staff ?

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


Question: How much more is the Florida store's computer product unit price than the Texas store?

SELECT SUM(CASE WHEN T3.State = 'Florida' THEN T2.`Unit Price` ELSE 0 END) - SUM(CASE WHEN T3.State = 'Texas' THEN T2.`Unit Price` ELSE 0 END) FROM Products AS T1 INNER JOIN `Sales Orders` AS T2 ON T2._ProductID = T1.ProductID INNER JOIN `Store Locations` AS T3 ON T3.StoreID = T2._StoreID WHERE T1.`Product Name` = 'Computers'

How much more is the Florida store 's computer product unit price than the Texas store ?

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


Question: What is the total number of flights that flew on August 2, 2018 with air carrier described as Horizon Air?

SELECT COUNT(*) FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description LIKE '%Horizon Air%' AND T2.FL_DATE = '2018/8/2'

What is the total number of flights that flew on August 2 , 2018 with air carrier described as Horizon Air ?

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


Question: Show theme and year for all exhibitions in an descending order of ticket price.

SELECT theme ,  YEAR FROM exhibition ORDER BY ticket_price DESC

Show theme and year for all exhibitions in an descending order of ticket price .

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


Question: What is the sum of distances between BAL and other cities?

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

What is the sum of distances between BAL and other cities ?


Question: Find the id and name of the sailors who reserved more than one boat.

SELECT DISTINCT T1.name ,  T1.sid FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid GROUP BY T2.sid HAVING COUNT(*)  >  1

Find the i d and name of the sailors who reserved more than one boat .

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


Question: What is the difference between the number of married patients and the number of single patients with diabetes?

SELECT SUM(CASE WHEN T2.marital = 'M' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.marital = 'S' THEN 1 ELSE 0 END) FROM conditions AS T1 INNER JOIN patients AS T2 ON T1.PATIENT = T2.patient WHERE T1.DESCRIPTION = 'Diabetes'

What is the difference between the number of married patients and the number of single patients with diabetes ?

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


Question: What is the name of each dorm that has a TV Lounge but no study rooms?

SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'TV Lounge' EXCEPT SELECT T1.dorm_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T3.amenity_name  =  'Study Room'

What is the name of each dorm that has a TV Lounge but no study rooms ?

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


Question: Which country produced the car with the lowest price?

SELECT T3.country FROM price AS T1 INNER JOIN production AS T2 ON T1.ID = T2.ID INNER JOIN country AS T3 ON T3.origin = T2.country ORDER BY T1.price ASC LIMIT 1

Which country produced the car with the lowest price ?


Question: Among the devices on which an event happened on 2016/5/1, how many of them are used by a male user?

SELECT COUNT(T1.device_id) FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T1.timestamp = '2016-05-01' AND T2.gender = 'M'

Among the devices on which an event happened on 2016/5/1 , how many of them are used by a male user ?

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


Question: How many manufacturers have headquarters in either Tokyo or Beijing?

SELECT count(*) FROM manufacturers WHERE headquarter  =  'Tokyo' OR headquarter  =  'Beijing'

How many manufacturers have headquarters in either Tokyo or Beijing ?

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


Question: How many customers are from Australia?

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


Question: What is the URL to the user profile image on Mubi of the user who gave the movie id of 1103 a 5 ratinng score on 4/19/2020?

SELECT T2.user_avatar_image_url FROM ratings AS T1 INNER JOIN ratings_users AS T2 ON T1.user_id = T2.user_id WHERE T2.user_id = 1103 AND rating_score = 5 AND T2.rating_date_utc = '2020-04-19'

What is the URL to the user profile image on Mubi of the user who gave the movie i d of 1103 a 5 ratinng score on 4/19/2020 ?

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


Question: How many male employees do not wish to receive e-mail promotion?

SELECT COUNT(T1.BusinessEntityID) FROM Employee AS T1 INNER JOIN Person AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.EmailPromotion = 0 AND T1.Gender = 'M'

How many male employees do not wish to receive e - mail promotion ?

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


Question: Count the number of differnt customers who have made an order.

SELECT count(DISTINCT customer_id) FROM Customer_orders

Count the number of differnt customers who have made an order .


Question: List all customer status codes and the number of customers having each status code.

SELECT customer_status_code , count(*) FROM Customers GROUP BY customer_status_code;

List all customer status codes and the number of customers having each status code .

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


Question: Name all the cards which have alternative language in Japanese.

SELECT T1.name FROM cards AS T1 INNER JOIN foreign_data AS T2 ON T1.uuid = T2.uuid WHERE T2.language = 'Japanese'

Name all the cards which have alternative language in Japanese .

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


Question: List the names of the films that are more than 180 minutes long.

SELECT title FROM film WHERE length > 180

List the names of the films that are more than 180 minutes long .

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


Question: How many members of "Bootup Baltimore" are older than 18?

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

How many members of " Bootup Baltimore " are older than 18 ?

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


Question: How many employees have Andrew Fuller as their direct supervisor?

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

How many employees have Andrew Fuller as their direct supervisor ?


Question: Who is the sales representative that made the order which was sent to 25 Maiden Lane, Floor No. 4?

SELECT T2.firstName, T2.lastName FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T1.addressLine1 = '25 Maiden Lane' AND T1.addressLine2 = 'Floor No. 4'

Who is the sales representative that made the order which was sent to 25 Maiden Lane , Floor No . 4 ?

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


Question: Among students with low salary, how many of them have a gpa of 3.5?

SELECT COUNT(T1.student_id) FROM RA AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id WHERE T2.gpa = 3.5 AND T1.salary = 'low'

Among students with low salary , how many of them have a gpa of 3.5 ?

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


Question: What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach?

SELECT T2.emp_fname ,  T1.class_room FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN professor AS T3 ON T2.emp_num  =  T3.emp_num JOIN department AS T4 ON T4.dept_code  =  T3.dept_code WHERE T4.dept_name  =  'Accounting'

What are the first names of all Accounting professors who teach and what are the classrooms of the courses they teach ?

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


Question: Among the users who received low compliments from other users, which users joined Yelp in 2012?

SELECT DISTINCT T2.user_id FROM Users AS T1 INNER JOIN Users_Compliments AS T2 ON T1.user_id = T2.user_id WHERE T1.user_yelping_since_year = 2012 AND T2.number_of_compliments = 'Low'

Among the users who received low compliments from other users , which users joined Yelp in 2012 ?

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


Question: On what dates did the student with family name "Zieme" and personal name "Bernie" enroll in and complete the courses?

SELECT T1.date_of_enrolment ,  T1.date_of_completion FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id WHERE T2.family_name  =  "Zieme" AND T2.personal_name  =  "Bernie"

On what dates did the student with family name " Zieme " and personal name " Bernie " enroll in and complete the courses ?

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


Question: List down the district's commander associated with the crime that happened at the yard and has a beat of 532.

SELECT T2.address, T2.commander FROM Crime AS T1 INNER JOIN District AS T2 ON T1.district_no = T2.district_no WHERE T1.location_description = 'YARD' AND T1.beat = 532

List down the district 's commander associated with the crime that happened at the yard and has a beat of 532 .

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


Question: What is the MPAA rating for the movie with the character named "Peter Quill" in it?

SELECT T1.`MPAA Rating` FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID WHERE T2.`Character Name` = 'Peter Quill'

What is the MPAA rating for the movie with the character named " Peter Quill " in it ?

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


Question: Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday.

SELECT CAST(SUM(CASE WHEN T2.opening_time = '9AM' AND T2.closing_time = '9PM' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.day_id) FROM Days AS T1 INNER JOIN Business_Hours AS T2 ON T1.day_id = T2.day_id WHERE T1.day_of_week = 'Sunday'

Calculate the percentage of business which opened on Sunday from 9AM to 9PM based on the number of business opened on Sunday .

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


Question: Please list the IDs of all the shipments made by a retailer customer.

SELECT T2.ship_id FROM customer AS T1 INNER JOIN shipment AS T2 ON T1.cust_id = T2.cust_id WHERE T1.cust_type = 'retailer'

Please list the IDs of all the shipments made by a retailer customer .

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


Question: How many players received Most Valuable Player award from 1969 to 1975?

SELECT COUNT(DISTINCT playerID) FROM awards_players WHERE year BETWEEN 1969 AND 1975 AND award = 'Most Valuable Player'

How many players received Most Valuable Player award from 1969 to 1975 ?

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


Question: List the movie titles with the voice actor Jeff Bennet

SELECT movie FROM `voice-actors` WHERE 'voice-actor' = 'Jeff Bennett'

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


Question: Show the Simplified Chinese translation of the name of the set "Mirrodin"?

SELECT translation FROM set_translations WHERE setCode IN ( SELECT code FROM sets WHERE name = 'Mirrodin' ) AND language = 'Chinese Simplified'

Show the Simplified Chinese translation of the name of the set " Mirrodin " ?

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


Question: What is the sum of total pounds of purchase in year 2018 for all branches in London?

SELECT sum(total_pounds) FROM purchase AS T1 JOIN branch AS T2 ON T1.branch_id  =  T2.branch_id WHERE T2.city  =  'London' AND T1.year  =  2018

What is the sum of total pounds of purchase in year 2018 for all branches in London ?

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


Question: List all orders where its products were shipped from Daly City.

SELECT T FROM ( SELECT DISTINCT CASE  WHEN T2.`City Name` = 'Daly City' THEN T1.OrderNumber END AS T FROM `Sales Orders` T1 INNER JOIN `Store Locations` T2 ON T2.StoreID = T1._StoreID ) WHERE T IS NOT NULL

List all orders where its products were shipped from Daly City .

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


Question: What is average enrollment of colleges in the state FL?

SELECT avg(enr) FROM College WHERE state  =  'FL'

What is average enrollment of colleges in the state FL ?

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


Question: What are the movie names in alphabetical order?

What are the movie names in alphabetical order ?


Question: How many matches were played on May 2008?

SELECT SUM(CASE WHEN SUBSTR(Match_Date, 7, 1) = '5' THEN 1 ELSE 0 END) FROM `Match` WHERE SUBSTR(Match_Date, 1, 4) = '2008'

How many matches were played on May 2008 ?


Question: display the full name (first and last), hire date, salary, and department number for those employees whose first name does not containing the letter M.

SELECT first_name ,  last_name ,  hire_date ,  salary ,  department_id FROM employees WHERE first_name NOT LIKE '%M%'

display the full name ( first and last ) , hire date , salary , and department number for those employees whose first name does not containing the letter M.

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


Question: In which year will the David Bradley's credit card expire?

SELECT T3.ExpYear FROM Person AS T1 INNER JOIN PersonCreditCard AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN CreditCard AS T3 ON T2.CreditCardID = T3.CreditCardID WHERE T1.FirstName = 'David' AND T1.LastName = 'Bradley'

In which year will the David Bradley 's credit card expire ?

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


Question: List out the account numbers of female clients who are oldest and has lowest average salary, calculate the gap between this lowest average salary with the highest average salary?

SELECT T1.account_id , ( SELECT MAX(A11) - MIN(A11) FROM district ) FROM account AS T1 INNER JOIN district AS T2 ON T1.district_id = T2.district_id INNER JOIN disp AS T3 ON T1.account_id = T3.account_id INNER JOIN client AS T4 ON T3.client_id = T4.client_id WHERE T2.district_id = ( SELECT district_id FROM client WHERE gender = 'F' ORDER BY birth_date ASC LIMIT 1 ) ORDER BY T2.A11 DESC LIMIT 1

List out the account numbers of female clients who are oldest and has lowest average salary , calculate the gap between this lowest average salary with the highest average salary ?

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


Question: Please show the first names of the students that have at least two answer records.

SELECT T2.First_Name FROM Student_Answers AS T1 JOIN Students AS T2 ON T1.Student_ID  =  T2.Student_ID GROUP BY T1.Student_ID HAVING COUNT(*)  >=  2

Please show the first names of the students that have at least two answer records .

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


Question: Among the professors with more than average teaching ability, list the full name and email address of the professors who advise two or more students.

SELECT T2.first_name, T2.last_name, T2.email FROM RA AS T1 INNER JOIN prof AS T2 ON T1.prof_id = T2.prof_id WHERE T2.teachingability > ( SELECT AVG(teachingability) FROM prof ) GROUP BY T2.prof_id HAVING COUNT(T1.student_id) >= 2

Among the professors with more than average teaching ability , list the full name and email address of the professors who advise two or more students .

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


Question: List down the series codes in which the topic is about Environment: Emissions and the license type is restricted. Please include their alpha code.

SELECT SeriesCode FROM Series WHERE Topic = 'Environment: Emissions' AND LicenseType = 'Restricted'

List down the series codes in which the topic is about Environment : Emissions and the license type is restricted . Please include their alpha code .

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


Question: How many people have membership in the club "Pen and Paper Gaming"?

SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t1.clubname  =  "Pen and Paper Gaming"

How many people have membership in the club " Pen and Paper Gaming " ?

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


Question: List the living players who have two positions. State their given name the position they play.

SELECT firstName, lastName, pos FROM Master WHERE deathYear IS NULL AND pos LIKE '%/%'

List the living players who have two positions . State their given name the position they play .

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


Question: What are the locations of warehouses that have boxes containing Rocks but not Scissors?

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

What are the locations of warehouses that have boxes containing Rocks but not Scissors ?

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


Question: Which region has the largest population? Give me the capital of the region.

SELECT Capital FROM region ORDER BY Population DESC LIMIT 1

Which region has the largest population ? Give me the capital of the region .

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


Question: Return the description of the feature 'rooftop'.

SELECT feature_description FROM Features WHERE feature_name  =  'rooftop';

Return the description of the feature ' rooftop ' .

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


Question: List all the podcast title and its itunes url under the 'society-culture' category.

SELECT T2.title, T2.itunes_url FROM categories AS T1 INNER JOIN podcasts AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'society-culture'

List all the podcast title and its itunes url under the ' society - culture ' category .

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


Question: Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities?

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Jul INTERSECT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Give me a list of cities whose temperature in Mar is lower than that in July and which have also served as host cities ?

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


Question: display the employee number and job id for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN.

SELECT employee_id ,  job_id FROM employees WHERE salary  <  ( SELECT min(salary) FROM employees WHERE job_id  =  'MK_MAN' )

display the employee number and job i d for all employees whose salary is smaller than any salary of those employees whose job title is MK_MAN .

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


Question: In businesses that violates 103157 on May 27, 2016 , what is the name of the business that has an unscheduled inspection?

SELECT DISTINCT T3.name FROM violations AS T1 INNER JOIN inspections AS T2 ON T1.business_id = T2.business_id INNER JOIN businesses AS T3 ON T2.business_id = T3.business_id WHERE T1.`date` = '2016-05-27' AND T1.violation_type_id = 103157 AND T2.type = 'Routine - Unscheduled'

In businesses that violates 103157 on May 27 , 2016 , what is the name of the business that has an unscheduled inspection ?

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


Question: Give the name of the most expensive Clothes product.

SELECT product_name FROM Products WHERE product_type_code  =  "Clothes" ORDER BY product_price DESC LIMIT 1

Give the name of the most expensive Clothes product .


Question: Which allergy type is most common?

SELECT allergytype FROM Allergy_type GROUP BY allergytype ORDER BY count(*) DESC LIMIT 1


Question: Advisor 1121 has how many students?

SELECT count(*) FROM Student WHERE Advisor =  1121;


Question: How many French drivers who obtain the laptime less than 02:00.00?

SELECT COUNT(T1.driverId) FROM drivers AS T1 INNER JOIN lapTimes AS T2 on T1.driverId = T2.driverId WHERE T1.nationality = 'French' AND (CAST(SUBSTR(T2.time, 1, 2) AS INTEGER) * 60 + CAST(SUBSTR(T2.time, 4, 2) AS INTEGER) + CAST(SUBSTR(T2.time, 7, 2) AS REAL) / 1000) < 120

How many French drivers who obtain the laptime less than 02:00.00 ?

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


Question: Please list all the paragraphs in Act 1, Scene 1 in Twelfth Night.

SELECT T3.PlainText FROM works AS T1 INNER JOIN chapters AS T2 ON T1.id = T2.work_id INNER JOIN paragraphs AS T3 ON T2.id = T3.chapter_id WHERE T2.Act = 1 AND T2.Scene = 1 AND T1.Title = 'Twelfth Night'

Please list all the paragraphs in Act 1 , Scene 1 in Twelfth Night .

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


Question: Which song is associated with the most popular Disney movie in 1970s?

SELECT T2.song FROM movies_total_gross AS T1 INNER JOIN characters AS T2 ON T1.movie_title = T2.movie_title WHERE CAST(SUBSTR(T1.release_date, INSTR(T1.release_date, ', ') + 1) AS int) BETWEEN 1970 AND 1979 ORDER BY CAST(REPLACE(SUBSTR(T1.total_gross, 2), ',', '') AS float) DESC LIMIT 1

Which song is associated with the most popular Disney movie in 1970s ?

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


Question: List the products ordered by Matt Abelman from the Western store in 2013.

SELECT DISTINCT T3.`Product Name` FROM west_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` INNER JOIN product AS T3 ON T3.`Product ID` = T1.`Product ID` WHERE T2.`Customer Name` = 'Matt Abelman' AND STRFTIME('%Y', T1.`Order Date`) = '2013'

List the products ordered by Matt Abelman from the Western store in 2013 .

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


Question: List the name of employees who had left the company? When were they hired?

SELECT T1.FirstName, T1.LastName, T2.HireDate FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID INNER JOIN EmployeeDepartmentHistory AS T3 ON T2.BusinessEntityID = T3.BusinessEntityID WHERE T3.EndDate IS NOT NULL

List the name of employees who had left the company ? When were they hired ?

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


Question: What is the profit on net of the vendor with the highest standard price? If there are two vendors of the same amount, calculate only for one vendor.

SELECT LastReceiptCost - StandardPrice FROM ProductVendor ORDER BY StandardPrice DESC LIMIT 1

What is the profit on net of the vendor with the highest standard price ? If there are two vendors of the same amount , calculate only for one vendor .

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


Question: What is the average price of the dishes on the menu "Zentral Theater Terrace"?

SELECT SUM(T1.price) / COUNT(T1.price) FROM MenuItem AS T1 INNER JOIN MenuPage AS T2 ON T1.menu_page_id = T2.id INNER JOIN Menu AS T3 ON T2.menu_id = T3.id WHERE T3.name = 'Zentral Theater Terrace'

What is the average price of the dishes on the menu " Zentral Theater Terrace " ?

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


Question: Find boats reserved by Sailor with id 1.

SELECT DISTINCT bid FROM Reserves WHERE sid = 1

Find boats reserved by Sailor with i d 1 .

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


Question: What is the average prices of wines for each each?

SELECT avg(Price) ,  YEAR FROM WINE GROUP BY YEAR

What is the average prices of wines for each each ?


Question: What are the distinct names of customers who have purchased at least three different products?

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

What are the distinct names of customers who have purchased at least three different products ?

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


Question: What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997?

SELECT CAST((SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1997' THEN T1.amount ELSE 0 END) - SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END)) AS REAL) * 100 / SUM(CASE WHEN STRFTIME('%Y', T1.date) = '1996' THEN T1.amount ELSE 0 END) FROM loan AS T1 INNER JOIN account AS T2 ON T1.account_id = T2.account_id INNER JOIN disp AS T3 ON T3.account_id = T2.account_id INNER JOIN client AS T4 ON T4.client_id = T3.client_id WHERE T4.gender = 'M' AND T3.type = 'OWNER'

What was the growth rate of the total amount of loans across all accounts for a male client between 1996 and 1997 ?

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


Question: Which city has the largest population?

SELECT `City Name` FROM `Store Locations` ORDER BY Population DESC LIMIT 1


Question: What is the name of teh studio that created the most films?

SELECT Studio FROM film GROUP BY Studio ORDER BY COUNT(*) DESC LIMIT 1

What is the name of teh studio that created the most films ?


Question: What is the type of bond that molecule TR000 has when involved in any bonds?

SELECT DISTINCT T.bond_type FROM bond AS T WHERE T.molecule_id = 'TR000'

What is the type of bond that molecule TR000 has when involved in any bonds ?

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


Question: When was the highest amount of donated? How much was the amount?

SELECT donation_timestamp, donation_total FROM donations WHERE donation_total = ( SELECT donation_total FROM donations ORDER BY donation_total DESC LIMIT 1 )

When was the highest amount of donated ? How much was the amount ?


Question: What is the total profit all transactions with product ID 827?

SELECT SUM((T1.ListPrice - T1.StandardCost) * T2.Quantity) FROM Product AS T1 INNER JOIN TransactionHistory AS T2 ON T1.ProductID = T2.ProductID WHERE T1.ProductID = 827

What is the total profit all transactions with product ID 827 ?

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


Question: Find the student ID and personal name of the student with at least two enrollments.

SELECT T1.student_id ,  T2.personal_name FROM Student_Course_Enrolment AS T1 JOIN Students AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING COUNT(*)  >=  2

Find the student ID and personal name of the student with at least two enrollments .

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


Question: What is the full name of the team that selected Mike Lynn?

SELECT T1.name FROM teams AS T1 INNER JOIN draft AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.draftYear WHERE T2.firstName = 'Mike' AND T2.lastName = 'Lynn'

What is the full name of the team that selected Mike Lynn ?

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


Question: Return the names of countries that have players that play the Forward position, as well as players who play the Defender position.

SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Forward" INTERSECT SELECT T1.Country_name FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"

Return the names of countries that have players that play the Forward position , as well as players who play the Defender position .

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


Question: Please list the capital cities of the countries that have more than 4 mountains.

SELECT T1.Capital FROM country AS T1 INNER JOIN geo_mountain AS T2 ON T1.Code = T2.Country GROUP BY T1.Name, T1.Capital HAVING COUNT(T1.Name) > 4

Please list the capital cities of the countries that have more than 4 mountains .

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


Question: List the distinct director of all films.

List the distinct director of all films .


Question: What are the isbns for all books, and what is the total amount ordered for each?

SELECT isbn ,  sum(amount) FROM Books_Order GROUP BY isbn

What are the isbns for all books , and what is the total amount ordered for each ?

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


Question: List all package sent or received by Leo Wong.

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

List all package sent or received by Leo Wong .

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


Question: User 58149469's critic on which film got 1 like and 2 comments?

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.user_id = 58149469 AND T1.critic_likes = 1 AND T1.critic_comments = 2

User 58149469 's critic on which film got 1 like and 2 comments ?

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


Question: Return the names of gymnasts who did not grow up in Santo Domingo.

SELECT T2.Name FROM gymnast AS T1 JOIN people AS T2 ON T1.Gymnast_ID  =  T2.People_ID WHERE T2.Hometown != "Santo Domingo"

Return the names of gymnasts who did not grow up in Santo Domingo .

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


Question: Give me the payment Id, the date and the amount for all the payments processed with Visa.

SELECT Payment_ID ,  Date_Payment_Made ,  Amount_Payment FROM Payments WHERE Payment_Method_Code  =  'Visa'

Give me the payment I d , the date and the amount for all the payments processed with Visa .

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


Question: Show the names of members in ascending order of their rank in rounds.

SELECT T1.Name FROM member AS T1 JOIN round AS T2 ON T1.Member_ID  =  T2.Member_ID ORDER BY Rank_in_Round ASC

Show the names of members in ascending order of their rank in rounds .

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


Question: How many phones belongs to each accreditation type?

SELECT Accreditation_type ,  count(*) FROM phone GROUP BY Accreditation_type

How many phones belongs to each accreditation type ?


Question: What are the statuses, dates, and shipment dates for all invoices?

SELECT T1.invoice_status_code ,  T1.invoice_date ,  T2.shipment_date FROM Invoices AS T1 JOIN Shipments AS T2 ON T1.invoice_number  =  T2.invoice_number

What are the statuses , dates , and shipment dates for all invoices ?

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


Question: Among the product lists in order ID 10337, write down the product names and suppliers which had the highest in reorder level.

SELECT T2.ProductName, T1.CompanyName FROM Suppliers AS T1 INNER JOIN Products AS T2 ON T1.SupplierID = T2.SupplierID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID WHERE T3.OrderID = 10337 ORDER BY T2.ReorderLevel DESC LIMIT 1

Among the product lists in order ID 10337 , write down the product names and suppliers which had the highest in reorder level .

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


Question: How many institutions were founded between 1850 and 1900?

SELECT count(*) FROM institution WHERE founded BETWEEN 1850 AND 1900

How many institutions were founded between 1850 and 1900 ?

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


Question: Who are the top 5 players who perform better in crossing actions? Indicate their player id.

SELECT id FROM Player_Attributes ORDER BY crossing DESC LIMIT 5

Who are the top 5 players who perform better in crossing actions ? Indicate their player i d.

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


Question: Who is the owner of the post "Eliciting priors from experts"?

SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Eliciting priors from experts'

Who is the owner of the post " Eliciting priors from experts " ?

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


Question: Which of the film released in 2008 scored the highest?

SELECT T2.movie_title FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_release_year = 2008 ORDER BY T1.rating_score DESC LIMIT 1

Which of the film released in 2008 scored the highest ?


Question: Provide the city where zip code 19019 is located and the alias of that city.

SELECT T2.city, T1.alias FROM alias AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.zip_code = 19019

Provide the city where zip code 19019 is located and the alias of that city .

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


Question: What are the names and addressed of all clients, ordered alphabetically by name?

SELECT name ,  address FROM Client ORDER BY name

What are the names and addressed of all clients , ordered alphabetically by name ?

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


Question: What are the names of the top 3 customers who paid the highest amount of price per order after discount?

SELECT `Customer Names` FROM ( SELECT T1.`Customer Names` , REPLACE(T2.`Unit Price`, ',', '') * T2.`Order Quantity` - REPLACE(T2.`Unit Price`, ',', '') * T2.`Discount Applied` AS T FROM Customers T1 INNER JOIN `Sales Orders` T2 ON T2._CustomerID = T1.CustomerID ) ORDER BY T DESC LIMIT 3

What are the names of the top 3 customers who paid the highest amount of price per order after discount ?

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


Question: For person id No.2054, is his/her vendor still active?

SELECT T1.ActiveFlag FROM Vendor AS T1 INNER JOIN BusinessEntityContact AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE T2.PersonID = 2054

For person i d No.2054 , is his / her vendor still active ?

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


Question: How many clients from Mozambique required orders with a low priority order?

SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey INNER JOIN orders AS T3 ON T1.c_custkey = T3.o_custkey WHERE T2.n_name = 'MOZAMBIQUE' AND T3.o_orderpriority = '5-LOW'

How many clients from Mozambique required orders with a low priority order ?

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


Question: What is the name of the customer who has made the minimum amount of payment in one claim?

SELECT t3.customer_details FROM claim_headers AS t1 JOIN policies AS t2 ON t1.policy_id  =  t2.policy_id JOIN customers AS t3 ON t2.customer_id  =  t3.customer_id WHERE t1.amount_piad  =  (SELECT min(amount_piad) FROM claim_headers)

What is the name of the customer who has made the minimum amount of payment in one claim ?

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


Question: How many legislators hold the title "Majority Leader"?

SELECT COUNT(bioguide) FROM `current-terms` WHERE title = 'Majority Leader'

How many legislators hold the title " Majority Leader " ?

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


Question: Who received least number of packages ? List client name and number of packages received by that client .

select t2.name ,  count(*) from package as t1 join client as t2 on t1.recipient  =  t2.accountnumber group by t1.recipient order by count(*) limit 1;

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


Question: How many clients are there for each sic code?

SELECT sic_code ,  count(*) FROM Clients GROUP BY sic_code

How many clients are there for each sic code ?


Question: Which movies have received the greatest ratings from female users whose occupations fall within the category of 3?

SELECT T2.movieid FROM users AS T1 INNER JOIN u2base AS T2 ON T1.userid = T2.userid INNER JOIN movies AS T3 ON T2.movieid = T3.movieid WHERE T1.u_gender = 'F' AND T1.occupation = 3 AND T2.rating = 5

Which movies have received the greatest ratings from female users whose occupations fall within the category of 3 ?

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


Question: What cities do students live in?


Question: Please list the full names of the sanitarians who did at least one inspection in May, 2010.

SELECT DISTINCT T1.first_name, T1.last_name FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE strftime('%Y-%m', T2.inspection_date) = '2010-05' AND T1.title = 'Sanitarian'

Please list the full names of the sanitarians who did at least one inspection in May , 2010 .

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


Question: List down the languages of the countries that have population below 8000.

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Population < 8000

List down the languages of the countries that have population below 8000 .

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


Question: Find the average age of female (sex is F) students who have secretary votes in the spring election cycle.

SELECT avg(T1.Age) FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  SECRETARY_Vote WHERE T1.Sex  =  "F" AND T2.Election_Cycle  =  "Spring"

Find the average age of female ( sex is F ) students who have secretary votes in the spring election cycle .

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


Question: List down all of the venues in Mumbai.

SELECT T2.Venue_Name FROM City AS T1 INNER JOIN Venue AS T2 ON T2.City_Id = T1.City_Id WHERE T1.City_Name = 'Mumbai'


Question: What is Astrid Gruber's email and phone number?

SELECT email ,  phone FROM customers WHERE first_name = "Astrid" AND last_name = "Gruber";

What is Astrid Gruber 's email and phone number ?

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


Question: Please list the titles of the Wikipedia pages on the Catalan language with more than 4000 words.

SELECT title FROM pages WHERE lid = 1 AND words > 4000

Please list the titles of the Wikipedia pages on the Catalan language with more than 4000 words .

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


Question: What are the items sold by the store during the day whose station recorded the thickest snowfall?

SELECT T1.item_nbr FROM sales_in_weather AS T1 INNER JOIN relation AS T2 ON T1.store_nbr = T2.store_nbr INNER JOIN ( SELECT station_nbr, `date` FROM weather ORDER BY snowfall DESC LIMIT 1 ) AS T3 ON T2.station_nbr = T3.station_nbr

What are the items sold by the store during the day whose station recorded the thickest snowfall ?

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


Question: Find the name and age of the person who is a friend of both Dan and Alice.

SELECT T1.name ,  T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Dan' INTERSECT SELECT T1.name ,   T1.age FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.name WHERE T2.friend  =  'Alice'

Find the name and age of the person who is a friend of both Dan and Alice .

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


Question: How many boxes are stored in each warehouse?

SELECT count(*) ,  warehouse FROM boxes GROUP BY warehouse

How many boxes are stored in each warehouse ?


Question: What is the name of the longest movie title? When was it released?

SELECT movie_title, movie_release_year FROM movies ORDER BY LENGTH(movie_popularity) DESC LIMIT 1

What is the name of the longest movie title ? When was it released ?

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


Question: Show all origins and the number of flights from each origin.

SELECT origin ,  count(*) FROM Flight GROUP BY origin

Show all origins and the number of flights from each origin .


Question: Provide the name of the location where transaction no.100885 happened.

SELECT T2.LocationName FROM `transaction` AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TransactionID = 100885

Provide the name of the location where transaction no.100885 happened .


Question: In which division was the match between Hibernian, the away team, and Hearts, the home team, played? To which country does this division belong?

SELECT DISTINCT T2.division,T2.country FROM matchs AS T1 INNER JOIN divisions AS T2 ON T1.Div = T2.division WHERE T1.HomeTeam = 'Hearts' AND T1.AwayTeam = 'Hibernian'

In which division was the match between Hibernian , the away team , and Hearts , the home team , played ? To which country does this division belong ?

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


Question: What is the name of the manager with the most gas stations that opened after 2000?

SELECT manager_name FROM gas_station WHERE open_year  >  2000 GROUP BY manager_name ORDER BY count(*) DESC LIMIT 1

What is the name of the manager with the most gas stations that opened after 2000 ?

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


Question: What is the percentage of carbon in double-bond molecules?

SELECT CAST(COUNT(DISTINCT CASE WHEN T1.element = 'c' THEN T1.atom_id ELSE NULL END) AS REAL) * 100 / COUNT(DISTINCT T1.atom_id) FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T2.bond_type = '='

What is the percentage of carbon in double - bond molecules ?


Question: How much in total had the customers in Italy spent on film rentals?

SELECT SUM(T5.amount) FROM address AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id INNER JOIN country AS T3 ON T2.country_id = T3.country_id INNER JOIN customer AS T4 ON T1.address_id = T4.address_id INNER JOIN payment AS T5 ON T4.customer_id = T5.customer_id WHERE T3.country = 'Italy'

How much in total had the customers in Italy spent on film rentals ?

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


Question: List down the districts belong to the country headed by Adolf Ogi.

SELECT T2.District FROM Country AS T1 INNER JOIN City AS T2 ON T1.Code = T2.CountryCode WHERE T1.HeadOfState = 'Adolf Ogi'

List down the districts belong to the country headed by Adolf Ogi .

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


Question: What is the name of the vendor that supplies resources to the project "iMath"?

SELECT DISTINCT T1.vendor_name FROM resources AS T1 INNER JOIN essays AS T3 ON T1.projectid = T3.projectid WHERE T3.title = 'iMath'

What is the name of the vendor that supplies resources to the project " iMath " ?

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


Question: List out the dates that users who are located in Rochester, NY obtained their badges?

SELECT T2.Date FROM users AS T1 INNER JOIN badges AS T2 ON T1.Id = T2.UserId WHERE T1.Location = 'Rochester, NY'

List out the dates that users who are located in Rochester , NY obtained their badges ?

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


Question: Did the number of cases with Vehicle as subject weapon increase or decrease from year 2007 to 2008. State the difference.

SELECT SUM(IIF(STRFTIME('%Y', date) = '2007', 1, 0)) - SUM(IIF(STRFTIME('%Y', date) = '2008', 1, 0)) FROM incidents WHERE subject_weapon = 'Vehicle'

Did the number of cases with Vehicle as subject weapon increase or decrease from year 2007 to 2008 . State the difference .

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


Question: Who is the youngest person to ever play a "clerk" role in the series?

SELECT T2.name FROM Credit AS T1 INNER JOIN Person AS T2 ON T2.person_id = T1.person_id WHERE T1.role = 'Clerk' AND T2.birthdate IS NOT NULL ORDER BY T2.birthdate LIMIT 1

Who is the youngest person to ever play a " clerk " role in the series ?

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


Question: Write down the name of products whose sale quantity is more than 950.

SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.Quantity > 950

Write down the name of products whose sale quantity is more than 950 .

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


Question: Calculate the revenue produced through sales of HL Road Frame - Red, 56.

SELECT SUM(T2.Quantity * T1.Price) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Name = 'HL Road Frame - Red, 56'

Calculate the revenue produced through sales of HL Road Frame - Red , 56 .

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


Question: How many rooms does the Lamberton building have?

SELECT count(*) FROM classroom WHERE building  =  'Lamberton'

How many rooms does the Lamberton building have ?


Question: Find the semester and year which has the least number of student taking any class.

SELECT semester ,  YEAR FROM takes GROUP BY semester ,  YEAR ORDER BY count(*) LIMIT 1

Find the semester and year which has the least number of student taking any class .

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


Question: Provide the responsible person and his/her email address of Chicago Lawn.

SELECT commander, email FROM District WHERE district_name = 'Chicago Lawn'

Provide the responsible person and his / her email address of Chicago Lawn .

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


Question: Give the head of the state of the country with the lowest percentage use of English as their language.

SELECT T1.HeadOfState FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T2.Language = 'English' ORDER BY T2.Percentage LIMIT 1

Give the head of the state of the country with the lowest percentage use of English as their language .

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


Question: Which budget allowed the most money for water, chips, and cookies?

SELECT T2.budget_id FROM expense AS T1 INNER JOIN budget AS T2 ON T1.link_to_budget = T2.budget_id WHERE T1.expense_description = 'Water, chips, cookies' ORDER BY T1.cost DESC LIMIT 1

Which budget allowed the most money for water , chips , and cookies ?

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


Question: Find the names of the products with length smaller than 3 or height greater than 5.

SELECT catalog_entry_name FROM catalog_contents WHERE LENGTH  <  3 OR width  >  5

Find the names of the products with length smaller than 3 or height greater than 5 .

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


Question: From year 1991 to 2000, calculate the difference betweeen the total number of papers published under the conference "International Conference on Supercomputing " and "Informatik & Schule"?

SELECT SUM(CASE WHEN T2.FullName = 'Informatik & Schule' THEN 1 ELSE 0 END) - SUM(CASE WHEN T2.FullName = 'International Conference on Supercomputing' THEN 1 ELSE 0 END) AS DIFF FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T1.Year > 1990 AND T1.Year < 2001

From year 1991 to 2000 , calculate the difference betweeen the total number of papers published under the conference " International Conference on Supercomputing " and " Informatik & Schule " ?

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


Question: What's different average revenue status for director who directed the movie that got the most 1 ratings?

SELECT DISTINCT T1.avg_revenue FROM directors AS T1 INNER JOIN movies2directors AS T2 ON T1.directorid = T2.directorid WHERE T1.d_quality = 5

What 's different average revenue status for director who directed the movie that got the most 1 ratings ?

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


Question: What are the song titles on the album "A Kiss Before You Go: Live in Hamburg"?

SELECT 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.title  =  "A Kiss Before You Go: Live in Hamburg"

What are the song titles on the album " A Kiss Before You Go : Live in Hamburg " ?

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


Question: What is the ratio between country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971? List the country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971.

SELECT CAST(MAX(value) AS REAL) / MIN(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' UNION ALL SELECT countryname FROM ( SELECT countryname, MAX(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' ) UNION SELECT countryname FROM ( SELECT countryname, MIN(value) FROM indicators WHERE indicatorname = 'Number of infant deaths' AND year = '1971' )

What is the ratio between country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971 ? List the country with the highest number of infant deaths in 1971 and the lowest number of infant deaths in 1971 .

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


Question: How many disabled students have payment due?

SELECT COUNT(T1.name) FROM disabled AS T1 INNER JOIN no_payment_due AS T2 ON T2.name = T1.name WHERE T2.bool = 'pos'

How many disabled students have payment due ?


Question: Mention the display name and location of the user who owned the excerpt post with hypothesis-testing tag.

SELECT T3.DisplayName, T3.Location FROM tags AS T1 INNER JOIN posts AS T2 ON T1.ExcerptPostId = T2.Id INNER JOIN users AS T3 ON T3.Id = T2.OwnerUserId WHERE T1.TagName = 'hypothesis-testing'

Mention the display name and location of the user who owned the excerpt post with hypothesis - testing tag .

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


Question: How many events have happened on the device of the youngest female user?

SELECT COUNT(T1.event_id) FROM events AS T1 INNER JOIN gender_age AS T2 ON T1.device_id = T2.device_id WHERE T2.gender = 'F' GROUP BY T1.event_id, T2.age ORDER BY T2.age LIMIT 1

How many events have happened on the device of the youngest female user ?

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


Question: What are the different card type codes, and how many different customers hold each type?

SELECT card_type_code ,  count(DISTINCT customer_id) FROM Customers_cards GROUP BY card_type_code

What are the different card type codes , and how many different customers hold each type ?

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


Question: What is the most common issue for the highest priority complaints?

SELECT T1.Issue FROM events AS T1 INNER JOIN callcenterlogs AS T2 ON T1.`Complaint ID` = T2.`Complaint ID` WHERE T2.priority = 2 GROUP BY T1.Issue ORDER BY COUNT(T1.Issue) DESC LIMIT 1

What is the most common issue for the highest priority complaints ?

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


Question: What is all the information about the basketball match?

What is all the information about the basketball match ?


Question: For the set "From the Vault: Lore", what is its expansion type?

SELECT type FROM sets WHERE name LIKE '%FROM the Vault: Lore%'

For the set " From the Vault : Lore " , what is its expansion type ?

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


Question: Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities.

SELECT T1.city FROM city AS T1 JOIN temperature AS T2 ON T1.city_id  =  T2.city_id WHERE T2.Mar  <  T2.Dec EXCEPT SELECT T3.city FROM city AS T3 JOIN hosting_city AS T4 ON T3.city_id  =  T4.host_city

Give me a list of cities whose temperature in Mar is lower than that in Dec and which have never been host cities .

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


Question: Count the number of addresses.


Question: How many condiments were sold in 1997?

SELECT COUNT(T2.ProductID) FROM Categories AS T1 INNER JOIN Products AS T2 ON T1.CategoryID = T2.CategoryID INNER JOIN `Order Details` AS T3 ON T2.ProductID = T3.ProductID INNER JOIN Orders AS T4 ON T3.OrderID = T4.OrderID WHERE T1.CategoryName = 'Condiments' AND T1.CategoryID = 2 AND T4.OrderDate LIKE '1997%'


Question: How many paragraphs are there in the chapter with the highest amount of scenes in act 1?

SELECT T1.ParagraphNum FROM paragraphs AS T1 INNER JOIN chapters AS T2 ON T1.chapter_id = T2.id WHERE T2.Act = 1 ORDER BY T2.Scene DESC LIMIT 1

How many paragraphs are there in the chapter with the highest amount of scenes in act 1 ?

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


Question: How many roller coasters are there?


Question: Count the number of integration platforms that have "Success" in the details.

SELECT count(*) FROM integration_platform WHERE integration_platform_details  =  "Success"

Count the number of integration platforms that have " Success " in the details .

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


Question: Return the cell phone number and email address for all students.

SELECT cell_mobile_number ,  email_address FROM STUDENTS

Return the cell phone number and email address for all students .

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


Question: Show the prices of the products named "Dining" or "Trading Policy".

SELECT Product_Price FROM Products WHERE Product_Name  =  "Dining" OR Product_Name  =  "Trading Policy"

Show the prices of the products named " Dining " or " Trading Policy " .

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


Question: In which year has the greatest number of cases where Handgun was used as weapon?

SELECT STRFTIME('%Y', date) FROM incidents WHERE subject_weapon = 'Handgun' GROUP BY STRFTIME('%Y', date) ORDER BY COUNT(case_number) DESC LIMIT 1

In which year has the greatest number of cases where Handgun was used as weapon ?

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


Question: What is the average price for flights from Los Angeles to Honolulu.

SELECT avg(price) FROM Flight WHERE origin  =  "Los Angeles" AND destination  =  "Honolulu"

What is the average price for flights from Los Angeles to Honolulu .

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


Question: What is the minimum weight of all-star players coming from UCLA college?

SELECT MIN(T1.weight) FROM players AS T1 INNER JOIN player_allstar AS T2 ON T1.playerID = T2.playerID WHERE T1.college = 'UCLA'

What is the minimum weight of all - star players coming from UCLA college ?

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


Question: What are the email addresses of teachers whose address has zip code "918"?

SELECT T2.email_address FROM Addresses AS T1 JOIN Teachers AS T2 ON T1.address_id  =  T2.address_id WHERE T1.zip_postcode  =  "918"

What are the email addresses of teachers whose address has zip code " 918 " ?

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


Question: What is the name of the activity that has the most faculty members involved in?

SELECT T1.activity_name FROM Activity AS T1 JOIN Faculty_participates_in AS T2 ON T1.actID  =  T2.actID GROUP BY T1.actID ORDER BY count(*) DESC LIMIT 1

What is the name of the activity that has the most faculty members involved in ?


Question: What are the width and height of the bounding box of the object with "keyboard" as their object class and (5, 647) as their coordinate?

SELECT T1.W, T1.H FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'keyboard' AND T1.X = 5 AND T1.Y = 647

What are the width and height of the bounding box of the object with " keyboard " as their object class and ( 5 , 647 ) as their coordinate ?

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


Question: What are the card layout of cards with keyword of flying?

SELECT layout FROM cards WHERE keywords = 'Flying'

What are the card layout of cards with keyword of flying ?

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


Question: What are the first names of all buyers and what products did they buy? List them in pairs.

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

What are the first names of all buyers and what products did they buy ? List them in pairs .

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


Question: For the set "Commander 2014 Oversized" , give its parent code.

SELECT parentCode FROM sets WHERE name = 'Commander 2014 Oversized'

For the set " Commander 2014 Oversized " , give its parent code .

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


Question: Find all the policy types that are used by more than 2 customers.

SELECT policy_type_code FROM policies GROUP BY policy_type_code HAVING count(*)  >  2

Find all the policy types that are used by more than 2 customers .

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


Question: How many orders have been shipped through United Package?

SELECT COUNT(T1.OrderID) FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T2.CompanyName = 'United Package'

How many orders have been shipped through United Package ?

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


Question: Which artist released singles between 1980 to 1982?

SELECT artist FROM torrents WHERE groupYear BETWEEN 1980 AND 1982 AND releaseType LIKE 'single'

Which artist released singles between 1980 to 1982 ?

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


Question: Tell the temperature range of the home weather station of store no.7 on 2014/4/28.

SELECT T1.tmax - T1.tmin AS temprange FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.store_nbr = 7 AND T1.`date` = '2014-04-28'

Tell the temperature range of the home weather station of store no.7 on 2014/4/28 .

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


Question: What are the lot details of lots associated with transactions with share count smaller than 50?

SELECT T1.lot_details FROM LOTS AS T1 JOIN TRANSACTIONS_LOTS AS T2 ON T1.lot_id  =  T2.transaction_id JOIN TRANSACTIONS AS T3 ON T2.transaction_id  =  T3.transaction_id WHERE T3.share_count  <  50

What are the lot details of lots associated with transactions with share count smaller than 50 ?

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


Question: List all the attribute classes of the images that have a (5,5) coordinate.

SELECT T1.ATT_CLASS FROM ATT_CLASSES AS T1 INNER JOIN IMG_OBJ_ATT AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID INNER JOIN IMG_OBJ AS T3 ON T2.IMG_ID = T3.IMG_ID WHERE T3.X = 5 AND T3.Y = 5

List all the attribute classes of the images that have a ( 5,5 ) coordinate .

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


Question: How much higher is the salary of Andrew Fuller than that of Nancy Davolio?

SELECT ( SELECT Salary FROM Employees WHERE LastName = 'Fuller' AND FirstName = 'Andrew' ) - ( SELECT Salary FROM Employees WHERE LastName = 'Davolio' AND FirstName = 'Nancy' ) AS RESULT

How much higher is the salary of Andrew Fuller than that of Nancy Davolio ?

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


Question: Among the flights with air carrier "Southwest Airlines Co.: WN", provide the tail number of flights with an actual elapsed time lower than the 80% of the average actual elapsed time of listed flights.

SELECT T2.TAIL_NUM FROM `Air Carriers` AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.OP_CARRIER_AIRLINE_ID WHERE T1.Description = 'Southwest Airlines Co.: WN' AND T2.ACTUAL_ELAPSED_TIME < ( SELECT AVG(ACTUAL_ELAPSED_TIME) * 0.8 FROM Airlines )

Among the flights with air carrier " Southwest Airlines Co. : WN " , provide the tail number of flights with an actual elapsed time lower than the 80 % of the average actual elapsed time of listed flights .

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


Question: Calculate the total cost spent for Parking in the list.

SELECT SUM(cost) FROM expense WHERE expense_description = 'Parking'

Calculate the total cost spent for Parking in the list .


Question: What are the names and ranks of players who have played the game with the title "Super Mario World"?

SELECT T3.Player_name ,  T3.rank_of_the_year FROM game AS T1 JOIN game_player AS T2 ON T1.Game_ID  =  T2.Game_ID JOIN player AS T3 ON T2.Player_ID  =  T3.Player_ID WHERE T1.Title  =  "Super Mario World"

What are the names and ranks of players who have played the game with the title " Super Mario World " ?

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


Question: Show the name and description of the role played by the employee named Ebba.

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

Show the name and description of the role played by the employee named Ebba .

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


Question: Find the name of the students and their department names sorted by their total credits in ascending order.

SELECT name ,  dept_name FROM student ORDER BY tot_cred

Find the name of the students and their department names sorted by their total credits in ascending order .

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


Question: Find the first names of students studying in room 108.

SELECT firstname FROM list WHERE classroom  =  108

Find the first names of students studying in room 108 .

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


Question: List the ID of all images with objects that have multiple relations.

SELECT IMG_ID FROM IMG_REL GROUP BY PRED_CLASS_ID HAVING COUNT(DISTINCT OBJ1_SAMPLE_ID) != 0 AND COUNT(DISTINCT OBJ2_SAMPLE_ID) != 0

List the ID of all images with objects that have multiple relations .


Question: What is the average year needed by a user with uber fans to become an elite user?

SELECT CAST(SUM(T2.year_id - T1.user_yelping_since_year) AS REAL) / COUNT(T1.user_id) FROM Users AS T1 INNER JOIN Elite AS T2 ON T1.user_id = T2.user_id WHERE T1.user_fans = 'Uber'

What is the average year needed by a user with uber fans to become an elite user ?

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


Question: What information do you have on colleges sorted by increasing enrollment numbers?

What information do you have on colleges sorted by increasing enrollment numbers ?


Question: How many people graduated from San Francisco State University in 2004?

SELECT sum(t1.graduate) FROM discipline_enrollments AS t1 JOIN campuses AS t2 ON t1.campus  =  t2.id WHERE t1.year  =  2004 AND t2.campus  =  "San Francisco State University"

How many people graduated from San Francisco State University in 2004 ?

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


Question: Show the delegates and the names of the party they belong to.

SELECT T1.Delegate ,  T2.Party FROM election AS T1 JOIN party AS T2 ON T1.Party  =  T2.Party_ID

Show the delegates and the names of the party they belong to .


Question: Which root beer got the most five stars in 2012? Give the brand name of this beer.

SELECT T3.BrandName FROM rootbeer AS T1 INNER JOIN rootbeerreview AS T2 ON T1.BrandID = T2.BrandID INNER JOIN rootbeerbrand AS T3 ON T1.BrandID = T3.BrandID WHERE T2.StarRating = 5 AND strftime('%Y', T2.ReviewDate) = '2012' GROUP BY T1.BrandID ORDER BY COUNT(T2.BrandID) DESC LIMIT 1

Which root beer got the most five stars in 2012 ? Give the brand name of this beer .

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


Question: What is The simpson 20s: Season 20 average awards winning rate?

SELECT CAST(SUM(CASE WHEN result = 'Winner' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(award) AS rate FROM Award;

What is The simpson 20s : Season 20 average awards winning rate ?

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


Question: Which marketing region has the most drama workshop groups? Give me the region code.

SELECT Marketing_Region_Code FROM Drama_Workshop_Groups GROUP BY Marketing_Region_Code ORDER BY count(*) DESC LIMIT 1

Which marketing region has the most drama workshop groups ? Give me the region code .

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


Question: What are the issue dates of volumes associated with the artist "Gorgoroth"?

SELECT T2.Issue_Date FROM artist AS T1 JOIN volume AS T2 ON T1.Artist_ID  =  T2.Artist_ID WHERE T1.Artist  =  "Gorgoroth"

What are the issue dates of volumes associated with the artist " Gorgoroth " ?

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


Question: Give the phone number of the customer with the highest account balance.

SELECT c_phone FROM customer ORDER BY c_acctbal DESC LIMIT 1

Give the phone number of the customer with the highest account balance .

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


Question: Please list the location of the genes that have the most chromosomes.

SELECT T2.Localization FROM Genes AS T1 INNER JOIN Classification AS T2 ON T1.GeneID = T2.GeneID ORDER BY T1.Chromosome DESC LIMIT 1

Please list the location of the genes that have the most chromosomes .

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


Question: List the first Name and last name of all players not from USA and who are born in 1990 .

SELECT firstName, lastName FROM Master WHERE birthYear = 1990 AND birthCountry != 'USA'

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


Question: What is the name of the customer whose order was delivered the longest?

SELECT T3.c_name FROM orders AS T1 INNER JOIN lineitem AS T2 ON T1.o_orderkey = T2.l_orderkey INNER JOIN customer AS T3 ON T1.o_custkey = T3.c_custkey ORDER BY (JULIANDAY(T2.l_receiptdate) - JULIANDAY(T2.l_commitdate)) DESC LIMIT 1

What is the name of the customer whose order was delivered the longest ?

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


Question: What are the borderless cards available without powerful foils?

SELECT id FROM cards WHERE borderColor = 'borderless' AND (cardKingdomId IS NULL OR cardKingdomId IS NULL)

What are the borderless cards available without powerful foils ?


Question: Please list the names of all the root beer brands that are advertised on facebook.

SELECT BrandName FROM rootbeerbrand WHERE FacebookPage IS NOT NULL

Please list the names of all the root beer brands that are advertised on facebook .

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


Question: What is the longest duration for a bike trip starting on a day with a fog in 2013?

SELECT MAX(T1.duration) FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE T2.date LIKE '%2013%' AND T2.events = 'Fog' AND T2.zip_code = 94107

What is the longest duration for a bike trip starting on a day with a fog in 2013 ?

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


Question: List by school id projects from schools located in the Union Pub School District I-9 that have a New York teaching fellow

SELECT schoolid FROM projects WHERE school_district = 'Union Pub School District I-9' AND teacher_ny_teaching_fellow = 't'

List by school i d projects from schools located in the Union Pub School District I-9 that have a New York teaching fellow

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


Question: What is the up vote number of the user that commented "R is also lazy evaluated."?

SELECT T2.UpVotes FROM comments AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T1.Text = 'R is also lazy evaluated.'

What is the up vote number of the user that commented " R is also lazy evaluated . " ?

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


Question: How many sweet bottled root beers that do not contain cane sugar were purchased in 2015 through the selling company located in Sac State American River Courtyard?

SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID INNER JOIN location AS T3 ON T1.LocationID = T3.LocationID WHERE T3.LocationName = 'Sac State American River Courtyard' AND T1.PurchaseDate LIKE '2015%' AND T2.Honey = 'TRUE' AND T2.CaneSugar = 'FALSE' AND T1.ContainerType = 'Bottle'

How many sweet bottled root beers that do not contain cane sugar were purchased in 2015 through the selling company located in Sac State American River Courtyard ?

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


Question: What are the names of all the playlists?

What are the names of all the playlists ?


Question: List the full name and age of the player when he won the "Finals MVP" in 2003.

SELECT T1.firstName, T1.middleName, T1.lastName , 2003 - strftime('%Y', T1.birthDate) FROM awards_players AS T2 JOIN players AS T1 ON T2.playerID = T1.playerID WHERE T2.award = 'Finals MVP' AND T2.year = 2003

List the full name and age of the player when he won the " Finals MVP " in 2003 .

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


Question: List the status shared by more than two roller coaster.

SELECT Status FROM roller_coaster GROUP BY Status HAVING COUNT(*)  >  2

List the status shared by more than two roller coaster .

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


Question: Among all the tweets posted from Buenos Aires, how many of them were posted on Thursdays?

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T2.City = 'Buenos Aires' AND T1.Weekday = 'Thursday'

Among all the tweets posted from Buenos Aires , how many of them were posted on Thursdays ?

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


Question: What are the attribute data types with more than 3 attribute definitions?

SELECT attribute_data_type FROM Attribute_Definitions GROUP BY attribute_data_type HAVING count(*)  >  3

What are the attribute data types with more than 3 attribute definitions ?

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


Question: In 2004, what are the names of the platforms where Codemasters publish its games?

SELECT T4.platform_name FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game_platform AS T3 ON T2.id = T3.game_publisher_id INNER JOIN platform AS T4 ON T3.platform_id = T4.id WHERE T3.release_year = 2004 AND T1.publisher_name = 'Codemasters'

In 2004 , what are the names of the platforms where Codemasters publish its games ?

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


Question: List all information regarding the basketball match.

List all information regarding the basketball match .


Question: Find the name of amenities Smith Hall dorm have.

SELECT T3.amenity_name FROM dorm AS T1 JOIN has_amenity AS T2 ON T1.dormid  =  T2.dormid JOIN dorm_amenity AS T3 ON T2.amenid  =  T3.amenid WHERE T1.dorm_name  =  'Smith Hall'

Find the name of amenities Smith Hall dorm have .

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


Question: What are the ids of all students who are not video game players?

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Plays_games

What are the ids of all students who are not video game players ?

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


Question: How many video games exist?


Question: How many gas companies are there?


Question: Which customer is associated with the latest policy?

SELECT t2.customer_details FROM policies AS t1 JOIN customers AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.start_date  =  (SELECT max(start_date) FROM policies)

Which customer is associated with the latest policy ?


Question: Find the average unit price of tracks from the Rock genre.

SELECT AVG(T2.UnitPrice) FROM GENRE AS T1 JOIN TRACK AS T2 ON T1.GenreId  =  T2.GenreId WHERE T1.Name  =  "Rock"

Find the average unit price of tracks from the Rock genre .

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


Question: What are all the order status and all the dates of orders?

SELECT order_status_code ,  date_order_placed FROM Orders

What are all the order status and all the dates of orders ?

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


Question: List down the phone numbers of employees who did Canvass inspection.

SELECT DISTINCT T1.phone FROM employee AS T1 INNER JOIN inspection AS T2 ON T1.employee_id = T2.employee_id WHERE T2.inspection_type = 'Canvass'

List down the phone numbers of employees who did Canvass inspection .

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


Question: For the goalie who had the most shutouts in 2010, what's his catching hand?

SELECT T1.shootCatch FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T2.year = 2010 GROUP BY T2.playerID ORDER BY SUM(T2.SHO) DESC LIMIT 1

For the goalie who had the most shutouts in 2010 , what 's his catching hand ?

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


Question: Indicate the title of the six books with the greatest potential value as collectibles.

SELECT title FROM book ORDER BY publication_date ASC LIMIT 6

Indicate the title of the six books with the greatest potential value as collectibles .

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


Question: Sum the total game sales in every region for platform ID 9658.

SELECT SUM(T.num_sales) * 100000 FROM region_sales AS T WHERE T.game_platform_id = 9658

Sum the total game sales in every region for platform ID 9658 .

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


Question: How many solution paths that needs to be compiled if user wants to implement it in "https://github.com/jeffdik/tachy.git"?

SELECT COUNT(T2.Path) FROM Repo AS T1 INNER JOIN Solution AS T2 ON T1.Id = T2.RepoId WHERE T1.Url = 'https://github.com/jeffdik/tachy.git' AND T2.WasCompiled = 0

How many solution paths that needs to be compiled if user wants to implement it in " https://github.com/jeffdik/tachy.git " ?

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


Question: What is the display name of the user who last edited the post "Examples for teaching: Correlation does not mean causation"?

SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.LastEditorUserId = T2.Id WHERE T1.Title = 'Examples for teaching: Correlation does not mean causation'

What is the display name of the user who last edited the post " Examples for teaching : Correlation does not mean causation " ?

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


Question: What are the ids of customers who have spent over 150 dollars in total?

SELECT T3.CustomerId FROM goods AS T1 JOIN items AS T2 ON T1.id  =  T2.item JOIN receipts AS T3 ON T2.receipt  =  T3.ReceiptNumber GROUP BY T3.CustomerId HAVING sum(T1.price)  >  150

What are the ids of customers who have spent over 150 dollars in total ?

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


Question: Which headphone classes have both headphones with "Bowls" and headphones with "Comfort Pads" earpads?

SELECT CLASS FROM headphone WHERE earpads  =  'Bowls' INTERSECT SELECT CLASS FROM headphone WHERE earpads  =  'Comfort Pads'

Which headphone classes have both headphones with " Bowls " and headphones with " Comfort Pads " earpads ?

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


Question: List down the full name of clients who have disputed the response from company.

SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T2.`Consumer disputed?` = 'Yes'

List down the full name of clients who have disputed the response from company .

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


Question: How many documents are there of each type?

SELECT document_type_code ,  count(*) FROM Documents GROUP BY document_type_code

How many documents are there of each type ?


Question: Count the number of climbers.


Question: How many universities have no less than 20,000 female students in 2016? Identify how many of the said universities are located in the United States of America.

SELECT COUNT(*) , SUM(CASE WHEN T3.country_name = 'United States of America' THEN 1 ELSE 0 END) AS nums_in_usa FROM university AS T1 INNER JOIN university_year AS T2 ON T1.id = T2.university_id INNER JOIN country AS T3 ON T3.id = T1.country_id WHERE T2.year = 2016 AND T2.num_students * T2.pct_female_students / 100 > 20000

How many universities have no less than 20,000 female students in 2016 ? Identify how many of the said universities are located in the United States of America .

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


Question: What are the names of the publishers who published the oldest games?

SELECT DISTINCT T3.publisher_name FROM game_platform AS T1 INNER JOIN game_publisher AS T2 ON T1.game_publisher_id = T2.id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id ORDER BY T1.release_year LIMIT 1

What are the names of the publishers who published the oldest games ?


Question: Which customers have experienced status "Stuck" and service and channel detail "bad" in  an interaction? Give me the customer details.

SELECT t1.customer_details FROM customers AS t1 JOIN customer_interactions AS t2 ON t1.customer_id  =  t2.customer_id WHERE t2.status_code  =  "Stuck" AND services_and_channels_details  =  "bad"

Which customers have experienced status " Stuck " and service and channel detail " bad " in an interaction ? Give me the customer details .

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


Question: For the tweet which got a reach number of 547851, which country did it come from?

SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID WHERE T1.Reach = 547851

For the tweet which got a reach number of 547851 , which country did it come from ?

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


Question: What is the total number and conference's homepage of papers held in a conference with an ID of 187 during 1990 to 2000?

SELECT COUNT(T2.ConferenceId), T1.HomePage FROM Conference AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.ConferenceId WHERE T2.Year BETWEEN 1990 AND 2000 AND T2.ConferenceId = 187

What is the total number and conference 's homepage of papers held in a conference with an ID of 187 during 1990 to 2000 ?

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


Question: How many actors starred in the film id 508?

SELECT COUNT(actor_id) FROM film_actor WHERE film_id = 508

How many actors starred in the film i d 508 ?

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


Question: List the dates of the exams with subject code containing the word "data", in descending order of dates.

SELECT Exam_Date FROM Exams WHERE Subject_Code LIKE '%data%' ORDER BY Exam_Date DESC

List the dates of the exams with subject code containing the word " data " , in descending order of dates .

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


Question: List the writers of the books in ascending alphabetical order.

SELECT Writer FROM book ORDER BY Writer ASC

List the writers of the books in ascending alphabetical order .


Question: Provide the zip codes and CBSA officers of the postal point in Oxford.

SELECT T2.zip_code, T1.CBSA_name FROM CBSA AS T1 INNER JOIN zip_data AS T2 ON T1.CBSA = T2.CBSA WHERE T2.city = 'Oxford'

Provide the zip codes and CBSA officers of the postal point in Oxford .

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


Question: Calculate the total amount spent on speaker gifts and list the name of the event they were spent on.

SELECT SUM(T1.spent), T2.event_name FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Speaker Gifts' GROUP BY T2.event_name

Calculate the total amount spent on speaker gifts and list the name of the event they were spent on .

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


Question: How many clubs use each manufacturer?

SELECT Manufacturer ,  COUNT(*) FROM club GROUP BY Manufacturer


Question: Show all majors.


Question: What is the name of the most expensive car?

SELECT T1.car_name FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID ORDER BY T2.price DESC LIMIT 1

What is the name of the most expensive car ?


Question: How many years were there after Don Waddell retired and became a coach in NHL?

SELECT MAX(T2.year) - MIN(T2.year) FROM Master AS T1 INNER JOIN Coaches AS T2 ON T1.coachID = T2.coachID WHERE T1.firstName = 'Don' AND T1.lastName = 'Waddell'

How many years were there after Don Waddell retired and became a coach in NHL ?

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


Question: How many countries belong to the Algeria region?

SELECT COUNT(T1.r_name) FROM region AS T1 INNER JOIN nation AS T2 ON T1.r_regionkey = T2.n_regionkey WHERE T2.n_name = 'ALGERIA'

How many countries belong to the Algeria region ?