instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_53126 (
"Year" real,
"Award Ceremony" text,
"Category" text,
"Nominee" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Result has a Category of best book of a musical?
| SELECT "Result" FROM table_53126 WHERE "Category" = 'best book of a musical' | wikisql |
CREATE TABLE table_79093 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( \u00a3 )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To par, when Player is 'Greg Turner'?
| SELECT "To par" FROM table_79093 WHERE "Player" = 'greg turner' | wikisql |
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text... | SELECT Body, ViewCount, Tags FROM Posts ORDER BY ViewCount DESC LIMIT 200 | sede |
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 COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND 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_in... | css |
CREATE TABLE table_name_88 (
country VARCHAR,
place VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What country has t6 as the place, with sean o'hair as the player?
| SELECT country FROM table_name_88 WHERE place = "t6" AND player = "sean o'hair" | 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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT demographic.language, demographic.admittime FROM demographic WHERE demographic.subject_id = "42067" | mimicsql_data |
CREATE TABLE table_17373 (
"Year" real,
"Division" text,
"League" text,
"Reg. Season" text,
"Playoffs" text,
"Open Cup" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the playoff result for theteam in the apsl in 1992?
| SELECT "Playoffs" FROM table_17373 WHERE "League" = 'APSL' AND "Year" = '1992' | wikisql |
CREATE TABLE club (
club_id number,
name text,
region text,
start_year text
)
CREATE TABLE competition (
competition_id number,
year number,
competition_type text,
country text
)
CREATE TABLE player (
player_id number,
name text,
position text,
club_id number,
apps ... | SELECT AVG(T2.points) FROM club AS T1 JOIN player AS T2 ON T1.club_id = T2.club_id WHERE T1.name = "AIB" | spider |
CREATE TABLE table_204_609 (
id number,
"year" number,
"car" number,
"start" number,
"qual" number,
"rank" number,
"finish" number,
"laps" number,
"led" number,
"retired" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how long di... | SELECT COUNT("year") FROM table_204_609 WHERE "car" = 54 | squall |
CREATE TABLE table_40996 (
"Date" text,
"Opponent" text,
"Location" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance for the game at groves stadium winston-salem, nc with a result of L 0-14?
| SELECT COUNT("Attendance") FROM table_40996 WHERE "Location" = 'groves stadium • winston-salem, nc' AND "Result" = 'l 0-14' | 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 SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '8958826' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2000-02-01' AND '2003-04-23' | css |
CREATE TABLE table_204_652 (
id number,
"title" text,
"year" number,
"director" text,
"country" text,
"genre" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many films were from argentina ?
| SELECT COUNT("title") FROM table_204_652 WHERE "country" = 'argentina' | squall |
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 ... | SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 808) AND STRFTIME('%y-%m', microbiologyevents.charttime) = '2105-12' | mimic_iii |
CREATE TABLE table_name_5 (
visitor VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- On the date of April 22, which city was a visitor?
| SELECT visitor FROM table_name_5 WHERE date = "april 22" | sql_create_context |
CREATE TABLE t_kc21_t_kc24 (
MED_CLINIC_ID text,
MED_SAFE_PAY_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,
... | SELECT (SELECT t_kc24.OVE_PAY FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '00023755669') / (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID = '00023755669') | css |
CREATE TABLE Products (
Product_ID VARCHAR(100),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Product_Description VARCHAR(255),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
Order_ID INTEGER,
Customer_ID INTEGER,
Store_ID INTEGER,
Order_Date ... | SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code | nvbench |
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 AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_CD = '0798' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-11-08' AND '2021-11-28' AND t_kc21.IN_DIAG_DIS_NM = '牙齿楔状缺损' AND t_kc21.CLINIC_TYPE = '住院' | css |
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 ... | 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 = 'head & neck endarter nec') AND STRFTIME('%y', procedures_icd.charttime) <= '2103' | mimic_iii |
CREATE TABLE classroom (
building text,
room_number text,
capacity number
)
CREATE TABLE prereq (
course_id text,
prereq_id text
)
CREATE TABLE instructor (
id text,
name text,
dept_name text,
salary number
)
CREATE TABLE takes (
id text,
course_id text,
sec_id text,
... | SELECT T1.name FROM instructor AS T1 JOIN advisor AS T2 ON T1.id = T2.i_id GROUP BY T2.i_id HAVING COUNT(*) > 1 | spider |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
... | SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_in... | css |
CREATE TABLE table_name_32 (
avg_g INTEGER,
name VARCHAR,
gain VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much Avg/G has a Name of robert marve, and a Gain smaller than 236?
| SELECT SUM(avg_g) FROM table_name_32 WHERE name = "robert marve" AND gain < 236 | sql_create_context |
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 t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'vasopressors - vasopressin') AS t1 JOIN (SELECT pa... | eicu |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM tex... | SELECT COUNT(*) FROM jybgb WHERE JZLSH = '00107790166' | css |
CREATE TABLE table_203_161 (
id number,
"pos." text,
"div." number,
"no." number,
"team" text,
"drivers" text,
"car" text,
"laps" number,
"qual.\npos." number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the difference in laps ... | SELECT (SELECT "laps" FROM table_203_161 WHERE "pos." = 1) - (SELECT "laps" FROM table_203_161 WHERE "pos." = 24) | squall |
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostFeedb... | SELECT ROW_NUMBER() OVER (ORDER BY Badges.Date) AS "#", Users.Id AS "user_link", Reputation FROM Users, Badges WHERE Users.Id = Badges.UserId AND Badges.Class = '##BadgeClass##' AND Badges.TagBased = 1 AND LOWER(Badges.Name) = LOWER('##TagName##') ORDER BY Badges.Date | sede |
CREATE TABLE table_58608 (
"Year" real,
"Tournament" text,
"Venue" text,
"Result" text,
"Extra" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the average of all years tournaments were hosted in Doha, Qatar?
| SELECT AVG("Year") FROM table_58608 WHERE "Venue" = 'doha, qatar' | wikisql |
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 Team_ID, ACC_Percent FROM basketball_match | nvbench |
CREATE TABLE county_public_safety (
County_ID int,
Name text,
Population int,
Police_officers int,
Residents_per_officer int,
Case_burden int,
Crime_rate real,
Police_force text,
Location text
)
CREATE TABLE city (
City_ID int,
County_ID int,
Name text,
White real,
... | SELECT Police_force, COUNT(*) FROM county_public_safety GROUP BY Police_force ORDER BY Police_force DESC | nvbench |
CREATE TABLE table_33497 (
"Date" text,
"Name" text,
"Party" text,
"Province" text,
"Details" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which province had a liberal party member on December 31, 2006?
| SELECT "Province" FROM table_33497 WHERE "Party" = 'liberal' AND "Date" = 'december 31, 2006' | wikisql |
CREATE TABLE station (
id number,
name text,
lat number,
long number,
dock_count number,
city text,
installation_date text
)
CREATE TABLE trip (
id number,
duration number,
start_date text,
start_station_name text,
start_station_id number,
end_date text,
end_stat... | SELECT date, max_temperature_f - min_temperature_f FROM weather ORDER BY max_temperature_f - min_temperature_f LIMIT 1 | spider |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemics... | SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-2498')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutput... | eicu |
CREATE TABLE table_24919137_2 (
venue VARCHAR,
result_margin VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the game played when the result/margin was won by 70?
| SELECT venue FROM table_24919137_2 WHERE result_margin = "WON by 70" | sql_create_context |
CREATE TABLE course_offering (
offering_id int,
course_id int,
semester int,
section_number int,
start_time time,
end_time time,
monday varchar,
tuesday varchar,
wednesday varchar,
thursday varchar,
friday varchar,
saturday varchar,
sunday varchar,
has_final_proje... | SELECT DISTINCT course_offering.end_time, course_offering.section_number, course_offering.start_time FROM course, course_offering, semester WHERE course_offering.start_time > '10:00' AND course.course_id = course_offering.course_id AND course.department = 'ANAT' AND course.number = 852 AND semester.semester = 'WN' AND ... | advising |
CREATE TABLE table_33579 (
"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 venue when the away side scores 11.2... | SELECT "Venue" FROM table_33579 WHERE "Away team score" = '11.20 (86)' | wikisql |
CREATE TABLE table_60229 (
"Class" text,
"Number range" text,
"Quantity" text,
"Year(s) Built" text,
"Type" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number range for the 56 quantity?
| SELECT "Number range" FROM table_60229 WHERE "Quantity" = '56' | 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 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_NM = '何子美' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-11-27' AND '2017-03-05' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE student_course_enrolment (
registration_id number,
student_id number,
course_id number,
date_of_enrolment time,
date_of_completion time
)
CREATE TABLE course_authors_and_tutors (
author_id number,
author_tutor_atb text,
login_name text,
password text,
personal_name ... | SELECT * FROM course_authors_and_tutors ORDER BY personal_name | spider |
CREATE TABLE customer (
active VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many customers have an active value of 1?
| SELECT COUNT(*) FROM customer WHERE active = '1' | sql_create_context |
CREATE TABLE table_name_43 (
years VARCHAR,
jersey_number_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Years, when Jersey Number(s) is 5?
| SELECT years FROM table_name_43 WHERE jersey_number_s_ = "5" | sql_create_context |
CREATE TABLE song (
song_name VARCHAR,
resolution VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Give me a list of the names of all songs ordered by their resolution.
| SELECT song_name FROM song ORDER BY resolution | sql_create_context |
CREATE TABLE table_name_61 (
title VARCHAR,
remark VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What title had a remark of #21 us [riaa certified gold january 3, 1990]?
| SELECT title FROM table_name_61 WHERE remark = "#21 us [riaa certified gold january 3, 1990]" | sql_create_context |
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adults INTEGER,
Kids INTEGER
)
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
baseP... | SELECT AVG(basePrice), MIN(basePrice) FROM Rooms GROUP BY decor | nvbench |
CREATE TABLE table_51644 (
"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 crowd when the away team was hawtho... | SELECT MIN("Crowd") FROM table_51644 WHERE "Away team" = 'hawthorn' | wikisql |
CREATE TABLE table_name_70 (
score VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which score has a Date of october 29, 2008?
| SELECT score FROM table_name_70 WHERE date = "october 29, 2008" | sql_create_context |
CREATE TABLE table_16581 (
"#" real,
"Episode" text,
"Rating" text,
"Share" real,
"Rating/Share (18-49)" text,
"Viewers (millions)" text,
"Rank (timeslot)" real,
"Rank (night)" real,
"Rank (week)" text
)
-- Using valid SQLite, answer the following questions for the tables provided ... | SELECT COUNT("Viewers (millions)") FROM table_16581 WHERE "Rank (night)" = '11' | wikisql |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'hepatic dysfunction' AND STRFTIME('%y', diagnosis.diagnosistime) = '2100') AS t1) - (SELECT COUNT(DI... | eicu |
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
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,
... | SELECT jybgb.BBCJBW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '许兰梦' AND jy... | css |
CREATE TABLE table_name_45 (
surface VARCHAR,
partner VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Surface has a Partner of galina voskoboeva?
| SELECT surface FROM table_name_45 WHERE partner = "galina voskoboeva" | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text... | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '20186568174' | css |
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.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '43832017' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 8811.34) | css |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'antiarrhy... | eicu |
CREATE TABLE table_59149 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Opponent in the final" text,
"Score in the final" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Opponent in the final of the match played on ... | SELECT "Opponent in the final" FROM table_59149 WHERE "Surface" = 'clay' AND "Score in the final" = '4–6, 3–6' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "SHORT TERM HOSPITAL" AND diagnoses.long_title = "Acute diastolic heart failure" | mimicsql_data |
CREATE TABLE table_44296 (
"Edition" text,
"Round" text,
"Date" text,
"Against" text,
"Surface" text,
"Opponent" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the date for Round 2r?
| SELECT "Date" FROM table_44296 WHERE "Round" = '2r' | wikisql |
CREATE TABLE COURSE (
CRS_CODE varchar(10),
DEPT_CODE varchar(10),
CRS_DESCRIPTION varchar(35),
CRS_CREDIT float(8)
)
CREATE TABLE ENROLL (
CLASS_CODE varchar(5),
STU_NUM int,
ENROLL_GRADE varchar(50)
)
CREATE TABLE STUDENT (
STU_NUM int,
STU_LNAME varchar(15),
STU_FNAME varcha... | SELECT MAX(STU_GPA), AVG(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE | nvbench |
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
... | SELECT * FROM CloseReasonTypes | sede |
CREATE TABLE table_21774 (
"District" real,
"Incumbent" text,
"2008 Status" text,
"Democratic" text,
"Republican" text,
"Independent Green" text,
"Libertarian" text,
"Other Party" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was th... | SELECT "Democratic" FROM table_21774 WHERE "Republican" = 'Frank Wolf' | wikisql |
CREATE TABLE party_host (
Party_ID int,
Host_ID int,
Is_Main_in_Charge bool
)
CREATE TABLE host (
Host_ID int,
Name text,
Nationality text,
Age text
)
CREATE TABLE party (
Party_ID int,
Party_Theme text,
Location text,
First_year text,
Last_year text,
Number_of_host... | SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime... | SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-11804')) AND intakeoutput.cellpath LIKE '%intake%' AND D... | eicu |
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
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Manufacturer | nvbench |
CREATE TABLE table_32866 (
"Club" text,
"Played" real,
"Lost" real,
"Drawn" real,
"Against" real,
"Diff." real,
"Points" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of points against when the team has more than ... | SELECT MAX("Against") FROM table_32866 WHERE "Lost" > '0' AND "Played" < '6' | wikisql |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "56" AND prescriptions.route = "PO/NG" | mimicsql_data |
CREATE TABLE table_19900 (
"Series Ep." text,
"Episode" real,
"Netflix" text,
"Segment A" text,
"Segment B" text,
"Segment C" text,
"Segment D" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the total number of segment d for wooden s ba... | SELECT COUNT("Segment D") FROM table_19900 WHERE "Segment A" = 'Wooden s Barrel' | wikisql |
CREATE TABLE table_33431 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent during week 8?
| SELECT "Opponent" FROM table_33431 WHERE "Week" = '8' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
... | SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 7476) AND STRFTIME('%y-%m', prescriptions.startdate) >= '2102-02' GROUP BY prescriptions.drug) AS t1 WHERE t1.c1... | mimic_iii |
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
... | SELECT Users.Id AS "user_link", Users.DisplayName, COUNT(Badges.Id) AS Number_of_Badges FROM Badges INNER JOIN Users ON Users.Id = Badges.UserId WHERE Badges.Name = 'Necromancer' GROUP BY Users.DisplayName, Users.Id ORDER BY Number_of_Badges DESC | sede |
CREATE TABLE table_2623498_5 (
title VARCHAR,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of titles written by Charleen Easton?
| SELECT COUNT(title) FROM table_2623498_5 WHERE written_by = "Charleen Easton" | sql_create_context |
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,
charttim... | SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'suture of v... | mimic_iii |
CREATE TABLE table_name_84 (
location VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Time of 10.82 has what location?
| SELECT location FROM table_name_84 WHERE time = 10.82 | sql_create_context |
CREATE TABLE table_name_5 (
location VARCHAR,
entered_service VARCHAR,
customer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What location entered service in 1999 and had a customer of Anadarko?
| SELECT location FROM table_name_5 WHERE entered_service = "1999" AND customer = "anadarko" | sql_create_context |
CREATE TABLE table_name_70 (
name VARCHAR,
constituency_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the name when the constituency number is 150?
| SELECT name FROM table_name_70 WHERE constituency_number = "150" | sql_create_context |
CREATE TABLE table_204_761 (
id number,
"rank" number,
"nation" text,
"gold" number,
"silver" number,
"bronze" number,
"total" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total amount of gold awards that france won ?
| SELECT "gold" FROM table_204_761 WHERE "nation" = 'france' | squall |
CREATE TABLE table_63045 (
"Rank" real,
"Nation" text,
"Gold" real,
"Silver" real,
"Bronze" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of Silver medals with a Total greater than 14 and more than 15 Br... | SELECT MAX("Silver") FROM table_63045 WHERE "Total" > '14' AND "Bronze" > '15' | wikisql |
CREATE TABLE table_4777 (
"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.
-- In which venue did the home team have a score of ... | SELECT "Venue" FROM table_4777 WHERE "Home team score" = '6.10 (46)' | wikisql |
CREATE TABLE table_25414 (
"Year" real,
"Majors" real,
"ATP wins" real,
"Total wins" real,
"Earnings ($)" real,
"Money list rank" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the latest year that data is available for?
| SELECT MAX("Year") FROM table_25414 | wikisql |
CREATE TABLE code_description (
code varchar,
description text
)
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,
fligh... | 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, fare, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.... | atis |
CREATE TABLE t_kc21 (
MED_CLINIC_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
COMP_ID text,
PERSON_ID text,
PERSON_NM text,
IDENTITY_CARD text,
SOC_SRT_CARD text,
PERSON_SEX number,
PERSON_AGE number,
IN_HOSP_DATE time,
OUT_HOSP_DATE time,
DIFF_PLACE_FLG numb... | SELECT SUM(PER_ACC_PAY) FROM t_kc24 WHERE PERSON_ID = '30282836' AND CLINIC_SLT_DATE BETWEEN '2014-12-28' AND '2016-11-01' | css |
CREATE TABLE table_68898 (
"Place" text,
"Player" text,
"Country" text,
"Score" real,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total score of Danny Edwards?
| SELECT SUM("Score") FROM table_68898 WHERE "Player" = 'danny edwards' | 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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH AND mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH = jybgb.... | css |
CREATE TABLE table_59058 (
"Parish (Prestegjeld)" text,
"Sub-Parish (Sokn)" text,
"Church Name" text,
"Year Built" text,
"Location of the Church" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Sub-Parish called that has a church located ... | SELECT "Sub-Parish (Sokn)" FROM table_59058 WHERE "Location of the Church" = 'fresvik' | wikisql |
CREATE TABLE table_name_63 (
attendance VARCHAR,
game_site VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the attendance at the Meadowlands against the New England Patriots?
| SELECT attendance FROM table_name_63 WHERE game_site = "the meadowlands" AND opponent = "new england patriots" | sql_create_context |
CREATE TABLE table_1330 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What wa... | SELECT "Score" FROM table_1330 WHERE "Date" = 'January 19' | wikisql |
CREATE TABLE table_35871 (
"Res." text,
"Record" text,
"Opponent" text,
"Method" text,
"Event" text,
"Round" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- The record of 11-1 used what method?
| SELECT "Method" FROM table_35871 WHERE "Record" = '11-1' | wikisql |
CREATE TABLE Engineer_Skills (
engineer_id INTEGER,
skill_id INTEGER
)
CREATE TABLE Skills (
skill_id INTEGER,
skill_code VARCHAR(20),
skill_description VARCHAR(255)
)
CREATE TABLE Maintenance_Engineers (
engineer_id INTEGER,
company_id INTEGER,
first_name VARCHAR(50),
last_name VA... | SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id | nvbench |
CREATE TABLE table_71949 (
"Rank" real,
"Name" text,
"Height ft (m)" text,
"Floors" real,
"Year" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When a building is 292 (89) ft (m) tall, has less than 23 floors, and ranks less than 14, what is the ave... | SELECT AVG("Year") FROM table_71949 WHERE "Floors" < '23' AND "Height ft (m)" = '292 (89)' AND "Rank" < '14' | wikisql |
CREATE TABLE bdmzjzjlb (
CYBQDM text,
CYBQMC text,
CYCWH text,
CYKSDM text,
CYKSMC text,
CYSJ time,
CYZTDM number,
HZXM text,
JZKSDM text,
JZKSMC text,
JZLSH number,
KH text,
KLX number,
MZBMLX number,
MZJZLSH text,
MZZDBM text,
MZZDMC text,
MZZYZD... | SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.RYBH = '... | css |
CREATE TABLE table_name_72 (
bronze VARCHAR,
year VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who won bronze in 1994?
| SELECT bronze FROM table_name_72 WHERE year = 1994 | sql_create_context |
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,
hospita... | SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '033-3009')) AND vitalperiodic.temperature > 37.1 AND NOT vitalperiod... | eicu |
CREATE TABLE table_3730 (
"Country" text,
"Total Drivers" real,
"Champions" text,
"Championships" text,
"Current 3 November 2013" real,
"First driver(s)" text,
"Last/Current driver(s) 3 November 2013" text
)
-- Using valid SQLite, answer the following questions for the tables provided abov... | SELECT "First driver(s)" FROM table_3730 WHERE "Country" = 'Romania' | wikisql |
CREATE TABLE college (
cName VARCHAR,
enr VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the names of schools with the top 3 largest size?
| SELECT cName FROM college ORDER BY enr DESC LIMIT 3 | sql_create_context |
CREATE TABLE table_1735 (
"Episode" real,
"Original title" text,
"Directed by" text,
"Written by" text,
"Original airdate" text,
"Duration" text,
"Viewership" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of duration for vie... | SELECT COUNT("Duration") FROM table_1735 WHERE "Viewership" = '5.46 million' | wikisql |
CREATE TABLE paperfield (
fieldid int,
paperid int
)
CREATE TABLE field (
fieldid int
)
CREATE TABLE venue (
venueid int,
venuename varchar
)
CREATE TABLE writes (
paperid int,
authorid int
)
CREATE TABLE cite (
citingpaperid int,
citedpaperid int
)
CREATE TABLE paper (
pape... | SELECT DISTINCT keyphrase.keyphraseid FROM author, keyphrase, paper, paperkeyphrase, writes WHERE author.authorname = 'roni rosenfeld' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid AND writes.authorid = author.authorid AND writes.paperid = paper.paperid | scholar |
CREATE TABLE table_23854 (
"No. in series" real,
"Title" text,
"Directedby" text,
"Writtenby" text,
"Originalairdate" text,
"Production code" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What number episode was written by kurt sutter & jack lo... | SELECT MAX("No. in series") FROM table_23854 WHERE "Writtenby" = 'Kurt Sutter & Jack LoGiudice' | wikisql |
CREATE TABLE ref_calendar (
calendar_date time,
day_number number
)
CREATE TABLE ref_document_types (
document_type_code text,
document_type_name text,
document_type_description text
)
CREATE TABLE ref_locations (
location_code text,
location_name text,
location_description text
)
CRE... | SELECT T1.employee_id FROM employees AS T1 JOIN roles AS T2 ON T1.role_code = T2.role_code WHERE T2.role_name = "Human Resource" OR T2.role_name = "Manager" | spider |
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 text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
... | SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb... | css |
CREATE TABLE table_20403667_2 (
crop_damaged__in_lakh_inr__ VARCHAR,
public_property_damaged__in_lakh_inr__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many crops were damaged when the public property damage was 1,03,049.60?
| SELECT crop_damaged__in_lakh_inr__ FROM table_20403667_2 WHERE public_property_damaged__in_lakh_inr__ = "1,03,049.60" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.drug = "Indomethacin" | mimicsql_data |
CREATE TABLE table_44114 (
"Year" real,
"Regional GVA" real,
"Agriculture" real,
"Industry" real,
"Services" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum of Agriculture, when Regional GVA is greater than 6,584, when Services is gre... | SELECT SUM("Agriculture") FROM table_44114 WHERE "Regional GVA" > '6,584' AND "Services" > '7,502' AND "Industry" > '1,565' | wikisql |
CREATE TABLE table_41342 (
"Position" real,
"Team" text,
"Points" real,
"Played" real,
"Drawn" real,
"Lost" real,
"Against" real,
"Difference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team has 1 as the drawn, with 2 as the lo... | SELECT "Team" FROM table_41342 WHERE "Drawn" = '1' AND "Lost" = '2' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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... | SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '杨纳兰' | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.