instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_37 ( match INTEGER, ground VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What match number has a ground of H and the opponent Chelsea under 18s?
SELECT AVG(match) FROM table_name_37 WHERE ground = "h" AND opponent = "chelsea under 18s"
sql_create_context
CREATE TABLE table_name_52 ( purpose VARCHAR, payee VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the purpose of Euromarine?
SELECT purpose FROM table_name_52 WHERE payee = "euromarine"
sql_create_context
CREATE TABLE table_15647838_3 ( result VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many values for result correspond to attendance of 74,111?
SELECT COUNT(result) FROM table_15647838_3 WHERE attendance = "74,111"
sql_create_context
CREATE TABLE table_63434 ( "Constituency number" text, "Name" text, "Reserved for ( SC / ST /None)" text, "District" text, "Number of electorates (2009)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Reserved For of Lahar?
SELECT "Reserved for ( SC / ST /None)" FROM table_63434 WHERE "Name" = 'lahar'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.marital_status = "SINGLE" AND procedures.long_title = "Open and other replacement of aortic valve with tissue graft"
mimicsql_data
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 prescriptions.drug FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Stephanie Suchan"
mimicsql_data
CREATE TABLE table_48156 ( "Season" text, "Team" text, "Country" text, "Division" real, "Apps" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Division, when Team is 'Benfica', and when Apps is 22?
SELECT MIN("Division") FROM table_48156 WHERE "Team" = 'benfica' AND "Apps" = '22'
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 jybgb.BGRQ FROM jybgb WHERE jybgb.BGDH = '96606568115'
css
CREATE TABLE table_name_30 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record on March 14?
SELECT record FROM table_name_30 WHERE date = "march 14"
sql_create_context
CREATE TABLE table_3562 ( "Season" real, "Series" text, "Team" text, "Races" real, "Wins" real, "Poles" real, "F/Laps" real, "Podiums" real, "Points" real, "Position" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In how many rac...
SELECT COUNT("Races") FROM table_3562 WHERE "Podiums" = '8'
wikisql
CREATE TABLE procedures ( 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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "1" AND procedures.short_title = "Aortocor bypas-3 cor art"
mimicsql_data
CREATE TABLE table_78824 ( "College or Campus Name" text, "Location" text, "District" text, "Affiliation" text, "Weblink" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What District has a College or Campus Name of anna university college of enginee...
SELECT "District" FROM table_78824 WHERE "College or Campus Name" = 'anna university college of engineering kanchipuram'
wikisql
CREATE TABLE table_name_52 ( round INTEGER, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a Location of bahia, brazil?
SELECT AVG(round) FROM table_name_52 WHERE location = "bahia, brazil"
sql_create_context
CREATE TABLE table_66798 ( "January" text, "February" text, "March" text, "April" text, "June" text, "July" text, "August" text, "September" text, "October" text, "November" text, "December" text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT "July" FROM table_66798 WHERE "October" = 'jill de vries'
wikisql
CREATE TABLE table_64057 ( "TV Station (Operator)" text, "2005" real, "2006" real, "2007" real, "2008" real, "2009" real, "2010" real, "2011 1H" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total in 2005 if there's more than...
SELECT COUNT("2005") FROM table_64057 WHERE "2010" < '43.8' AND "2007" < '29.5' AND "2009" > '4.9' AND "2006" > '10.2'
wikisql
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 COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '7273767' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MIN(t_kc21.IN_HOSP_DAYS) > 30) AS T
css
CREATE TABLE table_name_34 ( fuel_propulsion VARCHAR, numbers__quantity_ordered_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Fuel Propulsion has Numbers (Quantity Ordered) of 7124-7156 (33 buses)?
SELECT fuel_propulsion FROM table_name_34 WHERE numbers__quantity_ordered_ = "7124-7156 (33 buses)"
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "51" AND prescriptions.drug = "Colchicine"
mimicsql_data
CREATE TABLE table_name_80 ( delivery VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Delivery has a Name of quince?
SELECT delivery FROM table_name_80 WHERE name = "quince"
sql_create_context
CREATE TABLE table_train_79 ( "id" int, "fasting_triglycerides" int, "fasting_total_cholesterol" int, "fasting_glucose" int, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- aged 55 _ 75 years
SELECT * FROM table_train_79 WHERE age >= 55 AND age <= 75
criteria2sql
CREATE TABLE table_204_463 ( id number, "year" number, "division" number, "league" text, "regular season" text, "playoffs" text, "open cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the only year that division 4 qualified 2nd r...
SELECT "year" FROM table_204_463 WHERE "open cup" = '2nd round'
squall
CREATE TABLE table_54792 ( "Game" real, "November" real, "Opponent" text, "Score" text, "Decision" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest game number with a record of 12-8-1?
SELECT MAX("Game") FROM table_54792 WHERE "Record" = '12-8-1'
wikisql
CREATE TABLE table_62874 ( "Model" text, "Built" text, "Quantity" real, "Seats" real, "Length" text, "Engine" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Quantity of the engine Model PG-2901?
SELECT "Quantity" FROM table_62874 WHERE "Model" = 'pg-2901'
wikisql
CREATE TABLE table_1046170_5 ( playoffs VARCHAR, regular_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are all the playoffs for regular season is 1st, atlantic division
SELECT playoffs FROM table_1046170_5 WHERE regular_season = "1st, Atlantic division"
sql_create_context
CREATE TABLE table_59017 ( "Pick" real, "Player" text, "Team" text, "Position" text, "Hometown/School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Team, when Position is 'LHP', and when Pick is '23'?
SELECT "Team" FROM table_59017 WHERE "Position" = 'lhp' AND "Pick" = '23'
wikisql
CREATE TABLE table_name_80 ( hometown VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the hometown of thomas tyner?
SELECT hometown FROM table_name_80 WHERE player = "thomas tyner"
sql_create_context
CREATE TABLE table_2941963_1 ( remittances_2010 VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many remittances in 2010 for nigeria?
SELECT remittances_2010 FROM table_2941963_1 WHERE country = "Nigeria"
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 Headquarter, T1.Name ORDER BY T1.Manufacturer
nvbench
CREATE TABLE products ( product_id number, parent_product_id number, production_type_code text, unit_price number, product_name text, product_color text, product_size text ) CREATE TABLE invoice_line_items ( order_item_id number, invoice_number number, product_id number, pro...
SELECT T2.invoice_number, T2.invoice_date FROM financial_transactions AS T1 JOIN invoices AS T2 ON T1.invoice_number = T2.invoice_number GROUP BY T1.invoice_number ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE has_allergy ( stuid number, allergy text ) CREATE TABLE allergy_type ( allergy text, allergytype text ) -- Using valid SQLite...
SELECT COUNT(*) FROM allergy_type WHERE allergytype = "animal"
spider
CREATE TABLE table_name_70 ( nationality VARCHAR, school_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is team ucla come from?
SELECT nationality FROM table_name_70 WHERE school_club_team = "ucla"
sql_create_context
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT All_Games, Team_ID FROM basketball_match
nvbench
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM t...
SELECT BBDM, BBMC, BBZT FROM jybgb WHERE BGDH = '51372448750'
css
CREATE TABLE review ( a_id number, u_id number, i_id number, rating number, rank number ) CREATE TABLE useracct ( u_id number, name text ) CREATE TABLE item ( i_id number, title text ) CREATE TABLE trust ( source_u_id number, target_u_id number, trust number ) -- Usi...
SELECT T1.name FROM useracct AS T1 JOIN trust AS T2 ON T1.u_id = T2.source_u_id GROUP BY T2.source_u_id ORDER BY AVG(trust) DESC LIMIT 1
spider
CREATE TABLE table_name_16 ( position INTEGER, against VARCHAR, drawn VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position has an Against smaller than 49, and a Drawn of 4?
SELECT MAX(position) FROM table_name_16 WHERE against < 49 AND drawn = 4
sql_create_context
CREATE TABLE table_24917 ( "School" text, "Location" text, "Team Name" text, "Colors" text, "Varsity Teams" real, "NJCAA Championships" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the school is Rend Lake College, what is the team name?
SELECT "Team Name" FROM table_24917 WHERE "School" = 'Rend Lake College'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
SELECT * FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_info.person_i...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number,...
SELECT wdmzjzjlb.SG, wdmzjzjlb.TZ FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '喻英朗' UNION SELECT bdmzjzjlb.SG, bdmzjzjlb.TZ FROM person_info JOIN hz_info JOIN bd...
css
CREATE TABLE table_3515 ( "Episode #" text, "Season Episode #" text, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the production code for e...
SELECT "Prod. code" FROM table_3515 WHERE "Episode #" = '78'
wikisql
CREATE TABLE table_name_47 ( sydney VARCHAR, auckland VARCHAR, melbourne VARCHAR, gold_coast VARCHAR, adelaide VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Syndney's Gold coast, Adelaide, Melbourne, and Auckland were all no?
SELECT sydney FROM table_name_47 WHERE gold_coast = "no" AND adelaide = "no" AND melbourne = "no" AND auckland = "no"
sql_create_context
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE comment_instructor ( instructor_id int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016 ORDER BY course.department
advising
CREATE TABLE table_61294 ( "Week 1" text, "Week 2" text, "Week 3" text, "Week 4" text, "Week 5" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is week 2 if week 3 is Sara Stokes?
SELECT "Week 2" FROM table_61294 WHERE "Week 3" = 'sara stokes'
wikisql
CREATE TABLE table_name_49 ( forward_caste VARCHAR, scheduled_caste VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE FORWARD CASTE WITH A SCHEDULED CASTE OF 0.80%?
SELECT forward_caste FROM table_name_49 WHERE scheduled_caste = "0.80%"
sql_create_context
CREATE TABLE table_16128 ( "No." real, "#" real, "Title" text, "Director" text, "Writer" text, "US air date" text, "Storyteller" text, "Villains" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the storyteller in the episode called...
SELECT "Storyteller" FROM table_16128 WHERE "Title" = 'The Tale of the Jagged Sign'
wikisql
CREATE TABLE table_77407 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Country is 'United States', and when To Par is '+4'?
SELECT "Score" FROM table_77407 WHERE "Country" = 'united states' AND "To par" = '+4'
wikisql
CREATE TABLE table_name_70 ( total VARCHAR, finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total for the player whose finish was t66?
SELECT total FROM table_name_70 WHERE finish = "t66"
sql_create_context
CREATE TABLE table_name_42 ( silver INTEGER, gold INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest silver value associated with 0 golds?
SELECT MAX(silver) FROM table_name_42 WHERE gold < 0
sql_create_context
CREATE TABLE table_49842 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent in the WMMA 1: McCorkle vs. Heden event that went more than 1 round?...
SELECT "Opponent" FROM table_49842 WHERE "Round" > '1' AND "Event" = 'wmma 1: mccorkle vs. heden'
wikisql
CREATE TABLE table_name_67 ( year INTEGER, total_score VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the United States had a total score of 274 what was the average year?
SELECT AVG(year) FROM table_name_67 WHERE total_score = "274" AND country = "united states"
sql_create_context
CREATE TABLE director ( did int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE tags ( id int, msid int, kid int ) CREATE TABLE company ( id int, name text, country_code varchar ) CREATE TABLE actor ( aid int, gender te...
SELECT COUNT(DISTINCT (actor.name)) FROM actor, cast, movie WHERE cast.aid = actor.aid AND movie.mid = cast.msid AND movie.title = 'Saving Private Ryan'
imdb
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 locations ( LOCATION_ID decimal(4,0...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID
nvbench
CREATE TABLE table_7432 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the most total medals awarded to Poland?
SELECT MAX("Total") FROM table_7432 WHERE "Nation" = 'poland'
wikisql
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate t...
SELECT * FROM Users AS U WHERE U.UpVotes = 0 AND U.DownVotes = 0
sede
CREATE TABLE table_23050383_1 ( education VARCHAR, economic_incentive_regime VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the education when the economic incentive regime is 1.58?
SELECT education FROM table_23050383_1 WHERE economic_incentive_regime = "1.58"
sql_create_context
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 ( KH text, KLX number...
SELECT jybgb.BGDH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '沈景辉' AND jybg...
css
CREATE TABLE table_25933 ( "No." real, "#" real, "Original airdate" text, "Performer 1" text, "Performer 2" text, "Performer 3" text, "Performer 4" text, "U.S. viewers (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the...
SELECT MIN("#") FROM table_25933 WHERE "Performer 2" = 'Heather Anne Campbell' AND "U.S. viewers (millions)" = '2.99'
wikisql
CREATE TABLE table_203_689 ( id number, "date" text, "opponent" text, "score" text, "result" text, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who did the mercury beat in their only 2ot game ?
SELECT "opponent" FROM table_203_689 WHERE "score" = '2ot'
squall
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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '昌和志' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 7632.77) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '昌和志' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FRO...
css
CREATE TABLE table_54895 ( "Block A" text, "Kaz Hayashi" text, "NOSAWA Rongai" text, "Super Crazy" text, "Toshizo" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the block A for shuji kondo
SELECT "Block A" FROM table_54895 WHERE "Toshizo" = 'shuji kondo'
wikisql
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE prescriptions ( row_id number, subject_id number,...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 1 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
mimic_iii
CREATE TABLE table_12842 ( "Election" text, "1st Member" text, "1st Party" text, "2nd Member" text, "2nd Party" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 1st Member has an Election of 1895?
SELECT "1st Member" FROM table_12842 WHERE "Election" = '1895'
wikisql
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ...
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 = "5180" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE table_11214772_1 ( runner_up VARCHAR, location VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the runner-up where location is ellenton, fl and year is 2004
SELECT runner_up FROM table_11214772_1 WHERE location = "Ellenton, FL" AND year = "2004"
sql_create_context
CREATE TABLE table_50306 ( "Release" real, "Start" text, "Pieces" real, "Board (inches)" text, "Board (cm)" text, "Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of pieces for boards that started in 1941 and were...
SELECT AVG("Pieces") FROM table_50306 WHERE "Start" = '1941' AND "Release" > '2001'
wikisql
CREATE TABLE table_204_195 ( id number, "team" text, "home city" text, "stadium" text, "capacity" number, "last season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many people does the holon city arena in holon seat ?
SELECT "capacity" FROM table_204_195 WHERE "stadium" = 'holon city arena'
squall
CREATE TABLE table_45973 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position did the draft pick number play that was overall pick number 133?
SELECT "Position" FROM table_45973 WHERE "Overall" = '133'
wikisql
CREATE TABLE table_name_7 ( safari VARCHAR, opera VARCHAR, internet_explorer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the safari value with a 2.4% opera and 29.9% internet explorer?
SELECT safari FROM table_name_7 WHERE opera = "2.4%" AND internet_explorer = "29.9%"
sql_create_context
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, ...
SELECT Id AS "post_link", Tags FROM Posts WHERE PostTypeId = 1 AND NOT Tags LIKE '<star-trek>' AND (Tags LIKE '<star-trek-%>' OR Tags LIKE '<the-wrath-of-khan>' OR Tags LIKE '<the-search-for-spock>' OR Tags LIKE '<the-voyage-home>' OR Tags LIKE '<the-final-frontier>' OR Tags LIKE '<the-undiscovered-country>' OR Tags LI...
sede
CREATE TABLE table_name_4 ( tv_season VARCHAR, season VARCHAR, ranking VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which TV season has a Season larger than 2, and a Ranking of #5?
SELECT tv_season FROM table_name_4 WHERE season > 2 AND ranking = "#5"
sql_create_context
CREATE TABLE table_55322 ( "Date" text, "Opponent" text, "Home/Away" text, "Field" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which field was the game played on July 12?
SELECT "Field" FROM table_55322 WHERE "Date" = 'july 12'
wikisql
CREATE TABLE host ( host_id number, name text, nationality text, age text ) CREATE TABLE party ( party_id number, party_theme text, location text, first_year text, last_year text, number_of_hosts number ) CREATE TABLE party_host ( party_id number, host_id number, is...
SELECT T3.location, T2.name FROM party_host AS T1 JOIN host AS T2 ON T1.host_id = T2.host_id JOIN party AS T3 ON T1.party_id = T3.party_id ORDER BY T2.age
spider
CREATE TABLE table_38881 ( "Rider" text, "Bike" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Grid for Rider Ruben Xaus?
SELECT MIN("Grid") FROM table_38881 WHERE "Rider" = 'ruben xaus'
wikisql
CREATE TABLE election ( election_id number, representative_id number, date text, votes number, vote_percent number, seats number, place number ) CREATE TABLE representative ( representative_id number, name text, state text, party text, lifespan text ) -- Using valid SQ...
SELECT party FROM representative GROUP BY party HAVING COUNT(*) >= 3
spider
CREATE TABLE table_632 ( "Client" text, "Years of Operation" text, "Area of Operation" text, "Country" text, "Services" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what country is the El Hamada area of operation?
SELECT "Country" FROM table_632 WHERE "Area of Operation" = 'El Hamada'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime t...
SELECT COUNT(*) FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 41132) AND prescriptions.drug = 'diltiazem extended-release' AND STRFTIME('%y', prescriptions.startdate) = '2101'
mimic_iii
CREATE TABLE table_28094 ( "Round" real, "Circuit" text, "Location" 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. -- Who won the April 11 ra...
SELECT "Winning driver" FROM table_28094 WHERE "Date" = 'April 11'
wikisql
CREATE TABLE table_1341884_45 ( party VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the political affiliation of the texas 12 district
SELECT party FROM table_1341884_45 WHERE district = "Texas 12"
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25...
SELECT FIRST_NAME, SALARY FROM employees ORDER BY FIRST_NAME
nvbench
CREATE TABLE table_17058226_5 ( high_rebounds VARCHAR, high_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had all the high rebounds when kevin love (20) scored the highest points?
SELECT high_rebounds FROM table_17058226_5 WHERE high_points = "Kevin Love (20)"
sql_create_context
CREATE TABLE table_name_8 ( median_family_income VARCHAR, median_household_income VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Median family income when the Median household income is $38,137?
SELECT median_family_income FROM table_name_8 WHERE median_household_income = "$38,137"
sql_create_context
CREATE TABLE table_19188562_2 ( us_viewers__in_millions_ VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many million u.s. Viewers watched season 1?
SELECT us_viewers__in_millions_ FROM table_19188562_2 WHERE season = 1
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "SINGLE" AND demographic.ethnicity = "WHITE"
mimicsql_data
CREATE TABLE student ( id text, name text, dept_name text, tot_cred number ) CREATE TABLE takes ( id text, course_id text, sec_id text, semester text, year number, grade text ) CREATE TABLE prereq ( course_id text, prereq_id text ) CREATE TABLE instructor ( id text...
SELECT course_id FROM section WHERE semester = 'Fall' AND year = 2009 UNION SELECT course_id FROM section WHERE semester = 'Spring' AND year = 2010
spider
CREATE TABLE table_name_60 ( week INTEGER, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the week for the Denver Broncos?
SELECT SUM(week) FROM table_name_60 WHERE opponent = "denver broncos"
sql_create_context
CREATE TABLE table_5073 ( "Team" text, "Driver" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest grid for new zealand?
SELECT MAX("Grid") FROM table_5073 WHERE "Team" = 'new zealand'
wikisql
CREATE TABLE table_name_13 ( released VARCHAR, series_sorted VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of release for the episode sorted value of 6Y/AA?
SELECT released FROM table_name_13 WHERE series_sorted = "6y/aa"
sql_create_context
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cine...
SELECT Title, Price FROM schedule AS T1 JOIN film AS T2 ON T1.Film_ID = T2.Film_ID JOIN cinema AS T3 ON T1.Cinema_ID = T3.Cinema_ID GROUP BY Name, Title ORDER BY Title DESC
nvbench
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 mzjzjlb.SG, mzjzjlb.TZ, mzjzjlb.TW, mzjzjlb.SSY, mzjzjlb.SZY, mzjzjlb.XL, mzjzjlb.HXPLC, mzjzjlb.ML FROM mzjzjlb WHERE mzjzjlb.JZLSH = '16242595642'
css
CREATE TABLE table_name_56 ( team VARCHAR, car__number VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team ran car #24 on August 30?
SELECT team FROM table_name_56 WHERE car__number = 24 AND date = "august 30"
sql_create_context
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) ...
SELECT meter_200, COUNT(meter_200) FROM swimmer GROUP BY meter_200
nvbench
CREATE TABLE table_2060 ( "Teams With Division Titles" text, "Division Championships" real, "Playoff Berths" real, "AFC Titles" real, "Super Bowl Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many division championships did the Pittsburgh...
SELECT "Division Championships" FROM table_2060 WHERE "Teams With Division Titles" = 'Pittsburgh Steelers'
wikisql
CREATE TABLE table_51378 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was playing as the home team when the away t...
SELECT "Home team" FROM table_51378 WHERE "Away team score" = '18.14 (122)'
wikisql
CREATE TABLE table_2030 ( "Official name" text, "Version" text, "Release" real, "Date of release" text, "Comments" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the version of AutoCAD Architectural Desktop 3?
SELECT "Version" FROM table_2030 WHERE "Official name" = 'AutoCAD Architectural Desktop 3'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'aspirin 81 mg chewable tablet' AND DATETIME(medicat...
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 jybgb ( BBCJBW text, BBDM tex...
SELECT wdmzjzjlb.RYTJDM, wdmzjzjlb.RYTJMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '47260453566' UNION SELECT bdmzjzjlb.RYTJDM, bdmzjzjlb.RYTJMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '47260453566'
css
CREATE TABLE table_name_35 ( brazil_scorers VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Brazil scorers have a 2-1 Score?
SELECT brazil_scorers FROM table_name_35 WHERE score = "2-1"
sql_create_context
CREATE TABLE table_40737 ( "City/State" text, "Members" text, "Team" text, "First round" text, "Final round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Team had the first round of 1:00?
SELECT "Team" FROM table_40737 WHERE "First round" = '1:00'
wikisql
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-120575' AND patient.hos...
eicu
CREATE TABLE table_23517 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the original title of the film Zozo?
SELECT "Original title" FROM table_23517 WHERE "Film title used in nomination" = 'Zozo'
wikisql
CREATE TABLE table_name_20 ( date VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date with Cuba is Home team?
SELECT date FROM table_name_20 WHERE home_team = "cuba"
sql_create_context