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 diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "ELECTIVE" AND demographic.diagnosis = "MORBID OBESITY/SDA"
mimicsql_data
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT AVG(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_AGE > 25 UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_AGE > 25 UNION SELECT zyb.MED_CLINIC_ID FROM zyb WHERE zyb.PERSON_AGE > 25 UNION SELECT mzb.MED_CLINIC_ID FROM mzb WHERE mzb.PERSON...
css
CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE competition ( Competition_ID int, Year real, Competition_type text, Country text ) CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Trie...
SELECT Competition_type, COUNT(Competition_type) FROM competition GROUP BY Competition_type
nvbench
CREATE TABLE table_name_43 ( number_s_ VARCHAR, quantity VARCHAR, year_s__of_manufacture VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What number was manufactured 1 in 1841?
SELECT number_s_ FROM table_name_43 WHERE quantity = "1" AND year_s__of_manufacture = "1841"
sql_create_context
CREATE TABLE table_67526 ( "Name" text, "Street address" text, "Years as tallest" text, "Height feet / m" text, "Floors" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listsed as the Height feet/m and has a Street address of 2345 Grand Avenu...
SELECT "Height feet / m" FROM table_67526 WHERE "Street address" = '2345 grand avenue'
wikisql
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program ( program_id int, name varchar, college varc...
SELECT DISTINCT course.department, course.name, course.number FROM program_course INNER JOIN course ON program_course.course_id = course.course_id WHERE course.department = 'BUDDHST'
advising
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE member_of_club ( stuid number, clubid number, position text ) CREATE TABLE club ( clubid number, clubname text, clubdes...
SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Bootup Baltimore" AND t2.position = "President"
spider
CREATE TABLE table_name_93 ( opponent_in_the_final VARCHAR, tournament VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the final opponent in the tournament in Taipei, Taiwan on November 14, 1994?
SELECT opponent_in_the_final FROM table_name_93 WHERE tournament = "taipei, taiwan" AND date = "november 14, 1994"
sql_create_context
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE diagnoses_icd ( ...
SELECT (SELECT SUM(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 16088) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1)) - ...
mimic_iii
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '027-107035' AND STRFTIME('%y', patient.hospitaladmittime) >= '2105' ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TAB...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BOSTON' AND ground_service.city_code = city.city_code AND ground_service.transport_type = 'LIMOUSINE'
atis
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 WHERE demographic.diagnosis = "BRADYCARDIA" AND demographic.dob_year < "2121"
mimicsql_data
CREATE TABLE artist ( artist_name varchar2(50), country varchar2(20), gender varchar2(20), preferred_genre varchar2(50) ) CREATE TABLE genre ( g_name varchar2(20), rating varchar2(10), most_popular_in varchar2(50) ) CREATE TABLE song ( song_name varchar2(50), artist_name varchar2(5...
SELECT formats, COUNT(*) FROM files GROUP BY formats
nvbench
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 MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.days_stay = "26"
mimicsql_data
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT COUNT(mzjzjlb.ZZYSGH) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJ...
css
CREATE TABLE documents ( document_name VARCHAR, document_code VARCHAR ) CREATE TABLE document_sections ( document_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the document with the most number of sections?
SELECT t1.document_name FROM documents AS t1 JOIN document_sections AS t2 ON t1.document_code = t2.document_code GROUP BY t1.document_code ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '82401531269' AND UP_LIMIT_AMO > 1503.26
css
CREATE TABLE shops ( shop_id number, shop_details text ) CREATE TABLE ref_attraction_types ( attraction_type_code text, attraction_type_description text ) CREATE TABLE features ( feature_id number, feature_details text ) CREATE TABLE staff ( staff_id number, tourist_attraction_id numb...
SELECT T2.star_rating_description FROM hotels AS T1 JOIN ref_hotel_star_ratings AS T2 ON T1.star_rating_code = T2.star_rating_code WHERE T1.price_range > 10000
spider
CREATE TABLE table_24099628_1 ( brand_name VARCHAR, model__list_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the brand name associated with a model name e4xxx?
SELECT brand_name FROM table_24099628_1 WHERE model__list_ = "E4xxx"
sql_create_context
CREATE TABLE table_28298471_14 ( stage INTEGER, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When svein tuft is the winner what is the highest stage?
SELECT MAX(stage) FROM table_28298471_14 WHERE winner = "Svein Tuft"
sql_create_context
CREATE TABLE transactions_lots ( transaction_id number, lot_id number ) CREATE TABLE investors ( investor_id number, investor_details text ) CREATE TABLE lots ( lot_id number, investor_id number, lot_details text ) CREATE TABLE purchases ( purchase_transaction_id number, purchase_...
SELECT MIN(amount_of_transaction) FROM transactions WHERE transaction_type_code = "PUR" AND share_count > 50
spider
CREATE TABLE table_5548 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest grid number that had a rider with KTM as the manufacturer who did more than 20 la...
SELECT MIN("Grid") FROM table_5548 WHERE "Manufacturer" = 'ktm' AND "Laps" > '20'
wikisql
CREATE TABLE table_51061 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Socket" text, "Release date" text, "Part number(s)" text ) -- Using valid SQLite, answer the following questions for the...
SELECT "Model number" FROM table_51061 WHERE "Part number(s)" = 'ay80609003987ab'
wikisql
CREATE TABLE table_30788 ( "Player" text, "Matches" real, "Innings" real, "Runs" real, "Average" text, "Highest Score" text, "100s" real, "50s" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries is under 50s column when the ...
SELECT "50s" FROM table_30788 WHERE "Average" = '39.60'
wikisql
CREATE TABLE products ( code number, name text, price number, manufacturer number ) CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find t...
SELECT name, headquarter, founder FROM manufacturers ORDER BY revenue DESC LIMIT 1
spider
CREATE TABLE table_986 ( "Name Of Place" text, "Height from Sea Level In Meters" text, "Nearby Town" text, "Trekking Route" text, "Category" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- picturesque and trekking route is the category what is the he...
SELECT "Height from Sea Level In Meters" FROM table_986 WHERE "Category" = 'Picturesque and Trekking Route'
wikisql
CREATE TABLE table_66863 ( "Player" text, "Years" text, "Goals" real, "Assists" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many assists does David Tomlinson have?
SELECT SUM("Assists") FROM table_66863 WHERE "Player" = 'david tomlinson'
wikisql
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fa...
SELECT COUNT(DISTINCT fare.fare_id) FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'TACOMA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_...
atis
CREATE TABLE table_25455 ( "Date" text, "Location" text, "Opponent" text, "Terps Points" real, "Opp. Points" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game on jan. 16/06 played?
SELECT "Location" FROM table_25455 WHERE "Date" = 'Jan. 16/06'
wikisql
CREATE TABLE table_11988 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest rank when the metal total is 1 and the nation is the United Kingdom?
SELECT MAX("Rank") FROM table_11988 WHERE "Total" = '1' AND "Nation" = 'united kingdom'
wikisql
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '李莹华' AND hz_info.YLJGDM = '4179709' AND zyjzjlb.CYKSMC LIKE '%眼外伤%'
css
CREATE TABLE table_15269 ( "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. -- When has an Attendance larger than 20,066 in tampa bay?
SELECT "Date" FROM table_15269 WHERE "Attendance" > '20,066' AND "Home" = 'tampa bay'
wikisql
CREATE TABLE table_1449176_1 ( altitude__mslm_ VARCHAR, area__km_2__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many altitudes does the common with an area of 130.7 km^2 have?
SELECT COUNT(altitude__mslm_) FROM table_1449176_1 WHERE area__km_2__ = "130.7"
sql_create_context
CREATE TABLE table_name_61 ( object_type VARCHAR, ngc_number VARCHAR, right_ascension___j2000__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What type of object has an NGC number higher than 2090 and has a right ascension (J2000) of 05h52m19s?
SELECT object_type FROM table_name_61 WHERE ngc_number > 2090 AND right_ascension___j2000__ = "05h52m19s"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_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, C...
SELECT COUNT(*) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4451945' AND t_kc21.IN_HOSP_DATE BETWEEN '2019-07-05' AND '2021-01-11' AND t_kc21.SERVANT_FLG = '公务员'
css
CREATE TABLE customers ( payment_method VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the payment methods?
SELECT DISTINCT payment_method FROM customers
sql_create_context
CREATE TABLE table_71183 ( "Goal" real, "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of the match on January 26, 2006?
SELECT "Result" FROM table_71183 WHERE "Date" = 'january 26, 2006'
wikisql
CREATE TABLE table_50164 ( "Team #1" text, "Points" text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 1st Leg, when Team #2 is 'Emelec'?
SELECT "1st leg" FROM table_50164 WHERE "Team #2" = 'emelec'
wikisql
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 aircraft ( aircraft_code varchar, aircraft_description varchar, manufac...
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 = 'OAKLAND' AND date_day.day_number = 25 AND date_day.month_number = 6 AND d...
atis
CREATE TABLE table_37467 ( "Team" text, "Location" text, "Venue" text, "Capacity" real, "Position in 2003" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Location for Belshina?
SELECT "Location" FROM table_37467 WHERE "Team" = 'belshina'
wikisql
CREATE TABLE wine ( no number, grape text, winery text, appelation text, state text, name text, year number, price number, score number, cases number, drink text ) CREATE TABLE grapes ( id number, grape text, color text ) CREATE TABLE appellations ( no numbe...
SELECT appelation FROM wine WHERE year > 2008 EXCEPT SELECT appelation FROM appellations WHERE area = "Central Coast"
spider
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '1393736' GROUP BY t_kc21.MED_ORG_DEPT_NM, t_kc21.OUT_DIAG_DIS_NM HAVING AVG(t_kc21.PERSON_AGE) > 10
css
CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_labitems...
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 77177) GROUP BY prescriptions.drug) AS t1 WHERE t1.c1 >= 2
mimic_iii
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.icd9_code = "2809"
mimicsql_data
CREATE TABLE Documents_Mailed ( mailing_date VARCHAR, document_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mail date of the document with id 7?
SELECT mailing_date FROM Documents_Mailed WHERE document_id = 7
sql_create_context
CREATE TABLE table_59660 ( "Name" text, "Residence" text, "Party" text, "Years in Assembly" text, "Years in Senate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Years in Senate has a Years in Assembly of 2010 present, and toni atkins?
SELECT "Years in Senate" FROM table_59660 WHERE "Years in Assembly" = '2010–present' AND "Name" = 'toni atkins'
wikisql
CREATE TABLE table_40181 ( "Name" text, "Pos." text, "Height" text, "Weight" real, "Year" text, "Hometown (Previous school)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Year of the person who is 6'1', and weighs more than 165?
SELECT "Year" FROM table_40181 WHERE "Height" = '6''1' AND "Weight" > '165'
wikisql
CREATE TABLE table_14544 ( "Tournament" text, "2007" text, "2008" text, "2009" text, "2011" text, "2012" text, "2013" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many sets were played in the 2011 tournament, in which 2R were played in...
SELECT "2011" FROM table_14544 WHERE "2008" = '2r'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
SELECT u.DisplayName, u.Reputation, a.AnswersCount, u.Reputation / a.AnswersCount AS RepPerAnswer FROM Users AS u JOIN (SELECT COUNT(1) AS AnswersCount, OwnerUserId FROM Posts WHERE PostTypeId = 2 GROUP BY OwnerUserId) AS a ON u.Id = a.OwnerUserId WHERE u.Reputation > 1000 ORDER BY u.Reputation DESC
sede
CREATE TABLE table_17429 ( "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. -- For the model with torque of n m (lb ft)/*n m (lb ft) @1750, what is the pow...
SELECT "Power/rpm" FROM table_17429 WHERE "Torque (Nm)/rpm" = 'N·m (lb·ft)/*N·m (lb·ft) @1750'
wikisql
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT COUNT(*) FROM Users AS u WHERE u.Reputation >= 3000
sede
CREATE TABLE table_64685 ( "Time" text, "Home team" text, "Score" text, "Away team" text, "Venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time did the match with an away team of Happy Valley Team B start?
SELECT "Time" FROM table_64685 WHERE "Away team" = 'happy valley team b'
wikisql
CREATE TABLE table_204_556 ( id number, "rank" number, "athlete" text, "country" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many athletes are from east germany ?
SELECT COUNT("athlete") FROM table_204_556 WHERE "country" = 'east germany'
squall
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.long_title = "Cerebral thrombosis with cerebral infarction" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_name_34 ( segment_a VARCHAR, segment_d VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which items in segment A have a segment D of marble sculptures?
SELECT segment_a FROM table_name_34 WHERE segment_d = "marble sculptures"
sql_create_context
CREATE TABLE table_name_46 ( korean VARCHAR, hanja VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's Korean for Hanja?
SELECT korean FROM table_name_46 WHERE hanja = "南楊州"
sql_create_context
CREATE TABLE table_204_799 ( id number, "name" text, "built" text, "listed" text, "location" text, "county" text, "type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the next name after bayou pierre bridge ?
SELECT "name" FROM table_204_799 WHERE id = (SELECT id FROM table_204_799 WHERE "name" = 'bayou pierre bridge' ORDER BY id DESC LIMIT 1) + 1
squall
CREATE TABLE table_40560 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Events when the top-25 is 12 and there are l...
SELECT AVG("Events") FROM table_40560 WHERE "Top-25" = '12' AND "Wins" < '0'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugsto...
SELECT t1.drugstarttime FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'enoxaparin' AND patient.uniquepid = '021-111547') AS t1 JOIN (SELECT patient.uniquepid, medication.drugstarttime FROM med...
eicu
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 hz_info_mzjzjlb ( JZLSH number, ...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN hz_info_mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND hz_info_mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) 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 ) CREATE...
SELECT name, ID FROM swimmer ORDER BY name DESC
nvbench
CREATE TABLE table_204_35 ( id number, "season" text, "tier" number, "division" text, "place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times did sd ponferradina b come in better than 5th place ?
SELECT COUNT(*) FROM table_204_35 WHERE "place" < 5
squall
CREATE TABLE table_27337 ( "2013/14" real, "2012/13" real, "2011/12" real, "2010/11" real, "Institute" text, "Region" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of regions for 2013/14 being 27
SELECT COUNT("Region") FROM table_27337 WHERE "2013/14" = '27'
wikisql
CREATE TABLE table_51021 ( "Game" real, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the team is @ Milwaukee, what is the name of the location where the game is ...
SELECT "Location Attendance" FROM table_51021 WHERE "Team" = '@ milwaukee'
wikisql
CREATE TABLE section ( course_id text, sec_id text, semester text, year number, building text, room_number text, time_slot_id text ) CREATE TABLE time_slot ( time_slot_id text, day text, start_hr number, start_min number, end_hr number, end_min number ) CREATE TABLE...
SELECT T2.name, T2.salary FROM advisor AS T1 JOIN instructor AS T2 ON T1.i_id = T2.id JOIN student AS T3 ON T1.s_id = T3.id WHERE T3.dept_name = 'Math'
spider
CREATE TABLE table_name_19 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent is on april 28?
SELECT opponent FROM table_name_19 WHERE date = "april 28"
sql_create_context
CREATE TABLE table_name_96 ( area__km_2__ VARCHAR, population VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of area listed for cannonvale with a population less than 409?
SELECT COUNT(area__km_2__) FROM table_name_96 WHERE population < 409 AND place = "cannonvale"
sql_create_context
CREATE TABLE table_name_27 ( total_votes VARCHAR, members VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were Holly Scouler's total votes?
SELECT total_votes FROM table_name_27 WHERE members = "holly scouler"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT t1.culturesite FROM (SELECT microlab.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microlab WHERE DATETIME(microlab.culturetakentime) <= DATETIME(CURRENT_TIME(), '-1 year') GROUP BY microlab.culturesite) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE table_20079931_4 ( round VARCHAR, circuit_location VARCHAR, pole_position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many rounds were there in Karlskoga Motorstadion with Roger Eriksson at the pole position?
SELECT COUNT(round) FROM table_20079931_4 WHERE circuit_location = "Karlskoga Motorstadion" AND pole_position = "Roger Eriksson"
sql_create_context
CREATE TABLE table_1112176_1 ( league_apps__sub_ INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- League apps (sub) maximum?
SELECT MAX(league_apps__sub_) FROM table_1112176_1
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TAB...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT medication.patientunitstayid FROM medication WHERE medication.drugname = 'hydromorphone 1 mg/1 ml syr')) GROUP BY cost.p...
eicu
CREATE TABLE table_name_79 ( nationality VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the C?
SELECT nationality FROM table_name_79 WHERE position = "c"
sql_create_context
CREATE TABLE table_36986 ( "Year" real, "Class" text, "Team" text, "Points" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins for team mv agusta, over 10 points, and after 1957?
SELECT SUM("Wins") FROM table_36986 WHERE "Team" = 'mv agusta' AND "Points" > '10' AND "Year" > '1957'
wikisql
CREATE TABLE table_76653 ( "Rider" text, "Manufacturer" text, "Laps" text, "Time/Retired" text, "Grid" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When rider John Hopkins had 21 laps, what was the grid?
SELECT "Grid" FROM table_76653 WHERE "Laps" = '21' AND "Rider" = 'john hopkins'
wikisql
CREATE TABLE table_name_65 ( director VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What director is from Poland?
SELECT director FROM table_name_65 WHERE country = "poland"
sql_create_context
CREATE TABLE table_name_90 ( number INTEGER, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of the player with a hometown of Bellwood, IL?
SELECT MIN(number) FROM table_name_90 WHERE hometown = "bellwood, il"
sql_create_context
CREATE TABLE table_203_584 ( id number, "date" text, "race name" text, "d(f)" number, "course" text, "prize (\u00a3)" number, "odds" text, "runners" number, "place" number, "margin" number, "winner/runner-up" text, "time" text, "jockey" text ) -- Using valid SQLite,...
SELECT COUNT(*) FROM table_203_584 WHERE "place" = 1
squall
CREATE TABLE table_33699 ( "Episode Number" real, "Title" text, "Podcast Date" text, "Run time" text, "Historical References" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the episode that is before 307, run time equals 5:48 and...
SELECT "Podcast Date" FROM table_33699 WHERE "Episode Number" < '307' AND "Historical References" = 'p.t. barnum' AND "Run time" = '5:48'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT HIRE_DATE, AVG(SALARY) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
nvbench
CREATE TABLE region ( region_id number, region_name text, date text, label text, format text, catalogue text ) CREATE TABLE member ( member_id number, member_name text, party_id text, in_office text ) CREATE TABLE party_events ( event_id number, event_name text, par...
SELECT party_name FROM party WHERE NOT party_id IN (SELECT party_id FROM member)
spider
CREATE TABLE invoices ( id number, customer_id number, invoice_date time, billing_address text, billing_city text, billing_state text, billing_country text, billing_postal_code text, total number ) CREATE TABLE tracks ( id number, name text, album_id number, media_ty...
SELECT T2.first_name, T2.last_name FROM employees AS T1 JOIN employees AS T2 ON T1.id = T2.reports_to WHERE T1.first_name = "Nancy" AND T1.last_name = "Edwards"
spider
CREATE TABLE table_43554 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the callsign of Mom's Radio 101.9 Zamboanga?
SELECT "Callsign" FROM table_43554 WHERE "Branding" = 'mom''s radio 101.9 zamboanga'
wikisql
CREATE TABLE table_75799 ( "Name" text, "Novelty" text, "Status" text, "Authors" text, "Location" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Novelty of the dinosaur that was named by the Author, Zhiming, and whose N...
SELECT "Novelty" FROM table_75799 WHERE "Authors" = 'zhiming' AND "Notes" = 'carcharodontosaurid'
wikisql
CREATE TABLE table_name_75 ( team VARCHAR, laps VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team had 159 laps and a Time/Retired of 6:30:02.3733?
SELECT team FROM table_name_75 WHERE laps = 159 AND time_retired = "6:30:02.3733"
sql_create_context
CREATE TABLE table_name_13 ( finish INTEGER, year VARCHAR, team VARCHAR, start VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Lowest finish for ganassi at smaller than 19 start for smaller than 2004 year?
SELECT MIN(finish) FROM table_name_13 WHERE team = "ganassi" AND start < 19 AND year < 2004
sql_create_context
CREATE TABLE table_4569 ( "Higher harmonics" text, "Darwin" text, "Period" text, "Speed" text, "Doodson coefficients" text, "NOAA" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which higher harmonics have a speed of 0.0821373?
SELECT "Higher harmonics" FROM table_4569 WHERE "Speed" = '0.0821373'
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "4142" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_name_92 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 1991 for 2R 1999?
SELECT 1991 FROM table_name_92 WHERE 1999 = "2r"
sql_create_context
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE city ( city_code varchar, ...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare 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...
atis
CREATE TABLE table_name_31 ( lane VARCHAR, time VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lane with a time of 1:56.64, and a tank smaller than 7?
SELECT COUNT(lane) FROM table_name_31 WHERE time = "1:56.64" AND rank < 7
sql_create_context
CREATE TABLE table_name_11 ( title VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What title did Mentuhotep IV have?
SELECT title FROM table_name_11 WHERE name = "mentuhotep iv"
sql_create_context
CREATE TABLE table_7191 ( "Outcome" text, "Date" real, "Tournament" text, "Surface" text, "Partner" text, "Opponents in the final" text, "Score in the final" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were the Opponents in the final ...
SELECT "Opponents in the final" FROM table_7191 WHERE "Score in the final" = '1–6, 6–3, 2–6'
wikisql
CREATE TABLE table_name_32 ( score VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game when Sheffield Wednesday was the home team?
SELECT score FROM table_name_32 WHERE home_team = "sheffield wednesday"
sql_create_context
CREATE TABLE prescribes ( physician number, patient number, medication number, date time, appointment number, dose text ) CREATE TABLE undergoes ( patient number, procedures number, stay number, dateundergoes time, physician number, assistingnurse number ) CREATE TABLE ...
SELECT T2.name FROM appointment AS T1 JOIN physician AS T2 ON T1.physician = T2.employeeid
spider
CREATE TABLE table_name_47 ( to_par VARCHAR, player VARCHAR, country VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par of player Tim Herron from the United States with a t3 place?
SELECT to_par FROM table_name_47 WHERE country = "united states" AND place = "t3" AND player = "tim herron"
sql_create_context
CREATE TABLE table_28934 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the incumbent first elected in the district where the result wa...
SELECT "First elected" FROM table_28934 WHERE "Result" = 'Democratic-Republican gain'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.YQBH, jyjgzbb.YQMC FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM ...
css
CREATE TABLE table_50005 ( "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 "High assists" FROM table_50005 WHERE "Team" = '@ milwaukee'
wikisql
CREATE TABLE table_name_52 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 1953 has 2 for 1947, and dne as 1938?
SELECT 1953 FROM table_name_52 WHERE 1947 = "2" AND 1938 = "dne"
sql_create_context