question: Among the clients born between 1980 and 2000, list the name of male clients who complained through referral.

SQL: SELECT T1.first, T1.middle, T1.last FROM client AS T1 INNER JOIN events AS T2 ON T1.client_id = T2.Client_ID WHERE T1.year BETWEEN 1980 AND 2000 AND T1.sex = 'Male' AND T2.`Submitted via` = 'Referral'

tokens: Among the clients born between 1980 and 2000 , list the name of male clients who complained through referral .

type: table

value: clients

type: value

value: male

value: referral

dber_tags: O O B-TABLE O O B-VALUE O B-VALUE O O O O O B-VALUE B-TABLE O O O B-VALUE O


db_id: superhero

question: Who is the dumbest superhero?

SQL: SELECT T1.superhero_name FROM superhero AS T1 INNER JOIN hero_attribute AS T2 ON T1.id = T2.hero_id INNER JOIN attribute AS T3 ON T2.attribute_id = T3.id WHERE T3.attribute_name = 'Intelligence' ORDER BY T2.attribute_value LIMIT 1

tokens: Who is the dumbest superhero ?

value: superhero

dber_tags: O O O O B-TABLE O


db_id: superstore

question: Who is the customer from the East region that purchased the order with the highest profit?

SQL: SELECT T2.`Customer Name` FROM east_superstore AS T1 INNER JOIN people AS T2 ON T1.`Customer ID` = T2.`Customer ID` WHERE T1.Region = 'East' ORDER BY T1.Profit DESC LIMIT 1

tokens: Who is the customer from the East region that purchased the order with the highest profit ?

type: column

value: customer

value: East

value: region

value: order

value: profit

dber_tags: O O O B-COLUMN O O B-VALUE B-COLUMN O O O B-COLUMN O O O B-COLUMN O


question: What are the names of manufacturers with revenue greater than the average of all revenues?

SQL: SELECT name FROM manufacturers WHERE revenue  >  (SELECT avg(revenue) FROM manufacturers)

tokens: What are the names of manufacturers with revenue greater than the average of all revenues ?

value: names

value: manufacturers

value: revenue

value: revenues

dber_tags: O O O B-COLUMN O B-TABLE O B-COLUMN O O O O O O B-COLUMN O


question: What is the title of the course with Differential Geometry as a prerequisite?

SQL: SELECT title FROM course WHERE course_id IN (SELECT T1.course_id FROM prereq AS T1 JOIN course AS T2 ON T1.prereq_id  =  T2.course_id WHERE T2.title  =  'Differential Geometry')

tokens: What is the title of the course with Differential Geometry as a prerequisite ?

value: title

value: course

value: Differential Geometry

value: prerequisite

dber_tags: O O O B-COLUMN O O B-TABLE O B-VALUE I-VALUE O O B-TABLE O


db_id: address

question: Which state is Outagamie County in? Give the full name of the state.

SQL: SELECT DISTINCT T2.name FROM country AS T1 INNER JOIN state AS T2 ON T1.state = T2.abbreviation WHERE T1.county = 'OUTAGAMIE'

tokens: Which state is Outagamie County in ? Give the full name of the state .

value: state

value: Outagamie

value: County

value: name

dber_tags: O B-TABLE O B-VALUE B-COLUMN O O O O O B-COLUMN O O B-TABLE O


db_id: university

question: In which year did university ID 1 have the most students?

SQL: SELECT year FROM university_year WHERE university_id = 1 ORDER BY num_students DESC LIMIT 1

tokens: In which year did university ID 1 have the most students ?

value: year

value: university ID

value: students

dber_tags: O O B-COLUMN O B-COLUMN I-COLUMN B-VALUE O O O B-COLUMN O


question: List the personal names and family names of all the students in alphabetical order of family name.

SQL: SELECT personal_name ,  family_name FROM Students ORDER BY family_name

tokens: List the personal names and family names of all the students in alphabetical order of family name .

value: personal names

value: family names

value: family name

dber_tags: O O B-COLUMN I-COLUMN O B-COLUMN I-COLUMN O O O B-TABLE O O O O B-COLUMN I-COLUMN O


