answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT MAX(date_moved_in) FROM Residents | When is the last day any resident moved in? | CREATE TABLE Residents (date_moved_in INTEGER) |
SELECT MIN(silver) FROM table_name_68 WHERE rank = 4 AND total > 1 | What is the lowest number of silver medals with a rank of 4 and total medals greater than 1? | CREATE TABLE table_name_68 (
silver INTEGER,
rank VARCHAR,
total VARCHAR
) |
SELECT man_of_the_match FROM table_17103566_1 WHERE team_1 = "ICL Pakistan" | Who is man of the match when Team 1 is ICL Pakistan? | CREATE TABLE table_17103566_1 (man_of_the_match VARCHAR, team_1 VARCHAR) |
SELECT other_details FROM Residents WHERE other_details LIKE '%Miss%' | What are the resident details containing the substring 'Miss'? | CREATE TABLE Residents (other_details VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "43" AND lab.label = "Epithelial Cells" | count the number of patients whose age is less than 43 and lab test name is epithelial cells? | 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 COUNT(date) FROM table_17103566_1 WHERE match_number = 5 | How many dates have a Match number of 5? | CREATE TABLE table_17103566_1 (date VARCHAR, match_number VARCHAR) |
SELECT customer_event_id, date_moved_in, property_id FROM customer_events | List the customer event id and the corresponding move in date and property id. | CREATE TABLE customer_events (customer_event_id VARCHAR, date_moved_in VARCHAR, property_id VARCHAR) |
SELECT "scored" FROM table_204_346 WHERE "date" = '5 march 2002' | what is the number of goals scored in the algarve cup on march 5 , 2002 ? | CREATE TABLE table_204_346 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"result" text,
"competition" text,
"scored" number
) |
SELECT man_of_the_match FROM table_17103566_1 WHERE match_number = 5 | Who is man of the match for match number 5? | CREATE TABLE table_17103566_1 (man_of_the_match VARCHAR, match_number VARCHAR) |
SELECT COUNT(*) FROM customers WHERE NOT customer_id IN (SELECT customer_id FROM customer_events) | How many customers did not have any event? | CREATE TABLE customers (customer_id VARCHAR); CREATE TABLE customer_events (customer_id VARCHAR) |
SELECT "Player" FROM table_64946 WHERE "Total" < '287' AND "Year(s) won" = '1988' | Who won in 1988 with a total less than 287? | CREATE TABLE table_64946 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" text,
"Finish" text
) |
SELECT location_attendance FROM table_17103729_7 WHERE score = "68-85" | With a score of 68-85, what is the location and attendance? | CREATE TABLE table_17103729_7 (location_attendance VARCHAR, score VARCHAR) |
SELECT DISTINCT date_moved_in FROM residents | What are the distinct move in dates of the residents? | CREATE TABLE residents (date_moved_in VARCHAR) |
SELECT "Title" FROM table_29439 WHERE "Production code" = '2ARG09' | what is the title of the episode with production code '2arg09'? | CREATE TABLE table_29439 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
) |
SELECT location_attendance FROM table_17103729_8 WHERE score = "64-74" | Name the location of 64-74 | CREATE TABLE table_17103729_8 (location_attendance VARCHAR, score VARCHAR) |
SELECT LOCATION FROM school ORDER BY Enrollment | List the locations of schools in ascending order of enrollment. | CREATE TABLE school (LOCATION VARCHAR, Enrollment VARCHAR) |
SELECT "party" FROM table_203_798 ORDER BY "seats" LIMIT 1 | what party had the least number of seats ? | CREATE TABLE table_203_798 (
id number,
"party" text,
"votes" text,
"%" number,
"swing" number,
"seats" number,
"change" number
) |
SELECT score FROM table_17103729_8 WHERE game = 25 | Name the score for game for 25 | CREATE TABLE table_17103729_8 (score VARCHAR, game VARCHAR) |
SELECT LOCATION FROM school ORDER BY Founded DESC | List the locations of schools in descending order of founded year. | CREATE TABLE school (LOCATION VARCHAR, Founded VARCHAR) |
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour... | What are the classes offered for Other next Winter ? | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE comment_instructor (
instructor_id int,
... |
SELECT record FROM table_17103729_8 WHERE location_attendance = "Palace of Auburn Hills 15,210" | Name the record for attendance location of palace of auburn hills 15,210 | CREATE TABLE table_17103729_8 (record VARCHAR, location_attendance VARCHAR) |
SELECT Enrollment FROM school WHERE Denomination <> "Catholic" | What are the enrollments of schools whose denomination is not "Catholic"? | CREATE TABLE school (Enrollment VARCHAR, Denomination VARCHAR) |
SELECT COUNT(written_by) FROM table_28037619_2 WHERE us_viewers__million_ = "7.26" | How many people wrote the episode that had 7.26 million u.s. viewers? | CREATE TABLE table_28037619_2 (
written_by VARCHAR,
us_viewers__million_ VARCHAR
) |
SELECT COUNT(high_rebounds) FROM table_17103729_8 WHERE score = "64-74" | Name the high rebounds for score of 64-74 | CREATE TABLE table_17103729_8 (high_rebounds VARCHAR, score VARCHAR) |
SELECT AVG(Enrollment) FROM school | What is the average enrollment of schools? | CREATE TABLE school (Enrollment INTEGER) |
SELECT MAX("Laps") FROM table_78424 WHERE "Grid" > '14' AND "Time/Retired" = '+ 2 laps' AND "Driver" = 'helmut marko' | What is the largest number of laps with a Grid larger than 14, a Time/Retired of + 2 laps, and a Driver of helmut marko? | CREATE TABLE table_78424 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT score FROM table_17103729_8 WHERE date = "July 16" | Namethe score for july 16 | CREATE TABLE table_17103729_8 (score VARCHAR, date VARCHAR) |
SELECT Team FROM player ORDER BY Team | What are the teams of the players, sorted in ascending alphabetical order? | CREATE TABLE player (Team VARCHAR) |
SELECT title FROM album ORDER BY title | What are all the album titles, in alphabetical order? | CREATE TABLE album (
albumid number,
title text,
artistid number
)
CREATE TABLE playlisttrack (
playlistid number,
trackid number
)
CREATE TABLE genre (
genreid number,
name text
)
CREATE TABLE artist (
artistid number,
name text
)
CREATE TABLE invoiceline (
invoicelineid num... |
SELECT best_10_year_period FROM table_1710426_2 WHERE best_15_year_period = "Fischer" | Which people had the best 10-year period when Fischer had best 15-year period? | CREATE TABLE table_1710426_2 (best_10_year_period VARCHAR, best_15_year_period VARCHAR) |
SELECT Team FROM player ORDER BY Age DESC LIMIT 1 | Find the team of the player of the highest age. | CREATE TABLE player (Team VARCHAR, Age VARCHAR) |
SELECT "Date" FROM table_55954 WHERE "Attendance" = '79,431' | Where attendance is 79,431 what is date? | CREATE TABLE table_55954 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) |
SELECT best_10_year_period FROM table_1710426_2 WHERE best_15_year_period = "Capablanca" | Which people had the best 10-year period when Capablanca had the best 15-year period? | CREATE TABLE table_1710426_2 (best_10_year_period VARCHAR, best_15_year_period VARCHAR) |
SELECT Team FROM player ORDER BY Age DESC LIMIT 5 | List the teams of the players with the top 5 largest ages. | CREATE TABLE player (Team VARCHAR, Age VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.long_title = "Cellulitis and abscess of leg, except foot" AND prescriptions.route = "PO" | how many patients whose diagnoses long title is cellulitis and abscess of leg, except foot and drug route is po? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... |
SELECT record FROM table_17104539_9 WHERE date = "June 7" | Name the record for june 7 | CREATE TABLE table_17104539_9 (record VARCHAR, date VARCHAR) |
SELECT T1.Team, T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID | For each player, show the team and the location of school they belong to. | CREATE TABLE school (Location VARCHAR, School_ID VARCHAR); CREATE TABLE player (Team VARCHAR, School_ID VARCHAR) |
SELECT "Country" FROM table_40037 WHERE "Network" = 'channel 1' | Which Country has a Network of channel 1? | CREATE TABLE table_40037 (
"Country" text,
"Local name" text,
"Host" text,
"Network" text,
"Date premiered" text
) |
SELECT date FROM table_17104539_9 WHERE score = "W 83-69" | Name the date for the score of w 83-69 | CREATE TABLE table_17104539_9 (date VARCHAR, score VARCHAR) |
SELECT T2.Location FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID HAVING COUNT(*) > 1 | Show the locations of schools that have more than 1 player. | CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Location VARCHAR, School_ID VARCHAR) |
SELECT * FROM table_dev_35 WHERE neutrophil_count >= 1500 | neutrophil count >= 1500 / mm3 | CREATE TABLE table_dev_35 (
"id" int,
"white_blood_cell_count_wbc" int,
"platelets" int,
"neutrophil_count" int,
"serum_creatinine" float,
"albumin" float,
"NOUSE" float
) |
SELECT record FROM table_17104539_9 WHERE score = "W 76-67" | Name the record for score of w 76-67 | CREATE TABLE table_17104539_9 (record VARCHAR, score VARCHAR) |
SELECT T2.Denomination FROM player AS T1 JOIN school AS T2 ON T1.School_ID = T2.School_ID GROUP BY T1.School_ID ORDER BY COUNT(*) DESC LIMIT 1 | Show the denomination of the school that has the most players. | CREATE TABLE player (School_ID VARCHAR); CREATE TABLE school (Denomination VARCHAR, School_ID VARCHAR) |
SELECT COUNT("name of\nconcern") FROM table_203_320 WHERE "profit\n(thou.\npln)" > 1000000 | how many companies had over $ 1,000,000 profit ? | CREATE TABLE table_203_320 (
id number,
"rank in\n2011" number,
"name of\nconcern" text,
"location of\nheadquarters" text,
"revenue\n(thou.\npln)" number,
"profit\n(thou.\npln)" number,
"employees" number
) |
SELECT score FROM table_17104539_12 WHERE date = "September 9" | What are the scores for games played on september 9? | CREATE TABLE table_17104539_12 (score VARCHAR, date VARCHAR) |
SELECT T1.Location, T2.Nickname FROM school AS T1 JOIN school_details AS T2 ON T1.School_ID = T2.School_ID | Show locations and nicknames of schools. | CREATE TABLE school (Location VARCHAR, School_ID VARCHAR); CREATE TABLE school_details (Nickname VARCHAR, School_ID VARCHAR) |
SELECT played FROM table_name_82 WHERE points_difference = "points difference" | What are the played points difference? | CREATE TABLE table_name_82 (
played VARCHAR,
points_difference VARCHAR
) |
SELECT score FROM table_17104539_12 WHERE record = "16-17" | What was the score of the game played when the team was 16-17? | CREATE TABLE table_17104539_12 (score VARCHAR, record VARCHAR) |
SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination | Please show different denominations and the corresponding number of schools. | CREATE TABLE school (Denomination VARCHAR) |
SELECT "Chassis" FROM table_80210 WHERE "Engine" = 'porsche flat-4' AND "Year" < '1958' | What chassis did the porsche flat-4 use before 1958? | CREATE TABLE table_80210 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
) |
SELECT location_attendance FROM table_17104539_12 WHERE game = 32 | What was the location and where did the team play game number 32? | CREATE TABLE table_17104539_12 (location_attendance VARCHAR, game VARCHAR) |
SELECT Denomination, COUNT(*) FROM school GROUP BY Denomination ORDER BY COUNT(*) DESC | Please show different denominations and the corresponding number of schools in descending order. | CREATE TABLE school (Denomination VARCHAR) |
SELECT COUNT(_number) FROM table_12032893_1 WHERE name = "Ron Baxter" | What number (#) is associated with the Name Ron Baxter? | CREATE TABLE table_12032893_1 (
_number VARCHAR,
name VARCHAR
) |
SELECT high_rebounds FROM table_17104539_10 WHERE record = "11-13" | Who had a high rebound where the associated record is 11-13? | CREATE TABLE table_17104539_10 (high_rebounds VARCHAR, record VARCHAR) |
SELECT School_Colors FROM school ORDER BY Enrollment DESC LIMIT 1 | List the school color of the school that has the largest enrollment. | CREATE TABLE school (School_Colors VARCHAR, Enrollment VARCHAR) |
SELECT Name, Age FROM editor ORDER BY Name | Draw a bar chart of name versus age, and I want to rank by the x axis in asc. | CREATE TABLE editor (
Editor_ID int,
Name text,
Age real
)
CREATE TABLE journal (
Journal_ID int,
Date text,
Theme text,
Sales int
)
CREATE TABLE journal_committee (
Editor_ID int,
Journal_ID int,
Work_Type text
) |
SELECT score FROM table_17104539_10 WHERE date = "July 8" | On July 8, what was the score? | CREATE TABLE table_17104539_10 (score VARCHAR, date VARCHAR) |
SELECT LOCATION FROM school WHERE NOT School_ID IN (SELECT School_ID FROM Player) | List the locations of schools that do not have any player. | CREATE TABLE school (LOCATION VARCHAR, School_ID VARCHAR); CREATE TABLE Player (LOCATION VARCHAR, School_ID VARCHAR) |
SELECT margin_of_victory FROM table_name_19 WHERE runner_s__up = "mark o'meara" | Which Margin of victory has a Runner(s)-up of mark o'meara? | CREATE TABLE table_name_19 (
margin_of_victory VARCHAR,
runner_s__up VARCHAR
) |
SELECT opponent FROM table_17104539_10 WHERE score = "L 68-60" | Who was the oppenent what the score was L 68-60? | CREATE TABLE table_17104539_10 (opponent VARCHAR, score VARCHAR) |
SELECT Denomination FROM school WHERE Founded < 1890 INTERSECT SELECT Denomination FROM school WHERE Founded > 1900 | Show the denomination shared by schools founded before 1890 and schools founded after 1900 | CREATE TABLE school (Denomination VARCHAR, Founded INTEGER) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admityear < "2115" AND procedures.long_title = "Insertion of non-drug-eluting coronary artery stent(s)" | what is the number of patients who were admitted before the year 2115 for insertion of non-drug-eluting coronary artery stent(s)? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... |
SELECT record FROM table_17118657_10 WHERE high_assists = "Canty (6)" | If high assists are under Canty (6) how much would the record be? | CREATE TABLE table_17118657_10 (record VARCHAR, high_assists VARCHAR) |
SELECT Nickname FROM school_details WHERE Division <> "Division 1" | Show the nicknames of schools that are not in division 1. | CREATE TABLE school_details (Nickname VARCHAR, Division VARCHAR) |
SELECT "Sequencer" FROM table_17773 WHERE "Ion Torrent PGM" = '200-400 bp' | What is the sequencer when ion torrent pgm is 200-400 bp? | CREATE TABLE table_17773 (
"Sequencer" text,
"Ion Torrent PGM" text,
"454 GS FLX" text,
"HiSeq 2000" text,
"SOLiDv4" text,
"PacBio" text,
"Sanger 3730xl" text
) |
SELECT high_points FROM table_17118657_10 WHERE score = "62-70" | If the score is 62-70, what are the high points? | CREATE TABLE table_17118657_10 (high_points VARCHAR, score VARCHAR) |
SELECT Denomination FROM school GROUP BY Denomination HAVING COUNT(*) > 1 | Show the denomination shared by more than one school. | CREATE TABLE school (Denomination VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND lab.label = "Creatine Kinase, MB Isoenzyme" | give me the number of patients whose admission type is emergency and lab test name is creatine kinase, mb isoenzyme? | CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
... |
SELECT date FROM table_17118657_10 WHERE location_attendance = "UIC Pavilion 3,829" | On which date was the location/attendance UIC Pavilion 3,829 respectively? | CREATE TABLE table_17118657_10 (date VARCHAR, location_attendance VARCHAR) |
SELECT DISTINCT District_name FROM district ORDER BY city_area DESC | Find all the distinct district names ordered by city area in descending. | CREATE TABLE district (District_name VARCHAR, city_area VARCHAR) |
SELECT MIN(absorb__nm_) FROM table_26428602_1 WHERE color = "orange" | How much absorption in nm does the orange dye have? | CREATE TABLE table_26428602_1 (
absorb__nm_ INTEGER,
color VARCHAR
) |
SELECT date FROM table_17118657_10 WHERE high_assists = "Dupree (6)" | On which date is high assists Dupree (6)? | CREATE TABLE table_17118657_10 (date VARCHAR, high_assists VARCHAR) |
SELECT max_page_size FROM product GROUP BY max_page_size HAVING COUNT(*) > 3 | Find the list of page size which have more than 3 product listed | CREATE TABLE product (max_page_size VARCHAR) |
SELECT COUNT(*) FROM table_204_565 WHERE "date" = 9 AND "date" = 1978 | how many games were played in september 1978 ? | CREATE TABLE table_204_565 (
id number,
"game" number,
"date" text,
"opponent" text,
"venue" text,
"result" text,
"attendance" number,
"goalscorers" text
) |
SELECT local_investment__us$_ FROM table_17118006_2 WHERE bid_pronar_investment__us$_ = "912,185" | What was the local investment (in $) in the projects of the department with $912,185 BID/PRONAR investment? | CREATE TABLE table_17118006_2 (local_investment__us$_ VARCHAR, bid_pronar_investment__us$_ VARCHAR) |
SELECT District_name, City_Population FROM district WHERE City_Population BETWEEN 200000 AND 2000000 | Find the name and population of district with population between 200000 and 2000000 | CREATE TABLE district (District_name VARCHAR, City_Population INTEGER) |
SELECT AVG(year) FROM table_name_88 WHERE points = 0 AND chassis = "toleman tg181" | Which year has a total of 0 points and a chassis of Toleman tg181? | CREATE TABLE table_name_88 (
year INTEGER,
points VARCHAR,
chassis VARCHAR
) |
SELECT MAX(farmers) FROM table_17118006_2 WHERE projects = 32 | How many farmers were included by the department with 32 projects? | CREATE TABLE table_17118006_2 (farmers INTEGER, projects VARCHAR) |
SELECT district_name FROM district WHERE city_area > 10 OR City_Population > 100000 | Find the name all districts with city area greater than 10 or population larger than 100000 | CREATE TABLE district (district_name VARCHAR, city_area VARCHAR, City_Population VARCHAR) |
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%International Economics%' OR name LIKE '%International Economics%') AND credits = 3 | I want to see International Economics courses of 3 credits . | CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE comment_instructor (
instructor_id int... |
SELECT department FROM table_17118006_2 WHERE irrigated_ha = 2170 | What department irrigated 2170 Ha? | CREATE TABLE table_17118006_2 (department VARCHAR, irrigated_ha VARCHAR) |
SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1 | Which district has the largest population? | CREATE TABLE district (district_name VARCHAR, city_population VARCHAR) |
SELECT MAX("No in Series") FROM table_24187 WHERE "Directed by" = 'John Behring' | What episode number in the series was directed by John Behring? | CREATE TABLE table_24187 (
"No in Series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) |
SELECT bid_pronar_investment__us$_ FROM table_17118006_2 WHERE farmers = 1326 | What was the BID/PRONAR investment (in $) in the department that included 1326 farmers in its projects? | CREATE TABLE table_17118006_2 (bid_pronar_investment__us$_ VARCHAR, farmers VARCHAR) |
SELECT district_name FROM district ORDER BY city_area LIMIT 1 | Which district has the least area? | CREATE TABLE district (district_name VARCHAR, city_area VARCHAR) |
SELECT "Home team score" FROM table_10710 WHERE "Home team" = 'melbourne' | What was the home score for the Home team Melbourne? | CREATE TABLE table_10710 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) |
SELECT department FROM table_17118006_2 WHERE local_investment__us$_ = "626,798" | What was the department that got $626,798 in local investments? | CREATE TABLE table_17118006_2 (department VARCHAR, local_investment__us$_ VARCHAR) |
SELECT SUM(city_population) FROM district ORDER BY city_area DESC LIMIT 3 | Find the total population of the top 3 districts with the largest area. | CREATE TABLE district (city_population INTEGER, city_area VARCHAR) |
SELECT COUNT(enrollment__2012_) FROM table_2076516_1 WHERE founded = 1927 | When 1927 is the founded year how many measurements of enrollment in 2012 are there? | CREATE TABLE table_2076516_1 (
enrollment__2012_ VARCHAR,
founded VARCHAR
) |
SELECT MIN(game) FROM table_17118657_8 WHERE record = "5-11" | What number was the game resulting in a 5-11 record? | CREATE TABLE table_17118657_8 (game INTEGER, record VARCHAR) |
SELECT TYPE, COUNT(*) FROM store GROUP BY TYPE | Find all types of store and number of them. | CREATE TABLE store (TYPE VARCHAR) |
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ... | how many patients died after being diagnosed in 2104 with hematuria in the same hospital encounter? | CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... |
SELECT COUNT(high_assists) FROM table_17118657_8 WHERE score = "68-60" | How many high assists are listed for the game with a score of 68-60? | CREATE TABLE table_17118657_8 (high_assists VARCHAR, score VARCHAR) |
SELECT t1.store_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 t3.district_name = "Khanewal District" | Find the names of all stores in Khanewal District. | CREATE TABLE district (district_id VARCHAR, district_name VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR) |
SELECT census_ranking FROM table_name_93 WHERE area_km_2 < 9.94 AND population < 817 | What is the census ranking for the community with an area smaller than 9.94 km2 and a population smaller than 817? | CREATE TABLE table_name_93 (
census_ranking VARCHAR,
area_km_2 VARCHAR,
population VARCHAR
) |
SELECT high_rebounds FROM table_17118657_8 WHERE record = "5-11" | In the game resulting in a 5-11 record, who scored the high rebounds? | CREATE TABLE table_17118657_8 (high_rebounds VARCHAR, record VARCHAR) |
SELECT t1.store_name FROM store AS t1 JOIN store_district AS t2 ON t1.store_id = t2.store_id WHERE district_id = (SELECT district_id FROM district ORDER BY city_population DESC LIMIT 1) | Find all the stores in the district with the most population. | CREATE TABLE store_district (store_id VARCHAR); CREATE TABLE district (district_id VARCHAR, city_population VARCHAR); CREATE TABLE store (store_name VARCHAR, store_id VARCHAR) |
SELECT away_team FROM table_name_5 WHERE home_team = "cheltenham town" | What is the away team when the home team is Cheltenham Town? | CREATE TABLE table_name_5 (
away_team VARCHAR,
home_team VARCHAR
) |
SELECT opponent FROM table_17120964_8 WHERE result = "Won 4-1" | Who was the opponent of the game with final score won 4-1? | CREATE TABLE table_17120964_8 (opponent 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 WHERE t1.store_name = "Blackville" | Which city is the headquarter of the store named "Blackville" in? | CREATE TABLE store (store_id VARCHAR, store_name VARCHAR); CREATE TABLE district (headquartered_city VARCHAR, district_id VARCHAR); CREATE TABLE store_district (store_id VARCHAR, district_id VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.