instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_51421 (
"Player" text,
"Position" text,
"Tries" real,
"Goals" real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average number of points scored by Joe Vagana when making fewer than 2 tries?
| SELECT AVG("Points") FROM table_51421 WHERE "Player" = 'joe vagana' AND "Tries" < '2' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2073" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_name_21 (
score VARCHAR,
country VARCHAR,
money___$__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the United States, which has more than $24,542?
| SELECT score FROM table_name_21 WHERE country = "united states" AND money___$__ > 24 OFFSET 542 | sql_create_context |
CREATE TABLE table_name_35 (
owner VARCHAR,
winner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the winner of meridiana
| SELECT owner FROM table_name_35 WHERE winner = "meridiana" | sql_create_context |
CREATE TABLE company (
Company_ID real,
Name text,
Headquarters text,
Industry text,
Sales_in_Billion real,
Profits_in_Billion real,
Assets_in_Billion real,
Market_Value_in_Billion real
)
CREATE TABLE people (
People_ID int,
Age int,
Name text,
Nationality text,
Grad... | SELECT Headquarters, COUNT(*) FROM company GROUP BY Headquarters | nvbench |
CREATE TABLE table_204_143 (
id number,
"national park" text,
"region" text,
"land area (km2)" number,
"established" number,
"visitation (2009)" number,
"coordinates" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many parks were establi... | SELECT COUNT("national park") FROM table_204_143 WHERE "established" > 2000 | squall |
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_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '1692026' GROUP BY gwyjzb.MED_ORG_DEPT_CD, gwyjzb.OUT_DIAG_DIS_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_CD, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '16... | css |
CREATE TABLE table_77155 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the record for December 5, 1948?
| SELECT "Record" FROM table_77155 WHERE "Date" = 'december 5, 1948' | wikisql |
CREATE TABLE table_name_69 (
result VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What outcome has a score of 12-22?
| SELECT result FROM table_name_69 WHERE score = "12-22" | sql_create_context |
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 flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 7 AND date_day.month_number = 11 AND ... | atis |
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 * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '王睿范' AND hz_info.YLJGDM = '2347656' AND zyjzjlb.JZKSMC LIKE '%拔牙%' | css |
CREATE TABLE table_name_1 (
laps INTEGER,
rider VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest laps that Vittorio Iannuzzo completed?
| SELECT MIN(laps) FROM table_name_1 WHERE rider = "vittorio iannuzzo" | sql_create_context |
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
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 prescriptions (
row_id numbe... | SELECT COUNT(*) > 0 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 = 24268)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'sc 26 pg... | mimic_iii |
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 txmzjzjlb.JZLSH FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '50636004' AND hz_info.YLJGDM = '9316112' AND NOT txmzjzjlb.JZKSMC LIKE '%老年病%' UNION SELECT ftxmzjzjlb.JZLSH FROM hz_info JOIN ftxmzjzjlb ON hz_info... | css |
CREATE TABLE table_36516 (
"Result" text,
"Opponent" text,
"Method" text,
"Event" text,
"Date" text,
"Round" text,
"Time" text,
"Location" text,
"Rules" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Opponent has a Round of 4, ... | SELECT "Opponent" FROM table_36516 WHERE "Round" = '4' AND "Rules" = 'thai boxing' | wikisql |
CREATE TABLE table_203_638 (
id number,
"score" number,
"2007" text,
"2008" text,
"2009" text,
"2010" text,
"2011" text,
"2012" text,
"2013" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which score consecutively had the highest per... | SELECT "score" FROM table_203_638 ORDER BY "2007" DESC LIMIT 1 | squall |
CREATE TABLE table_11677100_12 (
hometown VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the hometown of player Jason Place?
| SELECT hometown FROM table_11677100_12 WHERE player = "Jason Place" | sql_create_context |
CREATE TABLE Characteristics (
characteristic_id INTEGER,
characteristic_type_code VARCHAR(15),
characteristic_data_type VARCHAR(10),
characteristic_name VARCHAR(80),
other_characteristic_details VARCHAR(255)
)
CREATE TABLE Ref_Characteristic_Types (
characteristic_type_code VARCHAR(15),
ch... | SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description ORDER BY product_category_description DESC | nvbench |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC ... | SELECT jyjgzbb.BGDH FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '07906762221' | css |
CREATE TABLE table_1818254_1 (
burglary VARCHAR,
violent_crime VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many burglaries occurred in the city where the violent crime rate was 974.7?
| SELECT burglary FROM table_1818254_1 WHERE violent_crime = "974.7" | sql_create_context |
CREATE TABLE table_173103_1 (
max_pressure VARCHAR,
cartridge VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the max pressure of the .38 long colt cartridge?
| SELECT max_pressure FROM table_173103_1 WHERE cartridge = ".38 Long Colt" | sql_create_context |
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE mzjzjlb (
YLJGDM text,
JZLSH ... | SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '混合性焦虑和抑郁障碍' AND jyjgzbb.JCZBMC = '促肾上腺皮质激素' | css |
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Percent text,
ACC_Home text,
ACC_Road text,
All_Games text,
All_Games_Percent int,
All_Home text,
All_Road text,
All_Neutral text
)
CREATE TABLE university (
Scho... | SELECT All_Road, All_Games_Percent FROM basketball_match | nvbench |
CREATE TABLE aircraft (
aid number(9,0),
name varchar2(30),
distance number(6,0)
)
CREATE TABLE employee (
eid number(9,0),
name varchar2(30),
salary number(10,2)
)
CREATE TABLE flight (
flno number(4,0),
origin varchar2(20),
destination varchar2(20),
distance number(6,0),
... | SELECT name, distance FROM aircraft ORDER BY name | nvbench |
CREATE TABLE qtb (
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '76284316' AND t_kc22.STA_DATE BETWEEN '2010-12-15' AND '2018-05-30' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_ID = '7... | css |
CREATE TABLE table_68163 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest number of points with an Engine of climax v8, and a Year of 1966?
| SELECT MIN("Points") FROM table_68163 WHERE "Engine" = 'climax v8' AND "Year" = '1966' | wikisql |
CREATE TABLE table_name_76 (
score VARCHAR,
tie_no VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score for the match with tie number 23?
| SELECT score FROM table_name_76 WHERE tie_no = "23" | sql_create_context |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE area (
course_id int,
area varchar
)
... | SELECT AVG(workload) FROM program_course WHERE category LIKE '%PreMajor%' | advising |
CREATE TABLE table_name_44 (
population INTEGER,
area VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population with an area of 1,126.84?
| SELECT MIN(population) FROM table_name_44 WHERE area = 1 OFFSET 126.84 | sql_create_context |
CREATE TABLE table_203_788 (
id number,
"year" number,
"author" text,
"illustrator" text,
"title" text,
"publisher" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what 's the difference in years between angela carter 's title and anthony browne ... | SELECT ABS((SELECT "year" FROM table_203_788 WHERE "author" = 'angela carter') - (SELECT "year" FROM table_203_788 WHERE "author" = 'anthony browne')) | squall |
CREATE TABLE table_204_96 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- was attendance higher during week 5 or week 9 ?
| SELECT "week" FROM table_204_96 WHERE "week" IN (5, 9) ORDER BY "attendance" DESC LIMIT 1 | squall |
CREATE TABLE table_name_91 (
grid INTEGER,
driver VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the highest grid of Ronnie Bremer, who had more than 18 points?
| SELECT MAX(grid) FROM table_name_91 WHERE driver = "ronnie bremer" AND points > 18 | sql_create_context |
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 chartevents (
row_id number,
subject_id number,
... | SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age >= 60) ... | mimic_iii |
CREATE TABLE table_16154 (
"Country" text,
"Membership (from 2010)" real,
"Name of member organization" text,
"Year current Scouting organization joined WOSM" text,
"Year member organization was founded" text,
"Admits boys/girls" text
)
-- Using valid SQLite, answer the following questions for... | SELECT "Admits boys/girls" FROM table_16154 WHERE "Year member organization was founded" = '1912' AND "Name of member organization" = 'The Ghana Scout Association' | wikisql |
CREATE TABLE table_64100 (
"Rank" real,
"Team" text,
"Apps" real,
"Record" text,
"Win %" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest win % with a 0-2 record and more than 2 apps?
| SELECT MIN("Win %") FROM table_64100 WHERE "Record" = '0-2' AND "Apps" > '2' | wikisql |
CREATE TABLE table_11177 (
"Date" text,
"Venue" text,
"Score" text,
"Result" text,
"Competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Competition with a Date with 6 december 2011?
| SELECT "Competition" FROM table_11177 WHERE "Date" = '6 december 2011' | wikisql |
CREATE TABLE table_204_893 (
id number,
"rank" number,
"name" text,
"nationality" text,
"time" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many spanish runners total placed in the top 10 in the men 's 3000 metres event at th... | SELECT COUNT(*) FROM table_204_893 WHERE "nationality" = 'spain' AND id <= 10 | squall |
CREATE TABLE table_name_16 (
ngc_number INTEGER,
constellation VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of NGC numbers for Constellation vela?
| SELECT SUM(ngc_number) FROM table_name_16 WHERE constellation = "vela" | sql_create_context |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,... | SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '04441779' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2001-06-18' AND '2013-03-01' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE table_47696 (
"Rank" text,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Bronze has a Silver larger than 1, a Total larger than 3, a Nation of turkey, and a Go... | SELECT SUM("Bronze") FROM table_47696 WHERE "Silver" > '1' AND "Total" > '3' AND "Nation" = 'turkey' AND "Gold" < '2' | wikisql |
CREATE TABLE table_20354_7 (
zodiac_sign VARCHAR,
malayalam_name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the zodiac for
| SELECT zodiac_sign FROM table_20354_7 WHERE malayalam_name = "കന്നി" | sql_create_context |
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversa... | SELECT u.Id AS "user_link", a.Id AS "post_link", a.CreationDate, a.Score, q.MaxAns, q.AvgAns, q.Tags FROM Posts AS a JOIN Users AS u ON a.OwnerUserId = u.Id JOIN (SELECT q.Id, q.Tags, AVG(a.Score) AS AvgAns, MAX(a.Score) AS MaxAns FROM Posts AS q JOIN Posts AS a ON a.ParentId = q.Id WHERE q.AcceptedAnswerId IS NULL GRO... | sede |
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
)
CRE... | SELECT UserId AS "user_link", COUNT(*) AS "gold_badges", (SELECT usr.Reputation FROM Users AS usr WHERE usr.Id = UserId) AS Reputation, (COUNT(*) / (SELECT usr.Reputation FROM Users AS usr WHERE usr.Id = UserId AND usr.Reputation > 1)) AS "gold_badge_efficiency" FROM Badges WHERE Name IN ('Copy Editor', 'Electorate', '... | sede |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime ... | SELECT t3.spec_type_desc FROM (SELECT t2.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnos... | mimic_iii |
CREATE TABLE table_33445 (
"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.
-- Who is the away side at junction oval?
| SELECT "Away team" FROM table_33445 WHERE "Venue" = 'junction oval' | wikisql |
CREATE TABLE table_name_60 (
date VARCHAR,
opponent VARCHAR,
competition VARCHAR,
location VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When was the 2014 World Cup Qualification in Kampala that had Angola as an opponent
| SELECT date FROM table_name_60 WHERE competition = "2014 world cup qualification" AND location = "kampala" AND opponent = "angola" | sql_create_context |
CREATE TABLE table_train_115 (
"id" int,
"systolic_blood_pressure_sbp" int,
"hepatic_disease" bool,
"creatinine_clearance_cl" float,
"diastolic_blood_pressure_dbp" int,
"glucose_6_phosphate_dehydrogenase_deficiency_g6pd" int,
"uncontrolled_blood_pressure" bool,
"NOUSE" float
)
-- Using... | SELECT * FROM table_train_115 WHERE creatinine_clearance_cl < 45 | criteria2sql |
CREATE TABLE table_name_53 (
nationality VARCHAR,
athlete VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the nationality of Livio Berruti?
| SELECT nationality FROM table_name_53 WHERE athlete = "livio berruti" | sql_create_context |
CREATE TABLE table_name_15 (
name VARCHAR,
province VARCHAR,
rank VARCHAR,
type VARCHAR,
capacity___mw__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name when the type is hydro, the capacity (mw) is less than 478, the rank is more ... | SELECT name FROM table_name_15 WHERE type = "hydro" AND capacity___mw__ < 478 AND rank > 85 AND province = "quebec" | sql_create_context |
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title 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
)... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'adv eff coronary vasodil')) GROUP BY cost.hadm_id) AS t1 | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.label = "Alanine Aminotransferase (ALT)" | mimicsql_data |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE SuggestedEdits (
Id number,
PostId number,
CreationDate time,
ApprovalDate time,
RejectionDate time,
O... | SELECT RIGHT(LEFT(CreationDate, 11), 4) AS Year, COUNT(Id) AS PostCount, COUNT(Id) / 365 AS AveragePostsPerDay, SUM(ViewCount) AS Views, SUM(ViewCount) / 365 AS ViewsPerDay FROM Posts WHERE Tags LIKE '%JavaScript%' GROUP BY RIGHT(LEFT(CreationDate, 11), 4) ORDER BY RIGHT(LEFT(CreationDate, 11), 4) DESC | sede |
CREATE TABLE table_name_56 (
bronze INTEGER,
gold VARCHAR,
total VARCHAR,
silver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest value for bronze with a total of 3 and a value for silver greater than 1 while the value of gold is sma... | SELECT MIN(bronze) FROM table_name_56 WHERE total = 3 AND silver > 1 AND gold < 1 | sql_create_context |
CREATE TABLE table_49420 (
"Club" text,
"City" text,
"Stadium" text,
"Capacity" real,
"2007\u201308 season" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which stadium does Club Pro Patria play?
| SELECT "Stadium" FROM table_49420 WHERE "Club" = 'pro patria' | wikisql |
CREATE TABLE table_26054 (
"Episode #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Production code #" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List all directors when Brad Radni... | SELECT "Directed by" FROM table_26054 WHERE "Written by" = 'Brad Radnitz' | wikisql |
CREATE TABLE student_course_registrations (
student_id VARCHAR
)
CREATE TABLE student_course_attendance (
student_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are all info of students who registered courses but not attended courses?
| SELECT * FROM student_course_registrations WHERE NOT student_id IN (SELECT student_id FROM student_course_attendance) | sql_create_context |
CREATE TABLE table_208 (
"Rnd" real,
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pol... | SELECT "Pole Position" FROM table_208 WHERE "Location" = 'Paul Ricard' | 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 jyjgzbb (
BGDH text,
BGRQ tim... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jyb... | css |
CREATE TABLE qtb (
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 = '85713593' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 9743.77) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '85713593' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_k... | css |
CREATE TABLE book_club (
category VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show all book categories and the number of books in each category.
| SELECT category, COUNT(*) FROM book_club GROUP BY category | sql_create_context |
CREATE TABLE table_name_98 (
roll INTEGER,
name VARCHAR,
decile VARCHAR,
authority VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest Roll of Orere School with a Decile less than 8 with a State Authority?
| SELECT MAX(roll) FROM table_name_98 WHERE decile < 8 AND authority = "state" AND name = "orere school" | sql_create_context |
CREATE TABLE table_11820086_1 (
directed_by VARCHAR,
us_viewers__millions_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who directed the episode that was viewed by 2.50 million people in the U.S.?
| SELECT directed_by FROM table_11820086_1 WHERE us_viewers__millions_ = "2.50" | sql_create_context |
CREATE TABLE table_37611 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the attendance of the game with a score of 5-4?
| SELECT "Attendance" FROM table_37611 WHERE "Score" = '5-4' | wikisql |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE... | SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'insert endotracheal tube') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31260) AND DATETIME(proced... | mimic_iii |
CREATE TABLE table_14181578_1 (
club__city_town_ VARCHAR,
goals_for_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who is the the club (city/town) with goals for/against being 14-2
| SELECT club__city_town_ FROM table_14181578_1 WHERE goals_for_against = "14-2" | sql_create_context |
CREATE TABLE table_10677 (
"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 was the away score at the Princes Park game... | SELECT "Away team score" FROM table_10677 WHERE "Venue" = 'princes park' | wikisql |
CREATE TABLE table_32467 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was week 3 score?
| SELECT "Result" FROM table_32467 WHERE "Week" = '3' | wikisql |
CREATE TABLE table_79963 (
"Date" text,
"Opponent" text,
"Score" text,
"Loss" text,
"Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the score of the game attended by 25,034?
| SELECT "Score" FROM table_79963 WHERE "Attendance" = '25,034' | wikisql |
CREATE TABLE table_75735 (
"Name" text,
"Year" real,
"Landfall" text,
"NHC Advisory Number" text,
"V(mph)" real,
"R(miles)" real,
"Saffir-Simpson Category" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest SaffirSimpson wit... | SELECT MAX("Saffir-Simpson Category") FROM table_75735 WHERE "NHC Advisory Number" = '18' | wikisql |
CREATE TABLE table_46796 (
"Reserve" text,
"District" text,
"IUCN" text,
"Co-management" text,
"Est." real,
"Description" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the description when the reserve is Half Moon Caye?
| SELECT "Description" FROM table_46796 WHERE "Reserve" = 'half moon caye' | wikisql |
CREATE TABLE table_33105 (
"Position" real,
"Club" text,
"Played" real,
"Wins" real,
"Draws" real,
"Losses" real,
"Goals for" real,
"Goals against" real,
"Points" real,
"Goal Difference" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.... | SELECT AVG("Goal Difference") FROM table_33105 WHERE "Club" = 'slavia sofia' | wikisql |
CREATE TABLE table_66388 (
"Title" text,
"Series" text,
"Director" text,
"Production Num." text,
"Release date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What series has 1935-07-13 as the release date?
| SELECT "Series" FROM table_66388 WHERE "Release date" = '1935-07-13' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "NEWBORN" AND demographic.dod_year <= "2112.0" | mimicsql_data |
CREATE TABLE table_204_148 (
id number,
"name" text,
"elected" text,
"term began" text,
"term ended" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- did charles royer hold office longer than paul schell ?
| SELECT (SELECT "term ended" - "term began" FROM table_204_148 WHERE "name" = 'charles royer') > (SELECT "term ended" - "term began" FROM table_204_148 WHERE "name" = 'paul schell') | squall |
CREATE TABLE table_204_979 (
id number,
"place" number,
"nation" text,
"5 hoops" text,
"3 balls,\n2 ribbons" text,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- other than spain , name a country that beat russia overall .
| SELECT "nation" FROM table_204_979 WHERE "nation" <> 'spain' AND "total" > (SELECT "total" FROM table_204_979 WHERE "nation" = 'russia') | squall |
CREATE TABLE table_43044 (
"Date" text,
"Time" text,
"Home" text,
"Away" text,
"Score" text,
"Ground" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Time, when Away is Central Blues?
| SELECT "Time" FROM table_43044 WHERE "Away" = 'central blues' | wikisql |
CREATE TABLE Ref_Detention_Type (
detention_type_code VARCHAR(10),
detention_type_description VARCHAR(80)
)
CREATE TABLE Teachers (
teacher_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(80),
last_name VARCHAR(80),
gender VARCHAR(1),
cell_mobile_number V... | SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
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 d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABL... | SELECT chartevents.valuenum 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 = 11688)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ... | mimic_iii |
CREATE TABLE table_14855908_3 (
episodes INTEGER,
region_4 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many episodes were put out in Region 4 on March 4, 2010?
| SELECT MAX(episodes) FROM table_14855908_3 WHERE region_4 = "March 4, 2010" | sql_create_context |
CREATE TABLE table_71472 (
"Region" text,
"Date" text,
"Label" text,
"Format" text,
"Catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What label released a record on March 25, 1984?
| SELECT "Label" FROM table_71472 WHERE "Date" = 'march 25, 1984' | wikisql |
CREATE TABLE table_16041 (
"Character" text,
"1954 Broadway" text,
"1955 broadcast" text,
"1960 broadcast" text,
"1979 Broadway" text,
"1990 Broadway" text,
"1991 Broadway" text,
"1998 Broadway" text,
"1999 Broadway" text
)
-- Using valid SQLite, answer the following questions for ... | SELECT "Character" FROM table_16041 WHERE "1998 Broadway" = 'Drake English' | wikisql |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE patients (
row_id number,
subj... | SELECT (SELECT chartevents.valuenum 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 = 11914) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) AND chartevents.item... | mimic_iii |
CREATE TABLE table_name_37 (
roll INTEGER,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest roll number of Katikati college?
| SELECT MIN(roll) FROM table_name_37 WHERE name = "katikati college" | sql_create_context |
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6281887' AND gwyjzb.IN_DIAG_DIS_CD = 'J30.696' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6281887' AND fgwyjzb.IN_DIA... | css |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT r.UserId, r.UserName, r.Reputation, p.CreationDate, r.CreationRank, p.Title FROM Posts AS p INNER JOIN (SELECT u.Id AS UserId, u.DisplayName AS UserName, u.Reputation AS Reputation, p.Id AS PostId, RANK() OVER (PARTITION BY u.Id ORDER BY p.CreationDate) AS CreationRank FROM Users AS u INNER JOIN Posts AS p ON (u... | sede |
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 qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5728238' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_CD UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.IN_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5728238' GROUP BY gyb.MED_ORG_DEPT_NM, gyb.IN_... | css |
CREATE TABLE pilot_record (
Pilot_name VARCHAR,
Pilot_ID VARCHAR
)
CREATE TABLE pilot (
Pilot_name VARCHAR,
Pilot_ID VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the names of pilots that do not have any record.
| SELECT Pilot_name FROM pilot WHERE NOT Pilot_ID IN (SELECT Pilot_ID FROM pilot_record) | sql_create_context |
CREATE TABLE party (
Party_ID int,
Year real,
Party text,
Governor text,
Lieutenant_Governor text,
Comptroller text,
Attorney_General text,
US_Senate text
)
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
... | SELECT T2.Party, SUM(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY SUM(COUNT(*)) | nvbench |
CREATE TABLE table_36440 (
"Date" text,
"City" text,
"Opponent" text,
"Results\u00b9" text,
"Type of game" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What City had Results of 1:2?
| SELECT "City" FROM table_36440 WHERE "Results\u00b9" = '1:2' | wikisql |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC | nvbench |
CREATE TABLE table_name_47 (
manner_of_departure VARCHAR,
replaced_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What manner of departure was Dick Advocaat replaced by?
| SELECT manner_of_departure FROM table_name_47 WHERE replaced_by = "dick advocaat" | sql_create_context |
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 vitalperiodi... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', treatment.treatmenttime)) FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-13648... | eicu |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate... | SELECT p.Id AS "post_link" FROM Posts AS p WHERE (p.PostTypeId = 1 AND p.AnswerCount > 0 AND p.Score <= '##MaxScore##' AND '##MaxScore##' >= ALL (SELECT a.Score FROM Posts AS a WHERE (a.ParentId = p.Id))) | sede |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number... | SELECT STRFTIME('%j', icustays.outtime) - STRFTIME('%j', icustays.intime) FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 86556) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1 | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" | mimicsql_data |
CREATE TABLE table_41967 (
"Week #" text,
"Theme" text,
"Song choice" text,
"Original artist" text,
"Order #" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Result when the Theme was by Dolly Parton?
| SELECT "Result" FROM table_41967 WHERE "Theme" = 'dolly parton' | 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_DIRE_CD text,
MED_DIRE_NM text,... | SELECT t_kc21.MED_SER_ORG_NO FROM t_kc21 WHERE t_kc21.PERSON_ID = '26493101' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-01-22' AND '2013-02-04' GROUP BY t_kc21.MED_SER_ORG_NO ORDER BY COUNT(*) DESC LIMIT 1 | css |
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.admittime, prescriptions.icustay_id FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Marilyn Norvell" | mimicsql_data |
CREATE TABLE table_name_41 (
released VARCHAR,
english_title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- English title of oxygenie of happiness has what release date?
| SELECT released FROM table_name_41 WHERE english_title = "oxygenie of happiness" | sql_create_context |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW tex... | SELECT jybgb.BGDH FROM jybgb WHERE jybgb.JZLSH = '78415919799' AND jybgb.KSMC LIKE '%老年医学%' | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.