instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_203_191 ( id number, "year" number, "group" text, "award" text, "result" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the only award in 1994 ?
SELECT "award" FROM table_203_191 WHERE "year" = 1994
squall
CREATE TABLE table_78837 ( "Class" text, "Number(s)" text, "Quantity" real, "Year(s) of Manufacture" text, "Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Year(s) of Manufacture has a Quantity larger than 60, and a Number(s) of 7001 7165...
SELECT "Year(s) of Manufacture" FROM table_78837 WHERE "Quantity" > '60' AND "Number(s)" = '7001–7165'
wikisql
CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE T...
SELECT Comments.Text FROM Comments WHERE Comments.UserId = @UserId
sede
CREATE TABLE College ( cName varchar(20), state varchar(2), enr numeric(5,0) ) CREATE TABLE Tryout ( pID numeric(5,0), cName varchar(20), pPos varchar(8), decision varchar(3) ) CREATE TABLE Player ( pID numeric(5,0), pName varchar(20), yCard varchar(3), HS numeric(5,0) ) ...
SELECT cName, COUNT(*) FROM Tryout GROUP BY cName ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE track ( track_id number, name text, location text, seating number, year_opened number ) CREATE TABLE race ( race_id number, name text, class text, date text, track_id text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- S...
SELECT name, location, year_opened FROM track WHERE seating > (SELECT AVG(seating) FROM track)
spider
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 demographic.gender, demographic.admittime FROM demographic WHERE demographic.subject_id = "84129"
mimicsql_data
CREATE TABLE table_22720 ( "interval name" text, "size (steps)" real, "size (cents)" real, "just ratio" text, "just (cents)" text, "error" text, "audio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the just cents is 701.96, what is the ...
SELECT "interval name" FROM table_22720 WHERE "just (cents)" = '701.96'
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 wdmzjzjlb.CYKSDM, wdmzjzjlb.CYKSMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '94947569717' UNION SELECT bdmzjzjlb.CYKSDM, bdmzjzjlb.CYKSMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '94947569717'
css
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE PostsWit...
SELECT DisplayName, LastAccessDate, WebsiteUrl, AboutMe FROM Users WHERE Location = 'Russia' ORDER BY Reputation LIMIT 100
sede
CREATE TABLE table_36513 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score was on July 25?
SELECT "Score" FROM table_36513 WHERE "Date" = 'july 25'
wikisql
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_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '11103457' AND NOT t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 9690.79)
css
CREATE TABLE Flight ( departure_date VARCHAR, arrival_date VARCHAR, origin VARCHAR, destination VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show me the departure date and arrival date for all flights from Los Angeles to Honolulu.
SELECT departure_date, arrival_date FROM Flight WHERE origin = "Los Angeles" AND destination = "Honolulu"
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,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...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY SUM(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE medication ( code number, name text, brand text, description text ) CREATE TABLE on_call ( nurse number, blockfloor number, blockcode number, oncallstart time, oncallend time ) CREATE TABLE affiliated_with ( physician number, department number, primaryaffil...
SELECT DISTINCT T1.name FROM nurse AS T1 JOIN on_call AS T2 ON T1.employeeid = T2.nurse
spider
CREATE TABLE table_11781 ( "Number" text, "Type" text, "Seating" text, "Diagram no" real, "Lot no." real, "Weight" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which vehicle has a Diagram of 516 or smaller, and a driving motor brake second (dm...
SELECT "Seating" FROM table_11781 WHERE "Diagram no" > '516' AND "Type" = 'driving motor brake second (dmbs)'
wikisql
CREATE TABLE table_30121075_1 ( area__acres__ VARCHAR, poor_law_union VARCHAR, townland VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the area when the poor law union is skibbereen and the townland is knockmore?
SELECT area__acres__ FROM table_30121075_1 WHERE poor_law_union = "Skibbereen" AND townland = "Knockmore"
sql_create_context
CREATE TABLE table_name_64 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the 2005 result when 2001 is sf?
SELECT 2005 FROM table_name_64 WHERE 2001 = "sf"
sql_create_context
CREATE TABLE table_63213 ( "Model number" text, "sSpec number" text, "Cores" text, "Frequency" text, "Turbo" text, "L2 cache" text, "L3 cache" text, "GPU model" text, "GPU frequency" text, "Socket" text, "I/O bus" text, "Release date" text, "Part number(s)" text, ...
SELECT "Cores" FROM table_63213 WHERE "Release date" = 'april 2012' AND "Release price ( USD )" = '$393' AND "Part number(s)" = 'av8063801117503'
wikisql
CREATE TABLE table_16243 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Featured character(s)" text, "Original air date" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT MAX("No. in season") FROM table_16243
wikisql
CREATE TABLE table_name_87 ( total INTEGER, bronze VARCHAR, silver VARCHAR, nation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest number of total medals for Georgia with 0 silver and 1 bronze?
SELECT MIN(total) FROM table_name_87 WHERE silver > 0 AND nation = "georgia" AND bronze < 1
sql_create_context
CREATE TABLE table_10359 ( "Catalogue Number" text, "Artist" text, "Tracks" text, "Type" text, "Year" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the type of disc by Logistics after 2004?
SELECT "Type" FROM table_10359 WHERE "Year" > '2004' AND "Artist" = 'logistics'
wikisql
CREATE TABLE Addresses ( address_id INTEGER, line_1 VARCHAR(120), line_2 VARCHAR(120), line_3 VARCHAR(120), city VARCHAR(80), zip_postcode VARCHAR(20), state_province_county VARCHAR(50), country VARCHAR(50), other_address_details VARCHAR(255) ) CREATE TABLE Behavior_Incident ( i...
SELECT date_address_to, SUM(monthly_rental) FROM Student_Addresses ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_23105 ( "Season #" real, "Episode #" real, "Title" text, "Director(s)" text, "Writer(s)" text, "Original Air Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest season number?
SELECT MAX("Season #") FROM table_23105
wikisql
CREATE TABLE table_19242 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who played Richmond at home?...
SELECT "Home team" FROM table_19242 WHERE "Away team" = 'Richmond'
wikisql
CREATE TABLE table_178399_1 ( parish__prestegjeld_ VARCHAR, year_built VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the parish for 1908
SELECT parish__prestegjeld_ FROM table_178399_1 WHERE year_built = 1908
sql_create_context
CREATE TABLE table_24280 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player plays for the Winnipeg Blue Bombers?
SELECT "Player" FROM table_24280 WHERE "CFL Team" = 'Winnipeg Blue Bombers'
wikisql
CREATE TABLE table_16039 ( "Character" text, "1954 Broadway" text, "1955 broadcast" text, "1960 broadcast" text, "1979 Broadway" text, "1990 Broadway" text, "1991 Broadway" text, "1998 Broadway" text, "1999 Broadway" text ) -- Using valid SQLite, answer the following questions for ...
SELECT "1991 Broadway" FROM table_16039 WHERE "1999 Broadway" = 'Barbara McCulloh'
wikisql
CREATE TABLE table_name_67 ( years VARCHAR, decile VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the years when decile was less than 7 for waitoa school
SELECT years FROM table_name_67 WHERE decile < 7 AND name = "waitoa school"
sql_create_context
CREATE TABLE table_name_57 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What home team played Fitzroy?
SELECT home_team FROM table_name_57 WHERE away_team = "fitzroy"
sql_create_context
CREATE TABLE table_46336 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who made the decision when detroit was the home team and boston was the visitor?
SELECT "Decision" FROM table_46336 WHERE "Home" = 'detroit' AND "Visitor" = 'boston'
wikisql
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime ti...
SELECT d_icd_diagnoses.long_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'tox ef hydrocarb gas nec' UNION SELECT d_icd_procedures.long_title FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'tox ef hydrocarb gas nec'
mimic_iii
CREATE TABLE gwyjzb ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '26072107' AND gwyjzb.MED_SER_ORG_NO = '2159880' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '26072107' AND fg...
css
CREATE TABLE table_45653 ( "Class" text, "Team" text, "Driver" text, "Chassis \u2013 Engine" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Laps did Team Primagaz Competition have?
SELECT "Laps" FROM table_45653 WHERE "Team" = 'primagaz competition'
wikisql
CREATE TABLE table_47852 ( "Driver" text, "Team" text, "Laps" real, "Time/Retired" text, "Grid" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- HOW MANY POINTS DOES ALEX SPERAFICO HAVE WITH A GRID LARGER THAN 17?
SELECT MIN("Points") FROM table_47852 WHERE "Driver" = 'alex sperafico' AND "Grid" > '17'
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 zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM person_info JOIN hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON person_info.RYBH = hz_info.RYBH AND 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_zy...
css
CREATE TABLE table_1295 ( "Country" text, "Uranium required 2006-08" text, "% of world demand" text, "Indigenous mining production 2006" text, "Deficit (-surplus)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much uranium did Russia use in 200...
SELECT "Uranium required 2006-08" FROM table_1295 WHERE "Country" = 'Russia'
wikisql
CREATE TABLE scientists ( Name VARCHAR, ssn VARCHAR, scientist VARCHAR ) CREATE TABLE AssignedTo ( Name VARCHAR, ssn VARCHAR, scientist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of scientists who are not assigned to any pr...
SELECT Name FROM scientists WHERE NOT ssn IN (SELECT scientist FROM AssignedTo)
sql_create_context
CREATE TABLE affected_region ( Region_id int, Storm_ID int, Number_city_affected real ) CREATE TABLE region ( Region_id int, Region_code text, Region_name text ) CREATE TABLE storm ( Storm_ID int, Name text, Dates_active text, Max_speed int, Damage_millions_USD real, Nu...
SELECT Dates_active, Number_Deaths FROM storm WHERE Number_Deaths >= 1 ORDER BY Number_Deaths
nvbench
CREATE TABLE table_name_44 ( total INTEGER, rank VARCHAR, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Total has a Rank of 5, and a Bronze larger than 3?
SELECT SUM(total) FROM table_name_44 WHERE rank = "5" AND bronze > 3
sql_create_context
CREATE TABLE table_name_33 ( barrel_twist VARCHAR, stock VARCHAR, hand_guards VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Barrel twist has a Stock of canadian 3rd generation and a Hand guards of short ribbed?
SELECT barrel_twist FROM table_name_33 WHERE stock = "canadian 3rd generation" AND hand_guards = "short ribbed"
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc21.IN_HOSP_DAYS FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '33468513439'
css
CREATE TABLE table_75957 ( "Tournament" text, "2006" text, "2009" text, "2012" text, "2013" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tournament when the 2013 is 2r, and a 2006 is 1r?
SELECT "Tournament" FROM table_75957 WHERE "2013" = '2r' AND "2006" = '1r'
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "S/P FALL" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_204_4 ( id number, "date" text, "race" text, "competition" text, "rider" text, "country" text, "location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the total amount of times italy appears on this chart ?
SELECT COUNT(*) FROM table_204_4 WHERE "country" = 'italy'
squall
CREATE TABLE table_name_25 ( total VARCHAR, gold VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of total for 3 gold and rank less than 3
SELECT COUNT(total) FROM table_name_25 WHERE gold = 3 AND rank < 3
sql_create_context
CREATE TABLE table_10747 ( "Date" text, "Name" text, "Flag" text, "Tonnage (GRT)" real, "Sunk by" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the flag for Terkoeli?
SELECT "Flag" FROM table_10747 WHERE "Name" = 'terkoeli'
wikisql
CREATE TABLE player ( player_id number, player text, years_played text, total_wl text, singles_wl text, doubles_wl text, team number ) CREATE TABLE match_season ( season number, player text, position text, country number, team number, draft_pick_number number, dr...
SELECT T2.player FROM country AS T1 JOIN match_season AS T2 ON T1.country_id = T2.country WHERE T1.country_name = "Indonesia"
spider
CREATE TABLE table_66889 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average silver for a rank less than 8, were there were no more than 4 bronze and...
SELECT AVG("Silver") FROM table_66889 WHERE "Rank" < '8' AND "Total" = '12' AND "Bronze" < '4'
wikisql
CREATE TABLE table_19897896_7 ( season VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in which season the position was center
SELECT season FROM table_19897896_7 WHERE position = "Center"
sql_create_context
CREATE TABLE table_name_44 ( winner_nominee_s_ VARCHAR, result VARCHAR, film VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is nominated for the film Rugrats Go Wild?
SELECT winner_nominee_s_ FROM table_name_44 WHERE result = "nominated" AND film = "rugrats go wild"
sql_create_context
CREATE TABLE table_203_221 ( id number, "name" text, "nationality" text, "matches played" number, "goals scored" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who has scored more goals than any other melbourne player ?
SELECT "name" FROM table_203_221 ORDER BY "goals scored" DESC LIMIT 1
squall
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.ethnicity = "WHITE" AND diagnoses.icd9_code = "7660"
mimicsql_data
CREATE TABLE table_36568 ( "Outcome" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament included an opponent of Marinko Matosevic?
SELECT "Tournament" FROM table_36568 WHERE "Opponent" = 'marinko matosevic'
wikisql
CREATE TABLE table_name_87 ( steals VARCHAR, rebounds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the leader in Steals when Travis Watson (9) was the leader in Rebounds?
SELECT steals FROM table_name_87 WHERE rebounds = "travis watson (9)"
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 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.admityear < "2121" AND lab."CATEGORY" = "Hematology"
mimicsql_data
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) 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 var...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Design Science Colloquium%' OR name LIKE '%Design Science Colloquium%') AND credits = 8
advising
CREATE TABLE table_25479607_3 ( fixed_charge___rs__kwh_ VARCHAR, tariff___rs__kwh_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fixed charge for the user who had a tariff of 11.30?
SELECT fixed_charge___rs__kwh_ FROM table_25479607_3 WHERE tariff___rs__kwh_ = "11.30"
sql_create_context
CREATE TABLE table_name_50 ( date VARCHAR, location VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the date for warsaw 1929
SELECT date FROM table_name_50 WHERE location = "warsaw" AND year = 1929
sql_create_context
CREATE TABLE football_data ( season text, datetime time, div text, country text, league text, referee text, hometeam text, awayteam text, fthg number, ftag number, ftr text, hthg number, htag number, htr text, psh number, psd number, psa number, b3...
SELECT b365d FROM football_data WHERE hometeam = "Swindon" AND awayteam = "Millwall" AND season = "2016/2017"
worldsoccerdatabase
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE intakeoutput ( ...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-2584')) AND vitalperiodic.sao2 > 94.0 AND NOT vitalperiodic.sao2...
eicu
CREATE TABLE table_name_70 ( height__m_ INTEGER, year_built VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the heights in meters for the commerzbank tower built after 1984?
SELECT SUM(height__m_) FROM table_name_70 WHERE year_built > 1984 AND name = "commerzbank tower"
sql_create_context
CREATE TABLE table_name_85 ( datacenter VARCHAR, itanium VARCHAR, features VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Datacenter for the Memory modules: hot addition Feature that has Yes listed for Itanium?
SELECT datacenter FROM table_name_85 WHERE itanium = "yes" AND features = "memory modules: hot addition"
sql_create_context
CREATE TABLE table_name_27 ( attendance INTEGER, venue VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest attendance at Venue H in Round R2?
SELECT MIN(attendance) FROM table_name_27 WHERE venue = "h" AND round = "r2"
sql_create_context
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE d_labitems ( row_id number, itemid...
SELECT COUNT(*) > 0 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 60763)
mimic_iii
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, ...
SELECT Id, DisplayName, Reputation, Location FROM Users WHERE Location LIKE '%Sofia%' OR Location LIKE '%Bulgaria%' ORDER BY Reputation DESC LIMIT 150
sede
CREATE TABLE table_24143253_5 ( deceased_spouse VARCHAR, length_of_marriage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the deceased spouse who was married for 4 years?
SELECT deceased_spouse FROM table_24143253_5 WHERE length_of_marriage = "4 years"
sql_create_context
CREATE TABLE table_21595 ( "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 was the year when Ch nqi Ch sh ( ) was submitted?
SELECT "Year (Ceremony)" FROM table_21595 WHERE "Original title" = 'Chūnqiū cháshì (春秋茶室)'
wikisql
CREATE TABLE table_67310 ( "Name" text, "Party" text, "Hometown" text, "District" text, "Term" text, "Legislatures" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the term of Bruce Biers Kendall whose hometown is Anchorage?
SELECT "Term" FROM table_67310 WHERE "Hometown" = 'anchorage' AND "Name" = 'bruce biers kendall'
wikisql
CREATE TABLE table_14583 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most pick # for overall of 204
SELECT MAX("Pick #") FROM table_14583 WHERE "Overall" = '204'
wikisql
CREATE TABLE table_27799 ( "Municipality" text, "No. of s Barangay" real, "Area (km\u00b2)" text, "Population (2007)" real, "Population (2010)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the municipality that has an area of exactly 214.4...
SELECT "Municipality" FROM table_27799 WHERE "Area (km\u00b2)" = '214.44'
wikisql
CREATE TABLE table_name_74 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score did the opposing home team have against Melbourne
SELECT home_team AS score FROM table_name_74 WHERE away_team = "melbourne"
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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "41031" AND prescriptions.drug_type = "BASE"
mimicsql_data
CREATE TABLE table_name_76 ( location VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the event Kage Kombat 16?
SELECT location FROM table_name_76 WHERE event = "kage kombat 16"
sql_create_context
CREATE TABLE table_60748 ( "Year" real, "Competition" text, "Venue" text, "Position" text, "Event" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the earliest year that an event held in Berlin, Germany had a 100 m hurdles event?
SELECT MIN("Year") FROM table_60748 WHERE "Venue" = 'berlin, germany' AND "Event" = '100 m hurdles'
wikisql
CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_days text ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop, food_service WHERE ((CITY_2.city_code = AIRPORT_SERVICE_2.city_code AND CITY_2.city_name = 'ATLANTA...
atis
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, ...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '0195557' AND t_kc22.SOC_SRT_DIRE_CD = '0152'
css
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program ( program_id int, name v...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course.course_id = course_offering.course_id AND course.department = 'LING' AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semester = 'Summer...
advising
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationD...
WITH IntelTags AS (SELECT Id, TagName, Count FROM Tags WHERE Tags.TagName LIKE 'intel-%' OR Tags.TagName = 'intel'), IntelPostIds AS (SELECT DISTINCT PostTags.PostId FROM PostTags INNER JOIN IntelTags ON IntelTags.Id = PostTags.TagId) SELECT Id AS "post_link", Body, Tags, CreationDate, Score, ViewCount FROM Posts INNER...
sede
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.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY T1.Code DESC
nvbench
CREATE TABLE table_33017 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest attendance for a game before 10 weeks on November 12, 1967
SELECT MIN("Attendance") FROM table_33017 WHERE "Week" < '10' AND "Date" = 'november 12, 1967'
wikisql
CREATE TABLE table_28561 ( "Film Festival" text, "Date of ceremony" text, "Category" text, "Participants/Recipients" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What film festival was the participant/recipient Isao Tomita?
SELECT "Film Festival" FROM table_28561 WHERE "Participants/Recipients" = 'Isao Tomita'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Thoracentesis" AND lab."CATEGORY" = "Chemistry"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2133.0" AND procedures.long_title = "Open and other replacement of mitral valve with tissue graft"
mimicsql_data
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownV...
SELECT Id AS "comment_link", Text, CreationDate FROM Comments WHERE UserId = '##UserId##' AND Text LIKE '%##Keyword##%' ORDER BY CreationDate DESC
sede
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean...
SELECT DISTINCT p.Id AS "post_link", p.LastActivityDate, p.DeletionDate FROM Posts AS p JOIN PostHistory AS ph ON p.Id = ph.PostId WHERE p.OwnerUserId = '##USERID##' AND NOT p.DeletionDate IS NULL ORDER BY p.LastActivityDate DESC
sede
CREATE TABLE station ( Station_ID int, Name text, Annual_entry_exit real, Annual_interchanges real, Total_Passengers real, Location text, Main_Services text, Number_of_Platforms int ) CREATE TABLE train ( Train_ID int, Name text, Time text, Service text ) CREATE TABLE t...
SELECT SUM(Number_of_Platforms), SUM(Total_Passengers) FROM station GROUP BY Location
nvbench
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREA...
SELECT t3.labname FROM (SELECT t2.labname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'atrial fibrillation - without hemodynamic compromise...
eicu
CREATE TABLE problem_log ( problem_log_id number, assigned_to_staff_id number, problem_id number, problem_category_code text, problem_status_code text, log_entry_date time, log_entry_description text, log_entry_fix text, other_log_details text ) CREATE TABLE problem_status_codes ( ...
SELECT problem_log_id, log_entry_date FROM problem_log WHERE problem_id = 10
spider
CREATE TABLE table_25008327_8 ( словјански VARCHAR, polish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every value for if polish is ksi ka?
SELECT словјански FROM table_25008327_8 WHERE polish = "książka"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC
nvbench
CREATE TABLE table_name_46 ( round INTEGER, method VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a Method of ko, and a Date of 1958?
SELECT MIN(round) FROM table_name_46 WHERE method = "ko" AND date = "1958"
sql_create_context
CREATE TABLE table_45506 ( "Pinnacle height" text, "Year" real, "Structure type" text, "Main use" text, "Country" text, "Town" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the main use for the structure listed in walker city, iowa?
SELECT "Main use" FROM table_45506 WHERE "Town" = 'walker city, iowa'
wikisql
CREATE TABLE table_name_97 ( number_of_districts__kecamatan_ INTEGER, province VARCHAR, villages VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of districts (kecamatan) in the north sulawesi province with more than 1,510 village...
SELECT MIN(number_of_districts__kecamatan_) FROM table_name_97 WHERE province = "north sulawesi" AND villages > 1 OFFSET 510
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "HOME HEALTH CARE" AND diagnoses.long_title = "Psoas muscle abscess"
mimicsql_data
CREATE TABLE table_23353 ( "School" text, "City / Town" text, "Website" text, "Size" real, "Principal" text, "Grades" text, "IDOE Profile" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the school/s in North Manchester?
SELECT "School" FROM table_23353 WHERE "City / Town" = 'North Manchester'
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Medicare" AND lab.label = "Albumin/Creatinine, Urine"
mimicsql_data
CREATE TABLE table_name_7 ( competition VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Competition has a Score of 2-0?
SELECT competition FROM table_name_7 WHERE score = "2-0"
sql_create_context
CREATE TABLE table_17378 ( "Index (Year)" text, "Author / Editor / Source" text, "Year of publication" text, "Countries sampled" real, "World Ranking (1)" text, "Ranking L.A. (2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many countries...
SELECT COUNT("Countries sampled") FROM table_17378 WHERE "Year of publication" = '2007' AND "Ranking L.A. (2)" = '7th'
wikisql
CREATE TABLE table_25211 ( "District name" text, "Dist. ID" real, "ISD" text, "County" text, "Authorizing agency" text, "Date opened" text, "Services" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the district ID is 74907, what is the na...
SELECT "District name" FROM table_25211 WHERE "Dist. ID" = '74907'
wikisql
CREATE TABLE table_63558 ( "Rank" real, "Lane" real, "Athlete" text, "Nationality" text, "Time" real, "React" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest lane in which an athlete got a time larger than 20.75 and a react sma...
SELECT MIN("Lane") FROM table_63558 WHERE "Time" > '20.75' AND "React" < '0.166'
wikisql