answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT "competition" FROM table_204_622 WHERE id = (SELECT id FROM table_204_622 WHERE "competition" = 'world indoor championships' AND "year" = 2008) + 1 | which competition did this competitor compete in next after the world indoor championships in 2008 ? | CREATE TABLE table_204_622 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"event" text,
"notes" text
) |
SELECT MIN(attendance) FROM table_17120964_8 WHERE man_of_the_match = "Neil Liddiard" | What was the attendance at the game where Neil Liddiard was Man of the Match? | CREATE TABLE table_17120964_8 (attendance INTEGER, man_of_the_match VARCHAR) |
SELECT t3.headquartered_city, COUNT(*) FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city | Find the number of stores in each city. | CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR) |
SELECT subject FROM table_29842201_1 WHERE highest_mark = 79 | What is the subject when the highest mark is 79? | CREATE TABLE table_29842201_1 (
subject VARCHAR,
highest_mark VARCHAR
) |
SELECT venue FROM table_17120964_8 WHERE result = "Lost 3-4" | What was the venue of the game that was lost 3-4? | CREATE TABLE table_17120964_8 (venue VARCHAR, result VARCHAR) |
SELECT t3.headquartered_city FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id GROUP BY t3.headquartered_city ORDER BY COUNT(*) DESC LIMIT 1 | Find the city with the most number of stores. | CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR) |
SELECT 2010 FROM table_name_2 WHERE tournament = "olympic games" | Which 2010 stat featured the tournament of the Olympic Games? | CREATE TABLE table_name_2 (
tournament VARCHAR
) |
SELECT venue FROM table_17120964_8 WHERE man_of_the_match = "Vaclav Zavoral" | What is the venue of the game with Man of the Match Vaclav Zavoral? | CREATE TABLE table_17120964_8 (venue VARCHAR, man_of_the_match VARCHAR) |
SELECT AVG(pages_per_minute_color) FROM product | What is the average pages per minute color? | CREATE TABLE product (pages_per_minute_color INTEGER) |
SELECT "Position" FROM table_56631 WHERE "Player" = 'patrick macdonald' | Which Position has a Player of patrick macdonald? | CREATE TABLE table_56631 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) |
SELECT COUNT(attendance) FROM table_17120964_8 WHERE result = "Lost 5-3" | How many attendance figures are given for the game where the final score was lost 5-3? | CREATE TABLE table_17120964_8 (attendance VARCHAR, result VARCHAR) |
SELECT t1.product FROM product AS t1 JOIN store_product AS t2 ON t1.product_id = t2.product_id JOIN store AS t3 ON t2.store_id = t3.store_id WHERE t3.store_name = "Miramichi" | What products are available at store named "Miramichi"? | CREATE TABLE store_product (product_id VARCHAR, store_id VARCHAR); CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE product (product VARCHAR, product_id VARCHAR) |
SELECT "Perth" FROM table_68328 WHERE "Gold Coast" = 'yes' AND "Adelaide" = 'yes' AND "Auckland" = 'no' | Which Perth's gold coast and Adelaide were yes when Auckland was no? | CREATE TABLE table_68328 (
"Sydney" text,
"Melbourne" text,
"Perth" text,
"Adelaide" text,
"Gold Coast" text,
"Auckland" text
) |
SELECT opponent FROM table_17120964_5 WHERE date = "4th" | Name the opponent for 4th | CREATE TABLE table_17120964_5 (opponent VARCHAR, date VARCHAR) |
SELECT product FROM product WHERE max_page_size = "A4" AND pages_per_minute_color < 5 | Find products with max page size as "A4" and pages per minute color smaller than 5. | CREATE TABLE product (product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR) |
SELECT Class, COUNT(Class) FROM captain GROUP BY Class ORDER BY COUNT(Class) DESC | Show me a bar chart comparing the total number of captains of different classes, order from high to low by the the number of class. | CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
) |
SELECT venue FROM table_17120964_5 WHERE date = "19th" | Name the venue for 19th date | CREATE TABLE table_17120964_5 (venue VARCHAR, date VARCHAR) |
SELECT product FROM product WHERE max_page_size = "A4" OR pages_per_minute_color < 5 | Find products with max page size as "A4" or pages per minute color smaller than 5. | CREATE TABLE product (product VARCHAR, max_page_size VARCHAR, pages_per_minute_color VARCHAR) |
WITH canon AS (SELECT Tags.Id, Count, Tags.TagName AS otag, COALESCE(c.TargetTagName, b.TargetTagName, a.TargetTagName, TagName) AS tagname FROM Tags LEFT JOIN TagSynonyms AS a ON (a.SourceTagName = TagName) LEFT JOIN TagSynonyms AS b ON (b.SourceTagName = a.TargetTagName) LEFT JOIN TagSynonyms AS c ON (c.SourceTagName... | Percent closed per canonical tag. | CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
... |
SELECT result FROM table_17120964_5 WHERE man_of_the_match = "Lukas Smital" AND venue = "Home" | Name the result for lukas smital and home | CREATE TABLE table_17120964_5 (result VARCHAR, man_of_the_match VARCHAR, venue VARCHAR) |
SELECT product FROM product WHERE product LIKE "%Scanner%" | Find all the product whose name contains the word "Scanner". | CREATE TABLE product (product VARCHAR) |
SELECT Year, COUNT(Year) FROM exhibition WHERE Ticket_Price < 15 GROUP BY Theme | Find those themes and years for all exhibitions with ticket prices lower than 15, show me a stacked bar chart that groups by themes, counts year, and the x-axis is Year. | CREATE TABLE artist (
Artist_ID int,
Name text,
Country text,
Year_Join int,
Age int
)
CREATE TABLE exhibition_record (
Exhibition_ID int,
Date text,
Attendance int
)
CREATE TABLE exhibition (
Exhibition_ID int,
Year int,
Theme text,
Artist_ID int,
Ticket_Price real... |
SELECT man_of_the_match FROM table_17120964_5 WHERE date = "24th" | Name the man of the match for 24th | CREATE TABLE table_17120964_5 (man_of_the_match VARCHAR, date VARCHAR) |
SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1 | Find the most prominent max page size among all the products. | CREATE TABLE product (max_page_size VARCHAR) |
SELECT "County" FROM table_23739 WHERE "McCain%" = '38.78%' | Name the county for mccain being 38.78% | CREATE TABLE table_23739 (
"County" text,
"Obama%" text,
"Obama#" real,
"McCain%" text,
"McCain#" real,
"Others%" text,
"Others#" real,
"Total" real
) |
SELECT man_of_the_match FROM table_17120964_5 WHERE opponent = "Sheffield Scimitars" | Name the man of the maatch for sheffield scimitars | CREATE TABLE table_17120964_5 (man_of_the_match VARCHAR, opponent VARCHAR) |
SELECT product FROM product WHERE product <> (SELECT max_page_size FROM product GROUP BY max_page_size ORDER BY COUNT(*) DESC LIMIT 1) | Find the name of the products that are not using the most frequently-used max page size. | CREATE TABLE product (product VARCHAR, max_page_size VARCHAR) |
SELECT COUNT("Record") FROM table_29866 WHERE "Date" = 'October 6' | what is the overall number of times when the calendar showed october 6 | CREATE TABLE table_29866 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) |
SELECT venue FROM table_17120964_6 WHERE date = "19th" | On the 19th, where was the venue? | CREATE TABLE table_17120964_6 (venue VARCHAR, date VARCHAR) |
SELECT SUM(city_population) FROM district WHERE city_area > (SELECT AVG(city_area) FROM district) | Find the total population of the districts where the area is bigger than the average city area. | CREATE TABLE district (city_population INTEGER, city_area INTEGER) |
SELECT demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "4333" | What is the admission time and for how many days did the subject id 4333 stay in the hospital? | CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... |
SELECT attendance FROM table_17120964_6 WHERE opponent = "Swindon Wildcats" AND venue = "Home" | What was the total attendance during the home game against the Swindon Wildcats? | CREATE TABLE table_17120964_6 (attendance VARCHAR, opponent VARCHAR, venue VARCHAR) |
SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_id = t3.district_id WHERE t1.Type = "City Mall" INTERSECT SELECT t3.District_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id JOIN district AS t3 ON t2.district_... | Find the names of districts where have both city mall and village store type stores. | CREATE TABLE district (District_name VARCHAR, district_id VARCHAR); CREATE TABLE store (store_id VARCHAR, Type VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR) |
SELECT COUNT(candidates) FROM table_1346137_4 WHERE incumbent = "David E. Finley" | How many different set of candidates were there when the incumbent was david e. finley? | CREATE TABLE table_1346137_4 (
candidates VARCHAR,
incumbent VARCHAR
) |
SELECT date FROM table_17120964_6 WHERE man_of_the_match = "Stuart Potts" | On what day was Stuart Potts the Man of the Match? | CREATE TABLE table_17120964_6 (date VARCHAR, man_of_the_match VARCHAR) |
SELECT SUM(enr) FROM College | What is the total enrollment number of all colleges? | CREATE TABLE College (enr INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.days_stay > "14" AND prescriptions.route = "OU" | how many patients have stayed in the hospital for more than 14 days with a ou drug route? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... |
SELECT venue FROM table_17120964_6 WHERE man_of_the_match = "Alex Mettam/Mark Williams" | At what venue did Alex Mettam/Mark Williams be named Man of the Match? | CREATE TABLE table_17120964_6 (venue VARCHAR, man_of_the_match VARCHAR) |
SELECT AVG(enr) FROM College | What is the average enrollment number? | CREATE TABLE College (enr INTEGER) |
SELECT nationality FROM table_name_52 WHERE fate = "sunk" AND ship = "rinos" | What was the nationality of the sunk ship named Rinos? | CREATE TABLE table_name_52 (
nationality VARCHAR,
fate VARCHAR,
ship VARCHAR
) |
SELECT COUNT(date) FROM table_17120964_7 WHERE man_of_the_match = "David Savage" | How many dates did David Savage get man of the match? | CREATE TABLE table_17120964_7 (date VARCHAR, man_of_the_match VARCHAR) |
SELECT COUNT(*) FROM College | How many colleges in total? | CREATE TABLE College (Id VARCHAR) |
SELECT livery FROM table_name_69 WHERE year_built < 1989 AND locomotive_type = "steam" | What livery belongs to the steam Locomotive type builder that was building before 1989? | CREATE TABLE table_name_69 (
livery VARCHAR,
year_built VARCHAR,
locomotive_type VARCHAR
) |
SELECT man_of_the_match FROM table_17120964_7 WHERE attendance = 1568 | When the attendance was 1568, who was man of the match? | CREATE TABLE table_17120964_7 (man_of_the_match VARCHAR, attendance VARCHAR) |
SELECT COUNT(*) FROM Player WHERE HS > 1000 | How many players have more than 1000 hours of training? | CREATE TABLE Player (HS INTEGER) |
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE DESC | For those employees who did not have any job in the past, give me the trend about department_id over hire_date , I want to order in desc by the X-axis. | CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE job_history (
EMPLOYEE_ID decimal(6,0),
START_DATE date,
END_DATE date,
JOB_ID varchar(10),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
... |
SELECT man_of_the_match FROM table_17120964_7 WHERE result = "Lost 2-4" | Who was the man of the match when they lost 2-4? | CREATE TABLE table_17120964_7 (man_of_the_match VARCHAR, result VARCHAR) |
SELECT COUNT(*) FROM College WHERE enr > 15000 | How many colleges has more than 15000 students? | CREATE TABLE College (enr INTEGER) |
SELECT "Player" FROM table_50913 WHERE "Round" = '8' | Who is the player from round 8? | CREATE TABLE table_50913 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
) |
SELECT competition FROM table_17120964_9 WHERE opponent = "Sheffield Scimitars" | what was the competitoin where the opponent is sheffield scimitars? | CREATE TABLE table_17120964_9 (competition VARCHAR, opponent VARCHAR) |
SELECT AVG(HS) FROM Player | What is the average training hours of all players? | CREATE TABLE Player (HS INTEGER) |
SELECT gold FROM table_name_79 WHERE total = 6 | What is Gold, when Total is 6? | CREATE TABLE table_name_79 (
gold VARCHAR,
total VARCHAR
) |
SELECT venue FROM table_17120964_9 WHERE attendance = "702" | where was the venue where the attendance was 702? | CREATE TABLE table_17120964_9 (venue VARCHAR, attendance VARCHAR) |
SELECT pName, HS FROM Player WHERE HS < 1500 | Find the name and training hours of players whose hours are below 1500. | CREATE TABLE Player (pName VARCHAR, HS INTEGER) |
SELECT "name of m.l.a." FROM table_204_54 WHERE "pondicherry assembly" = 'fifth' | who won the election after s. sivaprakasam in the fifth pondicherry assembly ? | CREATE TABLE table_204_54 (
id number,
"pondicherry assembly" text,
"duration" text,
"name of m.l.a." text,
"party affiliation" text,
"election year" number
) |
SELECT venue FROM table_17120964_9 WHERE date = "22nd" | what was the venue where the date was the 22nd? | CREATE TABLE table_17120964_9 (venue VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT cName) FROM tryout | How many different colleges do attend the tryout test? | CREATE TABLE tryout (cName VARCHAR) |
SELECT Tags FROM Posts WHERE Tags IN (SELECT Tags FROM Tags ORDER BY Count DESC LIMIT 10) LIMIT 5 | Top 10 tags with top 5 tags. | CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE R... |
SELECT opponent FROM table_17120964_9 WHERE date = "21st" | who was the opponent where the date was the 21st? | CREATE TABLE table_17120964_9 (opponent VARCHAR, date VARCHAR) |
SELECT COUNT(DISTINCT pPos) FROM tryout | What are the unique types of player positions in the tryout? | CREATE TABLE tryout (pPos VARCHAR) |
SELECT COUNT("Premio") FROM table_29563 WHERE "Categor\u00eda" = 'Artist of the Year' | How many premio are there when 'Artist of the Year' was the categoria? | CREATE TABLE table_29563 (
"A\u00f1o" real,
"Trabajo nominado" text,
"Premio" text,
"Categor\u00eda" text,
"Country" text,
"Resultado" text
) |
SELECT score FROM table_17121262_5 WHERE team = "Milwaukee" | What is the score for Milwaukee? | CREATE TABLE table_17121262_5 (score VARCHAR, team VARCHAR) |
SELECT COUNT(*) FROM tryout WHERE decision = 'yes' | How many students got accepted after the tryout? | CREATE TABLE tryout (decision VARCHAR) |
SELECT MAX(points) FROM table_name_67 WHERE played < 30 | Can you tell me the highest Points that has the Played smaller than 30? | CREATE TABLE table_name_67 (
points INTEGER,
played INTEGER
) |
SELECT COUNT(record) FROM table_17121262_10 WHERE team = "Washington" | What was the record against Washington? | CREATE TABLE table_17121262_10 (record VARCHAR, team VARCHAR) |
SELECT COUNT(*) FROM tryout WHERE pPos = 'goalie' | How many students whose are playing the role of goalie? | CREATE TABLE tryout (pPos VARCHAR) |
SELECT prescriptions.route, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.drug = "Miconazole 2% Cream" | what is drug route and drug dose of drug name miconazole 2% cream? | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT population FROM table_171236_1 WHERE census_ranking = "231 of 5,008" | If the census ranking is 231 of 5,008, what was the population? | CREATE TABLE table_171236_1 (population VARCHAR, census_ranking VARCHAR) |
SELECT AVG(HS), MAX(HS), MIN(HS) FROM Player | Find the max, average and min training hours of all players. | CREATE TABLE Player (HS INTEGER) |
SELECT COUNT("Weeks on Chart") FROM table_75128 WHERE "Track" = 'si te vas' AND "Peak" < '7' AND "Year" < '2000' | Name the total number of weeks for si te vas and peak less than 7 and year less than 2000 | CREATE TABLE table_75128 (
"Year" real,
"Chart" text,
"Track" text,
"Peak" real,
"Weeks on Chart" real
) |
SELECT official_name FROM table_171236_1 WHERE area_km_2 = "59.73" | If the area is 59.73, what is the official name? | CREATE TABLE table_171236_1 (official_name VARCHAR, area_km_2 VARCHAR) |
SELECT AVG(enr) FROM College WHERE state = 'FL' | What is average enrollment of colleges in the state FL? | CREATE TABLE College (enr INTEGER, state VARCHAR) |
SELECT MIN("Total") FROM table_30281 | What is the minimum sum? | CREATE TABLE table_30281 (
"Position" text,
"Number" real,
"Player" text,
"Super League" real,
"Champions League" real,
"Swiss Cup" real,
"Total" real
) |
SELECT status FROM table_171236_1 WHERE census_ranking = "693 of 5,008" | If the census ranking is 693 of 5,008, what is the status? | CREATE TABLE table_171236_1 (status VARCHAR, census_ranking VARCHAR) |
SELECT pName FROM Player WHERE HS BETWEEN 500 AND 1500 | What are the names of players whose training hours is between 500 and 1500? | CREATE TABLE Player (pName VARCHAR, HS INTEGER) |
SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 22517)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | what was the total replete w/fiber dose for patient 22517? | CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime t... |
SELECT census_ranking FROM table_171236_1 WHERE official_name = "Quispamsis" | With the official name Quispamsis, what is the census ranking? | CREATE TABLE table_171236_1 (census_ranking VARCHAR, official_name VARCHAR) |
SELECT DISTINCT pName FROM Player WHERE pName LIKE '%a%' | Find the players whose names contain letter 'a'. | CREATE TABLE Player (pName VARCHAR) |
SELECT "Name" FROM table_9225 WHERE "2012 club" = 'cn sabadell' | What is the name for the 2012 CN Sabadell? | CREATE TABLE table_9225 (
"Name" text,
"Pos." text,
"Height" text,
"Weight" text,
"2012 club" text
) |
SELECT population FROM table_171236_1 WHERE census_ranking = "782 of 5,008" | What was the population for census ranking 782 of 5,008? | CREATE TABLE table_171236_1 (population VARCHAR, census_ranking VARCHAR) |
SELECT cName, enr FROM College WHERE enr > 10000 AND state = "LA" | Find the name, enrollment of the colleges whose size is bigger than 10000 and location is in state LA. | CREATE TABLE College (cName VARCHAR, enr VARCHAR, state VARCHAR) |
SELECT saturday FROM table_name_68 WHERE name = "confederation" | Which Saturday has a Name of confederation? | CREATE TABLE table_name_68 (
saturday VARCHAR,
name VARCHAR
) |
SELECT census_ranking FROM table_171236_1 WHERE area_km_2 = "34.73" | If the area is 34.73, what is the census ranking? | CREATE TABLE table_171236_1 (census_ranking VARCHAR, area_km_2 VARCHAR) |
SELECT * FROM College ORDER BY enr | List all information about college sorted by enrollment number in the ascending order. | CREATE TABLE College (enr VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2120" AND prescriptions.route = "IVPCA" | find the number of patients who were born before the year 2120 and their drug route is ivpca. | CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... |
SELECT census_ranking FROM table_171250_2 WHERE population = 284 | What are the census ranking(s) for a population of 284? | CREATE TABLE table_171250_2 (census_ranking VARCHAR, population VARCHAR) |
SELECT cName FROM College WHERE enr > 18000 ORDER BY cName | List the name of the colleges whose enrollment is greater 18000 sorted by the college's name. | CREATE TABLE College (cName VARCHAR, enr INTEGER) |
SELECT t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" | Find the last names of the members of the club 'Bootup Baltimore'. | CREATE TABLE club (
clubid number,
clubname text,
clubdesc text,
clublocation text
)
CREATE TABLE member_of_club (
stuid number,
clubid number,
position text
)
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advis... |
SELECT census_ranking FROM table_171250_2 WHERE area_km_2 = "369.25" | What are the census ranking(s) that have an area of 369.25 km2? | CREATE TABLE table_171250_2 (census_ranking VARCHAR, area_km_2 VARCHAR) |
SELECT pName FROM Player WHERE yCard = 'yes' ORDER BY HS DESC | Find the name of players whose card is yes in the descending order of training hours. | CREATE TABLE Player (pName VARCHAR, yCard VARCHAR, HS VARCHAR) |
SELECT COUNT(*) = 0 FROM table_203_409 WHERE "party" IS NULL | does each congressman have a party listed ? | CREATE TABLE table_203_409 (
id number,
"rank" number,
"representative" text,
"party" text,
"district" text,
"seniority date" text,
"notes" text
) |
SELECT population FROM table_171250_2 WHERE area_km_2 = "715.58" | What is the population that has an area of 715.58? | CREATE TABLE table_171250_2 (population VARCHAR, area_km_2 VARCHAR) |
SELECT DISTINCT cName FROM tryout ORDER BY cName | Find the name of different colleges involved in the tryout in alphabetical order. | CREATE TABLE tryout (cName VARCHAR) |
SELECT "year of election" FROM table_203_330 ORDER BY "candidates elected" DESC LIMIT 1 | what year had the most candidates elected ? | CREATE TABLE table_203_330 (
id number,
"year of election" number,
"candidates elected" number,
"# of seats available" number,
"# of votes" number,
"% of popular vote" text
) |
SELECT status FROM table_171250_2 WHERE official_name = "Saint-Jacques" | What are that status(es) of saint-jacques? | CREATE TABLE table_171250_2 (status VARCHAR, official_name VARCHAR) |
SELECT pPos FROM tryout GROUP BY pPos ORDER BY COUNT(*) DESC LIMIT 1 | Which position is most popular among players in the tryout? | CREATE TABLE tryout (pPos VARCHAR) |
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'spironolactone' AND STRFTIME('%y', prescriptions.startdate) = '2105') | just count how many patients have been prescribed spironolactone in 2105. | CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid numbe... |
SELECT area_km_2 FROM table_171250_2 WHERE official_name = "Saint-Joseph" | What are the area(s) (km2) for saint-joseph? | CREATE TABLE table_171250_2 (area_km_2 VARCHAR, official_name VARCHAR) |
SELECT COUNT(*), cName FROM tryout GROUP BY cName ORDER BY COUNT(*) DESC | Find the number of students who participate in the tryout for each college ordered by descending count. | CREATE TABLE tryout (cName VARCHAR) |
SELECT DISTINCT T1.firstname FROM customer AS T1 JOIN invoice AS T2 ON T1.customerid = T2.customerid WHERE T1.country = "Brazil" | What are the different first names for customers from Brazil who have also had an invoice? | CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE artist (
artistid number,
name text
)
CREATE TABLE invoiceline (
invoicelineid number,
invoiceid number,
trackid number,
unitprice number,
quantity number
)
CREATE TABLE invoice (
invoiceid number,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.