instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_29002 ( "District" real, "Municipalities served" text, "Judge of probate" text, "Judges residence" text, "Location of court" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where does the judge who serves Beacon Falls , Naugatuck ,...
SELECT "Judges residence" FROM table_29002 WHERE "Municipalities served" = 'Beacon Falls , Naugatuck , Middlebury , Prospect'
wikisql
CREATE TABLE table_name_86 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Momoko Ueda's place?
SELECT place FROM table_name_86 WHERE player = "momoko ueda"
sql_create_context
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 flight_fare ( flight_id int, fare_id int ) CREATE TABLE fare ( fare...
SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_...
atis
CREATE TABLE table_name_56 ( superlative VARCHAR, actress VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which award has Thelma Ritter won?
SELECT superlative FROM table_name_56 WHERE actress = "thelma ritter"
sql_create_context
CREATE TABLE table_45885 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the team 1 with a 2-1 2nd leg?
SELECT "Team 1" FROM table_45885 WHERE "2nd leg" = '2-1'
wikisql
CREATE TABLE table_name_54 ( finished VARCHAR, exited VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What place did the person who left on day 3 finish in?
SELECT finished FROM table_name_54 WHERE exited = "day 3"
sql_create_context
CREATE TABLE table_13012165_1 ( washington VARCHAR, _dc VARCHAR, new_york VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What teams played in Washington, DC the year that Ramapo LL Ramapo was the game in New York?
SELECT washington, _dc FROM table_13012165_1 WHERE new_york = "Ramapo LL Ramapo"
sql_create_context
CREATE TABLE table_76290 ( "Position" real, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell...
SELECT MIN("Played") FROM table_76290 WHERE "Position" > '2' AND "Draws" < '2' AND "Goals against" < '18'
wikisql
CREATE TABLE table_name_44 ( electronvolt VARCHAR, joule VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many electronvolts is 3,600 joules?
SELECT electronvolt FROM table_name_44 WHERE joule = "3,600"
sql_create_context
CREATE TABLE table_24609 ( "Season" text, "Timeslot Times listed are Eastern time" text, "Season premiere" text, "Season finale" text, "TV season" text, "Ranking" real, "Viewers (in millions of households)" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT "Season premiere" FROM table_24609 WHERE "Season finale" = 'May 19, 1997'
wikisql
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, ...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id INNER JOIN course_...
advising
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_cred...
SELECT DISTINCT COURSEalias0.department, COURSEalias0.name, COURSEalias0.number, SEMESTERalias0.semester FROM (SELECT course_id FROM student_record WHERE earn_credit = 'Y' AND student_id = 1) AS DERIVED_TABLEalias0, course AS COURSEalias0, course_offering AS COURSE_OFFERINGalias0, semester AS SEMESTERalias0 WHERE ((SEM...
advising
CREATE TABLE table_203_51 ( id number, "channel" text, "definition" text, "organisation" text, "ownership" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- whats is the number of channel 's that broadcast in hd ?
SELECT COUNT("channel") FROM table_203_51 WHERE "definition" = 'hd'
squall
CREATE TABLE table_22298 ( "Player" text, "FCSL Team" text, "Years Played" text, "Year Drafted" real, "Round" text, "MLB Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when deland is the fcsl team and 2008 is the year played who is the mlb...
SELECT "MLB Team" FROM table_22298 WHERE "Years Played" = '2008' AND "FCSL Team" = 'DeLand'
wikisql
CREATE TABLE table_name_98 ( college VARCHAR, overall VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the college when the overall is more than 76 for brian mitchell?
SELECT college FROM table_name_98 WHERE overall > 76 AND name = "brian mitchell"
sql_create_context
CREATE TABLE table_name_70 ( number_of_households INTEGER, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many households are in highlands county?
SELECT AVG(number_of_households) FROM table_name_70 WHERE county = "highlands"
sql_create_context
CREATE TABLE table_35271 ( "7:00" text, "7:30" text, "8:00" text, "8:30" text, "9:00" text, "9:30" text, "10:00" text, "10:30" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 9:00 episode that will be shown on the station that...
SELECT "9:00" FROM table_35271 WHERE "10:00" = '20/20'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '013-33898' AND patient.wardid = 559 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime DESC LIMIT 1
eicu
CREATE TABLE TRANSACTIONS ( date_of_transaction VARCHAR, share_count VARCHAR, amount_of_transaction VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the dates of transactions if the share count is bigger than 100 or the amount is bigger than 1000.
SELECT date_of_transaction FROM TRANSACTIONS WHERE share_count > 100 OR amount_of_transaction > 1000
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.PERSON_NM, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE, t_kc21.IDENTITY_CARD FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '18019014273'
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 lab ( labid numb...
SELECT vitalperiodic.observationtime FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '015-16479')) AND vitalperiodic.sao2 > 93.0 AND NOT ...
eicu
CREATE TABLE PostLinks ( Id number, CreationDate time, PostId number, RelatedPostId number, LinkTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE...
SELECT q.Id AS "post_link", q.CreationDate AS "date", q.OwnerDisplayName AS "user_name", a.OwnerUserId AS "user_link", ph.Comment AS "comment" FROM Posts AS q INNER JOIN PostHistory AS ph ON ph.PostId = q.Id INNER JOIN Posts AS a ON a.ParentId = q.Id AND a.OwnerDisplayName = q.OwnerDisplayName WHERE ph.PostHistoryTypeI...
sede
CREATE TABLE table_204_690 ( id number, "election" number, "party name" text, "total votes" number, "share of votes" text, "seats" number, "share of seats" text, "party leader(s)" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT COUNT(*) FROM table_204_690 WHERE "party leader(s)" = 'colin eglin'
squall
CREATE TABLE table_name_73 ( bronze INTEGER, silver INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the biggest Bronze that has less than 0 Silvers?
SELECT MAX(bronze) FROM table_name_73 WHERE silver < 0
sql_create_context
CREATE TABLE table_57167 ( "Round" real, "Grand Prix" text, "Date" text, "Location" 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...
SELECT MAX("Round") FROM table_57167 WHERE "Date" = '5 april'
wikisql
CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE game ( ...
SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Away_team
nvbench
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE va...
SELECT SCHOOL_CODE, COUNT(*) FROM DEPARTMENT AS T1 JOIN PROFESSOR AS T2 ON T1.DEPT_CODE = T2.DEPT_CODE GROUP BY T1.SCHOOL_CODE
nvbench
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 patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '021-35988') AND STRFTIME('%y', patient.unitadmittime) = '2103' ORDER BY patient.unitadmittime LIMIT 1
eicu
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 WHERE demographic.ethnicity = "AMERICAN INDIAN/ALASKA NATIVE" AND demographic.diagnosis = "CEREBRAL ANEURYSM/SDA"
mimicsql_data
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 q.Id AS "Question ID", q.OwnerUserId AS "Owner User ID", ou.DisplayName AS "Owner Name", ou.Reputation AS "Owner Reputation", ou.Location AS "Owner Location", ou.Views AS "Owner Views", ou.UpVotes AS "Owner UpVotes", ou.DownVotes AS "Owner DownVotes", aa.Id AS "AcceptedAnswerID", aa.OwnerUserId AS "User Who Answ...
sede
CREATE TABLE table_12792876_4 ( losing_bonus VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the losing bonus of 96 points
SELECT losing_bonus FROM table_12792876_4 WHERE points = "96"
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '9492924' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.IN_DIAG_DIS_CD
css
CREATE TABLE table_name_87 ( artist VARCHAR, peak_position VARCHAR, sales VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What artist had a peak position under 2, and more than 200,000 in sales?
SELECT artist FROM table_name_87 WHERE peak_position < 2 AND sales > 200 OFFSET 000
sql_create_context
CREATE TABLE table_name_54 ( winner VARCHAR, stage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Winner of the SS5 Stage?
SELECT winner FROM table_name_54 WHERE stage = "ss5"
sql_create_context
CREATE TABLE table_name_38 ( years_at_club VARCHAR, player VARCHAR, debut_year VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Years at club have a Debut year of 1930, and Games larger than 7, and a Player of colin benham?
SELECT years_at_club FROM table_name_38 WHERE debut_year = 1930 AND games > 7 AND player = "colin benham"
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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.short_title = "Hyp ht dis NOS w ht fail"
mimicsql_data
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE c...
SELECT AVG(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT labevents.hadm_id FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'reticulocyte count, manual')) AND DATETIME(cost.chargetime) >= DATETIME(CURRENT_TIME(), '-5 year') GR...
mimic_iii
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 * 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.BGDH WHERE hz_info.person_i...
css
CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE employee ( emp_num number, emp_lname text, emp_fn...
SELECT T1.emp_lname, T2.prof_office FROM employee AS T1 JOIN professor AS T2 ON T1.emp_num = T2.emp_num JOIN department AS T3 ON T2.dept_code = T3.dept_code WHERE T3.dept_name = 'History'
spider
CREATE TABLE table_4903 ( "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 attendance when Collingwood was the ...
SELECT MIN("Crowd") FROM table_4903 WHERE "Away team" = 'collingwood'
wikisql
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 cost ( costid num...
SELECT intakeoutput.intakeoutputtime FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-202432')) AND intakeoutput.cellpath LIKE '%intake...
eicu
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '曹志新' AND t_kc21.MED_SER_ORG_NO = '0686560' AND t_kc21.IN_HOSP_DATE BETWEEN '2005-12-25' AND '2012-04-14')
css
CREATE TABLE table_26615633_1 ( birthday VARCHAR, jewel VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times is the jewel malachite?
SELECT COUNT(birthday) FROM table_26615633_1 WHERE jewel = "Malachite"
sql_create_context
CREATE TABLE table_name_67 ( res VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the resolution for the fight against enrique guzman?
SELECT res FROM table_name_67 WHERE opponent = "enrique guzman"
sql_create_context
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload, program_course.workload FROM course, program_course WHERE program_course.category LIKE '%Other%' AND program_course.course_id = course.course_id AND program_course.workload = (SELECT MIN(PROGRAM_COURSEalias1.workload) FROM program_c...
advising
CREATE TABLE table_63145 ( "Year" real, "Theme" text, "Artist" text, "Mintage" real, "Issue price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most mintage with common eider as the theme, and the year less than 2008?
SELECT MAX("Mintage") FROM table_63145 WHERE "Theme" = 'common eider' AND "Year" < '2008'
wikisql
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(*) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '4451945' AND gwyjzb.IN_HOSP_DATE BETWEEN '2019-07-05' AND '2021-01-11'
css
CREATE TABLE table_49582 ( "Nat." text, "Name" text, "Moving to" text, "Type" text, "Transfer window" text, "Transfer fee" text, "Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the name that had a moving to Anorthosis Famagust...
SELECT "Name" FROM table_49582 WHERE "Transfer window" = 'winter' AND "Moving to" = 'anorthosis famagusta'
wikisql
CREATE TABLE table_5215 ( "Date" text, "Venue" text, "Score" text, "Comp" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Report has the Date of June 5, 2005?
SELECT "Report" FROM table_5215 WHERE "Date" = 'june 5, 2005'
wikisql
CREATE TABLE table_name_65 ( rank VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Rank of the Athletes from Ukraine?
SELECT COUNT(rank) FROM table_name_65 WHERE country = "ukraine"
sql_create_context
CREATE TABLE table_name_59 ( cache VARCHAR, capacity VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Cache with a Capacity that is 600 gb?
SELECT cache FROM table_name_59 WHERE capacity = "600 gb"
sql_create_context
CREATE TABLE table_33791 ( "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 Melbourne's home venue?
SELECT "Venue" FROM table_33791 WHERE "Home team" = 'melbourne'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_ORG_DEPT_CD, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '6000894' GROUP BY t_kc21.MED_ORG_DEPT_CD
css
CREATE TABLE table_5782 ( "Call sign" text, "Frequency" text, "City of License" text, "Owner" text, "Format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the format for Cherry Creek Radio with frequency of 0 92.1 fm?
SELECT "Format" FROM table_5782 WHERE "Owner" = 'cherry creek radio' AND "Frequency" = '0 92.1 fm'
wikisql
CREATE TABLE table_name_15 ( population INTEGER, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the population of Green County?
SELECT MIN(population) FROM table_name_15 WHERE county = "green"
sql_create_context
CREATE TABLE table_3656 ( "Pick #" real, "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. -- How many teams got pick number 130?
SELECT COUNT("College/junior/club team") FROM table_3656 WHERE "Pick #" = '130'
wikisql
CREATE TABLE table_26387382_1 ( name VARCHAR, capacity__mw_ VARCHAR, status VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What farm has a capacity of 70 and is operational?
SELECT name FROM table_26387382_1 WHERE capacity__mw_ = "70" AND status = "Operational"
sql_create_context
CREATE TABLE table_9643 ( "Lane" real, "Name" text, "Country" text, "Mark" real, "React" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest React, when Name is 'Candice Davis', and when Lane is less than 3?
SELECT MIN("React") FROM table_9643 WHERE "Name" = 'candice davis' AND "Lane" < '3'
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 * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i...
css
CREATE TABLE table_10354 ( "Name" text, "Team" text, "Qual 1" text, "Qual 2" text, "Best" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time for the second qualification where the first qualification time was 1:21.523?
SELECT "Qual 2" FROM table_10354 WHERE "Qual 1" = '1:21.523'
wikisql
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod 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 transfers ( row_id number,...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime, admissions.hadm_id FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_...
mimic_iii
CREATE TABLE fgwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_ID = '04441779' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2001-06-18' AND '2013-03-01' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg...
css
CREATE TABLE table_name_79 ( save VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the save of the game where moran (1-2) lost?
SELECT save FROM table_name_79 WHERE loss = "moran (1-2)"
sql_create_context
CREATE TABLE table_name_80 ( address VARCHAR, mascot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the address for the Scorpions' mascot?
SELECT address FROM table_name_80 WHERE mascot = "scorpions"
sql_create_context
CREATE TABLE table_3418 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the f/...
SELECT "F/Laps" FROM table_3418 WHERE "Races" = '14'
wikisql
CREATE TABLE table_21550897_1 ( written_by VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the episode with the production code 519?
SELECT written_by FROM table_21550897_1 WHERE production_code = 519
sql_create_context
CREATE TABLE table_name_1 ( course VARCHAR, race_leader VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which course had a rest day for the Race Leader?
SELECT course FROM table_name_1 WHERE race_leader = "rest day"
sql_create_context
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, Team_ID FROM basketball_match
nvbench
CREATE TABLE table_51359 ( "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. -- Which Away team has an Away team score of 15.13 ...
SELECT "Away team" FROM table_51359 WHERE "Away team score" = '15.13 (103)'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
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 = "Fluoxetine HCl"
mimicsql_data
CREATE TABLE table_33515 ( "Date" text, "Result" text, "Score" text, "Stadium" text, "City" text, "Crowd" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the match ending in a score of 66-20, what was the stadium?
SELECT "Stadium" FROM table_33515 WHERE "Score" = '66-20'
wikisql
CREATE TABLE table_204_430 ( id number, "model" text, "origin" text, "type" text, "version" text, "in service" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which model has the most in service ?
SELECT "model" FROM table_204_430 ORDER BY "in service" DESC LIMIT 1
squall
CREATE TABLE table_name_26 ( sanskrit VARCHAR, english VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Sanskrit has an English of mindfulness of breathing?
SELECT sanskrit FROM table_name_26 WHERE english = "mindfulness of breathing"
sql_create_context
CREATE TABLE table_23314951_4 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the date is 7-21-2006, who was the opponent?
SELECT opponent FROM table_23314951_4 WHERE date = "7-21-2006"
sql_create_context
CREATE TABLE table_name_40 ( hometown VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the Hometown that the person who attended Camarillo High School is from?
SELECT hometown FROM table_name_40 WHERE school = "camarillo high school"
sql_create_context
CREATE TABLE table_19492 ( "Pick #" real, "NFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number picked were players from arizona state picked?
SELECT "Pick #" FROM table_19492 WHERE "College" = 'Arizona State'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
SELECT HIRE_DATE, COMMISSION_PCT FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE
nvbench
CREATE TABLE table_12000368_1 ( author___editor___source VARCHAR, world_ranking__1_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the author / editor / source with world ranking (1) being 73rd
SELECT author___editor___source FROM table_12000368_1 WHERE world_ranking__1_ = "73rd"
sql_create_context
CREATE TABLE table_204_208 ( id number, "year" text, "title" text, "role" text, "episodes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which was the only title where he was a narrator ?
SELECT "title" FROM table_204_208 WHERE "role" = 'narrator'
squall
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 text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "55" AND lab.flag = "abnormal"
mimicsql_data
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, ...
SELECT Questions.ViewCount, Questions.Id AS "post_link" FROM Posts AS Answers JOIN Posts AS Questions ON Answers.ParentId = Questions.Id WHERE Answers.PostTypeId = 2 AND Answers.OwnerUserId = '##UserID##' AND NOT Questions.ViewCount IS NULL ORDER BY Questions.ViewCount DESC
sede
CREATE TABLE table_name_19 ( team_1 VARCHAR, team_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team 1 had a Team 2 of hankook verdes?
SELECT team_1 FROM table_name_19 WHERE team_2 = "hankook verdes"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "M" AND diagnoses.icd9_code = "25002"
mimicsql_data
CREATE TABLE table_20089 ( "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." text ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT "Locale" FROM table_20089 WHERE "Stolen Ends" = '12' AND "Shot Pct." = '77%'
wikisql
CREATE TABLE table_name_66 ( round INTEGER, name VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Average round for rodney harrison p before 145?
SELECT AVG(round) FROM table_name_66 WHERE name = "rodney harrison p" AND pick < 145
sql_create_context
CREATE TABLE table_8406 ( "Player" text, "Round" text, "Overall" text, "NHL Team" text, "MWEHL Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What round did the MWEHL team, Detroit Honeybaked, and the NHL Team Columbus Blue Jackets play?
SELECT "Round" FROM table_8406 WHERE "MWEHL Team" = 'detroit honeybaked' AND "NHL Team" = 'columbus blue jackets'
wikisql
CREATE TABLE table_60020 ( "Date" text, "Result" text, "Competition" text, "Venue" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Venue that has an Attendance larger than 1,000, and a Result of scotland 12-20 samoa?
SELECT "Venue" FROM table_60020 WHERE "Attendance" > '1,000' AND "Result" = 'scotland 12-20 samoa'
wikisql
CREATE TABLE table_name_2 ( manner_of_departure VARCHAR, date_of_appointment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the manner of departure for 1 june 2007
SELECT manner_of_departure FROM table_name_2 WHERE date_of_appointment = "1 june 2007"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT demographic.language FROM demographic WHERE demographic.subject_id = "12220"
mimicsql_data
CREATE TABLE table_name_24 ( frequency VARCHAR, coverage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the frequency of the station with a coverage of oaxaca guerrero puebla?
SELECT frequency FROM table_name_24 WHERE coverage = "oaxaca guerrero puebla"
sql_create_context
CREATE TABLE table_79710 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many golds have 3 as the rank, with a total greater than 7?
SELECT COUNT("Gold") FROM table_79710 WHERE "Rank" = '3' AND "Total" > '7'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescription...
SELECT demographic.days_stay, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "4589"
mimicsql_data
CREATE TABLE club ( clublocation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many clubs are located at 'HHH'?
SELECT COUNT(*) FROM club WHERE clublocation = "HHH"
sql_create_context
CREATE TABLE table_58217 ( "Date" text, "Competition" text, "Venue" text, "Result" text, "Score" text, "Goals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result at valley parade on 4/7/02?
SELECT "Result" FROM table_58217 WHERE "Venue" = 'valley parade' AND "Date" = '4/7/02'
wikisql
CREATE TABLE table_203_862 ( id number, "draw" number, "artist" text, "song" text, "points" number, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did the song gitara or yesh earn more points ?
SELECT "song" FROM table_203_862 WHERE "song" IN ('"gitara"', '"yesh"') ORDER BY "points" DESC LIMIT 1
squall
CREATE TABLE table_75162 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what date has the record of 77-62?
SELECT "Date" FROM table_75162 WHERE "Record" = '77-62'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE bdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, K...
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.B...
css
CREATE TABLE table_77646 ( "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. -- What was the score on October 31?
SELECT "Score" FROM table_77646 WHERE "Date" = 'october 31'
wikisql
CREATE TABLE table_21356 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Competition" text, "Man of the Match" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the attendance was 1568, who was man of the m...
SELECT "Man of the Match" FROM table_21356 WHERE "Attendance" = '1568'
wikisql
CREATE TABLE table_46306 ( "Season" text, "Timeslot" text, "Premiere" text, "Finale" text, "TV season" text, "Ranking" text, "Viewers (in millions)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time did the season finale air on May 20...
SELECT "Timeslot" FROM table_46306 WHERE "Finale" = 'may 20, 2003'
wikisql