question: What is the name of the player who has been chosen the most times for 'Man of the Series'?

SQL: SELECT T3.Player_Name FROM Season AS T1 INNER JOIN Match AS T2 ON T1.Man_of_the_Series = T2.Man_of_the_Match INNER JOIN Player AS T3 ON T2.Man_of_the_Match = T3.Player_Id GROUP BY T3.Player_Name ORDER BY COUNT(T1.Man_of_the_Series) DESC LIMIT 1

tokens: What is the name of the player who has been chosen the most times for ' Man of the Series ' ?

value: player

value: Man of the Series

dber_tags: O O O B-COLUMN O O B-TABLE O O O O O O O O O B-COLUMN I-COLUMN I-COLUMN I-COLUMN O O


question: Describe the full names, emails and intelligence of the students with the highest capability and salary.

SQL: SELECT f_name, l_name, email, intelligence FROM student WHERE student_id IN ( SELECT student_id FROM RA WHERE salary = 'high' AND capability = ( SELECT MAX(capability) FROM RA ) )

tokens: Describe the full names , emails and intelligence of the students with the highest capability and salary .

value: names

value: emails

value: intelligence

value: capability

value: salary

dber_tags: O O O B-COLUMN O B-COLUMN O B-COLUMN O O B-TABLE O O O B-COLUMN O B-COLUMN O


question: Find the name and internet web of the channel that is directed by the most directors.

SQL: SELECT t1.name ,  t1.internet FROM channel AS t1 JOIN director_admin AS t2 ON t1.channel_id  =  t2.channel_id GROUP BY t1.channel_id ORDER BY count(*) DESC LIMIT 1

tokens: Find the name and internet web of the channel that is directed by the most directors .

value: internet

value: channel

value: directors

dber_tags: O O B-COLUMN O B-COLUMN O O O B-TABLE O O O O O O B-TABLE O


question: How many films in the horror category were included in PG-13-rated?

SQL: SELECT COUNT(T1.film_id) FROM film AS T1 INNER JOIN film_category AS T2 ON T1.film_id = T2.film_id INNER JOIN category AS T3 ON T2.category_id = T3.category_id WHERE T3.name = 'Horror' AND T1.rating = 'PG-13'

tokens: How many films in the horror category were included in PG-13 - rated ?

value: films

value: horror

value: category

dber_tags: O O B-TABLE O O B-VALUE B-TABLE O O O B-VALUE O O O


question: Compute the average active time span of contact channels.

SQL: SELECT avg(active_to_date - active_from_date) FROM customer_contact_channels

tokens: Compute the average active time span of contact channels .

value: active

value: contact channels

dber_tags: O O O B-COLUMN O O O B-TABLE I-TABLE O


question: For each zip code, return the average mean temperature of August there.

SQL: SELECT zip_code  ,  avg(mean_temperature_f) FROM weather WHERE date LIKE "8/%" GROUP BY zip_code

tokens: For each zip code , return the average mean temperature of August there .

value: zip code

value: mean temperature

value: August

dber_tags: O O B-COLUMN I-COLUMN O O O O B-COLUMN I-COLUMN O B-VALUE O O


db_id: menu

question: What is the page count for menu with page ID of 130?

SQL: SELECT T1.page_count FROM Menu AS T1 INNER JOIN MenuPage AS T2 ON T1.id = T2.menu_id WHERE T2.id = 130

tokens: What is the page count for menu with page ID of 130 ?

value: page count

value: menu

value: page ID

dber_tags: O O O B-COLUMN I-COLUMN O B-TABLE O B-COLUMN I-COLUMN O B-VALUE O


question: List down the name of strategy games.

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

tokens: List down the name of strategy games .

value: name

value: strategy

value: games

dber_tags: O O O B-COLUMN O B-VALUE B-TABLE O


question: Among the players who use the right hand as their batting hand, how many of them were born after 1985?

SQL: SELECT SUM(CASE WHEN SUBSTR(T1.DOB, 1, 4) > 1985 THEN 1 ELSE 0 END) FROM Player AS T1 INNER JOIN Batting_Style AS T2 ON T1.Batting_hand = T2.Batting_Id WHERE T2.Batting_Hand = 'Right-hand bat'

