context stringlengths 11 9.12k | question stringlengths 0 1.06k | SQL stringlengths 2 4.44k | source stringclasses 28
values |
|---|---|---|---|
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... | what is the maximum age of patients with private insurance who stayed in hospital for 9 days? | SELECT MAX(demographic.age) FROM demographic WHERE demographic.insurance = "Private" AND demographic.days_stay = "9" | mimicsql_data |
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
... | What are some easy 300 -level courses ? | SELECT DISTINCT course.name, course.number, program_course.workload FROM course, program_course WHERE course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND program_course.course_id = course.course_id AND program_course.workload < 3 ORDER BY program_course.workload | advising |
CREATE TABLE table_204_282 (
id number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text,
"#" number
) | what year appears the most ? | SELECT "date" FROM table_204_282 GROUP BY "date" ORDER BY COUNT(*) DESC LIMIT 1 | squall |
CREATE TABLE table_name_29 (
player VARCHAR,
year_s__won VARCHAR
) | What Player won the PGA in 1989? | SELECT player FROM table_name_29 WHERE year_s__won = "1989" | sql_create_context |
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... | 对于编号为67164533的患者医疗记录中医疗费总额大于等于五千二百六十九点一五元的出院诊断疾病编码和名称都是什么? | SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '67164533' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 5269.15) | 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... | Give me the comparison about Team_ID over the ACC_Regular_Season , sort by the Y-axis in ascending. | SELECT ACC_Regular_Season, Team_ID FROM basketball_match ORDER BY Team_ID | nvbench |
CREATE TABLE table_test_23 (
"id" int,
"previous_mi" bool,
"anemia" bool,
"left_ventricular_ejection_fraction_lvef" int,
"tolerate_gadolinium_contrast_media" bool,
"renal_disease" bool,
"creatinine_clearance_cl" float,
"estimated_glomerular_filtration_rate_egfr" int,
"tolerate_magnet... | previous mi | SELECT * FROM table_test_23 WHERE previous_mi = 1 | criteria2sql |
CREATE TABLE table_name_4 (
year VARCHAR,
venue VARCHAR,
position VARCHAR,
notes VARCHAR
) | Which Year has a Position of 2nd, and Notes of -63kg, and a Venue of manchester? | SELECT year FROM table_name_4 WHERE position = "2nd" AND notes = "-63kg" AND venue = "manchester" | sql_create_context |
CREATE TABLE table_16729930_17 (
memory VARCHAR,
part_number_s_ VARCHAR
) | Name the memory for part number of ct80618003201aa | SELECT memory FROM table_16729930_17 WHERE part_number_s_ = "CT80618003201AA" | sql_create_context |
CREATE TABLE table_10975034_4 (
cfl_team VARCHAR,
college VARCHAR
) | What CFL teams are part of Simon Fraser college? | SELECT cfl_team FROM table_10975034_4 WHERE college = "Simon Fraser" | sql_create_context |
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... | give me the number of patients whose primary disease is syncope;telemetry and procedure short title is partial glossectomy? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "SYNCOPE;TELEMETRY" AND procedures.short_title = "Partial glossectomy" | mimicsql_data |
CREATE TABLE table_name_98 (
number_of_households INTEGER,
county VARCHAR,
population VARCHAR
) | Which Number of households has a County of cook, and Population smaller than 5,176? | SELECT AVG(number_of_households) FROM table_name_98 WHERE county = "cook" AND population < 5 OFFSET 176 | sql_create_context |
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId ... | Unanswered [tsql] questions created in the last week. | SELECT p.Id AS "post_link", p.Tags, DATEDIFF(DAY, p.LastActivityDate, GETDATE()) AS DaysSinceActivity, COUNT(DISTINCT a.Id) AS Answers FROM Posts AS p JOIN PostTypes AS ptype ON p.PostTypeId = ptype.Id JOIN PostTags AS ptags ON p.Id = ptags.PostId JOIN Tags ON ptags.TagId = Tags.Id LEFT JOIN Posts AS a ON a.ParentId = ... | sede |
CREATE TABLE table_23249053_11 (
team VARCHAR,
high_points VARCHAR
) | When rashard lewis (24) has the highest amount of points who is the team? | SELECT team FROM table_23249053_11 WHERE high_points = "Rashard Lewis (24)" | sql_create_context |
CREATE TABLE university (
School_ID int,
School text,
Location text,
Founded real,
Affiliation text,
Enrollment real,
Nickname text,
Primary_conference text
)
CREATE TABLE basketball_match (
Team_ID int,
School_ID int,
Team_Name text,
ACC_Regular_Season text,
ACC_Per... | Give me the comparison about School_ID over the All_Home , and group by attribute ACC_Road, and show bar in asc order. | SELECT All_Home, School_ID FROM basketball_match GROUP BY ACC_Road, All_Home ORDER BY All_Home | nvbench |
CREATE TABLE table_name_48 (
crowd INTEGER,
home_team VARCHAR
) | What is the largest crowd for North Melbourne home games? | SELECT MAX(crowd) FROM table_name_48 WHERE home_team = "north melbourne" | sql_create_context |
CREATE TABLE table_204_906 (
id number,
"#" number,
"title" text,
"songwriters" text,
"producer(s)" text,
"performer" text
) | what is the number of songs produced by k def on the album ? | SELECT COUNT(*) FROM table_204_906 WHERE "songwriters" = 'k-def' | squall |
CREATE TABLE table_name_99 (
date VARCHAR,
result VARCHAR,
score VARCHAR
) | What is the Date with a Result of 8 2, and a Score with 6 2? | SELECT date FROM table_name_99 WHERE result = "8–2" AND score = "6–2" | sql_create_context |
CREATE TABLE table_43834 (
"Date" text,
"Opponent" text,
"Site" text,
"Result" text,
"Attendance" text
) | Who was the opponent when the attendance was 31,002? | SELECT "Opponent" FROM table_43834 WHERE "Attendance" = '31,002' | wikisql |
CREATE TABLE table_name_62 (
tournament VARCHAR,
semi_finalists VARCHAR
) | Which Tournament has a Semi finalists of martina hingis joannette kruger? | SELECT tournament FROM table_name_62 WHERE semi_finalists = "martina hingis joannette kruger" | sql_create_context |
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
value_points real,
quality_rank int
)
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE technician (
technician_id real,
Nam... | Show different teams of technicians and the number of technicians in each team. Show a pie chart. | SELECT Team, COUNT(*) FROM technician GROUP BY Team | nvbench |
CREATE TABLE table_204_547 (
id number,
"rank" number,
"lane" number,
"name" text,
"nationality" text,
"time" number,
"notes" text
) | how many lanes were there ? | SELECT COUNT("lane") FROM table_204_547 | squall |
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required t... | is there a flight from PHILADELPHIA to OAKLAND with a stop in DALLAS | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND CITY_2.ci... | atis |
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,
... | what is the number of unmarried patients who had white blood cells lab test? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "SINGLE" AND lab.label = "White Blood Cells" | mimicsql_data |
CREATE TABLE table_203_356 (
id number,
"type" text,
"diagonal (mm)" text,
"width (mm)" text,
"height (mm)" text,
"area (mm2)" text,
"stops (area)" number,
"crop factor" text
) | which image frame has the largest crop factor ? | SELECT "type" FROM table_203_356 ORDER BY "crop factor" DESC LIMIT 1 | squall |
CREATE TABLE table_73592 (
"Week" real,
"Date" text,
"Opponent" text,
"Location" text,
"Final Score" text,
"Attendance" real,
"Record" text
) | What is the least value for week? | SELECT MIN("Week") FROM table_73592 | wikisql |
CREATE TABLE table_23603 (
"Title" text,
"Author" text,
"Reader" text,
"Format" text,
"Company" text,
"Release Date" text,
"Notes" text
) | If the title is The Way Through The Woods, what is the release date? | SELECT "Release Date" FROM table_23603 WHERE "Title" = 'The Way Through the Woods' | wikisql |
CREATE TABLE table_name_45 (
incumbent VARCHAR,
district VARCHAR,
first_elected VARCHAR,
party VARCHAR,
results VARCHAR
) | Who is the Incumbent of the Democratic Party at an election after 1992 in the New York 1 District who was Re-elected? | SELECT incumbent FROM table_name_45 WHERE party = "democratic" AND results = "re-elected" AND first_elected > 1992 AND district = "new york 1" | sql_create_context |
CREATE TABLE table_77508 (
"D 49" text,
"D 48" text,
"D 47" text,
"D 46" text,
"D 45" text,
"D 44" text,
"D 43" text,
"D 42" text,
"D 41" text,
"D 40" text
) | I want the D 45 and D 42 of r 22 | SELECT "D 45" FROM table_77508 WHERE "D 42" = 'r 22' | wikisql |
CREATE TABLE table_58550 (
"Tournament" text,
"2009" text,
"2011" text,
"2012" text,
"2013" text
) | Name the 2011 for 2009 being 2r at wimbledon | SELECT "2011" FROM table_58550 WHERE "2009" = '2r' AND "Tournament" = 'wimbledon' | wikisql |
CREATE TABLE table_53535 (
"G\u00fczel\u00e7aml\u0131\u2019nin Kay\u0131p Panteri" text,
"G\u00fczel\u00e7aml\u0131\u2019s Lost Panther" text,
"Collection of Short Stories" text,
"Can Yay\u0131nlar\u0131" text,
"2005" real
) | Which 2005 has a G zel aml s Lost Panther of green fairy? | SELECT "2005" FROM table_53535 WHERE "G\u00fczel\u00e7aml\u0131\u2019s Lost Panther" = 'green fairy' | wikisql |
CREATE TABLE t_kc24 (
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
CASH_PAY number,
CIVIL_SUBSIDY number,
CKC102 number,
CLINIC_ID text,
CLINIC_SLT_DATE time,
COMP_ID text,
COM_ACC_PAY number,
COM_PAY number,
DATA_ID text,
ENT_ACC_PAY number,
ENT_PAY number,
F... | 从2002年9月25日至2014年10月8日之间医疗机构8337353的统筹总金额和总金额是多少钱? | SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '8337353' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-09-25' AND '2014-10-08' | css |
CREATE TABLE table_24648983_1 (
original_air_date VARCHAR,
№ VARCHAR
) | What day did episode number 4 air originally? | SELECT original_air_date FROM table_24648983_1 WHERE № = 4 | sql_create_context |
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE vitalperiodic (
vitalperiod... | in total, count the number of patients who have been prescribed ecotrin until 2103. | SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'ecotrin' AND STRFTIME('%y', medication.drugstarttime) <= '2103') | eicu |
CREATE TABLE table_59776 (
"Player" text,
"Country" text,
"Year(s) won" text,
"Total" real,
"To par" real
) | What is the average total for Dave Stockton? | SELECT AVG("Total") FROM table_59776 WHERE "Player" = 'dave stockton' | wikisql |
CREATE TABLE table_name_4 (
year INTEGER,
chassis VARCHAR,
points VARCHAR
) | When is the latest year that an entrant has toro rosso str1 chassis and under 1 point? | SELECT MAX(year) FROM table_name_4 WHERE chassis = "toro rosso str1" AND points < 1 | sql_create_context |
CREATE TABLE table_7448 (
"Player" text,
"Nationality" text,
"Position" text,
"Years in Orlando" text,
"School/Club Team" text
) | Which Player has a Nationality of united states, a Position of forward, and a School/Club Team of notre dame? | SELECT "Player" FROM table_7448 WHERE "Nationality" = 'united states' AND "Position" = 'forward' AND "School/Club Team" = 'notre dame' | wikisql |
CREATE TABLE table_79978 (
"Country" text,
"Name" text,
"Host" text,
"Channel" text,
"Prize" text,
"First year aired" text
) | What year did Zone Rouge first air? | SELECT "First year aired" FROM table_79978 WHERE "Name" = 'zone rouge' | wikisql |
CREATE TABLE classification (
id int,
msid int,
gid int
)
CREATE TABLE tags (
id int,
msid int,
kid int
)
CREATE TABLE movie (
mid int,
title text,
release_year int,
title_aka text,
budget text
)
CREATE TABLE tv_series (
sid int,
title text,
release_year int,
... | Find the directors of all movies featuring ' Kate Winslet | SELECT director.name FROM actor, cast, directed_by, director, movie WHERE actor.name = 'Kate Winslet' AND cast.aid = actor.aid AND director.did = directed_by.did AND movie.mid = cast.msid AND movie.mid = directed_by.msid | imdb |
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
CREATE ... | As an undergrad , can I take 571 ? | SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 571 | advising |
CREATE TABLE browser (
id number,
name text,
market_share number
)
CREATE TABLE accelerator_compatible_browser (
accelerator_id number,
browser_id number,
compatible_since_year number
)
CREATE TABLE web_client_accelerator (
id number,
name text,
operating_system text,
client te... | What are the name and os of web client accelerators that do not work with only a 'Broadband' type connection? | SELECT name, operating_system FROM web_client_accelerator WHERE connection <> 'Broadband' | spider |
CREATE TABLE table_name_55 (
rate VARCHAR,
year VARCHAR
) | What is the rate of 17 years? | SELECT rate FROM table_name_55 WHERE year = "17 years" | sql_create_context |
CREATE TABLE table_33473 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Who was the home team when Geelong was the away team? | SELECT "Home team" FROM table_33473 WHERE "Away team" = 'geelong' | 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
)
... | how many patients on oral route of drug administration have been diagnosed with unspecified cerebral artery occlusion with cerebral infarction? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Crbl art ocl NOS w infrc" AND prescriptions.route = "ORAL" | mimicsql_data |
CREATE TABLE table_name_53 (
difference VARCHAR,
position VARCHAR
) | What is the goal Difference at Position 5? | SELECT difference FROM table_name_53 WHERE position = 5 | sql_create_context |
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... | the heart rate of patient 10624 was ever less than 75.0 on 09/04/last year? | SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10624)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d... | mimic_iii |
CREATE TABLE table_27273 (
"Pick #" real,
"CFL Team" text,
"Player" text,
"Position" text,
"College" text
) | Name the college for nate binder | SELECT "College" FROM table_27273 WHERE "Player" = 'Nate Binder' | wikisql |
CREATE TABLE list (
classroom VARCHAR
) | Report the number of students in each classroom. | SELECT classroom, COUNT(*) FROM list GROUP BY classroom | sql_create_context |
CREATE TABLE table_name_55 (
finish VARCHAR,
total VARCHAR,
year_s__won VARCHAR
) | Of the 1978 winners, who had finish totals smaller than 292? | SELECT finish FROM table_name_55 WHERE total < 292 AND year_s__won = "1978" | sql_create_context |
CREATE TABLE table_name_65 (
rider VARCHAR,
total VARCHAR,
round_1_points VARCHAR
) | Tell me the rider that had round 1 points of 7.465 and total more than 16.615 | SELECT rider FROM table_name_65 WHERE total > 16.615 AND round_1_points = "7.465" | sql_create_context |
CREATE TABLE table_name_73 (
power VARCHAR,
years VARCHAR
) | What is the power of an engine of 1972? | SELECT power FROM table_name_73 WHERE years = "1972" | sql_create_context |
CREATE TABLE review (
a_id number,
u_id number,
i_id number,
rating number,
rank number
)
CREATE TABLE trust (
source_u_id number,
target_u_id number,
trust number
)
CREATE TABLE useracct (
u_id number,
name text
)
CREATE TABLE item (
i_id number,
title text
) | Find the names of users who did not leave any review. | SELECT name FROM useracct WHERE NOT u_id IN (SELECT u_id FROM review) | spider |
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 ... | 在00年6月14日到2015年5月27日之内名叫沈景辉的患者被开出的所有检验报告单的检验报告单号都有什么? | SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ... | css |
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,... | 在00年8月12日到18年10月18日的这段时间里,做手术的数量排倒数的12个科室的ID和名称是哪些 | SELECT MED_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM t_kc22 WHERE STA_DATE BETWEEN '2000-08-12' AND '2018-10-18' AND MED_INV_ITEM_TYPE = '手术费' GROUP BY MED_ORG_DEPT_CD ORDER BY COUNT(*) LIMIT 12 | css |
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 demographic ... | Calculate the number of patients who have been diagnosed with hypospadias that have a delta lab test status. | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Hypospadias" AND lab.flag = "delta" | mimicsql_data |
CREATE TABLE table_name_33 (
country_territory VARCHAR,
miss_international VARCHAR
) | What country or territory is ma gorzata ro niecka from? | SELECT country_territory FROM table_name_33 WHERE miss_international = "małgorzata rożniecka" | sql_create_context |
CREATE TABLE CLASS (
CLASS_CODE varchar(5),
CRS_CODE varchar(10),
CLASS_SECTION varchar(2),
CLASS_TIME varchar(20),
CLASS_ROOM varchar(8),
PROF_NUM int
)
CREATE TABLE DEPARTMENT (
DEPT_CODE varchar(10),
DEPT_NAME varchar(30),
SCHOOL_CODE varchar(8),
EMP_NUM int,
DEPT_ADDRESS... | What is the gpa of the top 5 students with highest gpa? Show me a pie chart. | SELECT STU_FNAME, STU_GPA FROM STUDENT ORDER BY STU_GPA DESC LIMIT 5 | nvbench |
CREATE TABLE table_5525 (
"Venue" text,
"Home" text,
"Guest" text,
"Score" text,
"Attendance" real
) | Who was the guest when attendance was 3? | SELECT "Guest" FROM table_5525 WHERE "Attendance" = '3' | wikisql |
CREATE TABLE table_33036 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | Which home team corresponds to an away team score of 5.10 (40)? | SELECT "Home team" FROM table_33036 WHERE "Away team score" = '5.10 (40)' | wikisql |
CREATE TABLE table_28156 (
"Graphics" text,
"Launch" real,
"Market" text,
"CPU" text,
"Code name" text,
"Device ID" real,
"Core clock ( MHz )" text,
"Execution units" real,
"Shader model" text,
"DirectX" text,
"OpenGL" text,
"OpenCL" text,
"Memory bandwidth ( GB/s )" ... | How many opengl have the ironlake ( clarkdale ) code name? | SELECT COUNT("OpenGL") FROM table_28156 WHERE "Code name" = 'Ironlake ( Clarkdale )' | wikisql |
CREATE TABLE table_2668336_19 (
incumbent VARCHAR,
result VARCHAR,
first_elected VARCHAR
) | Who were the incumbent(s) when the result was a retired democratic-republican hold and the first elected representative was in 1816> | SELECT incumbent FROM table_2668336_19 WHERE result = "Retired Democratic-Republican hold" AND first_elected = "1816" | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
... | provide the number of patients whose religion is protestant quaker and procedure short title is int insert 1-cham, rate? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.religion = "PROTESTANT QUAKER" AND procedures.short_title = "Int insert 1-cham, rate" | mimicsql_data |
CREATE TABLE table_43788 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
) | Name the No. 5 which has a No. 6 of ethan, and a No. 4 of william, and a No. 9 of john? | SELECT "No. 5" FROM table_43788 WHERE "No. 6" = 'ethan' AND "No. 4" = 'william' AND "No. 9" = 'john' | wikisql |
CREATE TABLE Ref_Budget_Codes (
Budget_Type_Code CHAR(15),
Budget_Type_Description VARCHAR(255)
)
CREATE TABLE Documents (
Document_ID INTEGER,
Document_Type_Code CHAR(15),
Project_ID INTEGER,
Document_Date DATETIME,
Document_Name VARCHAR(255),
Document_Description VARCHAR(255),
Oth... | How many documents for each document type description? Visualize by a bar chart, and could you show Y-axis from high to low order? | SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types AS T1 JOIN Documents AS T2 ON T1.Document_Type_Code = T2.Document_Type_Code GROUP BY Document_Type_Description ORDER BY COUNT(Document_Type_Description) DESC | nvbench |
CREATE TABLE table_name_9 (
pick__number INTEGER,
rd__number INTEGER
) | Which Pick # is the highest and has the Rd # is under 1? | SELECT MAX(pick__number) FROM table_name_9 WHERE rd__number < 1 | sql_create_context |
CREATE TABLE table_13148 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real,
"Money ( $ )" text
) | Which player has $450 and a score of 76-74-74-72=296? | SELECT "Player" FROM table_13148 WHERE "Money ( $ )" = '450' AND "Score" = '76-74-74-72=296' | wikisql |
CREATE TABLE table_name_56 (
away_team VARCHAR
) | What was the score for Hawthorn when they were the away team? | SELECT away_team AS score FROM table_name_56 WHERE away_team = "hawthorn" | sql_create_context |
CREATE TABLE table_name_78 (
record VARCHAR,
opponent VARCHAR
) | What is Record, when Opponent is San Francisco Warriors? | SELECT record FROM table_name_78 WHERE opponent = "san francisco warriors" | sql_create_context |
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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 t... | let me know the long title of diagnoses for patient with patient id 21796. | SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.subject_id = "21796" | mimicsql_data |
CREATE TABLE table_25808 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
) | What was the location and it's attendance when the Bobcats played against Washington? | SELECT "Location Attendance" FROM table_25808 WHERE "Team" = 'Washington' | wikisql |
CREATE TABLE table_55707 (
"Race" text,
"Date" text,
"Location" text,
"Pole Position" text,
"Fastest Lap" text,
"Race Winner" text,
"Constructor" text,
"Report" text
) | Which Report includes Monaco? | SELECT "Report" FROM table_55707 WHERE "Location" = 'monaco' | wikisql |
CREATE TABLE table_12079 (
"Round" text,
"Pick" text,
"Position" text,
"Team" text,
"College" text
) | What was the pick for the game at the College of Kentucky with the team Washington Capitols? | SELECT "Pick" FROM table_12079 WHERE "College" = 'kentucky' AND "Team" = 'washington capitols' | wikisql |
CREATE TABLE table_203_6 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
) | what were the number of times san marino was an opponent ? | SELECT COUNT(*) FROM table_203_6 WHERE "opponent" = 'san marino' | squall |
CREATE TABLE table_name_3 (
wins INTEGER,
cuts_made VARCHAR,
events VARCHAR
) | What is the total of wins when the cuts made is 76 and the events greater than 115? | SELECT SUM(wins) FROM table_name_3 WHERE cuts_made = 76 AND events > 115 | sql_create_context |
CREATE TABLE table_name_18 (
driver VARCHAR,
laps VARCHAR
) | Tell me the driver for 58 laps | SELECT driver FROM table_name_18 WHERE laps = 58 | sql_create_context |
CREATE TABLE table_1807 (
"No. in series" real,
"No. in season" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Prod. code" text,
"Viewers (millions)" text
) | What's the series number of the episode originally viewed by 4.1 million people and written by Douglas Lieblein? | SELECT "No. in series" FROM table_1807 WHERE "Viewers (millions)" = '4.1' AND "Written by" = 'Douglas Lieblein' | wikisql |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,... | 列一下患者94975740在0156079这家医院住院的时候的记录,要其中入院科室名字含有重症的 | SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb... | css |
CREATE TABLE table_76937 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" real
) | What is Anders Forsbrand's Place? | SELECT "Place" FROM table_76937 WHERE "Player" = 'anders forsbrand' | wikisql |
CREATE TABLE table_name_54 (
record VARCHAR,
loss VARCHAR
) | Loss of kendrick (11 8) had what record? | SELECT record FROM table_name_54 WHERE loss = "kendrick (11–8)" | sql_create_context |
CREATE TABLE table_39138 (
"Nation" text,
"Skip" text,
"Third" text,
"Second" text,
"Lead" text
) | Which Second has a Third of athanassios pantios? | SELECT "Second" FROM table_39138 WHERE "Third" = 'athanassios pantios' | wikisql |
CREATE TABLE table_67784 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Game site" text,
"Record" text,
"Attendance" real
) | Name the result for arrowhead stadium | SELECT "Result" FROM table_67784 WHERE "Game site" = 'arrowhead stadium' | wikisql |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score num... | This query gets a list of user links who have at least 5 Posts with a score of -5 or lower ordered by the amount of Posts that meet the above criteria.. This query gets a list of user links who have at least 5 Posts with a score of -5 or lower ordered by the amount of Posts that meet the above criteria. | SELECT CONCAT('http://stackoverflow.com/users/', p.OwnerUserId) AS "User Link", COUNT(p.Id) AS PostCount FROM Posts AS p JOIN PostTypes AS pt ON pt.Id = p.PostTypeId WHERE p.Score < -5 AND pt.Name IN ('Answer', 'Question') AND NOT p.OwnerUserId IS NULL GROUP BY p.OwnerUserId HAVING COUNT(p.Id) > 5 ORDER BY PostCount DE... | sede |
CREATE TABLE table_78696 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text
) | The player for which country had a score of 66-72=138? | SELECT "Country" FROM table_78696 WHERE "Score" = '66-72=138' | wikisql |
CREATE TABLE table_28309 (
"Rank" real,
"Player" text,
"Year" real,
"Opponent" text,
"Passing yards" real,
"Rushing yards" real,
"Total offense" real
) | Who was the opponent when there was 117 rushing yards? | SELECT "Opponent" FROM table_28309 WHERE "Rushing yards" = '117' | wikisql |
CREATE TABLE icustays (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
... | how much was the total intake of d5ns patient 12775 had received today? | SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12775)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TAB... | since 2101 what were the top three most common procedures that patients received during the same hospital encounter after getting a antiemetic - anticholinergic? | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, 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 = 'antie... | eicu |
CREATE TABLE table_53581 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
) | What was the venue when the away team was Hawthorn? | SELECT "Venue" FROM table_53581 WHERE "Away team" = 'hawthorn' | wikisql |
CREATE TABLE table_54555 (
"Rd #" real,
"Pick #" real,
"Player" text,
"Team (League)" text,
"Reg GP" real,
"Pl GP" real
) | What is the average PI GP when the pick is smaller tha 70 and the reg GP is 97? | SELECT AVG("Pl GP") FROM table_54555 WHERE "Reg GP" = '97' AND "Pick #" < '70' | wikisql |
CREATE TABLE table_name_14 (
year VARCHAR,
artist VARCHAR
) | what year did david whitfield win | SELECT year FROM table_name_14 WHERE artist = "david whitfield" | sql_create_context |
CREATE TABLE table_26347 (
"equation:" text,
"k_{\\mathrm{H,pc}} = \\frac{p}{c_\\mathrm{aq}}" text,
"k_{\\mathrm{H,cp}} = \\frac{c_\\mathrm{aq}}{p}" text,
"k_{\\mathrm{H,px}} = \\frac{p}{x}" text,
"k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" text
) | What was the '{\mathrm{h,cc}} = \frac{c_{\mathrm{aq}}}{c_{\mathrm{gas}}}' if '_{\mathrm{h,cp}} = \frac{c_\mathrm{aq}}{p}' is 7.8 10 4? | SELECT "k_{\\mathrm{H,cc}} = \\frac{c_{\\mathrm{aq}}}{c_{\\mathrm{gas}}}" FROM table_26347 WHERE "k_{\\mathrm{H,cp}} = \\frac{c_\\mathrm{aq}}{p}" = '7.8 × 10−4' | wikisql |
CREATE TABLE table_name_74 (
pl_g VARCHAR,
player VARCHAR,
fa_yc VARCHAR,
cl_g VARCHAR,
cl_apps VARCHAR
) | What is the total PL G of player pennant, who has less than 7 CL G, less than 7 CL apps, and a FA YC of 0? | SELECT COUNT(pl_g) FROM table_name_74 WHERE cl_g < 7 AND cl_apps < 7 AND fa_yc = 0 AND player = "pennant" | 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... | 在多少次的医疗记录里面记录了患者吕格菲使用了均价不足2770.51元的药物?当时就诊的编号都是多少? | SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '吕格菲' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 2770.51) | css |
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_items (
row_id number,
itemid ... | since 5 years ago has ciprofloxacin hcl, senna or d5 1/2ns been prescribed for patient 3929? | SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3929) AND prescriptions.drug IN ('ciprofloxacin hcl', 'senna', 'd5 1/2ns') AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-5 year') | mimic_iii |
CREATE TABLE table_name_42 (
matches INTEGER,
goals INTEGER
) | What is the lowest match for goals larger than 36? | SELECT MIN(matches) FROM table_name_42 WHERE goals > 36 | sql_create_context |
CREATE TABLE table_78407 (
"Driver" text,
"Constructor" text,
"Laps" real,
"Time/Retired" text,
"Grid" real
) | What constructor has under 62 laps, a Time/Retired of gearbox, a Grid larger than 1, and pedro diniz driving? | SELECT "Constructor" FROM table_78407 WHERE "Laps" < '62' AND "Time/Retired" = 'gearbox' AND "Grid" > '1' AND "Driver" = 'pedro diniz' | wikisql |
CREATE TABLE table_name_47 (
decile INTEGER,
area VARCHAR,
authority VARCHAR,
roll VARCHAR,
gender VARCHAR
) | What is the largest decile with a Roll larger than 34, a Gender of coed, and an Authority of state integrated, and an Area of georgetown? | SELECT MAX(decile) FROM table_name_47 WHERE roll > 34 AND gender = "coed" AND authority = "state integrated" AND area = "georgetown" | sql_create_context |
CREATE TABLE country (
Country_ID int,
Name text,
Population int,
Area int,
Languages text
)
CREATE TABLE roller_coaster (
Roller_Coaster_ID int,
Name text,
Park text,
Country_ID int,
Length real,
Height real,
Speed text,
Opened text,
Status text
) | Show the names of countries and the average speed of roller coasters from each country Plot them as bar chart, and sort in asc by the bars. | SELECT T1.Name, AVG(T2.Speed) FROM country AS T1 JOIN roller_coaster AS T2 ON T1.Country_ID = T2.Country_ID GROUP BY T1.Name ORDER BY T1.Name | nvbench |
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... | give me the number of patients whose primary disease is aortic valve insuffiency\aortic valve replacement /sda and lab test category is hematology? | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "AORTIC VALVE INSUFFIENCY\AORTIC VALVE REPLACEMENT /SDA" AND lab."CATEGORY" = "Hematology" | mimicsql_data |
CREATE TABLE Events (
Event_ID INTEGER,
Service_ID INTEGER,
Event_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15)
)
CREATE TABLE Participants_in_Events (
Event_ID INTEGER,
Participant_ID INTEGER
)
CREATE TABLE Participants (
Participant_ID... | Bar chart x axis participant type code y axis the number of participant type code, and sort in ascending by the x axis. | SELECT Participant_Type_Code, COUNT(Participant_Type_Code) FROM Participants GROUP BY Participant_Type_Code ORDER BY Participant_Type_Code | nvbench |
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
... | 从二0一六年十二月八日到二0二0年十二月二十九日,患者79918177的所有检验结果指标记录中的检测方法共有多少种,给全部列出来 | SELECT jyjgzbb.JCFF FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH W... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.