instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_39 ( date VARCHAR, score VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Score of 3 4, and a Attendance larger than 34,609 happened on what date?
SELECT date FROM table_name_39 WHERE score = "3–4" AND attendance > 34 OFFSET 609
sql_create_context
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 advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget nu...
SELECT building, AVG(capacity) FROM classroom GROUP BY building ORDER BY building DESC
nvbench
CREATE TABLE table_76205 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Format has the Region of Europe and a Catalog of 74321 45851 2?
SELECT "Format" FROM table_76205 WHERE "Region" = 'europe' AND "Catalog" = '74321 45851 2'
wikisql
CREATE TABLE txmzjzjlb ( 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 AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM txmzjzjlb JOIN jybgb JOIN jyjgzbb ON txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE txmzjzjlb.JZZDBM = 'A48.710' AND jyjgzbb.JCZBMC = '...
css
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 patient ( ...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'sepsis' AND STR...
eicu
CREATE TABLE table_dev_4 ( "id" int, "hypothyroidism" bool, "serum_bicarbonate" int, "c_peptide_level" float, "autoimmune_disease" bool, "hemoglobin_a1c_hba1c" float, "positive_serum" bool, "inhaled_steroids" bool, "diabetic_ketoacidosis" bool, "creatinine_clearance_cl" float, ...
SELECT * FROM table_dev_4 WHERE admission_blood_glucose > 140 AND admission_blood_glucose < 400 OR (diabetic_ketoacidosis = 0 OR serum_bicarbonate < 18 OR positive_serum = 1 OR urinary_ketones = 1)
criteria2sql
CREATE TABLE table_name_66 ( surface VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What type of surface did Thomaz Bellucci play against tommy robredo?
SELECT surface FROM table_name_66 WHERE opponent = "tommy robredo"
sql_create_context
CREATE TABLE table_37173 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Points for" FROM table_37173 WHERE "Drawn" = '1' AND "Try bonus" = '16'
wikisql
CREATE TABLE table_60025 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the highest number of silver for 9 bronze and less than 27 total?
SELECT MAX("Silver") FROM table_60025 WHERE "Bronze" = '9' AND "Total" < '27'
wikisql
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 IN_DIAG_DIS_CD, IN_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_ID = '77164356' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT > 6696.69)
css
CREATE TABLE table_13256 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest amount of gold for more than 16 silver?
SELECT MIN("Gold") FROM table_13256 WHERE "Silver" > '16'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.dod_year <= "2138.0" AND diagnoses.long_title = "Acute on chronic systolic heart failure"
mimicsql_data
CREATE TABLE table_name_32 ( album VARCHAR, year VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Album had a bigger year than 2005 and whose country was Australia?
SELECT album FROM table_name_32 WHERE year > 2005 AND country = "australia"
sql_create_context
CREATE TABLE table_60794 ( "Battle" text, "Date" text, "Bulgarian Commander" text, "Byzantine Commander" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what Battle was Bulgarian Commander of Gavril Radomir?
SELECT "Battle" FROM table_60794 WHERE "Bulgarian Commander" = 'gavril radomir'
wikisql
CREATE TABLE reservations ( code number, room text, checkin text, checkout text, rate number, lastname text, firstname text, adults number, kids number ) CREATE TABLE rooms ( roomid text, roomname text, beds number, bedtype text, maxoccupancy number, basepric...
SELECT roomname FROM rooms ORDER BY baseprice
spider
CREATE TABLE table_1331313_1 ( department VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the department with incumbent being enrique ona
SELECT department FROM table_1331313_1 WHERE incumbent = "Enrique Ona"
sql_create_context
CREATE TABLE table_name_53 ( away_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team at the game held at Arden Street Oval?
SELECT away_team FROM table_name_53 WHERE venue = "arden street oval"
sql_create_context
CREATE TABLE table_26980923_2 ( total VARCHAR, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total attendance at rugby park?
SELECT total FROM table_26980923_2 WHERE stadium = "Rugby Park"
sql_create_context
CREATE TABLE table_67993 ( "Year" text, "Date Final" text, "Venue" text, "Prize Money" text, "Champion" text, "Runner-up" text, "Score in final" text, "Commercial name" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What prize money has ...
SELECT "Prize Money" FROM table_67993 WHERE "Commercial name" = 'michelob light challenge of champions'
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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '谢颖然' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 6128.49) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '谢颖然' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FR...
css
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 = '4416475' AND IN_HOSP_DATE BETWEEN '2016-12-19' AND '2021-05-31' AND INSU_TYPE = '儿童'
css
CREATE TABLE table_68441 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the total number of matches smaller than 2 with a tally of 1-...
SELECT COUNT("Total") FROM table_68441 WHERE "Tally" = '1-19' AND "Matches" < '2'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.religion = "UNOBTAINABLE"
mimicsql_data
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jybgb.JYKSBM, jybgb.JYKSMC FROM jybgb WHERE jybgb.BGDH = '65530393272'
css
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
SELECT DISTINCT advisory_requirement, enforced_requirement, name FROM course WHERE department = 'EECS' AND number = 628
advising
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_ins...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'ANTHRCUL' AND course.number = 524 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offeri...
advising
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.expire_flag, demographic.discharge_location FROM demographic WHERE demographic.name = "Kurt Buczek"
mimicsql_data
CREATE TABLE table_name_27 ( goal_difference INTEGER, goals_against VARCHAR, draws VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the goal difference sum that has goals against smaller than 33, draws larger than 13?
SELECT SUM(goal_difference) FROM table_name_27 WHERE goals_against < 33 AND draws > 13
sql_create_context
CREATE TABLE checking ( custid VARCHAR ) CREATE TABLE accounts ( name VARCHAR, custid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the number of checking accounts for each account name.
SELECT COUNT(*), T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid GROUP BY T1.name
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...
SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '窦咏歌' AND gwyjzb.MED_SER_ORG_NO = '9078958' AND gwyjzb.IN_DIAG_DIS_NM LIKE '%性%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '窦咏歌' AND fgwyjzb.MED_SER_ORG_NO = '9078958' AND fgwyjzb.IN_DIAG_DIS_NM LIKE '%性%'
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 jyjgzbb ( BGDH text, BGRQ tim...
SELECT jybgb.BGDH FROM hz_info JOIN zzmzjzjlb JOIN jybgb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.RYBH = '54118858' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FRO...
css
CREATE TABLE table_name_68 ( grid INTEGER, constructor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the high grid total for maserati?
SELECT MAX(grid) FROM table_name_68 WHERE constructor = "maserati"
sql_create_context
CREATE TABLE table_49724 ( "Date" text, "Opponent" text, "Result" text, "Score" text, "Record" text, "Location" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result for the game with final record listed as 0-...
SELECT "Result" FROM table_49724 WHERE "Record" = '0-1'
wikisql
CREATE TABLE table_20122 ( "Rd" real, "Race" text, "Pole Position" text, "Fastest Lap" text, "Winning driver" text, "Winning team" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many winners were in round 8
SELECT COUNT("Winning driver") FROM table_20122 WHERE "Rd" = '8'
wikisql
CREATE TABLE table_name_76 ( start VARCHAR, engine VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the start of Offy engine and in 1972?
SELECT start FROM table_name_76 WHERE engine = "offy" AND year = 1972
sql_create_context
CREATE TABLE table_29608 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "First Star" text, "Decision" text, "Location" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wh...
SELECT "Record" FROM table_29608 WHERE "Opponent" = 'Carolina Hurricanes'
wikisql
CREATE TABLE table_43557 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the callsign in Tacloban?
SELECT "Callsign" FROM table_43557 WHERE "Location" = 'tacloban'
wikisql
CREATE TABLE table_14829 ( "Team" text, "Matches" text, "Winner" text, "Lost" text, "No result" text, "Tied" text, "% Won" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the % Won of Team of durham
SELECT "% Won" FROM table_14829 WHERE "Team" = 'durham'
wikisql
CREATE TABLE table_199666_1 ( codename VARCHAR, centrino VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the code name of the wireless LAN with Chief River Centrino?
SELECT codename FROM table_199666_1 WHERE centrino = "Chief River"
sql_create_context
CREATE TABLE table_30054758_3 ( high_rebounds VARCHAR, high_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are there for high rebounds when high points is inge 19?
SELECT COUNT(high_rebounds) FROM table_30054758_3 WHERE high_points = "Inge – 19"
sql_create_context
CREATE TABLE table_name_60 ( lansing__lan_ VARCHAR, kalamazoo__azo_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the passenger fare for Lansing, when the passenger fare for Kalamazoo was $599.39?
SELECT lansing__lan_ FROM table_name_60 WHERE kalamazoo__azo_ = "$599.39"
sql_create_context
CREATE TABLE table_name_54 ( driver VARCHAR, time_retired VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which driver retired from a collision after 41 laps?
SELECT driver FROM table_name_54 WHERE time_retired = "collision" AND laps = "41"
sql_create_context
CREATE TABLE table_train_65 ( "id" int, "intention_to_arterial_catheter" bool, "steroid_therapy" bool, "intention_to_central_venous_catheter" bool, "central_venous_pressure_cvp" int, "receiving_vasopressor" bool, "pulmonary_artery_occlusive_pressure_paop" int, "septic_shock" bool, "a...
SELECT * FROM table_train_65 WHERE pulmonary_artery_occlusive_pressure_paop < 12 OR central_venous_pressure_cvp < 8
criteria2sql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) 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 ...
SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime) <= DATETIME(CURRENT_TIME(), '-4 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 4
mimic_iii
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, ...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TORONTO' AND DAYS_1.day_name =...
atis
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.YLJGDM = '4098597' AND wdmzjzjlb.RYDJSJ BETWEEN '2014-08-10' AND '2021-11-23' AND DATEDIFF(wdmzjzjlb.CYSJ, wdmzjzjlb.RYSJ) > 27 UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.YLJGDM = '4098597' AND bdmzjzjlb.RYDJSJ BETWEEN '2014-08-10' AND '2021-11-23' AND DATEDIFF(b...
css
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(t_kc21.MED_SER_ORG_NO) FROM t_kc21 WHERE t_kc21.PERSON_NM = '苏家欣' AND t_kc21.IN_HOSP_DATE BETWEEN '2000-02-24' AND '2009-04-29'
css
CREATE TABLE table_51856 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home team score when the away team s...
SELECT "Home team score" FROM table_51856 WHERE "Away team score" = '17.18 (120)'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2157" AND diagnoses.icd9_code = "78039"
mimicsql_data
CREATE TABLE table_name_5 ( home VARCHAR, aggregate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the home of 2-3
SELECT home FROM table_name_5 WHERE aggregate = "2-3"
sql_create_context
CREATE TABLE table_27981 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many million ...
SELECT "U.S. viewers (million)" FROM table_27981 WHERE "No. in series" = '6'
wikisql
CREATE TABLE table_4418 ( "Pick" text, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the nationality for pick of 18
SELECT "Nationality" FROM table_4418 WHERE "Pick" = '18'
wikisql
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, ...
SELECT COUNT(*) > 0 FROM course, program_course WHERE course.department = 'ARTDES' AND course.number = 181 AND program_course.category LIKE '%Core%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_train_180 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "systolic_blood_pressure_sbp" int, "hemoglobin_a1c_hba1c" float, "diabetic" string, "post_load_glucose" int, "diastolic_blood_pressure_dbp" int, "impaired_glucose_tolerance" bool, "fasting_gl...
SELECT * FROM table_train_180 WHERE (gender = 'male' AND hemoglobin_a1c_hba1c < 13.5) OR (gender = 'female' AND hemoglobin_a1c_hba1c < 12)
criteria2sql
CREATE TABLE table_27914076_1 ( power_kw VARCHAR, callsign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the power for dymd-fm
SELECT power_kw FROM table_27914076_1 WHERE callsign = "DYMD-FM"
sql_create_context
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) CREATE TABLE flight_stop ( flight_id in...
SELECT DISTINCT ground_service.transport_type FROM airport, airport_service, city, ground_service WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'WESTCHESTER COUNTY' AND ground_service.airport_code = airport.airport_code
atis
CREATE TABLE table_19337 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" text, "2nd (m)" text, "Points" text, "Overall FHT points" text, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st(...
SELECT "1st (m)" FROM table_19337 WHERE "Points" = '272.7'
wikisql
CREATE TABLE table_name_51 ( events INTEGER, top_5 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean number of events when top-5 is 1?
SELECT AVG(events) FROM table_name_51 WHERE top_5 = 1
sql_create_context
CREATE TABLE table_26166836_3 ( road_race VARCHAR, country VARCHAR, month_held VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What race is held in Germany in the month of May?
SELECT road_race FROM table_26166836_3 WHERE country = "Germany" AND month_held = "May"
sql_create_context
CREATE TABLE table_17596418_5 ( age VARCHAR, started VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what ist he total number of ages where the start date is 6 november?
SELECT COUNT(age) FROM table_17596418_5 WHERE started = "6 November"
sql_create_context
CREATE TABLE table_23710609_2 ( romanian__colloquial_ VARCHAR, english VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the colloquial translation of (s)he will sing?
SELECT romanian__colloquial_ FROM table_23710609_2 WHERE english = "(s)he will sing"
sql_create_context
CREATE TABLE table_41103 ( "Year" real, "Winning team" text, "Losing team" text, "Score" text, "Site" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When has a Site of tainan city and a Score of 8 6?
SELECT "Year" FROM table_41103 WHERE "Site" = 'tainan city' AND "Score" = '8–6'
wikisql
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Sex, COUNT(Sex) FROM people GROUP BY Sex ORDER BY COUNT(Sex) DESC
nvbench
CREATE TABLE table_19684 ( "Year" real, "Mens singles" text, "Womens singles" text, "Mens doubles" text, "Womens doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of men's doubles when there was no ...
SELECT "Mixed doubles" FROM table_19684 WHERE "Mens doubles" = 'no competition'
wikisql
CREATE TABLE table_64269 ( "Period" text, "Internet Explorer" text, "Chrome" text, "Firefox" text, "Safari" text, "Opera" text, "Other Mozilla" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What other mozilla has January 2010 as the period?...
SELECT "Other Mozilla" FROM table_64269 WHERE "Period" = 'january 2010'
wikisql
CREATE TABLE table_43027 ( "Nationality" text, "Player" text, "Birth date" text, "Height" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What height is the tallest for an outside hitter?
SELECT MAX("Height") FROM table_43027 WHERE "Position" = 'outside hitter'
wikisql
CREATE TABLE table_name_35 ( laps INTEGER, time_retired VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the most laps with the time/retired is differential and the grid is more than 2?
SELECT MAX(laps) FROM table_name_35 WHERE time_retired = "differential" AND grid > 2
sql_create_context
CREATE TABLE table_32750 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game with an away team s...
SELECT "Date" FROM table_32750 WHERE "Away team score" = '6.12 (48)'
wikisql
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city var...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'DOC' AND course.number = 806 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.of...
advising
CREATE TABLE table_255602_1 ( type VARCHAR, area__km²_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the political types where area is 155.77?
SELECT type FROM table_255602_1 WHERE area__km²_ = "155.77"
sql_create_context
CREATE TABLE table_name_61 ( name VARCHAR, year VARCHAR, floors VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name before 1954 with more than 15 floors?
SELECT name FROM table_name_61 WHERE year < 1954 AND floors > 15
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 96833 AND admissions.dischtime IS NULL)) AND transfers...
mimic_iii
CREATE TABLE table_23756 ( "Condition" text, "Prothrombin time" text, "Partial thromboplastin time" text, "Bleeding time" text, "Platelet count" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the status of bleeding time for thrombocytopenia?...
SELECT "Bleeding time" FROM table_23756 WHERE "Condition" = 'Thrombocytopenia'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '40691396989' GROUP BY jybgb.SHRGH HAVING COUNT(*) > 11
css
CREATE TABLE farm ( Farm_ID int, Year int, Total_Horses real, Working_Horses real, Total_Cattle real, Oxen real, Bulls real, Cows real, Pigs real, Sheep_and_Goats real ) CREATE TABLE competition_record ( Competition_ID int, Farm_ID int, Rank int ) CREATE TABLE farm_...
SELECT Year, COUNT(Year) FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID ORDER BY COUNT(Year) DESC
nvbench
CREATE TABLE table_40133 ( "Office" text, "Republican ticket" text, "Democratic ticket" text, "Socialist Labor ticket" text, "Prohibition ticket" text, "Independent Citizens' ticket" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of Pr...
SELECT "Prohibition ticket" FROM table_40133 WHERE "Office" = 'lieutenant governor'
wikisql
CREATE TABLE table_20971444_3 ( rank__timeslot_ VARCHAR, viewers__millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the rank timeslot for 11.59 viewers
SELECT rank__timeslot_ FROM table_20971444_3 WHERE viewers__millions_ = "11.59"
sql_create_context
CREATE TABLE table_name_60 ( upstream_rate VARCHAR, version VARCHAR, standard_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the upstream rate for Itu g.992.2 with a version of ADSL?
SELECT upstream_rate FROM table_name_60 WHERE version = "adsl" AND standard_name = "itu g.992.2"
sql_create_context
CREATE TABLE table_63316 ( "Rank" real, "Nation" text, "Sport" text, "Years" text, "Games" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What nation scored 7 in shooting in 19...
SELECT "Nation" FROM table_63316 WHERE "Sport" = 'shooting' AND "Total" = '7' AND "Years" = '1920'
wikisql
CREATE TABLE table_65098 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Bonus points" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of lost games whe...
SELECT "Lost" FROM table_65098 WHERE "Drawn" = '2' AND "Bonus points" = '6'
wikisql
CREATE TABLE table_204_301 ( id number, "nationality" text, "name" text, "term as a deputy judge" text, "reason for termination" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many deputy judges of the permanent court of international justice ha...
SELECT COUNT("name") FROM table_204_301 WHERE "reason for termination" = 'post abolished'
squall
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, ...
SELECT Text FROM Comments WHERE Text LIKE '%\%\%' ESCAPE '\'
sede
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT JYLX FROM jybgb WHERE BGDH = '35125613493'
css
CREATE TABLE table_name_91 ( calendar VARCHAR, image_attachment VARCHAR, wysiwyg_editor VARCHAR, unread_message_tracking VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Calendar has a WYSIWYG Editor of no, and an Unread message tracking of sessi...
SELECT calendar FROM table_name_91 WHERE wysiwyg_editor = "no" AND unread_message_tracking = "session" AND image_attachment = "no"
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insuranc...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE DATETIME(labevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY labevents.itemid) AS t1...
mimic_iii
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN hz_info_mzjzjlb ON hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM A...
css
CREATE TABLE table_name_45 ( event VARCHAR, prize VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Event for the prize of 850,000?
SELECT event FROM table_name_45 WHERE prize = "€850,000"
sql_create_context
CREATE TABLE table_78915 ( "Year" real, "Date" text, "Home Team" text, "Result" text, "Visiting Team" text, "Venue" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total attendance at anaheim stadium after 1983 w...
SELECT COUNT("Attendance") FROM table_78915 WHERE "Year" > '1983' AND "Venue" = 'anaheim stadium' AND "Result" = '14-28'
wikisql
CREATE TABLE table_name_60 ( szdsz VARCHAR, jobbik VARCHAR, fidesz VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the SZDSZ percentage with a Jobbik of 5% and a Fidesz of 68%?
SELECT szdsz FROM table_name_60 WHERE jobbik = "5%" AND fidesz = "68%"
sql_create_context
CREATE TABLE airport ( Airport_ID int, Airport_Name text, Total_Passengers real, %_Change_2007 text, International_Passengers real, Domestic_Passengers real, Transit_Passengers real, Aircraft_Movements real, Freight_Metric_Tonnes real ) CREATE TABLE match ( Round real, Locat...
SELECT Aircraft, COUNT(*) FROM aircraft AS T1 JOIN match AS T2 ON T1.Aircraft_ID = T2.Winning_Aircraft GROUP BY T2.Winning_Aircraft
nvbench
CREATE TABLE table_65963 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Call Sign of the Frequency by Owner CKUA Radio Foundation?
SELECT "Call sign" FROM table_65963 WHERE "Owner" = 'ckua radio foundation'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, ...
SELECT MZBMLX, MZZDBM, MZZDMC FROM zyjzjlb WHERE JZLSH = '94773706571'
css
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT JYKSBM, JYKSMC FROM jybgb WHERE BGDH = '19815716663'
css
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 demographic.days_stay, demographic.admittime FROM demographic WHERE demographic.subject_id = "4333"
mimicsql_data
CREATE TABLE table_30642 ( "Team" text, "Average" text, "Points" real, "Played" real, "2003-04" text, "2004-05" text, "2005-06" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many averages are associated with a 2003-2004 value of 62/38?
SELECT COUNT("Average") FROM table_30642 WHERE "2003-04" = '62/38'
wikisql
CREATE TABLE table_name_29 ( date VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game that had a loss of Reed (0 2)?
SELECT date FROM table_name_29 WHERE loss = "reed (0–2)"
sql_create_context
CREATE TABLE table_name_96 ( res VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the match with Jeff Monson as opponent?
SELECT res FROM table_name_96 WHERE opponent = "jeff monson"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT Team_Name, All_Games_Percent FROM basketball_match ORDER BY All_Games_Percent DESC
nvbench
CREATE TABLE table_name_6 ( seating VARCHAR, notes VARCHAR, introduced VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people can be seated on the aircraft that was introduced in 2008 and has notes of in service?
SELECT seating FROM table_name_6 WHERE notes = "in service" AND introduced = 2008
sql_create_context
CREATE TABLE table_25674 ( "Player" text, "RR W-L" text, "Sets W-L" text, "Games W-L" text, "Standings" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are Arthur Ashe's games w-l?
SELECT "Games W-L" FROM table_25674 WHERE "Player" = 'Arthur Ashe'
wikisql