instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
... | SELECT lab.labresulttime FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-17096')) AND lab.labname = '-lymphs' AND DATETIME(lab.labresulttime, 'start of ... | eicu |
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 fare_basis (
fare_basis_code text,
booking_class text,
class_type text,... | SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code | atis |
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,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "REHAB/DISTINCT PART HOSP" AND demographic.days_stay > "1" | mimicsql_data |
CREATE TABLE table_204_672 (
id number,
"year" number,
"title" text,
"label" text,
"uk singles chart" number,
"u.s. billboard hot 100 chart" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many top 10 uk charting singles did blue mink relea... | SELECT COUNT(*) FROM table_204_672 WHERE "uk singles chart" <= 10 | squall |
CREATE TABLE table_45229 (
"Position" real,
"Team" text,
"Played" real,
"Drawn" real,
"Lost" real,
"Goals For" real,
"Goals Against" real,
"Goal Difference" text,
"Points 1" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the... | SELECT AVG("Goals For") FROM table_45229 WHERE "Drawn" > '7' AND "Goals Against" < '86' AND "Lost" > '11' AND "Played" > '42' | wikisql |
CREATE TABLE table_name_49 (
competition VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the competition with a score of 1-5?
| SELECT competition FROM table_name_49 WHERE score = "1-5" | sql_create_context |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX nu... | SELECT jybgb.SQKS, jybgb.SQKSMC FROM jybgb WHERE jybgb.BGDH = '66533580315' | css |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_CD = '965' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-12-24' AND '2011-06-04' AND t_kc21.IN_DIAG_DIS_CD = 'U57.745' AND t_kc21.CLINIC_TYPE = '住院' | css |
CREATE TABLE table_67003 (
"Season" text,
"Northumberland Senior Cup" text,
"Northumberland Senior Benevolent Bowl" text,
"Northumberland Minor Cup" text,
"Northumberland Women's Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won the Northu... | SELECT "Northumberland Senior Benevolent Bowl" FROM table_67003 WHERE "Northumberland Women's Cup" = 'blyth spartans ladies' | wikisql |
CREATE TABLE table_13605170_2 (
retired VARCHAR,
aircraft_type VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many Curtiss XBTC aircraft are retired?
| SELECT COUNT(retired) FROM table_13605170_2 WHERE aircraft_type = "Curtiss XBTC" | sql_create_context |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Self Pay" AND procedures.long_title = "Other closed [endoscopic] biopsy of biliary duct or sphincter of Oddi" | mimicsql_data |
CREATE TABLE table_name_91 (
lost INTEGER,
win__percentage VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest number Lost to david nalbandian with a Win Rate of 20%?
| SELECT MAX(lost) FROM table_name_91 WHERE win__percentage = "20%" AND opponent = "david nalbandian" | sql_create_context |
CREATE TABLE table_62379 (
"Pick #" real,
"Player" text,
"Nationality" text,
"Position" text,
"NHL team" text,
"Team from" text,
"League from" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which NHL team has a League from of western hockey ... | SELECT "NHL team" FROM table_62379 WHERE "League from" = 'western hockey league' AND "Pick #" < '23' AND "Team from" = 'prince george cougars' | wikisql |
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD tex... | SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '41538489' AND gwyjzb.MED_SER_ORG_NO = '7012713' AND gwyjzb.IN_DIAG_DIS_NM LIKE '%未%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '41538489' AND fgwyjzb.MED_SER_ORG_NO = '7012713' AND fgwyjzb.IN_DIAG_DIS_NM LIKE '%未%' | css |
CREATE TABLE table_name_56 (
silver INTEGER,
bronze VARCHAR,
gold VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Silver is the lowest one that has a Bronze smaller than 1, and a Gold larger than 0?
| SELECT MIN(silver) FROM table_name_56 WHERE bronze < 1 AND gold > 0 | sql_create_context |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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... | SELECT FIRST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT DESC | nvbench |
CREATE TABLE table_15450 (
"Goal" real,
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Venue has a Goal larger than 3, and a Competition of 2011 afc asian cup?
| SELECT "Venue" FROM table_15450 WHERE "Goal" > '3' AND "Competition" = '2011 afc asian cup' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | SELECT COUNT(*) FROM (SELECT t_kc24.t_kc21_MED_ORG_DEPT_CD FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '1011651' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2004-05-20' AND '2018-12-18' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) <= 1777.85) AS T | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_ID decimal(4,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),
... | SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' | nvbench |
CREATE TABLE table_name_4 (
outcome VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the outcome for the 1887?
| SELECT outcome FROM table_name_4 WHERE year = 1887 | sql_create_context |
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE days (
days_code varchar,
da... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((flight.departure_time <= 1230 AND flight.departure_time >= 1130) AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'WASHINGTON' AND fli... | atis |
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH text,
KH text,
KLX number,
MJZH text,
HZXM text,
NLS number,
NLY number,
ZSEBZ number,
JZZTDM number,
JZZTMC text,
JZJSSJ time,
TXBZ number,
ZZBZ number,
WDBZ number,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
... | SELECT MZZYZDZZBM, MZZYZDZZMC FROM mzjzjlb WHERE JZLSH = '13253905900' | css |
CREATE TABLE market (
market_id number,
country text,
number_cities number
)
CREATE TABLE film_market_estimation (
estimation_id number,
low_estimate number,
high_estimate number,
film_id number,
type text,
market_id number,
year number
)
CREATE TABLE film (
film_id number,... | SELECT studio FROM film GROUP BY studio HAVING AVG(gross_in_dollar) >= 4500000 | spider |
CREATE TABLE table_1342393_41 (
result VARCHAR,
incumbent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result of the election for incumbent Cordell Hull?
| SELECT result FROM table_1342393_41 WHERE incumbent = "Cordell Hull" | sql_create_context |
CREATE TABLE table_1973842_2 (
location VARCHAR,
nickname VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the school with nickname Tigers located?
| SELECT location FROM table_1973842_2 WHERE nickname = "Tigers" | sql_create_context |
CREATE TABLE table_name_52 (
pos VARCHAR,
date_of_birth VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the position played by the man born on 1976-09-20?
| SELECT pos FROM table_name_52 WHERE date_of_birth = "1976-09-20" | sql_create_context |
CREATE TABLE table_name_26 (
division VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Division has a Position of 6th?
| SELECT division FROM table_name_26 WHERE position = "6th" | sql_create_context |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId num... | WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", u.age, COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON... | sede |
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 te... | SELECT t3.culturesite FROM (SELECT t2.culturesite, 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 = 'intra-abdominal abscess - hepatic') AS t1 JO... | eicu |
CREATE TABLE station (
name VARCHAR,
lat VARCHAR,
city VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the name, latitude, and city of the station with the lowest latitude?
| SELECT name, lat, city FROM station ORDER BY lat LIMIT 1 | sql_create_context |
CREATE TABLE table_35192 (
"Year" text,
"Team" text,
"Apps" real,
"Tries" real,
"Goals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total number of goals from 24 tries and 96 or greater points?
| SELECT SUM("Goals") FROM table_35192 WHERE "Tries" = '24' AND "Points" > '96' | wikisql |
CREATE TABLE table_48146 (
"Game" real,
"Date" text,
"Opponent" text,
"Score" text,
"Location" text,
"Attendance" real,
"Record" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest attendance of February 7,... | SELECT MAX("Attendance") FROM table_48146 WHERE "Date" = 'february 7, 2009' AND "Points" > '49' | wikisql |
CREATE TABLE table_15463188_17 (
position VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many players with a position are listed for the 2009 season?
| SELECT COUNT(position) FROM table_15463188_17 WHERE season = "2009" | sql_create_context |
CREATE TABLE Minor_in (
StuID INTEGER,
DNO INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Faculty (
FacID INTEGER,
Lname VARCHAR(15),
... | SELECT Credits, DNO FROM Course ORDER BY Credits | nvbench |
CREATE TABLE table_35830 (
"RNA Segment (Gene)" real,
"Size ( s base pair )" real,
"Protein" text,
"Molecular weight kDa" text,
"Location" text,
"Copies per particle" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which location has a copies per... | SELECT "Location" FROM table_35830 WHERE "Copies per particle" = '0' AND "Protein" = 'nsp3' | wikisql |
CREATE TABLE t_kc21 (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '3667285' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.OUT_DIAG_DIS_NM | css |
CREATE TABLE table_23180638_1 (
oricon_albums_chart VARCHAR,
debut_sales__copies_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which charts had debut sales of 101976?
| SELECT oricon_albums_chart FROM table_23180638_1 WHERE debut_sales__copies_ = 101976 | sql_create_context |
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
... | SELECT u.Id AS "user_link", COUNT(p.Id) AS posts, Reputation FROM Posts AS p JOIN Users AS u ON u.Id = p.OwnerUserId WHERE Reputation < 500 AND u.CreationDate > '2018-01-01' AND NOT ProfileImageUrl LIKE '%d=identicon%' GROUP BY u.Id, Reputation HAVING COUNT(p.Id) >= 10 ORDER BY COUNT(p.Id) DESC | sede |
CREATE TABLE table_name_73 (
theme VARCHAR,
original_artist VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Theme when Fontella Bass was the original artist?
| SELECT theme FROM table_name_73 WHERE original_artist = "fontella bass" | sql_create_context |
CREATE TABLE table_38129 (
"Player" text,
"Touchdowns" real,
"Extra points" real,
"Field goals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest amount of touchdowns when there is a total player and a number of fiel... | SELECT MIN("Touchdowns") FROM table_38129 WHERE "Player" = 'total' AND "Field goals" > '0' | wikisql |
CREATE TABLE table_name_64 (
d_43_√ VARCHAR,
d_49_√ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the D 43 with a D 49 with d 49 ?
| SELECT d_43_√ FROM table_name_64 WHERE d_49_√ = "d 49 √" | sql_create_context |
CREATE TABLE table_name_72 (
points INTEGER,
races VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of points that driver fernando alonso has in the season he had 20 races?
| SELECT SUM(points) FROM table_name_72 WHERE races = 20 AND driver = "fernando alonso" | sql_create_context |
CREATE TABLE table_24977 (
"Pick #" real,
"Player" text,
"Position" text,
"Nationality" text,
"NHL team" text,
"College/junior/club team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many college/junior/clubteams have John garrett as the p... | SELECT COUNT("College/junior/club team") FROM table_24977 WHERE "Player" = 'John Garrett' | wikisql |
CREATE TABLE table_name_83 (
year_active VARCHAR,
role VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What year was the role of Rachel active in TV?
| SELECT year_active FROM table_name_83 WHERE role = "rachel" | sql_create_context |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
CREATE TABLE t_kc22 (
AMOUNT number,
CHA_ITEM_LEV number,
DATA_ID text,
DIRE_TYPE number,
DOSE_FORM text,
DOSE_UNIT text,
EACH_DOSAGE text,
EXP_OCC_DATE time,
FLX_MED_ORG_ID text,
FXBZ number,
H... | SELECT t_kc22.DIRE_TYPE FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '36621954421' AND t_kc22.SOC_SRT_DIRE_NM = '复方丙酸氯倍他索软膏' | css |
CREATE TABLE table_name_23 (
location VARCHAR,
current_conference VARCHAR,
institution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where is the Belhaven College SSAC conference location?
| SELECT location FROM table_name_23 WHERE current_conference = "ssac" AND institution = "belhaven college" | sql_create_context |
CREATE TABLE customers_policies (
customer_id number,
policy_id number,
date_opened time,
date_closed time
)
CREATE TABLE first_notification_of_loss (
fnol_id number,
customer_id number,
policy_id number,
service_id number
)
CREATE TABLE settlements (
settlement_id number,
clai... | SELECT COUNT(*) FROM customers AS t1 JOIN customers_policies AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Dayana Robel" | spider |
CREATE TABLE table_name_8 (
report VARCHAR,
circuit VARCHAR,
race_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the report for circuit of kyalami for south african republic trophy
| SELECT report FROM table_name_8 WHERE circuit = "kyalami" AND race_name = "south african republic trophy" | sql_create_context |
CREATE TABLE table_59390 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What player placed t6 for the United States with a score of 67-69=136?
| SELECT "Player" FROM table_59390 WHERE "Country" = 'united states' AND "Place" = 't6' AND "Score" = '67-69=136' | wikisql |
CREATE TABLE table_test_19 (
"id" int,
"gender" string,
"left_ventricular_ejection_fraction_lvef" int,
"systolic_blood_pressure_sbp" int,
"acute_infectious" bool,
"hypertensive_retinopathy" bool,
"leukocyte_count" int,
"severe_uncontrolled_hypertension" bool,
"chronic_infectious" boo... | SELECT * FROM table_test_19 WHERE (gender = 'male' OR gender = 'female') AND (age > 18 AND age < 70) | criteria2sql |
CREATE TABLE table_65645 (
"Date Released" text,
"Polling institute" text,
"Social Democratic" text,
"Socialist" text,
"Green-Communist" text,
"Democratic and Social Centre" text,
"Lead" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's ... | SELECT "Date Released" FROM table_65645 WHERE "Green-Communist" = '9.7%' | wikisql |
CREATE TABLE table_name_46 (
republican_ticket VARCHAR,
socialist_ticket VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who's the Republican ticket with a Socialist ticket of edna mitchell blue?
| SELECT republican_ticket FROM table_name_46 WHERE socialist_ticket = "edna mitchell blue" | sql_create_context |
CREATE TABLE table_24949975_1 (
stadium VARCHAR,
home_team VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the stadium for the home team of shamrock rovers and result of 3 0?
| SELECT stadium FROM table_24949975_1 WHERE home_team = "Shamrock Rovers" AND result = "3–0" | sql_create_context |
CREATE TABLE player_college (
player_id text,
college_id text,
year number
)
CREATE TABLE hall_of_fame (
player_id text,
yearid number,
votedby text,
ballots number,
needed number,
votes number,
inducted text,
category text,
needed_note text
)
CREATE TABLE college (
... | SELECT COUNT(*) FROM player WHERE birth_country = 'USA' AND bats = 'R' | spider |
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,
... | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'sputum, tracheal specimen' AND DATETIME(microlab.culturetakentime) <= DATETIME(CURRENT_TIME(), '-2 year')) | eicu |
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 locations (
LOCAT... | SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(SALARY) | nvbench |
CREATE TABLE table_54147 (
"Year" real,
"Artist" text,
"Composition" text,
"Mintage" real,
"Issue Price" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the mintage having an issue price of $1,099.99, artist being Pamela Stagg?
| SELECT AVG("Mintage") FROM table_54147 WHERE "Issue Price" = '$1,099.99' AND "Artist" = 'pamela stagg' | wikisql |
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,
... | SELECT demographic.marital_status, demographic.gender FROM demographic WHERE demographic.name = "Sheila Riley" | mimicsql_data |
CREATE TABLE person_info_hz_info (
RYBH text,
KH number,
KLX number,
YLJGDM number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC t... | SELECT mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers... | css |
CREATE TABLE table_name_32 (
visitor VARCHAR,
decision VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Visitor has a Decision of myre, and a Record of 44 7 15?
| SELECT visitor FROM table_name_32 WHERE decision = "myre" AND record = "44–7–15" | sql_create_context |
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilege... | WITH FirstQuestionTags AS (SELECT p.OwnerUserId, p.ClosedDate, pt.TagId, RANK() OVER (PARTITION BY p.OwnerUserId ORDER BY p.Id) AS "rank" FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id), FirstTagMatches AS (SELECT ft.OwnerUserId, ft.ClosedDate FROM FirstQuestionTags AS ft INNER JOIN Tags AS t ON t.Id = f... | sede |
CREATE TABLE exhibition_record (
exhibition_id number,
date text,
attendance number
)
CREATE TABLE exhibition (
exhibition_id number,
year number,
theme text,
artist_id number,
ticket_price number
)
CREATE TABLE artist (
artist_id number,
name text,
country text,
year_j... | SELECT T2.name, T2.country FROM exhibition AS T1 JOIN artist AS T2 ON T1.artist_id = T2.artist_id GROUP BY T1.artist_id ORDER BY COUNT(*) DESC LIMIT 1 | spider |
CREATE TABLE table_38363 (
"Season" text,
"Player" text,
"Position" text,
"Nationality" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What Position does the Team of KR and the Player of Marcus Walker have listed?
| SELECT "Position" FROM table_38363 WHERE "Team" = 'kr' AND "Player" = 'marcus walker' | wikisql |
CREATE TABLE diagnoses_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
)
CREATE TABLE procedures... | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 11362) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) | mimic_iii |
CREATE TABLE gwyjzb (
CLINIC_ID text,
CLINIC_TYPE text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
... | SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '云莹琇' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLIN... | css |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "51" AND demographic.days_stay > "20" | mimicsql_data |
CREATE TABLE table_name_61 (
week VARCHAR,
result VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the week when the result was l 38-17
| SELECT week FROM table_name_61 WHERE result = "l 38-17" | sql_create_context |
CREATE TABLE table_64231 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent on November 15, 1981?
| SELECT "Opponent" FROM table_64231 WHERE "Date" = 'november 15, 1981' | wikisql |
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREAT... | SELECT DISTINCT name FROM instructor WHERE NOT name IN (SELECT INSTRUCTORalias1.name FROM course AS COURSEalias0 INNER JOIN course_offering AS COURSE_OFFERINGalias0 ON COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id INNER JOIN offering_instructor AS OFFERING_INSTRUCTOR ON OFFERING_OFFERING_ID = COURSE_OFFERING... | advising |
CREATE TABLE problem_log (
problem_log_id number,
assigned_to_staff_id number,
problem_id number,
problem_category_code text,
problem_status_code text,
log_entry_date time,
log_entry_description text,
log_entry_fix text,
other_log_details text
)
CREATE TABLE staff (
staff_id num... | SELECT problem_log_id, problem_id FROM problem_log ORDER BY log_entry_date LIMIT 1 | spider |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
... | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26156) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents.itemid IN (SELE... | mimic_iii |
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
C... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.admission_type = "EMERGENCY" | mimicsql_data |
CREATE TABLE table_name_7 (
country VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the country when the player is bill nary?
| SELECT country FROM table_name_7 WHERE player = "bill nary" | sql_create_context |
CREATE TABLE table_16133 (
"No." real,
"#" real,
"Title" text,
"Director" text,
"Writer" text,
"US air date" text,
"Storyteller" text,
"Villains" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the largest # for an episode that wa... | SELECT MAX("#") FROM table_16133 WHERE "Writer" = 'Allison Lea Bingeman' | wikisql |
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number... | SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.... | css |
CREATE TABLE table_8403 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ($)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the player who earned $5,000?
| SELECT "Score" FROM table_8403 WHERE "Money ($)" = '5,000' | wikisql |
CREATE TABLE zyjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH text,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM... | SELECT zyjzjlb.CYBQDM, zyjzjlb.CYBQMC, zyjzjlb.CYCWH FROM zyjzjlb WHERE zyjzjlb.JZLSH = '84889733276' | css |
CREATE TABLE person (
name text,
age number,
city text,
gender text,
job text
)
CREATE TABLE personfriend (
name text,
friend text,
year number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- list the name, job title of all people ordered by ... | SELECT name, job FROM person ORDER BY name | spider |
CREATE TABLE table_33179 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the crowd total when the home score is 5... | SELECT "Crowd" FROM table_33179 WHERE "Home team score" = '5.9 (39)' | wikisql |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT jybgb.BBCJBW FROM jybgb WHERE jybgb.BGDH = '86227578636' | css |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABL... | SELECT COUNT(*) > 0 FROM semester WHERE NOT semester IN (SELECT DISTINCT SEMESTERalias1.semester FROM course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias1 WHERE COURSEalias0.course_id = COURSE_OFFERINGalias0.course_id AND COURSEalias0.department = 'DHYGRACK' AND COURSEalias0.numb... | advising |
CREATE TABLE table_9926 (
"Rank" real,
"Title" text,
"Studio" text,
"Director(s)" text,
"Worldwide Gross" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What studio has directors John Lasseter and Andrew Stanton?
| SELECT "Studio" FROM table_9926 WHERE "Director(s)" = 'john lasseter and andrew stanton' | wikisql |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '75571942' AND qtb.MED_SER_ORG_NO = '2706257' AND qtb.OUT_DIAG_DIS_NM LIKE '%病%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '75571942' AND gyb.MED_SER_ORG_NO = '2706257' AND gyb.OUT_DIAG_DIS_NM LIKE '%病%' UNION SELECT zyb.MED_CLINIC_ID FROM zyb ... | css |
CREATE TABLE table_34777 (
"County" text,
"Monument name" text,
"Year built" real,
"City or Town" text,
"Latitude" text,
"Longitude" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What County was built after 1920 with a Latitude of 37 40 30'n?
| SELECT "County" FROM table_34777 WHERE "Year built" > '1920' AND "Latitude" = '37°40′30"n' | wikisql |
CREATE TABLE table_70347 (
"Outcome" text,
"Date" text,
"Surface" text,
"Partner" text,
"Opponents in final" text,
"Score in final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the surface of the match that ended in a score of 5 7, 6 ... | SELECT "Surface" FROM table_70347 WHERE "Score in final" = '5–7, 6–4, [10–7]' | wikisql |
CREATE TABLE table_name_45 (
date VARCHAR,
attendance INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What game had more than 50,324 in attendance?
| SELECT date FROM table_name_45 WHERE attendance > 50 OFFSET 324 | sql_create_context |
CREATE TABLE table_20456 (
"S No" real,
"Team (A)" text,
"Team (B)" text,
"Winner" text,
"Margin" text,
"Match Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the team for oct 30, 1989
| SELECT "Team (B)" FROM table_20456 WHERE "Match Date" = 'Oct 30, 1989' | wikisql |
CREATE TABLE table_70088 (
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents in final" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On what surface was the 26 August 2001 tournament played?
| SELECT "Surface" FROM table_70088 WHERE "Date" = '26 august 2001' | wikisql |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT qtb.MED_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_CD, MIN(t_kc24.PER_EXP) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '1051519' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.OUT_DIAG_DIS_CD ORDER BY MIN(t_kc24.PER_EXP / t_kc24.MED_AMOUT) UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.OUT_DIAG_DIS_... | css |
CREATE TABLE table_16598 (
"No." real,
"Episode" text,
"Air Date" text,
"Timeslot" text,
"Rating" text,
"Share" text,
"18\u201349 (Rating/Share)" text,
"Viewers (m)" text,
"Rank (#)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wha... | SELECT "Timeslot" FROM table_16598 WHERE "Air Date" = 'May 12, 2009' | wikisql |
CREATE TABLE table_name_85 (
appearances INTEGER,
goals VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the least amount of appearances by new zealand when they scored 4 goals?
| SELECT MIN(appearances) FROM table_name_85 WHERE goals = 4 AND nationality = "new zealand" | sql_create_context |
CREATE TABLE table_name_65 (
second VARCHAR,
tenth VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHAT IS THE SECOND WITH A TENTH OF DAN BLACK?
| SELECT second FROM table_name_65 WHERE tenth = "dan black" | sql_create_context |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE area (
course_id int... | SELECT DISTINCT DERIVED_TABLEalias0.DERIVED_FIELDalias1 FROM (SELECT AREAalias0.area, COUNT(*) INNER JOIN student_record ON student_record.course_id = AREAalias0.course_id WHERE student_record.grade LIKE 'C+' AND student_record.student_id = 1 GROUP BY AREAalias0.area) AS DERIVED_TABLEalias0 WHERE DERIVED_TABLEalias0.DE... | advising |
CREATE TABLE table_27579 (
"Player" text,
"Games Played" real,
"Rebounds" real,
"Assists" real,
"Steals" real,
"Blocks" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest value for points?
| SELECT MAX("Points") FROM table_27579 | wikisql |
CREATE TABLE table_22480 (
"Township" text,
"County" text,
"Pop. (2010)" real,
"Land ( sqmi )" text,
"Water (sqmi)" text,
"Latitude" text,
"Longitude" text,
"GEO ID" real,
"ANSI code" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT MIN("ANSI code") FROM table_22480 WHERE "Land ( sqmi )" = '35.737' | wikisql |
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
... | SELECT Committee, COUNT(Committee) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T2.Party = "Democratic" GROUP BY Committee | nvbench |
CREATE TABLE table_64281 (
"Year" text,
"League" text,
"Position" text,
"Leading Scorer" text,
"FA Cup" text,
"FA Trophy" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the year when the position is 1/22 promoted and the leading scorer i... | SELECT "Year" FROM table_64281 WHERE "Position" = '1/22 promoted' AND "Leading Scorer" = 'james dean (27)' | wikisql |
CREATE TABLE table_name_90 (
team VARCHAR,
fin_pos VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had a finish position of 8?
| SELECT team FROM table_name_90 WHERE fin_pos = "8" | sql_create_context |
CREATE TABLE table_203_418 (
id number,
"#" number,
"player" text,
"position" text,
"height" number,
"current club" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the tallest player on the chart ?
| SELECT "player" FROM table_203_418 ORDER BY "height" DESC LIMIT 1 | squall |
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 procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "16" AND diagnoses.short_title = "Acute kidney failure NOS" | mimicsql_data |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.