answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT report FROM table_name_8 WHERE date = "september 3, 2005" | What Report has the Date September 3, 2005? | CREATE TABLE table_name_8 (report VARCHAR, date VARCHAR) |
SELECT MAX(vitalperiodic.respiration) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-25994') AND NOT patient.unitdischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1) AND NOT vitalperiodic.respiration IS NULL | tell me patient 027-25994's maximum respiration on the last intensive care unit visit? | CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
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,
drugstarttime time,
drugstoptime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT institution FROM table_261954_1 WHERE nickname = "Quakers" | What is every institution with the nickname of Quakers? | CREATE TABLE table_261954_1 (institution VARCHAR, nickname VARCHAR) |
SELECT 3 AS ’utr_sequence FROM table_name_64 WHERE coding = "6a 3" AND genbank_id = "nm_001093770.2" | What was the 3’UTR sequence when Coding was 6a 3 and the GenBank id is nm_001093770.2? | CREATE TABLE table_name_64 (coding VARCHAR, genbank_id VARCHAR) |
SELECT "Label" FROM table_41309 WHERE "Covered Song" = ' sign o'' the times " by prince .' | What is the Label for the Covered Song named ' sign o' the times ' by prince .? | CREATE TABLE table_41309 (
"Album" text,
"Release date" text,
"Label" text,
"Format" text,
"Covered Song" text,
"Original Song" text
) |
SELECT MIN(joined) FROM table_261954_1 | What is the least value of joined? | CREATE TABLE table_261954_1 (joined INTEGER) |
SELECT variant_id FROM table_name_40 WHERE genbank_id = "nm_005411.4" | Which Variant id has the GenBank id of nm_005411.4? | CREATE TABLE table_name_40 (variant_id VARCHAR, genbank_id VARCHAR) |
SELECT "Team #2" FROM table_42161 WHERE "1st leg" = '70 - 44' | Which Team #2 has a 1st leg of 70 - 44? | CREATE TABLE table_42161 (
"Team #1" text,
"Agg." text,
"Team #2" text,
"1st leg" text,
"2nd leg" text
) |
SELECT institution FROM table_261954_1 WHERE nickname = "WildCats" | What is every institution with the nickname of Wildcats? | CREATE TABLE table_261954_1 (institution VARCHAR, nickname VARCHAR) |
SELECT 5 AS ’utr_splice FROM table_name_46 WHERE variant_id = "sftpa1 variant 2" | Which 5’UTR splice has a Variant ID at sftpa1 variant 2? | CREATE TABLE table_name_46 (variant_id VARCHAR) |
SELECT "Software" FROM table_55886 WHERE "Latest stable date (version)" = '0.6.1' | Name the software with the latest stable date of 0.6.1 | CREATE TABLE table_55886 (
"Software" text,
"Latest stable date (version)" text,
"Cost ( USD )" text,
"Open source" text,
"License" text
) |
SELECT title FROM table_26199130_1 WHERE production_code = "2ALF03" | What is the title of the episode with production code 2alf03? | CREATE TABLE table_26199130_1 (title VARCHAR, production_code VARCHAR) |
SELECT 3 AS ’utr_sequence FROM table_name_87 WHERE genbank_id = "hq021440" | Which 3’UTR sequence has the GenBank ID at hq021440? | CREATE TABLE table_name_87 (genbank_id VARCHAR) |
SELECT SUM("Pick #") FROM table_5199 WHERE "Player" = 'mike zaher' | How many picks did Mike Zaher have? | CREATE TABLE table_5199 (
"Pick #" real,
"MLS Team" text,
"Player" text,
"Position" text,
"Affiliation" text
) |
SELECT rank__week_ FROM table_26199130_1 WHERE no = 34 | What was the rank (week) for episode number 34? | CREATE TABLE table_26199130_1 (rank__week_ VARCHAR, no VARCHAR) |
SELECT copa_libertadores_1992 FROM table_name_59 WHERE supercopa_sudamericana_1992 = "round of 16" AND team = "grêmio" | Which Copa Libertadores 1992 has a Supercopa Sudamericana 1992 of round of 16, and a Team of grêmio? | CREATE TABLE table_name_59 (copa_libertadores_1992 VARCHAR, supercopa_sudamericana_1992 VARCHAR, team VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "EMERGENCY" AND diagnoses.long_title = "Accidental fall on or from other stairs or steps" | how many patients whose admission type is emergency and diagnoses long title is accidental fall on or from other stairs or steps? | 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
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 MAX(no) FROM table_26199130_1 WHERE us_viewers__million_ = "11.96" | What numbered episode had 11.96 million US viewers? | CREATE TABLE table_26199130_1 (no INTEGER, us_viewers__million_ VARCHAR) |
SELECT team FROM table_name_28 WHERE recopa_sudamericana_1992 = "runner-up" | Which Team has a Recopa Sudamericana 1992 of runner-up? | CREATE TABLE table_name_28 (team VARCHAR, recopa_sudamericana_1992 VARCHAR) |
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-31513')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput.celllabel = 'urine' AND STRFTIME('%y-%m-%d', intakeoutput.intakeoutputtime) >= '2101-03-14' ORDER BY intakeoutput.intakeoutputtime DESC LIMIT 1 | when was the last time that patient 022-31513 had the urine output since 03/14/2101? | CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
) |
SELECT rank__week_ FROM table_26200084_1 WHERE _number = 19 | What was the ranking of episode #19? | CREATE TABLE table_26200084_1 (rank__week_ VARCHAR, _number VARCHAR) |
SELECT supercopa_sudamericana_1992 FROM table_name_83 WHERE team = "santos" | Which Supercopa Sudamericana 1992 has a Team of santos? | CREATE TABLE table_name_83 (supercopa_sudamericana_1992 VARCHAR, team VARCHAR) |
SELECT COUNT(fa_cup_goals) FROM table_name_41 WHERE name = "jimmy nicholson" AND league_cup_goals > 0 | How many FA cup goals have Jimmy Nicholson as the name, and league cup goals greater than 0? | CREATE TABLE table_name_41 (
fa_cup_goals VARCHAR,
name VARCHAR,
league_cup_goals VARCHAR
) |
SELECT production_code FROM table_26200084_1 WHERE rank__week_ = "28" | What was the production code of the episode ranked 28? | CREATE TABLE table_26200084_1 (production_code VARCHAR, rank__week_ VARCHAR) |
SELECT date FROM table_name_28 WHERE record = "54-69" | When was the game with a record of 54-69? | CREATE TABLE table_name_28 (date VARCHAR, record VARCHAR) |
SELECT program FROM table_16275828_4 WHERE location = "Charleston, Illinois" | What programs were held in charleston, illinois? | CREATE TABLE table_16275828_4 (
program VARCHAR,
location VARCHAR
) |
SELECT title FROM table_26200084_1 WHERE directed_by = "David Mamet" | What was the title of the episode directed by David Mamet? | CREATE TABLE table_26200084_1 (title VARCHAR, directed_by VARCHAR) |
SELECT SUM(tier) FROM table_name_45 WHERE postseason = "semifinalist" | What is the total number of tiers for the postseason of semifinalist? | CREATE TABLE table_name_45 (tier INTEGER, postseason VARCHAR) |
SELECT "Capital" FROM table_20668 WHERE "Population Census 2009" = '730129' | What capital's county had a population of 730129 as of 2009? | CREATE TABLE table_20668 (
"Code" real,
"County" text,
"Former Province" text,
"Area (km 2 )" text,
"Population Census 2009" real,
"Capital" text
) |
SELECT production_code FROM table_26198709_1 WHERE us_viewers__million_ = "18.07" | What is the production code for the episode that had 18.07 million viewers? | CREATE TABLE table_26198709_1 (production_code VARCHAR, us_viewers__million_ VARCHAR) |
SELECT MAX(points) FROM table_name_7 WHERE chassis = "reynard 91d" AND year < 1991 | For a year earlier than 1991 and a reynard 91d chassis, what's the highest points? | CREATE TABLE table_name_7 (points INTEGER, chassis VARCHAR, year VARCHAR) |
SELECT position FROM table_name_38 WHERE round = 4 | A round of 4 is in what position? | CREATE TABLE table_name_38 (
position VARCHAR,
round VARCHAR
) |
SELECT MAX(rank__week_) FROM table_26198709_1 WHERE production_code = "1ALF05" | What is the weeks rank for the episode with the production code 1alf05? | CREATE TABLE table_26198709_1 (rank__week_ INTEGER, production_code VARCHAR) |
SELECT COUNT(points) FROM table_name_7 WHERE entrant = "bs automotive" | Total points for a bs automotive entrant? | CREATE TABLE table_name_7 (points VARCHAR, entrant VARCHAR) |
SELECT MAX(week) FROM table_name_90 WHERE opponent = "atlanta falcons" | What is the largest week with the Atlanta Falcons as the opponent? | CREATE TABLE table_name_90 (
week INTEGER,
opponent VARCHAR
) |
SELECT COUNT(original_air_date) FROM table_26198709_1 WHERE us_viewers__million_ = "15.50" | How many air dates does the episode with 15.50 million viewers have? | CREATE TABLE table_26198709_1 (original_air_date VARCHAR, us_viewers__million_ VARCHAR) |
SELECT engine FROM table_name_17 WHERE entrant = "colt racing" | What is a colt racing entrant engine? | CREATE TABLE table_name_17 (engine VARCHAR, entrant VARCHAR) |
SELECT location FROM table_name_55 WHERE event = "rip curl pro mademoiselle" | The event rip curl pro mademoiselle is in which location? | CREATE TABLE table_name_55 (
location VARCHAR,
event VARCHAR
) |
SELECT written_by FROM table_26198709_1 WHERE us_viewers__million_ = "18.07" | Who wrote the episode with 18.07 million viewers? | CREATE TABLE table_26198709_1 (written_by VARCHAR, us_viewers__million_ VARCHAR) |
SELECT AVG(passengers) FROM table_name_31 WHERE airport = "indonesia, denpasar" | How many Passengers that have an Airport in indonesia, denpasar? | CREATE TABLE table_name_31 (passengers INTEGER, airport VARCHAR) |
SELECT COUNT("Crowd") FROM table_38753 WHERE "Home team" = 'melbourne' | What was the crowd size for the Home team of melbourne? | CREATE TABLE table_38753 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Ground" text,
"Crowd" real,
"Date" text,
"Report" text
) |
SELECT MAX(points_against) FROM table_26200568_16 WHERE club = "Toronto Rebels" | How many points were scored against the Toronto Rebels? | CREATE TABLE table_26200568_16 (points_against INTEGER, club VARCHAR) |
SELECT airport FROM table_name_52 WHERE carriers = "malaysia airlines" | Which Airport has a Carrier of malaysia airlines? | CREATE TABLE table_name_52 (airport VARCHAR, carriers VARCHAR) |
SELECT "Title" FROM table_22973 WHERE "Production code" = '10018' | What's the title of the episode with production code 10018? | CREATE TABLE table_22973 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S. viewers (millions)" text
) |
SELECT MIN(points_for) FROM table_26200568_16 WHERE club = "Toronto Downtown Dingos" | How many points did the Toronto Downtown Dingos score? | CREATE TABLE table_26200568_16 (points_for INTEGER, club VARCHAR) |
SELECT tier FROM table_name_91 WHERE division = "leb 2" AND cup_competitions = "copa leb plata runner-up" | Which tier has a division of LEB 2 and Cup Competitions of Copa LEB Plata runner-up? | CREATE TABLE table_name_91 (tier VARCHAR, division VARCHAR, cup_competitions VARCHAR) |
SELECT MAX(demographic.age) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.admission_type = "EMERGENCY" | what is maximum age of patients whose marital status is divorced and admission type is emergency? | CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
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 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 losses FROM table_26200568_16 WHERE club = "Toronto Downtown Dingos" | How many losses does Toronto Downtown Dingos have? | CREATE TABLE table_26200568_16 (losses VARCHAR, club VARCHAR) |
SELECT COUNT(pos) FROM table_name_11 WHERE postseason = "relegation playoffs" AND tier = 3 | How many positions have a Postseason of relegation playoffs and a tier of 3? | CREATE TABLE table_name_11 (pos VARCHAR, postseason VARCHAR, tier VARCHAR) |
SELECT "Population Density (/km 2 )" FROM table_26974 WHERE "DS Division" = 'Manthai West' | Name the popultion density being manthai west | CREATE TABLE table_26974 (
"DS Division" text,
"Main Town" text,
"GN Divisions" real,
"Area (km 2 )" real,
"Sri Lankan Tamil" real,
"Sri Lankan Moors" real,
"Sinhalese" real,
"Indian Tamil" real,
"Other" real,
"Total" real,
"Population Density (/km 2 )" real
) |
SELECT percentage FROM table_26200568_16 WHERE points_for = 63 | What is the percentage listed for the team who scored 63 points? | CREATE TABLE table_26200568_16 (percentage VARCHAR, points_for VARCHAR) |
SELECT MIN(tier) FROM table_name_68 WHERE postseason = "quarterfinalist" | What is the lowest tier for a postseason result of quarterfinalist? | CREATE TABLE table_name_68 (tier INTEGER, postseason VARCHAR) |
SELECT COUNT("Year") FROM table_70445 WHERE "LLWS" = '4th place' AND "City" = 'westport' | What is the total number of Years when the LLWS is 4th place, and when the City is Westport? | CREATE TABLE table_70445 (
"Year" real,
"Champion" text,
"City" text,
"LLWS" text,
"Record" text
) |
SELECT MAX(losses) FROM table_26200568_16 WHERE club = "Central Blues" | How many losses does Central Blues have? | CREATE TABLE table_26200568_16 (losses INTEGER, club VARCHAR) |
SELECT format FROM table_name_84 WHERE catalog = "080 360-2" | What format has 080 360-2 as the catalog? | CREATE TABLE table_name_84 (format VARCHAR, catalog VARCHAR) |
SELECT iata FROM table_name_76 WHERE icao = "rjcm" | What is RJCM's IATA? | CREATE TABLE table_name_76 (
iata VARCHAR,
icao VARCHAR
) |
SELECT specimen_weight_size FROM table_26211058_1 WHERE calculated_activity___ci__ = "4.96×10 −11" | If the calculated activity (CI) is 4.96×10 −11, what is the specimen weight/size? | CREATE TABLE table_26211058_1 (specimen_weight_size VARCHAR, calculated_activity___ci__ VARCHAR) |
SELECT label FROM table_name_4 WHERE catalog = "887 448-2" | What label has 887 448-2 as the catalog? | CREATE TABLE table_name_4 (label VARCHAR, catalog VARCHAR) |
SELECT language FROM table_2534578_1 WHERE reading = "94.47" | What was the language score when the reading score was 94.47? | CREATE TABLE table_2534578_1 (
language VARCHAR,
reading VARCHAR
) |
SELECT COUNT(calculated_activity___bq__) FROM table_26211058_1 WHERE specimen_weight_size = "1000 g / 8.79 cm" | If the specimen weight/size is 1000 g / 8.79 cm, what is the calculated activity? | CREATE TABLE table_26211058_1 (calculated_activity___bq__ VARCHAR, specimen_weight_size VARCHAR) |
SELECT label FROM table_name_20 WHERE format = "cd single" | What label has cd single as the format? | CREATE TABLE table_name_20 (label VARCHAR, format VARCHAR) |
SELECT AVG(attendance) FROM performance | What is the average number of attendees for performances? | CREATE TABLE performance (
performance_id number,
date text,
host text,
location text,
attendance number
)
CREATE TABLE member_attendance (
member_id number,
performance_id number,
num_of_pieces number
)
CREATE TABLE member (
member_id text,
name text,
nationality text,
role text
) |
SELECT rk FROM table_26218783_6 WHERE new_points = 5760 | If the new points were 5760, what is the RK? | CREATE TABLE table_26218783_6 (rk VARCHAR, new_points VARCHAR) |
SELECT catalog FROM table_name_73 WHERE date = "june 1990" | What catalog has june 1990 as the date? | CREATE TABLE table_name_73 (catalog VARCHAR, date VARCHAR) |
SELECT "Purpose" FROM table_50346 WHERE "Freq currently" = '4rph' | What is the Purpose of the Callsign with a Freq currently of 4rph? | CREATE TABLE table_50346 (
"Callsign" text,
"Area served" text,
"Band" text,
"Freq currently" text,
"Purpose" text
) |
SELECT COUNT(points) AS defending FROM table_26218783_6 WHERE player = "Stanislas Wawrinka" | How many times is player Stanislas Wawrinka on the list? | CREATE TABLE table_26218783_6 (points VARCHAR, player VARCHAR) |
SELECT building FROM table_name_42 WHERE storeys = 26 | Which building has 26 storeys? | CREATE TABLE table_name_42 (building VARCHAR, storeys VARCHAR) |
SELECT MAX("Game") FROM table_23872 WHERE "Opponent" = 'Furman' | How many games were against Furman? | CREATE TABLE table_23872 (
"Game" real,
"Date" text,
"Opponent" text,
"Result" text,
"Tar Heels points" real,
"Opponents" real,
"Record" text
) |
SELECT COUNT(points) AS won FROM table_26218783_7 WHERE points = 6675 | how many time was points 6675? | CREATE TABLE table_26218783_7 (points VARCHAR) |
SELECT height FROM table_name_34 WHERE storeys < 45 AND building = "scotia centre" | What is the height for less than 45 storeys in Scotia Centre? | CREATE TABLE table_name_34 (height VARCHAR, storeys VARCHAR, building VARCHAR) |
SELECT "Investment Earnings" FROM table_51367 WHERE "Total Revenue" = '21,779,618' | What were the investment earnings in a year when total revenue was $21,779,618? | CREATE TABLE table_51367 (
"Year" real,
"Property Taxes" text,
"Investment Earnings" text,
"Other Local Sources" text,
"State & Federal" text,
"Total Revenue" text
) |
SELECT MIN(points) AS won FROM table_26218783_7 WHERE player = "Victoria Azarenka" | What is the lowest points won from player victoria azarenka? | CREATE TABLE table_26218783_7 (points INTEGER, player VARCHAR) |
SELECT storeys FROM table_name_46 WHERE city = "calgary" AND years = "1975-1976" | How many storeys in Calgary during 1975-1976? | CREATE TABLE table_name_46 (storeys VARCHAR, city VARCHAR, years VARCHAR) |
SELECT jockey FROM table_name_41 WHERE winner = "helioptic" | Who was the jockey for the winning horse Helioptic? | CREATE TABLE table_name_41 (
jockey VARCHAR,
winner VARCHAR
) |
SELECT status FROM table_26218783_7 WHERE sd = 15 | What is the status when sd is 15? | CREATE TABLE table_26218783_7 (status VARCHAR, sd VARCHAR) |
SELECT city FROM table_name_97 WHERE years = "1971-1974" | Which city had years 1971-1974? | CREATE TABLE table_name_97 (city VARCHAR, years VARCHAR) |
SELECT director FROM table_name_73 WHERE nomination = "best actor in a leading role" | Tell me the director nominated for best actor in a leading role | CREATE TABLE table_name_73 (
director VARCHAR,
nomination VARCHAR
) |
SELECT MAX(sd) FROM table_26218783_7 WHERE status = "Second round lost to Iveta Benešová" | What is the highest sd when the status is second round lost to iveta benešová? | CREATE TABLE table_26218783_7 (sd INTEGER, status VARCHAR) |
SELECT city FROM table_name_66 WHERE building = "telus plaza south" | Which city contains Telus Plaza South? | CREATE TABLE table_name_66 (city VARCHAR, building VARCHAR) |
SELECT 2004 FROM table_name_60 WHERE 1994 = "2r" | What is the 2004 value with 2r in 1994? | CREATE TABLE table_name_60 (
Id VARCHAR
) |
SELECT COUNT(founded) FROM table_26218124_1 WHERE stadium = "Westfalenstadion" | How many clubs were founded in the westfalenstadion stadium? | CREATE TABLE table_26218124_1 (founded VARCHAR, stadium VARCHAR) |
SELECT MIN(played) FROM table_name_30 WHERE lost = 2 AND points > 13 | What is the lowest number played with 2 losses and more than 13 points? | CREATE TABLE table_name_30 (played INTEGER, lost VARCHAR, points VARCHAR) |
SELECT AVG(drawn) FROM table_name_13 WHERE points = 12 AND played < 10 | What was the drawn amount for teams with points of 12 and played smaller than 10? | CREATE TABLE table_name_13 (
drawn INTEGER,
points VARCHAR,
played VARCHAR
) |
SELECT original_club FROM table_26218124_1 WHERE name = "Hapoel Katamon Jerusalem F.C." | Which club was originally named hapoel katamon jerusalem f.c.? | CREATE TABLE table_26218124_1 (original_club VARCHAR, name VARCHAR) |
SELECT MIN(position) FROM table_name_4 WHERE played > 9 | What is the smallest positioned with more than 9 played? | CREATE TABLE table_name_4 (position INTEGER, played INTEGER) |
SELECT SUM("Week") FROM table_42201 WHERE "Opponent" = 'green bay packers' | How many weeks had the Green Bay packers as opponents? | CREATE TABLE table_42201 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
) |
SELECT COUNT(founded) FROM table_26218124_1 WHERE city = "Belo Horizonte" | How many clubs were founded in belo horizonte? | CREATE TABLE table_26218124_1 (founded VARCHAR, city VARCHAR) |
SELECT COUNT(drawn) FROM table_name_81 WHERE team = "corinthians" AND lost > 5 | How many draws took place for team Corinthians with more than 5 losses? | CREATE TABLE table_name_81 (drawn VARCHAR, team VARCHAR, lost VARCHAR) |
SELECT SUM(total_foreign_born__1000_) FROM table_name_7 WHERE country = "sweden" AND born_in_other_eu_state__1000_ > 477 | How many Foreign-born (1000) are from Sweden and born in some other EU state (1000) larger than 477? | CREATE TABLE table_name_7 (
total_foreign_born__1000_ INTEGER,
country VARCHAR,
born_in_other_eu_state__1000_ VARCHAR
) |
SELECT original_club FROM table_26218124_1 WHERE name = "Newcastle Falcons" | Which club was originally named the newcastle falcons? | CREATE TABLE table_26218124_1 (original_club VARCHAR, name VARCHAR) |
SELECT MIN(2007) FROM table_name_91 WHERE 2004 = 78 AND 2006 < 80 | Which 2007 is the lowest one that has a 2004 of 78, and a 2006 smaller than 80? | CREATE TABLE table_name_91 (Id VARCHAR) |
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex) DESC | Bar chart x axis sex y axis how many sex, and order in desc by the how many sex. | CREATE TABLE candidate (
Candidate_ID int,
People_ID int,
Poll_Source text,
Date text,
Support_rate real,
Consider_rate real,
Oppose_rate real,
Unsure_rate real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight real
) |
SELECT MIN(f_laps) FROM table_26222468_1 | What is the minimum number of f/laps? | CREATE TABLE table_26222468_1 (f_laps INTEGER) |
SELECT MIN(2005) FROM table_name_32 WHERE grade < 6 AND 2008 < 80 AND 2006 > 72 | Which 2005 is the lowest one that has a Grade smaller than 6, and a 2008 smaller than 80, and a 2006 larger than 72? | CREATE TABLE table_name_32 (grade VARCHAR) |
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', medication.drugstarttime)) FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-47576') AND patient.hospitaldischargetime IS NULL) AND medication.drugname = 'potassium chloride 20 meq in 50 ml ivpb **locked dose' ORDER BY medication.drugstarttime LIMIT 1 | how many hours had it been since patient 006-47576 received her first potassium chloride 20 meq in 50 ml ivpb **locked dose prescription on their current hospital encounter? | CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT COUNT(season) FROM table_26222468_1 WHERE points = "N/A" | How many seasons have points totals of N/A? | CREATE TABLE table_26222468_1 (season VARCHAR, points VARCHAR) |
SELECT SUM(term_ending) FROM table_name_67 WHERE position = "member" AND nationality = "india" | Position of member, and a Nationality of india is what sum of term ending? | CREATE TABLE table_name_67 (term_ending INTEGER, position VARCHAR, nationality VARCHAR) |
SELECT COUNT(u.DisplayName) FROM Users AS u WHERE (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = u.Id AND PostTypeId = 2) = 0 AND (SELECT COUNT(*) FROM Posts WHERE OwnerUserId = u.Id AND PostTypeId = 1) != 0 | Unselfish - Those who answer and never ask.. Query of users who answer but never asked a question.
Sorted by number of answers for a user. | CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
OwnerUserId number,
Comment text,
Text text,
Title text,
Tags text,
RevisionGUID other
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
) |
SELECT MAX(wins) FROM table_26222468_1 | What is the maximum number of wins? | CREATE TABLE table_26222468_1 (wins INTEGER) |
SELECT MAX(term_ending) FROM table_name_89 WHERE name = "xue hanqin" | Name of xue hanqin has what highest term ending? | CREATE TABLE table_name_89 (term_ending INTEGER, name VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.