Question: Which papers' first author is affiliated with an institution in the country "Japan" and has last name "Ohori"? Give me the titles of the papers.

SELECT t3.title FROM authors AS t1 JOIN authorship AS t2 ON t1.authid  =  t2.authid JOIN papers AS t3 ON t2.paperid  =  t3.paperid JOIN inst AS t4 ON t2.instid  =  t4.instid WHERE t4.country  =  "Japan" AND t2.authorder  =  1 AND t1.lname  =  "Ohori"

Which papers ' first author is affiliated with an institution in the country " Japan " and has last name " Ohori " ? Give me the titles of the papers .

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


Question: Which film has the longest duration of film screening? Please give its title.

SELECT title FROM film ORDER BY length DESC LIMIT 1

Which film has the longest duration of film screening ? Please give its title .

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


Question: What genre is the game 2010 FIFA World Cup South Africa?

SELECT T2.genre_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2010 FIFA World Cup South Africa'

What genre is the game 2010 FIFA World Cup South Africa ?

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


Question: Please provide full name of any two countries using special trade system.

SELECT LongName FROM Country WHERE SystemOfTrade = 'Special trade system' LIMIT 2

Please provide full name of any two countries using special trade system .

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


Question: Show names of shops that have more than one kind of device in stock.

SELECT T2.Shop_Name FROM stock AS T1 JOIN shop AS T2 ON T1.Shop_ID  =  T2.Shop_ID GROUP BY T1.Shop_ID HAVING COUNT(*)  >  1

Show names of shops that have more than one kind of device in stock .

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


Question: How many students have been absent above 2 months?

SELECT COUNT(name) FROM longest_absense_from_school WHERE month > 2

How many students have been absent above 2 months ?


Question: How much is the salary of the employee who has the highest number of inspections done of all time?

SELECT T1.salary FROM employee AS T1 INNER JOIN ( SELECT employee_id, COUNT(inspection_id) FROM inspection GROUP BY employee_id ORDER BY COUNT(inspection_id) DESC LIMIT 1 ) AS T2 ON T1.employee_id = T2.employee_id

How much is the salary of the employee who has the highest number of inspections done of all time ?

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


Question: Find the first name and office of history professor who did not get a Ph.D. degree.

SELECT T2.emp_fname ,  T1.prof_office FROM professor AS T1 JOIN employee AS T2 ON T1.emp_num  =  T2.emp_num JOIN department AS T3 ON T1.dept_code  =  T3.dept_code WHERE T3.dept_name  =  'History' AND T1.prof_high_degree != 'Ph.D.'

Find the first name and office of history professor who did not get a Ph.D. degree .

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


Question: find the name of driver who is driving the school bus with the longest working history.

SELECT t1.name FROM driver AS t1 JOIN school_bus AS t2 ON t1.driver_id  =  t2.driver_id ORDER BY years_working DESC LIMIT 1

find the name of driver who is driving the school bus with the longest working history .

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


Question: Calculate the total number of male tweet IDs.

SELECT COUNT(T1.TweetID) FROM twitter AS T1 INNER JOIN user AS T2 ON T1.UserID = T2.UserID WHERE T2.Gender = 'Male'

Calculate the total number of male tweet IDs .


Question: Show the names of employees that work for companies with sales bigger than 200.

SELECT T2.Name FROM employment AS T1 JOIN people AS T2 ON T1.People_ID  =  T2.People_ID JOIN company AS T3 ON T1.Company_ID  =  T3.Company_ID WHERE T3.Sales_in_Billion  >  200

Show the names of employees that work for companies with sales bigger than 200 .

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


Question: How many people in Montenegro speaks Serbian?

SELECT T1.Percentage * T2.Population FROM language AS T1 INNER JOIN country AS T2 ON T1.Country = T2.Code WHERE T1.Name = 'Serbian' AND T2.Name = 'Montenegro'

How many people in Montenegro speaks Serbian ?

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


Question: Find the average room count of the apartments that have the "Studio" type code.

SELECT avg(room_count) FROM Apartments WHERE apt_type_code  =  "Studio"

Find the average room count of the apartments that have the " Studio " type code .

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


Question: Find the total quantity of headphones stored in the Woodman store.

SELECT sum(t2.quantity) FROM store AS t1 JOIN stock AS t2 ON t1.store_id  =  t2.store_id WHERE t1.name  =  'Woodman'

Find the total quantity of headphones stored in the Woodman store .

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


Question: Show the location code of the country "Canada".

SELECT location_code FROM Ref_locations WHERE location_name  =  "Canada"

Show the location code of the country " Canada " .

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


Question: What is the educational level name for the schools with Breakfast Provision 2 in county code 37? Indicate the name of the school.

SELECT T2.EILName, T2.School FROM frpm AS T1 INNER JOIN schools AS T2 ON T1.CDSCode = T2.CDSCode WHERE T1.`NSLP Provision Status` = 'Breakfast Provision 2' AND T1.`County Code` = 37

What is the educational level name for the schools with Breakfast Provision 2 in county code 37 ? Indicate the name of the school .

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


Question: What are the provinces that have not only institutions founded before 1920, but also institutions founded after 1950?

SELECT Province FROM institution WHERE Founded  <  1920 INTERSECT SELECT Province FROM institution WHERE Founded  >  1950

What are the provinces that have not only institutions founded before 1920 , but also institutions founded after 1950 ?

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


Question: Return the names of langauges that contain the substring "ish".

SELECT name FROM languages WHERE name LIKE "%ish%"

Return the names of langauges that contain the substring " ish " .

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


Question: What is the name of the room that can accommodate the most people?

SELECT roomName FROM Rooms ORDER BY maxOccupancy DESC LIMIT 1;

What is the name of the room that can accommodate the most people ?


Question: In Shakespeare's works between 1600 to 1610, how many of these have a character as a "Third Servingman"?

SELECT COUNT(DISTINCT T2.work_id) 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 INNER JOIN characters AS T4 ON T3.character_id = T4.id WHERE T1.DATE BETWEEN 1600 AND 1610 AND T4.CharName = 'Third Servingman'

In Shakespeare 's works between 1600 to 1610 , how many of these have a character as a " Third Servingman " ?

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


Question: Is the phone number "114-555-0100" a work number or a home number?

SELECT T2.Name FROM PersonPhone AS T1 INNER JOIN PhoneNumberType AS T2 ON T1.PhoneNumberTypeID = T2.PhoneNumberTypeID WHERE T1.PhoneNumber = '114-555-0100'

Is the phone number " 114 - 555 - 0100 " a work number or a home number ?

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


Question: What are the coordinates of the school with the project "Wiping Away Bad Grades"?

SELECT T1.school_longitude, T1.school_latitude FROM projects AS T1 INNER JOIN essays AS T2 ON T1.projectid = T2.projectid WHERE T2.title LIKE 'Wiping Away Bad Grades'

What are the coordinates of the school with the project " Wiping Away Bad Grades " ?

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


Question: How many customers are from the place with the highest average income per month?

SELECT COUNT(T1.ID) FROM Customers AS T1 INNER JOIN Demog AS T2 ON T1.GEOID = T2.GEOID ORDER BY T2.INCOME_K DESC LIMIT 1

How many customers are from the place with the highest average income per month ?

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


Question: Show the membership level with most number of members.

SELECT LEVEL FROM member GROUP BY LEVEL ORDER BY count(*) DESC LIMIT 1

Show the membership level with most number of members .


Question: How many patients with a normal Ig A level came to the hospital after 1990/1/1?

SELECT COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.IGA BETWEEN 80 AND 500 AND  strftime('%Y',  T1.`First Date`) > '1990'

How many patients with a normal Ig A level came to the hospital after 1990/1/1 ?

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


Question: Find the name of department that offers the class whose description has the word "Statistics".

SELECT T2.dept_name FROM course AS T1 JOIN department AS T2 ON T1.dept_code  =  T2.dept_code WHERE T1.crs_description LIKE '%Statistics%'

Find the name of department that offers the class whose description has the word " Statistics " .

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


Question: Show the official names of the cities that have hosted more than one competition.

SELECT T1.Official_Name FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID  =  T2.Host_city_ID GROUP BY T2.Host_city_ID HAVING COUNT(*)  >  1

Show the official names of the cities that have hosted more than one competition .

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


Question: Show the minimum, maximum, and average age for all people.

SELECT min(age) ,  max(age) ,  avg(age) FROM people

Show the minimum , maximum , and average age for all people .


Question: Find the ship type that are used by both ships with Panama and Malta flags.

SELECT TYPE FROM ship WHERE flag  =  'Panama' INTERSECT SELECT TYPE FROM ship WHERE flag  =  'Malta'

Find the ship type that are used by both ships with Panama and Malta flags .

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


Question: Find all the catalog publishers whose name contains "Murray"

SELECT distinct(catalog_publisher) FROM catalogs WHERE catalog_publisher LIKE "%Murray%"

Find all the catalog publishers whose name contains " Murray "

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


Question: List the name of each franchise and the number of games belonging to that franchise.

SELECT Franchise ,  COUNT(*) FROM game GROUP BY Franchise

List the name of each franchise and the number of games belonging to that franchise .

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


Question: For all the goalies born in year 1987, who are good in both right hand and left hand? Calculate his percentage of winning for every season he played.

SELECT T1.firstName, T1.lastName, T2.year, CAST(T2.W AS REAL) / T2.GP FROM Master AS T1 INNER JOIN Goalies AS T2 ON T1.playerID = T2.playerID WHERE T1.birthYear = 1987 AND T1.shootCatch IS NULL

For all the goalies born in year 1987 , who are good in both right hand and left hand ? Calculate his percentage of winning for every season he played .

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


Question: Find the distinct ages of students who have secretary votes in the fall election cycle.

SELECT DISTINCT T1.Age FROM STUDENT AS T1 JOIN VOTING_RECORD AS T2 ON T1.StuID  =  T2.Secretary_Vote WHERE T2.Election_Cycle  =  "Fall"