tokens: Among the players who use the right hand as their batting hand , how many of them were born after 1985 ?

value: players

value: right hand

value: batting hand

dber_tags: O O B-TABLE O O O B-VALUE I-VALUE O O B-COLUMN I-COLUMN O O O O O O O O B-VALUE O


question: Count the number of different parties.

SQL: SELECT count(DISTINCT party_name) FROM party

tokens: Count the number of different parties .

value: parties

dber_tags: O O O O O B-TABLE O


db_id: railway

question: List the object number of railways that do not have any trains.

SQL: SELECT ObjectNumber FROM railway WHERE Railway_ID NOT IN (SELECT Railway_ID FROM train)

tokens: List the object number of railways that do not have any trains .

value: object number

value: railways

value: trains

dber_tags: O O B-COLUMN I-COLUMN O B-TABLE O O O O O B-TABLE O


question: What are the names of the ships  that are from either the US or the UK?

SQL: SELECT Name FROM ship WHERE Nationality  =  "United States" OR Nationality  =  "United Kingdom"

tokens: What are the names of the ships that are from either the US or the UK ?

value: names

value: ships

value: US

value: UK

dber_tags: O O O B-COLUMN O O B-TABLE O O O O O O B-VALUE O O B-VALUE O


question: How many assets does each third party company supply? List the count and the company id.

SQL: SELECT count(*) ,  T1.company_id FROM Third_Party_Companies AS T1 JOIN Assets AS T2 ON T1.company_id  =  T2.supplier_company_id GROUP BY T1.company_id

tokens: How many assets does each third party company supply ? List the count and the company i d.

value: assets

value: third party company

value: company i d.

dber_tags: O O B-TABLE O O B-TABLE I-TABLE I-TABLE O O O O O O O B-COLUMN I-COLUMN I-COLUMN


question: What is the year and semester with the most courses?

SQL: SELECT semester ,  YEAR FROM SECTION GROUP BY semester ,  YEAR ORDER BY count(*) DESC LIMIT 1

tokens: What is the year and semester with the most courses ?

value: year

value: semester

dber_tags: O O O B-COLUMN O B-COLUMN O O O O O


question: What are the names of banks that have loaned money to customers with credit scores below 100?

SQL: SELECT T2.bname FROM loan AS T1 JOIN bank AS T2 ON T1.branch_id  =  T2.branch_id JOIN customer AS T3 ON T1.cust_id  =  T3.cust_id WHERE T3.credit_score  <  100

tokens: What are the names of banks that have loaned money to customers with credit scores below 100 ?

value: banks

value: loaned

value: customers

value: credit scores

dber_tags: O O O B-COLUMN O B-TABLE O O B-TABLE O O B-TABLE O B-COLUMN I-COLUMN O B-VALUE O


db_id: retails

question: What is the largest supplier's account balance?

SQL: SELECT MAX(s_acctbal) FROM supplier

tokens: What is the largest supplier 's account balance ?

value: supplier

value: account balance

dber_tags: O O O O B-TABLE O B-COLUMN I-COLUMN O


db_id: cars

question: Calculate the average production rate per year from 1971 to 1980. Among them, name the cars with a weight of fewer than 1800 lbs.

SQL: SELECT CAST(COUNT(T1.ID) AS REAL) / 9 FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 UNION ALL SELECT DISTINCT T2.car_name FROM production AS T1 INNER JOIN data AS T2 ON T2.ID = T1.ID WHERE T1.model_year BETWEEN 1971 AND 1980 AND T2.weight < 1800

tokens: Calculate the average production rate per year from 1971 to 1980 . Among them , name the cars with a weight of fewer than 1800 lbs .

value: production

value: name

value: cars

value: weight

dber_tags: O O O B-TABLE O O B-COLUMN O B-VALUE O B-VALUE O O O O B-COLUMN O B-COLUMN O O B-COLUMN O O O B-VALUE O O


db_id: books

question: Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press.

