instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE election ( election_id number, counties_represented text, district number, delegate text, party number, first_elected number, committee text ) CREATE TABLE county ( county_id number, county_name text, population number, zip_code text ) CREATE TABLE party ( ...
SELECT T2.delegate FROM county AS T1 JOIN election AS T2 ON T1.county_id = T2.district WHERE T1.population < 100000
spider
CREATE TABLE table_2135222_2 ( density VARCHAR, english_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many figures are there for density for Yucheng County?
SELECT COUNT(density) FROM table_2135222_2 WHERE english_name = "Yucheng County"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2151" AND lab.fluid = "Ascites"
mimicsql_data
CREATE TABLE table_19038 ( "Club" text, "Played" text, "Won" 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 follo...
SELECT "Try bonus" FROM table_19038 WHERE "Club" = 'Abercwmboi RFC'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE aircraft ( aircraft_code varchar, aircraft_description varchar, manufacturer varchar, basic_type varchar, engines int, propulsion varchar...
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, date_day, days, flight WHERE (((flight.stops = 0) AND date_day.day_number = 26 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name = date_day.day_name AN...
atis
CREATE TABLE table_35387 ( "Rank" real, "Name" text, "Nationality" text, "1st (m)" real, "2nd (m)" real, "Points" real, "Overall WC points (Rank)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Points have a Nationality of nor, and ...
SELECT COUNT("Points") FROM table_35387 WHERE "Nationality" = 'nor' AND "Overall WC points (Rank)" = '374 (13)' AND "Rank" < '4'
wikisql
CREATE TABLE table_64068 ( "Rank" text, "Gold" real, "Silver" real, "Bronze" real, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest silver when the total is 4 and bronze is less than 1?
SELECT MAX("Silver") FROM table_64068 WHERE "Total" = '4' AND "Bronze" < '1'
wikisql
CREATE TABLE table_name_43 ( year INTEGER, course VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year when the course is sunset ridge cc?
SELECT SUM(year) FROM table_name_43 WHERE course = "sunset ridge cc"
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...
WITH cte AS (SELECT SUM(CASE WHEN PostTypeId = 1 AND Score >= 20 THEN 1 WHEN PostTypeId = 2 AND Score >= 10 THEN 1 ELSE 0 END) AS HundredPointPosts, OwnerUserId FROM Posts AS p GROUP BY OwnerUserId) SELECT COUNT(HundredPointPosts) AS k, OwnerUserId FROM cte GROUP BY OwnerUserId ORDER BY COUNT(HundredPointPosts) DESC
sede
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9cod...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-24513')) AND microlab.culturesite = 'urine, voided specimen' AND DATE...
eicu
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, ...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE (LOWER(Location) LIKE '%Bangalore%' OR UPPER(Location) LIKE '%BANGALORE%' OR Location LIKE '%BANGALORE%') AND Reputation >= 100000 ORDER BY Reputation DESC
sede
CREATE TABLE table_74559 ( "\u2193 Function / Genus \u2192" text, "Shigella" text, "Salmonella" text, "Yersinia" text, "Escherichia" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the shigella for yersinia yopb
SELECT "Shigella" FROM table_74559 WHERE "Yersinia" = 'yopb'
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 mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '秦承平'
css
CREATE TABLE table_54897 ( "Year" text, "Dates" text, "Champion" text, "Country" text, "Score" text, "Tournament location" text, "Purse ($)" real, "Winner's share ($)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest wi...
SELECT MAX("Winner's share ($)") FROM table_54897 WHERE "Year" = '2008'
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '50606376' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2011-11-27')
css
CREATE TABLE table_74599 ( "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. -- Who was the away team that played Fitzroy on May...
SELECT "Away team" FROM table_74599 WHERE "Venue" = 'brunswick street oval'
wikisql
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) ...
SELECT meter_400, meter_100 FROM swimmer ORDER BY meter_400 DESC
nvbench
CREATE TABLE table_27533947_1 ( total_points INTEGER, best_winning_average VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the best winning average is 7.3-71, what are the total points?
SELECT MIN(total_points) FROM table_27533947_1 WHERE best_winning_average = "7.3-71"
sql_create_context
CREATE TABLE table_70850 ( "Rider" text, "Matches" real, "Rides" real, "Bonus Pts" real, "Total Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rider had less than 342 points in no more than 76 rides in 7 matches with more than 2 bonus ...
SELECT "Rider" FROM table_70850 WHERE "Total Points" < '342' AND "Rides" < '76' AND "Matches" = '7' AND "Bonus Pts" > '2'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.ethnicity = "WHITE" AND demographic.admityear >= "2121"
mimicsql_data
CREATE TABLE table_name_29 ( home VARCHAR, visitor VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home team of the game on May 22 with the Edmonton Oilers as the visiting team?
SELECT home FROM table_name_29 WHERE visitor = "edmonton oilers" AND date = "may 22"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE allergy ( allergy...
SELECT (SELECT 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 = '016-18150' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi...
eicu
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "4523"
mimicsql_data
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, ...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t3.itemid FROM (SELECT t2.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_i...
mimic_iii
CREATE TABLE table_1012 ( "Player" text, "Touchdowns (5 points)" real, "Extra points 1 point" real, "Field goals (5 points)" real, "Total Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many touchdowns were made by the person with 7 extra...
SELECT COUNT("Touchdowns (5 points)") FROM table_1012 WHERE "Extra points 1 point" = '7'
wikisql
CREATE TABLE table_55157 ( "Player" text, "Rec." real, "Yards" real, "Avg." real, "TD's" real, "Long" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total count of TD longs more than 29?
SELECT COUNT("Long") FROM table_55157 WHERE "TD's" > '29'
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 mzjzjlb.JZKSRQ FROM mzjzjlb WHERE mzjzjlb.JZLSH = '37345239024'
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number,...
SELECT txmzjzjlb.SG, txmzjzjlb.TZ, txmzjzjlb.TW, txmzjzjlb.SSY, txmzjzjlb.SZY, txmzjzjlb.XL, txmzjzjlb.HXPLC, txmzjzjlb.ML FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '08031682316' UNION SELECT ftxmzjzjlb.SG, ftxmzjzjlb.TZ, ftxmzjzjlb.TW, ftxmzjzjlb.SSY, ftxmzjzjlb.SZY, ftxmzjzjlb.XL, ftxmzjzjlb.HXPLC, ftxmzjzjlb.ML FROM ft...
css
CREATE TABLE table_test_25 ( "id" int, "ejection_fraction_ef" int, "respiratory_tract_infection" bool, "left_ventricular_ejection_fraction_lvef" int, "intra_aortic_balloon_pump_iabp" bool, "systolic_blood_pressure_sbp" int, "central_diabetes_insipidus" bool, "hyponatremia" bool, "hea...
SELECT * FROM table_test_25 WHERE severe_left_ventricular_dysfunction = 1 OR ejection_fraction_ef < 20
criteria2sql
CREATE TABLE repair ( repair_ID int, name text, Launch_Date text, Notes text ) CREATE TABLE machine ( Machine_ID int, Making_Year int, Class text, Team text, Machine_series text, value_points real, quality_rank int ) CREATE TABLE technician ( technician_id real, Nam...
SELECT Name, COUNT(*) FROM repair_assignment AS T1 JOIN technician AS T2 ON T1.technician_id = T2.technician_id GROUP BY T2.Name ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_name_44 ( team__number1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2nd leg when team #1 is Rubin Kazan?
SELECT 2 AS nd_leg FROM table_name_44 WHERE team__number1 = "rubin kazan"
sql_create_context
CREATE TABLE table_13258972_2 ( attendance VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance when the record was 1-1?
SELECT attendance FROM table_13258972_2 WHERE record = "1-1"
sql_create_context
CREATE TABLE table_train_182 ( "id" int, "allergy_to_sulfa" bool, "creatinine_clearance_cl" float, "liver_disease" bool, "allergy_to_glyburide" bool, "allergy_to_metformin" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- allerg...
SELECT * FROM table_train_182 WHERE allergy_to_metformin = 1
criteria2sql
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE procedures.icd9_code = "8960" AND prescriptions.drug_type = "ADDITIVE"
mimicsql_data
CREATE TABLE table_25201 ( "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. -- Name t...
SELECT "High points" FROM table_25201 WHERE "Record" = '9-4'
wikisql
CREATE TABLE table_name_26 ( laid_down VARCHAR, pennant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the U21 pennant laid down?
SELECT laid_down FROM table_name_26 WHERE pennant = "u21"
sql_create_context
CREATE TABLE table_203_726 ( id number, "year" number, "national champion" text, "score" text, "runner-up" text, "host or site" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many years has stanford been national champion ?
SELECT COUNT("year") FROM table_203_726 WHERE "national champion" = 'stanford'
squall
CREATE TABLE table_name_36 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Home team score for the team that played South Melbourne?
SELECT home_team AS score FROM table_name_36 WHERE away_team = "south melbourne"
sql_create_context
CREATE TABLE chip_model ( model_name text, launch_year number, ram_mib number, rom_mib number, slots text, wifi text, bluetooth text ) CREATE TABLE screen_mode ( graphics_mode number, char_cells text, pixels text, hardware_colours number, used_kb number, map text, ...
SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.graphics_mode = t2.screen_mode WHERE t2.accreditation_type = 'Provisional' INTERSECT SELECT t1.pixels FROM screen_mode AS t1 JOIN phone AS t2 ON t1.graphics_mode = t2.screen_mode WHERE t2.accreditation_type = 'Full'
spider
CREATE TABLE table_74300 ( "For shank type" text, "Singer part number" text, "Uses templates?" text, "Description" text, "Storage case" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the singer part number of the buttonholer whose storage cas...
SELECT "Singer part number" FROM table_74300 WHERE "Storage case" = 'green plastic box'
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 regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_I...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID)
nvbench
CREATE TABLE table_68637 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total points in 1974?
SELECT COUNT("Points") FROM table_68637 WHERE "Year" = '1974'
wikisql
CREATE TABLE table_25965003_3 ( fee__if_applicable_ VARCHAR, countries_and_territories VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fee (if applicable) for Norway?
SELECT fee__if_applicable_ FROM table_25965003_3 WHERE countries_and_territories = "Norway"
sql_create_context
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId num...
SELECT COUNT(*) FROM Posts WHERE YEAR(CreationDate) = 2019
sede
CREATE TABLE table_name_54 ( date VARCHAR, location_attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the game played that was at the Seattle Center Coliseum?
SELECT date FROM table_name_54 WHERE location_attendance = "seattle center coliseum"
sql_create_context
CREATE TABLE table_56660 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the attendance greater than 18,118 when Colorado ...
SELECT "Date" FROM table_56660 WHERE "Attendance" > '18,118' AND "Visitor" = 'colorado'
wikisql
CREATE TABLE table_name_61 ( position VARCHAR, country VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position was picked for Canada on Pick 8?
SELECT position FROM table_name_61 WHERE country = "canada" AND pick = "8"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
SELECT t_kc22.SOC_SRT_DIRE_NM, t_kc22.AMOUNT, t_kc21.MED_CLINIC_ID FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '25360144782' OR t_kc21_t_kc22.MED_CLINIC_ID = '03301513966' AND t_kc2...
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 MZZYZDZZBM FROM zyjzjlb WHERE JZLSH = '67766048134'
css
CREATE TABLE table_25173 ( "Position" text, "Name" text, "Jersey Number" real, "Age" real, "Height" text, "Weight" real, "College" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the positions for Menlo College?
SELECT "Position" FROM table_25173 WHERE "College" = 'Menlo College'
wikisql
CREATE TABLE Type_Of_Restaurant ( Id VARCHAR ) CREATE TABLE Restaurant ( Id VARCHAR ) CREATE TABLE Restaurant_Type ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many restaurant is the Sandwich type restaurant?
SELECT COUNT(*) FROM Restaurant JOIN Type_Of_Restaurant ON Restaurant.ResID = Type_Of_Restaurant.ResID JOIN Restaurant_Type ON Type_Of_Restaurant.ResTypeID = Restaurant_Type.ResTypeID GROUP BY Type_Of_Restaurant.ResTypeID HAVING Restaurant_Type.ResTypeName = 'Sandwich'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "20" AND procedures.short_title = "Open biopsy soft tissue"
mimicsql_data
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime...
SELECT patient.hospitaldischargetime FROM patient WHERE patient.uniquepid = '017-30730' AND DATETIME(patient.hospitaldischargetime) <= DATETIME(CURRENT_TIME(), '-4 year') ORDER BY patient.hospitaldischargetime LIMIT 1
eicu
CREATE TABLE PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIGH_DEGREE varchar(5) ) CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), ...
SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY COUNT(DISTINCT DEPT_NAME)
nvbench
CREATE TABLE video_games ( gameid number, gname text, gtype text ) CREATE TABLE sportsinfo ( stuid number, sportname text, hoursperweek number, gamesplayed number, onscholarship text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text...
SELECT gtype, COUNT(*) FROM video_games GROUP BY gtype
spider
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops 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, date_day, days, flight WHERE ((date_day.day_number = 22 AND date_day.month_number = 7 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
atis
CREATE TABLE table_name_75 ( score VARCHAR, country VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Score, when Country is 'United States', and when Player is 'Lee Trevino'?
SELECT COUNT(score) FROM table_name_75 WHERE country = "united states" AND player = "lee trevino"
sql_create_context
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '41843974' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 1413.96)
css
CREATE TABLE district ( district_name VARCHAR, city_population VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which district has the largest population?
SELECT district_name FROM district ORDER BY city_population DESC LIMIT 1
sql_create_context
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, ...
SELECT Posts.CreationDate, Posts.Id AS "post_link", Posts.OwnerUserId AS "user_link", Posts.Score FROM Posts INNER JOIN PostTags ON PostTags.PostId = Posts.Id INNER JOIN Tags ON Tags.Id = PostTags.TagId WHERE Posts.PostTypeId = 1 AND Posts.ClosedDate IS NULL AND Posts.CreationDate < DATEADD(DAY, -30, GETDATE()) AND Pos...
sede
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 t1.labname FROM (SELECT lab.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND STRFTIME('%y', lab.labresulttime) >= '2103' GROUP BY lab.labname) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE Has_Allergy ( StuID INTEGER, Allergy VARCHAR(20) ) 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...
SELECT AllergyType, COUNT(AllergyType) FROM Allergy_Type GROUP BY AllergyType ORDER BY AllergyType
nvbench
CREATE TABLE table_12642 ( "South West DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Byes, when South West DFL is 'Coleraine', and when Wins...
SELECT COUNT("Byes") FROM table_12642 WHERE "South West DFL" = 'coleraine' AND "Wins" < '12'
wikisql
CREATE TABLE table_204_587 ( id number, "drop(s)" text, "multiplayer map(s)" text, "spec ops mission(s)" text, "face off map(s)" text, "xbox 360 release date" text, "playstation 3 release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "spec ops mission(s)" FROM table_204_587 WHERE id = (SELECT id FROM table_204_587 WHERE "spec ops mission(s)" = 'arctic recon') + 1
squall
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.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BG...
css
CREATE TABLE table_28055 ( "Episode no." real, "Airdate" text, "Dave Viewers" real, "Dave Rank" real, "Rank (cable)" real, "Dave ja vu Viewers" real, "Total viewers" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the airdate of the ...
SELECT "Airdate" FROM table_28055 WHERE "Dave ja vu Viewers" = '106000'
wikisql
CREATE TABLE table_26135 ( "Type of unit" text, "Type of aircraft" text, "Number of aircraft" text, "Number of crews" text, "Men per crew" text, "Total personnel" real, "Officers" real, "Enlisted" real ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT "Enlisted" FROM table_26135 WHERE "Type of unit" = 'Troop carrier group'
wikisql
CREATE TABLE table_53179 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was Kuwait City a venue?
SELECT "Date" FROM table_53179 WHERE "Venue" = 'kuwait city'
wikisql
CREATE TABLE table_14657 ( "Year" text, "Start" text, "Qual" text, "Rank" text, "Finish" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps were completed with a start of 33, and a finish of 18?
SELECT MAX("Laps") FROM table_14657 WHERE "Start" = '33' AND "Finish" = '18'
wikisql
CREATE TABLE table_27283 ( "Model" text, "Power" text, "Torque" text, "Gearbox" text, "Weight" text, "Seating" text, "Brakes" text, "Wheels" text, "Tyres" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the power of the Type R...
SELECT "Power" FROM table_27283 WHERE "Model" = 'Type R'
wikisql
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 COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '86...
css
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( i...
SELECT COUNT(*) > 0 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.uniquepid = '030-47098' AND patient.hospitalid <> (SELECT DISTINCT patient.hospitalid FROM patient WHERE patient.uniquepid = '030-47098' AND patient.hospitaldischargetime IS NULL)) AND tr...
eicu
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, diagnoses_icd.charttime, admissions.hadm_id 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_...
mimic_iii
CREATE TABLE table_46181 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the event for round 1 against Lance Wipf?
SELECT "Event" FROM table_46181 WHERE "Round" = '1' AND "Opponent" = 'lance wipf'
wikisql
CREATE TABLE table_name_41 ( human_gene__protein_ VARCHAR, yeast_ortholog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What human gene has a yeast ortholog of RAD26?
SELECT human_gene__protein_ FROM table_name_41 WHERE yeast_ortholog = "rad26"
sql_create_context
CREATE TABLE table_46786 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who rode a Honda CBR1000rr, had fewer than 22 laps, and a time of +2 laps?
SELECT "Rider" FROM table_46786 WHERE "Bike" = 'honda cbr1000rr' AND "Laps" < '22' AND "Time" = '+2 laps'
wikisql
CREATE TABLE table_15642 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Crowd" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the less for opponent of @cle and record of 67-29
SELECT "Loss" FROM table_15642 WHERE "Opponent" = '@cle' AND "Record" = '67-29'
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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Wegener's granulomatosis" AND prescriptions.route = "SC"
mimicsql_data
CREATE TABLE table_77744 ( "Round" real, "Grand Prix" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the lowest round for when p...
SELECT MIN("Round") FROM table_77744 WHERE "Fastest Lap" = 'michael schumacher' AND "Winning Driver" = 'michael schumacher' AND "Pole Position" = 'michael schumacher'
wikisql
CREATE TABLE cinema ( Cinema_ID int, Name text, Openning_year int, Capacity int, Location text ) CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule...
SELECT Date, COUNT(Date) FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Date
nvbench
CREATE TABLE table_2966 ( "Year" real, "Champions" text, "Runners-up" text, "Score in the final" text, "3rd-place" text, "4th-place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year did Hougang United finish in 4th place?
SELECT "Year" FROM table_2966 WHERE "4th-place" = 'Hougang United'
wikisql
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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...
SELECT SUM(t_kc24.PER_ACC_PAY) FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '戚鸿振' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-11-12' AND '2012-08-09'
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.JCFF FROM hz_info JOIN mzjzjlb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE hz_info.RYBH = '54662739' AND jyjgzbb.JYRQ BETWEEN '2008-05-22' ...
css
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) 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 varc...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID)
nvbench
CREATE TABLE table_52518 ( "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 home team scored 10.24 (84) at vfl park?
SELECT "Home team" FROM table_52518 WHERE "Venue" = 'vfl park' AND "Home team score" = '10.24 (84)'
wikisql
CREATE TABLE table_204_476 ( id number, "name" text, "date built" number, "builder" text, "works no." number, "wheels" text, "cylinders" text, "notes" text, "withdrawn" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many were b...
SELECT COUNT(*) FROM table_204_476 WHERE "date built" = 1847
squall
CREATE TABLE table_23702 ( "Season" real, "Series" text, "Team" 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. -- Namet he seaso...
SELECT "Season" FROM table_23702 WHERE "Wins" = '0' AND "Races" = '20'
wikisql
CREATE TABLE table_name_20 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date has 113-115 (ot) as the score?
SELECT date FROM table_name_20 WHERE score = "113-115 (ot)"
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '25164587531'
css
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREAT...
SELECT MAX(vitalperiodic.systemicmean) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-23724') AND NOT patient.unitdischargetime IS ...
eicu
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime ...
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 labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age BETWEEN 50 AND 59) AND STRFTIME('%y', labevents.c...
mimic_iii
CREATE TABLE table_6414 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people went to the game that had 17-13?
SELECT SUM("Attendance") FROM table_6414 WHERE "Score" = '17-13'
wikisql
CREATE TABLE table_15973 ( "Formula" text, "Notation" text, "T c (K)" real, "No. of Cu-O planes in unit cell" real, "Crystal structure" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number for t c (k) when the notation is tl-2212?
SELECT COUNT("T c (K)") FROM table_15973 WHERE "Notation" = 'Tl-2212'
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 diagnoses.long_title = "Hepatitis, unspecified"
mimicsql_data
CREATE TABLE table_72397 ( "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. -- Name the total number of incumbent for first elected of 1944
SELECT COUNT("Incumbent") FROM table_72397 WHERE "First elected" = '1944'
wikisql
CREATE TABLE table_48173 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the location when the time is 3:15?
SELECT "Location" FROM table_48173 WHERE "Time" = '3:15'
wikisql
CREATE TABLE table_30069 ( "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 i...
SELECT "Team" FROM table_30069 WHERE "Location Attendance" = 'Seattle Center Coliseum 14,180'
wikisql
CREATE TABLE table_73224 ( "County" text, "Obama%" text, "Obama#" real, "McCain%" text, "McCain#" real, "Others%" text, "Others#" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the number of others votes in Columbia county?
SELECT MIN("Others#") FROM table_73224 WHERE "County" = 'Columbia'
wikisql
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 intakeoutput ( intakeo...
SELECT t3.culturesite FROM (SELECT t2.culturesite, 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 = 'administration of electrolytes - oral' AND D...
eicu