instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_98 ( score_in_the_final VARCHAR, opponent_in_the_final VARCHAR, championship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score in The Final, when Opponent in The Final is 'John McEnroe', and when Championship is 'Los An...
SELECT score_in_the_final FROM table_name_98 WHERE opponent_in_the_final = "john mcenroe" AND championship = "los angeles , u.s."
sql_create_context
CREATE TABLE table_55393 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the visitor team of the game where Buffalo was the home team?
SELECT "Visitor" FROM table_55393 WHERE "Home" = 'buffalo'
wikisql
CREATE TABLE table_40713 ( "Television service" text, "Country" text, "Language" text, "Content" text, "HDTV" text, "Package/Option" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Language, when Content is Monoscopio?
SELECT "Language" FROM table_40713 WHERE "Content" = 'monoscopio'
wikisql
CREATE TABLE table_17132 ( "Series #" real, "Season #" real, "Title" text, "Director(s)" text, "Writer(s)" text, "Original airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the dirctor for season 13?
SELECT "Director(s)" FROM table_17132 WHERE "Season #" = '13'
wikisql
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program_cours...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'WN' AND semester.year = 2017)) AND course.course_id = course_offering.course_id AND course.department = 'department0...
advising
CREATE TABLE table_23314951_4 ( against VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the opponent is Kristian Pless, who was it against?
SELECT against FROM table_23314951_4 WHERE opponent = "Kristian Pless"
sql_create_context
CREATE TABLE table_77993 ( "Name" text, "Location" text, "Length in km (mi)" text, "Year Completed" text, "Line" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which line is the Geumjeong tunnel?
SELECT "Line" FROM table_77993 WHERE "Name" = 'geumjeong tunnel'
wikisql
CREATE TABLE table_203_274 ( id number, "church name" text, "address" text, "community" text, "school" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which church is listed below christ the king ?
SELECT "church name" FROM table_203_274 WHERE id = (SELECT id FROM table_203_274 WHERE "church name" = 'christ the king') + 1
squall
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT Founder, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder
nvbench
CREATE TABLE equipment_sequence ( aircraft_code_sequence varchar, aircraft_code varchar ) CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airp...
SELECT DISTINCT COUNT(*) FROM flight WHERE (airline_code = 'NW' AND from_airport IN (SELECT AIRPORTalias0.airport_code FROM airport AS AIRPORTalias0 WHERE AIRPORTalias0.airport_code = 'IAD'))
atis
CREATE TABLE table_3523 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many original artists were there for the Group Performance?
SELECT COUNT("Original artist") FROM table_3523 WHERE "Theme" = 'Group Performance'
wikisql
CREATE TABLE table_14286908_1 ( school VARCHAR, year_of_last_win VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What the name of the school where the last win in 2007-08?
SELECT school FROM table_14286908_1 WHERE year_of_last_win = "2007-08"
sql_create_context
CREATE TABLE table_29982187_4 ( high_assists VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what re the high assists for january 29?
SELECT high_assists FROM table_29982187_4 WHERE date = "January 29"
sql_create_context
CREATE TABLE table_69863 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the t o par for Ralph Guldahl?
SELECT "To par" FROM table_69863 WHERE "Player" = 'ralph guldahl'
wikisql
CREATE TABLE table_1141 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game Site" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the record with result being w 21 7
SELECT "Record" FROM table_1141 WHERE "Result" = 'W 21–7'
wikisql
CREATE TABLE table_52522 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college has 41 picks?
SELECT "College" FROM table_52522 WHERE "Pick #" = '41'
wikisql
CREATE TABLE table_name_41 ( round INTEGER, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the sum of round for record of 6-3
SELECT SUM(round) FROM table_name_41 WHERE record = "6-3"
sql_create_context
CREATE TABLE table_59847 ( "Date" text, "Ship" text, "Nationality" text, "Tonnage" real, "Fate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the fate on 27 june 1942?
SELECT "Fate" FROM table_59847 WHERE "Date" = '27 june 1942'
wikisql
CREATE TABLE table_name_24 ( venue VARCHAR, batsmen VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where were jamie cox & scott kremerskothen paired?
SELECT venue FROM table_name_24 WHERE batsmen = "jamie cox & scott kremerskothen"
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( ...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'dementia - dementia, unknown etiology' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'...
eicu
CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE cite ( citingpaperid int, citedpaperid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE paper ( paperid int, title varchar, venueid int, year int, numciting int, numcitedby...
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'Facial Expression' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
scholar
CREATE TABLE table_38004 ( "Unit" text, "Russian" text, "Ratio" text, "Metric value" text, "Avoirdupois value" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Russian has a Ratio of 40?
SELECT "Russian" FROM table_38004 WHERE "Ratio" = '40'
wikisql
CREATE TABLE table_4454 ( "Shipyard" text, "Laid down" text, "Launched" text, "Commissioned" text, "Fleet" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which shipyard has a fleet that was laid down on April 21, 1962?
SELECT "Shipyard" FROM table_4454 WHERE "Laid down" = 'april 21, 1962'
wikisql
CREATE TABLE table_12688 ( "Season" text, "GP/MP" text, "Kills" real, "K/Game" real, "Errors" real, "Total Attempts" real, "Percentage" real, "Assists" real, "Service Aces" real, "Digs" real, "Solo Blocks" real, "Block Assists" real, "Total Blocks" real ) -- Using v...
SELECT SUM("Block Assists") FROM table_12688 WHERE "Assists" > '32' AND "Total Blocks" > '88'
wikisql
CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_host...
SELECT Nationality, COUNT(*) FROM host GROUP BY Nationality
nvbench
CREATE TABLE table_49372 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Away Team is 'Liverpool'?
SELECT "Date" FROM table_49372 WHERE "Away team" = 'liverpool'
wikisql
CREATE TABLE table_name_5 ( elector VARCHAR, elevated VARCHAR, nationality VARCHAR, elevator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Elector with a Nationality with roman, and an Elevator of urban iv, and an Elevated with 1261, dec...
SELECT elector FROM table_name_5 WHERE nationality = "roman" AND elevator = "urban iv" AND elevated = "1261, december 17"
sql_create_context
CREATE TABLE table_28852 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the candidates for new york 21
SELECT "Candidates" FROM table_28852 WHERE "District" = 'New York 21'
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.diagnosis = "HYPERGLYCEMIA;HYPONATREMIA" AND prescriptions.route = "TD"
mimicsql_data
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE treatment ( treat...
SELECT patient.wardid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-50099' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) ORDER BY patient.unitadmittime DESC LIMIT 1
eicu
CREATE TABLE table_51822 ( "Name" text, "Code" text, "Capacity" text, "Type" text, "Power" text, "Torque" text, "Top speed" text, "Combined consumption" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the combined consumption of t...
SELECT "Combined consumption" FROM table_51822 WHERE "Code" = 'k9k 796'
wikisql
CREATE TABLE table_73453 ( "No." real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "Viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the original air dat...
SELECT "Original air date" FROM table_73453 WHERE "Production code" = '1ARK79'
wikisql
CREATE TABLE table_47309 ( "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 is the highest number of gold medals when the silver is less than 0?
SELECT MAX("Gold") FROM table_47309 WHERE "Silver" < '0'
wikisql
CREATE TABLE table_203_555 ( id number, "place" text, "player" text, "country" text, "score" text, "to par" number, "money ($)" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many players placed 4th ?
SELECT COUNT("player") FROM table_203_555 WHERE "place" = 4
squall
CREATE TABLE table_name_76 ( away VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what place has the club of sevilla
SELECT away FROM table_name_76 WHERE club = "sevilla"
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT t_kc21.OUT_DIAG_DIS_CD, t_kc21.OUT_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '69070860143'
css
CREATE TABLE table_name_71 ( rank INTEGER, rider VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ranks have michael russell as the rider?
SELECT SUM(rank) FROM table_name_71 WHERE rider = "michael russell"
sql_create_context
CREATE TABLE Student_Course_Enrolment ( course_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many distinct courses are enrolled in by students?
SELECT COUNT(course_id) FROM Student_Course_Enrolment
sql_create_context
CREATE TABLE table_56093 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city is Jaffna Airport in?
SELECT "City" FROM table_56093 WHERE "Airport" = 'jaffna airport'
wikisql
CREATE TABLE table_27722408_2 ( high_assists VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the most assists and how many did they have on October 7?
SELECT high_assists FROM table_27722408_2 WHERE date = "October 7"
sql_create_context
CREATE TABLE table_70112 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the city of license for the frequency 90.1 FM?
SELECT "City of license" FROM table_70112 WHERE "Frequency" = '90.1 fm'
wikisql
CREATE TABLE table_57434 ( "Tournament" text, "1984" text, "1985" text, "1986" text, "1987" text, "1988" text, "1989" text, "1990" text, "1991" text, "1992" text, "1993" text, "1994" text, "1995" text, "1996" text, "1997" text ) -- Using valid SQLite, answer...
SELECT "1989" FROM table_57434 WHERE "1991" = '4r'
wikisql
CREATE TABLE player ( Player_ID int, Player text, Years_Played text, Total_WL text, Singles_WL text, Doubles_WL text, Team int ) CREATE TABLE country ( Country_id int, Country_name text, Capital text, Official_native_language text ) CREATE TABLE team ( Team_id int, ...
SELECT Position, COUNT(*) FROM match_season GROUP BY Position ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE table_37669 ( "Pos." real, "Mark" text, "Athlete" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On which date was the position less than 4 at Piraeus?
SELECT "Date" FROM table_37669 WHERE "Pos." < '4' AND "Venue" = 'piraeus'
wikisql
CREATE TABLE table_54564 ( "Name" text, "Current version" text, "System" text, "Platform" text, "License" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a licence of gpl v2 and a current version of 0.9.9?
SELECT "Name" FROM table_54564 WHERE "License" = 'gpl v2' AND "Current version" = '0.9.9'
wikisql
CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'head & neck...
mimic_iii
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admission_location = "TRANSFER FROM HOSP/EXTRAM" AND prescriptions.drug = "Ipratropium Bromide MDI"
mimicsql_data
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number...
SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t...
mimic_iii
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT procedures.icd9_code FROM procedures WHERE procedures.subject_id = "813"
mimicsql_data
CREATE TABLE table_42224 ( "Former kingdom" text, "Province" text, "Hangul" text, "Hanja" text, "Capital" text, "Modern equivalent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Hanja for the sakju province?
SELECT "Hanja" FROM table_42224 WHERE "Province" = 'sakju'
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 t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '花春雪' AND t_kc21.IN_HOSP_DATE BETWEEN '200...
css
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT ZYBMLX, ZYZDBM, ZYZDMC FROM zyjzjlb WHERE JZLSH = '74531070187'
css
CREATE TABLE table_56802 ( "Parties and voter communities" text, "% 2006" real, "Seats 2006" real, "% 2001" real, "Seats 2001" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of Seats 2006 held by the communities of B rger ...
SELECT MAX("Seats 2006") FROM table_56802 WHERE "Parties and voter communities" = 'bürger für groß-rohrheim' AND "% 2006" < '21.3'
wikisql
CREATE TABLE table_name_3 ( fixtures INTEGER, clubs_involved VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 4 clubs are involved, what is the average number of fixtures?
SELECT AVG(fixtures) FROM table_name_3 WHERE clubs_involved = 4
sql_create_context
CREATE TABLE table_68850 ( "Year" text, "Class" text, "Games" real, "Starts" real, "Comp" real, "Yards" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average number of starts Michael Henig had in a year when he had more than 1201 y...
SELECT AVG("Starts") FROM table_68850 WHERE "Yards" > '1201'
wikisql
CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerU...
SELECT CreationDate, Id AS "post_link", AnswerCount, CommentCount, FavoriteCount FROM Posts WHERE (PostTypeId = 1) AND (Body LIKE '%obrigado%') ORDER BY CreationDate DESC
sede
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 person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '88852897778'
css
CREATE TABLE table_50234 ( "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 the country with a t7 place and a 69-68-72=209 score?
SELECT "Country" FROM table_50234 WHERE "Place" = 't7' AND "Score" = '69-68-72=209'
wikisql
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE mzjzjlb_jybgb ( YLJGDM_MZJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN mzjzjlb_jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = mzjzjlb_jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb...
css
CREATE TABLE table_name_52 ( attendance VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many attended the game on August 12?
SELECT COUNT(attendance) FROM table_name_52 WHERE date = "august 12"
sql_create_context
CREATE TABLE table_18042031_16 ( against VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country did Gil play against on 21 23 september 2007?
SELECT against FROM table_18042031_16 WHERE date = "21–23 September 2007"
sql_create_context
CREATE TABLE table_3928 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "High assists" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What lo...
SELECT "Location Attendance" FROM table_3928 WHERE "Team" = 'Utah Jazz'
wikisql
CREATE TABLE table_45337 ( "Year" real, "Domestic freight" real, "Domestic mail" real, "International freight" real, "International mail" real, "Total freight and mail" real, "Change" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much i...
SELECT COUNT("International freight") FROM table_45337 WHERE "Change" = '+0,2%' AND "International mail" > '0'
wikisql
CREATE TABLE table_21649285_2 ( margin_of_victory VARCHAR, no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Margin of victory on no. 4 was?
SELECT margin_of_victory FROM table_21649285_2 WHERE no = 4
sql_create_context
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
(SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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...
css
CREATE TABLE table_name_23 ( bronze INTEGER, silver VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Bronze has a Silver of 15, and a Total smaller than 54?
SELECT MIN(bronze) FROM table_name_23 WHERE silver = 15 AND total < 54
sql_create_context
CREATE TABLE table_name_8 ( wins INTEGER, position INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of wins of the team with a position less than 1?
SELECT MAX(wins) FROM table_name_8 WHERE position < 1
sql_create_context
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_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_ID = '20027341' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE mzjybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH number, 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, ...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '鲁良骏' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ <= '2006-04-04' UNI...
css
CREATE TABLE table_42291 ( "Rank" real, "Player" text, "Country" text, "Earnings( $ )" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the country is ranked more than 4?
SELECT "Country" FROM table_42291 WHERE "Rank" > '4'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE icustays ( row_id number, s...
SELECT patients.gender FROM patients WHERE patients.subject_id = 57899
mimic_iii
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, ...
SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE LOWER(Location) LIKE '%morocco%' ORDER BY Reputation DESC LIMIT 500
sede
CREATE TABLE table_60731 ( "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 To par, when Place is 'T5', and when Score is '70-68=138'?
SELECT "To par" FROM table_60731 WHERE "Place" = 't5' AND "Score" = '70-68=138'
wikisql
CREATE TABLE table_name_83 ( commodity VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2005-05 production for milk?
SELECT 2004 AS _05 FROM table_name_83 WHERE commodity = "milk"
sql_create_context
CREATE TABLE table_204_638 ( id number, "year" number, "tournament" text, "surface" text, "round" text, "winner" text, "score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the last year where connors won ?
SELECT MAX("year") FROM table_204_638 WHERE "winner" = 'jimmy connors'
squall
CREATE TABLE table_40334 ( "Sport" text, "Record" text, "Nation \u2013 athlete(s)" text, "Date" text, "Time (seconds)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Record for 23 january 2010, with a time smaller than 42.679 seconds?
SELECT "Record" FROM table_40334 WHERE "Date" = '23 january 2010' AND "Time (seconds)" < '42.679'
wikisql
CREATE TABLE table_28979895_4 ( partner VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the parter for w/o
SELECT partner FROM table_28979895_4 WHERE score = "w/o"
sql_create_context
CREATE TABLE table_name_53 ( round VARCHAR, record VARCHAR, time VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of Round(s), when Time is 'N/A', when Location is 'Alabama , United States', and when Record is...
SELECT COUNT(round) FROM table_name_53 WHERE time = "n/a" AND location = "alabama , united states" AND record = "1-2-0"
sql_create_context
CREATE TABLE table_79802 ( "Year" real, "Stage" text, "Category" text, "Start" text, "Finish" text, "Leader at the summit" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What category was in 1964?
SELECT "Category" FROM table_79802 WHERE "Year" = '1964'
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 jybgb ( BBCJBW text, BBDM tex...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM 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....
css
CREATE TABLE departments ( department_id number, dept_store_id number, department_name text ) CREATE TABLE staff ( staff_id number, staff_gender text, staff_name text ) CREATE TABLE products ( product_id number, product_type_code text, product_name text, product_price number ) ...
SELECT dept_store_chain_id FROM department_stores GROUP BY dept_store_chain_id ORDER BY COUNT(*) DESC LIMIT 2
spider
CREATE TABLE table_14102379_4 ( attendance INTEGER, stadium VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the minimum attendance with stadium being cotton bowl
SELECT MIN(attendance) FROM table_14102379_4 WHERE stadium = "Cotton Bowl"
sql_create_context
CREATE TABLE table_11647327_2 ( married_filing_jointly_or_qualified_widow_er_ VARCHAR, married_filing_separately VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the range of married filing jointly or qualified widower in which married filing separatel...
SELECT married_filing_jointly_or_qualified_widow_er_ FROM table_11647327_2 WHERE married_filing_separately = "$33,951–$68,525"
sql_create_context
CREATE TABLE table_name_51 ( week_3_sept_8 VARCHAR, week_2_sept_2 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed for the Week 3 Sept 8 that has a Week 2 Sept 2 of Florida State (2-0) (4)?
SELECT week_3_sept_8 FROM table_name_51 WHERE week_2_sept_2 = "florida state (2-0) (4)"
sql_create_context
CREATE TABLE office_locations ( building_id number, company_id number, move_in_year number ) CREATE TABLE buildings ( id number, name text, city text, height number, stories number, status text ) CREATE TABLE companies ( id number, name text, headquarters text, indu...
SELECT COUNT(*) FROM companies
spider
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 * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb...
css
CREATE TABLE table_name_99 ( scored INTEGER, draws VARCHAR, position VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest points scored for the team with a position larger than 5, who had less than 4 wins and more than 8 d...
SELECT MAX(scored) FROM table_name_99 WHERE position > 5 AND wins < 4 AND draws > 8
sql_create_context
CREATE TABLE table_48618 ( "Date" text, "Pos." text, "Player" text, "From club" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is From Club, when Player is 'Robinho'?
SELECT "From club" FROM table_48618 WHERE "Player" = 'robinho'
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 demographic.age FROM demographic WHERE demographic.name = "Paul Edwards"
mimicsql_data
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.age < "70" AND procedures.short_title = "Percutan liver aspirat"
mimicsql_data
CREATE TABLE table_name_24 ( date VARCHAR, leading_scorer VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date with a Leading scorer with maurice williams (25), and a Score with 102 105?
SELECT date FROM table_name_24 WHERE leading_scorer = "maurice williams (25)" AND score = "102–105"
sql_create_context
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 NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 5630.09)
css
CREATE TABLE table_53609 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the attendance at the home venue with result w 3-1?
SELECT MAX("Attendance") FROM table_53609 WHERE "Venue" = 'home' AND "Result" = 'w 3-1'
wikisql
CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCH...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY COUNT(*)
nvbench
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "6" AND lab.label = "Osmolality, Measured"
mimicsql_data
CREATE TABLE table_72037 ( "Code Name" text, "Function (figure)" text, "Real Name" text, "Birthplace" text, "Serial number" text, "Primary military speciality" text, "Secondary military speciality" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Birthplace" FROM table_72037 WHERE "Real Name" = 'pete sanderson'
wikisql
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Price FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE table_name_96 ( ihsaa_class VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which IHSAA Class has a Location of brazil?
SELECT ihsaa_class FROM table_name_96 WHERE location = "brazil"
sql_create_context
CREATE TABLE table_30664 ( "Couple" text, "Style" text, "Music" text, "Trine Dehli Cleve" real, "Tor Fl\u00f8ysvik" real, "Karianne Gulliksen" real, "Christer Tornell" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the...
SELECT "Style" FROM table_30664 WHERE "Total" = '39'
wikisql
CREATE TABLE table_name_84 ( round VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many rounds were run in New South Wales?
SELECT COUNT(round) FROM table_name_84 WHERE state = "new south wales"
sql_create_context