instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_1420 ( "District" text, "Incumbent" text, "Party" text, "Elected" real, "Status" text, "2008 Candidates" text, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many groups of candidates are there in there in th...
SELECT COUNT("2008 Candidates") FROM table_1420 WHERE "Incumbent" = 'Doc Hastings'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(t_kc21.PERSON_ID) FROM t_kc21 WHERE t_kc21.IN_DIAG_DIS_CD = 'T24.305'
css
CREATE TABLE table_69954 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Pts." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What engine has more than 0 pts?
SELECT "Engine" FROM table_69954 WHERE "Pts." > '0'
wikisql
CREATE TABLE table_204_269 ( id number, "week" number, "room" text, "winning couple" text, "2nd couple" text, "3rd couple" text, "chumps" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who became winning couple for the first time in week 6 ?...
SELECT "winning couple" FROM table_204_269 WHERE "week" = 6
squall
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodici...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120575' AND patient.hosp...
eicu
CREATE TABLE table_name_88 ( runners VARCHAR, course VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the runners for longchamp
SELECT runners FROM table_name_88 WHERE course = "longchamp"
sql_create_context
CREATE TABLE table_20172 ( "Locale" text, "Skip" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real, "Shot Pct." real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MAX("PA") FROM table_20172 WHERE "Stolen Ends" = '5'
wikisql
CREATE TABLE table_203_79 ( id number, "year" number, "film" text, "publisher" text, "director" text, "distributor" text, "worldwide gross" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which film made the most worldwide g...
SELECT "film" FROM table_203_79 ORDER BY "worldwide gross" DESC LIMIT 1
squall
CREATE TABLE table_name_27 ( pollutant VARCHAR, regulatory_citation VARCHAR, type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the polluntant when the regulatory citation is 40 cfr 50.7(a) and the type is primary?
SELECT pollutant FROM table_name_27 WHERE regulatory_citation = "40 cfr 50.7(a)" AND type = "primary"
sql_create_context
CREATE TABLE table_2333416_2 ( top_10 VARCHAR, winnings VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many top 10 finishes did Ken Bouchard get in the year he won $17,695?
SELECT top_10 FROM table_2333416_2 WHERE winnings = "$17,695"
sql_create_context
CREATE TABLE table_38599 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "Class" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Frequency MHz of 93.7 has what class?
SELECT "Class" FROM table_38599 WHERE "Frequency MHz" = '93.7'
wikisql
CREATE TABLE table_1331 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is...
SELECT "Record" FROM table_1331 WHERE "Team" = 'New Jersey'
wikisql
CREATE TABLE table_name_43 ( democratic_ticket VARCHAR, liberal_ticket VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name on the Democratic ticket when the Liberal ticket is erastus corning 2nd?
SELECT democratic_ticket FROM table_name_43 WHERE liberal_ticket = "erastus corning 2nd"
sql_create_context
CREATE TABLE table_80011 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which qual has both 200 total laps and took place in 1957?
SELECT "Qual" FROM table_80011 WHERE "Laps" = '200' AND "Year" = '1957'
wikisql
CREATE TABLE table_name_66 ( laps VARCHAR, time_retired VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps for a Time/Retired of tyre, and a Grid larger than 10?
SELECT COUNT(laps) FROM table_name_66 WHERE time_retired = "tyre" AND grid > 10
sql_create_context
CREATE TABLE table_test_17 ( "id" int, "anemia" bool, "left_ventricular_ejection_fraction_lvef" int, "systolic_blood_pressure_sbp" int, "active_infection" bool, "fever" bool, "bradycardia" int, "renal_disease" bool, "oliguria" bool, "creatinine_clearance_cl" float, "left_vent...
SELECT * FROM table_test_17 WHERE bradycardia = 1 OR heart_rate < 60
criteria2sql
CREATE TABLE table_14473 ( "Season" real, "Champion" text, "Count" real, "Runner-up" text, "Third Place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the runner up before 2007?
SELECT "Runner-up" FROM table_14473 WHERE "Season" < '2007'
wikisql
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 wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '孔雅静' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2011-01-2...
css
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number,...
SELECT zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '90549392' AND NOT zyjzjlb.JZLSH IN (SELECT JZLSH FROM jybgb WHERE BGRQ >= '2021-11-01')
css
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.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 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 ROW_NUMBER() OVER (ORDER BY Reputation) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%pakistan%' OR UPPER(Location) LIKE '%PK' ORDER BY Reputation DESC LIMIT 1000
sede
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmenti...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE STRFTIME('%y', diagnosis.diagnosistime) >= '2100' GROUP BY diagnosis.diagnosisname) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE table_27785 ( "Position" real, "Race number" text, "Sail number" text, "Yacht" text, "State/country" text, "Yacht type" text, "LOA (Metres)" text, "Skipper" text, "Elapsed time d:hh:mm:ss" text ) -- Using valid SQLite, answer the following questions for the tables prov...
SELECT "Yacht type" FROM table_27785 WHERE "Yacht" = 'ICAP Leopard'
wikisql
CREATE TABLE Allergy_Type ( Allergy VARCHAR(20), AllergyType 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 Has_Allergy ( StuID INTEGE...
SELECT Major, COUNT(*) FROM Student GROUP BY Major
nvbench
CREATE TABLE table_name_9 ( season VARCHAR, car__number VARCHAR, sponsor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seasons has UPS sponsored a car with a number larger than 17?
SELECT COUNT(season) FROM table_name_9 WHERE car__number > 17 AND sponsor = "ups"
sql_create_context
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, pa...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'sedative agent') AS t1 JOIN (SELECT patient.uniquepid, medication.drugsta...
eicu
CREATE TABLE table_7229 ( "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. -- What is the average Played when the against is 5...
SELECT AVG("Played") FROM table_7229 WHERE "Against" = '51' AND "Drawn" > '1'
wikisql
CREATE TABLE train_station ( train_id number, station_id number ) CREATE TABLE station ( station_id number, name text, annual_entry_exit number, annual_interchanges number, total_passengers number, location text, main_services text, number_of_platforms number ) CREATE TABLE tra...
SELECT T2.name FROM train_station AS T1 JOIN train AS T2 ON T1.train_id = T2.train_id WHERE NOT T1.station_id IN (SELECT T4.station_id FROM train_station AS T3 JOIN station AS T4 ON T3.station_id = T4.station_id WHERE t4.location = "London")
spider
CREATE TABLE table_24305 ( "Episode number" real, "Total episodes" real, "Title" text, "Original UK broadcast by" text, "Original UK airdate" text, "DVD reference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did 'Granny Pig's Chickens' f...
SELECT "Original UK airdate" FROM table_24305 WHERE "Title" = 'Granny Pig''s Chickens'
wikisql
CREATE TABLE table_18955077_1 ( just_ratio VARCHAR, just__cents_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the just cents is 84.46, what is the just ratio?
SELECT just_ratio FROM table_18955077_1 WHERE just__cents_ = "84.46"
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) ...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t1.icd9_code FROM (SELECT diagnoses_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnoses_icd WHERE diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN...
mimic_iii
CREATE TABLE Catalogs ( catalog_id INTEGER, catalog_name VARCHAR(50), catalog_publisher VARCHAR(80), date_of_publication DATETIME, date_of_latest_revision DATETIME ) CREATE TABLE Catalog_Contents ( catalog_entry_id INTEGER, catalog_level_number INTEGER, parent_entry_id INTEGER, prev...
SELECT date_of_publication, COUNT(date_of_publication) FROM Catalogs AS t1 JOIN Catalog_Structure AS t2 ON t1.catalog_id = t2.catalog_id WHERE catalog_level_number > 5 GROUP BY catalog_name ORDER BY COUNT(date_of_publication) DESC
nvbench
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 COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '8159857' AND zyjzjlb.RYDJSJ BETWEEN '2010-08-09' AND '2018-02-21' AND DATEDIFF(zyjzjlb.CYSJ, zyjzjlb.RYSJ) > 26
css
CREATE TABLE Visits ( Visit_ID INTEGER, Tourist_Attraction_ID INTEGER, Tourist_ID INTEGER, Visit_Date DATETIME, Visit_Details VARCHAR(40) ) CREATE TABLE Visitors ( Tourist_ID INTEGER, Tourist_Details VARCHAR(255) ) CREATE TABLE Royal_Family ( Royal_Family_ID INTEGER, Royal_Family_D...
SELECT star_rating_code, AVG(price_range) FROM Hotels GROUP BY star_rating_code
nvbench
CREATE TABLE table_16157 ( "Model" real, "Introduction" text, "Discontinued" text, "CPU Speed" text, "Print resolution (DPI) Resolution is given in dots per inch (DPI)" text, "Print speed (PPM)" text, "Standard memory" text, "Maximum memory" text ) -- Using valid SQLite, answer the fol...
SELECT "Maximum memory" FROM table_16157 WHERE "Discontinued" = 'November 2001'
wikisql
CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE airport_servic...
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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'PITTSBURGH' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATL...
atis
CREATE TABLE table_name_90 ( opponent VARCHAR, year VARCHAR, town VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the opponent when played in trieste before 2007?
SELECT opponent FROM table_name_90 WHERE year < 2007 AND town = "trieste"
sql_create_context
CREATE TABLE table_name_53 ( school_club_team VARCHAR, nationality VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the School/Club team of the player from the United States that play'de guard?
SELECT school_club_team FROM table_name_53 WHERE nationality = "united states" AND position = "guard"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "NEB"
mimicsql_data
CREATE TABLE table_27491610_2 ( no_in_series INTEGER, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the latest number in series that was directed by Skip Sudduth?
SELECT MAX(no_in_series) FROM table_27491610_2 WHERE directed_by = "Skip Sudduth"
sql_create_context
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code tex...
SELECT procedures_icd.charttime FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'umbilical vein cath') AND procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 30307 AND NOT a...
mimic_iii
CREATE TABLE table_1444201_1 ( year_model VARCHAR, engine VARCHAR, model VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the year model for 4-cyl straight engine dohc 16v and 1.5 crdi
SELECT year_model FROM table_1444201_1 WHERE engine = "4-cyl Straight engine DOHC 16V" AND model = "1.5 CRDi"
sql_create_context
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd JOIN admissions ON diagnoses_icd.hadm_id = admissions.hadm_id WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE ...
mimic_iii
CREATE TABLE table_name_28 ( home VARCHAR, result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home of the match with a 0:2 result on 21.10.07?
SELECT home FROM table_name_28 WHERE result = "0:2" AND date = "21.10.07"
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-1459')) AND vitalperiodic.systemicdiastolic BETWEEN diastolic_bp...
eicu
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 ...
SELECT wdmzjzjlb.MZZYZDZZBM FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '67766048134' UNION SELECT bdmzjzjlb.MZZYZDZZBM FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '67766048134'
css
CREATE TABLE table_61018 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Tournament has a Score of 5 7, 2 6?
SELECT "Tournament" FROM table_61018 WHERE "Score" = '5–7, 2–6'
wikisql
CREATE TABLE table_name_49 ( date VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game when the Devils had a record of 21 14 3?
SELECT date FROM table_name_49 WHERE record = "21–14–3"
sql_create_context
CREATE TABLE table_56677 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the nation with a total of 1, bronze smaller than 1 and a rank of 3?
SELECT "Nation" FROM table_56677 WHERE "Total" = '1' AND "Bronze" < '1' AND "Rank" = '3'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.admityear < "2124"
mimicsql_data
CREATE TABLE table_14903999_1 ( year INTEGER, mixed_doubles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the last year rni r hallgr msson dr fa har ard ttir won mixed doubles
SELECT MAX(year) FROM table_14903999_1 WHERE mixed_doubles = "Árni Þór Hallgrímsson Drífa Harðardóttir"
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.label = "Macrophage"
mimicsql_data
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight_fare ( flight_id int, fare_id int ) CREATE TABLE food_service ( mea...
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, equipment_sequence, flight WHERE equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence
atis
CREATE TABLE table_name_66 ( goals_for INTEGER, goals_against VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest amount of goals with more than 51 goals against and less than 30 played?
SELECT MAX(goals_for) FROM table_name_66 WHERE goals_against > 51 AND played < 30
sql_create_context
CREATE TABLE table_34519 ( "Year" real, "Performance" text, "World Ranking" real, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which date is there a performance of more than 8.22.72?
SELECT "Date" FROM table_34519 WHERE "Performance" = '8.22.72'
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 SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '30325789197' AND HOSP_DOC_NM LIKE '何%'
css
CREATE TABLE table_23966 ( "Round" real, "Choice" real, "Player" text, "Position" text, "Height" text, "Weight" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's Curtis Painter's position?
SELECT "Position" FROM table_23966 WHERE "Player" = 'Curtis Painter'
wikisql
CREATE TABLE Acceptance ( Submission_ID int, Workshop_ID int, Result text ) CREATE TABLE submission ( Submission_ID int, Scores real, Author text, College text ) CREATE TABLE workshop ( Workshop_ID int, Date text, Venue text, Name text ) -- Using valid SQLite, answer the ...
SELECT Author, COUNT(DISTINCT T1.Workshop_ID) FROM Acceptance AS T1 JOIN submission AS T2 ON T1.Submission_ID = T2.Submission_ID ORDER BY Author
nvbench
CREATE TABLE table_20726262_3 ( no_in_season VARCHAR, writtenby VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many numbers in the season were written by Brett Conrad & Liz Sagal?
SELECT COUNT(no_in_season) FROM table_20726262_3 WHERE writtenby = "Brett Conrad & Liz Sagal"
sql_create_context
CREATE TABLE qtb ( 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 qtb.OUT_DIAG_DIS_CD, qtb.OUT_DIAG_DIS_NM FROM qtb WHERE qtb.PERSON_ID = '78122301' AND qtb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6369.46) UNION SELECT gyb.OUT_DIAG_DIS_CD, gyb.OUT_DIAG_DIS_NM FROM gyb WHERE gyb.PERSON_ID = '78122301' AND gyb.MED_CLINIC_ID IN (SELECT ...
css
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE locations ( LOCATIO...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY AVG(EMPLOYEE_ID)
nvbench
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, MIN(Weight) FROM people GROUP BY Sex
nvbench
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Date_of_Birth text ) CREATE TABLE entrepreneur ( Entrepreneur_ID int, People_ID int, Company text, Money_Requested real, Investor text ) -- Using valid SQLite, answer the following questions for the tabl...
SELECT Investor, COUNT(Investor) FROM entrepreneur GROUP BY Investor ORDER BY COUNT(Investor)
nvbench
CREATE TABLE table_name_63 ( format VARCHAR, label VARCHAR, catalog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Records from Kontor Records from the catalog of Kontor446 was released in what format?
SELECT format FROM table_name_63 WHERE label = "kontor records" AND catalog = "kontor446"
sql_create_context
CREATE TABLE table_20854 ( "Player" text, "No." text, "Nationality" text, "Position" text, "Years for Grizzlies" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How may players played for the Grizzlies from 2000-2002?
SELECT COUNT("No.") FROM table_20854 WHERE "Years for Grizzlies" = '2000-2002'
wikisql
CREATE TABLE table_name_61 ( attendance INTEGER, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total Attendance for Games while Chicago was the visiting Team?
SELECT SUM(attendance) FROM table_name_61 WHERE visitor = "chicago"
sql_create_context
CREATE TABLE table_65291 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result for the game played on December 20, 1970?
SELECT "Result" FROM table_65291 WHERE "Date" = 'december 20, 1970'
wikisql
CREATE TABLE table_name_75 ( district VARCHAR, party VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What District had Republican Incumbent Cathy McMorris?
SELECT district FROM table_name_75 WHERE party = "republican" AND incumbent = "cathy mcmorris"
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 jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZ...
css
CREATE TABLE table_80315 ( "Year" real, "Men's singles" text, "Women's singles" text, "Men's doubles" text, "Women's doubles" text, "Mixed doubles" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which women's doubles happened after 1987 and a wo...
SELECT "Women's doubles" FROM table_80315 WHERE "Year" > '1987' AND "Women's singles" = 'astrid van der knaap'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dob_year < "2056" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_37088 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Save" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what team played on april 21
SELECT "Opponent" FROM table_37088 WHERE "Date" = 'april 21'
wikisql
CREATE TABLE table_16691 ( "Rd." real, "Grand Prix" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ...
SELECT "Fastest Lap" FROM table_16691 WHERE "Rd." = '8'
wikisql
CREATE TABLE table_35046 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the average points that have december 27?
SELECT AVG("Points") FROM table_35046 WHERE "December" = '27'
wikisql
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE month ( ...
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_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.departure_time < 1800 AND flight....
atis
CREATE TABLE table_name_34 ( elected VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the second member that was elected in 1555?
SELECT 2 AS nd_member FROM table_name_34 WHERE elected = "1555"
sql_create_context
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE microbiolo...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
mimic_iii
CREATE TABLE table_41673 ( "Model Number" text, "Frequency" text, "L2-Cache" text, "Multiplier 1" text, "Voltage" text, "Socket" text, "Release date" text, "Order Part Number" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the so...
SELECT "Socket" FROM table_41673 WHERE "Multiplier 1" = '11.5x'
wikisql
CREATE TABLE table_27050732_7 ( delegate VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who represents district 41?
SELECT delegate FROM table_27050732_7 WHERE district = "41"
sql_create_context
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semes...
SELECT DISTINCT name FROM course WHERE department = 'LACS' AND number = 483
advising
CREATE TABLE table_70250 ( "Margin" real, "Score" text, "Opponent" text, "Venue" text, "Round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What venue did Melbourne Storm played in Rd 7, 2006?
SELECT "Venue" FROM table_70250 WHERE "Opponent" = 'melbourne storm' AND "Round" = 'rd 7, 2006'
wikisql
CREATE TABLE addresses ( address_id number, address_content text, city text, zip_postcode text, state_province_county text, country text, other_address_details text ) CREATE TABLE customer_contact_channels ( customer_id number, channel_code text, active_from_date time, activ...
SELECT DISTINCT channel_code FROM customers AS t1 JOIN customer_contact_channels AS t2 ON t1.customer_id = t2.customer_id WHERE t1.customer_name = "Tillman Ernser"
spider
CREATE TABLE table_18411 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who ran in the race for Jack Brooks' seat?
SELECT "Candidates" FROM table_18411 WHERE "Incumbent" = 'Jack Brooks'
wikisql
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 ...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_1036189_1 ( primer_annulus_color VARCHAR, bullet_tip_color VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many primers annulus colors were there when the color of the bullet tip was white?
SELECT COUNT(primer_annulus_color) FROM table_1036189_1 WHERE bullet_tip_color = "White"
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 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 WHERE demographic.gender = "F" AND prescriptions.formulary_drug_cd = "AMID200"
mimicsql_data
CREATE TABLE table_name_43 ( power VARCHAR, displacement VARCHAR, notes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the power when the displacement is 182cid (2,988cc) and the notes are eu spec?
SELECT power FROM table_name_43 WHERE displacement = "182cid (2,988cc)" AND notes = "eu spec"
sql_create_context
CREATE TABLE table_52001 ( "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 total crowd size for the him team f...
SELECT COUNT("Crowd") FROM table_52001 WHERE "Home team" = 'footscray'
wikisql
CREATE TABLE table_name_27 ( length VARCHAR, class VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the length for class of gts-2 and date of october 8
SELECT length FROM table_name_27 WHERE class = "gts-2" AND date = "october 8"
sql_create_context
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int )...
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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BURBANK...
atis
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.discharge_location = "HOME HEALTH CARE"
mimicsql_data
CREATE TABLE table_182298_5 ( mens_open VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many won the Men's Open if the players are from Sweden?
SELECT COUNT(mens_open) FROM table_182298_5 WHERE country = "Sweden"
sql_create_context
CREATE TABLE round ( round_id number, member_id number, decoration_theme text, rank_in_round number ) CREATE TABLE member ( member_id number, name text, country text, college_id number ) CREATE TABLE college ( college_id number, name text, leader_name text, college_loca...
SELECT country FROM member GROUP BY country ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '44478488' AND gwyjzb.IN_HOSP_DATE BETWEEN '2016-10-10' AND '2018-03-11' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_...
css
CREATE TABLE table_name_70 ( british_record VARCHAR, guernsey_record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the British record for the fish with a Guernsey record of 32-8-0?
SELECT british_record FROM table_name_70 WHERE guernsey_record = "32-8-0"
sql_create_context
CREATE TABLE table_204_651 ( id number, "date" text, "championship" text, "location" text, "category" text, "surface" text, "prev. result" text, "prev. points" number, "new points" number, "outcome" text ) -- Using valid SQLite, answer the following questions for the tables pro...
SELECT "championship" FROM table_204_651 WHERE id = (SELECT id FROM table_204_651 WHERE "championship" = 'us open') - 1
squall
CREATE TABLE table_name_21 ( capital VARCHAR, hangul VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the capital of the province with in Hangul?
SELECT capital FROM table_name_21 WHERE hangul = "양주"
sql_create_context
CREATE TABLE table_name_8 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did the home team score when playing Fitzroy as the away team?
SELECT home_team AS score FROM table_name_8 WHERE away_team = "fitzroy"
sql_create_context
CREATE TABLE table_20780285_1 ( country_region VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country uses the title Marele C tig tor The Big Winner?
SELECT country_region FROM table_20780285_1 WHERE title = "Marele câștigător The Big Winner"
sql_create_context
CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'F42.715' AND jyjgzbb.JCZBDM = '677145'
css