Question: In which year did the user who has given the most number of "short" tips join the Yelp?

SELECT T2.user_yelping_since_year FROM Tips AS T1 INNER JOIN Users AS T2 ON T1.user_id = T2.user_id WHERE T1.tip_length LIKE 'short' GROUP BY T2.user_yelping_since_year ORDER BY COUNT(T1.tip_length) DESC LIMIT 1

In which year did the user who has given the most number of " short " tips join the Yelp ?

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


Question: How many users belong to "Financial Information" category?

SELECT COUNT(T1.app_id) FROM app_labels AS T1 INNER JOIN label_categories AS T2 ON T1.label_id = T2.label_id WHERE T2.category = 'Financial Information'

How many users belong to " Financial Information " category ?

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


Question: How many movies for mature audiences or parental guidance suggested did Bill Thompson work as a voice actor?

SELECT COUNT(T.movie) FROM ( SELECT T1.movie FROM `voice-actors` AS T1 INNER JOIN movies_total_gross AS T2 ON T1.movie = T2.movie_title WHERE MPAA_rating = 'PG' AND `voice-actor` = 'Bill Thompson' GROUP BY T1.movie ) AS T

How many movies for mature audiences or parental guidance suggested did Bill Thompson work as a voice actor ?

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


Question: How many different customers have ordered things?

SELECT count(DISTINCT customer_id) FROM Orders

How many different customers have ordered things ?


Question: What are the id and name of the stadium where the most injury accidents happened?

SELECT T1.id ,  T1.name FROM stadium AS T1 JOIN game AS T2 ON T1.id  =  T2.stadium_id JOIN injury_accident AS T3 ON T2.id  =  T3.game_id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 1

What are the i d and name of the stadium where the most injury accidents happened ?

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


Question: What was the average temperature difference between store number 18 and 19 on 16 September 2022?

SELECT SUM(CASE WHEN T1.store_nbr = 18 THEN T2.tavg ELSE 0 END) - SUM(CASE WHEN T1.store_nbr = 19 THEN T2.tavg ELSE 0 END) FROM relation AS T1 INNER JOIN weather AS T2 ON T1.station_nbr = T2.station_nbr WHERE T2.`date` = '2012-09-16'

What was the average temperature difference between store number 18 and 19 on 16 September 2022 ?

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


Question: Which customer had at least 2 policies but did not file any claims? List the customer details and id.

SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id GROUP BY T1.customer_id HAVING count(*)  >=  2 EXCEPT SELECT T1.customer_details ,  T1.customer_id FROM Customers AS T1 JOIN Customer_Policies AS T2 ON T1.Customer_id  =  T2.customer_id JOIN Claims AS T3 ON T2.policy_id  =  T3.policy_id

Which customer had at least 2 policies but did not file any claims ? List the customer details and i d.

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


Question: What is the highest lake area coverage of a country?

SELECT T2.Area * 100  / T3.Area FROM located AS T1 INNER JOIN lake AS T2 ON T1.Lake = T2.Name INNER JOIN country AS T3 ON T3.Code = T1.Country ORDER BY T2.Longitude DESC LIMIT 1

What is the highest lake area coverage of a country ?

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


Question: How many products are there if we add all those located in the Subassembly category?

SELECT COUNT(T1.LocationID) FROM Location AS T1 INNER JOIN ProductInventory AS T2 USING (LocationID) WHERE T1.Name = 'Subassembly'

How many products are there if we add all those located in the Subassembly category ?

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


Question: Which vocal type did the musician with first name "Solveig" played in the song with title "A Bar in Amsterdam"?

SELECT TYPE FROM vocals AS T1 JOIN songs AS T2 ON T1.songid  =  T2.songid JOIN band AS T3 ON T1.bandmate  =  T3.id WHERE T3.firstname  =  "Solveig" AND T2.title  =  "A Bar In Amsterdam"

Which vocal type did the musician with first name " Solveig " played in the song with title " A Bar in Amsterdam " ?

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


Question: For the set which had 'SS2' as the code, what is its magic card market id?

SELECT mcmId FROM sets WHERE code = 'SS2'

For the set which had ' SS2 ' as the code , what is its magic card market i d ?

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


Question: What is the first name and age of every student who lives in a dorm with a TV Lounge?

SELECT T1.fname ,  T1.age FROM student AS T1 JOIN lives_in AS T2 ON T1.stuid  =  T2.stuid WHERE T2.dormid NOT IN (SELECT T3.dormid FROM has_amenity AS T3 JOIN dorm_amenity AS T4 ON T3.amenid  =  T4.amenid WHERE T4.amenity_name  =  'TV Lounge')

What is the first name and age of every student who lives in a dorm with a TV Lounge ?

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


Question: How many bikes have been borrowed at San Jose Diridon Caltrain Station on the date and time of 10/20/2013 8:11:01 AM and indicate the station's coordinates.

SELECT SUM(T2.bikes_available), T1.long, T1.lat FROM station AS T1 INNER JOIN status AS T2 ON T2.station_id = T1.id WHERE T2.time = '2013/10/20 8:11:01' AND T1.name = 'San Jose Diridon Caltrain Station'

How many bikes have been borrowed at San Jose Diridon Caltrain Station on the date and time of 10/20/2013 8:11:01 AM and indicate the station 's coordinates .

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


Question: List all of the restaurants on Park St.

SELECT T2.label FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.id_restaurant = T2.id_restaurant WHERE T1.street_name = 'park st'


Question: Count the number of customers that have the customer type that is most common.

SELECT count(*) FROM customers GROUP BY customer_type_code ORDER BY count(*) DESC LIMIT 1

Count the number of customers that have the customer type that is most common .

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


Question: How many distinct official languages are there among countries of players whose positions are defenders.

SELECT count(DISTINCT T1.Official_native_language) FROM country AS T1 JOIN match_season AS T2 ON T1.Country_id  =  T2.Country WHERE T2.Position  =  "Defender"

How many distinct official languages are there among countries of players whose positions are defenders .

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


Question: Which movies have the participation of actor Harrison Ford?

SELECT T1.title FROM movie AS T1 INNER JOIN movie_cast AS T2 ON T1.movie_id = T2.movie_id INNER JOIN person AS T3 ON T2.person_id = T3.person_id WHERE T3.person_name = 'Harrison Ford'

Which movies have the participation of actor Harrison Ford ?


Question: Show all product names with price higher than the average.

SELECT product_name FROM Products WHERE product_price  >  (SELECT avg(product_price) FROM Products)

Show all product names with price higher than the average .


Question: How many role-playing games did Microsoft Game Studios publish?

SELECT COUNT(T3.id) FROM publisher AS T1 INNER JOIN game_publisher AS T2 ON T1.id = T2.publisher_id INNER JOIN game AS T3 ON T2.game_id = T3.id INNER JOIN genre AS T4 ON T3.genre_id = T4.id WHERE T4.genre_name = 'Role-Playing' AND T1.publisher_name = 'Microsoft Game Studios'

How many role - playing games did Microsoft Game Studios publish ?

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


Question: List down the actor IDs of film titled "BOUND CHEAPER".

SELECT T2.actor_id FROM film AS T1 INNER JOIN film_actor AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'BOUND CHEAPER'

List down the actor IDs of film titled " BOUND CHEAPER " .

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


Question: Find the triple-bonded molecules which are carcinogenic.

SELECT DISTINCT T2.molecule_id FROM bond AS T1 INNER JOIN molecule AS T2 ON T1.molecule_id = T2.molecule_id WHERE T1.bond_type = '#' AND T2.label = '+'

Find the triple - bonded molecules which are carcinogenic .


Question: How many countries on the European Continent has an infant mortality rate per thousand of over 100?

SELECT COUNT(T1.Name) FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent INNER JOIN population AS T4 ON T4.Country = T1.Code WHERE T3.Name = 'Europe' AND T4.Infant_Mortality < 100

How many countries on the European Continent has an infant mortality rate per thousand of over 100 ?

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


Question: How many chemical compounds in the database are identified as carcinogenic.

SELECT COUNT(T.molecule_id) FROM molecule AS T WHERE T.label = '+'

How many chemical compounds in the database are identified as carcinogenic .


Question: What is the complete description of the job of a researcher?

SELECT role_description FROM Staff_Roles WHERE role_code  =  'researcher'

What is the complete description of the job of a researcher ?


Question: Select the warehouse codes along with the number of boxes in each warehouse.

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

Select the warehouse codes along with the number of boxes in each warehouse .

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


Question: How many different neighborhoods are there for all stores?

SELECT count(DISTINCT neighborhood) FROM store

How many different neighborhoods are there for all stores ?


Question: How many movies registered on Mubi are directed by Hong Sang-soo?

SELECT COUNT(movie_id) FROM movies WHERE director_name = 'Hong Sang-soo'

How many movies registered on Mubi are directed by Hong Sang - soo ?

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


Question: What are the full names and hire dates for employees in the same department as someone with the first name Clara, not including Clara?

SELECT first_name ,  last_name ,  hire_date FROM employees WHERE department_id  =  ( SELECT department_id FROM employees WHERE first_name  =  "Clara") AND first_name != "Clara"

What are the full names and hire dates for employees in the same department as someone with the first name Clara , not including Clara ?

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


Question: What are the distinct cross reference source system codes which are related to the master customer details 'Gottlieb, Becker and Wyman'?

SELECT DISTINCT T2.source_system_code FROM customer_master_index AS T1 JOIN cmi_cross_references AS T2 ON T1.master_customer_id  =  T2.master_customer_id WHERE T1.cmi_details  =  'Gottlieb ,  Becker and Wyman'

What are the distinct cross reference source system codes which are related to the master customer details ' Gottlieb , Becker and Wyman ' ?

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


Question: What is the population density of Hanoi's home country?

SELECT T1.Population / T1.Area FROM country AS T1 INNER JOIN province AS T2 ON T1.Code = T2.Country INNER JOIN city AS T3 ON T3.Province = T2.Name WHERE T3.Name = 'Hanoi'

What is the population density of Hanoi 's home country ?

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


Question: When is the birthday of the football player who has the highest overall rating?

SELECT t1.birthday FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id ORDER BY t2.overall_rating DESC LIMIT 1

When is the birthday of the football player who has the highest overall rating ?

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


Question: Write the title and all the keywords of the episode that was aired on 3/22/2009.

SELECT T1.title, T2.keyword FROM Episode AS T1 INNER JOIN Keyword AS T2 ON T1.episode_id = T2.episode_id WHERE T1.air_date = '2009-03-22';