SQL: SELECT T1.title FROM book AS T1 INNER JOIN publisher AS T2 ON T1.publisher_id = T2.publisher_id WHERE T2.publisher_name = 'Free Press' AND STRFTIME('%Y', T1.publication_date) BETWEEN '1990' AND '2000' ORDER BY T1.num_pages DESC LIMIT 1

tokens: Name the title of the book with the most number of pages that was published from 1990 to 2000 by publisher Free Press .

value: title

value: book

value: pages

value: publisher

value: Free Press

dber_tags: O O B-COLUMN O O B-TABLE O O O O O B-COLUMN O O O O B-VALUE O B-VALUE O B-TABLE B-VALUE I-VALUE O


question: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance.

SQL: SELECT T1.name ,  T3.balance + T2.balance FROM accounts AS T1 JOIN checking AS T2 ON T1.custid  =  T2.custid JOIN savings AS T3 ON T1.custid  =  T3.custid WHERE T3.balance  <  T2.balance

tokens: Find the name and total checking and savings balance of the accounts whose savings balance is lower than corresponding checking balance .

value: checking

value: savings

value: balance

value: accounts

dber_tags: O O B-COLUMN O O B-TABLE O B-TABLE B-COLUMN O O B-TABLE O B-TABLE B-COLUMN O O O O B-TABLE B-COLUMN O


question: What are the maximum and minimum points of drivers.

SQL: SELECT max(Points) ,  min(Points) FROM driver

tokens: What are the maximum and minimum points of drivers .

value: points

value: drivers

dber_tags: O O O O O O B-COLUMN O B-TABLE O


question: What is the most widely used shipping company in the United States of America?

SQL: SELECT T2.CompanyName FROM Orders AS T1 INNER JOIN Shippers AS T2 ON T1.ShipVia = T2.ShipperID WHERE T1.ShipCountry = 'USA' GROUP BY T2.CompanyName ORDER BY COUNT(T2.CompanyName) DESC LIMIT 1

tokens: What is the most widely used shipping company in the United States of America ?

value: shipping

value: company

value: United States of America

dber_tags: O O O O O O B-TABLE B-COLUMN O O B-VALUE I-VALUE I-VALUE I-VALUE O


question: Please list the IDs of all the images with more than 2 pairs of object samples with the relation "parked on".

SQL: SELECT T2.IMG_ID FROM PRED_CLASSES AS T1 INNER JOIN IMG_REL AS T2 ON T1.PRED_CLASS_ID = T2.PRED_CLASS_ID WHERE T1.PRED_CLASS = 'parked on' AND T2.OBJ1_SAMPLE_ID != T2.OBJ2_SAMPLE_ID GROUP BY T2.IMG_ID HAVING COUNT(T2.IMG_ID) > 2

tokens: Please list the IDs of all the images with more than 2 pairs of object samples with the relation " parked on " .

value: images

value: object samples

value: parked on

dber_tags: O O O O O O O B-TABLE O O O B-VALUE O O B-COLUMN I-COLUMN O O O O B-VALUE I-VALUE O O


question: What is the area of Egypt as a percentage of Asia?

SQL: SELECT T1.Area * 100 / T3.Area FROM country AS T1 INNER JOIN encompasses AS T2 ON T1.Code = T2.Country INNER JOIN continent AS T3 ON T3.Name = T2.Continent WHERE T3.Name = 'Asia' AND T1.Name = 'Egypt'

tokens: What is the area of Egypt as a percentage of Asia ?

value: area

value: Egypt

value: percentage

value: Asia

dber_tags: O O O B-COLUMN O B-VALUE O O B-COLUMN O B-VALUE O


db_id: legislator

question: How many Jewish legislators do not have facebook?

SQL: SELECT COUNT(T3.bioguide_id) FROM ( SELECT T1.bioguide_id FROM current AS T1 INNER JOIN `social-media` AS T2 ON T1.bioguide_id = T2.bioguide WHERE T2.facebook IS NULL GROUP BY T1.bioguide_id ) T3

tokens: How many Jewish legislators do not have facebook ?

value: Jewish

value: facebook

dber_tags: O O B-VALUE O O O O B-COLUMN O


question: Show the names of regions that have more than one building.