Find the distinct ages of students who have secretary votes in the fall election cycle .

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


Question: What are the employee ids for employees who have held two or more jobs?

SELECT employee_id FROM job_history GROUP BY employee_id HAVING COUNT(*)  >= 2

What are the employee ids for employees who have held two or more jobs ?

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


Question: What is the average monthly number of links created in 2010 for posts that have no more than 2 answers?

SELECT CAST(COUNT(T1.Id) AS REAL) / 12 FROM postLinks AS T1 INNER JOIN posts AS T2 ON T1.PostId = T2.Id WHERE T2.AnswerCount <= 2 AND STRFTIME('%Y', T1.CreationDate) = '2010'

What is the average monthly number of links created in 2010 for posts that have no more than 2 answers ?

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


Question: What is the care plan, procedure, medication and the patient's full name for encounter 6f2e3935-b203-493e-a9c0-f23e847b9798?

SELECT DISTINCT T3.DESCRIPTION, T4.DESCRIPTION, T5.DESCRIPTION, T1.first, T1.last FROM patients AS T1 INNER JOIN encounters AS T2 ON T1.patient = T2.PATIENT INNER JOIN careplans AS T3 ON T1.patient = T3.PATIENT INNER JOIN procedures AS T4 ON T1.patient = T4.PATIENT INNER JOIN medications AS T5 ON T1.patient = T5.PATIENT WHERE T2.ID = '6f2e3935-b203-493e-a9c0-f23e847b9798'

What is the care plan , procedure , medication and the patient 's full name for encounter 6f2e3935 - b203 - 493e - a9c0 - f23e847b9798 ?

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


Question: Find names of colleges with enrollment greater than that of some (at least one) college in the FL state.

SELECT DISTINCT cName FROM college WHERE enr  >  (SELECT min(enr) FROM college WHERE state  =  'FL')

Find names of colleges with enrollment greater than that of some ( at least one ) college in the FL state .

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


Question: In which nation is Harvard University located?

SELECT T2.country_name FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T1.university_name = 'Harvard University'

In which nation is Harvard University located ?


Question: Who is the instructor with the highest salary?

SELECT name FROM instructor ORDER BY salary DESC LIMIT 1

Who is the instructor with the highest salary ?


Question: Which word has the most appearances in the Wikipedia page with the title of "Agricultura"? Give the word ID.

SELECT T2.wid FROM pages AS T1 INNER JOIN pages_words AS T2 ON T1.pid = T2.pid WHERE T1.title = 'Agricultura' ORDER BY T2.occurrences DESC LIMIT 1

Which word has the most appearances in the Wikipedia page with the title of " Agricultura " ? Give the word ID .

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


Question: Find the first name and gender of the student who has allergy to milk but not cat.

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

Find the first name and gender of the student who has allergy to milk but not cat .

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


Question: What is the name of the root beer brand that has the longest history?

SELECT BrandName FROM rootbeerbrand WHERE FirstBrewedYear = ( SELECT MIN(FirstBrewedYear) FROM rootbeerbrand )

What is the name of the root beer brand that has the longest history ?

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


Question: What is the ratio number of territories in Northern region and number territories in Western region?

