answer stringlengths 6 3.91k | question stringlengths 7 766 | context stringlengths 27 7.14k |
|---|---|---|
SELECT third FROM table_25563779_4 WHERE second = "Sergey Sirotkin" | If second is Sergey Sirotkin, what is the third name? | CREATE TABLE table_25563779_4 (third VARCHAR, second VARCHAR) |
SELECT COUNT("Position") FROM table_20819 WHERE "Player" = 'Jeff Brown' | How many players named Jeff Brown were drafted | CREATE TABLE table_20819 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) |
SELECT cores FROM table_24099628_1 WHERE model__list_ = "E2xxx" | What is the number of cores associated with model name e2xxx? | CREATE TABLE table_24099628_1 (cores VARCHAR, model__list_ VARCHAR) |
SELECT champion FROM table_25563779_4 WHERE third = "Bruno Bonifacio" | If the third name is Bruno Bonifacio, what is the champion? | CREATE TABLE table_25563779_4 (champion VARCHAR, third VARCHAR) |
SELECT cName, enr FROM College ORDER BY enr | Find cName and enr , and visualize them by a bar chart. | CREATE TABLE Tryout (
pID numeric(5,0),
cName varchar(20),
pPos varchar(8),
decision varchar(3)
)
CREATE TABLE Player (
pID numeric(5,0),
pName varchar(20),
yCard varchar(3),
HS numeric(5,0)
)
CREATE TABLE College (
cName varchar(20),
state varchar(2),
enr numeric(5,0)
) |
SELECT tdp FROM table_24099628_1 WHERE model__list_ = "4x0" | What is the wattage/TDP associated with model name 4x0? | CREATE TABLE table_24099628_1 (tdp VARCHAR, model__list_ VARCHAR) |
SELECT champion FROM table_25563779_4 WHERE national_trophy_rookie = "not held" | Who is the champion if the national trophy/rookie is not held? | CREATE TABLE table_25563779_4 (champion VARCHAR, national_trophy_rookie VARCHAR) |
SELECT * FROM table_train_165 WHERE body_mass_index_bmi >= 30 | must have a bmi equal to or greater than 30 | CREATE TABLE table_train_165 (
"id" int,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"visual_impairment" bool,
"blood_glucose" int,
"body_mass_index_bmi" float,
"a1c" float,
"age" float,
"NOUSE" float
) |
SELECT tdp FROM table_24100843_1 WHERE socket = "BGA956" AND processor = "Penryn-3M" | When the socket is bga956 and processor is penryn-3m, what is the tdp? | CREATE TABLE table_24100843_1 (tdp VARCHAR, socket VARCHAR, processor VARCHAR) |
SELECT COUNT(season) FROM table_25563779_4 WHERE national_trophy_rookie = "Simone Iaquinta" | If the national trophy/rookie is Simone Iaquinta, what is the season total number? | CREATE TABLE table_25563779_4 (season VARCHAR, national_trophy_rookie VARCHAR) |
SELECT "Performer(s)" FROM table_42631 WHERE "Composer(s)" = 'mariah carey and walter afanasieff' | Who sang the song composed by Mariah Carey and Walter Afanasieff? | CREATE TABLE table_42631 (
"Rank" real,
"Song title" text,
"Composer(s)" text,
"Performer(s)" text,
"Year" real
) |
SELECT processor FROM table_24100843_1 WHERE model__list_ = "P9xxx" | Whats the processor for p9xxx? | CREATE TABLE table_24100843_1 (processor VARCHAR, model__list_ VARCHAR) |
SELECT second FROM table_25563779_4 WHERE national_trophy_rookie = "Gerrard Barrabeig" | If the national trophy/rookie is Gerrard Barrabeig, what is the name of the second? | CREATE TABLE table_25563779_4 (second VARCHAR, national_trophy_rookie VARCHAR) |
SELECT * FROM table_dev_26 WHERE hba1c > 7 AND hemoglobin_a1c_hba1c < 10.5 | hba1c > 7 % and not to exceed 10.5 % . | CREATE TABLE table_dev_26 (
"id" int,
"gender" string,
"hemoglobin_a1c_hba1c" float,
"dyslipidemia" bool,
"body_weight" float,
"hba1c" float,
"body_mass_index_bmi" float,
"hypertension" bool,
"NOUSE" float
) |
SELECT l2_cache FROM table_24099916_1 WHERE tdp = "5.5-10 W" | What's the l2 cache of the model with TDP of 5.5-10 w? | CREATE TABLE table_24099916_1 (l2_cache VARCHAR, tdp VARCHAR) |
SELECT location FROM table_25572068_1 WHERE winning_driver = "Nathanaël Berthon" | What was the location when the winning driver was Nathanaël Berthon? | CREATE TABLE table_25572068_1 (location VARCHAR, winning_driver VARCHAR) |
SELECT MIN(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '011-53628')) AND lab.labname = 'alkaline phos.' AND DATETIME(lab.labresulttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') AND STRFTIME('%m', lab.labresulttime) = '03' | what's patient 011-53628's minimum value of alkaline phos. in 03/this year? | CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
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 allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime 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 treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
) |
SELECT model__list_ FROM table_24099916_1 WHERE socket = "BGA479" AND tdp = "5.5 W" | What's the model of the processor with BGA479 socket and a 5.5 w TDP? | CREATE TABLE table_24099916_1 (model__list_ VARCHAR, socket VARCHAR, tdp VARCHAR) |
SELECT winning_driver FROM table_25572068_1 WHERE series = "FR2.0 11" | Who was the winning driver in the FR2.0 11 series? | CREATE TABLE table_25572068_1 (winning_driver VARCHAR, series VARCHAR) |
SELECT "Total" FROM table_37959 WHERE "Score" = '1–3' AND "Set 1" = '29–31' | Which Total has a Score of 1 3, and a Set 1 of 29 31? | CREATE TABLE table_37959 (
"Date" text,
"Time" text,
"Score" text,
"Set 1" text,
"Set 2" text,
"Set 3" text,
"Total" text
) |
SELECT model__list_ FROM table_24099916_1 WHERE tdp = "5.5 W" | What's the model of the processor with a 5.5 w TDP? | CREATE TABLE table_24099916_1 (model__list_ VARCHAR, tdp VARCHAR) |
SELECT circuit FROM table_25572068_1 WHERE series = "FR3.5 11" | What circuit was the FR3.5 11 series on? | CREATE TABLE table_25572068_1 (circuit VARCHAR, series VARCHAR) |
SELECT demographic.language FROM demographic WHERE demographic.name = "Charles Deshay" | what is language of subject name charles deshay? | 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 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
)
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
) |
SELECT MIN(cores) FROM table_24099916_1 | What's the smallest number for cores of any of the processor models? | CREATE TABLE table_24099916_1 (cores INTEGER) |
SELECT date FROM table_25572068_1 WHERE series = "F4 7" | When was the F4 7 series? | CREATE TABLE table_25572068_1 (date VARCHAR, series VARCHAR) |
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'ac kidny fail, tubr necr')) AS t1 JOIN (SELECT admissions.subject_id, prescriptions.drug, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id) AS t2 ON t1.subject_id = t2.subject_id WHERE t1.charttime < t2.startdate AND DATETIME(t1.charttime, 'start of month') = DATETIME(t2.startdate, 'start of month') GROUP BY t2.drug) AS t3 WHERE t3.c1 <= 5 | what was the top five most frequent drugs prescribed to patients in the same month after the diagnosis of ac kidny fail, tubr necr? | CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
admission_location text,
discharge_location text,
insurance text,
language text,
marital_status text,
ethnicity text,
age number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE prescriptions (
row_id number,
subject_id number,
hadm_id number,
startdate time,
enddate time,
drug text,
dose_val_rx text,
dose_unit_rx text,
route 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 number,
intime time,
outtime time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
wardid number,
intime time,
outtime time
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
) |
SELECT model__list_ FROM table_24101118_1 WHERE processor = "Yorkfield" AND brand_name = "Xeon" | what is the model where the processor is yorkfield and the brand name is xeon? | CREATE TABLE table_24101118_1 (model__list_ VARCHAR, processor VARCHAR, brand_name VARCHAR) |
SELECT series FROM table_25572068_1 WHERE winning_team = "TDS Racing" AND date = "9 October" | In what series was TDS Racing the winning team on 9 October? | CREATE TABLE table_25572068_1 (series VARCHAR, winning_team VARCHAR, date VARCHAR) |
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name | For those records from the products and each product's manufacturer, find name and manufacturer , and group by attribute founder, and visualize them by a bar chart. | CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
) |
SELECT socket FROM table_24101118_1 WHERE brand_name = "Core 2 Extreme" | what is the socket that has a brand name of core 2 extreme? | CREATE TABLE table_24101118_1 (socket VARCHAR, brand_name VARCHAR) |
SELECT loa__metres_ FROM table_25594271_2 WHERE yacht = "Ichi Ban" | What were the LOA metres for the yacht ichi ban? | CREATE TABLE table_25594271_2 (loa__metres_ VARCHAR, yacht VARCHAR) |
SELECT "Moving from" FROM table_66764 WHERE "Rank" = '9' | The player with a rank of 9, made a move from what football club? | CREATE TABLE table_66764 (
"Rank" real,
"Year" real,
"Name" text,
"Moving from" text,
"Moving to" text
) |
SELECT processor FROM table_24101118_1 WHERE model__list_ = "X33x0" | what is the name of the processor for model x33x0? | CREATE TABLE table_24101118_1 (processor VARCHAR, model__list_ VARCHAR) |
SELECT loa__metres_ FROM table_25594271_2 WHERE skipper = "Lou Abrahams" | How many LOA metres were there when the skipper is lou abrahams? | CREATE TABLE table_25594271_2 (loa__metres_ VARCHAR, skipper VARCHAR) |
SELECT founded FROM table_261941_1 WHERE type = "Private/Baptist" | When was the private/baptist school founded? | CREATE TABLE table_261941_1 (
founded VARCHAR,
type VARCHAR
) |
SELECT MIN(before) FROM table_24108789_4 | What is the earliest number in before? | CREATE TABLE table_24108789_4 (before INTEGER) |
SELECT MIN(position) FROM table_25594271_2 WHERE sail_number = "AUS 03" | What is the position for sail number aus 03? | CREATE TABLE table_25594271_2 (position INTEGER, sail_number VARCHAR) |
SELECT location FROM table_name_1 WHERE opponent = "billy kidd" | Where was the location where justin robbins fought against billy kidd? | CREATE TABLE table_name_1 (
location VARCHAR,
opponent VARCHAR
) |
SELECT MAX(after) FROM table_24108789_4 WHERE player = "Steve Stricker" | What is the latest after when the player is Steve Stricker? | CREATE TABLE table_24108789_4 (after INTEGER, player VARCHAR) |
SELECT yacht FROM table_25594271_2 WHERE loa__metres_ = "13.34" | What yacht had LOA Metres of 13.34? | CREATE TABLE table_25594271_2 (yacht VARCHAR, loa__metres_ VARCHAR) |
SELECT capital FROM table_160510_1 WHERE hanja = "尙州" | The hanja is for what capital? | CREATE TABLE table_160510_1 (
capital VARCHAR,
hanja VARCHAR
) |
SELECT before FROM table_24108789_4 WHERE player = "Geoff Ogilvy" | List all before numbers when Geoff Ogilvy was playing. | CREATE TABLE table_24108789_4 (before VARCHAR, player VARCHAR) |
SELECT COUNT(no_in_season) FROM table_25604014_8 WHERE no_in_series = 142 | How many episodes in the season are episode 142 in the series? | CREATE TABLE table_25604014_8 (no_in_season VARCHAR, no_in_series VARCHAR) |
SELECT "Location" FROM table_76384 WHERE "Round" = '1' AND "Opponent" = 'luiz claudio das dores' | Where was the fight located that lasted 1 round against luiz claudio das dores? | CREATE TABLE table_76384 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text,
"Location" text
) |
SELECT MIN(events) FROM table_24108789_6 WHERE _number = 7 | Name the least events for number 7 | CREATE TABLE table_24108789_6 (events INTEGER, _number VARCHAR) |
SELECT title FROM table_25604014_8 WHERE written_by = "William M. Finkelstein" | What is the name of the episode that William M. Finkelstein wrote? | CREATE TABLE table_25604014_8 (title VARCHAR, written_by VARCHAR) |
SELECT "Nation" FROM table_62241 WHERE "Bronze" < '7' AND "Gold" > '0' AND "Total" > '7' AND "Silver" < '3' | What is the nation when bronze is less than 7, gold is larger than 0, total is larger than 7, and silver is smaller than 3? | CREATE TABLE table_62241 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT COUNT(events) FROM table_24108789_6 WHERE points = 3031 | Name the number of events for 3031 | CREATE TABLE table_24108789_6 (events VARCHAR, points VARCHAR) |
SELECT artist_s_ FROM table_2560677_1 WHERE start_date = "1966-10-23" | Who was the artist with a start date of 1966-10-23? | CREATE TABLE table_2560677_1 (artist_s_ VARCHAR, start_date VARCHAR) |
SELECT JOB_ID, AVG(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID | For all employees who have the letters D or S in their first name, give me the comparison about the average of manager_id over the job_id , and group by attribute job_id. | CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,0)
)
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 departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,0)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE employees (
EMPLOYEE_ID decimal(6,0),
FIRST_NAME varchar(20),
LAST_NAME varchar(25),
EMAIL varchar(25),
PHONE_NUMBER varchar(20),
HIRE_DATE date,
JOB_ID varchar(10),
SALARY decimal(8,2),
COMMISSION_PCT decimal(2,2),
MANAGER_ID decimal(6,0),
DEPARTMENT_ID decimal(4,0)
)
CREATE TABLE locations (
LOCATION_ID decimal(4,0),
STREET_ADDRESS varchar(40),
POSTAL_CODE varchar(12),
CITY varchar(30),
STATE_PROVINCE varchar(25),
COUNTRY_ID varchar(2)
) |
SELECT player FROM table_24108789_6 WHERE events = 22 | Name the player for 22 events | CREATE TABLE table_24108789_6 (player VARCHAR, events VARCHAR) |
SELECT end_date FROM table_2560677_1 WHERE artist_s_ = "S. Moldoff/J. Giella/C. Infantino" | What is the end date for the artist s. moldoff/j. giella/c. infantino? | CREATE TABLE table_2560677_1 (end_date VARCHAR, artist_s_ VARCHAR) |
SELECT event FROM table_name_24 WHERE res = "win" AND round = "n/a" AND opponent = "nicolas smith" | Which event is a win by an opponent of Nicolas Smith, with the round marked n/a? | CREATE TABLE table_name_24 (
event VARCHAR,
opponent VARCHAR,
res VARCHAR,
round VARCHAR
) |
SELECT MIN(points) FROM table_24108789_6 WHERE _number = 6 | Name the least points for number 6 | CREATE TABLE table_24108789_6 (points INTEGER, _number VARCHAR) |
SELECT COUNT(artist_s_) FROM table_2560677_1 WHERE start_date = "1966-12-12" | How many artist(s) have a start date is 1966-12-12? | CREATE TABLE table_2560677_1 (artist_s_ VARCHAR, start_date VARCHAR) |
SELECT MAX(byes) FROM table_name_64 WHERE wins < 16 AND benalla_dfl = "swanpool" AND against < 2177 | What is the highest value for Byes, when Wins is less than 16, when Benalla DFL is 'Swanpool', and when Against is less than 2177? | CREATE TABLE table_name_64 (
byes INTEGER,
against VARCHAR,
wins VARCHAR,
benalla_dfl VARCHAR
) |
SELECT MAX(_number) FROM table_24108789_6 WHERE player = "Steve Stricker" | Name the most number for steve stricker | CREATE TABLE table_24108789_6 (_number INTEGER, player VARCHAR) |
SELECT fan_title FROM table_2560677_1 WHERE end_date = "1967-11-12" | What is the fan title with an end date of 1967-11-12? | CREATE TABLE table_2560677_1 (fan_title VARCHAR, end_date VARCHAR) |
SELECT AVG("Against") FROM table_42628 WHERE "Lost" < '1' | Which average against has a lost less than 1? | CREATE TABLE table_42628 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
) |
SELECT COUNT(points) FROM table_24108789_6 WHERE reset_points = 800 | Name the total number of points for 800 reset | CREATE TABLE table_24108789_6 (points VARCHAR, reset_points VARCHAR) |
SELECT COUNT(writer) FROM table_2560677_1 WHERE episode__number = "06" | How many writers where there for episode # 06? | CREATE TABLE table_2560677_1 (writer VARCHAR, episode__number VARCHAR) |
SELECT game FROM table_27755603_11 WHERE team = "Chicago" | What numbered game did they play chicago? | CREATE TABLE table_27755603_11 (
game VARCHAR,
team VARCHAR
) |
SELECT kennedy__percentage FROM table_24115349_4 WHERE coakley__percentage = "37.9%" | What percentage did kennedy win while coakly won 37.9% | CREATE TABLE table_24115349_4 (kennedy__percentage VARCHAR, coakley__percentage VARCHAR) |
SELECT dominant_religion__2002_ FROM table_2562572_22 WHERE cyrillic_name_other_names = "Станишић" | Name the dominant religion for станишић | CREATE TABLE table_2562572_22 (dominant_religion__2002_ VARCHAR, cyrillic_name_other_names VARCHAR) |
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-62783')) AND lab.labname = 'magnesium' AND STRFTIME('%y', lab.labresulttime) <= '2103' | how many times do patient 002-62783 get a magnesium test until 2103? | 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 intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime 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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime 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 microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
) |
SELECT MIN(kennedy_votes) FROM table_24115349_4 WHERE coakley__percentage = "66.2%" | How many votes did kennedy win when coakley won 66.2% | CREATE TABLE table_24115349_4 (kennedy_votes INTEGER, coakley__percentage VARCHAR) |
SELECT COUNT(population__2011_) FROM table_2562572_22 WHERE settlement = "Kolut" | Name the population for kolut | CREATE TABLE table_2562572_22 (population__2011_ VARCHAR, settlement VARCHAR) |
SELECT "Catalog" FROM table_43268 WHERE "Format" = 'lp' AND "Country" = 'us' AND "Label" = 'sundazed' AND "Date" = '2006' | What is the Catalog with a Format of lp, a Country of us, a Label of sundazed, and a Date of 2006? | CREATE TABLE table_43268 (
"Date" text,
"Label" text,
"Format" text,
"Country" text,
"Catalog" text
) |
SELECT coakley__percentage FROM table_24115349_4 WHERE kennedy__percentage = "1.6%" | What was the percentage of votes for coakley when kennedy won 1.6% | CREATE TABLE table_24115349_4 (coakley__percentage VARCHAR, kennedy__percentage VARCHAR) |
SELECT COUNT(cyrillic_name_other_names) FROM table_2562572_22 WHERE settlement = "Stanišić" | Name the number of cyrillic name for stanišić | CREATE TABLE table_2562572_22 (cyrillic_name_other_names VARCHAR, settlement VARCHAR) |
SELECT "Eruptions" FROM table_34961 WHERE "Location" = 'pacific ring of fire' AND "Volcanic Explosivity Index" = '6' AND "Country" = 'peru' | Which Eruptions have a Location of pacific ring of fire, and a Volcanic Explosivity Index of 6, and a Country of peru? | CREATE TABLE table_34961 (
"Eruptions" text,
"Country" text,
"Location" text,
"Year" real,
"Volcanic Explosivity Index" text,
"Fatalities" text
) |
SELECT COUNT(kennedy_votes) FROM table_24115349_4 WHERE coakley_votes = 2139 | How many votes did kennedy win when coaklely won 2139 votes? | CREATE TABLE table_24115349_4 (kennedy_votes VARCHAR, coakley_votes VARCHAR) |
SELECT population__2011_ FROM table_2562572_22 WHERE cyrillic_name_other_names = "Бачки Моноштор (Croatian: Monoštor)" | Name the population for бачки моноштор (croatian: monoštor) | CREATE TABLE table_2562572_22 (population__2011_ VARCHAR, cyrillic_name_other_names VARCHAR) |
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'cardiac arrest' AND STRFTIME('%y', diagnosis.diagnosistime) >= '2101') AS t1 JOIN (SELECT patient.uniquepid, medication.drugname, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE patient.age BETWEEN 50 AND 59 AND STRFTIME('%y', medication.drugstarttime) >= '2101') AS t2 ON t1.uniquepid = t2.uniquepid WHERE t1.diagnosistime < t2.drugstarttime AND DATETIME(t2.drugstarttime) BETWEEN DATETIME(t1.diagnosistime) AND DATETIME(t1.diagnosistime, '+2 month') GROUP BY t2.drugname) AS t3 WHERE t3.c1 <= 3 | what are the three most frequent drugs that were prescribed within 2 months to the patients of age 50s after having been diagnosed with cardiac arrest since 2101? | 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 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 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 lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
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 diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
) |
SELECT COUNT(location) FROM table_24123547_2 WHERE week = 7 | How many locations did the team play at on week 7? | CREATE TABLE table_24123547_2 (location VARCHAR, week VARCHAR) |
SELECT COUNT(population__2011_) FROM table_2562572_20 WHERE cyrillic_name_other_names = "Врбас" | Name the number of population for врбас | CREATE TABLE table_2562572_20 (population__2011_ VARCHAR, cyrillic_name_other_names VARCHAR) |
SELECT variant FROM table_28035004_1 WHERE bodybuilder = "Alexander" | What is the variant when Alexander was the bodybuilder? | CREATE TABLE table_28035004_1 (
variant VARCHAR,
bodybuilder VARCHAR
) |
SELECT final_score FROM table_24123547_2 WHERE opponent = "Lions" | What was the result of the games VS the Lions? | CREATE TABLE table_24123547_2 (final_score VARCHAR, opponent VARCHAR) |
SELECT largest_ethnic_group__2002_ FROM table_2562572_20 WHERE population__2011_ = 24112 | Name the largest ethnic group for 24112 | CREATE TABLE table_2562572_20 (largest_ethnic_group__2002_ VARCHAR, population__2011_ VARCHAR) |
SELECT "Laps" FROM table_11391 WHERE "Time/Retired" = '+ 1:39.591' | How many laps are associated with a time of + 1:39.591? | CREATE TABLE table_11391 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) |
SELECT COUNT(date) FROM table_24126518_2 WHERE opponent = "Alouettes" | Name the number of dates for alouettes | CREATE TABLE table_24126518_2 (date VARCHAR, opponent VARCHAR) |
SELECT dominant_religion__2002_ FROM table_2562572_20 WHERE type = "village" AND cyrillic_name_other_names = "Бачко Добро Поље" | Name the dominant religion for village for бачко добро поље | CREATE TABLE table_2562572_20 (dominant_religion__2002_ VARCHAR, type VARCHAR, cyrillic_name_other_names VARCHAR) |
SELECT MAX(goal_difference) FROM table_name_77 WHERE points = 28 AND club = "cd cartagena" AND losses > 15 | Which Goal Difference has 28 Points, and a Club of cd cartagena, more than 15 losses? | CREATE TABLE table_name_77 (
goal_difference INTEGER,
losses VARCHAR,
points VARCHAR,
club VARCHAR
) |
SELECT MIN(attendance) FROM table_24126518_2 WHERE final_score = "L 36–1" | Name the least attendance for l 36–1 | CREATE TABLE table_24126518_2 (attendance INTEGER, final_score VARCHAR) |
SELECT cyrillic_name_other_names FROM table_2562572_20 WHERE dominant_religion__2002_ = "Orthodox Christianity" AND type = "village" AND settlement = "Bačko Dobro Polje" | Name the cyrillic name for orthodox christianity village and bačko dobro polje | CREATE TABLE table_2562572_20 (cyrillic_name_other_names VARCHAR, settlement VARCHAR, dominant_religion__2002_ VARCHAR, type VARCHAR) |
SELECT "Visitor" FROM table_38907 WHERE "Date" = 'march 16' | Who is the Visitor on march 16? | CREATE TABLE table_38907 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Record" text
) |
SELECT final_score FROM table_24126518_2 WHERE location = "Exhibition Stadium" AND date = "September 10" | Name the final score for exhibition stadium for september 10 | CREATE TABLE table_24126518_2 (final_score VARCHAR, location VARCHAR, date VARCHAR) |
SELECT largest_ethnic_group__2002_ FROM table_2562572_20 WHERE settlement = "Kosančić" | Name the largest ethnic group for kosančić | CREATE TABLE table_2562572_20 (largest_ethnic_group__2002_ VARCHAR, settlement VARCHAR) |
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.label = "Creatine Kinase, MB Isoenzyme" | Get the number of patients who have a jehovah's witness religious background and have a creatinine kinase mb isoenzyme lab test. | 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
)
CREATE TABLE procedures (
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
) |
SELECT COUNT(record) FROM table_24126518_2 WHERE week = 11 | Name the number of record for week 11 | CREATE TABLE table_24126518_2 (record VARCHAR, week VARCHAR) |
SELECT cyrillic_name_other_names FROM table_2562572_35 WHERE settlement = "Melenci" | Name the cyrillic name for melenci | CREATE TABLE table_2562572_35 (cyrillic_name_other_names VARCHAR, settlement VARCHAR) |
SELECT DISTINCT fare.fare_id, flight.airline_code, flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BALTIMORE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code | fares and flights from BALTIMORE to PHILADELPHIA | CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE month (
month_number int,
month_name text
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE fare (
fare_id int,
from_airport varchar,
to_airport varchar,
fare_basis_code text,
fare_airline text,
restriction_code text,
one_direction_cost int,
round_trip_cost int,
round_trip_required varchar
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
) |
SELECT opponent FROM table_24126606_2 WHERE week = 12 | Name the opponent for week 12 | CREATE TABLE table_24126606_2 (opponent VARCHAR, week VARCHAR) |
SELECT dominant_religion__2002_ FROM table_2562572_35 WHERE type = "village" AND settlement = "Banatski Despotovac" | Name the dominant religion 2002 for village banatski despotovac | CREATE TABLE table_2562572_35 (dominant_religion__2002_ VARCHAR, type VARCHAR, settlement VARCHAR) |
SELECT date FROM table_name_60 WHERE opponent = "juan mónaco" AND score = "6–2, 4–6, 7–6 (7–3)" | Which date has a Opponent of juan m naco, and a Score of 6 2, 4 6, 7 6 (7 3)? | CREATE TABLE table_name_60 (
date VARCHAR,
opponent VARCHAR,
score VARCHAR
) |
SELECT COUNT(opponent) FROM table_24126606_2 WHERE date = "October 3" | Name the total number of opponent for october 3 | CREATE TABLE table_24126606_2 (opponent VARCHAR, date VARCHAR) |
SELECT cyrillic_name_other_names FROM table_2562572_35 WHERE settlement = "Lazarevo" | Name the cyrillic name for lazarevo | CREATE TABLE table_2562572_35 (cyrillic_name_other_names VARCHAR, settlement VARCHAR) |
SELECT AVG("Gold") FROM table_79402 WHERE "Bronze" < '2' AND "Nation" = 'turkey' AND "Total" > '1' | What is Turkey's average Gold entry that also has a Bronze entry that is smaller than 2 and the Total is greater than 1? | CREATE TABLE table_79402 (
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
) |
SELECT final_score FROM table_24126606_2 WHERE week = 5 | Name the final score for week 5 | CREATE TABLE table_24126606_2 (final_score VARCHAR, week VARCHAR) |
SELECT COUNT(population__2011_) FROM table_2562572_35 WHERE settlement = "Mihajlovo" | Name the population 2011 for mihajlovo | CREATE TABLE table_2562572_35 (population__2011_ VARCHAR, settlement VARCHAR) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.