instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_28773 ( "Portuguese name" text, "English name" text, "Subdivides in" text, "Equivalence in Varas" text, "Metrical equivalence" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the equivalence for varas for geometrical pace
SELECT "Equivalence in Varas" FROM table_28773 WHERE "English name" = 'Geometrical pace'
wikisql
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_...
css
CREATE TABLE table_21928 ( "Episode #" text, "Season #" real, "Title" text, "Writer(s)" text, "Director" text, "Originalairdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the title of the episode 21a?
SELECT "Title" FROM table_21928 WHERE "Episode #" = '21a'
wikisql
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_Road, Team_ID FROM basketball_match ORDER BY All_Road
nvbench
CREATE TABLE table_name_59 ( surface VARCHAR, outcome VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the surface of the tournament with a runner-up outcome and dudi sela as the opponent?
SELECT surface FROM table_name_59 WHERE outcome = "runner-up" AND opponent = "dudi sela"
sql_create_context
CREATE TABLE table_19042 ( "Episode" text, "Original Air Date" text, "Viewers (millions)" text, "Presenter" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What episode of the Pride of Britain Awards had an audience of 6.06 million v...
SELECT "Episode" FROM table_19042 WHERE "Viewers (millions)" = '6.06'
wikisql
CREATE TABLE table_21035326_1 ( opponent VARCHAR, golden_bears_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponent was playing against the Golden Bears when they scored 3 points?
SELECT opponent FROM table_21035326_1 WHERE golden_bears_points = 3
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_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '凤夏彤' AND t_kc22.STA_DATE BETWEEN '2002-04-08' AND '2016-02-13' AND t_kc22.SELF_PAY_AMO > 3400.0
css
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE diagnosis ( diagnosisid number, ...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime, patient.patienthealthsystemstayid FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'ciprofloxacin in...
eicu
CREATE TABLE table_79062 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record for less than 78 games and a score of ...
SELECT "Record" FROM table_79062 WHERE "Game" < '78' AND "Score" = '114–109 (ot)'
wikisql
CREATE TABLE table_204_53 ( id number, "date" text, "result" text, "opponent" text, "event" text, "location" text, "method" text, "round" number, "time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times did grigorian have...
SELECT COUNT(*) FROM table_204_53 WHERE "location" = 'belgium'
squall
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(*) FROM (SELECT p.OwnerUserId AS "user_link", u.Reputation, ROUND(AVG(CAST(p.Score AS FLOAT)), 2) AS "avg_score", COUNT(*) AS "#_questions" FROM Posts AS p JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.PostTypeId = 2 AND p.CommunityOwnedDate IS NULL AND p.ClosedDate IS NULL AND u.Reputation > '##Minim...
sede
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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE diagn...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'lidocaine 2%')
mimic_iii
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT COUNT(DISTINCT admissions.hadm_id) FROM admissions WHERE admissions.subject_id = 22753 AND DATETIME(admissions.admittime) >= DATETIME(CURRENT_TIME(), '-3 year')
mimic_iii
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, ...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', diagnoses_icd.charttime)) FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'urin tract infection nos') AND diagnoses_icd.hadm_id IN (SELECT admissions.hadm_id FROM adm...
mimic_iii
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT COUNT(DISTINCT PERSON_ID) FROM t_kc21 WHERE MED_SER_ORG_NO = '6778599' AND (REMOTE_SETTLE_FLG = '异地1' OR REMOTE_SETTLE_FLG = '异地2')
css
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 demographic.admission_location, demographic.admittime FROM demographic WHERE demographic.subject_id = "45962"
mimicsql_data
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, ...
SELECT SUM(cost.cost) FROM cost WHERE cost.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3267) AND STRFTIME('%y', cost.chargetime) <= '2104'
mimic_iii
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '39911215'
css
CREATE TABLE table_20107762_1 ( assists VARCHAR, mins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amount of assists when mins is 744:27?
SELECT assists FROM table_20107762_1 WHERE mins = "744:27"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "80" AND procedures.icd9_code = "8949"
mimicsql_data
CREATE TABLE table_name_43 ( points INTEGER, team VARCHAR, chassis VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the highest points for the team of marlboro brm with brm p180 as the chassis?
SELECT MAX(points) FROM table_name_43 WHERE team = "marlboro brm" AND chassis = "brm p180"
sql_create_context
CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT Class, AVG(age) FROM captain GROUP BY Class ORDER BY AVG(age)
nvbench
CREATE TABLE table_name_48 ( gold VARCHAR, silver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the gold when Bertil Ahlin Sweden won the silver?
SELECT gold FROM table_name_48 WHERE silver = "bertil ahlin sweden"
sql_create_context
CREATE TABLE table_23124 ( "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. -- Name the college/junior club team for john campbell
SELECT "College/junior/club team" FROM table_23124 WHERE "Player" = 'John Campbell'
wikisql
CREATE TABLE table_name_50 ( director VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed Tequila?
SELECT director FROM table_name_50 WHERE title = "tequila"
sql_create_context
CREATE TABLE table_40000 ( "Round" real, "Overall" real, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Overall for the wide receiver in a round less than 2?
SELECT MIN("Overall") FROM table_40000 WHERE "Position" = 'wide receiver' AND "Round" < '2'
wikisql
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM ...
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '37475427497'
css
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 SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '2024496' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2006-11-13' AND '2018-05-18'
css
CREATE TABLE table_train_98 ( "id" int, "mini_mental_state_examination_mmse" int, "stroke" bool, "lyperlipidemia_ldl" int, "allergy_to_milk" bool, "allergy_to_soy" bool, "body_mass_index_bmi" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT * FROM table_train_98 WHERE mini_mental_state_examination_mmse >= 10 AND mini_mental_state_examination_mmse <= 28
criteria2sql
CREATE TABLE table_30120761_1 ( area__acres__ VARCHAR, poor_law_union VARCHAR, civil_parish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the acreages of the townlands in the Macroom poor law union and Macroom civil parish?
SELECT area__acres__ FROM table_30120761_1 WHERE poor_law_union = "Macroom" AND civil_parish = "Macroom"
sql_create_context
CREATE TABLE table_60062 ( "Position" real, "Club" text, "Played" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Points" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT AVG("Played") FROM table_60062 WHERE "Position" > '16'
wikisql
CREATE TABLE table_name_39 ( laps INTEGER, time VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of Laps that have a Time of +24.440, and a Grid higher than 18?
SELECT MIN(laps) FROM table_name_39 WHERE time = "+24.440" AND grid > 18
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 t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_CD, MIN(t_kc24.ILL_PAY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '9461389' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_CD
css
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.CKZFWXX, jyjgzbb.CKZFWSX FROM wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE wdmzjzjlb.JZZDBM = 'F42.715' AND jyjgzbb.JCZBDM = '677145' UNION SELECT jyjgzbb.CKZFWX...
css
CREATE TABLE table_67089 ( "Pick #" text, "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. -- Which team picked the player from the Toronto Marlboros (OHA...
SELECT "NHL team" FROM table_67089 WHERE "College/junior/club team" = 'toronto marlboros (oha)' AND "Pick #" = '32'
wikisql
CREATE TABLE table_204_902 ( id number, "rank" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the only person to rank from jamaica ?
SELECT "name" FROM table_204_902 WHERE "nationality" = 'jamaica'
squall
CREATE TABLE table_name_40 ( city VARCHAR, iata VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which city has the IATA SSG?
SELECT city FROM table_name_40 WHERE iata = "ssg"
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SUM(t_kc24.OVE_PAY) 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 '2004-04-24' AND '2021-01-07'
css
CREATE TABLE table_name_19 ( opponents_in_final VARCHAR, score_in_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponents in Final has a Score in Final of 7 5, 1 6 4 6?
SELECT opponents_in_final FROM table_name_19 WHERE score_in_final = "7–5, 1–6 4–6"
sql_create_context
CREATE TABLE table_15621965_14 ( player VARCHAR, school_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the player for seattle
SELECT player FROM table_15621965_14 WHERE school_club_team = "Seattle"
sql_create_context
CREATE TABLE table_name_45 ( discipline VARCHAR, championship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In which discipline was non-championship under Championship?
SELECT discipline FROM table_name_45 WHERE championship = "non-championship"
sql_create_context
CREATE TABLE table_204_621 ( id number, "no." number, "date" text, "tournament" text, "winning score" text, "margin\nof victory" text, "runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which margin of victory was the largest ?
SELECT "margin\nof victory" FROM table_204_621 ORDER BY "margin\nof victory" DESC LIMIT 1
squall
CREATE TABLE table_name_49 ( date VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the Mariners game when they had a record of 53 17?
SELECT date FROM table_name_49 WHERE record = "53–17"
sql_create_context
CREATE TABLE table_name_55 ( thai_name VARCHAR, transcription VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHich Thai name has a Transcription of wan phruehatsabodi?
SELECT thai_name FROM table_name_55 WHERE transcription = "wan phruehatsabodi"
sql_create_context
CREATE TABLE table_name_50 ( goals_scored VARCHAR, pos VARCHAR, years_active VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals were scored with a pos larger than 4 and active in 2001-?
SELECT goals_scored FROM table_name_50 WHERE pos > 4 AND years_active = "2001-"
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21_t_kc22.MED_CLINIC_ID = '33312894581' INTERSECT SELECT t_kc22.SOC_SRT_DIRE_NM FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON ...
css
CREATE TABLE table_name_35 ( percentage___percentage_ VARCHAR, males VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the percentage where males equal 99?
SELECT percentage___percentage_ FROM table_name_35 WHERE males = "99"
sql_create_context
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Manufacturer
nvbench
CREATE TABLE table_27213 ( "Player" text, "Minutes" real, "Field Goals" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points does the player with 2 s...
SELECT "Points" FROM table_27213 WHERE "Steals" = '2'
wikisql
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUser...
SELECT p.Id AS "post_link", p.Score, p.OwnerUserId AS "user_link", p.Tags FROM Posts AS p INNER JOIN Votes AS v ON p.Id = v.PostId WHERE v.VoteTypeId = 8 AND p.AnswerCount = 0 AND (v.CreationDate >= '##Date1?2016-01-01##') AND (v.CreationDate <= '##Date2?2016-06-01##') ORDER BY p.CreationDate
sede
CREATE TABLE table_name_51 ( rank INTEGER, peak_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of ranks when the Peak Name is Red Shirt Table?
SELECT SUM(rank) FROM table_name_51 WHERE peak_name = "red shirt table"
sql_create_context
CREATE TABLE table_name_50 ( gold VARCHAR, total VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Gold that has the Total larger than 2, and the Bronze smaller than 1?
SELECT gold FROM table_name_50 WHERE total > 2 AND bronze < 1
sql_create_context
CREATE TABLE table_17810099_3 ( writer_s_ VARCHAR, episode__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who wrote episode 14?
SELECT writer_s_ FROM table_17810099_3 WHERE episode__number = "14"
sql_create_context
CREATE TABLE table_204_207 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number, "bye" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- last home opponent of the season
SELECT "opponent" FROM table_204_207 WHERE "opponent" = 'home' ORDER BY "week" DESC LIMIT 1
squall
CREATE TABLE county ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many counties are there in total?
SELECT COUNT(*) FROM county
sql_create_context
CREATE TABLE table_name_54 ( spartak INTEGER, played VARCHAR, draw VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the sum of spartak when played is 102 and draw is less than 19?
SELECT SUM(spartak) FROM table_name_54 WHERE played = 102 AND draw < 19
sql_create_context
CREATE TABLE table_204_843 ( id number, "volume" number, "year" text, "names" text, "articles" number, "pages" number, "images" number, "maps" number, "number of copies" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in what year w...
SELECT "year" FROM table_204_843 ORDER BY "images" LIMIT 1
squall
CREATE TABLE table_77197 ( "Entered office" text, "Left office" text, "Party" text, "Election" text, "Coalition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did the party elected in jun. 1959 enter office?
SELECT "Entered office" FROM table_77197 WHERE "Election" = 'jun. 1959'
wikisql
CREATE TABLE table_name_7 ( series VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Series has a Date of may 2?
SELECT series FROM table_name_7 WHERE date = "may 2"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT zzmzjzjlb.YLJGDM FROM hz_info JOIN zzmzjzjlb ON hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE hz_info.RYBH = '65424109' UNION SELECT fzzmzjzjlb.YLJGDM FROM hz_info JOIN fzzmzjzjlb ON hz_info.YLJGDM = fzzmzjzjlb.YLJGDM AND hz_info.KH = fzzmzjzjlb.KH AND hz_i...
css
CREATE TABLE table_name_67 ( opponent_in_the_final VARCHAR, tournament VARCHAR, outcome VARCHAR, surface VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Opponent In The Final, when Outcome is 'Winner', when Surface is 'Carpet (I)', and when To...
SELECT opponent_in_the_final FROM table_name_67 WHERE outcome = "winner" AND surface = "carpet (i)" AND tournament = "lyon, france"
sql_create_context
CREATE TABLE table_203_562 ( id number, "state" text, "no. of candidates" number, "no. of elected" number, "total no. of seats in assembly" number, "year of election" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what state had only 30 seats ...
SELECT "state" FROM table_203_562 WHERE "total no. of seats in assembly" = 30
squall
CREATE TABLE table_name_38 ( try_bonus VARCHAR, points_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the try bonus that had 423 points?
SELECT try_bonus FROM table_name_38 WHERE points_for = "423"
sql_create_context
CREATE TABLE jybgb_jyjgzbb ( JYZBLSH number, YLJGDM text, jyjgzbb_id number ) 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...
SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 WHERE hz_info.RYBH = '43179204' AND NOT jybgb.BGDH IN (SELECT jyjgzbb.BGDH FROM jyjgzbb WH...
css
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 demographic.admission_type, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "1121"
mimicsql_data
CREATE TABLE table_name_36 ( total INTEGER, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the average Total that has the To par of 15?
SELECT AVG(total) FROM table_name_36 WHERE to_par = 15
sql_create_context
CREATE TABLE table_name_9 ( player VARCHAR, position VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player played center in 2010?
SELECT player FROM table_name_9 WHERE position = "center" AND year = 2010
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.long_title = "Unspecified essential hypertension"
mimicsql_data
CREATE TABLE table_name_7 ( attendance VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Attendance of the game on November 6, 1966?
SELECT attendance FROM table_name_7 WHERE date = "november 6, 1966"
sql_create_context
CREATE TABLE table_2448 ( "Round" real, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the winning team at Oulton Park when ...
SELECT "Winning Team" FROM table_2448 WHERE "Pole Position" = 'Max Chilton' AND "Circuit" = 'Oulton Park'
wikisql
CREATE TABLE table_204_311 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the total number of medals won by all the teams combined...
SELECT SUM("total") FROM table_204_311
squall
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.JCFF FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE person_info...
css
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_NM = '喻思聪' AND t_kc21.IN_HOSP_DATE BETWEEN '2002-10-16' AND '2006-01-26' GROUP BY t_kc21.IN_DIAG_DIS_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADELPHIA' AND flight.arrival_time > 2100 AND flight.to_airport = AIRPORT_SERVICE_1.ai...
atis
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.diagnosis = "CHEST PAIN" AND procedures.icd9_code = "3521"
mimicsql_data
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, t...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%Arrian%' OR course.description LIKE '%Arrian%' OR course.name LIKE '%Arrian%') AND program_cours...
advising
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '7425569' GROUP BY qtb.IN_DIAG_DIS_NM UNION SELECT gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '7425569' GROUP BY gyb.IN_DIAG_DIS_NM UNION SELECT zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb....
css
CREATE TABLE table_7083 ( "Team" text, "Match" real, "Points" real, "Draw" real, "Lost" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of draws for teams with more than 10 matches?
SELECT AVG("Draw") FROM table_7083 WHERE "Match" > '10'
wikisql
CREATE TABLE table_47498 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is T8 Place Player Scott Hoch's Score?
SELECT "Score" FROM table_47498 WHERE "Place" = 't8' AND "Player" = 'scott hoch'
wikisql
CREATE TABLE table_60372 ( "Nation" text, "Distance" text, "Athlete" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Athlete, when Nation is 'Nigeria'?
SELECT "Athlete" FROM table_60372 WHERE "Nation" = 'nigeria'
wikisql
CREATE TABLE table_64857 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which IHSAA Football Class has a School...
SELECT "IHSAA Football Class" FROM table_64857 WHERE "School" = 'whitko'
wikisql
CREATE TABLE table_52424 ( "School" text, "Location" text, "Enrolment" real, "Founded" real, "Denomination" text, "Day/Boarding" text, "School Colors" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is mt lawley day or boarding?
SELECT "Day/Boarding" FROM table_52424 WHERE "Location" = 'mt lawley'
wikisql
CREATE TABLE table_name_76 ( silver INTEGER, nation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most silver won by Norway?
SELECT MAX(silver) FROM table_name_76 WHERE nation = "norway"
sql_create_context
CREATE TABLE table_14604 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the score for 26 may 1997
SELECT "Score" FROM table_14604 WHERE "Date" = '26 may 1997'
wikisql
CREATE TABLE table_204_980 ( id number, "name" text, "type" text, "elevation\n(ground station)" number, "elevation\n(mountain station)" number, "slope length" number, "capacity\n(persons/hour)" number, "construction year" number ) -- Using valid SQLite, answer the following questions f...
SELECT "name" FROM table_204_980 WHERE "type" = 'cable car' AND "slope length" = 2937
squall
CREATE TABLE table_27539535_7 ( record VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the teams record when they played the ottawa senators?
SELECT record FROM table_27539535_7 WHERE opponent = "Ottawa Senators"
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '18337912' AND t_kc21.MED_SER_ORG_NO = '5431049' AND t_kc21.OUT_DIAG_DIS_NM LIKE '%情感性%'
css
CREATE TABLE table_27458 ( "Rank" real, "Rider" text, "Sat 29 May" text, "Mon 31 May" text, "Tues 1 June" text, "Wed 2 June" text, "Thurs 3 June" text, "Fri 4 June" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If Tuesday 1 June is 21' ...
SELECT COUNT("Rider") FROM table_27458 WHERE "Tues 1 June" = '21'' 05.27 107.351mph'
wikisql
CREATE TABLE table_name_53 ( nba_draft VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the nba draft for al-farouq aminu?
SELECT nba_draft FROM table_name_53 WHERE player = "al-farouq aminu"
sql_create_context
CREATE TABLE table_name_91 ( avg_finish INTEGER, year VARCHAR, starts VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in 2007, what is the avg finish that had a start less than 1?
SELECT SUM(avg_finish) FROM table_name_91 WHERE year = 2007 AND starts < 1
sql_create_context
CREATE TABLE Documents_with_Expenses ( Document_ID INTEGER, Budget_Type_Code CHAR(15), Document_Details VARCHAR(255) ) CREATE TABLE Ref_Document_Types ( Document_Type_Code CHAR(15), Document_Type_Name VARCHAR(255), Document_Type_Description VARCHAR(255) ) CREATE TABLE Documents ( Document_...
SELECT Document_Type_Description, COUNT(Document_Type_Description) FROM Ref_Document_Types GROUP BY Document_Type_Description ORDER BY COUNT(Document_Type_Description) DESC
nvbench
CREATE TABLE table_65538 ( "Match" text, "Date" text, "Location" text, "Lineup" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was her place in the lineup on match 2?
SELECT "Lineup" FROM table_65538 WHERE "Match" = '2'
wikisql
CREATE TABLE table_40945 ( "Season" text, "Round" text, "Opponents" text, "Home leg" text, "Away leg" text, "Aggregate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round with ajax opponents
SELECT "Round" FROM table_40945 WHERE "Opponents" = 'ajax'
wikisql
CREATE TABLE table_204_284 ( id number, "jurisdiction" text, "adherents" number, "bishops" number, "priests" number, "monastics" number, "monasteries" number, "parishes" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many jurisdict...
SELECT COUNT("jurisdiction") FROM table_204_284
squall
CREATE TABLE table_56214 ( "Candidate" text, "Money Raised, 3Q" text, "Loans Received, 3Q" text, "Money Spent, 3Q" text, "Total Receipts" text, "Cash On Hand" text, "After Debt" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the amou...
SELECT "Cash On Hand" FROM table_56214 WHERE "After Debt" = '$327,094'
wikisql
CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate real, Film_ID int, Type text, Market_ID int, Year int ) CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar int ) CREATE TABLE market ( Mar...
SELECT Studio, COUNT(*) FROM film GROUP BY Studio
nvbench
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), ...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_name_3 ( points INTEGER, played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Points, when Played is greater than 126?
SELECT AVG(points) FROM table_name_3 WHERE played > 126
sql_create_context
CREATE TABLE table_name_20 ( attendance VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total attendance at games with a score of 4-2?
SELECT COUNT(attendance) FROM table_name_20 WHERE score = "4-2"
sql_create_context