instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_17 ( english_title VARCHAR, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the title of jean-pierre jeunet
SELECT english_title FROM table_name_17 WHERE director = "jean-pierre jeunet"
sql_create_context
CREATE TABLE table_30051 ( "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. -- Name t...
SELECT COUNT("Game") FROM table_30051 WHERE "Score" = 'W 112-94'
wikisql
CREATE TABLE table_30519 ( "Nr." real, "Player" text, "Games played" real, "Starting" real, "Sub" real, "Subbed" real, "Mins played" real, "Goals" real, "Pens. against" real, "Pens. for" real, "Fouls suff." real, "Fouls comm." real, "Yellow C" real, "Red c" real, ...
SELECT MAX("Passes") FROM table_30519 WHERE "Starting" = '34'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nephrocaps"
mimicsql_data
CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE station ( id int, network_name text, services text, local_authority text ) CREATE TABLE weekly_weather ( station_id int, day_of_week text...
SELECT name, COUNT(name) FROM station AS t1 JOIN route AS t2 ON t1.id = t2.station_id JOIN train AS t3 ON t2.train_id = t3.id WHERE t1.local_authority = "Chiltern" GROUP BY name ORDER BY name
nvbench
CREATE TABLE table_1277350_3 ( tuesday_mangala__mars_ VARCHAR, saturday_shani__saturn_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In language where Saturday is senasuraadaa, what is Tuesday?
SELECT tuesday_mangala__mars_ FROM table_1277350_3 WHERE saturday_shani__saturn_ = "සෙනසුරාදා Senasuraadaa"
sql_create_context
CREATE TABLE table_15337 ( "Name" text, "Years" text, "A-League" text, "Finals" text, "Total" text, "Games per goal" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total for danny allsopp?
SELECT "Total" FROM table_15337 WHERE "Name" = 'danny allsopp'
wikisql
CREATE TABLE table_1342149_43 ( result VARCHAR, first_elected VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result in the election where the incumbent was first elected in 1942?
SELECT result FROM table_1342149_43 WHERE first_elected = "1942"
sql_create_context
CREATE TABLE table_363 ( "Rocket launch" text, "Launch Date" text, "Mission" text, "Institutional authority" text, "Launch Site" text, "Outcomes" text, "Derivatives" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which authority has a rocket...
SELECT COUNT("Derivatives") FROM table_363 WHERE "Rocket launch" = 'Rehbar-5'
wikisql
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number,...
SELECT DISTINCT Title, Body FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE t.TagName IN ('inheritance')
sede
CREATE TABLE table_63853 ( "Rank" real, "Series" text, "Episode title" text, "Viewers" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Viewers have a Rank smaller than 2?
SELECT SUM("Viewers") FROM table_63853 WHERE "Rank" < '2'
wikisql
CREATE TABLE table_31426 ( "Prefix class" text, "Type and usage" text, "Example" text, "Equivalent" text, "Reference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every prefix class for the equivalent of NTE101?
SELECT "Prefix class" FROM table_31426 WHERE "Equivalent" = 'NTE101'
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND pers...
css
CREATE TABLE table_train_91 ( "id" int, "mini_mental_state_examination_mmse" int, "stroke" bool, "rosen_modified_hachinski_ischemic_score" int, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- mini _ mental state examination ( mmse ) score of...
SELECT * FROM table_train_91 WHERE mini_mental_state_examination_mmse >= 16 AND mini_mental_state_examination_mmse <= 26
criteria2sql
CREATE TABLE table_2076608_1 ( founded VARCHAR, enrollment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of schools founded that have an enrollment of 5634?
SELECT COUNT(founded) FROM table_2076608_1 WHERE enrollment = "5634"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepi...
SELECT t1.diagnosisname FROM (SELECT diagnosis.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'st...
eicu
CREATE TABLE table_name_48 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date has a Score of 6 4, 6 3?
SELECT date FROM table_name_48 WHERE score = "6–4, 6–3"
sql_create_context
CREATE TABLE table_40837 ( "Position" real, "Team" text, "Points" real, "Played" real, "Drawn" real, "Lost" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number lost with more than ...
SELECT MAX("Lost") FROM table_40837 WHERE "Points" > '29' AND "Against" < '19'
wikisql
CREATE TABLE pitStops ( raceId INTEGER, driverId INTEGER, stop INTEGER, lap INTEGER, time TEXT, duration TEXT, milliseconds INTEGER ) CREATE TABLE status ( statusId INTEGER, status TEXT ) CREATE TABLE lapTimes ( raceId INTEGER, driverId INTEGER, lap INTEGER, positio...
SELECT name, COUNT(name) FROM constructors AS T1 JOIN constructorStandings AS T2 ON T1.constructorId = T2.constructorId WHERE T1.nationality = "Japanese" AND T2.points > 5 GROUP BY name ORDER BY COUNT(name)
nvbench
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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 ...
SELECT * FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '91778499' AND hz_info.YLJGDM = '4450505' AND mzjzjlb.JZZDSM LIKE '%牙%'
css
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 MED_CLINIC_ID FROM t_kc21 WHERE PERSON_NM = '云光霁' AND MED_SER_ORG_NO = '2394218' AND NOT IN_DIAG_DIS_NM LIKE '%他%'
css
CREATE TABLE table_225204_4 ( successor VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the successor for north carolina 13th
SELECT successor FROM table_225204_4 WHERE district = "North Carolina 13th"
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions...
SELECT MIN(demographic.days_stay) FROM demographic WHERE demographic.marital_status = "MARRIED"
mimicsql_data
CREATE TABLE table_name_35 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 2008 value when 2012 was Grand Slam Tournaments?
SELECT 2008 FROM table_name_35 WHERE 2012 = "grand slam tournaments"
sql_create_context
CREATE TABLE table_72116 ( "Rnd" text, "Race Name" text, "Circuit" text, "City/Location" text, "Date" text, "Pole position" text, "Winning driver" text, "Winning team" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How...
SELECT COUNT("Report") FROM table_72116 WHERE "Circuit" = 'Cleveland Burke Lakefront Airport'
wikisql
CREATE TABLE table_35706 ( "Source" text, "Date" text, "Fidesz" text, "MSZP" text, "SZDSZ" text, "Jobbik" text, "others" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the percentage of others with a Fidesz of 62% and a Jobbik of 4%?...
SELECT "others" FROM table_35706 WHERE "Fidesz" = '62%' AND "Jobbik" = '4%'
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 gwyjzb.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM gwyjzb JOIN t_kc24 ON gwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gwyjzb.MED_SER_ORG_NO = '9009373' GROUP BY gwyjzb.MED_ORG_DEPT_NM UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM fgwyjzb JOIN t_kc24 ON fgwyjzb.MED_CLINIC_ID = t_kc24.MED_CLINI...
css
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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "NEWBORN" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_name_23 ( gender VARCHAR, area VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the gender for Otama?
SELECT gender FROM table_name_23 WHERE area = "otama"
sql_create_context
CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE competition_result ( competition_id number, club_id_1 number, club_id_2 number, score text ) CREATE TABLE competition ( competition_id number, year number, competition_type text, ...
SELECT name FROM club ORDER BY start_year
spider
CREATE TABLE table_9177 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the Score on 17 december 1979?
SELECT "Score" FROM table_9177 WHERE "Date" = '17 december 1979'
wikisql
CREATE TABLE table_name_40 ( decile INTEGER, roll INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Decile for a school with a roll smaller than 3?
SELECT MIN(decile) FROM table_name_40 WHERE roll < 3
sql_create_context
CREATE TABLE table_2278 ( "Constituency" text, "Electorate" real, "s Spoilt vote" real, "Total poll (%)" text, "For (%)" text, "Against (%)" text, "\u00b1 Yes side 2008 (%)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When +18.1 is the ye...
SELECT "Against (%)" FROM table_2278 WHERE "\u00b1 Yes side 2008 (%)" = '+18.1'
wikisql
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 jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '36953184780'
css
CREATE TABLE table_34035 ( "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 nation has a total more than 3, with more than 5 for bronze, and less than 4 for the si...
SELECT "Nation" FROM table_34035 WHERE "Total" > '3' AND "Bronze" > '5' AND "Silver" < '4'
wikisql
CREATE TABLE table_name_23 ( years_in_senate VARCHAR, years_in_assembly VARCHAR, name VARCHAR ) -- 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_name_23 WHERE years_in_assembly = "2010–present" AND name = "toni atkins"
sql_create_context
CREATE TABLE table_18479 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Thomas J. Lane is the incumbent of how many parties?
SELECT COUNT("Party") FROM table_18479 WHERE "Incumbent" = 'Thomas J. Lane'
wikisql
CREATE TABLE table_name_58 ( prize_money VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the prize money for the final round?
SELECT prize_money FROM table_name_58 WHERE round = "final"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.diagnosis = "ANGIOEDEMA"
mimicsql_data
CREATE TABLE table_40224 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Tournament is Alfred Dunhill Championship 1?
SELECT "Date" FROM table_40224 WHERE "Tournament" = 'alfred dunhill championship 1'
wikisql
CREATE TABLE table_11385 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which away team has a Home team score of 10.14 (...
SELECT "Away team" FROM table_11385 WHERE "Home team score" = '10.14 (74)'
wikisql
CREATE TABLE table_name_54 ( stockholm VARCHAR, malmö VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was Stockholm's score when Malmo scored 2?
SELECT stockholm FROM table_name_54 WHERE malmö = "2"
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 t_kc21.MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY / t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '8731863' GROUP BY t_kc21.MED_ORG_DEPT_NM
css
CREATE TABLE table_16841 ( "Player" text, "No." real, "Nationality" text, "Position" text, "Years for Jazz" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position does John Starks play?
SELECT "Position" FROM table_16841 WHERE "Player" = 'John Starks'
wikisql
CREATE TABLE manufacturers ( headquarter VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the different cities listed?
SELECT DISTINCT headquarter FROM manufacturers
sql_create_context
CREATE TABLE table_39200 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponent with result of w 35-21
SELECT "Opponent" FROM table_39200 WHERE "Result" = 'w 35-21'
wikisql
CREATE TABLE table_43599 ( "Name" text, "Hanzi" text, "Hanyu Pinyin" text, "Population (2004 est.)" text, "Area (km\u00b2)" text, "Density (/km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the density of ?
SELECT "Density (/km\u00b2)" FROM table_43599 WHERE "Hanzi" = '昌黎县'
wikisql
CREATE TABLE table_47017 ( "Class" text, "Part 1" text, "Part 2" text, "Part 3" text, "Part 4" text, "Verb meaning" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the entry for Part 1 for class 7d?
SELECT "Part 1" FROM table_47017 WHERE "Class" = '7d'
wikisql
CREATE TABLE table_name_54 ( round2 VARCHAR, rank VARCHAR, team VARCHAR, round5 VARCHAR, round3 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is round2 when round5 is more than 35, round3 is less than 51, the rank is smaller than 2 and the ...
SELECT COUNT(round2) FROM table_name_54 WHERE round5 > 35 AND round3 < 51 AND team = "netherlands" AND rank < 2
sql_create_context
CREATE TABLE table_name_19 ( nfl_team VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which NFL team picked a player for the Wide Receiver position?
SELECT nfl_team FROM table_name_19 WHERE position = "wide receiver"
sql_create_context
CREATE TABLE table_39088 ( "Election" real, "Labour" real, "Conservative" real, "Liberal" real, "Social Democratic Party" real, "Social and Liberal Democrats/ Liberal Democrats" real, "Independent" real, "Green" real, "Other" text, "Control" text ) -- Using valid SQLite, answer...
SELECT "Social and Liberal Democrats/ Liberal Democrats" FROM table_39088 WHERE "Independent" = '1' AND "Election" > '1988' AND "Green" < '1'
wikisql
CREATE TABLE table_37411 ( "Games" real, "Drawn" real, "Lost" real, "Points difference" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest games from a game with points less than 4, drawn of 1 and a lost less than 6?
SELECT MAX("Games") FROM table_37411 WHERE "Points" < '4' AND "Drawn" = '1' AND "Lost" < '6'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patient...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-19622')) AND microlab.culturesite = 'bronchial lavage' AND DATETIME(m...
eicu
CREATE TABLE table_1007 ( "Player" text, "Position" text, "Games started" text, "Hometown" text, "Height" text, "Weight" real, "Class" text, "Prior experience" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are there for...
SELECT COUNT("Class") FROM table_1007 WHERE "Prior experience" = 'Shasta H.S.'
wikisql
CREATE TABLE table_name_17 ( opponent VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the opponent for week 10?
SELECT opponent FROM table_name_17 WHERE week = 10
sql_create_context
CREATE TABLE table_7162 ( "Player" text, "League" real, "Malaysia Cup" real, "FA Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Malaysia Cups have a total less than 0?
SELECT COUNT("Malaysia Cup") FROM table_7162 WHERE "Total" < '0'
wikisql
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '水建茗' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2013-03-05' AND '2016-01-07' AND t_kc24.MED_AMOUT <= 10
css
CREATE TABLE table_1532779_1 ( muslim___percentage_of_total_population_ VARCHAR, registered_mosques VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the percentage of muslims during a time where there were 614 registered mosques?
SELECT muslim___percentage_of_total_population_ FROM table_1532779_1 WHERE registered_mosques = 614
sql_create_context
CREATE TABLE table_57188 ( "Round" text, "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What result occurs when the round is 4 leg 2?
SELECT "Result" FROM table_57188 WHERE "Round" = '4 leg 2'
wikisql
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT DISTINCT name FROM course WHERE department = 'MCDB' AND number = 501
advising
CREATE TABLE table_14953 ( "Year" real, "Chassis" text, "Engine(s)" text, "Tyres" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which is the highest year that has 3 points?
SELECT MAX("Year") FROM table_14953 WHERE "Points" = '3'
wikisql
CREATE TABLE table_name_78 ( time VARCHAR, method VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How long is the ko (punch) fight against scott smith?
SELECT time FROM table_name_78 WHERE method = "ko (punch)" AND opponent = "scott smith"
sql_create_context
CREATE TABLE table_72102 ( "Season" text, "Competition" text, "Round" text, "Opponents" text, "1st leg" text, "2nd leg" text, "Aggregate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the aggregate where 1st leg is 3 2
SELECT "Aggregate" FROM table_72102 WHERE "1st leg" = '3–2'
wikisql
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 jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb 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 mzjzjlb_jybgb.YLJGDM = jybgb.YLJGDM AND mzjzjlb_jybgb.BGDH ...
css
CREATE TABLE table_28086 ( "Episode Number" real, "Episode" text, "Rating" text, "Share" real, "Rating/Share (18-49)" text, "Viewers (millions)" text, "Rank (Timeslot)" real, "Rank (Night)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT COUNT("Episode Number") FROM table_28086 WHERE "Rating/Share (18-49)" = '0.7/2' AND "Rating" = '2.1'
wikisql
CREATE TABLE table_6936 ( "Name" text, "Stories" real, "Height" text, "Built" text, "Purpose" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the height of the home with stories greater than 22 and built in 2009?
SELECT "Height" FROM table_6936 WHERE "Stories" > '22' AND "Built" = '2009'
wikisql
CREATE TABLE table_name_31 ( player VARCHAR, league_cup VARCHAR, total VARCHAR, scottish_cup VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the player who has a total less than 4, no scottish cups, and a league cup greater than 0?
SELECT player FROM table_name_31 WHERE total < 4 AND scottish_cup = 0 AND league_cup > 0
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 mzjzjlb ( HXPLC number, HZXM ...
SELECT COUNT(*) FROM person_info JOIN hz_info JOIN mzjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_in...
css
CREATE TABLE table_name_1 ( xdsl VARCHAR, other VARCHAR, fttx VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the xDSL for the other of 0.6% and FTTx of 35.4%?
SELECT xdsl FROM table_name_1 WHERE other = "0.6%" AND fttx = "35.4%"
sql_create_context
CREATE TABLE table_name_97 ( tie_no VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ties does Walsall have?
SELECT tie_no FROM table_name_97 WHERE away_team = "walsall"
sql_create_context
CREATE TABLE table_name_53 ( date VARCHAR, winning_team VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the zolder circuit, which had a.z.k./roc-comp tition a.z.k./roc-comp tition as the winning team?
SELECT date FROM table_name_53 WHERE winning_team = "a.z.k./roc-compétition a.z.k./roc-compétition" AND circuit = "zolder"
sql_create_context
CREATE TABLE table_203_762 ( id number, "#" number, "date" text, "film" text, "gross" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what film grossed the most money .
SELECT "film" FROM table_203_762 GROUP BY "film" ORDER BY SUM("gross") DESC LIMIT 1
squall
CREATE TABLE Activity ( actid INTEGER, activity_name varchar(25) ) CREATE TABLE Participates_in ( stuid INTEGER, actid INTEGER ) CREATE TABLE Faculty ( FacID INTEGER, Lname VARCHAR(15), Fname VARCHAR(15), Rank VARCHAR(15), Sex VARCHAR(1), Phone INTEGER, Room VARCHAR(5), ...
SELECT Rank, COUNT(*) FROM Faculty GROUP BY Rank ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_278 ( "Date" text, "Tournament" text, "Location" text, "Purse( $ )" real, "Winner" text, "Score" text, "1st Prize( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score for the Oregon location?
SELECT "Score" FROM table_278 WHERE "Location" = 'Oregon'
wikisql
CREATE TABLE Comments ( Id number, PostId number, Score number, Text text, CreationDate time, UserDisplayName text, UserId number, ContentLicense text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time...
SELECT * FROM Posts AS q JOIN Posts AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 LIMIT 100
sede
CREATE TABLE table_203_296 ( id number, "country" text, "total gdp (nominal)\n(billion us$)" text, "gdp per capita\n(us$, ppp)" text, "gdp growth,\n2007-2011\n(in %)" number, "hdi" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the top ...
SELECT "country" FROM table_203_296 ORDER BY "total gdp (nominal)\n(billion us$)" DESC LIMIT 1
squall
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 demographic (...
SELECT demographic.dob, demographic.gender FROM demographic WHERE demographic.name = "Claude Chipman"
mimicsql_data
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 inputevents_cv.charttime 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 = 3369)) AND STRFTIME('%y-%m-%d', inputevents_cv.charttime) <= '2105-04-13' ORDER BY inputeven...
mimic_iii
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.YLJGDM = '5574257' AND zyjzjlb.RYDJSJ BETWEEN '2004-04-17' AND '2011-10-31' AND zyjzjlb.WDBZ > 0
css
CREATE TABLE table_name_20 ( ovrs INTEGER, econ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Ovrs, when Econ is 2.02?
SELECT MAX(ovrs) FROM table_name_20 WHERE econ = 2.02
sql_create_context
CREATE TABLE table_72233 ( "Country" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average for the country with the swimsuit score of 9.57?
SELECT "Average" FROM table_72233 WHERE "Swimsuit" = '9.57'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, ...
SELECT t2.drugname FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-195316') AND treatment.treatm...
eicu
CREATE TABLE table_36363 ( "Virtue" text, "Latin" text, "Gloss" text, "(Vice)" text, "(Latin)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Virtue of Temperance in Latin?
SELECT "Latin" FROM table_36363 WHERE "Virtue" = 'temperance'
wikisql
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE T...
SELECT DISTINCT airline.airline_code FROM airline, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_na...
atis
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_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '云曼冬' AND t_kc21.MED_SER_ORG_NO = '7485822' AND t_kc21.IN_DIAG_DIS_NM LIKE '%楔状缺损%'
css
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_...
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 = 'DENVER' AND date_day.day_number = 26 AND date_day.month_number = 7 AND ...
atis
CREATE TABLE table_29157 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many viewers in...
SELECT "U.S. viewers (million)" FROM table_29157 WHERE "Title" = 'Batting Practice'
wikisql
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, Parent...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation, Location FROM Users WHERE LOWER(Location) LIKE '%surat%' OR UPPER(Location) LIKE '%SURAT%' OR Location LIKE '%surat%' AND Reputation >= 2500 ORDER BY Reputation DESC LIMIT 30
sede
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "CHEST PAIN" AND demographic.dob_year < "2112"
mimicsql_data
CREATE TABLE table_train_69 ( "id" int, "systolic_blood_pressure_sbp" int, "language" string, "valvular_dysfunction" bool, "heart_disease" bool, "temperature" float, "sepsis" bool, "heart_rate" int, "lipid_metabolism" bool, "organ_failure" bool, "NOUSE" float ) -- Using val...
SELECT * FROM table_train_69 WHERE lipid_metabolism = 1
criteria2sql
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text...
(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 NOT...
css
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.language FROM demographic WHERE demographic.subject_id = "8323"
mimicsql_data
CREATE TABLE table_2850912_12 ( pick__number INTEGER, college_junior_club_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What selection was the springfield olympics (nejhl)?
SELECT MAX(pick__number) FROM table_2850912_12 WHERE college_junior_club_team = "Springfield Olympics (NEJHL)"
sql_create_context
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT mzjzjlb.YLJGDM FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND per...
css
CREATE TABLE table_55521 ( "Country" text, "Interview" real, "Swimsuit" real, "Evening Gown" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest evening gown score of the contestant from Tennessee with an interview sco...
SELECT MAX("Evening Gown") FROM table_55521 WHERE "Interview" > '9.36' AND "Country" = 'tennessee' AND "Average" > '9.75'
wikisql
CREATE TABLE table_19606 ( "Year" real, "Tournaments played" real, "Cuts made" real, "Wins" real, "2nd" real, "3rd" real, "Top 10s" real, "Best finish" text, "Earnings ( $ )" real, "Money list rank" text, "Scoring average" text, "Scoring rank" text ) -- Using valid SQLi...
SELECT MIN("Wins") FROM table_19606
wikisql
CREATE TABLE table_name_8 ( country VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which of the countries showed a score of 71-72=143?
SELECT country FROM table_name_8 WHERE score = 71 - 72 = 143
sql_create_context
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 JOB_ID, SUM(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY SUM(SALARY) DESC
nvbench
CREATE TABLE PlaylistTrack ( PlaylistId integer, TrackId integer ) CREATE TABLE Artist ( ArtistId integer, Name varchar(120) ) CREATE TABLE Genre ( GenreId integer, Name varchar(120) ) CREATE TABLE Playlist ( PlaylistId integer, Name varchar(120) ) CREATE TABLE Customer ( Custome...
SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId DESC
nvbench
CREATE TABLE table_1847180_4 ( vacator VARCHAR, successor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who did Walter B. Jones, Sr. (d) succeeded in office?
SELECT vacator FROM table_1847180_4 WHERE successor = "Walter B. Jones, Sr. (D)"
sql_create_context