instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_12749 (
"Date" text,
"Tournament" text,
"Winning score" text,
"To par" text,
"Margin of victory" text,
"Runner(s)-up" text,
"Winner's share ( $ )" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is To par, when Margin ... | SELECT "To par" FROM table_12749 WHERE "Margin of victory" = '2 strokes' AND "Tournament" = 'women''s british open' | wikisql |
CREATE TABLE table_name_10 (
podium INTEGER,
pole VARCHAR,
season VARCHAR,
flap VARCHAR,
race VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Flap of 0, and a Race smaller than 2, and a Season of 1989, and a Pole smaller than 0 had what average po... | SELECT AVG(podium) FROM table_name_10 WHERE flap = 0 AND race < 2 AND season = "1989" AND pole < 0 | sql_create_context |
CREATE TABLE table_14986292_1 (
area__km²_ VARCHAR,
population_density_2010___km²_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the number of area where population density 2010 for 514
| SELECT COUNT(area__km²_) FROM table_14986292_1 WHERE population_density_2010___km²_ = 514 | sql_create_context |
CREATE TABLE table_13603 (
"General election" real,
"Name" text,
"Share of votes" text,
"Seats" real,
"Share of seats" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Seatshave a Share of votes of 18%, and a Share of seats of 3%, and a General ... | SELECT MIN("Seats") FROM table_13603 WHERE "Share of votes" = '18%' AND "Share of seats" = '3%' AND "General election" < '1992' | wikisql |
CREATE TABLE table_204_635 (
id number,
"round" number,
"selection" number,
"player" text,
"position" text,
"college" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who was drafted before robert alford ?
| SELECT "player" FROM table_204_635 WHERE id = (SELECT id FROM table_204_635 WHERE "player" = 'robert alford') - 1 | squall |
CREATE TABLE wine (
No INTEGER,
Grape TEXT,
Winery TEXT,
Appelation TEXT,
State TEXT,
Name TEXT,
Year INTEGER,
Price INTEGER,
Score INTEGER,
Cases INTEGER,
Drink TEXT
)
CREATE TABLE appellations (
No INTEGER,
Appelation TEXT,
County TEXT,
State TEXT,
Area... | SELECT Grape, COUNT(Grape) FROM wine GROUP BY Grape ORDER BY Grape | nvbench |
CREATE TABLE table_45491 (
"Company name" text,
"Network brand name" text,
"Country" text,
"Accreditation type" text,
"Accreditation level" text,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the accreditation level of the networ... | SELECT "Accreditation level" FROM table_45491 WHERE "Network brand name" = 'movistar' | wikisql |
CREATE TABLE table_name_51 (
korean VARCHAR,
chinese VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which KOREAN has a CHINESE of / sh z p t ?
| SELECT korean FROM table_name_51 WHERE chinese = "師子菩提 / shīzǐpútí" | sql_create_context |
CREATE TABLE Courses (
course_id VARCHAR(100),
course_name VARCHAR(120),
course_description VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
student_details VARCHAR(255)
)
CREATE TABLE Candidates (
candidate_id INTEGER,
candidate_details VARCHAR(25... | SELECT course_name, COUNT(*) FROM Students AS T1 JOIN Student_Course_Registrations AS T2 ON T1.student_id = T2.student_id JOIN Courses AS T3 ON T2.course_id = T3.course_id GROUP BY T2.course_id | nvbench |
CREATE TABLE captain (
Captain_ID int,
Name text,
Ship_ID int,
age text,
Class text,
Rank text
)
CREATE TABLE Ship (
Ship_ID int,
Name text,
Type text,
Built_Year real,
Class text,
Flag text
)
-- Using valid SQLite, answer the following questions for the tables provide... | SELECT Rank, COUNT(*) FROM captain GROUP BY Rank ORDER BY Rank DESC | nvbench |
CREATE TABLE table_27764 (
"Series #" real,
"Season #" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" real,
"U.S viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Wh... | SELECT "Title" FROM table_27764 WHERE "U.S viewers (million)" = '4.65' | wikisql |
CREATE TABLE courses (
course_id text,
course_name text,
course_description text,
other_details text
)
CREATE TABLE candidate_assessments (
candidate_id number,
qualification text,
assessment_date time,
asessment_outcome_code text
)
CREATE TABLE addresses (
address_id number,
l... | SELECT candidate_id FROM candidate_assessments WHERE asessment_outcome_code = "Pass" | spider |
CREATE TABLE table_name_7 (
utah VARCHAR,
colorado VARCHAR,
new_mexico VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the value for utah when colorado and new mexico are bush?
| SELECT utah FROM table_name_7 WHERE colorado = "bush" AND new_mexico = "bush" | sql_create_context |
CREATE TABLE table_name_55 (
college VARCHAR,
pick__number VARCHAR,
name VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Pick # smaller than 11, and a Name of von hutchins belongs to what college?
| SELECT college FROM table_name_55 WHERE pick__number < 11 AND name = "von hutchins" | sql_create_context |
CREATE TABLE table_11964154_9 (
team VARCHAR,
date VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what's the team where date is february 8
| SELECT team FROM table_11964154_9 WHERE date = "February 8" | sql_create_context |
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varc... | SELECT DISTINCT name, number FROM course WHERE department = 'LATINOAM' AND credits = 16 | advising |
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.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND jybgb.YLJGDM = ... | css |
CREATE TABLE table_name_90 (
level INTEGER,
apps VARCHAR,
season VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total Level with 27 Apps after 2006?
| SELECT SUM(level) FROM table_name_90 WHERE apps = 27 AND season > 2006 | sql_create_context |
CREATE TABLE table_name_23 (
trofeo_fast_team VARCHAR,
points_classification VARCHAR,
stage VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team had a final stage when Claudio Chiappucci had the points?
| SELECT trofeo_fast_team FROM table_name_23 WHERE points_classification = "claudio chiappucci" AND stage = "final" | sql_create_context |
CREATE TABLE student (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
tot_cred numeric(3,0)
)
CREATE TABLE takes (
ID varchar(5),
course_id varchar(8),
sec_id varchar(8),
semester varchar(6),
year numeric(4,0),
grade varchar(2)
)
CREATE TABLE instructor (
ID varcha... | SELECT year, COUNT(*) FROM section GROUP BY year | nvbench |
CREATE TABLE table_42737 (
"Mission" text,
"Date" text,
"Launch site" text,
"Motor" text,
"Apogee" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Mission is on 2003 apr 1?
| SELECT "Mission" FROM table_42737 WHERE "Date" = '2003 apr 1' | wikisql |
CREATE TABLE mountain (
mountain_id number,
name text,
height number,
prominence number,
range text,
country text
)
CREATE TABLE climber (
climber_id number,
name text,
country text,
time text,
points number,
mountain_id number
)
-- Using valid SQLite, answer the follo... | SELECT T2.height FROM climber AS T1 JOIN mountain AS T2 ON T1.mountain_id = T2.mountain_id ORDER BY T1.points DESC LIMIT 1 | spider |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescription... | SELECT procedures.long_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Jane Dillard" | mimicsql_data |
CREATE TABLE table_23840623_4 (
epa_rated_combined_fuel_economy VARCHAR,
operating_mode VARCHAR,
dirty_electric_grid_rocky_mountains__denver_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the epa rated combined fuel economy for the all-electric ... | SELECT epa_rated_combined_fuel_economy FROM table_23840623_4 WHERE operating_mode = "All-electric" AND dirty_electric_grid_rocky_mountains__denver_ = "330 g/mi (205 g/km)" | sql_create_context |
CREATE TABLE table_name_32 (
qual_2 VARCHAR,
best VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the qual 2 when the best is 1:45.172?
| SELECT qual_2 FROM table_name_32 WHERE best = "1:45.172" | sql_create_context |
CREATE TABLE table_173475_1 (
title VARCHAR,
release VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What titles were released in 2006?
| SELECT title FROM table_173475_1 WHERE release = 2006 | sql_create_context |
CREATE TABLE table_38831 (
"States" text,
"Fall 05" real,
"Fall 06" real,
"Fall 07" real,
"Fall 08" real,
"Fall 09" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the sum amount of fall 05 when fall 08 is more than 5, fall 06 is more tha... | SELECT COUNT("Fall 05") FROM table_38831 WHERE "Fall 08" > '5' AND "Fall 06" > '7' AND "States" = 'maryland' AND "Fall 09" > '471' | wikisql |
CREATE TABLE table_6032 (
"Year" real,
"Group" text,
"Award" text,
"Film/Series" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of years that Kim was nominated at the Sitges Film Festival?
| SELECT COUNT("Year") FROM table_6032 WHERE "Group" = 'sitges film festival' | wikisql |
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 demographic.admission_type = "EMERGENCY" AND lab.label = "WBC, Pleural" | mimicsql_data |
CREATE TABLE table_204_966 (
id number,
"region" text,
"date" text,
"label" text,
"format" text,
"catalog" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what format did france use ?
| SELECT "format" FROM table_204_966 WHERE "region" = 'france' | squall |
CREATE TABLE students (
student_id number,
student_details text
)
CREATE TABLE people (
person_id number,
first_name text,
middle_name text,
last_name text,
cell_mobile_number text,
email_address text,
login_name text,
password text
)
CREATE TABLE people_addresses (
person_... | SELECT DISTINCT T1.city FROM addresses AS T1 JOIN people_addresses AS T2 ON T1.address_id = T2.address_id JOIN students AS T3 ON T2.person_id = T3.student_id | spider |
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_gradu... | SELECT DISTINCT semester.semester, semester.year FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number = 101 AND course_offering.semester = semester.semester_id AND semester.semester_id > (SELECT SEMESTERalias1.semester_id FROM semeste... | advising |
CREATE TABLE table_32264 (
"Dance" text,
"Best dancer" text,
"Best score" real,
"Worst dancer" text,
"Worst score" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What dance was Leeza Gibbons the worst dancer for, receiving a score lower than 15?
| SELECT MIN("Best score") FROM table_32264 WHERE "Worst dancer" = 'leeza gibbons' AND "Worst score" < '15' | wikisql |
CREATE TABLE table_45165 (
"Season" real,
"Winner" text,
"Team" text,
"Goals" text,
"Assists" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points when John Vopni won a season before 1977?
| SELECT "Points" FROM table_45165 WHERE "Season" < '1977' AND "Winner" = 'john vopni' | wikisql |
CREATE TABLE table_15836 (
"Year" real,
"Entrant" text,
"Chassis" text,
"Engine" text,
"Points" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- After 1972, how many points did Marlboro Team Alfa Romeo have?
| SELECT "Points" FROM table_15836 WHERE "Year" > '1972' AND "Entrant" = 'marlboro team alfa romeo' | wikisql |
CREATE TABLE races (
raceId INTEGER,
year INTEGER,
round INTEGER,
circuitId INTEGER,
name TEXT,
date TEXT,
time TEXT,
url TEXT
)
CREATE TABLE driverStandings (
driverStandingsId INTEGER,
raceId INTEGER,
driverId INTEGER,
points REAL,
position INTEGER,
positionTex... | SELECT location, circuitId FROM circuits WHERE country = "France" OR country = "Belgium" | nvbench |
CREATE TABLE table_name_6 (
rank INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average rank of a nation that had 219,721 in 2012?
| SELECT AVG(rank) FROM table_name_6 WHERE 2012 = 219 OFFSET 721 | sql_create_context |
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 prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND diagnoses.icd9_code = "99702" | mimicsql_data |
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 MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-9626') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y', patient.unitadmittime) >= '2105' GROUP BY STRFTIME('%y-%m-%d', patient.unita... | eicu |
CREATE TABLE table_name_52 (
condition VARCHAR,
partial_thromboplastin_time VARCHAR,
prothrombin_time VARCHAR,
platelet_count VARCHAR,
bleeding_time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the condition with platelet count of unaffect... | SELECT condition FROM table_name_52 WHERE platelet_count = "unaffected" AND bleeding_time = "unaffected" AND prothrombin_time = "prolonged" AND partial_thromboplastin_time = "prolonged" | sql_create_context |
CREATE TABLE table_5795 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- WHo is Player that has a Place of t9 in united states?
| SELECT "Player" FROM table_5795 WHERE "Place" = 't9' AND "Country" = 'united states' | wikisql |
CREATE TABLE Invoice (
InvoiceId integer,
CustomerId integer,
InvoiceDate datetime,
BillingAddress varchar(70),
BillingCity varchar(40),
BillingState varchar(40),
BillingCountry varchar(40),
BillingPostalCode varchar(10),
Total decimal(10,2)
)
CREATE TABLE Customer (
CustomerId ... | SELECT T1.FirstName, T1.SupportRepId FROM Customer AS T1 JOIN Employee AS T2 ON T1.SupportRepId = T2.EmployeeId | nvbench |
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 t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '0584187' GROUP BY t_kc21.OUT_DIAG_DIS_CD | css |
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_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '73880776' AND t_kc21.MED_SER_ORG_NO = '4562632' AND t_kc21.OUT_DIAG_DOC_NM LIKE '魏%' | css |
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS varchar(20),
DEPT_EXTENSION varchar(4)
)
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
... | SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE GROUP BY EMP_FNAME ORDER BY COUNT(EMP_FNAME) | nvbench |
CREATE TABLE table_name_96 (
date VARCHAR,
score VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was the score 3 3, and away team was Barnet?
| SELECT date FROM table_name_96 WHERE score = "3–3" AND away_team = "barnet" | sql_create_context |
CREATE TABLE table_name_8 (
voltage VARCHAR,
socket VARCHAR,
model_number VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the voltage of the Pentiumiii866 microprocessor with a socket 370?
| SELECT voltage FROM table_name_8 WHERE socket = "socket 370" AND model_number = "pentiumiii866" | sql_create_context |
CREATE TABLE table_5743 (
"Records" text,
"Pct." real,
"MRC Championships" real,
"Solo" real,
"Co-Champions" real,
"State Champions" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average value of MRC Championships with more than 0.6... | SELECT AVG("MRC Championships") FROM table_5743 WHERE "Pct." > '0.685' AND "Co-Champions" > '1' AND "Solo" < '5' | wikisql |
CREATE TABLE table_22815568_3 (
county VARCHAR,
population VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many counties have a population of 2266?
| SELECT COUNT(county) FROM table_22815568_3 WHERE population = 2266 | sql_create_context |
CREATE TABLE Rooms (
RoomId TEXT,
roomName TEXT,
beds INTEGER,
bedType TEXT,
maxOccupancy INTEGER,
basePrice INTEGER,
decor TEXT
)
CREATE TABLE Reservations (
Code INTEGER,
Room TEXT,
CheckIn TEXT,
CheckOut TEXT,
Rate REAL,
LastName TEXT,
FirstName TEXT,
Adul... | SELECT bedType, COUNT(bedType) FROM Rooms WHERE decor = "traditional" GROUP BY bedType ORDER BY COUNT(bedType) | nvbench |
CREATE TABLE table_6327 (
"Outcome" text,
"Date" text,
"Tournament" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Score on October 24, 1982 in Tokyo, Japan?
| SELECT "Score" FROM table_6327 WHERE "Tournament" = 'tokyo, japan' AND "Date" = 'october 24, 1982' | wikisql |
CREATE TABLE table_name_87 (
engine VARCHAR,
chassis VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the engine when the chassis was a porsche 718??
| SELECT engine FROM table_name_87 WHERE chassis = "porsche 718" | sql_create_context |
CREATE TABLE table_52975 (
"Season" text,
"UEFA Season" text,
"Coeff" text,
"Ranking" real,
"Champions" text,
"Runner-up" text,
"3rd place" text,
"Cup winner" text,
"Cup runner-up" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which... | SELECT "Champions" FROM table_52975 WHERE "Runner-up" = 'tobol' AND "Coeff" = '1.125' | wikisql |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Continuous invasive mechanical ventilation for less than 96 consecutive hours" AND lab."CATEGORY" = "Blood G... | mimicsql_data |
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.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.MED_CLINIC_ID = '59467092414' UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.MED_CLINIC_ID = '59467092414' | css |
CREATE TABLE table_37489 (
"Name" text,
"Gain" real,
"Loss" real,
"Long" real,
"Avg/G" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Loss has a Name of bullock, chris, and a Long smaller than 36?
| SELECT SUM("Loss") FROM table_37489 WHERE "Name" = 'bullock, chris' AND "Long" < '36' | wikisql |
CREATE TABLE diagnoses (
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
)
C... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Private" AND lab.label = "Parathyroid Hormone" | mimicsql_data |
CREATE TABLE school (
mascot VARCHAR,
enrollment INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the mascots for schools with enrollments above the average?
| SELECT mascot FROM school WHERE enrollment > (SELECT AVG(enrollment) FROM school) | 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 jybgb (
YLJGDM text,
YLJGDM_M... | SELECT COUNT(DISTINCT hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.ZZYSGH = '59407914' AND mzjzjlb.JZKSRQ BETWEEN '2007-04-22' AND '2019-12-24' | css |
CREATE TABLE table_2122 (
"Institution" text,
"Location" text,
"Nickname" text,
"Founded" real,
"Type" text,
"Enrollment" real,
"Joined" real,
"Current Conference" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest enrol... | SELECT MIN("Enrollment") FROM table_2122 WHERE "Founded" = '1880' | 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 = "MORBID OBESITY/SDA" AND demographic.dob_year < "2168" | mimicsql_data |
CREATE TABLE diagnoses (
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
)
C... | SELECT AVG(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.diagnosis = "OVERDOSE" | mimicsql_data |
CREATE TABLE table_name_39 (
total VARCHAR,
league_a VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Total when the league shows 79 (221)?
| SELECT total FROM table_name_39 WHERE league_a = "79 (221)" | sql_create_context |
CREATE TABLE table_name_22 (
outcome VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Outcome of the match with a Score of 6 1, 6 1?
| SELECT outcome FROM table_name_22 WHERE score = "6–1, 6–1" | sql_create_context |
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_400 text,
meter_500 text,
meter_600 text,
meter_700 text,
Time text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
... | SELECT meter_600, meter_100 FROM swimmer | nvbench |
CREATE TABLE time_slot (
time_slot_id varchar(4),
day varchar(1),
start_hr numeric(2),
start_min numeric(2),
end_hr numeric(2),
end_min numeric(2)
)
CREATE TABLE instructor (
ID varchar(5),
name varchar(20),
dept_name varchar(20),
salary numeric(8,2)
)
CREATE TABLE department (... | SELECT dept_name, AVG(credits) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name ORDER BY dept_name | nvbench |
CREATE TABLE table_name_24 (
round VARCHAR,
venue VARCHAR,
away VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What round was the match at Westpac Stadium that had the Newcastle Jets as the away team?
| SELECT round FROM table_name_24 WHERE venue = "westpac stadium" AND away = "newcastle jets" | sql_create_context |
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime ... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'part gastrec w jej anast') AND DATETIME(procedures_i... | mimic_iii |
CREATE TABLE table_name_52 (
date VARCHAR,
others VARCHAR,
psd___pc VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When the other is n/a and the psc-pc is 30% what is the date?
| SELECT date FROM table_name_52 WHERE others = "n/a" AND psd___pc = "30%" | sql_create_context |
CREATE TABLE table_train_157 (
"id" int,
"gender" string,
"systolic_blood_pressure_sbp" int,
"hemoglobin_a1c_hba1c" float,
"platelets" int,
"renal_disease" bool,
"c_reactive_protein" float,
"creatinine_clearance_cl" float,
"urine_protein" int,
"serum_creatinine" float,
"prote... | SELECT * FROM table_train_157 WHERE systolic_blood_pressure_sbp > 190 | criteria2sql |
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(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-28600')) AND microlab.culturesite = 'abscess' AND STRFTIME('%y', microlab.cult... | eicu |
CREATE TABLE table_60646 (
"Date" text,
"Opponent" text,
"Score" text,
"Decision" text,
"Attendance" real,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the game ending with a record of 31-43-2, what was the decision?
| SELECT "Decision" FROM table_60646 WHERE "Record" = '31-43-2' | wikisql |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE admissions (
row_id number,
subject_id number,
hadm_id number,
admittime time,
dischtime time,
admission_type text,
a... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT prescriptions.hadm_id FROM prescriptions WHERE prescriptions.drug = 'amoxicillin-clavulanic acid' AND STRFTIME('%y', prescriptions.startdate) = '2104') | mimic_iii |
CREATE TABLE table_21306 (
"Match Number" real,
"Date" text,
"Venue" text,
"Team 1" text,
"Team 2" text,
"Result" text,
"Man of the Match" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is man of the match for match number 5?
| SELECT "Man of the Match" FROM table_21306 WHERE "Match Number" = '5' | wikisql |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
... | SELECT Id, DisplayName, ((SELECT MAX(Score) FROM (SELECT PERCENT AS Score FROM Posts WHERE OwnerUserId = Users.Id ORDER BY Score LIMIT 50) AS BottomHalf) + (SELECT MIN(Score) FROM (SELECT PERCENT AS Score FROM Posts WHERE OwnerUserId = Users.Id ORDER BY Score DESC LIMIT 50) AS TopHalf)) / 2 AS MedianScore FROM Users WH... | sede |
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "48" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_name_40 (
rank INTEGER,
places VARCHAR,
nation VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the highest rank for east germany with points of 128.98 and places less than 70?
| SELECT MAX(rank) FROM table_name_40 WHERE nation = "east germany" AND points = 128.98 AND places < 70 | 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 t_kc22.SOC_SRT_DIRE_NM 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_t_kc22.MED_CLINIC_ID = '95798100815' INTERSECT SELECT t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON ... | css |
CREATE TABLE table_19409 (
"1890 No game" text,
"1891 No game" text,
"1892 No game" text,
"1893 No game" text,
"1894 WSU 10\u20130 Moscow" text,
"1895 WSU* 10\u20134 Pullman" text,
"1896 No game" text,
"1897 No game" text,
"1898 No game" text,
"1899 WSU* 11\u20130 Pullman" text
)... | SELECT "1890 No game" FROM table_19409 WHERE "1897 No game" = '1987 No game' | wikisql |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE presc... | SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 47224 AND DATETIME(admissions.admittime) <= DATETIME(CURRENT_TIME(), '-2 year') | mimic_iii |
CREATE TABLE Customers_Cards (
card_id INTEGER,
customer_id INTEGER,
card_type_code VARCHAR(15),
card_number VARCHAR(80),
date_valid_from DATETIME,
date_valid_to DATETIME,
other_card_details VARCHAR(255)
)
CREATE TABLE Accounts (
account_id INTEGER,
customer_id INTEGER,
account_... | SELECT transaction_type, COUNT(*) FROM Financial_Transactions GROUP BY transaction_type ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_name_59 (
leading_lady VARCHAR,
director VARCHAR,
title VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the leading lady in The Lonely Trail for Joseph Kane?
| SELECT leading_lady FROM table_name_59 WHERE director = "joseph kane" AND title = "the lonely trail" | sql_create_context |
CREATE TABLE table_15929 (
"County" text,
"English name" text,
"Irish name" text,
"Population" real,
"Irish speakers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the population for the Irish Name Leitir meall in?
| SELECT "Population" FROM table_15929 WHERE "Irish name" = 'Leitir Mealláin' | wikisql |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE cost (
costid number,
... | SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '004-64091')) AND NOT vitalperiodic.respiration IS N... | eicu |
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime t... | SELECT COUNT(*) > 0 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-18575' AND patient.hospitaldischargetime IS NULL)) AND medication.drug... | eicu |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Pleural" | mimicsql_data |
CREATE TABLE table_44586 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the class for trafen in part 3?
| SELECT "Class" FROM table_44586 WHERE "Part 3" = 'trafen' | wikisql |
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 procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "3799" AND prescriptions.drug_type = "BASE" | mimicsql_data |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT COUNT(*) FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-16123')) AND microlab.culturesite = 'nasopharynx' AND STRFTIME('%y', microlab.... | eicu |
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 wdmzjzjlb.RYTJDM, wdmzjzjlb.RYTJMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '53408787768' UNION SELECT bdmzjzjlb.RYTJDM, bdmzjzjlb.RYTJMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '53408787768' | css |
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 mzjzjlb_jybgb (
YLJGDM_MZJZJLB te... | SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '0731148' AND mzjzjlb.JZKSRQ BETWEEN '2016-11-12' AND '2019-10-06' AND mzjzjlb.WDBZ > 0 | css |
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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.person_info_XM = '俞慧艳' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgz... | css |
CREATE TABLE Lots (
lot_id INTEGER,
investor_id INTEGER,
lot_details VARCHAR(255)
)
CREATE TABLE Sales (
sales_transaction_id INTEGER,
sales_details VARCHAR(255)
)
CREATE TABLE Purchases (
purchase_transaction_id INTEGER,
purchase_details VARCHAR(255)
)
CREATE TABLE Transactions_Lots (
... | SELECT lot_details, COUNT(lot_details) FROM Investors AS T1 JOIN Lots AS T2 ON T1.investor_id = T2.investor_id WHERE T1.Investor_details = "l" GROUP BY lot_details ORDER BY COUNT(lot_details) | nvbench |
CREATE TABLE table_name_41 (
average VARCHAR,
team VARCHAR,
matches VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Can you tell me the sum of 100s that has the Team of deccan chargers, and the Match of 8, and the Average larger than 35.57?
| SELECT SUM(100 AS s) FROM table_name_41 WHERE team = "deccan chargers" AND matches = 8 AND average > 35.57 | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate n... | SELECT 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 = '006-1629')) AND DATETIME(treatment.treatmenttime, 'start of year'... | eicu |
CREATE TABLE table_name_77 (
events INTEGER,
top_10 VARCHAR,
cuts_made VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many events does the tournament with a top-10 of 2 and more than 5 cuts have?
| SELECT SUM(events) FROM table_name_77 WHERE top_10 = 2 AND cuts_made > 5 | 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 t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_NM = '何丽姿' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 8447.75) | css |
CREATE TABLE table_204_338 (
id number,
"location" text,
"coordinates" text,
"type" text,
"built" text,
"details" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the only location with a coordination of 60 16 ′ 31.65 ″ n 30 32... | SELECT "location" FROM table_204_338 WHERE "coordinates" = '60°16′31.65′′n 30°32′45.66′′e\ufeff / \ufeff60.2754583°n 30.5460167°e' | squall |
CREATE TABLE table_203_646 (
id number,
"year" number,
"competition" text,
"venue" text,
"position" text,
"notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many competitions were held in 2002 ?
| SELECT COUNT("competition") FROM table_203_646 WHERE "year" = 2002 | squall |
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 COUNT(*) FROM t_kc21 WHERE MED_SER_ORG_NO = '1301404' AND IN_HOSP_DATE BETWEEN '2010-11-10' AND '2017-09-26' AND INSURED_STS = '未就业' AND MED_AMOUT >= 5083.93 | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.