SQL: SELECT T2.Name FROM building AS T1 JOIN region AS T2 ON T1.Region_ID  =  T2.Region_ID GROUP BY T1.Region_ID HAVING COUNT(*)  >  1

tokens: Show the names of regions that have more than one building .

value: names

value: regions

value: one

value: building

dber_tags: O O B-COLUMN O B-TABLE O O O O B-VALUE B-TABLE O


question: Please list all display names of users who are adults.

SQL: SELECT DisplayName FROM users WHERE Age BETWEEN 19 AND 65

tokens: Please list all display names of users who are adults .

value: display names

value: users

dber_tags: O O O B-COLUMN I-COLUMN O B-TABLE O O O O


question: How many teachers does the student named CHRISSY NABOZNY have?

SQL: SELECT count(*) FROM list AS T1 JOIN teachers AS T2 ON T1.classroom  =  T2.classroom WHERE T1.firstname  =  "CHRISSY" AND T1.lastname  =  "NABOZNY"

tokens: How many teachers does the student named CHRISSY NABOZNY have ?

value: teachers

value: named

value: CHRISSY NABOZNY

dber_tags: O O B-TABLE O O O B-COLUMN B-VALUE I-VALUE O O


question: Which friend of Zach has the longest-lasting friendship?

SQL: SELECT friend FROM PersonFriend WHERE name =  'Zach' AND YEAR  =  (SELECT max(YEAR) FROM PersonFriend WHERE name =  'Zach')

tokens: Which friend of Zach has the longest - lasting friendship ?

value: friend

value: Zach

dber_tags: O B-COLUMN O B-VALUE O O O O O O O


question: Give id of the instructor who advises students in the History department.

SQL: SELECT i_id FROM advisor AS T1 JOIN student AS T2 ON T1.s_id  =  T2.id WHERE T2.dept_name  =  'History'

tokens: Give i d of the instructor who advises students in the History department .

value: i d

value: advises students

value: History

value: department

dber_tags: O B-COLUMN I-COLUMN O O O O B-TABLE I-TABLE O O B-VALUE B-TABLE O


db_id: olympics

question: How many competitors were there who participated in 2000 Summer with age 31?

SQL: SELECT COUNT(T2.person_id) FROM games AS T1 INNER JOIN games_competitor AS T2 ON T1.id = T2.games_id WHERE T1.games_name = '2000 Summer' AND T2.age = 31

tokens: How many competitors were there who participated in 2000 Summer with age 31 ?

value: competitors

value: 2000 Summer

value: age

dber_tags: O O B-TABLE O O O O O B-VALUE I-VALUE O B-COLUMN B-VALUE O


question: Based on all user compliments, find the percentage of low number of compliments on all compliments ID.

SQL: SELECT CAST(SUM(CASE WHEN number_of_compliments = 'Low' THEN 1 ELSE 0 END) AS REAL) * 100 / COUNT(user_id) FROM Users_compliments

tokens: Based on all user compliments , find the percentage of low number of compliments on all compliments ID .

value: user compliments

value: low

value: number

value: compliments

value: compliments ID

dber_tags: O O O B-TABLE I-TABLE O O O O O B-VALUE B-COLUMN O B-COLUMN O O B-COLUMN I-COLUMN O


question: What are the details of the project that is producing both patents and papers as outcomes?

SQL: SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  'Paper' INTERSECT SELECT T1.project_details FROM Projects AS T1 JOIN Project_outcomes AS T2 ON T1.project_id  =  T2.project_id WHERE T2.outcome_code  =  'Patent'

tokens: What are the details of the project that is producing both patents and papers as outcomes ?

value: details

value: project

value: patents

value: papers

value: outcomes

dber_tags: O O O B-COLUMN O O B-TABLE O O O O B-VALUE O B-VALUE O B-COLUMN O


question: Which major has between 2 and 30 number of students? List major and the number of students.

SQL: SELECT Major ,  count(*) FROM Student GROUP BY Major HAVING count(Major) BETWEEN 2 AND 30;

tokens: Which major has between 2 and 30 number of students ? List major and the number of students .

value: major

value: students