Write the title and all the keywords of the episode that was aired on 3/22/2009 .

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


Question: How many business rates are related to each cmi cross reference? List cross reference id, master customer id and the n

SELECT T2.cmi_cross_ref_id ,  T2.master_customer_id ,  count(*) FROM Business_Rates AS T1 JOIN CMI_Cross_References AS T2 ON T1.cmi_cross_ref_id  =  T2.cmi_cross_ref_id GROUP BY T2.cmi_cross_ref_id

How many business rates are related to each cmi cross reference ? List cross reference i d , master customer i d and the n

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


Question: Count the number of vehicles that have a top speed equal to the maximum across all vehicles.

SELECT count(*) FROM vehicle WHERE top_speed  =  (SELECT max(top_speed) FROM vehicle)

Count the number of vehicles that have a top speed equal to the maximum across all vehicles .

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


Question: What is the number of female graduate for all students cohort from Oakwood University in 2013?

SELECT COUNT(*) FROM institution_details AS T1 INNER JOIN institution_grads AS T2 ON T1.unitid = T2.unitid WHERE T2.year = 2013 AND T2.gender = 'F' AND T2.race = 'X' AND T1.chronname = 'Oakwood University'

What is the number of female graduate for all students cohort from Oakwood University in 2013 ?

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


Question: What is the percentage of the payment amount in 2004 was made by Atelier graphique?

SELECT SUM(CASE WHEN t1.customerName = 'Atelier graphique' THEN t2.amount ELSE 0 END) * 100 / SUM(t2.amount) FROM customers AS t1 INNER JOIN payments AS t2 ON t1.customerNumber = t2.customerNumber WHERE STRFTIME('%Y', t2.paymentDate) = '2004'

What is the percentage of the payment amount in 2004 was made by Atelier graphique ?

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


Question: Which movie is the character Robin Hood in?

SELECT movie_title FROM characters WHERE hero = 'Robin Hood'

Which movie is the character Robin Hood in ?

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


Question: Of the genes whose phenotype and motif are nucleic acid metabolism defects, PS00107, what percentage perform positive interaction with another gene?

SELECT CAST(SUM(IIF(T2.Expression_Corr > 0, 1, 0)) AS REAL) * 100 / COUNT(T2.GeneID1) FROM Genes AS T1 INNER JOIN Interactions AS T2 ON T1.GeneID = T2.GeneID1 WHERE T1.Phenotype = 'Nucleic acid metabolism defects' AND T1.Motif = 'PS00107'

Of the genes whose phenotype and motif are nucleic acid metabolism defects , PS00107 , what percentage perform positive interaction with another gene ?

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


Question: Which item was bought the fewest times?

SELECT item FROM items GROUP BY item ORDER BY count(*) LIMIT 1

Which item was bought the fewest times ?


Question: Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000.

SELECT Product_Type_Code FROM Products WHERE Product_Price  >  4500 INTERSECT SELECT Product_Type_Code FROM Products WHERE Product_Price  <  3000

Show the product type codes that have both products with price higher than 4500 and products with price lower than 3000 .

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


Question: Of courses with 3 credit, how many students have GPA of 3.2?

SELECT COUNT(T1.student_id) FROM student AS T1 INNER JOIN registration AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T2.course_id = T3.course_id WHERE T3.credit = 3 AND T1.gpa = 3.2

Of courses with 3 credit , how many students have GPA of 3.2 ?

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


Question: List date of the review of the Eagle Capital from Indianapolis, Indiana.

SELECT T2.Date FROM district AS T1 INNER JOIN reviews AS T2 ON T1.district_id = T2.district_id WHERE T2.Product = 'Eagle Capital' AND T1.city = 'Indianapolis' AND T1.state_abbrev = 'IN'

List date of the review of the Eagle Capital from Indianapolis , Indiana .

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


Question: Please list the title and platform name of games.

SELECT T1.Title ,  T2.Platform_name FROM game AS T1 JOIN platform AS T2 ON T1.Platform_ID  =  T2.Platform_ID

Please list the title and platform name of games .

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


Question: What are ids and total number of hours played for each game?

SELECT gameid ,  sum(hours_played) FROM Plays_games GROUP BY gameid

What are ids and total number of hours played for each game ?

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


Question: Which of these circuits is located at a higher latitude, Silverstone Circuit, Hockenheimring or Hungaroring?

SELECT name FROM circuits WHERE name IN ('Silverstone Circuit', 'Hockenheimring', 'Hungaroring') ORDER BY lat DESC LIMIT 1

Which of these circuits is located at a higher latitude , Silverstone Circuit , Hockenheimring or Hungaroring ?

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


Question: Which job titles correspond to jobs with salaries over 9000?

SELECT job_title FROM jobs WHERE min_salary  >  9000

Which job titles correspond to jobs with salaries over 9000 ?

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


Question: What is the longest business time on Mondays for a Yelp_Business under the category "Shopping"?

SELECT T1.closing_time + 12 - T1.opening_time AS "hour" FROM Business_Hours AS T1 INNER JOIN Days AS T2 ON T1.day_id = T2.day_id INNER JOIN Business AS T3 ON T1.business_id = T3.business_id INNER JOIN Business_Categories AS T4 ON T3.business_id = T4.business_id INNER JOIN Categories AS T5 ON T4.category_id = T5.category_id WHERE T2.day_of_week LIKE 'Monday' AND T5.category_name LIKE 'Shopping' ORDER BY T1.closing_time + 12 - T1.opening_time DESC LIMIT 1

What is the longest business time on Mondays for a Yelp_Business under the category " Shopping " ?

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


Question: Calculate the average attribute value of all superheroes.

SELECT AVG(attribute_value) FROM hero_attribute

Calculate the average attribute value of all superheroes .


Question: In which years were more than one institution founded?

SELECT Founded ,  COUNT(*) FROM institution GROUP BY Founded HAVING COUNT(*)  >  1

In which years were more than one institution founded ?


Question: What is the percentage of coaches in 1969 who were awarded "NBA Coach of the Year"?

