instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE Allergy_type ( allergytype VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all allergy types.
SELECT DISTINCT allergytype FROM Allergy_type
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '14145059782' AND SOC_SRT_DIRE_NM LIKE '%蜜炼%'
css
CREATE TABLE gyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT COUNT(*) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4416475' AND qtb.IN_HOSP_DATE BETWEEN '2016-12-19' AND '2021-05-31' AND qtb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4416475' AND gyb.IN_HOSP_DATE BETWEEN '2016-12-19' AND '2021-05-31' AND gyb.INSU_TYPE = '儿童' UNION SELECT COUNT(*) ...
css
CREATE TABLE budget ( school_id number, year number, budgeted number, total_budget_percent_budgeted number, invested number, total_budget_percent_invested number, budget_invested_percent text ) CREATE TABLE school ( school_id text, school_name text, location text, mascot tex...
SELECT T2.school_name FROM budget AS T1 JOIN school AS T2 ON T1.school_id = T2.school_id JOIN endowment AS T3 ON T2.school_id = T3.school_id GROUP BY T2.school_name HAVING SUM(T1.budgeted) > 100 OR SUM(T3.amount) > 10
spider
CREATE TABLE table_204_596 ( id number, "year" number, "winners" text, "score" text, "runners up" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which team came in as runners up the most often between 1950 and 1960
SELECT "runners up" FROM table_204_596 WHERE "year" >= 1950 AND "year" <= 1960 GROUP BY "runners up" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_204_835 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many names are listed ?
SELECT COUNT("name") FROM table_204_835
squall
CREATE TABLE table_name_34 ( tournament VARCHAR, margin_of_victory VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament had a margin of victory of 6 strokes?
SELECT tournament FROM table_name_34 WHERE margin_of_victory = "6 strokes"
sql_create_context
CREATE TABLE checking ( custid number, balance number ) CREATE TABLE savings ( custid number, balance number ) CREATE TABLE accounts ( custid number, name text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name and checking balance of ...
SELECT T2.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T3.balance LIMIT 1
spider
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.drug_type = "BASE" AND lab.label = "Calculated Bicarbonate, Whole Blood"
mimicsql_data
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 jybgb ( BBCJBW text, BBDM tex...
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_54163 ( "Player" text, "No.(s)" text, "Height in Ft." text, "Position" text, "Years for Rockets" text, "School/Club Team/Country" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player had numbers of 20
SELECT "Player" FROM table_54163 WHERE "No.(s)" = '20'
wikisql
CREATE TABLE table_29457 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was ...
SELECT "Date of appointment" FROM table_29457 WHERE "Replaced by" = 'Hugo Broos'
wikisql
CREATE TABLE table_name_55 ( qual VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 1966's Qual rating?
SELECT qual FROM table_name_55 WHERE year = "1966"
sql_create_context
CREATE TABLE table_41260 ( "Rank" real, "Country" text, "Winner" real, "Runner -up" real, "Losing Semi- finalist" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank has a Runner -up smaller than 0?
SELECT MAX("Rank") FROM table_41260 WHERE "Runner -up" < '0'
wikisql
CREATE TABLE table_27030 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What championships were played on clay and the opponent was ...
SELECT "Championship" FROM table_27030 WHERE "Surface" = 'Clay' AND "Opponent" = 'Virginia Ruano Pascual Paola Suárez'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE p...
SELECT MIN(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '022-164523') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y', patient.unitadmittime) >= '2105' GROUP BY STRFTIME('%y', patient.unitadmit...
eicu
CREATE TABLE table_name_18 ( source VARCHAR, cardwell VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What source has a cardwell of 20%?
SELECT source FROM table_name_18 WHERE cardwell = "20%"
sql_create_context
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 COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '9602560' AND jybgb.BGRQ BETWEEN '2004-10-17' AND '2016-06-04' GROUP BY jybgb.KSBM HAVING COUNT(*) > 27) AS T
css
CREATE TABLE table_45418 ( "Race Title" text, "Circuit" text, "City / State" text, "Date" text, "Winner" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the race title when the winner is dick johnson and the circuit is sandow...
SELECT "Race Title" FROM table_45418 WHERE "Winner" = 'dick johnson' AND "Circuit" = 'sandown raceway'
wikisql
CREATE TABLE table_name_19 ( opponent VARCHAR, march VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent's march was 31?
SELECT opponent FROM table_name_19 WHERE march = 31
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...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.expire_flag = "1"
mimicsql_data
CREATE TABLE table_78259 ( "Athlete" text, "Event" text, "Snatch" real, "Clean & Jerk" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What event has a 122.5 snatch rate?
SELECT "Event" FROM table_78259 WHERE "Snatch" = '122.5'
wikisql
CREATE TABLE table_33378 ( "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 average size of the crowd for games...
SELECT AVG("Crowd") FROM table_33378 WHERE "Home team score" = '10.10 (70)'
wikisql
CREATE TABLE table_21284653_1 ( census_division VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the census division for the name Stratford?
SELECT census_division FROM table_21284653_1 WHERE name = "Stratford"
sql_create_context
CREATE TABLE table_name_54 ( score VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for the game against the Golden State Warriors?
SELECT score FROM table_name_54 WHERE opponent = "golden state warriors"
sql_create_context
CREATE TABLE table_33999 ( "Rank" text, "Runs" text, "Player" text, "Opponent" text, "Venue" text, "Season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player was at Albion?
SELECT "Player" FROM table_33999 WHERE "Venue" = 'albion'
wikisql
CREATE TABLE table_43690 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average score of player lee trevino, who has a t8 place?
SELECT AVG("Score") FROM table_43690 WHERE "Place" = 't8' AND "Player" = 'lee trevino'
wikisql
CREATE TABLE purchase ( member_id number, branch_id text, year text, total_pounds number ) CREATE TABLE member ( member_id number, card_number text, name text, hometown text, level number ) CREATE TABLE membership_register_branch ( member_id number, branch_id text, regi...
SELECT open_year FROM branch GROUP BY open_year HAVING COUNT(*) >= 2
spider
CREATE TABLE table_name_20 ( rna_segment__gene_ INTEGER, protein VARCHAR, size___s_base_pair__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest RNA segment having a protein of vp2 and a base pair size over 2690?
SELECT MAX(rna_segment__gene_) FROM table_name_20 WHERE protein = "vp2" AND size___s_base_pair__ > 2690
sql_create_context
CREATE TABLE table_26020 ( "#" real, "Title" text, "Original airdate" text, "Timeslot" text, "Viewers (millions)" text, "Nightly rank" real, "Weekly rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did 'Man in the Machine' originall...
SELECT "Original airdate" FROM table_26020 WHERE "Title" = 'Man in the Machine'
wikisql
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT * FROM Posts WHERE NOT ClosedDate IS NULL ORDER BY ClosedDate DESC
sede
CREATE TABLE table_68014 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Gold Coast has a Perth of no, a Sydney of yes, and an Auckland of yes?
SELECT "Gold Coast" FROM table_68014 WHERE "Perth" = 'no' AND "Sydney" = 'yes' AND "Auckland" = 'yes'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE diagnoses_icd ( ...
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 = 25869)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) >= '2101-01-03'
mimic_iii
CREATE TABLE table_7446 ( "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 Position has a Difference of 5, and a Draw...
SELECT MIN("Position") FROM table_7446 WHERE "Difference" = '5' AND "Drawn" < '3'
wikisql
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '11758190455'
css
CREATE TABLE table_26912 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was drafted by the calgary stampeders?
SELECT "Player" FROM table_26912 WHERE "CFL Team" = 'Calgary Stampeders'
wikisql
CREATE TABLE products ( code number, name text, price number, manufacturer number ) CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Select...
SELECT code, name, MIN(price) FROM products GROUP BY name
spider
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT COUNT(a.Id) AS "total_answers", SUM(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) AS "accepted_answers", ROUND(SUM(CASE q.AcceptedAnswerId WHEN a.Id THEN 1 ELSE 0 END) * 100.0 / COUNT(a.Id), 1) AS "percentage_accepted" FROM Posts AS a JOIN Posts AS q ON a.ParentId = q.Id WHERE a.OwnerUserId = 11742502 AND...
sede
CREATE TABLE table_35335 ( "Date" text, "Round" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponent has final as the round?
SELECT "Opponent" FROM table_35335 WHERE "Round" = 'final'
wikisql
CREATE TABLE table_17785 ( "Day" text, "Sunday Surya (the Sun)" text, "Monday Soma (the Moon)" text, "Tuesday Mangala (Mars)" text, "Wednesday Budha (Mercury)" text, "Thursday Guru (Jupiter)" text, "Friday Shukra (Venus)" text, "Saturday Shani (Saturn)" text ) -- Using valid SQLite, an...
SELECT "Tuesday Mangala (Mars)" FROM table_17785 WHERE "Saturday Shani (Saturn)" = 'සෙනසුරාදා Senasuraadaa'
wikisql
CREATE TABLE table_name_43 ( total INTEGER, bronze VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest total medals won by a nation that had 7 bronze but more than 12 silver medals?
SELECT MAX(total) FROM table_name_43 WHERE bronze = 7 AND silver > 12
sql_create_context
CREATE TABLE table_60747 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the position of the event held in Valencia, Spain?
SELECT "Position" FROM table_60747 WHERE "Venue" = 'valencia, spain'
wikisql
CREATE TABLE table_10716893_3 ( lap_by_lap VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who does the lap-by-lap in 2011?
SELECT lap_by_lap FROM table_10716893_3 WHERE year = 2011
sql_create_context
CREATE TABLE song ( artist_name VARCHAR, releasedate VARCHAR ) CREATE TABLE artist ( artist_name VARCHAR, gender VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the name and gender for all artists who released songs in March.
SELECT T1.artist_name, T1.gender FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name WHERE T2.releasedate LIKE "%Mar%"
sql_create_context
CREATE TABLE table_16299 ( "Season" text, "Series" text, "Team Name" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" text, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is t...
SELECT MAX("Wins") FROM table_16299 WHERE "Series" = 'Japanese Formula Three'
wikisql
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, ...
SELECT patients.dob FROM patients WHERE patients.subject_id = 88409
mimic_iii
CREATE TABLE table_67042 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did Ku Hyo-Jin rank?
SELECT COUNT("Rank") FROM table_67042 WHERE "Name" = 'ku hyo-jin'
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2121" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_1705 ( "Episode #" real, "Title" text, "Director" text, "Screenwriter" text, "Original airdate" text, "English airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the numbers of episodes that were broadcast on Sep...
SELECT "Episode #" FROM table_1705 WHERE "Original airdate" = 'September 1, 2003'
wikisql
CREATE TABLE table_29577 ( "Year" real, "Player" text, "Country" text, "Score" text, "To par" text, "Margin of victory" text, "Course" text, "Location" text, "Purse ( $ )" real, "Winners share ($)" real ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Margin of victory" FROM table_29577 WHERE "Location" = 'Lake Forest, Illinois'
wikisql
CREATE TABLE table_204_717 ( id number, "season" text, "level" number, "division" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which season came in last place ?
SELECT "season" FROM table_204_717 ORDER BY "place" DESC LIMIT 1
squall
CREATE TABLE music_festival ( id number, music_festival text, date_of_ceremony text, category text, volume number, result text ) CREATE TABLE artist ( artist_id number, artist text, age number, famous_title text, famous_release_date text ) CREATE TABLE volume ( volume_i...
SELECT famous_title, age FROM artist ORDER BY age DESC
spider
CREATE TABLE table_203_358 ( id number, "pos." number, "athlete" text, "run 1" number, "run 2" number, "total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which athlete took first place ?
SELECT "athlete" FROM table_203_358 WHERE "pos." = 1
squall
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE comment_instructor ( instructor_id int...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.start_time > '15:45' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester...
advising
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '01949589' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2005-03-23' AND '2014-10-28' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE table_29048 ( "Date" text, "Time" text, "Visiting team" text, "Home team" text, "Site" text, "Broadcast" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the home team in the game broa...
SELECT "Home team" FROM table_29048 WHERE "Broadcast" = 'Big East Network'
wikisql
CREATE TABLE table_name_30 ( tv_time VARCHAR, home_team VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the TV time for the road game against Phoenix where the score was 98-99?
SELECT tv_time FROM table_name_30 WHERE home_team = "phoenix" AND result = "98-99"
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '魏烨磊' AND MED_SER_ORG_NO = '6998667' AND NOT OUT_DIAG_DIS_NM LIKE '%楔状缺损%'
css
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_...
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE ((CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.cit...
atis
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 DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'bun')
eicu
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime ti...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 19412) AND DATETIME(prescriptions.startdate, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') EXCEPT SELECT prescriptions.drug FROM prescriptions WHERE...
mimic_iii
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number...
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, 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 - dopamine >15 micrograms/k...
eicu
CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT wdmzjzjlb.SG, wdmzjzjlb.TZ FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '38161352' UNION SELECT bdmzjzjlb.SG, bdmzjzjlb.TZ FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzj...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'C26.768' AND jyjgzbb.JCZBDM = '680382' UNION SELECT jyjgzbb.CKZF...
css
CREATE TABLE table_51399 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" real, "Club/province" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of birth of Henry Qiodravu?
SELECT "Date of Birth (Age)" FROM table_51399 WHERE "Player" = 'henry qiodravu'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
SELECT AVG(lab.labresult) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '003-29149')) AND lab.labname = 'ph' AND STRFTIME('%y-%m', lab.labresulttime) = '21...
eicu
CREATE TABLE table_name_94 ( party VARCHAR, votes_cast VARCHAR, seats_won VARCHAR, percent_of_seats VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which party won less than 21 seats, has 0 percent of seats, and 69757 votes cast?
SELECT party FROM table_name_94 WHERE seats_won < 21 AND percent_of_seats = 0 AND votes_cast = 69757
sql_create_context
CREATE TABLE table_name_30 ( method VARCHAR, result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the method when the result is loss on january 19, 2008?
SELECT method FROM table_name_30 WHERE result = "loss" AND date = "january 19, 2008"
sql_create_context
CREATE TABLE table_name_67 ( color_code__with_fusible_link_ VARCHAR, temperature_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the color code with a temperature classification of ordinary?
SELECT color_code__with_fusible_link_ FROM table_name_67 WHERE temperature_classification = "ordinary"
sql_create_context
CREATE TABLE table_name_79 ( finish VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Australia s finish?
SELECT finish FROM table_name_79 WHERE country = "australia"
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 jyjgzbb ( JYZBLSH text, YLJGD...
SELECT COUNT(*) FROM (SELECT jybgb.KSBM FROM mzjzjlb JOIN jybgb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE mzjzjlb.YLJGDM = '5023348' AND jybgb.BGRQ BETWEEN '2003-04-11' AND '2012-01-23' GROUP BY jybgb.KSBM HAVING COUNT(*) >= 19) AS T
css
CREATE TABLE table_32336 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What circuit did Luigi Villoresi win the Lausanne Grand Prix?
SELECT "Circuit" FROM table_32336 WHERE "Winning driver" = 'luigi villoresi' AND "Name" = 'lausanne grand prix'
wikisql
CREATE TABLE table_18278508_6 ( scores_by_each_individual_judge VARCHAR, main_contestant VARCHAR, date_performed VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the scores by the individual judges for Karanvir Bohra on August 13?
SELECT scores_by_each_individual_judge FROM table_18278508_6 WHERE main_contestant = "Karanvir Bohra" AND date_performed = "August 13"
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 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 WHERE procedures.icd9_code = "3533"
mimicsql_data
CREATE TABLE table_name_67 ( visitor VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which visiting team had a record of 31 31 8?
SELECT visitor FROM table_name_67 WHERE record = "31–31–8"
sql_create_context
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "WHITE - RUSSIAN" AND demographic.diagnosis = "T5 FRACTURE"
mimicsql_data
CREATE TABLE table_49361 ( "Type" text, "Name" text, "Title" text, "Royal house" text, "From" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the title of ahaziah?
SELECT "Title" FROM table_49361 WHERE "Name" = 'ahaziah'
wikisql
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID DESC
nvbench
CREATE TABLE table_45737 ( "Season" text, "Team 1" text, "Score" text, "Team 2" text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Team 2 of Yokohama F. Marinos in the n/a venue had what score?
SELECT "Score" FROM table_45737 WHERE "Venue" = 'n/a' AND "Team 2" = 'yokohama f. marinos'
wikisql
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufac...
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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA' AND fare.round_trip_required = 'NO' AND flight_fare.fare_id =...
atis
CREATE TABLE table_76140 ( "Title" text, "Season" text, "Winner" text, "Score" text, "Runner-up" text, "Venue" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was the winner when the runner-up shows both teams awa...
SELECT "Winner" FROM table_76140 WHERE "Runner-up" = 'both teams awarded championship after a draw.'
wikisql
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text...
SELECT COUNT(*) > 0 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83062) AND prescriptions.drug = 'cyanocobalamin' AND STRFTIME('%y', prescriptions.startdate) = '2105'
mimic_iii
CREATE TABLE table_30120761_1 ( area__acres__ VARCHAR, civil_parish VARCHAR, townland VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the acreage of the Maghereen in the civil parish of Macroom?
SELECT COUNT(area__acres__) FROM table_30120761_1 WHERE civil_parish = "Macroom" AND townland = "Maghereen"
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT CASE WHEN days >= 5 THEN 'Yes' ELSE CONCAT(days, '/', 5) END AS Curious, CASE WHEN days >= 30 THEN 'Yes' ELSE CONCAT(days, '/', 30) END AS Inquisitive, CASE WHEN days >= 100 THEN 'Yes' ELSE CONCAT(days, '/', 100) END AS Socratic FROM (SELECT COUNT(*) AS days FROM (SELECT DATEDIFF(d, CreationDate, GETDATE()) AS c...
sede
CREATE TABLE table_name_30 ( pick__number VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of picks for Calgary College?
SELECT COUNT(pick__number) FROM table_name_30 WHERE college = "calgary"
sql_create_context
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE T...
SELECT COUNT(*) FROM Users WHERE (Reputation >= 15000) AND (Reputation <= 75000)
sede
CREATE TABLE fgwyjzb ( 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 COUNT(*) FROM gwyjzb WHERE gwyjzb.PERSON_ID = '62013127' AND gwyjzb.IN_HOSP_DATE BETWEEN '2000-03-07' AND '2015-06-01' AND gwyjzb.CLINIC_TYPE = '住院' UNION SELECT COUNT(*) FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '62013127' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2000-03-07' AND '2015-06-01' AND fgwyjzb.CLINIC_TYPE = '住院...
css
CREATE TABLE table_80309 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Rank for a lane smaller than 3 with a nationality of Australia?
SELECT AVG("Rank") FROM table_80309 WHERE "Lane" < '3' AND "Nationality" = 'australia'
wikisql
CREATE TABLE table_203_837 ( id number, "rank" number, "name" text, "height\nft / m" text, "floors" number, "year" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the tallest building in columbus ?
SELECT "name" FROM table_203_837 ORDER BY "height\nft / m" DESC LIMIT 1
squall
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 diagnoses ( ...
SELECT demographic.age, demographic.days_stay FROM demographic WHERE demographic.subject_id = "23602"
mimicsql_data
CREATE TABLE table_69993 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is listed as the Visitor that has a Home of Boston Bruins and a Date of November 15?
SELECT "Visitor" FROM table_69993 WHERE "Home" = 'boston bruins' AND "Date" = 'november 15'
wikisql
CREATE TABLE table_35483 ( "Call sign" text, "Frequency MHz" text, "City of license" text, "ERP W" real, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ERP W has a Frequency MHz of 89.3 fm?
SELECT MAX("ERP W") FROM table_35483 WHERE "Frequency MHz" = '89.3 fm'
wikisql
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE Votes ( Id number, PostId number, ...
SELECT PostId AS "post_link", Comments.Id AS "comment_link", Comments.Score, Comments.Text FROM Comments INNER JOIN Posts ON Posts.Id = Comments.PostId WHERE UserId = @UserId ORDER BY Comments.Score DESC
sede
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), ...
SELECT LName, Age FROM Student WHERE StuID IN (SELECT StuID FROM Has_Allergy WHERE Allergy = "Milk" INTERSECT SELECT StuID FROM Has_Allergy WHERE Allergy = "Cat")
nvbench
CREATE TABLE tags ( index number, id number, tag text ) CREATE TABLE torrents ( groupname text, totalsnatched number, artist text, groupyear number, releasetype text, groupid number, id number ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT groupname FROM torrents WHERE releasetype = "album" ORDER BY totalsnatched DESC LIMIT 10
whatcdhiphop
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "SNF" AND procedures.long_title = "Injection or infusion of oxazolidinone class of antibiotics"
mimicsql_data
CREATE TABLE table_204_738 ( id number, "season" number, "level" text, "division" text, "section" text, "position" text, "movements" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in which years did they finish at least 3rd ?
SELECT "season" FROM table_204_738 WHERE "position" <= 3
squall
CREATE TABLE table_35883 ( "Year" real, "Chassis" text, "Engine" text, "Start" real, "Finish" real, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average finish that has a start greater than 3, with honda as the engine, and 2...
SELECT AVG("Finish") FROM table_35883 WHERE "Start" > '3' AND "Engine" = 'honda' AND "Year" = '2011'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, las...
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 = 59728) AND STRFTIME('%y-%m', prescriptions.startdate) <= '2101-04' GROUP BY prescriptions.drug) AS t1 WHERE t1.c...
mimic_iii
CREATE TABLE table_25214321_1 ( contestants INTEGER, runner_up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many contestants were there when the runner-up was S rgio Abreu?
SELECT MAX(contestants) FROM table_25214321_1 WHERE runner_up = "Sérgio Abreu"
sql_create_context