dber_tags: O B-COLUMN O O B-VALUE O B-VALUE O O B-TABLE O O B-COLUMN O O O O B-TABLE O


question: Show the first year and last year of parties with theme "Spring" or "Teqnology".

SQL: SELECT First_year ,  Last_year FROM party WHERE Party_Theme  =  "Spring" OR Party_Theme  =  "Teqnology"

tokens: Show the first year and last year of parties with theme " Spring " or " Teqnology " .

value: first year

value: last year

value: parties

value: theme

value: Spring

value: Teqnology

dber_tags: O O B-COLUMN I-COLUMN O B-COLUMN I-COLUMN O B-TABLE O B-COLUMN O B-VALUE O O O B-VALUE O O


db_id: gymnast

question: What is the age of the tallest person?

SQL: SELECT Age FROM people ORDER BY Height DESC LIMIT 1

tokens: What is the age of the tallest person ?

value: age

value: person

dber_tags: O O O B-COLUMN O O O B-TABLE O


question: How many students are from each city, and which cities have more than one cities?

SQL: SELECT count(*) ,  city_code FROM student GROUP BY city_code HAVING count(*)  >  1

tokens: How many students are from each city , and which cities have more than one cities ?

value: city

dber_tags: O O B-TABLE O O O B-COLUMN O O O O O O O O O O


question: What is the last name of the musician that have produced the most number of songs?

SQL: SELECT T2.lastname FROM Performance AS T1 JOIN Band AS T2 ON T1.bandmate  =  T2.id JOIN Songs AS T3 ON T3.SongId  =  T1.SongId GROUP BY lastname ORDER BY count(*) DESC LIMIT 1

tokens: What is the last name of the musician that have produced the most number of songs ?

value: last name

value: songs

dber_tags: O O O B-COLUMN I-COLUMN O O O O O O O O O O B-TABLE O


question: List all the name of customers who have orders that are still processing.

SQL: SELECT t2.customerName FROM orders AS t1 INNER JOIN customers AS t2 ON t1.customerNumber = t2.customerNumber WHERE t1.status = 'In Process'

tokens: List all the name of customers who have orders that are still processing .

value: name

value: customers

value: orders

value: processing

dber_tags: O O O B-COLUMN O B-TABLE O O B-TABLE O O O B-VALUE O


db_id: authors

question: What are the paper IDs of papers presented in conferences has a homepage starts with "http://www.informatik.uni-trier.de/~ley/db/conf/"?

SQL: SELECT T1.Id FROM Paper AS T1 INNER JOIN Conference AS T2 ON T1.ConferenceId = T2.Id WHERE T2.HomePage LIKE 'http://www.informatik.uni-trier.de/~ley/db/conf/%'

value: paper

value: IDs

value: conferences

value: homepage

dber_tags: O O O B-TABLE B-COLUMN O O O O B-TABLE O O B-COLUMN O O O B-VALUE O O


question: Calculate the percentage of female students.

SQL: SELECT CAST(SUM(IIF(T2.name IS NULL, 1, 0)) AS REAL) * 100 / COUNT(T1.name) FROM person AS T1 LEFT JOIN male AS T2 ON T2.name = T1.name

tokens: Calculate the percentage of female students .

value: female

dber_tags: O O O O B-TABLE O O


question: What is the organization(s) that has 'National Society' as member type.

SQL: SELECT T1.Name FROM organization AS T1 INNER JOIN isMember AS T2 ON T2.Country = T1.Country INNER JOIN country AS T3 ON T2.Country = T3.Code WHERE T2.Type = 'National Society'

tokens: What is the organization(s ) that has ' National Society ' as member type .

value: organization(s

value: National Society

value: member

value: type

dber_tags: O O O B-TABLE O O O O B-VALUE I-VALUE O O B-TABLE B-COLUMN O


question: What is the postal code of the address 692 Joliet Street?

SQL: SELECT postal_code FROM address WHERE address = '692 Joliet Street'

tokens: What is the postal code of the address 692 Joliet Street ?

value: postal code

value: address

value: 692 Joliet Street

dber_tags: O O O B-COLUMN I-COLUMN O O B-TABLE B-VALUE I-VALUE I-VALUE O