instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
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.icd9_code = "30390" AND prescriptions.route = "PB"
mimicsql_data
CREATE TABLE table_70598 ( "Poll source" text, "Date(s) administered" text, "Tom Campbell*" text, "Meg Whitman" text, "Steve Poizner" text, "Peter Foy*" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did Meg Whitman get 60%?
SELECT "Date(s) administered" FROM table_70598 WHERE "Meg Whitman" = '60%'
wikisql
CREATE TABLE table_name_17 ( episode_number VARCHAR, podcast_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the episode number of the episode that aired on August 8, 2005?
SELECT episode_number FROM table_name_17 WHERE podcast_date = "august 8, 2005"
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, Deletio...
SELECT COUNT(PostId) FROM Tags, PostTags, Posts WHERE Tags.Id = PostTags.TagId AND Posts.Id = PostId AND Tags.TagName = 'angularjs' AND Posts.CreationDate > '2013-10-01' AND Posts.CreationDate < '2014-01-01' GROUP BY TagName
sede
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varch...
SELECT PHONE_NUMBER, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY PHONE_NUMBER DESC
nvbench
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 = '8078105' AND t_kc21.IN_HOSP_DATE BETWEEN '2008-02-04' AND '2014-05-24')
css
CREATE TABLE table_47300 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score on 23 November 1983 with exeter city as the away team?
SELECT "Score" FROM table_47300 WHERE "Date" = '23 november 1983' AND "Away team" = 'exeter city'
wikisql
CREATE TABLE table_name_38 ( height VARCHAR, date_of_birth VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Height of the Player with a Date of Birth of 1982-07-05?
SELECT height FROM table_name_38 WHERE date_of_birth = "1982-07-05"
sql_create_context
CREATE TABLE table_name_67 ( source VARCHAR, cartridge VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Source, when Cartridge is .375 remington ultra magnum?
SELECT source FROM table_name_67 WHERE cartridge = ".375 remington ultra magnum"
sql_create_context
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE student_record ( studen...
SELECT COUNT(DISTINCT course.course_id, semester.semester) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'department0' AND course.number BETWEEN 400 AND 400 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = course_offering.se...
advising
CREATE TABLE table_14009909_1 ( counties_represented VARCHAR, first_elected VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country has a delegate who was first elected in 2006?
SELECT counties_represented FROM table_14009909_1 WHERE first_elected = 2006
sql_create_context
CREATE TABLE table_36916 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Second has a Skip of barbora vojtusova?
SELECT "Second" FROM table_36916 WHERE "Skip" = 'barbora vojtusova'
wikisql
CREATE TABLE band ( id number, firstname text, lastname text ) CREATE TABLE albums ( aid number, title text, year number, label text, type text ) CREATE TABLE tracklists ( albumid number, position number, songid number ) CREATE TABLE performance ( songid number, ba...
SELECT type FROM vocals AS T1 JOIN songs AS T2 ON T1.songid = T2.songid WHERE title = "Badlands"
spider
CREATE TABLE table_name_52 ( opponent VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent at the week 6 game?
SELECT opponent FROM table_name_52 WHERE week = 6
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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...
SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE mzjzjlb.ZZYSGH = '22158304' AND mzjzjlb.JZKSRQ BETWEEN '2003-05-25' AND '2013-08-20'
css
CREATE TABLE table_30882 ( "Network" text, "Flagship" text, "Programming" text, "Region" text, "Origin" text, "Owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which network serves the Guerrero region
SELECT "Network" FROM table_30882 WHERE "Region" = 'Guerrero'
wikisql
CREATE TABLE table_42793 ( "Name" text, "Innings" real, "Runs Scored" real, "Balls Faced" real, "Average" real, "S.R." real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of Average has a S.R. of 70.43 and Runs Scored smaller than 293?
SELECT MIN("Average") FROM table_42793 WHERE "S.R." = '70.43' AND "Runs Scored" < '293'
wikisql
CREATE TABLE table_name_40 ( quantity INTEGER, number_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average quantity that has 1104 as the number(s)?
SELECT AVG(quantity) FROM table_name_40 WHERE number_s_ = "1104"
sql_create_context
CREATE TABLE table_name_30 ( player VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the player with a score of 72-68-70=210?
SELECT player FROM table_name_30 WHERE score = 72 - 68 - 70 = 210
sql_create_context
CREATE TABLE table_name_30 ( lost VARCHAR, losing_bonus VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Lost with a Losing Bonus that is 4?
SELECT lost FROM table_name_30 WHERE losing_bonus = "4"
sql_create_context
CREATE TABLE table_22825058_23 ( round VARCHAR, opponents VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the round for john van lottum martin verkerk
SELECT round FROM table_22825058_23 WHERE opponents = "John Van Lottum Martin Verkerk"
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 admissions ( row_id number, subject_id number, hadm_id number, admittime time, dis...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 27739) AND STRFTIME('%y-%m', prescriptions.startdate) = '2103-11' ORDER BY prescriptions.startdate DESC LIMIT 1
mimic_iii
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Insertion of one vascular stent"
mimicsql_data
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 medication ( medi...
SELECT allergy.drugname FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687')) AND DATETIME(allergy.allergytime, 'start of month') = DATETIME(...
eicu
CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, basePrice INTEGER, decor TEXT ) CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adul...
SELECT bedType, AVG(basePrice) FROM Rooms GROUP BY bedType
nvbench
CREATE TABLE table_name_56 ( example VARCHAR, type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the example with the associative type?
SELECT example FROM table_name_56 WHERE type = "associative"
sql_create_context
CREATE TABLE table_17432 ( "Model/Engine" text, "Capacity" text, "Cylinders/Valves" text, "Power/rpm" text, "Torque (Nm)/rpm" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the torque formula for the model/engine which has 1,753 cc capacity?...
SELECT "Torque (Nm)/rpm" FROM table_17432 WHERE "Capacity" = '1,753 cc'
wikisql
CREATE TABLE table_48771 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is To Par, when Score is 70, and when Player is 'Craig Stadler'?
SELECT "To par" FROM table_48771 WHERE "Score" = '70' AND "Player" = 'craig stadler'
wikisql
CREATE TABLE table_name_75 ( passengers INTEGER, airport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least passengers from the Dallas/Fort Worth International (DFW) airport?
SELECT MIN(passengers) FROM table_name_75 WHERE airport = "dallas/fort worth international (dfw)"
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Other anomalies of larynx, trachea, and bronchus" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE table_35208 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score in the game where the Blazers were the ho...
SELECT "Score" FROM table_35208 WHERE "Home" = 'blazers'
wikisql
CREATE TABLE table_name_97 ( smoke_point VARCHAR, total_fat VARCHAR, monounsaturated_fat VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smoke point with a total fat of 100g, and monounsaturated fat of 46g?
SELECT smoke_point FROM table_name_97 WHERE total_fat = "100g" AND monounsaturated_fat = "46g"
sql_create_context
CREATE TABLE table_13313 ( "Number" real, "Sanskrit" text, "International Alphabet of Sanskrit Transliteration" text, "Sanskrit gloss" text, "Western name" text, "Greek" text, "Gloss" text, "Tattva (Element)" text, "Quality" text, "Ruling Planet" text ) -- Using valid SQLite, a...
SELECT "Sanskrit" FROM table_13313 WHERE "Greek" = 'λέων'
wikisql
CREATE TABLE table_76548 ( "Game" real, "Date" text, "Score" text, "Location" text, "Time" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many games have an Attendance of 19,190?
SELECT COUNT("Game") FROM table_76548 WHERE "Attendance" = '19,190'
wikisql
CREATE TABLE appellations ( No INTEGER, Appelation TEXT, County TEXT, State TEXT, Area TEXT, isAVA TEXT ) CREATE TABLE grapes ( ID INTEGER, Grape TEXT, Color TEXT ) CREATE TABLE wine ( No INTEGER, Grape TEXT, Winery TEXT, Appelation TEXT, State TEXT, Name TE...
SELECT Name, COUNT(Name) FROM appellations AS T1 JOIN wine AS T2 ON T1.Appelation = T2.Appelation WHERE T1.County = "Monterey" AND T2.Price < 50 GROUP BY Name
nvbench
CREATE TABLE entrepreneur ( entrepreneur_id number, people_id number, company text, money_requested number, investor text ) CREATE TABLE people ( people_id number, name text, height number, weight number, date_of_birth text ) -- Using valid SQLite, answer the following questio...
SELECT investor FROM entrepreneur GROUP BY investor ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_name_83 ( record VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where the time is 2:46, what is the record?
SELECT record FROM table_name_83 WHERE time = "2:46"
sql_create_context
CREATE TABLE table_name_90 ( output VARCHAR, ir_leds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the output with no IR LEDs?
SELECT output FROM table_name_90 WHERE ir_leds = "no"
sql_create_context
CREATE TABLE table_66429 ( "Millewa" text, "Wins" real, "Forfeits" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Forfeits have Wins smaller than 8, and Losses larger than 16?
SELECT COUNT("Forfeits") FROM table_66429 WHERE "Wins" < '8' AND "Losses" > '16'
wikisql
CREATE TABLE table_52575 ( "Player" text, "Tries" text, "Conv" text, "Pens" text, "Drop" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the venue that has conv of 5 players on 20 points
SELECT "Venue" FROM table_52575 WHERE "Conv" = '5 players on 20 points'
wikisql
CREATE TABLE table_18446 ( "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. -- What was the result of the election in which Walter E. Rogers was the in...
SELECT "Result" FROM table_18446 WHERE "Incumbent" = 'Walter E. Rogers'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, pa...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'coronary artery disease' AND STRFTIME('%y', ...
eicu
CREATE TABLE table_name_83 ( against INTEGER, central_murray VARCHAR, losses VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the most againsts with more than 11 losses and central murray is Nyah Nyah West Utd?
SELECT MAX(against) FROM table_name_83 WHERE central_murray = "nyah nyah west utd" AND losses > 11
sql_create_context
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, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'TAMPA' AND date_day.day_number = 25 AND date_day.month_number = 6 AND dat...
atis
CREATE TABLE table_47637 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Venue of the 2009 Gulf Cup of Nations?
SELECT "Venue" FROM table_47637 WHERE "Competition" = '2009 gulf cup of nations'
wikisql
CREATE TABLE table_name_28 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score against home team, Richmond?
SELECT away_team AS score FROM table_name_28 WHERE home_team = "richmond"
sql_create_context
CREATE TABLE table_47047 ( "Rank" real, "Title" text, "Studio" text, "Director(s)" text, "Worldwide Gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which title had rank 9?
SELECT "Title" FROM table_47047 WHERE "Rank" = '9'
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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT AVG(demographic.days_stay) FROM demographic WHERE demographic.age >= "49"
mimicsql_data
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.language = "CAPE" AND demographic.age < "68"
mimicsql_data
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeI...
SELECT question.Id AS "post_link", answers.CreationDate, answers.Id AS "post_link", answers.OwnerUserId AS "user_link", cr.Name FROM Posts AS answers INNER JOIN Posts AS question ON question.Id = answers.ParentId INNER JOIN PostHistory AS ph ON ph.PostId = question.Id INNER JOIN CloseReasonTypes AS cr ON cr.Id = ph.Com...
sede
CREATE TABLE table_261927_2 ( type VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different types are allocated to the institution in Bridgewater, Massachusetts?
SELECT COUNT(type) FROM table_261927_2 WHERE location = "Bridgewater, Massachusetts"
sql_create_context
CREATE TABLE table_1341865_44 ( incumbent VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many incumbent with district being tennessee 5
SELECT COUNT(incumbent) FROM table_1341865_44 WHERE district = "Tennessee 5"
sql_create_context
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE...
SELECT DISTINCT flight.departure_time 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 = 'OAKLAND' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = '...
atis
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count ...
SELECT Id AS "post_link", Tags FROM Posts WHERE CreationDate > DATEADD(month, -2, GETDATE()) AND AcceptedAnswerId IS NULL AND PostTypeId = 1 AND AnswerCount = 0
sede
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), ...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY AVG(SALARY)
nvbench
CREATE TABLE table_13530 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text, "Language/Rebroadcast" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the frequency when the format is contemporary christian mu...
SELECT "Frequency" FROM table_13530 WHERE "Format" = 'contemporary christian music'
wikisql
CREATE TABLE table_66625 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the RECNet with a Class of B and the City of License of Rouyn-Nor...
SELECT "RECNet" FROM table_66625 WHERE "Class" = 'b' AND "City of license" = 'rouyn-noranda'
wikisql
CREATE TABLE table_46716 ( "Season" text, "Competition" text, "Round" text, "Club" text, "1st Leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1st leg of the uefa intertoto cup competition with club silkeborg?
SELECT "1st Leg" FROM table_46716 WHERE "Competition" = 'uefa intertoto cup' AND "Club" = 'silkeborg'
wikisql
CREATE TABLE table_49591 ( "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. -- For what competition was the venue away the n/a th...
SELECT "Competition" FROM table_49591 WHERE "Venue" = 'away' AND "Man of the Match" = 'n/a'
wikisql
CREATE TABLE table_2114 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Nickname" text, "Joined" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years are listed under joined for the Nor'easter...
SELECT COUNT("Joined") FROM table_2114 WHERE "Nickname" = 'Nor''easters'
wikisql
CREATE TABLE table_name_85 ( genre VARCHAR, artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What genre is Led Zeppelin?
SELECT genre FROM table_name_85 WHERE artist = "led zeppelin"
sql_create_context
CREATE TABLE loan ( loan_id text, loan_type text, cust_id text, branch_id text, amount number ) CREATE TABLE bank ( branch_id number, bname text, no_of_customers number, city text, state text ) CREATE TABLE customer ( cust_id text, cust_name text, acc_type text, ...
SELECT SUM(acc_bal) FROM customer WHERE state = 'Utah' OR state = 'Texas'
spider
CREATE TABLE payments ( amount_due INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average amount due for all the payments?
SELECT AVG(amount_due) FROM payments
sql_create_context
CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CREATE TABLE state ( state_code text, state...
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 = 'PHI...
atis
CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE days ( days_code varchar, day_name 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, 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 = 'BOSTON...
atis
CREATE TABLE table_name_95 ( rank INTEGER, lost VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Rank has a Lost smaller than 12, and a Played larger than 20, and an Avg Points larger than 1.73?
SELECT MAX(rank) FROM table_name_95 WHERE lost < 12 AND played > 20 AND Avg.points > 1.73
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.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '5697273' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_CD
css
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalpe...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '032-12408')) AND diagnosis.diagnosisname = 'cardiomyopathy' AND STRFTIME('%y...
eicu
CREATE TABLE table_22824312_1 ( class VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What class was ren alde?
SELECT class FROM table_22824312_1 WHERE player = "Ren Alde"
sql_create_context
CREATE TABLE table_name_88 ( league VARCHAR, league_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What league has a position of 8/13?
SELECT league FROM table_name_88 WHERE league_position = "8/13"
sql_create_context
CREATE TABLE table_7476 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the label from the Netherlands?
SELECT "Label" FROM table_7476 WHERE "Region" = 'netherlands'
wikisql
CREATE TABLE table_2139390_2 ( team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the team for june 20
SELECT team FROM table_2139390_2 WHERE date = "June 20"
sql_create_context
CREATE TABLE table_name_71 ( representative VARCHAR, lifespan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Representative had a Lifespan of 1795 1866?
SELECT representative FROM table_name_71 WHERE lifespan = "1795–1866"
sql_create_context
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 COUNT(*) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '秦鸿达' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-07-26' AND '2015-09-20' AND t_kc24.MED_AMOUT <= 10
css
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 zyjzjlb.KH, zyjzjlb.KLX FROM zyjzjlb WHERE zyjzjlb.JZLSH = '17934842650'
css
CREATE TABLE table_name_64 ( name__pinyin_ VARCHAR, name__wade_giles_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name (pinyin) is named fu-ching?
SELECT name__pinyin_ FROM table_name_64 WHERE name__wade_giles_ = "fu-ching"
sql_create_context
CREATE TABLE table_28126 ( "Sec" real, "Offence" text, "Definition, example or notes" text, "Civilian?" text, "Summary Hearing?" text, "Max. sentence at Court Martial" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the summmary hearing w...
SELECT "Summary Hearing?" FROM table_28126 WHERE "Definition, example or notes" = 'Flying an aircraft so as to annoy any person'
wikisql
CREATE TABLE Rooms ( roomName VARCHAR, decor VARCHAR, bedtype VARCHAR, basePrice VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the names and decor of rooms that have a king bed. Sort the list by their price.
SELECT roomName, decor FROM Rooms WHERE bedtype = 'King' ORDER BY basePrice
sql_create_context
CREATE TABLE table_13956521_2 ( writer_s_ VARCHAR, original_airdate VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the the writer(s) with original airdate being february 7, 2001
SELECT writer_s_ FROM table_13956521_2 WHERE original_airdate = "February 7, 2001"
sql_create_context
CREATE TABLE table_16643 ( "Edition" real, "Zone" text, "Round" text, "Date" text, "Against" text, "Surface" text, "Opponent" text, "Outcome" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of round ...
SELECT "Outcome" FROM table_16643 WHERE "Round" = '2R'
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 INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Family hx-malignancy NEC" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE advisor ( s_id text, i_id text ) CREATE TABLE classroom ( building text, room_number text, capacity number ) CREATE TABLE time_slot ( time_slot_id text, day text, start_hr number, start_min number, end_hr number, end_min number ) CREATE TABLE teaches ( id ...
SELECT name FROM instructor WHERE salary > (SELECT MAX(salary) FROM instructor WHERE dept_name = 'Biology')
spider
CREATE TABLE table_31095 ( "Name" text, "Occupation" text, "Gender" text, "Prison connection" text, "Played by" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many prisons is Joan Leaven connected with?
SELECT COUNT("Prison connection") FROM table_31095 WHERE "Name" = 'Joan Leaven'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE diagnoses_icd ( row_id numbe...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, COUNT(*) AS c1 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_title = 'spinal canal explor n...
mimic_iii
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 prescriptions...
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "813"
mimicsql_data
CREATE TABLE table_17628022_2 ( pregame_analysts VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did pregame analysis in 2002?
SELECT pregame_analysts FROM table_17628022_2 WHERE year = 2002
sql_create_context
CREATE TABLE table_74818 ( "Week" real, "Date" text, "Kickoff (ET)" text, "Opponent" text, "Result" text, "Record" text, "Game site" text, "NFL Recap" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Game site of heinz...
SELECT "Opponent" FROM table_74818 WHERE "Game site" = 'heinz field' AND "Record" = '3–1'
wikisql
CREATE TABLE table_name_19 ( runner_s__up VARCHAR, margin_of_victory VARCHAR, winning_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is runner-up where the winning score is 6 (65-70-70-69=274) and the margin of victory is 3 strokes?
SELECT runner_s__up FROM table_name_19 WHERE margin_of_victory = "3 strokes" AND winning_score = –6(65 - 70 - 70 - 69 = 274)
sql_create_context
CREATE TABLE table_name_99 ( attendance INTEGER, points VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many attended the game against the sharks with over 86 points?
SELECT AVG(attendance) FROM table_name_99 WHERE points > 86 AND opponent = "sharks"
sql_create_context
CREATE TABLE table_name_38 ( player VARCHAR, position VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the quarterback for Arkansas State?
SELECT player FROM table_name_38 WHERE position = "quarterback" AND college = "arkansas state"
sql_create_context
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'CJS' AND course.number = 799 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.of...
advising
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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '58061433' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2009-08-27' AND '2021-02-09' AND t_kc22.MED_I...
css
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 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_name_97 ( location VARCHAR, county VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which location is in 71 St. Joseph county with South Bend Washington school?
SELECT location FROM table_name_97 WHERE county = "71 st. joseph" AND school = "south bend washington"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "49" AND procedures.icd9_code = "9920"
mimicsql_data
CREATE TABLE table_17270 ( "Series #" real, "Season #" real, "Title" text, "Directed by" text, "Written by" text, "Musical guest and song" text, "Original air date" text, "Production code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- H...
SELECT COUNT("Directed by") FROM table_17270 WHERE "Title" = 'Man''s Best Friend'
wikisql
CREATE TABLE table_name_14 ( runner VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many 5K wins did Emily Chebet, who had more than 2 total, have?
SELECT SUM(5 AS k_wins) FROM table_name_14 WHERE runner = "emily chebet" AND total > 2
sql_create_context
CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE departments ( department_id number, department_name text, manager_id number, location_id number ) CREATE TABLE regions ( region_id number, region_name text ) CREATE TABLE count...
SELECT first_name, last_name, hire_date FROM employees WHERE department_id = (SELECT department_id FROM employees WHERE first_name = "Clara") AND first_name <> "Clara"
spider
CREATE TABLE table_name_22 ( year INTEGER, result VARCHAR, extra VARCHAR, tournament VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year that anna thompson had an 8th place result in team competition at the worl...
SELECT AVG(year) FROM table_name_22 WHERE tournament = "world cross country championships" AND venue = "st etienne, france" AND extra = "team competition" AND result = "8th"
sql_create_context
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId...
SELECT 'Answer' AS Type, q.Id AS "post_link", NULL AS "comment_link", a.CreationDate AS Date, a.OwnerUserId AS "useridf" FROM Posts AS a, Posts AS q WHERE a.ParentId = q.Id AND a.PostTypeId = 2 UNION ALL SELECT 'Comment' AS Type, c.PostId AS "post_link", c.Id AS "comment_link", c.CreationDate AS Date, c.UserId AS UserI...
sede