SELECT CAST(( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Northern' ) AS REAL) * 100 / ( SELECT COUNT(T1.TerritoryID) FROM Territories AS T1 INNER JOIN Region AS T2 ON T1.RegionID = T2.RegionID WHERE T2.RegionDescription = 'Westerns' ) AS Calu

What is the ratio number of territories in Northern region and number territories in Western region ?

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


Question: Sort all the industries in descending order of the count of companies in each industry

SELECT Industry FROM Companies GROUP BY Industry ORDER BY COUNT(*) DESC

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


Question: How many menus were used in Dutcher House?

SELECT COUNT(*) FROM Menu WHERE location = 'Dutcher House'

How many menus were used in Dutcher House ?


Question: What is the MPAA rating and title of the movie starred by Leonardo DiCaprio with highest budget?

SELECT T1.`MPAA Rating`, T1.Title FROM movie AS T1 INNER JOIN characters AS T2 ON T1.MovieID = T2.MovieID INNER JOIN actor AS T3 ON T3.ActorID = T2.ActorID WHERE T3.Name = 'Leonardo DiCaprio' ORDER BY T1.Budget DESC LIMIT 1

What is the MPAA rating and title of the movie starred by Leonardo DiCaprio with highest budget ?

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


Question: Which students take 2 courses? List student id and details.

SELECT T1.student_id ,  T1.student_details FROM Students AS T1 JOIN Classes AS T2 ON T1.student_id  =  T2.student_id GROUP BY T1.student_id HAVING count(*)  =  2

Which students take 2 courses ? List student i d and details .

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


Question: Name all salaried employee who are hired in 2007 and later.

SELECT T1.FirstName, T1.LastName FROM Person AS T1 INNER JOIN Employee AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID WHERE STRFTIME('%Y', T2.HireDate) >= '2007' AND T2.SalariedFlag = 1

Name all salaried employee who are hired in 2007 and later .

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


Question: How many invoices are there for each client id?

SELECT client_id ,  count(*) FROM Invoices GROUP BY client_id

How many invoices are there for each client i d ?

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


Question: What is the type of store located in the city with the highest amount of water area?

SELECT CASE WHEN MAX(`Water Area`) THEN Type END FROM `Store Locations`

What is the type of store located in the city with the highest amount of water area ?

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


Question: Give the full name and capability of students who failed in any courses.

SELECT T2.f_name, T2.l_name, T1.capability FROM RA AS T1 INNER JOIN student AS T2 ON T2.student_id = T1.student_id INNER JOIN registration AS T3 ON T2.student_id = T3.student_id WHERE T3.grade IS NULL OR T3.grade = ''

Give the full name and capability of students who failed in any courses .

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


Question: What are the names of the movies which Laura Brody starred in?

SELECT T3.title FROM actor AS T1 INNER JOIN film_actor AS T2 ON T1.actor_id = T2.actor_id INNER JOIN film AS T3 ON T2.film_id = T3.film_id WHERE T1.first_name = 'Laura' AND T1.last_name = 'Brody'

What are the names of the movies which Laura Brody starred in ?


Question: Among the listed winery, what is the street number of the winery named "Tulocay Winery"?

SELECT T1.street_num FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T2.label = 'Tulocay winery' AND T2.food_type = 'winery'

Among the listed winery , what is the street number of the winery named " Tulocay Winery " ?

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


Question: What is the average number of badges obtained by a user with over 200 views?

SELECT CAST(COUNT(T1.Id) AS REAL) / COUNT(DISTINCT T2.DisplayName) FROM badges AS T1 INNER JOIN users AS T2 ON T1.UserId = T2.Id WHERE T2.Views > 200

What is the average number of badges obtained by a user with over 200 views ?

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


Question: What's the code for the set which was released on 2017/7/14?

SELECT code FROM sets WHERE releaseDate = '2017-07-14' GROUP BY releaseDate, code

What 's the code for the set which was released on 2017/7/14 ?

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


Question: List the categories for which Bonita Pietila was given credit and her role in creating the episodes.

SELECT DISTINCT category, role FROM Credit WHERE person = 'Bonita Pietila';

List the categories for which Bonita Pietila was given credit and her role in creating the episodes .

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


Question: Give me the name of the customer who ordered the most items in total.

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

Give me the name of the customer who ordered the most items in total .

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


Question: What is all the information about all people?

What is all the information about all people ?


Question: How many gold medals does Henk Jan Zwolle have?

SELECT COUNT(T1.id) FROM person AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.person_id INNER JOIN competitor_event AS T3 ON T2.id = T3.competitor_id INNER JOIN medal AS T4 ON T3.medal_id = T4.id WHERE T1.full_name = 'Henk Jan Zwolle' AND T4.medal_name = 'Gold'

How many gold medals does Henk Jan Zwolle have ?

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


Question: What are the ids and details of all accounts?

SELECT account_id ,  account_details FROM Accounts

What are the ids and details of all accounts ?


Question: How much more pounds in total were transported to New York than to Chicago?

SELECT SUM(CASE WHEN T2.city_name = 'New York' THEN T1.weight ELSE 0 END) - SUM(CASE WHEN T2.city_name = 'Chicago' THEN T1.weight ELSE 0 END) FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id

How much more pounds in total were transported to New York than to Chicago ?

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


Question: Return the average, maximum, and total revenues across all manufacturers.

SELECT avg(revenue) ,  max(revenue) ,  sum(revenue) FROM manufacturers

Return the average , maximum , and total revenues across all manufacturers .


Question: State code numbers of top 3 yougest drivers. How many Netherlandic drivers among them?

SELECT COUNT(*) FROM ( SELECT T1.nationality FROM drivers AS T1 ORDER BY JULIANDAY(T1.dob) DESC LIMIT 3) AS T3 WHERE T3.nationality = 'Dutch'

State code numbers of top 3 yougest drivers . How many Netherlandic drivers among them ?


Question: Find all locations of planes sorted by the plane name.

SELECT LOCATION FROM hangar ORDER BY plane_name

Find all locations of planes sorted by the plane name .

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


Question: How many current legislators chose Republican as their political party?

SELECT COUNT(*) FROM `current-terms` WHERE party = 'Republican'

How many current legislators chose Republican as their political party ?

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


Question: Please list the departments the students are absent from school for 9 months are in.

SELECT T2.organ FROM longest_absense_from_school AS T1 INNER JOIN enlist AS T2 ON T1.`name` = T2.`name` WHERE T1.`month` = 9

Please list the departments the students are absent from school for 9 months are in .

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


Question: What are the titles of all movies that have rating star is between 3 and 5?

SELECT T2.title FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T1.stars BETWEEN 3 AND 5

What are the titles of all movies that have rating star is between 3 and 5 ?

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


Question: find the rank, company names, market values of the companies in the banking industry order by their sales and profits in billion.

SELECT rank ,  company ,  market_value FROM company WHERE main_industry  =  'Banking' ORDER BY sales_billion ,  profits_billion

find the rank , company names , market values of the companies in the banking industry order by their sales and profits in billion .

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


Question: In the female customers, how many bought root beer that contains artificial sweetener?

SELECT COUNT(T1.CustomerID) FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID INNER JOIN rootbeer AS T3 ON T2.RootBeerID = T3.RootBeerID INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T1.Gender = 'F' AND T4.ArtificialSweetener = 'TRUE'

In the female customers , how many bought root beer that contains artificial sweetener ?

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


Question: How many venues are located at Centurion, South Africa?

SELECT COUNT(T1.Venue_name) FROM Venue 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 WHERE T3.country_name = 'South Africa' AND T2.city_name = 'Centurion'

How many venues are located at Centurion , South Africa ?

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


Question: Show the names of phones that are on market with number of shops greater than 50.

SELECT T3.Name FROM phone_market AS T1 JOIN market AS T2 ON T1.Market_ID  =  T2.Market_ID JOIN phone AS T3 ON T1.Phone_ID  =  T3.Phone_ID WHERE T2.Num_of_shops  >  50

Show the names of phones that are on market with number of shops greater than 50 .

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


Question: What are the details of the car with id 1?

SELECT vehicle_details FROM Vehicles WHERE vehicle_id = 1;

What are the details of the car with i d 1 ?

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


Question: What are the names of reviewers who had rated 3 star and 4 star?

SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  3 INTERSECT SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID WHERE T1.stars  =  4

What are the names of reviewers who had rated 3 star and 4 star ?

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


Question: List out years that only have summer games.

SELECT games_year FROM games WHERE season != 'Winter' GROUP BY games_year HAVING COUNT(season) = 1

List out years that only have summer games .


Question: List all shipment id under Phillip J. Fry's management.

SELECT T1.ShipmentID FROM Shipment AS T1 JOIN Employee AS T2 ON T1.Manager = T2.EmployeeID WHERE T2.Name = "Phillip J. Fry";

List all shipment i d under Phillip J. Fry 's management .

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


Question: Count the number of entrepreneurs.


Question: What is the total price charged for orders shipped by air without shipping instructions?

SELECT l_extendedprice * (1 - l_discount) * (1 + l_tax) AS totalprice FROM lineitem WHERE l_shipmode = 'AIR' AND l_shipinstruct = 'NONE'

What is the total price charged for orders shipped by air without shipping instructions ?

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


Question: Find the names of papers which are published in the year 1996.

SELECT Title FROM Paper WHERE year = 1996

Find the names of papers which are published in the year 1996 .

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


Question: List the client ids and the number of meeting for each client.

SELECT client_id ,  count(*) FROM Meetings GROUP BY client_id

List the client ids and the number of meeting for each client .

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


Question: Among the universities with over 20000 students in 2011, how many of them have an international students percentage of over 25% in the same year?

SELECT COUNT(*) FROM university_year WHERE year = 2011 AND pct_international_students > 25 AND num_students > 20000

Among the universities with over 20000 students in 2011 , how many of them have an international students percentage of over 25 % in the same year ?

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


Question: What is the ratio of male and female among the age of teenager when the education is above 10?

SELECT CAST(SUM(CASE WHEN SEX = 'Male' THEN 1 ELSE 0 END) AS REAL) / SUM(CASE WHEN SEX = 'Female' THEN 1 ELSE 0 END) FROM Customers WHERE age BETWEEN 13 AND 19 AND EDUCATIONNUM > 10

What is the ratio of male and female among the age of teenager when the education is above 10 ?

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


Question: Which category has the most reviews?

SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id GROUP BY T1.category ORDER BY COUNT(T2.podcast_id) DESC LIMIT 1


Question: Which year has the most number of races?

SELECT year FROM races GROUP BY year ORDER BY COUNT(round) DESC LIMIT 1

Which year has the most number of races ?


Question: Who is the sales representitive of Muscle Machine Inc? Please give the employee's full name.

SELECT t2.firstName, t2.lastName FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Muscle Machine Inc'

Who is the sales representitive of Muscle Machine Inc ? Please give the employee 's full name .

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


Question: Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent.

SELECT T2.Name FROM Locations AS T1 JOIN Tourist_Attractions AS T2 ON T1.Location_ID  =  T2.Location_ID WHERE T1.Address  =  "660 Shea Crescent" OR T2.How_to_Get_There  =  "walk"

Find the names of the tourist attractions that is either accessible by walk or at address 660 Shea Crescent .

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


Question: List all of the two-star reviews and their categories.

SELECT T1.category FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.rating = 2

List all of the two - star reviews and their categories .


Question: What are the starting years shared by the technicians from the team "CLE" or "CWS"?

SELECT Starting_Year FROM technician WHERE Team  =  "CLE" INTERSECT SELECT Starting_Year FROM technician WHERE Team  =  "CWS"

What are the starting years shared by the technicians from the team " CLE " or " CWS " ?

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


Question: In Season 20 Episode 11, how many times was Doofus included in the credit list?

SELECT COUNT(*) FROM Person AS T1 INNER JOIN Credit AS T2 ON T1.name = T2.person WHERE T1.nickname = 'Doofus' AND T2.credited = 'true' AND T2.episode_id = 'S20-E11';

In Season 20 Episode 11 , how many times was Doofus included in the credit list ?

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


Question: Among the USA employess, how many of them has PhD title of courtesy?

SELECT COUNT(Country) FROM Employees WHERE TitleOfCourtesy = 'Dr.' AND Country = 'USA'

Among the USA employess , how many of them has PhD title of courtesy ?

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


Question: How many customers who choose statement of weekly issuance are Owner?

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

How many customers who choose statement of weekly issuance are Owner ?


Question: How many different card types are there?

SELECT count(DISTINCT card_type_code) FROM Customers_Cards

How many different card types are there ?


Question: Which store in Arizona has the most net profit?

SELECT T2.StoreID FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID WHERE T2.State = 'Arizona' ORDER BY T1.`Unit Price` - T1.`Unit Cost` DESC LIMIT 1

Which store in Arizona has the most net profit ?

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


Question: Which country are the majority of the suppliers located?

SELECT Country FROM Suppliers GROUP BY Country ORDER BY COUNT(SupplierID) DESC LIMIT 1

Which country are the majority of the suppliers located ?


Question: Who is the villain in the movie "The Great Mouse Detective"?

SELECT villian FROM characters WHERE movie_title = 'The Great Mouse Detective'

Who is the villain in the movie " The Great Mouse Detective " ?

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


Question: Among the cars with an acceleration of over 10 miles per squared hour, how many of them cost more than $20000 and less than $30000?

SELECT COUNT(*) FROM data AS T1 INNER JOIN price AS T2 ON T1.ID = T2.ID WHERE T1.acceleration > 10 AND T2.price BETWEEN 20000 AND 30000

Among the cars with an acceleration of over 10 miles per squared hour , how many of them cost more than $ 20000 and less than $ 30000 ?

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


Question: Find the number of students who have the word "son" in their personal names.

SELECT COUNT(*) FROM Students WHERE personal_name LIKE "%son%"

Find the number of students who have the word " son " in their personal names .

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


Question: What is the name of the publisher that released the most video games in 2007?

SELECT 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 WHERE T1.release_year = 2007 GROUP BY T3.publisher_name ORDER BY COUNT(DISTINCT T2.game_id) DESC LIMIT 1

What is the name of the publisher that released the most video games in 2007 ?

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


Question: List down the names of the games in the racing genre.

SELECT T1.game_name FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T2.genre_name = 'Racing'

List down the names of the games in the racing genre .

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


Question: Find distinct cities of addresses of people?

SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id

Find distinct cities of addresses of people ?


Question: Which country is the oldest player from?

SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T2.Country_Name = T1.Country_Id WHERE T2.Country_Name IS NOT NULL ORDER BY T2.DOB LIMIT 1

Which country is the oldest player from ?


Question: Show all the information about election.

Show all the information about election .


Question: Show the studios that have not produced films with director "Walter Hill".

SELECT Studio FROM film EXCEPT SELECT Studio FROM film WHERE Director  =  "Walter Hill"

Show the studios that have not produced films with director " Walter Hill " .

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


Question: How many user ids from 1 to 20 have no fan users and have low ratings?

SELECT COUNT(user_id) FROM Users WHERE user_id BETWEEN 1 AND 20 AND user_fans LIKE 'None' AND user_review_count LIKE 'Low'

How many user ids from 1 to 20 have no fan users and have low ratings ?

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


Question: Which company published the game with the most sales in North America?

SELECT T.publisher_name FROM ( SELECT T5.publisher_name, SUM(T2.num_sales) * 100000 FROM region AS T1 INNER JOIN region_sales AS T2 ON T1.id = T2.region_id INNER JOIN game_platform AS T3 ON T2.game_platform_id = T3.id INNER JOIN game_publisher AS T4 ON T3.game_publisher_id = T4.id INNER JOIN publisher AS T5 ON T4.publisher_id = T5.id WHERE T1.region_name = 'North America' GROUP BY T5.publisher_name ORDER BY SUM(T2.num_sales) * 100000 DESC LIMIT 1 ) t

Which company published the game with the most sales in North America ?

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


Question: What is employee Nancy Edwards's phone number?

SELECT phone FROM employees WHERE first_name = "Nancy" AND last_name = "Edwards";

What is employee Nancy Edwards 's phone number ?

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


Question: State the last name and job title of owner for document "Crank Arm and Tire Maintenance".

SELECT T1.LastName, T3.JobTitle FROM Person AS T1 INNER JOIN Document AS T2 ON T1.BusinessEntityID = T2.Owner INNER JOIN Employee AS T3 ON T1.BusinessEntityID = T3.BusinessEntityID WHERE T2.Title = 'Crank Arm and Tire Maintenance'

State the last name and job title of owner for document " Crank Arm and Tire Maintenance " .

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


Question: Show the customer id and number of accounts with most accounts.

SELECT customer_id ,  count(*) FROM Accounts GROUP BY customer_id ORDER BY count(*) DESC LIMIT 1

Show the customer i d and number of accounts with most accounts .

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


Question: Which business had the lowest score for the unscheduled routine inspection on 2016/9/26? Give the name of the business.

SELECT T2.name FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE score = ( SELECT MIN(score) FROM inspections WHERE `date` = '2016-09-26' AND type = 'Routine - Unscheduled' ) AND T1.`date` = '2016-09-26' AND T1.type = 'Routine - Unscheduled'

Which business had the lowest score for the unscheduled routine inspection on 2016/9/26 ? Give the name of the business .

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


Question: What is the name of the publisher with publisher ID 22?

SELECT publisher_name FROM publisher WHERE publisher_id = 22

What is the name of the publisher with publisher ID 22 ?

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


Question: How many hosts does each nationality have? List the nationality and the count.

SELECT Nationality ,  COUNT(*) FROM HOST GROUP BY Nationality

How many hosts does each nationality have ? List the nationality and the count .

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


Question: What is the description for the results whose project detail is 'sint'?

SELECT T1.outcome_description FROM Research_outcomes AS T1 JOIN Project_outcomes AS T2 ON T1.outcome_code  =  T2.outcome_code JOIN Projects AS T3 ON T2.project_id  =  T3.project_id WHERE T3.project_details  =  'sint'

What is the description for the results whose project detail is ' sint ' ?

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


Question: Which female students had never been absent?

SELECT T2.name FROM male AS T1 INNER JOIN longest_absense_from_school AS T2 ON T1.name <> T2.name WHERE T2.month = 0

Which female students had never been absent ?


Question: What is contact Type ID No.16 represent for?

SELECT Name FROM ContactType WHERE ContactTypeID = '16'

What is contact Type ID No.16 represent for ?


Question: Tweet with ID tw-682723090279841798 was posted from which country?

SELECT T2.Country FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID WHERE T1.TweetID = 'tw-682723090279841798'

Tweet with ID tw-682723090279841798 was posted from which country ?


Question: What are the names and ids of documents that have the type code BK?

SELECT document_name ,  document_id FROM Documents WHERE document_type_code  =  "BK"

What are the names and ids of documents that have the type code BK ?

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


Question: How many students have a food allergy?

SELECT count(*) FROM Has_allergy AS T1 JOIN Allergy_type AS T2 ON T1.allergy  =  T2.allergy WHERE T2.allergytype  =  "food"


Question: What is the percentage of American coaches among all the coaches who taught the Montreal Canadiens?

SELECT SUM(CAST(T2.W AS REAL) / T2.G) / SUM(T2.G + T2.W) FROM Teams AS T1 INNER JOIN TeamsSC AS T2 ON T1.tmID = T2.tmID AND T1.year = T2.year WHERE T1.name = 'Montreal Canadiens'

What is the percentage of American coaches among all the coaches who taught the Montreal Canadiens ?

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


Question: Which constructors have been ranked 1?

SELECT DISTINCT T2.name FROM results AS T1 INNER JOIN constructors AS T2 on T1.constructorId = T2.constructorId WHERE T1.rank = 1


Question: Find the total capacity of all warehouse locations.

Find the total capacity of all warehouse locations .


Question: How many orders were made by customers who live in Texas at the Central superstore?

SELECT COUNT(DISTINCT T2.`Order ID`) FROM people AS T1 INNER JOIN central_superstore AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.State = 'Texas'

How many orders were made by customers who live in Texas at the Central superstore ?

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


Question: For the team "Hannover 96", what was its defence aggression class on 2015/9/10?

SELECT t2.chanceCreationShootingClass FROM Team AS t1 INNER JOIN Team_Attributes AS t2 ON t1.team_api_id = t2.team_api_id WHERE t1.team_long_name = 'Hannover 96' AND t2.`date` LIKE '2015-09-10%'

For the team " Hannover 96 " , what was its defence aggression class on 2015/9/10 ?

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


Question: What are the amenities in the dorm that a student who has the last name of Smith lives in?

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 JOIN lives_in AS T4 ON T4.dormid  =  T1.dormid JOIN student AS T5 ON T5.stuid  =  T4.stuid WHERE T5.lname  =  'Smith'

What are the amenities in the dorm that a student who has the last name of Smith lives in ?

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


Question: What is the day of the week that tweet with ID tw-682712873332805633 was posted?

SELECT Weekday FROM twitter WHERE TweetID = 'tw-682712873332805633'

What is the day of the week that tweet with ID tw-682712873332805633 was posted ?

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


Question: find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts.

SELECT T3.location ,  T3.Representative_Name FROM station_company AS T1 JOIN company AS T2 ON T1.company_id  =  T2.company_id JOIN gas_station AS T3 ON T1.station_id  =  T3.station_id ORDER BY T2.Assets_billion DESC LIMIT 3

find the location and Representative name of the gas stations owned by the companies with top 3 Asset amounts .

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


Question: what is the salary and name of the employee who has the most number of aircraft certificates?

SELECT T1.name ,  T1.salary FROM Employee AS T1 JOIN Certificate AS T2 ON T1.eid  =  T2.eid GROUP BY T1.eid ORDER BY count(*) DESC LIMIT 1

what is the salary and name of the employee who has the most number of aircraft certificates ?

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


Question: Give the full names of artists who have created paintings and sculptures.

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

Give the full names of artists who have created paintings and sculptures .

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


Question: How many different locations does each school have?

SELECT count(DISTINCT dept_address) ,  school_code FROM department GROUP BY school_code

How many different locations does each school have ?


Question: How many students have advisors?

SELECT count(DISTINCT s_id) FROM advisor


Question: How many times did the word "grec" occur on the page titled "Àbac"?

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

How many times did the word " grec " occur on the page titled " Àbac " ?

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


Question: What is the short name of the country in which the "Net bilateral aid flows from DAC donors, Sweden (current US$)" indicator hit the 570,000 value in 1970?

SELECT T2.ShortName FROM Indicators AS T1 INNER JOIN Country AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.IndicatorName = 'Net bilateral aid flows FROM DAC donors, Sweden (current US$)' AND T1.Year = 1970 AND T1.Value = 570000

What is the short name of the country in which the " Net bilateral aid flows from DAC donors , Sweden ( current US$ ) " indicator hit the 570,000 value in 1970 ?

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


Question: Please list the texts of all the tweets posted by male users from Buenos Aires.

SELECT T1.text FROM twitter AS T1 INNER JOIN location AS T2 ON T2.LocationID = T1.LocationID INNER JOIN user AS T2 ON T2.UserID = T1.UserID INNER JOIN user AS T3 ON T1.UserID = T3.UserID WHERE T2.City = 'Buenos Aires' AND T3.Gender = 'Male'

Please list the texts of all the tweets posted by male users from Buenos Aires .

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


Question: Among the superheroes with the super power of "Super Strength", how many of them have a height of over 200cm?

SELECT COUNT(T1.id) FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Super Strength' AND T1.height_cm > 200

Among the superheroes with the super power of " Super Strength " , how many of them have a height of over 200 cm ?

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


Question: How many customers are in the furniture segment?

SELECT COUNT(c_custkey) FROM customer WHERE c_mktsegment = 'FURNITURE'

How many customers are in the furniture segment ?


Question: Indicate the procured dates for the customer whose ID is 11.

SELECT DISTINCT T FROM ( SELECT IIF(_CustomerID = 11, ProcuredDate, NULL) AS T FROM `Sales Orders` ) WHERE T IS NOT NULL

Indicate the procured dates for the customer whose ID is 11 .

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


Question: How many products are there?


Question: What is the maximum and mininum number of transit passengers for all airports?

SELECT max(Transit_Passengers) ,  min(Transit_Passengers) FROM airport

What is the maximum and mininum number of transit passengers for all airports ?

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


Question: Between 2011 to 2013, what is the average number of male Hispanic degree-seeking students at 2-year institutions who graduated within 150 percent of normal/expected time in United Education Institute-Huntington Park Campus?

SELECT AVG(T2.grad_150) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T2.unitid = T1.unitid WHERE T1.chronname = 'United Education Institute-Huntington Park Campus' AND T2.year BETWEEN 2011 AND 2013 AND T2.gender = 'M' AND T2.race = 'H'

Between 2011 to 2013 , what is the average number of male Hispanic degree - seeking students at 2 - year institutions who graduated within 150 percent of normal / expected time in United Education Institute - Huntington Park Campus ?

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


Question: Name the teams along with the coaches that went to 'Quarter Final' round in 1946.

SELECT DISTINCT T1.coachID, T3.name FROM coaches AS T1 JOIN series_post AS T2 ON T1.tmID = T2.tmIDWinner JOIN teams AS T3 ON T3.tmID = T1.tmID WHERE T2.round = 'QF' AND T2.year = 1946

Name the teams along with the coaches that went to ' Quarter Final ' round in 1946 .

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


Question: Show the number of students living in each country.

SELECT T1.country ,  count(*) FROM City AS T1 JOIN Student AS T2 ON T1.city_code  =  T2.city_code GROUP BY T1.country

Show the number of students living in each country .


Question: What are the full name, hire data, salary and department id for employees without the letter M in their first name, ordered by ascending department id?

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

What are the full name , hire data , salary and department i d for employees without the letter M in their first name , ordered by ascending department i d ?

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


Question: List all the languages used in Europe.

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Continent = 'Europe'


Question: How many suppliers are there in the United States of America?

SELECT COUNT(SupplierID) FROM Suppliers WHERE Country = 'USA'

How many suppliers are there in the United States of America ?


Question: What is highest rating for the most recent movie and when was it released?

SELECT max(T1.stars) ,  T2.year FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID  =  T2.mID WHERE T2.year  =  (SELECT max(YEAR) FROM Movie)

What is highest rating for the most recent movie and when was it released ?

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


Question: What are the ids of the stations in San Francisco that normally have more than 10 bikes available?

SELECT id FROM station WHERE city  =  "San Francisco" INTERSECT SELECT station_id FROM status GROUP BY station_id HAVING avg(bikes_available)  >  10

What are the ids of the stations in San Francisco that normally have more than 10 bikes available ?

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


Question: Which movies have 'Deleted Scenes' as a substring in the special feature?

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

Which movies have ' Deleted Scenes ' as a substring in the special feature ?

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


Question: How many times more for the number of users who took the "mental health survey for 2017" than "mental health survey for 2018"?

SELECT CAST(COUNT(T1.UserID) AS REAL) / ( SELECT COUNT(T1.UserID) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2018' ) FROM Answer AS T1 INNER JOIN Survey AS T2 ON T1.SurveyID = T2.SurveyID WHERE T2.Description = 'mental health survey for 2017'

How many times more for the number of users who took the " mental health survey for 2017 " than " mental health survey for 2018 " ?

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


Question: Show the institution name, location and founded year of all institutions.

SELECT institution_name ,  LOCATION ,  founded FROM institution

Show the institution name , location and founded year of all institutions .

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


Question: What's the agregation method for the indicator whose value is 133 in 1960 for the Arab World?

SELECT T2.AggregationMethod FROM Indicators AS T1 INNER JOIN Series AS T2 ON T1.IndicatorName = T2.IndicatorName INNER JOIN Country AS T3 ON T1.CountryCode = T3.CountryCode WHERE T3.ShortName = 'Arab World' AND T1.Value = 133 AND T1.Year = 1960

What 's the agregation method for the indicator whose value is 133 in 1960 for the Arab World ?

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


Question: List down all of the product names that were placed by sales person with id 10.

SELECT DISTINCT T1.Name FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T2.SalesPersonID = 10

List down all of the product names that were placed by sales person with i d 10 .

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


Question: What non-English American film/s has received the lowest user ratings? Mention the movie's I.D.

SELECT T2.movieid FROM movies AS T1 INNER JOIN u2base AS T2 ON T1.movieid = T2.movieid WHERE T1.isEnglish = 'F' AND T1.country = 'USA' ORDER BY T2.rating LIMIT 1

What non - English American film / s has received the lowest user ratings ? Mention the movie 's I.D.

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


Question: What are the names of the airports which are not in the country 'Iceland'?

SELECT name FROM airport WHERE country != 'Iceland'

What are the names of the airports which are not in the country ' Iceland ' ?

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


Question: Find the average number of followers for the users who do not have any tweet.

SELECT avg(followers) FROM user_profiles WHERE UID NOT IN (SELECT UID FROM tweets)

Find the average number of followers for the users who do not have any tweet .

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


Question: Give the number of device models for "中兴" phone brand.

SELECT COUNT(device_id) FROM phone_brand_device_model2 WHERE device_model = '中兴'

Give the number of device models for " 中兴 " phone brand .

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


Question: Show different nationalities of customers, along with the number of customers of each nationality.

SELECT Nationality ,  COUNT(*) FROM customer GROUP BY Nationality

Show different nationalities of customers , along with the number of customers of each nationality .

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


Question: When was the release date of the latest movie in which Dariusz Wolski worked as a crew member?

SELECT T1.release_date FROM movie AS T1 INNER JOIN movie_crew AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Dariusz Wolski' ORDER BY T1.release_date DESC LIMIT 1

When was the release date of the latest movie in which Dariusz Wolski worked as a crew member ?

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


Question: How many schools in Fresno (directly funded) have number of test takers not more than 250?

SELECT COUNT(T1.CDSCode) FROM frpm AS T1 INNER JOIN satscores AS T2 ON T1.CDSCode = T2.cds WHERE T1.`Charter Funding Type` = 'Directly funded' AND T1.`County Name` = 'Fresno' AND T2.NumTstTakr <= 250

How many schools in Fresno ( directly funded ) have number of test takers not more than 250 ?

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


Question: How many sales people are handling all the customers?

How many sales people are handling all the customers ?


Question: How much higher in percentage does the word "grec" occur on the page titled "Àbac" than on the page titled "Astronomia"?

SELECT CAST((SUM(CASE WHEN T3.title = 'Àbac' THEN T2.occurrences END) - SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END)) AS REAL) * 100 / SUM(CASE WHEN T3.title = 'Astronomia' THEN T2.occurrences END) FROM words AS T1 INNER JOIN pages_words AS T2 ON T1.wid = T2.wid INNER JOIN pages AS T3 ON T2.pid = T3.pid WHERE T1.word = 'grec'

How much higher in percentage does the word " grec " occur on the page titled " Àbac " than on the page titled " Astronomia " ?

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


Question: Who is the youngest male?

SELECT name FROM Person WHERE gender  =  'male' AND age  =  (SELECT min(age) FROM person WHERE gender  =  'male' )


Question: How many vehicle in total?


Question: For all the countries that is smaller than 100 square kilometres, which one has the most GDP?

SELECT T1.Name FROM country AS T1 INNER JOIN economy AS T2 ON T1.Code = T2.Country WHERE T1.Area < 100 ORDER BY T2.GDP DESC LIMIT 1

For all the countries that is smaller than 100 square kilometres , which one has the most GDP ?

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


Question: How many matches in 2009 had win margins of less than 10?

SELECT COUNT(Match_Id) FROM `Match` WHERE Match_Date LIKE '2009%' AND Win_Margin < 10

How many matches in 2009 had win margins of less than 10 ?

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


Question: Find the total number of catalog contents.

Find the total number of catalog contents .


Question: What are the opening and closing time of business id 1 for day id 2?

SELECT opening_time, closing_time FROM Business_Hours WHERE business_id = 1 AND day_id = 2

What are the opening and closing time of business i d 1 for day i d 2 ?

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


Question: Name the state with the most number of graduate cohort in 2012 from private institute for profit? List all such institutes in the mentioned state.

SELECT T1.state, T1.chronname FROM institution_details AS T1 INNER JOIN state_sector_grads AS T2 ON T1.state = T2.state WHERE T2.year = 2012 AND T1.control = 'Private for-profit' GROUP BY T2.grad_cohort ORDER BY COUNT(T2.grad_cohort) DESC LIMIT 1

Name the state with the most number of graduate cohort in 2012 from private institute for profit ? List all such institutes in the mentioned state .

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


Question: What is the average age for customers with a membership credit above the average?

SELECT avg(age) FROM customers WHERE membership_credit  >  (SELECT avg(membership_credit) FROM customers)

What is the average age for customers with a membership credit above the average ?

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


Question: List the ids, names and market shares of all browsers.

SELECT id ,  name ,  market_share FROM browser

List the ids , names and market shares of all browsers .

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


Question: Find the name and email of the users who have more than 1000 followers.

SELECT name ,  email FROM user_profiles WHERE followers  >  1000

Find the name and email of the users who have more than 1000 followers .

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


Question: Please list all the keywords for the episodes with a rating of over 8.

SELECT T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.rating > 8

Please list all the keywords for the episodes with a rating of over 8 .

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


Question:
What upper middle income country under East Asia & Pacific region which covers the topic about Social Protection & Labor: Migration
? Indicate the short name of the said country.

SELECT DISTINCT T1.ShortName FROM Country AS T1 INNER JOIN footnotes AS T2 ON T1.CountryCode = T2.CountryCode INNER JOIN Series AS T3 ON T2.Seriescode = T3.SeriesCode WHERE T1.IncomeGroup = 'Upper middle income' AND T1.Region = 'East Asia & Pacific' AND T3.Topic = 'Social Protection & Labor: Migration'

What upper middle income country under East Asia & Pacific region which covers the topic about Social Protection & Labor : Migration ? Indicate the short name of the said country .

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


Question: What are the names of pilots, ordered by age descending?

SELECT pilot_name FROM pilotskills ORDER BY age DESC

What are the names of pilots , ordered by age descending ?


Question: How many films are categorized as horror?

SELECT COUNT(T1.film_id) FROM film_category AS T1 INNER JOIN category AS T2 ON T1.category_id = T2.category_id WHERE T2.name = 'Horror'

How many films are categorized as horror ?

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


Question: How many distinct types of book are there?

How many distinct types of book are there ?


Question: List all of Wolfgang Reitherman's movies and their voice actors.

SELECT T1.name, T2.`voice-actor` FROM director AS T1 INNER JOIN `voice-actors` AS T2 ON T1.name = T2.movie WHERE T1.director = 'Wolfgang Reitherman'

List all of Wolfgang Reitherman 's movies and their voice actors .

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


Question: Provide the number of orders by Daisey Lamball in 2021.

SELECT COUNT(*) FROM cust_order AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'Daisey' AND T2.last_name = 'Lamball' AND STRFTIME('%Y', T1.order_date) = '2021'

Provide the number of orders by Daisey Lamball in 2021 .

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


Question: Describe the ordered products which were the most overdue from required date.

SELECT DISTINCT T3.ProductName FROM Orders AS T1 INNER JOIN `Order Details` AS T2 ON T1.OrderID = T2.OrderID INNER JOIN Products AS T3 ON T2.ProductID = T3.ProductID WHERE DATEDIFF(T1.ShippedDate, T1.RequiredDate) < 0

Describe the ordered products which were the most overdue from required date .

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


Question: What is the full name of players origin from Finland?

SELECT DISTINCT firstName, lastName FROM Master WHERE birthCountry = 'Finland'

What is the full name of players origin from Finland ?


Question: Return the name of the team and the acc during the regular season for the school that was founded the earliest.

SELECT t2.team_name ,  t2.ACC_Regular_Season FROM university AS t1 JOIN basketball_match AS t2 ON t1.school_id  =  t2.school_id ORDER BY t1.founded LIMIT 1

Return the name of the team and the acc during the regular season for the school that was founded the earliest .

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


Question: Name the player who scored the most goals in a single game in the 2007-2008 season of WHL?

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.SEASON = '2007-2008' AND T1.LEAGUE = 'WHL' ORDER BY T1.G DESC LIMIT 1

Name the player who scored the most goals in a single game in the 2007 - 2008 season of WHL ?

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


Question: What is the grade span offered in the school with the highest longitude?

SELECT GSoffered FROM schools ORDER BY ABS(longitude) DESC LIMIT 1

What is the grade span offered in the school with the highest longitude ?

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


Question: When was the first time did Kevin Constant have his highest crossing score? Give the date.

SELECT `date` FROM ( SELECT t2.crossing, t2.`date` FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_fifa_api_id = t2.player_fifa_api_id WHERE t1.player_name = 'Kevin Constant' ORDER BY t2.crossing DESC) ORDER BY date DESC LIMIT 1

When was the first time did Kevin Constant have his highest crossing score ? Give the date .

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


Question: What are the names of clients who have never made an order?

SELECT name FROM Client EXCEPT SELECT T1.name FROM Client AS T1 JOIN Orders AS T2 ON T1.idClient  =  T2.idClient

What are the names of clients who have never made an order ?

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


Question: Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to.

SELECT sum(T2.hours) FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name  =  'Michael Rogers' OR T3.name  =  'Carol Smith'

Find the total hours of the projects that scientists named Michael Rogers or Carol Smith are assigned to .

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


Question: Find the maximum and minimum monthly rental for all student addresses.

SELECT max(monthly_rental) ,  min(monthly_rental) FROM Student_Addresses

Find the maximum and minimum monthly rental for all student addresses .

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


Question: What are the ids of all students who don't play sports?

SELECT StuID FROM Student EXCEPT SELECT StuID FROM Sportsinfo

What are the ids of all students who do n't play sports ?


Question: Based on image 5, what is the percentage of images that belong windows object class?

SELECT CAST(COUNT(T1.OBJ_SAMPLE_ID) AS REAL) * 100 / COUNT(CASE WHEN T1.IMG_ID = 5 THEN 1 ELSE 0 END) FROM IMG_OBJ AS T1 INNER JOIN OBJ_CLASSES AS T2 ON T1.OBJ_CLASS_ID = T2.OBJ_CLASS_ID WHERE T2.OBJ_CLASS = 'windows'

Based on image 5 , what is the percentage of images that belong windows object class ?

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


Question: Among the users who are trailists when rating the movie "When Will I Be Loved", how many of them have rated "1" on the movie?

SELECT COUNT(T1.user_id) FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T2.movie_title = 'When Will I Be Loved' AND T1.rating_score = 1 AND T1.user_trialist = 1

Among the users who are trailists when rating the movie " When Will I Be Loved " , how many of them have rated " 1 " on the movie ?

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


Question: For each company, return the company name and the name of the building its office is located in.

SELECT T3.name ,  T2.name FROM Office_locations AS T1 JOIN buildings AS T2 ON T1.building_id  =  T2.id JOIN Companies AS T3 ON T1.company_id  =  T3.id

For each company , return the company name and the name of the building its office is located in .

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


Question: Please list the starting stations of the bike trips made on a day with a max humidity over 80 in 2013 in the area where the zip code is 94107.

SELECT DISTINCT T1.start_station_name FROM trip AS T1 INNER JOIN weather AS T2 ON T2.zip_code = T1.zip_code WHERE SUBSTR(CAST(T2.date AS TEXT), -4) = '2013' AND T2.zip_code = 94107 AND T2.max_temperature_f > 80

Please list the starting stations of the bike trips made on a day with a max humidity over 80 in 2013 in the area where the zip code is 94107 .

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


Question: What is the university ID of the university with the largest student staff ratio?

SELECT university_id FROM university_year ORDER BY student_staff_ratio DESC LIMIT 1

What is the university ID of the university with the largest student staff ratio ?

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


Question: How many orders were delivered in 2021?

SELECT COUNT(*) FROM order_status AS T1 INNER JOIN order_history AS T2 ON T1.status_id = T2.status_id WHERE T1.status_value = 'Delivered' AND STRFTIME('%Y', T2.status_date) = '2021'

How many orders were delivered in 2021 ?


Question: Find all the zip codes in which the max dew point have never reached 70.

SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f  >=  70

Find all the zip codes in which the max dew point have never reached 70 .

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


Question: Mention the genre of the 2Xtreme.

SELECT T2.id FROM game AS T1 INNER JOIN genre AS T2 ON T1.genre_id = T2.id WHERE T1.game_name = '2Xtreme'


Question: What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University?

SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Stanford University" INTERSECT SELECT T1.title ,  T1.paper_id FROM Paper AS T1 JOIN Author_list AS T2 ON T1.paper_id  =  T2.paper_id JOIN Affiliation AS T3 ON T2.affiliation_id  =  T3.affiliation_id WHERE T3.name LIKE "Columbia University"

What are the titles and paper ids for papers which were affiliated with both Stanford and Columbia University ?

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


Question: Which city does the customer who finished transaction no.103545 live in?

SELECT T1.City FROM customers AS T1 INNER JOIN `transaction` AS T2 ON T1.CustomerID = T2.CustomerID WHERE T2.TransactionID = 103545

Which city does the customer who finished transaction no.103545 live in ?

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


Question: In year 1999, list the titles and conference's short name of paper authored by someone named "Philip".

SELECT T1.Title, T3.ShortName FROM Paper AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.PaperId INNER JOIN Conference AS T3 ON T1.ConferenceId = T3.Id WHERE T1.Year = 1999 AND T2.Name LIKE 'Philip%'

In year 1999 , list the titles and conference 's short name of paper authored by someone named " Philip " .

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


Question: List the level of education and income of customers ages from 30 to 55 with a true response.

SELECT T1.EDUCATIONNUM, T3.INCOME_K FROM Customers AS T1 INNER JOIN Mailings1_2 AS T2 ON T1.ID = T2.REFID INNER JOIN Demog AS T3 ON T1.GEOID = T3.GEOID WHERE T1.age >= 30 AND T1.age <= 55 AND T2.RESPONSE = 'true'

List the level of education and income of customers ages from 30 to 55 with a true response .

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


Question: List the first name, middle name and last name, and log in name of all the seller users, whose seller value is 1.

SELECT first_name ,  middle_name ,  last_name ,  login_name FROM Users WHERE is_seller  =  1;

List the first name , middle name and last name , and log in name of all the seller users , whose seller value is 1 .

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


Question: Find the difference between the average royalty of titles published by US and non US publishers?

SELECT (CAST(SUM(CASE WHEN T2.country = 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country = 'USA' THEN 1 ELSE 0 END)) - (CAST(SUM(CASE WHEN T2.country != 'USA' THEN T1.royalty ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.country != 'USA' THEN 1 ELSE 0 END)) FROM titles AS T1 INNER JOIN publishers AS T2 ON T1.pub_id = T2.pub_id INNER JOIN roysched AS T3 ON T1.title_id = T3.title_id

Find the difference between the average royalty of titles published by US and non US publishers ?

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


Question: What are the top three apartment types in terms of the average room count? Give me the

SELECT apt_type_code FROM Apartments GROUP BY apt_type_code ORDER BY avg(room_count) DESC LIMIT 3

What are the top three apartment types in terms of the average room count ? Give me the

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


Question: Please show the most common manufacturer of clubs.

SELECT Manufacturer FROM club GROUP BY Manufacturer ORDER BY COUNT(*) DESC LIMIT 1

Please show the most common manufacturer of clubs .


Question: Please list the titles of the podcasts for which the author whose ID is F7E5A318989779D has written a review.

SELECT T2.title FROM podcasts AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T2.author_id = 'F7E5A318989779D'

Please list the titles of the podcasts for which the author whose ID is F7E5A318989779D has written a review .

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


Question: Who is the manager of the store with the largest collection of films?

SELECT T.first_name, T.last_name FROM ( SELECT T3.first_name, T3.last_name, COUNT(T1.film_id) AS num FROM inventory AS T1 INNER JOIN store AS T2 ON T1.store_id = T2.store_id INNER JOIN staff AS T3 ON T2.manager_staff_id = T3.staff_id GROUP BY T3.first_name, T3.last_name ) AS T ORDER BY T.num DESC LIMIT 1

Who is the manager of the store with the largest collection of films ?

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


Question: What is the name of the company that produced the game titled Adventure Time: Explore the Dungeon Because I Don't Know!?

SELECT T3.publisher_name FROM game AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.game_id INNER JOIN publisher AS T3 ON T2.publisher_id = T3.id WHERE T1.game_name = 'Adventure Time: Explore the Dungeon Because I Don''t Know!'

What is the name of the company that produced the game titled Adventure Time : Explore the Dungeon Because I Do n't Know ! ?

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


Question: What is the name of department where has the smallest number of professors?

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

What is the name of department where has the smallest number of professors ?

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


Question: What are the average height of paintings for different medium types?

SELECT avg(height_mm) ,  medium FROM paintings GROUP BY medium

What are the average height of paintings for different medium types ?

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


Question: List the last names and ids of users who have at least 2 properties and searched at most twice.

SELECT T1.last_name ,  T1.user_id FROM Users AS T1 JOIN User_Searches AS T2 ON T1.user_id  =  T2.user_id GROUP BY T1.user_id HAVING count(*)  <=  2 INTERSECT SELECT T3.last_name ,  T3.user_id FROM Users AS T3 JOIN Properties AS T4 ON T3.user_id  =  T4.owner_user_id GROUP BY T3.user_id HAVING count(*)  >=  2;

List the last names and ids of users who have at least 2 properties and searched at most twice .

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


Question: What are Alexis Blin's sprint speed, agility, and acceleration scores?

SELECT sprint_speed, agility, acceleration FROM Player_Attributes WHERE player_api_id IN ( SELECT player_api_id FROM Player WHERE player_name = 'Alexis Blin' )

What are Alexis Blin 's sprint speed , agility , and acceleration scores ?

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


Question: What is the episode that has mafia keyword?

SELECT T1.episode FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T2.Keyword = 'mafia'

What is the episode that has mafia keyword ?


Question: Please list the occupations of the customers with an education level of 11.

SELECT DISTINCT OCCUPATION FROM Customers WHERE EDUCATIONNUM = 11

Please list the occupations of the customers with an education level of 11 .

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


Question: If Dragon Souveniers, Ltd. aren't satisfied with their order and want to send a complain e-mail, which e-mail address should they send to?

SELECT t2.email FROM customers AS t1 INNER JOIN employees AS t2 ON t1.salesRepEmployeeNumber = t2.employeeNumber WHERE t1.customerName = 'Dragon Souveniers, Ltd.'

If Dragon Souveniers , Ltd. are n't satisfied with their order and want to send a complain e - mail , which e - mail address should they send to ?

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


Question: Among the root beer purchased in 2014, what percentage were sold in cans?

SELECT CAST(COUNT(CASE WHEN ContainerType = 'Can' THEN RootBeerID ELSE NULL END) AS REAL) * 100 / COUNT(RootBeerID) FROM rootbeer WHERE PurchaseDate LIKE '2014%'

Among the root beer purchased in 2014 , what percentage were sold in cans ?

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


Question: What are the pairs of teachers and students who are in the same class? Give me the pairs of their details.

SELECT T1.teacher_details ,  T3.student_details FROM Teachers AS T1 JOIN Classes AS T2 ON T1.teacher_id  =  T2.teacher_id JOIN Students AS T3 ON T2.student_id  =  T3.student_id

What are the pairs of teachers and students who are in the same class ? Give me the pairs of their details .

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


Question: Which job title has the lowest pay?

SELECT T1.JobTitle FROM Employee AS T1 INNER JOIN EmployeePayHistory AS T2 ON T1.BusinessEntityID = T2.BusinessEntityID ORDER BY T2.Rate ASC LIMIT 1


Question: What is the name of the country with the highest percentage of rural population in the overall total population? Indicate the rural population percentage of total population.

SELECT countryname, MAX(value) FROM indicators WHERE indicatorname = 'Rural population (% of total population)'

What is the name of the country with the highest percentage of rural population in the overall total population ? Indicate the rural population percentage of total population .

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


Question: Among black card borders, which card has full artwork?

SELECT id FROM cards WHERE borderColor = 'black' AND isFullArt = 1

Among black card borders , which card has full artwork ?

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


Question: Find the total capacity of all dorms.


Question: Find all receipts which has the latest date. Also tell me that date.

SELECT ReceiptNumber ,  date FROM receipts WHERE date  =  (SELECT date FROM receipts ORDER BY date DESC LIMIT 1)

Find all receipts which has the latest date . Also tell me that date .

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


Question: How many gas station are opened between 2000 and 2005?

SELECT count(*) FROM gas_station WHERE open_year BETWEEN 2000 AND 2005

How many gas station are opened between 2000 and 2005 ?

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


Question: List the amount and date of loan for the students who have two or more achievements.

SELECT amount_of_loan ,  date_of_loan FROM Student_Loans WHERE student_id IN ( SELECT student_id FROM Achievements GROUP BY student_id HAVING count(*)  >=  2 )

List the amount and date of loan for the students who have two or more achievements .

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


Question: What team did Niklas Eckerblom play in the 1997-1998 season?

SELECT T2.TEAM FROM PlayerInfo AS T1 INNER JOIN SeasonStatus AS T2 ON T1.ELITEID = T2.ELITEID WHERE T2.SEASON = '1997-1998' AND T1.PlayerName = 'Niko Kapanen'

What team did Niklas Eckerblom play in the 1997 - 1998 season ?

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


Question: In what year did SP Narine win the Orange Cap?

SELECT T4.Season_Year, T4.Orange_Cap FROM Player AS T1 INNER JOIN Player_Match AS T2 ON T1.Player_Id = T2.Player_Id INNER JOIN Match AS T3 ON T2.Match_Id = T3.Match_Id INNER JOIN Season AS T4 ON T3.Season_Id = T4.Season_Id WHERE T1.Player_Name = 'SP Narine' GROUP BY T4.Season_Year, T4.Orange_Cap

In what year did SP Narine win the Orange Cap ?

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


Question: In which country do the majority of the players are from?

SELECT T1.Country_Name FROM Country AS T1 INNER JOIN Player AS T2 ON T1.Country_Id = T2.Country_Name GROUP BY T2.Country_Name ORDER BY COUNT(T2.Country_Name) DESC LIMIT 1

In which country do the majority of the players are from ?


Question: List the element and bond type included in the molecule with molecule ID of TR002.

SELECT DISTINCT T1.element, T2.bond_type FROM atom AS T1 INNER JOIN bond AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.molecule_id = 'TR002'

List the element and bond type included in the molecule with molecule ID of TR002 .

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


Question: How many weddings are there in year 2016?

SELECT count(*) FROM wedding WHERE YEAR  =  2016

How many weddings are there in year 2016 ?


Question: List the names of phones in ascending order of price.

SELECT Name FROM phone ORDER BY Price ASC

List the names of phones in ascending order of price .

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


Question: How many restaurants failed the inspection in April 2010?

SELECT COUNT(DISTINCT T1.license_no) FROM establishment AS T1 INNER JOIN inspection AS T2 ON T1.license_no = T2.license_no WHERE strftime('%Y-%m', T2.inspection_date) = '2010-04' AND T1.facility_type = 'Restaurant' AND T2.results = 'Fail'

How many restaurants failed the inspection in April 2010 ?

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


Question: Find all the receipt numbers in which customer with last name LOGAN purchased Croissant.

SELECT T1.ReceiptNumber FROM receipts AS T1 JOIN items AS T2 ON T1.ReceiptNumber  =  T2.receipt JOIN goods AS T3 ON T2.item  =  T3.id JOIN customers AS T4 ON T4.Id  =  T1.CustomerId WHERE T3.food  =  "Croissant" AND T4.LastName  =  'LOGAN'

Find all the receipt numbers in which customer with last name LOGAN purchased Croissant .

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


Question: What is the name of the coin with the highest price?

SELECT T1.name FROM coins AS T1 INNER JOIN historical AS T2 ON T1.id = T2.coin_id WHERE T2.price = ( SELECT MAX(price) FROM historical )

What is the name of the coin with the highest price ?

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


Question: What is the birth place of the cast or crew member who won the Best Voice-Over Performance in Online Film & Television Association in 2009?

SELECT T1.birth_place FROM Person AS T1 INNER JOIN Award AS T2 ON T1.name = T2.person WHERE T2.award = 'Best Voice-Over Performance' AND T2.organization = 'Online Film & Television Association' AND T2.year = 2009;

What is the birth place of the cast or crew member who won the Best Voice - Over Performance in Online Film & Television Association in 2009 ?

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


Question: Give the names of wrestlers and their elimination moves.

SELECT T2.Name ,  T1.Elimination_Move FROM elimination AS T1 JOIN wrestler AS T2 ON T1.Wrestler_ID  =  T2.Wrestler_ID

Give the names of wrestlers and their elimination moves .

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


Question: Show different locations of railways along with the corresponding number of railways at each location.

SELECT LOCATION ,  COUNT(*) FROM railway GROUP BY LOCATION

Show different locations of railways along with the corresponding number of railways at each location .

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


Question: Which movie title has the lowest movie rental in the horror category?

SELECT T1.title FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.`name` = 'Horror' ORDER BY T1.rental_rate LIMIT 1

Which movie title has the lowest movie rental in the horror category ?

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


Question: Show the 3 counties with the smallest population.

SELECT County_name FROM county ORDER BY Population ASC LIMIT 3

Show the 3 counties with the smallest population .


Question: How old is the average person for each job?

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

How old is the average person for each job ?


Question: What are the maximum and minimum population of the counties?

SELECT max(Population) ,  min(Population) FROM county

What are the maximum and minimum population of the counties ?


Question: For the customer who paid 634.8 in 2012/8/25, what was the consumption decrease rate from Year 2012 to 2013?

SELECT CAST(SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) - SUM(IIF(SUBSTR(Date, 1, 4) = '2013', Consumption, 0)) AS FLOAT) / SUM(IIF(SUBSTR(Date, 1, 4) = '2012', Consumption, 0)) FROM yearmonth WHERE CustomerID = ( SELECT T1.CustomerID FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID WHERE T1.Date = '2012-08-25' AND T1.Price = 634.8 )

For the customer who paid 634.8 in 2012/8/25 , what was the consumption decrease rate from Year 2012 to 2013 ?

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


Question: From which city was the tweet with the most number of retweets posted?

SELECT T2.City FROM twitter AS T1 INNER JOIN location AS T2 ON T1.LocationID = T2.LocationID ORDER BY T1.RetweetCount DESC LIMIT 1

From which city was the tweet with the most number of retweets posted ?

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


Question: Among the menus with over 10 pages, how many of them have over 20 dishes?

SELECT COUNT(*) FROM Menu WHERE page_count > 10 AND dish_count > 20

Among the menus with over 10 pages , how many of them have over 20 dishes ?

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


Question: Return the names of people, ordered by weight ascending.

SELECT Name FROM People ORDER BY Weight ASC

Return the names of people , ordered by weight ascending .

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


Question: What are the maximum and minimum number of silver medals for clubs.

SELECT max(Silver) ,  min(Silver) FROM club_rank

What are the maximum and minimum number of silver medals for clubs .


Question: List names and addresses for all affiliations.

SELECT DISTINCT name ,  address FROM Affiliation

List names and addresses for all affiliations .


Question: What are the full names of actors who had roles in more than 30 films?

SELECT T2.first_name ,  T2.last_name FROM film_actor AS T1 JOIN actor AS T2 ON T1.actor_id  =  T2.actor_id GROUP BY T2.actor_id HAVING count(*)  >  30

What are the full names of actors who had roles in more than 30 films ?

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


Question: Give the number of followers for the user who posted the most lists.

SELECT SUM(T1.list_followers) FROM lists AS T1 INNER JOIN lists_users AS T2 ON T1.list_id = T2.list_id GROUP BY T1.user_id ORDER BY COUNT(T1.list_id) DESC LIMIT 1

Give the number of followers for the user who posted the most lists .

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


Question: List the names and business certificates of the eateries which got inspection score under 50.

SELECT T2.name, T2.business_id FROM inspections AS T1 INNER JOIN businesses AS T2 ON T1.business_id = T2.business_id WHERE T1.score < 50

List the names and business certificates of the eateries which got inspection score under 50 .

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


Question: What is the total amount of money loaned by banks in New York state?

SELECT sum(T2.amount) FROM bank AS T1 JOIN loan AS T2 ON T1.branch_id  =  T2.branch_id WHERE T1.state  =  'New York'

What is the total amount of money loaned by banks in New York state ?

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


Question: How many crimes are commited on January 1, 2018?

SELECT COUNT(*) FROM Crime WHERE date LIKE '1/1/2018%'

How many crimes are commited on January 1 , 2018 ?

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


Question: What are the names and cities of the branches that do not have any registered members?

SELECT name ,  city FROM branch WHERE branch_id NOT IN (SELECT branch_id FROM membership_register_branch)

What are the names and cities of the branches that do not have any registered members ?

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


Question: What is the amount difference between the bottles of root beer sold from Louisiana and Missouri?

SELECT ( SELECT COUNT(T1.BrandID) FROM rootbeer AS T1 INNER JOIN rootbeerbrand AS T2 ON T1.BrandID = T2.BrandID WHERE T2.State = 'LA' AND T1.ContainerType = 'Bottle' ) - ( SELECT COUNT(T3.BrandID) FROM rootbeer AS T3 INNER JOIN rootbeerbrand AS T4 ON T3.BrandID = T4.BrandID WHERE T4.State = 'MO' AND T3.ContainerType = 'Bottle' ) AS DIFFERENCE

What is the amount difference between the bottles of root beer sold from Louisiana and Missouri ?

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


Question: What is the email address of the staff Jon Stephens?

SELECT email FROM staff WHERE first_name = 'Jon' AND last_name = 'Stephens'

What is the email address of the staff Jon Stephens ?

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


Question: How many times was the budget in Advertisement for "Yearly Kickoff" meeting more than "October Meeting"?

SELECT CAST(SUM(CASE WHEN T2.event_name = 'Yearly Kickoff' THEN T1.amount ELSE 0 END) AS REAL) / SUM(CASE WHEN T2.event_name = 'October Meeting' THEN T1.amount ELSE 0 END) FROM budget AS T1 INNER JOIN event AS T2 ON T1.link_to_event = T2.event_id WHERE T1.category = 'Advertisement' AND T2.type = 'Meeting'

How many times was the budget in Advertisement for " Yearly Kickoff " meeting more than " October Meeting " ?

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


Question: Write down all the keywords for winner of "WGA Award (TV)" award.

SELECT T2.keyword FROM Award AS T1 INNER JOIN Keyword AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'WGA Award (TV)';

Write down all the keywords for winner of " WGA Award ( TV ) " award .

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


Question: Find the name of the project for which a scientist whose name contains ‘Smith’ is assigned to.

SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project  =  T2.code JOIN scientists AS T3 ON T1.scientist  =  T3.SSN WHERE T3.name LIKE '%Smith%'

Find the name of the project for which a scientist whose name contains ‘ Smith ’ is assigned to .

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


Question: List down the customer IDs and names that start with alphabet "W".

SELECT DISTINCT CustomerID, `Customer Names` FROM Customers WHERE `Customer Names` LIKE 'W%' ORDER BY `Customer Names` DESC

List down the customer IDs and names that start with alphabet " W " .

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


Question: Which store owns most items?

SELECT store_id FROM inventory GROUP BY store_id ORDER BY count(*) DESC LIMIT 1


Question: For in-patient age 50 and above, what is their average anti-cardiolipin antibody (IgG) concentration?

SELECT AVG(T2.`aCL IgG`) FROM Patient AS T1 INNER JOIN Examination AS T2 ON T1.ID = T2.ID WHERE STRFTIME('%Y', CURRENT_TIMESTAMP) - STRFTIME('%Y', T1.Birthday) >= 50 AND T1.Admission = '+'

For in - patient age 50 and above , what is their average anti - cardiolipin antibody ( IgG ) concentration ?

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


Question: How many customers who are not in debt ordered an urgent order?

SELECT COUNT(T2.c_custkey) FROM orders AS T1 INNER JOIN customer AS T2 ON T1.o_custkey = T2.c_custkey WHERE T2.c_acctbal > 0 AND T1.o_orderpriority = '1-URGENT'

How many customers who are not in debt ordered an urgent order ?

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


Question: Where was shipment no. 1002 headed?

SELECT T2.city_name FROM shipment AS T1 INNER JOIN city AS T2 ON T1.city_id = T2.city_id WHERE T1.ship_id = '1002'


Question: What is the full address of the office where 4 people work and one of them is Sales Representation?

SELECT T1.addressLine1, T1.addressLine2 FROM customers AS T1 INNER JOIN employees AS T2 ON T1.salesRepEmployeeNumber = T2.employeeNumber WHERE T2.jobTitle = 'Sales Rep'

What is the full address of the office where 4 people work and one of them is Sales Representation ?

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


Question: How many vehicles has a driver driven at most, and what is the driver id of the driver who has driven this many vehicles?

SELECT count(*) ,  driver_id FROM vehicle_driver GROUP BY driver_id ORDER BY count(*) DESC LIMIT 1

How many vehicles has a driver driven at most , and what is the driver i d of the driver who has driven this many vehicles ?

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


Question: Count the number of goods for each food type.

SELECT count(*) ,  food FROM goods GROUP BY food

Count the number of goods for each food type .


Question: How many active businesses are there in Phoenix?

SELECT COUNT(business_id) FROM Business WHERE city LIKE 'Phoenix' AND active LIKE 'TRUE'

How many active businesses are there in Phoenix ?

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


Question: Find the first names and offices of all instructors who have taught some course and the course description and the department name.

SELECT T2.emp_fname ,  T4.prof_office ,  T3.crs_description ,  T5.dept_name FROM CLASS AS T1 JOIN employee AS T2 ON T1.prof_num  =  T2.emp_num JOIN course AS T3 ON T1.crs_code  =  T3.crs_code JOIN professor AS T4 ON T2.emp_num  =  T4.emp_num JOIN department AS T5 ON T4.dept_code  =  T5.dept_code

Find the first names and offices of all instructors who have taught some course and the course description and the department name .

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


Question: Please give me a list of cities whose regional population is over 8000000 or under 5000000.

SELECT city FROM city WHERE regional_population  >  10000000 UNION SELECT city FROM city WHERE regional_population  <  5000000

Please give me a list of cities whose regional population is over 8000000 or under 5000000 .

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


Question: State the name of players who came from Belgium.

SELECT t3.player_name FROM Country AS t1 INNER JOIN Match AS t2 ON t1.id = t2.country_id INNER JOIN Player AS t3 ON t2.home_player_1 = t3.player_api_id WHERE t1.name = 'Belgium'

State the name of players who came from Belgium .

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


Question: What are the names of the superheroes with the power of death touch?

SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_power AS T2 ON T1.id = T2.hero_id INNER JOIN superpower AS T3 ON T2.power_id = T3.id WHERE T3.power_name = 'Death Touch'

What are the names of the superheroes with the power of death touch ?

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


Question: Among all indian restaurants in Castro St., Mountainview, how many of them is about cookhouse in their label?

SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'castro st' AND T1.city = 'mountain view' AND T2.food_type = 'indian' AND T2.label LIKE '%cookhouse%'

Among all indian restaurants in Castro St. , Mountainview , how many of them is about cookhouse in their label ?

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


Question: What are the staff ids and genders of all staffs whose job title is Department Manager?

SELECT T1.staff_id ,  T1.staff_gender FROM staff AS T1 JOIN staff_department_assignments AS T2 ON T1.staff_id  =  T2.staff_id WHERE T2.job_title_code  =  "Department Manager"

What are the staff ids and genders of all staffs whose job title is Department Manager ?

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


Question: Find the max age for each group of pilots with the same name.

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

Find the max age for each group of pilots with the same name .

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


Question: From the cases where the subject were deceased, list the subject's last name, gender, race and case number.

SELECT T2.last_name, T2.gender, T2.race, T2.case_number FROM incidents AS T1 INNER JOIN subjects AS T2 ON T1.case_number = T2.case_number WHERE T1.subject_statuses = 'Deceased'

From the cases where the subject were deceased , list the subject 's last name , gender , race and case number .

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


Question: How many different players trained for more than 1000 hours?

SELECT count(*) FROM Player WHERE HS  >  1000

How many different players trained for more than 1000 hours ?


Question: List the suppliers' names which supplied smoke red pale saddle plum.

SELECT T3.s_name FROM part AS T1 INNER JOIN partsupp AS T2 ON T1.p_partkey = T2.ps_partkey INNER JOIN supplier AS T3 ON T2.ps_suppkey = T3.s_suppkey WHERE T1.p_name = 'smoke red pale saddle plum'

List the suppliers ' names which supplied smoke red pale saddle plum .

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


Question: Return the phone numbers for all customers and suppliers.

SELECT customer_phone FROM customers UNION SELECT supplier_phone FROM suppliers

Return the phone numbers for all customers and suppliers .


Question: Which guests have apartment bookings with status code "Confirmed"? Return their first names and last names.

SELECT T2.guest_first_name ,  T2.guest_last_name FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id  =  T2.guest_id WHERE T1.booking_status_code  =  "Confirmed"

Which guests have apartment bookings with status code " Confirmed " ? Return their first names and last names .

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


Question: How many total reviews runned at in June 2022 were added to the podcasts?

SELECT SUM(reviews_added) FROM runs WHERE run_at LIKE '2022-06-%'

How many total reviews runned at in June 2022 were added to the podcasts ?

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


Question: Who are all the directors?


Question: List the full name (first and last name), and salary for those employees who earn below 6000.

SELECT first_name ,  last_name ,  salary FROM employees WHERE salary  <  6000

List the full name ( first and last name ) , and salary for those employees who earn below 6000 .

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