SELECT CAST(SUM(CASE WHEN award = 'NBA Coach of the Year' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM awards_coaches WHERE year = 1969

What is the percentage of coaches in 1969 who were awarded " NBA Coach of the Year " ?

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


Question: For the race happened on 2015/11/29, how many drivers finished the game?

SELECT COUNT(T2.driverId) FROM races AS T1 INNER JOIN results AS T2 ON T2.raceId = T1.raceId WHERE T1.date = '2015-11-29' AND T2.time IS NOT NULL

For the race happened on 2015/11/29 , how many drivers finished the game ?

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


Question: What is the type of vocables that appears most frequently?

SELECT TYPE FROM vocals GROUP BY TYPE ORDER BY count(*) DESC LIMIT 1

What is the type of vocables that appears most frequently ?


Question: What is the most common domain for the email address among all the customers?

SELECT SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) AS ym FROM customer GROUP BY SUBSTR(email, INSTR(email, '@') + 1, LENGTH(email) - INSTR(email, '@')) ORDER BY COUNT(*) DESC LIMIT 1

What is the most common domain for the email address among all the customers ?

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


Question: Find the building that has the largest number of faculty members.

SELECT building FROM Faculty GROUP BY building ORDER BY count(*) DESC LIMIT 1

Find the building that has the largest number of faculty members .


Question: Find all spokesman's names and speech titles.

SELECT name ,  speach_title FROM spokesman

Find all spokesman 's names and speech titles .

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


Question: For each customer status code, how many customers are classified that way?

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

For each customer status code , how many customers are classified that way ?

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


Question: Group by ships by flag, and return number of ships that have each flag.

SELECT count(*) ,  flag FROM ship GROUP BY flag

Group by ships by flag , and return number of ships that have each flag .

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


Question: Find the unit of measurement and product category code of product named "chervil".

SELECT t2.unit_of_measure ,  t2.product_category_code FROM products AS t1 JOIN ref_product_categories AS t2 ON t1.product_category_code  =  t2.product_category_code WHERE t1.product_name  =  "chervil"

Find the unit of measurement and product category code of product named " chervil " .

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


Question: Who is the editor of the post titled 'Open source tools for visualizing multi-dimensional data?'

SELECT T2.DisplayName FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T1.Title = 'Open source tools for visualizing multi-dimensional data?'

Who is the editor of the post titled ' Open source tools for visualizing multi - dimensional data ? '

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


Question: On which days more than one revisions were made on catalogs.

SELECT date_of_latest_revision FROM Catalogs GROUP BY date_of_latest_revision HAVING count(*)  >  1

On which days more than one revisions were made on catalogs .


Question: How many businesses accept insurance?

SELECT COUNT(T1.business_id) FROM Business_Attributes AS T1 INNER JOIN Attributes AS T2 ON T1.attribute_id = T2.attribute_id WHERE T2.attribute_name = 'Accepts Insurance' AND T1.attribute_value = 'true'


Question: What are the client ideas and details for clients with the sic code Bad?

SELECT client_id ,  client_details FROM Clients WHERE sic_code  =  "Bad";

What are the client ideas and details for clients with the sic code Bad ?

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


Question: What is the receipt date of the document with id 3?

SELECT receipt_date FROM Documents WHERE document_id = 3;

What is the receipt date of the document with i d 3 ?

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


Question: Among the artists from 1980 to 1982. Which artist was tagged as "disco"?

SELECT T1.artist FROM torrents AS T1 INNER JOIN tags AS T2 ON T1.id = T2.id WHERE T2.tag = 'disco' AND T1.groupYear BETWEEN 1980 AND 1982

Among the artists from 1980 to 1982 . Which artist was tagged as " disco " ?

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


Question: Please list the destination cities of all the flights that were cancelled on 2018/8/1.

SELECT DEST FROM Airlines WHERE FL_DATE = '2018/8/1' AND CANCELLED = 1 GROUP BY DEST

Please list the destination cities of all the flights that were cancelled on 2018/8/1 .

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


Question: What are the ids for papers with titles containing 'translation'?

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

What are the ids for papers with titles containing ' translation ' ?

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


Question: Sort all the rooms according to the price. Just report the room names.

SELECT roomName FROM Rooms ORDER BY basePrice;

Sort all the rooms according to the price . Just report the room names .

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


Question: Among the papers published in the journal "Molecular Brain", how many of them were published in the year 2011?

SELECT COUNT(T2.Id) FROM Journal AS T1 INNER JOIN Paper AS T2 ON T1.Id = T2.JournalId WHERE T2.Year = 2011 AND T1.FullName = 'Molecular Brain'

Among the papers published in the journal " Molecular Brain " , how many of them were published in the year 2011 ?

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


Question: Return the different statuses of cities, ascending by frequency.

SELECT Status FROM city GROUP BY Status ORDER BY COUNT(*) ASC

Return the different statuses of cities , ascending by frequency .


Question: How many students are older than average for each gender?

SELECT count(*) ,  sex FROM student WHERE age  >  (SELECT avg(age) FROM student) GROUP BY sex

How many students are older than average for each gender ?


Question: How many items in inventory does store 1 have?

SELECT count(*) FROM inventory WHERE store_id  =  1

How many items in inventory does store 1 have ?


Question: Give the names of all oil paintings created after 1910.

SELECT title FROM paintings WHERE YEAR  >  1910 AND medium  =  "oil"

Give the names of all oil paintings created after 1910 .

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


Question: What is the least common category?

SELECT category FROM categories GROUP BY category ORDER BY COUNT(podcast_id) ASC LIMIT 1


Question: Among all the residential areas in Arecibo county, what is the zip_code of the one with the highest white population?

SELECT T1.zip_code FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO' ORDER BY T1.white_population DESC LIMIT 1

Among all the residential areas in Arecibo county , what is the zip_code of the one with the highest white population ?

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


Question: What is the relation between object sample no.8 and object sample no.4 in image no.1?

SELECT T1.PRED_CLASS FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T2.IMG_ID = 1 AND T2.OBJ1_SAMPLE_ID = 8 AND T2.OBJ2_SAMPLE_ID = 4

What is the relation between object sample no.8 and object sample no.4 in image no.1 ?

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


Question: Find the number of routes from the United States to Canada.

SELECT count(*) FROM routes WHERE dst_apid IN (SELECT apid FROM airports WHERE country  =  'Canada') AND src_apid IN (SELECT apid FROM airports WHERE country  =  'United States')

Find the number of routes from the United States to Canada .

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


Question: Show the ids of students whose advisors are professors.

SELECT T2.StuID FROM Faculty AS T1 JOIN Student AS T2 ON T1.FacID  =  T2.advisor WHERE T1.rank  =  "Professor"

Show the ids of students whose advisors are professors .

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


Question: What is the net worth of the actor starred in Misery who has a height ranging from 60 to 70 inches tall?

SELECT T3.NetWorth 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 T1.Title = 'Misery' AND T3.`Height (Inches)` BETWEEN 60 AND 70 AND T3.Gender = 'Male'

What is the net worth of the actor starred in Misery who has a height ranging from 60 to 70 inches tall ?

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


Question: Find the titles of all the papers written by "Aaron Turon".

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 WHERE  t1.fname  =  "Aaron" AND t1.lname  =  "Turon"

Find the titles of all the papers written by " Aaron Turon " .

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


Question: For the only Yelp business in "Yuma" city, how many "medium" reviews did it get?

SELECT COUNT(T2.review_length) FROM Business AS T1 INNER JOIN Reviews AS T2 ON T1.business_id = T2.business_id WHERE T1.city LIKE 'Yuma' AND T2.review_length LIKE 'Medium'

For the only Yelp business in " Yuma " city , how many " medium " reviews did it get ?

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


Question: What is the total number of products that are in orders with status "Cancelled"?

SELECT sum(t2.order_quantity) FROM customer_orders AS t1 JOIN order_items AS t2 ON t1.order_id  =  t2.order_id WHERE t1.order_status  =  "Cancelled"

What is the total number of products that are in orders with status " Cancelled " ?

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


Question: Calculate the percentage of total payment of MARGARET MOORE customers.

SELECT CAST(SUM(IIF(T2.first_name = 'MARGARET' AND T2.last_name = 'MOORE', T1.amount, 0)) AS REAL) * 100 / SUM(T1.amount) FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id

Calculate the percentage of total payment of MARGARET MOORE customers .

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


Question: How many papers are published in each venue in each year?

SELECT count(*) ,  venue ,  YEAR FROM Paper GROUP BY venue ,  YEAR

How many papers are published in each venue in each year ?

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


Question: For the patients whose anti-SSB are normal, how many of them have other symptoms observed in their examination?

SELECT COUNT(DISTINCT T1.ID) FROM Examination AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.SSB = 'negative' OR '0' AND T1.Symptoms IS NOT NULL

For the patients whose anti - SSB are normal , how many of them have other symptoms observed in their examination ?

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


Question: Show the names and heights of buildings with at least two institutions founded after 1880.

SELECT T1.name ,  T1.height_feet FROM building AS T1 JOIN institution AS T2 ON T1.building_id  =  T2.building_id WHERE T2.founded  >  1880 GROUP BY T1.building_id HAVING count(*)  >=  2

Show the names and heights of buildings with at least two institutions founded after 1880 .

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


Question: Calculate the percentage of players who prefer left foot, who were born between 1987 and 1992.

SELECT CAST(COUNT(CASE WHEN t2.preferred_foot = 'left' THEN t1.id ELSE NULL END) AS REAL) * 100 / COUNT(t1.id) percent FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE SUBSTR(t1.birthday, 1, 4) BETWEEN '1987' AND '1992'

Calculate the percentage of players who prefer left foot , who were born between 1987 and 1992 .

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


Question: What are the basketball players' BMI ranges?

SELECT MIN(CAST(weight AS REAL) / (height * height)) , MAX(CAST(weight AS REAL) / (height * height)) FROM players

What are the basketball players ' BMI ranges ?


Question: Please list any five app categories that are related to games, along with their label ID.

SELECT category, label_id FROM label_categories WHERE category LIKE '%game%' LIMIT 5

Please list any five app categories that are related to games , along with their label ID .

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


Question: For each team, return the team name, id and the maximum salary among the team.

SELECT T1.name ,  T1.team_id ,  max(T2.salary) FROM team AS T1 JOIN salary AS T2 ON T1.team_id  =  T2.team_id GROUP BY T1.team_id;

For each team , return the team name , i d and the maximum salary among the team .

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


Question: Based on the number of current legislators, calculate the percentage of legislators that served in 21st-Century.

SELECT CAST(SUM(CASE WHEN strftime('%Y', T2.start) BETWEEN '2000' AND '2017' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T1.bioguide_id) FROM current AS T1 INNER JOIN `current-terms` AS T2 ON T1.bioguide_id = T2.bioguide

Based on the number of current legislators , calculate the percentage of legislators that served in 21st - Century .

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


Question: Show the parties that have both representatives in New York state and representatives in Pennsylvania state.

SELECT Party FROM representative WHERE State  =  "New York" INTERSECT SELECT Party FROM representative WHERE State  =  "Pennsylvania"

Show the parties that have both representatives in New York state and representatives in Pennsylvania state .

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


Question: For how many times has London held the Olympic games?

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

For how many times has London held the Olympic games ?


Question: Count the number of female students who belong to marines organization.

SELECT COUNT(*) FROM person AS T1 INNER JOIN enlist AS T2 ON T1.name = T2.name LEFT JOIN male AS T3 ON T1.name = T3.name WHERE T2.organ = 'marines' AND T3.name IS NULL

Count the number of female students who belong to marines organization .

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


Question: How many restaurants in the city of Richmond serve Mediterranean food?

SELECT COUNT(id_restaurant) FROM generalinfo WHERE food_type = 'mediterranean' AND city = 'richmond'

How many restaurants in the city of Richmond serve Mediterranean food ?

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


Question: What are the job ids for jobs done more than once for a period of more than 300 days?

SELECT job_id FROM job_history WHERE end_date - start_date  > 300 GROUP BY job_id HAVING COUNT(*) >= 2

What are the job ids for jobs done more than once for a period of more than 300 days ?

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


Question: Find the number of team franchises that are active (have 'Y' as "active" information).

SELECT count(*) FROM team_franchise WHERE active = 'Y';

Find the number of team franchises that are active ( have ' Y ' as " active " information ) .

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


Question: Indicate the business id and days which are opened from 8AM to 6PM.

SELECT DISTINCT day_id FROM Business_Hours WHERE opening_time = '8AM' AND closing_time = '6PM'

Indicate the business i d and days which are opened from 8AM to 6PM .

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


Question: Find all the name of documents without any sections.

SELECT document_name FROM documents WHERE document_code NOT IN (SELECT document_code FROM document_sections)

Find all the name of documents without any sections .


Question: How many views did the post titled 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer' get?

SELECT ViewCount FROM posts WHERE Title = 'Integration of Weka and/or RapidMiner into Informatica PowerCenter/Developer'

How many views did the post titled ' Integration of Weka and/or RapidMiner into Informatica PowerCenter / Developer ' get ?

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


Question: How many statements do we have?


Question: Find the average number of long-shot done by Ahmed Samir Farag.

SELECT CAST(SUM(t2.long_shots) AS REAL) / COUNT(t2.`date`) FROM Player AS t1 INNER JOIN Player_Attributes AS t2 ON t1.player_api_id = t2.player_api_id WHERE t1.player_name = 'Ahmed Samir Farag'

Find the average number of long - shot done by Ahmed Samir Farag .

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


Question: Find the names and descriptions of courses that belong to the subject named "Computer Science".

SELECT T1.course_name ,  T1.course_description FROM Courses AS T1 JOIN Subjects AS T2 ON T1.subject_id  =  T2.subject_id WHERE T2.subject_name  =  "Computer Science"

Find the names and descriptions of courses that belong to the subject named " Computer Science " .

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


Question: For how many clubs is "Tracy Kim" a member?

SELECT count(*) FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid  =  t2.clubid JOIN student AS t3 ON t2.stuid  =  t3.stuid WHERE t3.fname  =  "Tracy" AND t3.lname  =  "Kim"

For how many clubs is " Tracy Kim " a member ?

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


Question: How many problems are there for product voluptatem?

SELECT count(*) FROM product AS T1 JOIN problems AS T2 ON T1.product_id = T2.product_id WHERE T1.product_name = "voluptatem"

How many problems are there for product voluptatem ?


Question: What is the publisher name of the superhero ID 38?

SELECT T2.publisher_name FROM superhero AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.id WHERE T1.id = 38

What is the publisher name of the superhero ID 38 ?

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


Question: What is the name of the youngest male?

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


Question: How many churches opened before 1850 are there?

SELECT count(*) FROM Church WHERE Open_Date  <  1850

How many churches opened before 1850 are there ?


Question: Who reserved boat 102?

SELECT T1.name FROM Sailors AS T1 JOIN Reserves AS T2 ON T1.sid  =  T2.sid WHERE T2.bid  =  102


Question: What is the website for the schools under the administrations of Mike Larson and Dante Alvarez?

SELECT Website FROM schools WHERE (AdmFName1 = 'Mike' AND AdmLName1 = 'Larson') OR (AdmFName1 = 'Dante' AND AdmLName1 = 'Alvarez')

What is the website for the schools under the administrations of Mike Larson and Dante Alvarez ?

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


Question: Count the total number of settlements made.

Count the total number of settlements made .


Question: Show the first name and last name for the customer with account name 900.

SELECT T2.customer_first_name ,  T2.customer_last_name FROM Accounts AS T1 JOIN Customers AS T2 ON T1.customer_id  =  T2.customer_id WHERE T1.account_name  =  "900"

Show the first name and last name for the customer with account name 900 .

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


Question: What are the characters that were nominated for Primetime Emmy Award from 2009 to 2010 but did not win?

SELECT T2.character FROM Award AS T1 INNER JOIN Character_Award AS T2 ON T1.award_id = T2.award_id WHERE T1.award_category = 'Primetime Emmy' AND T1.year BETWEEN 2009 AND 2010 AND T1.result != 'Winner';

What are the characters that were nominated for Primetime Emmy Award from 2009 to 2010 but did not win ?

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


Question: Please list the names of the badges obtained by csgillespie.

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

Please list the names of the badges obtained by csgillespie .

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


Question: Count the number of students who have a detention record.

SELECT count(DISTINCT student_id) FROM Detention

Count the number of students who have a detention record .


Question: How much profit can the company gained from selling two high class black Road Bikes with a size of 58?

SELECT 2 * (T1.ListPrice - T1.StandardCost) FROM Product AS T1 INNER JOIN ProductSubcategory AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Class = 'H' AND T1.Color = 'Black' AND T1.Size = 58 AND T2.Name = 'Road Bikes'

How much profit can the company gained from selling two high class black Road Bikes with a size of 58 ?

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


Question: List down name of dishes from menu with menu page ID 1389.

SELECT T2.name FROM MenuItem AS T1 INNER JOIN Dish AS T2 ON T2.id = T1.dish_id WHERE T1.menu_page_id = 1389

List down name of dishes from menu with menu page ID 1389 .

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


Question: Which professor advised Faina Mallinar to become a research assistant? Please give his or her full name.

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

Which professor advised Faina Mallinar to become a research assistant ? Please give his or her full name .

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


Question: Give me the details of all the services that have interacted with the channel with detail "15 ij".

SELECT DISTINCT t1.service_details FROM services AS t1 JOIN customer_interactions AS t2 ON t1.service_id  =  t2.service_id JOIN channels AS t3 ON t2.channel_id  =  t3.channel_id WHERE t3.channel_details  =  "15 ij"

Give me the details of all the services that have interacted with the channel with detail " 15 ij " .

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


Question: How many disabled students have been absent for 3 months from school?

SELECT COUNT(T1.name) FROM longest_absense_from_school AS T1 INNER JOIN disabled AS T2 ON T1.name = T2.name WHERE T1.month = 3

How many disabled students have been absent for 3 months from school ?

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


Question: Calculate the difference between the number of customers and the number of subscribers who did the trip in June 2013.

SELECT SUM(IIF(subscription_type = 'Subscriber', 1, 0)) - SUM(IIF(subscription_type = 'Customer', 1, 0)) FROM trip WHERE start_date LIKE '6/%/2013%'

Calculate the difference between the number of customers and the number of subscribers who did the trip in June 2013 .

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


Question: What is the language of the smallest population country?

SELECT T2.Language FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode ORDER BY T1.Population ASC LIMIT 1

What is the language of the smallest population country ?


Question: Give me a list of id and status of orders which belong to the customer named "Jeramie".

SELECT T2.order_id ,  T2.order_status FROM customers AS T1 JOIN orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie"

Give me a list of i d and status of orders which belong to the customer named " Jeramie " .

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


Question: How many eateries are located in Hayward?

SELECT COUNT(business_id) FROM businesses WHERE city = 'HAYWARD'

How many eateries are located in Hayward ?


Question: For the goalie who had the most shutouts in 2010, what's his catching hand?

SELECT T2.shootCatch FROM Goalies AS T1 INNER JOIN Master AS T2 ON T1.playerID = T2.playerID WHERE T1.year = 2010 GROUP BY T2.shootCatch ORDER BY SUM(T1.SHO) DESC LIMIT 1

For the goalie who had the most shutouts in 2010 , what 's his catching hand ?

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


Question: What is the most common special features of science-fiction movies?

SELECT T1.special_features FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'sci-fi' ORDER BY T1.special_features DESC LIMIT 1

What is the most common special features of science - fiction movies ?


Question: In which year were most departments established?

SELECT creation FROM department GROUP BY creation ORDER BY count(*) DESC LIMIT 1

In which year were most departments established ?


Question: What is the molecule id of bond id TR001_1_7?

SELECT DISTINCT T1.molecule_id FROM atom AS T1 INNER JOIN connected AS T2 ON T1.atom_id = T2.atom_id WHERE T2.bond_id = 'TR001_1_7'

What is the molecule i d of bond i d TR001_1_7 ?

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


Question: Which season has the fewest number of matches?

SELECT Season_Id FROM `Match` GROUP BY Season_Id ORDER BY COUNT(Match_Id) LIMIT 1

Which season has the fewest number of matches ?


Question: Among the films starring PENELOPE GUINESS, how many of them are released in 2006?

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

Among the films starring PENELOPE GUINESS , how many of them are released in 2006 ?

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


Question: Find the ids of the employees who does not work in those departments where some employees works whose manager id within the range 100 and 200.

SELECT * FROM employees WHERE department_id NOT IN (SELECT department_id FROM departments WHERE manager_id BETWEEN 100 AND 200)

Find the ids of the employees who does not work in those departments where some employees works whose manager i d within the range 100 and 200 .

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


Question: Show the id of the employee named Ebba.

SELECT employee_ID FROM Employees WHERE employee_name  =  "Ebba"

Show the i d of the employee named Ebba .


Question: Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL.

SELECT T2.PlayerName FROM SeasonStatus AS T1 INNER JOIN PlayerInfo AS T2 ON T1.ELITEID = T2.ELITEID WHERE T1.TEAM = 'Chilliwack Chiefs' AND T1.P >= 100

Name the Chilliwack Chiefs players who have scored 100 points or more in the NHL .

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


Question: How many posts does the user csgillespie own?

SELECT COUNT(T1.id) FROM posts AS T1 INNER JOIN users AS T2 ON T1.OwnerUserId = T2.Id WHERE T2.DisplayName = 'csgillespie'

How many posts does the user csgillespie own ?


Question: List any five countries which use English as an official language.

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

List any five countries which use English as an official language .

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


Question: How many users mildly likes the 7 Minute Workout app and when was it last updated?

SELECT COUNT(T2.Sentiment_Polarity), T1."Last Updated" FROM playstore AS T1 INNER JOIN user_reviews AS T2 ON T1.App = T2.App WHERE T1.App = '7 Minute Workout' AND T2.Sentiment_Polarity BETWEEN 0 AND 0.5

How many users mildly likes the 7 Minute Workout app and when was it last updated ?

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


Question: Among the customers from Morocco, how many customers were in debt?

SELECT COUNT(T1.c_custkey) FROM customer AS T1 INNER JOIN nation AS T2 ON T1.c_nationkey = T2.n_nationkey WHERE T1.c_acctbal < 0 AND T2.n_name = 'MOROCCO'

Among the customers from Morocco , how many customers were in debt ?


Question: How many menus were created for lunch?

SELECT COUNT(*) FROM Menu WHERE event = 'LUNCH'


Question: Find the names of authors who have more than one book in the database.

SELECT t1.name FROM author AS t1 JOIN book AS t2 ON t1.author_id  =  t2.author_id GROUP BY t2.author_id HAVING count(*)  >  1

Find the names of authors who have more than one book in the database .

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


Question: How many percent of the population of China used Chinese as their language?

SELECT T2.Percentage FROM Country AS T1 INNER JOIN CountryLanguage AS T2 ON T1.Code = T2.CountryCode WHERE T1.Name = 'China' AND T2.Language = 'Chinese'

How many percent of the population of China used Chinese as their language ?

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


Question: How many projects are there?


Question: What are the ids of all students who have attended at least one course?

SELECT student_id FROM student_course_attendance

What are the ids of all students who have attended at least one course ?

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


Question: How many voice actors for the movie Aladdin?

SELECT COUNT('voice-actor') FROM `voice-actors` WHERE movie = 'Aladdin'

How many voice actors for the movie Aladdin ?

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


Question: How many members are there?


Question: In which years does the country whose Alpha2Code is 1A have a result of the indicator Adolescent fertility rate?

SELECT T2.Year FROM Country AS T1 INNER JOIN Indicators AS T2 ON T1.CountryCode = T2.CountryCode WHERE T1.Alpha2Code = '1A' AND T2.IndicatorName = 'Adolescent fertility rate (births per 1,000 women ages 15-19)'

In which years does the country whose Alpha2Code is 1A have a result of the indicator Adolescent fertility rate ?

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


Question: Find the number of users who posted some tweets.

Find the number of users who posted some tweets .


Question: Where is Malaysian Grand Prix held? Give the location coordinates.

SELECT DISTINCT T1.lat, T1.lng FROM circuits AS T1 INNER JOIN races AS T2 ON T2.circuitID = T1.circuitId WHERE T2.name = 'Malaysian Grand Prix'

Where is Malaysian Grand Prix held ? Give the location coordinates .

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


Question: Which stores do not have any headphones in stock? Give me the store names.

SELECT name FROM store WHERE store_id NOT IN (SELECT store_id FROM stock)

Which stores do not have any headphones in stock ? Give me the store names .

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


Question: Calculate the average rating of the true crime category.

SELECT AVG(T2.rating) FROM categories AS T1 INNER JOIN reviews AS T2 ON T2.podcast_id = T1.podcast_id WHERE T1.category = 'true-crime'

Calculate the average rating of the true crime category .

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


Question: What is the ratio of male and female users of vivo X5pro model?

SELECT SUM(IIF(T1.gender = 'M', 1, 0)) / SUM(IIF(T1.gender = 'F', 1, 0)) AS per FROM gender_age AS T1 INNER JOIN phone_brand_device_model2 AS T2 ON T1.device_id = T2.device_id WHERE T2.phone_brand = 'vivo' AND T2.device_model = 'X5Pro'

What is the ratio of male and female users of vivo X5pro model ?

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


Question: List the names of pilots that do not have any record.

SELECT Pilot_name FROM pilot WHERE Pilot_ID NOT IN (SELECT Pilot_ID FROM pilot_record)

List the names of pilots that do not have any record .


Question: List all the distinct cities


Question: Return the names of parties that have two or more events.

SELECT T2.party_name FROM party_events AS T1 JOIN party AS T2 ON T1.party_id  =  T2.party_id GROUP BY T1.party_id HAVING count(*)  >=  2

Return the names of parties that have two or more events .


Question: What is the full name of each student who is not allergic to any type of food.

SELECT fname ,  lname FROM Student WHERE StuID NOT IN (SELECT T1.StuID FROM Has_allergy AS T1 JOIN Allergy_Type AS T2 ON T1.Allergy  =  T2.Allergy WHERE T2.allergytype  =  "food")

What is the full name of each student who is not allergic to any type of food .

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


Question: Show the names of climbers and the heights of mountains they climb.

SELECT T1.Name ,  T2.Height FROM climber AS T1 JOIN mountain AS T2 ON T1.Mountain_ID  =  T2.Mountain_ID

Show the names of climbers and the heights of mountains they climb .

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


Question: Which teachers teach in classroom 109? Give me their last names.

SELECT lastname FROM teachers WHERE classroom  =  109

Which teachers teach in classroom 109 ? Give me their last names .

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


Question: What are the names, dates active, and number of deaths for storms that had 1 or more death?

SELECT name ,  dates_active ,  number_deaths FROM storm WHERE number_deaths  >=  1

What are the names , dates active , and number of deaths for storms that had 1 or more death ?

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


Question: How many episodes were aired between October and November 2008?

SELECT COUNT(episode_id) FROM Episode WHERE air_date LIKE '2008-10%' OR air_date LIKE '2008-11%';

How many episodes were aired between October and November 2008 ?

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


Question: Calculate the total quantity of products that are gifts.

SELECT SUM(T2.Quantity) FROM Products AS T1 INNER JOIN Sales AS T2 ON T1.ProductID = T2.ProductID WHERE T1.Price = 0

Calculate the total quantity of products that are gifts .


Question: List all the socks products.

SELECT T2.ProductID FROM ProductSubcategory AS T1 INNER JOIN Product AS T2 ON T1.ProductSubcategoryID = T2.ProductSubcategoryID WHERE T1.Name = 'Socks'


Question: List the platforms that release the most games each year.

SELECT T1.platform_name FROM platform AS T1 INNER JOIN game_platform AS T2 ON T1.id = T2.platform_id INNER JOIN game_publisher AS T3 ON T2.game_publisher_id = T3.id GROUP BY T2.release_year, T1.platform_name ORDER BY COUNT(DISTINCT T3.game_id) DESC

List the platforms that release the most games each year .

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


Question: How many object classes are there in the database?

SELECT COUNT(OBJ_CLASS_ID) FROM OBJ_CLASSES

How many object classes are there in the database ?


Question: Name the station and city with the most borrowed bike.

SELECT T2.start_station_name, T1.city FROM station AS T1 INNER JOIN trip AS T2 ON T2.start_station_name = T1.name GROUP BY T2.start_station_name ORDER BY COUNT(T2.start_station_name) DESC LIMIT 1

Name the station and city with the most borrowed bike .

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


Question: What is the average, highest and lowest annual payments collected between 1/1/2003 to 12/31/2005?

SELECT CAST(SUM(T1.amount) AS REAL) / 3, MAX(T1.amount) , MIN(T1.amount) FROM payments AS T1 INNER JOIN customers AS T2 ON T1.customerNumber = T2.customerNumber WHERE T1.paymentDate BETWEEN '2003-01-01' AND '2005-12-31'

What is the average , highest and lowest annual payments collected between 1/1/2003 to 12/31/2005 ?


Question: Describe the course level and list of person IDs who taught course ID of 147.

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

Describe the course level and list of person IDs who taught course ID of 147 .

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


Question: List the names of franchises that have at least two games.

SELECT Franchise FROM game GROUP BY Franchise HAVING COUNT(*)  >=  2

List the names of franchises that have at least two games .


Question: Give the maximum and minimum product prices for each product type, grouped and ordered by product type.

SELECT max(product_price) ,  min(product_price) ,  product_type_code FROM products GROUP BY product_type_code ORDER BY product_type_code

Give the maximum and minimum product prices for each product type , grouped and ordered by product type .

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


Question: Please list the countries of the gas stations with transactions taken place in June, 2013.

SELECT DISTINCT T2.Country FROM transactions_1k AS T1 INNER JOIN gasstations AS T2 ON T1.GasStationID = T2.GasStationID INNER JOIN yearmonth AS T3 ON T1.CustomerID = T3.CustomerID WHERE T3.Date = '201306'

Please list the countries of the gas stations with transactions taken place in June , 2013 .

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


Question: Tell me the name of the staff in charge of the attraction called "US museum".

SELECT T1.Name FROM STAFF AS T1 JOIN TOURIST_ATTRACTIONS AS T2 ON T1.Tourist_Attraction_ID  =  T2.Tourist_Attraction_ID WHERE T2.Name  =  "US museum"

Tell me the name of the staff in charge of the attraction called " US museum " .

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


Question: What is the average median female age of all the residential areas in the Arecibo county?

SELECT SUM(T1.female_median_age) / COUNT(T1.zip_code) FROM zip_data AS T1 INNER JOIN country AS T2 ON T1.zip_code = T2.zip_code WHERE T2.county = 'ARECIBO'

What is the average median female age of all the residential areas in the Arecibo county ?

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


Question: What is the percentage of the methods' solutions that need to be compiled among the methods whose comments is XML format?

SELECT CAST(SUM(CASE WHEN T1.WasCompiled = 0 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T2.CommentIsXml = 1

What is the percentage of the methods ' solutions that need to be compiled among the methods whose comments is XML format ?

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


Question: Show different manufacturers and the number of clubs they are associated with.

SELECT Manufacturer ,  COUNT(*) FROM club GROUP BY Manufacturer

Show different manufacturers and the number of clubs they are associated with .


Question: What are the different cities where people live?

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

What are the different cities where people live ?


Question: How many athlete from China participate in the 2016 Summer Olympics?

SELECT COUNT(T3.id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id INNER JOIN person AS T3 ON T2.person_id = T3.id INNER JOIN person_region AS T4 ON T3.id = T4.person_id INNER JOIN noc_region AS T5 ON T4.region_id = T5.id WHERE T1.games_name = '2016 Summer' AND T5.region_name = 'China'

How many athlete from China participate in the 2016 Summer Olympics ?

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


Question: Provide the directions for all the trains that have 2 or less cars.

SELECT T1.direction FROM trains AS T1 INNER JOIN ( SELECT train_id, MAX(position) AS trailPosi FROM cars GROUP BY train_id ) AS T2 ON T1.id = T2.train_id WHERE T2.trailPosi <= 2

Provide the directions for all the trains that have 2 or less cars .

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


Question: How many instrument does the musician with last name "Heilo" use?

SELECT count(DISTINCT instrument) FROM instruments AS T1 JOIN Band AS T2 ON T1.bandmateid  =  T2.id WHERE T2.lastname  =  "Heilo"

How many instrument does the musician with last name " Heilo " use ?

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


Question: What are the names and phone numbers for all suppliers, sorted in alphabetical order of their addressed?

SELECT T1.supplier_name ,  T1.supplier_phone FROM Suppliers AS T1 JOIN supplier_addresses AS T2 ON T1.supplier_id  =  T2.supplier_id JOIN addresses AS T3 ON T2.address_id  =  T3.address_id ORDER BY T3.address_details

What are the names and phone numbers for all suppliers , sorted in alphabetical order of their addressed ?

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


Question: What was the major type of crime that happened in the Rogers Park community area?

SELECT T1.fbi_code_no, T1.title FROM FBI_Code AS T1 INNER JOIN Crime AS T2 ON T1.fbi_code_no = T2.fbi_code_no INNER JOIN Community_Area AS T3 ON T2.community_area_no = T3.community_area_no WHERE T3.community_area_name = 'Rogers Park' GROUP BY T1.fbi_code_no, T1.title

What was the major type of crime that happened in the Rogers Park community area ?

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


Question: Provide the sunrise time recorded by the home weather station of store no.30 on 2014/2/21.

SELECT T1.sunrise FROM weather AS T1 INNER JOIN relation AS T2 ON T1.station_nbr = T2.station_nbr WHERE T1.`date` = '2014-02-21' AND store_nbr = 30

Provide the sunrise time recorded by the home weather station of store no.30 on 2014/2/21 .

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


Question: For each bed type, find the average room price.

SELECT bedType ,  avg(basePrice) FROM Rooms GROUP BY bedType;

For each bed type , find the average room price .

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


Question: Among the products under the type "promo brushed steel", how many of them are manufactured by Manufacturer#5?

SELECT COUNT(p_partkey) FROM part WHERE p_type = 'PROMO BRUSHED STEEL' AND p_mfgr = 'Manufacturer#5'

Among the products under the type " promo brushed steel " , how many of them are manufactured by Manufacturer#5 ?

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


Question: What is the social number of the person who made the most complaints?

SELECT T1.social FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID GROUP BY T1.client_id ORDER BY COUNT(T1.client_id) DESC LIMIT 1

What is the social number of the person who made the most complaints ?

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


Question: Between Northwest and Southeast of the United States, which territory one recorded the highest amount of sales last year?

SELECT Name FROM SalesTerritory WHERE CountryRegionCode = 'US' AND (Name = 'Northwest' OR Name = 'Southeast') ORDER BY SalesLastYear DESC LIMIT 1

Between Northwest and Southeast of the United States , which territory one recorded the highest amount of sales last year ?

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


Question: What are the names of technicians and the machine series that they repair?

SELECT T3.Name ,  T2.Machine_series FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id  =  T2.machine_id JOIN technician AS T3 ON T1.technician_ID  =  T3.technician_ID

What are the names of technicians and the machine series that they repair ?

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


Question: How many different types of crimes, according to the primary description, have occurred in the Hermosa neighborhood?

SELECT SUM(CASE WHEN T4.neighborhood_name = 'Hermosa' THEN 1 ELSE 0 END) FROM IUCR AS T1 INNER JOIN Crime AS T2 ON T2.iucr_no = T1.iucr_no INNER JOIN Community_Area AS T3 ON T3.community_area_no = T2.community_area_no INNER JOIN Neighborhood AS T4 ON T4.community_area_no = T3.community_area_no

How many different types of crimes , according to the primary description , have occurred in the Hermosa neighborhood ?

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


Question: What is the average quantity of each order for the book "Life Without Fear"?

SELECT CAST(SUM(T2.qty) AS REAL) / COUNT(T1.title_id) FROM titles AS T1 INNER JOIN sales AS T2 ON T1.title_id = T2.title_id WHERE T1.title = 'Life Without Fear'

What is the average quantity of each order for the book " Life Without Fear " ?

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


Question: What is the height and id of the tallest painting created before 1900?

SELECT max(height_mm) ,  paintingID FROM paintings WHERE YEAR  <  1900

What is the height and i d of the tallest painting created before 1900 ?

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


Question: Which skill is used in fixing the most number of faults? List the skill id and description.

SELECT T1.skill_id ,  T1.skill_description FROM Skills AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.skill_id  =  T2.skill_id GROUP BY T1.skill_id ORDER BY count(*) DESC LIMIT 1

Which skill is used in fixing the most number of faults ? List the skill i d and description .

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


Question: How many kinds of products are there in the the category of "dairy products"?

SELECT COUNT(T1.ProductID) FROM Products AS T1 INNER JOIN Categories AS T2 ON T1.CategoryID = T2.CategoryID WHERE T2.CategoryName = 'Dairy Products'

How many kinds of products are there in the the category of " dairy products " ?

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


Question: List all the streets where pizza-serving restaurants are found in San Jose.

SELECT T1.street_name FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T2.food_type = 'pizza' AND T1.city = 'san jose'

List all the streets where pizza - serving restaurants are found in San Jose .

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


Question: Find the names of nurses who are on call.

SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.EmployeeID  =  T2.nurse

Find the names of nurses who are on call .

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


Question: What is the ratio of author with affiliation and without affiliation?

SELECT CAST(SUM(CASE WHEN Affiliation IS NULL THEN 1 ELSE 0 END) AS REAL) / COUNT(*) FROM Author

What is the ratio of author with affiliation and without affiliation ?


Question: When the allergy starts for Angelo Buckridge.

SELECT T2.START FROM patients AS T1 INNER JOIN allergies AS T2 ON T1.patient = T2.PATIENT WHERE T1.first = 'Adolfo' AND T1.last = 'Schmitt' AND T2.STOP IS NOT NULL

When the allergy starts for Angelo Buckridge .


Question: What is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level, yet he or she is diagnosed with SLE?

SELECT COUNT(CASE WHEN T1.Diagnosis LIKE '%SLE%' THEN T1.ID ELSE 0 END) / COUNT(T1.ID) FROM Patient AS T1 INNER JOIN Laboratory AS T2 ON T1.ID = T2.ID WHERE T2.`GOT` >= 60

What is the percentage of patient who has a abnormal level of glutamic oxaloacetic transaminase level , yet he or she is diagnosed with SLE ?

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


Question: Please list the first names of the players with the most personal fouls in the 'NBL' league.

SELECT T1.firstName FROM players AS T1 INNER JOIN players_teams AS T2 ON T1.playerID = T2.playerID WHERE T2.lgID = 'NBL' GROUP BY T1.playerID, T1.firstName ORDER BY COUNT(PF) DESC LIMIT 1

Please list the first names of the players with the most personal fouls in the ' NBL ' league .

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


Question: How many of the "Hon Pagoda Stacking Chairs" have been sold in total in the west superstore?

SELECT SUM(T1.Quantity) FROM west_superstore AS T1 INNER JOIN product AS T2 ON T1.`Product ID` = T2.`Product ID` WHERE T2.`Product Name` = 'Hon Pagoda Stacking Chairs'

How many of the " Hon Pagoda Stacking Chairs " have been sold in total in the west superstore ?

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


Question: Which nation does the supplier with the account balance of "4393.04" belong to?

SELECT T2.n_name FROM supplier AS T1 INNER JOIN nation AS T2 ON T1.s_nationkey = T2.n_nationkey WHERE T1.s_acctbal = 4393.04

Which nation does the supplier with the account balance of " 4393.04 " belong to ?

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


Question: How many percent of senators were from class 1?

SELECT CAST(SUM(CASE WHEN class = 1 THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(*) FROM `historical-terms` WHERE type = 'sen'

How many percent of senators were from class 1 ?


Question: What is the biggest amount of payment for a rental made by Mary Smith?

SELECT T1.amount FROM payment AS T1 INNER JOIN customer AS T2 ON T1.customer_id = T2.customer_id WHERE T2.first_name = 'MARY' AND T2.last_name = 'SMITH' ORDER BY T1.amount DESC LIMIT 1

What is the biggest amount of payment for a rental made by Mary Smith ?

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


Question: Return the description and unit of measurement for products in the 'Herbs' category.

SELECT product_category_description ,  unit_of_measure FROM ref_product_categories WHERE product_category_code  =  "Herbs"

Return the description and unit of measurement for products in the ' Herbs ' category .

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


Question: What is the complete description of the researcher role.

SELECT role_description FROM Staff_Roles WHERE role_code  =  'researcher'

What is the complete description of the researcher role .


Question: How many policies are listed for the customer named "Dayana Robel"?

SELECT count(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id  =  t2.customer_id WHERE t1.customer_name  =  "Dayana Robel"

How many policies are listed for the customer named " Dayana Robel " ?

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


Question: List the product ID of the top five products, by descending order, the number of quantities in stock.

SELECT ProductID FROM Products ORDER BY UnitsInStock DESC LIMIT 5

List the product ID of the top five products , by descending order , the number of quantities in stock .

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


Question: What is the most common type of grade span served in the city of Adelanto?

SELECT GSserved FROM schools WHERE City = 'Adelanto' GROUP BY GSserved ORDER BY COUNT(GSserved) DESC LIMIT 1

What is the most common type of grade span served in the city of Adelanto ?

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


Question: What are the names of the people who have no friends who are students?

SELECT name FROM person EXCEPT SELECT T2.name FROM Person AS T1 JOIN PersonFriend AS T2 ON T1.name  =  T2.friend WHERE T1.job  =  'student'

What are the names of the people who have no friends who are students ?

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


Question: Who are the ministers and what parties do they belong to, listed descending by the times they took office?

SELECT minister ,  party_name FROM party ORDER BY took_office DESC

Who are the ministers and what parties do they belong to , listed descending by the times they took office ?

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


Question: What are the login names and family names of course author and tutors?

SELECT login_name ,  family_name FROM Course_Authors_and_Tutors

What are the login names and family names of course author and tutors ?

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


Question: What are the names of all reviewers that have rated 3 or more movies?

SELECT T2.name FROM Rating AS T1 JOIN Reviewer AS T2 ON T1.rID  =  T2.rID GROUP BY T1.rID HAVING COUNT(*)  >=  3

What are the names of all reviewers that have rated 3 or more movies ?

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


Question: For all movies where users left a critic, find the movie name, user, rating and critics comments from the user.

SELECT T2.movie_title, T1.user_id, T1.rating_score, T1.critic FROM ratings AS T1 INNER JOIN movies AS T2 ON T1.movie_id = T2.movie_id WHERE T1.critic IS NOT NULL

For all movies where users left a critic , find the movie name , user , rating and critics comments from the user .

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


Question: Show the description of transaction type with code "PUR".

SELECT transaction_type_description FROM Ref_Transaction_Types WHERE transaction_type_code	  =  "PUR"

Show the description of transaction type with code " PUR " .

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


Question: How many tweets have been posted on Wednesday?

SELECT COUNT(TweetID) FROM twitter WHERE Weekday = 'Wednesday'

How many tweets have been posted on Wednesday ?


Question: Which department has more than 1 head at a time? List the id, name and the number of heads.

SELECT T1.department_id ,  T1.name ,  count(*) FROM management AS T2 JOIN department AS T1 ON T1.department_id  =  T2.department_id GROUP BY T1.department_id HAVING count(*)  >  1

Which department has more than 1 head at a time ? List the i d , name and the number of heads .

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


Question: Find the name of theaters that has at least one movie playing.

SELECT name FROM movietheaters GROUP BY name HAVING count(*)  >=  1

Find the name of theaters that has at least one movie playing .


Question: How many stores belong to the most windy station?

SELECT COUNT(store_nbr) FROM relation WHERE station_nbr = ( SELECT station_nbr FROM weather ORDER BY avgspeed DESC LIMIT 1 )

How many stores belong to the most windy station ?


Question: What is the Simplified Chinese translation of the name of the set "Eighth Edition"?

SELECT T2.translation FROM sets AS T1 INNER JOIN set_translations AS T2 ON T2.setCode = T1.code WHERE T1.name = 'Eighth Edition' AND T2.language = 'Chinese Simplified'

What is the Simplified Chinese translation of the name of the set " Eighth Edition " ?

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


Question: What is the title of the first crime movie ever released?

SELECT T1.title FROM movie AS T1 INNER JOIN movie_genres AS T2 ON T1.movie_id = T2.movie_id INNER JOIN genre AS T3 ON T2.genre_id = T3.genre_id WHERE T3.genre_name = 'Crime' ORDER BY T1.release_date LIMIT 1

What is the title of the first crime movie ever released ?

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


Question: What are the names of customers who use payment method "Cash"?

SELECT customer_name FROM customers WHERE payment_method  =  "Cash"

What are the names of customers who use payment method " Cash " ?

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


Question: What are all of the movie names?


Question: How many cards are oversized, reprinted, and printed for promotions?

SELECT COUNT(id) FROM cards WHERE isOversized = 1 AND isReprint = 1 AND isPromo = 1

How many cards are oversized , reprinted , and printed for promotions ?

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


Question: Indicate the release year of the game with more than 200000 sales in Japan.

SELECT DISTINCT T3.release_year 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 WHERE T2.num_sales * 100000 > 200000 AND T1.region_name = 'Japan'

Indicate the release year of the game with more than 200000 sales in Japan .

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


Question: What are the faculty ids of all the male faculty members?

SELECT FacID FROM Faculty WHERE Sex  =  'M'

What are the faculty ids of all the male faculty members ?


Question: How many students have joined in the most common type of event? List the number, the event type and description.

SELECT count(*) ,  T2.event_type_code ,  T3.event_type_description FROM Students AS T1 JOIN Student_Events AS T2 ON T1.student_id  =  T2.student_id JOIN Ref_Event_Types AS T3 ON T2.event_type_code  =  T3.event_type_code GROUP BY T2.event_type_code ORDER BY count(*) DESC LIMIT 1

How many students have joined in the most common type of event ? List the number , the event type and description .

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


Question: Among the repository "3", how many methods whose comments is XML format?

SELECT COUNT(T2.SolutionId) FROM Solution AS T1 INNER JOIN Method AS T2 ON T1.Id = T2.SolutionId WHERE T1.RepoId = 3 AND T2.CommentIsXml = 1

Among the repository " 3 " , how many methods whose comments is XML format ?

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


Question: What is the name of the city closest to Chicago?

SELECT T3.city_name FROM Direct_distance AS T1 JOIN City AS T2 ON T1.city1_code  =  T2.city_code JOIN City AS T3 ON T1.city2_code  =  T3.city_code WHERE T2.city_name  =  "Chicago" ORDER BY distance LIMIT 1

What is the name of the city closest to Chicago ?

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


Question: What are the names of patients who are staying in room 111 and have an undergoing treatment?

SELECT DISTINCT T2.name FROM undergoes AS T1 JOIN patient AS T2 ON T1.patient = T2.SSN JOIN stay AS T3 ON T1.Stay  =  T3.StayID WHERE T3.room  =  111

What are the names of patients who are staying in room 111 and have an undergoing treatment ?

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


Question: What is the number of days that had an average humity above 50 and an average visibility above 8?

SELECT COUNT(*) FROM weather WHERE mean_humidity  >  50 AND mean_visibility_miles  >  8

What is the number of days that had an average humity above 50 and an average visibility above 8 ?

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


Question: List the student's email with grade of B in a course with difficulty greater than the 80% of average difficulty of all courses.

SELECT T2.email FROM registration AS T1 INNER JOIN student AS T2 ON T1.student_id = T2.student_id INNER JOIN course AS T3 ON T1.course_id = T3.course_id WHERE T1.grade = 'B' GROUP BY T3.diff HAVING T3.diff > AVG(T3.diff) * 0.8

List the student 's email with grade of B in a course with difficulty greater than the 80 % of average difficulty of all courses .

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


Question: What is the most consecutive games tied by Ebbsfleet as an away team in the 2008 season?

SELECT COUNT(*) FROM matchs WHERE season = 2008 AND AwayTeam = 'Ebbsfleet' AND FTR = 'D'

What is the most consecutive games tied by Ebbsfleet as an away team in the 2008 season ?

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


Question: What is the amount of debt that client number 992 has, and how is this client doing with payments?

SELECT T4.amount, T4.status FROM client AS T1 INNER JOIN disp AS T2 ON T1.client_id = T2.client_id INNER JOIN account AS T3 on T2.account_id = T3.account_id INNER JOIN loan AS T4 ON T3.account_id = T4.account_id WHERE T1.client_id = 992

What is the amount of debt that client number 992 has , and how is this client doing with payments ?

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


Question: What are the names and ids of the different albums, and how many tracks are on each?

SELECT T1.Title ,  T2.AlbumID ,  COUNT(*) FROM ALBUM AS T1 JOIN TRACK AS T2 ON T1.AlbumId  =  T2.AlbumId GROUP BY T2.AlbumID

What are the names and ids of the different albums , and how many tracks are on each ?

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


Question: What are the ids and details of events that have more than one participants?

SELECT T1.event_id ,  T1.event_details FROM EVENTS AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID  =  T2.Event_ID GROUP BY T1.Event_ID HAVING count(*)  >  1

What are the ids and details of events that have more than one participants ?

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


Question: What is the name of the district with the most residents?

SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1

What is the name of the district with the most residents ?


Question: Find the addresses and author IDs of the course authors that teach at least two courses.

SELECT T1.address_line_1 ,  T2.author_id FROM Course_Authors_and_Tutors AS T1 JOIN Courses AS T2 ON T1.author_id  =  T2.author_id GROUP BY T2.author_id HAVING Count(*)  >=  2

Find the addresses and author IDs of the course authors that teach at least two courses .

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


Question: Find the team of each player and sort them in ascending alphabetical order.

SELECT Team FROM player ORDER BY Team ASC

Find the team of each player and sort them in ascending alphabetical order .

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


Question: What is the average value of boxes?


Question: Write down the number of running business with each review count in Cave Creek city.

SELECT SUM(CASE WHEN review_count = 'High' THEN 1 ELSE 0 END) AS high , SUM(CASE WHEN review_count = 'Medium' THEN 1 ELSE 0 END) AS Medium , SUM(CASE WHEN review_count = 'Low' THEN 1 ELSE 0 END) AS low FROM Business WHERE city = 'Cave Creek' AND active = 'true'

Write down the number of running business with each review count in Cave Creek city .

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


Question: What is the most common condition among the patients who received influenza seasonal injectable preservative free immunization?

SELECT T2.DESCRIPTION FROM immunizations AS T1 INNER JOIN conditions AS T2 ON T1.patient = T2.PATIENT WHERE T1.DESCRIPTION = 'Influenza  seasonal  injectable  preservative free' GROUP BY T2.DESCRIPTION ORDER BY COUNT(T2.DESCRIPTION) DESC LIMIT 1

What is the most common condition among the patients who received influenza seasonal injectable preservative free immunization ?

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


Question: Which position did Mike Antonovich play?

SELECT T1.pos FROM Master AS T1 INNER JOIN AwardsPlayers AS T2 ON T1.playerID = T2.playerID WHERE T1.firstName = 'Mike' AND T1.lastName = 'Antonovich'

Which position did Mike Antonovich play ?


Question: State the country and its population with population growth greater than 2% but infant mortality rate less than 5%.

SELECT T1.Name, T1.Population FROM country AS T1 INNER JOIN population AS T2 ON T1.Code = T2.Country WHERE T2.Population_Growth > 2 AND T2.Infant_Mortality < 5

State the country and its population with population growth greater than 2 % but infant mortality rate less than 5 % .

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


Question: How many universities are located in Japan?

SELECT COUNT(*) FROM university AS T1 INNER JOIN country AS T2 ON T1.country_id = T2.id WHERE T2.country_name = 'Japan'

How many universities are located in Japan ?


Question: What is the average salary of sales representatives in the United Kingdom?

SELECT AVG(Salary) FROM Employees WHERE Title = 'Sales Representative' AND Country = 'UK'

What is the average salary of sales representatives in the United Kingdom ?

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


Question: How many times does the word "riu" appears in the biwords pair?

SELECT COUNT(T1.wid) FROM words AS T1 INNER JOIN biwords AS T2 ON T1.wid = T2.w1st INNER JOIN words AS T3 ON T3.wid = T2.w2nd WHERE T1.word = 'riu'

How many times does the word " riu " appears in the biwords pair ?

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


Question: How many papers were written by authors who cooperated with University of Hong Kong?

SELECT COUNT(T2.PaperId) FROM Author AS T1 INNER JOIN PaperAuthor AS T2 ON T1.Id = T2.AuthorId WHERE T1.Affiliation = 'University of Hong Kong'

How many papers were written by authors who cooperated with University of Hong Kong ?

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


Question: Under the in-charge of inside sales coordinator, provide the product lists which were shipped to Mexico in 1996.

SELECT T4.ProductName FROM Employees AS T1 INNER JOIN Orders AS T2 ON T1.EmployeeID = T2.EmployeeID INNER JOIN `Order Details` AS T3 ON T2.OrderID = T3.OrderID INNER JOIN Products AS T4 ON T3.ProductID = T4.ProductID WHERE T1.Title = 'Inside Sales Coordinator' AND T2.ShippedDate LIKE '1996%' AND T2.ShipCountry = 'Mexico'

Under the in - charge of inside sales coordinator , provide the product lists which were shipped to Mexico in 1996 .

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


Question: What is the owner of the channel that has the highest rating ratio?

SELECT OWNER FROM channel ORDER BY rating_in_percent DESC LIMIT 1

What is the owner of the channel that has the highest rating ratio ?

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


Question: What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace?

SELECT title FROM film WHERE LENGTH  >  100 OR rating  =  'PG' EXCEPT SELECT title FROM film WHERE replacement_cost  >  200

What are the titles of films that are either longer than 100 minutes or rated PG other than those that cost more than 200 to replace ?

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


Question: What are the names of the heads who are born outside the California state?

SELECT name FROM head WHERE born_state != 'California'

What are the names of the heads who are born outside the California state ?

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


Question: What are the public schools and what are their locations?

SELECT school ,  LOCATION FROM university WHERE affiliation  =  'Public'

What are the public schools and what are their locations ?

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


Question: Find the number of customers in total.


Question: What is the average household income in the city known as "Danzig"?

SELECT T2.avg_income_per_household FROM avoid AS T1 INNER JOIN zip_data AS T2 ON T1.zip_code = T2.zip_code WHERE T1.bad_alias = 'Danzig'

What is the average household income in the city known as " Danzig " ?

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


Question: What is the name of the course that has the most student enrollment?

SELECT T1.course_name FROM Courses AS T1 JOIN Student_Course_Enrolment AS T2 ON T1.course_id  =  T2.course_id GROUP BY T1.course_name ORDER BY COUNT(*) DESC LIMIT 1

What is the name of the course that has the most student enrollment ?

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


Question: List 5 device models that users use to install the app and are active in using the app.

SELECT T1.device_model FROM phone_brand_device_model2 AS T1 INNER JOIN events AS T2 ON T1.device_id = T2.event_id INNER JOIN app_events AS T3 ON T2.event_id = T3.event_id WHERE T3.is_active = 1 AND T3.is_installed = 1 LIMIT 5

List 5 device models that users use to install the app and are active in using the app .

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


Question: When are the birthdays of customer who are classified as 'Good Customer' status?

SELECT date_of_birth FROM Customers WHERE customer_status_code  =  'Good Customer'

When are the birthdays of customer who are classified as ' Good Customer ' status ?

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


Question: Paul di Resta was in the No. 853 race, what percent faster did he finish in the 853rd race than the next race for the fastest lap speed?

SELECT (SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) - SUM(IIF(T2.raceId = 854, T2.fastestLapSpeed, 0))) * 100 / SUM(IIF(T2.raceId = 853, T2.fastestLapSpeed, 0)) FROM drivers AS T1 INNER JOIN results AS T2 ON T2.driverId = T1.driverId WHERE T1.forename = 'Paul' AND T1.surname = 'di Resta'

Paul di Resta was in the No . 853 race , what percent faster did he finish in the 853rd race than the next race for the fastest lap speed ?

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


Question: How many teachers in Twin Falls have Math & Science as their primary focus area?

SELECT COUNT(teacher_acctid) FROM projects WHERE school_county = 'Twin Falls' AND primary_focus_area = 'Math & Science'

How many teachers in Twin Falls have Math & Science as their primary focus area ?

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


Question: Show the fleet series of the aircrafts flied by pilots younger than 34

SELECT T2.Fleet_Series FROM pilot_record AS T1 JOIN aircraft AS T2 ON T1.Aircraft_ID  =  T2.Aircraft_ID JOIN pilot AS T3 ON T1.Pilot_ID  =  T3.Pilot_ID WHERE T3.Age  <  34

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


Question: What are the course names, ordered by credits?

SELECT CName FROM COURSE ORDER BY Credits

What are the course names , ordered by credits ?


Question: What are the names of cities that are in counties that have a crime rate below 100?

SELECT name FROM city WHERE county_id IN (SELECT county_id FROM county_public_safety WHERE Crime_rate  <  100)

What are the names of cities that are in counties that have a crime rate below 100 ?

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


Question: List the top 5 genres by number of tracks. List genres name and total tracks.

SELECT T1.name ,  COUNT(*) FROM genres AS T1 JOIN tracks AS T2 ON T2.genre_id  =  T1.id GROUP BY T1.id ORDER BY count(*) DESC LIMIT 5;

List the top 5 genres by number of tracks . List genres name and total tracks .

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


Question: What is the category and typical buying price  of the product with name "cumin"?

SELECT product_category_code ,  typical_buying_price FROM products WHERE product_name  =  "cumin"

What is the category and typical buying price of the product with name " cumin " ?

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


Question: Which airline operated more flights on 2018/8/1, American Airlines Inc. or Endeavor Air Inc.?

SELECT CASE WHEN COUNT(CASE WHEN T3.Description = 'American Airlines Inc.: AA' THEN 1 ELSE NULL END) > COUNT(CASE WHEN T3.Description = 'Endeavor Air Inc.: 9E' THEN 1 ELSE NULL END) THEN 'American Airlines Inc.: AA' ELSE 'Endeavor Air Inc.: 9E' END AS RESULT FROM Airports AS T1 INNER JOIN Airlines AS T2 ON T1.Code = T2.ORIGIN INNER JOIN `Air Carriers` AS T3 ON T2.OP_CARRIER_AIRLINE_ID = T3.Code WHERE T2.FL_DATE = '2018/8/1'

Which airline operated more flights on 2018/8/1 , American Airlines Inc. or Endeavor Air Inc. ?

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


Question: Sum up the votes from star 1 to 5 for all of the contestants in Blimp Award.

SELECT T2.stars, SUM(T2.stars) FROM Award AS T1 INNER JOIN Vote AS T2 ON T2.episode_id = T1.episode_id WHERE T1.award_category = 'Blimp Award' AND T2.stars BETWEEN 1 AND 5 GROUP BY T2.stars;

Sum up the votes from star 1 to 5 for all of the contestants in Blimp Award .

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


Question: Find the ids of goods that have apple flavor.

SELECT id FROM goods WHERE flavor  =  "Apple"

Find the ids of goods that have apple flavor .

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


Question: How many restaurants in Broadway, Oakland received a review of no more than 3?

SELECT COUNT(T1.id_restaurant) FROM location AS T1 INNER JOIN generalinfo AS T2 ON T1.city = T2.city WHERE T1.street_name = 'broadway' AND T2.review < 3 AND T1.city = 'oakland'

How many restaurants in Broadway , Oakland received a review of no more than 3 ?

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


Question: What is the average download for entertainment apps with size no more than 1.0 M?

SELECT AVG(CAST(REPLACE(REPLACE(Installs, ',', ''), '+', '') AS INTEGER)) FROM playstore WHERE Category = 'ENTERTAINMENT' AND Size < '1.0M'

What is the average download for entertainment apps with size no more than 1.0 M ?

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


Question: What sales channels are used the most in the 3 places with the highest median income?

SELECT `Sales Channel` FROM ( SELECT T1.`Sales Channel` FROM `Sales Orders` AS T1 INNER JOIN `Store Locations` AS T2 ON T2.StoreID = T1._StoreID ORDER BY T2.`Median Income` DESC LIMIT 3 ) GROUP BY `Sales Channel` ORDER BY COUNT(`Sales Channel`) DESC LIMIT 1

What sales channels are used the most in the 3 places with the highest median income ?

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


Question: How many events were held at coordinate 97,40?

SELECT COUNT(event_id) FROM `events` WHERE latitude = 40 AND longitude = 97

How many events were held at coordinate 97,40 ?


Question: How many reservations exist for each boat?

SELECT bid ,  count(*) FROM Reserves GROUP BY bid

How many reservations exist for each boat ?


Question: Please calculate the average total price of orders from Exoto Designs Vendor in 2005.

SELECT SUM(T2.quantityOrdered * T2.priceEach) / COUNT(T3.orderNumber) FROM products AS T1 INNER JOIN orderdetails AS T2 ON T1.productCode = T2.productCode INNER JOIN orders AS T3 ON T2.orderNumber = T3.orderNumber WHERE T1.productVendor = 'Exoto Designs' AND STRFTIME('%Y', T3.orderDate) = '2005'

Please calculate the average total price of orders from Exoto Designs Vendor in 2005 .

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


Question: What are the names of customers who have purchased both products Latte and Americano?

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 JOIN products AS t4 ON t3.product_id  =  t4.product_id WHERE t4.product_details  =  'Latte' INTERSECT 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 JOIN products AS t4 ON t3.product_id  =  t4.product_id WHERE t4.product_details  =  'Americano'

What are the names of customers who have purchased both products Latte and Americano ?

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


Question: Which movies did the company Paramount Pictures produce in 2000?

SELECT T3.title FROM production_company AS T1 INNER JOIN movie_company AS T2 ON T1.company_id = T2.company_id INNER JOIN movie AS T3 ON T2.movie_id = T3.movie_id WHERE T1.company_name = 'Paramount Pictures' AND CAST(STRFTIME('%Y', T3.release_date) AS INT) = 2000

Which movies did the company Paramount Pictures produce in 2000 ?

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


Question: Please list all the years in which the car model Chevrolet Impala was introduced in the market.

SELECT DISTINCT T1.model_year FROM production AS T1 INNER JOIN data AS T2 ON T1.ID = T2.ID WHERE T2.car_name = 'chevrolet impala'

Please list all the years in which the car model Chevrolet Impala was introduced in the market .

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


Question: Count the number of submissions.


Question: How many unemployed students have payment due?

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

How many unemployed students have payment due ?


Question: On image no. 5, name the attributes that are composed of multiple objects.

SELECT T2.ATT_CLASS FROM IMG_OBJ_ATT AS T1 INNER JOIN ATT_CLASSES AS T2 ON T1.ATT_CLASS_ID = T2.ATT_CLASS_ID WHERE T1.IMG_ID = 5 GROUP BY T2.ATT_CLASS HAVING COUNT(T2.ATT_CLASS) > 2

On image no . 5 , name the attributes that are composed of multiple objects .


Question: What are the names of regions that were affected by the storm in which the most people died?

SELECT T2.region_name FROM affected_region AS T1 JOIN region AS T2 ON T1.region_id  =  T2.region_id JOIN storm AS T3 ON T1.storm_id  =  T3.storm_id ORDER BY T3.Number_Deaths DESC LIMIT 1

What are the names of regions that were affected by the storm in which the most people died ?

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


Question: Select all details of all warehouses.


Question: What procedures cost less than 5000 and have John Wen as a trained physician?

SELECT name FROM procedures WHERE cost  <  5000 INTERSECT SELECT T3.name FROM physician AS T1 JOIN trained_in AS T2 ON T1.employeeid  =  T2.physician JOIN procedures AS T3 ON T3.code  =  T2.treatment WHERE T1.name  =  "John Wen"

What procedures cost less than 5000 and have John Wen as a trained physician ?

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


Question: What is the glucose level of the patient that lives at 365 Della Crossroad Suite 202, Deerfield, MA 01342 US?

SELECT DISTINCT T2.DESCRIPTION, T2.VALUE, T2.UNITS FROM patients AS T1 INNER JOIN observations AS T2 ON T1.patient = T2.PATIENT WHERE T2.DESCRIPTION = 'Glucose' AND T1.address = '365 Della Crossroad Suite 202 Deerfield MA 01342 US'

What is the glucose level of the patient that lives at 365 Della Crossroad Suite 202 , Deerfield , MA 01342 US ?

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


Question: Return the full names of users who live in properties that they own.

SELECT first_name ,  middle_name ,  last_name FROM Properties AS T1 JOIN Users AS T2 ON T1.owner_user_id  =  T2.user_id WHERE T1.property_address_id  =  T2.user_address_id;

Return the full names of users who live in properties that they own .


Question: List the first name middle name and last name of all staff.

SELECT first_name ,  middle_name ,  last_name FROM Staff;

List the first name middle name and last name of all staff .

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


Question: What are the percentage of hispanics in cities with the black percentage higher than 10?

SELECT Hispanic FROM city WHERE Black  >  10

What are the percentage of hispanics in cities with the black percentage higher than 10 ?

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


Question: What answer did user No. 2681 give to the question "Do you currently have a mental health disorder?"?

SELECT T1.AnswerText FROM Answer AS T1 INNER JOIN Question AS T2 ON T1.QuestionID = T2.questionid WHERE T2.questiontext = 'Do you currently have a mental health disorder?' AND T1.UserID = 2681

What answer did user No . 2681 give to the question " Do you currently have a mental health disorder ? " ?

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


Question: List the store ID of the film titled "Amadeus Holy".

SELECT T2.store_id FROM film AS T1 INNER JOIN inventory AS T2 ON T1.film_id = T2.film_id WHERE T1.title = 'Amadeus Holy'

List the store ID of the film titled " Amadeus Holy " .

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


Question: Count the number of players who enter hall of fame for each year.

SELECT yearid ,  count(*) FROM hall_of_fame GROUP BY yearid;

Count the number of players who enter hall of fame for each year .

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