instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_60529 ( "Year" real, "Round" real, "Pick" real, "Player" text, "NBA Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum for the pick of the year 2009, and a round smaller than 2 and an NBA Club Denver Nuggets?
SELECT SUM("Pick") FROM table_60529 WHERE "Year" = '2009' AND "Round" < '2' AND "NBA Club" = 'denver nuggets'
wikisql
CREATE TABLE table_name_11 ( pci_express VARCHAR, memory VARCHAR, sound VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which PCI-Express has a DDR 266/333/400 Registered/ECC memory and Enhanced AC'97 2.3 sound?
SELECT pci_express FROM table_name_11 WHERE memory = "ddr 266/333/400 registered/ecc" AND sound = "enhanced ac'97 2.3"
sql_create_context
CREATE TABLE tags ( index number, id number, tag text ) CREATE TABLE torrents ( groupname text, totalsnatched number, artist text, groupyear number, releasetype text, groupid number, id number ) -- Using valid SQLite, answer the following questions for the tables provided abov...
SELECT DISTINCT releasetype FROM torrents
whatcdhiphop
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 cost ( costid num...
SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%intake%' AND STRFTIME('%y', intakeoutput.intakeoutputtime) >= '2100' GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 3
eicu
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeri...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'stroke' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2103') AS t1) - (SELECT COUNT(DISTINCT t2.un...
eicu
CREATE TABLE table_33996 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player was picked in round 15 with a pick smaller than 13?
SELECT "Name" FROM table_33996 WHERE "Pick #" < '13' AND "Round" = '15'
wikisql
CREATE TABLE table_name_20 ( operator VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which operator has a rank of 7?
SELECT operator FROM table_name_20 WHERE rank = 7
sql_create_context
CREATE TABLE table_13801 ( "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 "Release price ( USD )" FROM table_13801 WHERE "GPU frequency" = '650–1150 mhz' AND "sSpec number" = 'sr0pq(e1)'
wikisql
CREATE TABLE table_name_53 ( original_title VARCHAR, year VARCHAR, author VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the original title for years before 1977 and author of lagercrantz olof lagercrantz
SELECT original_title FROM table_name_53 WHERE year < 1977 AND author = "lagercrantz olof lagercrantz"
sql_create_context
CREATE TABLE table_name_85 ( laps INTEGER, points VARCHAR, team VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the fewest number of laps for a Dale Coyne Racing team with a mechanical time/retired and fewer than 5 points...
SELECT MIN(laps) FROM table_name_85 WHERE team = "dale coyne racing" AND time_retired = "mechanical" AND points < 5
sql_create_context
CREATE TABLE table_50604 ( "Oklahoma vs." text, "Overall Record" text, "at Norman" text, "at Opponent's Venue" text, "at Neutral Site" text, "Last 5 Meetings" text, "Last 10 Meetings" text, "Current Streak" text, "Since Beginning of Big 12" text ) -- Using valid SQLite, answer the ...
SELECT "Last 10 Meetings" FROM table_50604 WHERE "at Norman" = 'ou, 18-6'
wikisql
CREATE TABLE table_name_7 ( brigade VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the brigade when Al-Bira is the name?
SELECT brigade FROM table_name_7 WHERE name = "al-bira"
sql_create_context
CREATE TABLE table_203_182 ( id number, "no. in\nseries" number, "no. in\nseason" number, "title" text, "directed by" text, "written by" text, "original air date" text, "production\ncode" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT "title" FROM table_203_182 WHERE "no. in\nseries" = (SELECT "no. in\nseries" FROM table_203_182 WHERE "title" = '"i, done" (part 1)') + 1
squall
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text...
SELECT meter_200, AVG(ID) FROM swimmer GROUP BY meter_200 ORDER BY meter_200
nvbench
CREATE TABLE table_70559 ( "Year" real, "Division" real, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Division when the playoffs were the quarter finals, wit...
SELECT MAX("Division") FROM table_70559 WHERE "Playoffs" = 'quarter finals' AND "Regular Season" = '5th'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY AVG(EMPLOYEE_ID) DESC
nvbench
CREATE TABLE table_50906 ( "Acharya Number" real, "Name of Acharya" text, "Born on" text, "Became Acharya on" text, "Death" text, "Term" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the term of acharya shree vasudevprasadji maharaj?
SELECT "Term" FROM table_50906 WHERE "Name of Acharya" = 'acharya shree vasudevprasadji maharaj'
wikisql
CREATE TABLE table_name_35 ( against INTEGER, losses VARCHAR, draws VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE HIGHEST AGAINST WITH LOSSES SMALLER THAN 17, DRAWS LARGER THAN 1?
SELECT MAX(against) FROM table_name_35 WHERE losses < 17 AND draws > 1
sql_create_context
CREATE TABLE table_name_66 ( bronze VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which bronze has a Rank of 37?
SELECT bronze FROM table_name_66 WHERE rank = "37"
sql_create_context
CREATE TABLE table_66703 ( "Year" text, "Births (000s)" real, "Deaths" real, "Natural Growth" real, "Total Fertility Rate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average birth rate that has a total fertility rate of na, and a nat...
SELECT AVG("Births (000s)") FROM table_66703 WHERE "Total Fertility Rate" = 'na' AND "Natural Growth" < '2.5'
wikisql
CREATE TABLE table_21071 ( "Team #1" text, "Points" text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If team two is Lan s, what was the total number of points?
SELECT COUNT("Points") FROM table_21071 WHERE "Team #2" = 'Lanús'
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 WHERE demographic.language = "SPAN" AND demographic.religion = "UNOBTAINABLE"
mimicsql_data
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT BBDM, BBMC, BBZT FROM jybgb WHERE BGDH = '63924236375'
css
CREATE TABLE table_49833 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/junior/club team (league)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the team with round less than 2, and the nationality ...
SELECT "College/junior/club team (league)" FROM table_49833 WHERE "Round" < '2' AND "Nationality" = 'united states'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, d...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'myxoma')
eicu
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 wdmzjzjlb.JZKSRQ FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '21018594065' UNION SELECT bdmzjzjlb.JZKSRQ FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '21018594065'
css
CREATE TABLE Person ( name varchar(20), age INTEGER, city TEXT, gender TEXT, job TEXT ) CREATE TABLE PersonFriend ( name varchar(20), friend varchar(20), year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Visualize a pie chart with ...
SELECT gender, AVG(age) FROM Person GROUP BY gender
nvbench
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 WHERE demographic.gender = "M" AND demographic.ethnicity = "BLACK/CAPE VERDEAN"
mimicsql_data
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE station ( id INTEG...
SELECT date, COUNT(date) FROM weather WHERE max_temperature_f >= 80 GROUP BY date ORDER BY date
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 lab."CATEGORY" FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.name = "Kelly Gallardo"
mimicsql_data
CREATE TABLE table_2047 ( "Province" text, "Latin Americans 2001" real, "% 2001" text, "Latin Americans 2011" real, "% 2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the percentage in 2001 in Manitoba where the percentage in 2011 is 0.8...
SELECT "% 2001" FROM table_2047 WHERE "% 2011" = '0.8%' AND "Province" = 'Manitoba'
wikisql
CREATE TABLE table_16570286_2 ( team VARCHAR, highest_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams were there with a high score of 143?
SELECT COUNT(team) FROM table_16570286_2 WHERE highest_score = "143"
sql_create_context
CREATE TABLE table_name_20 ( rank INTEGER, games_played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rank of the person with more than 5 games played?
SELECT SUM(rank) FROM table_name_20 WHERE games_played > 5
sql_create_context
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 COUNT(*) FROM mzjzjlb WHERE mzjzjlb.ZZYSGH = '21581460' AND mzjzjlb.JZKSRQ BETWEEN '2002-10-01' AND '2016-07-05'
css
CREATE TABLE table_61854 ( "Tie no" real, "Home team" text, "Score" text, "Away team" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score when the attendance is less than 83 and Raunds Town is the away team?
SELECT "Score" FROM table_61854 WHERE "Attendance" < '83' AND "Away team" = 'raunds town'
wikisql
CREATE TABLE table_22713796_14 ( stage INTEGER, winner VARCHAR, general_classification VARCHAR, team_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most stage for alejandro valverde and astana greg henderson
SELECT MAX(stage) FROM table_22713796_14 WHERE general_classification = "Alejandro Valverde" AND team_classification = "Astana" AND winner = "Greg Henderson"
sql_create_context
CREATE TABLE table_2112766_1 ( broadcast_date VARCHAR, viewers__in_millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is all the broadcast date when viewers were 8.4 millions
SELECT COUNT(broadcast_date) FROM table_2112766_1 WHERE viewers__in_millions_ = "8.4"
sql_create_context
CREATE TABLE table_24216 ( "Competition" text, "Round" text, "Opponent" text, "Result" text, "Score" text, "Home/Away" text, "Venue" text, "Attendance" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the score agai...
SELECT "Score" FROM table_24216 WHERE "Opponent" = 'Crusaders'
wikisql
CREATE TABLE orders ( order_id number, customer_id number, date_order_placed time, order_details text ) CREATE TABLE invoice_line_items ( order_item_id number, invoice_number number, product_id number, product_title text, product_quantity text, product_price number, derived_...
SELECT T1.customer_id, T2.customer_first_name, T2.customer_last_name FROM accounts AS T1 JOIN customers AS T2 ON T1.customer_id = T2.customer_id GROUP BY T1.customer_id ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE Student ( StuID VARCHAR ) CREATE TABLE Has_allergy ( StuID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the student ids of students who don't have any allergies?
SELECT StuID FROM Student EXCEPT SELECT StuID FROM Has_allergy
sql_create_context
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE Tags ( Id number, TagName text, Count number, ...
SELECT Score, COUNT(Score) AS "count" FROM Posts WHERE NOT AnswerCount IS NULL GROUP BY Score ORDER BY Score DESC
sede
CREATE TABLE table_name_3 ( sliding_tackle VARCHAR, dump_tackle VARCHAR, shoulder_charge VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which sliding tackle has no dump tackle and a restricted shoulder charge?
SELECT sliding_tackle FROM table_name_3 WHERE dump_tackle = "no" AND shoulder_charge = "restricted"
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 JZZDBM, JZZDSM FROM mzjzjlb WHERE JZLSH = '77162330250'
css
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT SUM(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465')) AND intakeoutput.cellpath LIKE '%in...
eicu
CREATE TABLE table_31330 ( "Manufacturer" text, "Model" text, "Intro Date" text, "Interface" text, "OS" text, "Price (USD)" real, "Price" text, "Throughput" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the intro date for the in...
SELECT "Intro Date" FROM table_31330 WHERE "Interface" = 'PCI'
wikisql
CREATE TABLE table_76925 ( "Taper" text, "Large end" real, "Small end" real, "Length" real, "Taper/ ft" real, "Taper/ in" real, "Angle from center/\u00b0" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Large end has a Taper/ft smaller ...
SELECT COUNT("Large end") FROM table_76925 WHERE "Taper/ ft" < '0.6000000000000001'
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "1" AND diagnoses.long_title = "Diseases of tricuspid valve"
mimicsql_data
CREATE TABLE train ( id int, train_number int, name text, origin text, destination text, time text, interval text ) CREATE TABLE route ( train_id int, station_id int ) CREATE TABLE weekly_weather ( station_id int, day_of_week text, high_temperature int, low_temperat...
SELECT services, COUNT(services) FROM station GROUP BY services ORDER BY COUNT(services) DESC
nvbench
CREATE TABLE table_name_46 ( modern_title_of_house VARCHAR, translation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which modern house title translates to prison?
SELECT modern_title_of_house FROM table_name_46 WHERE translation = "prison"
sql_create_context
CREATE TABLE table_name_92 ( attendance INTEGER, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average attendance for a Kings game when they had a record of 1 5 0?
SELECT AVG(attendance) FROM table_name_92 WHERE record = "1–5–0"
sql_create_context
CREATE TABLE order_items ( item_id number, order_item_status_code text, order_id number, product_id number, item_status_code text, item_delivered_datetime time, item_order_quantity text ) CREATE TABLE mailshot_customers ( mailshot_id number, customer_id number, outcome_code text...
SELECT T1.customer_name, T1.customer_phone FROM customers AS T1 JOIN mailshot_customers AS T2 ON T1.customer_id = T2.customer_id WHERE T2.outcome_code = 'No Response'
spider
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number...
SELECT Tags, COUNT(DISTINCT Id) AS post_cnt FROM Posts WHERE YEAR(CreationDate) = '2017' AND NOT Tags IS NULL GROUP BY Tags ORDER BY post_cnt DESC LIMIT 10
sede
CREATE TABLE table_name_80 ( date_of_appointment VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of appointment of nejat biyedi ?
SELECT date_of_appointment FROM table_name_80 WHERE name = "nejat biyedić"
sql_create_context
CREATE TABLE qtb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT SUM(t_kc24.PER_ACC_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.PERSON_NM = '戚鸿振' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-11-12' AND '2012-08-09' UNION SELECT SUM(t_kc24.PER_ACC_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.PERSON_NM = '戚鸿振' A...
css
CREATE TABLE volume ( Volume_ID int, Volume_Issue text, Issue_Date text, Weeks_on_Top real, Song text, Artist_ID int ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE music_festival ( ID int, Musi...
SELECT Category, COUNT(*) FROM music_festival GROUP BY Category
nvbench
CREATE TABLE table_name_87 ( year VARCHAR, points INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of years that an entrant had more than 0 points?
SELECT COUNT(year) FROM table_name_87 WHERE points > 0
sql_create_context
CREATE TABLE table_name_8 ( match_points VARCHAR, points_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What match points have 755 as the points against?
SELECT match_points FROM table_name_8 WHERE points_against = "755"
sql_create_context
CREATE TABLE table_204_70 ( id number, "pick #" number, "nfl team" text, "player" text, "position" text, "college" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which position between the quarterback and defensive end has the larger count ?
SELECT "position" FROM table_204_70 WHERE "position" IN ('quarterback', 'defensive end') GROUP BY "position" ORDER BY COUNT(*) DESC LIMIT 1
squall
CREATE TABLE table_name_29 ( choreographer_s_ VARCHAR, style VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the choreographer for the dance style of Jazz?
SELECT choreographer_s_ FROM table_name_29 WHERE style = "jazz"
sql_create_context
CREATE TABLE table_30826 ( "DrumSet Name" text, "Product Line" text, "Years Available" text, "Drum Module" text, "KickDrum Pad" text, "Snare Pad" text, "Tom-Tom Pads" text, "Hi-HatPad/ Controller" text, "CrashandRide CymbalPads" text, "DrumStand (oftenoptional)" text ) -- Using...
SELECT "CrashandRide CymbalPads" FROM table_30826 WHERE "DrumSet Name" = 'TD-9K2'
wikisql
CREATE TABLE table_30932 ( "Series #" real, "Production Code" real, "Title" text, "Directed by" text, "Written by" text, "United States Original Airdate" text, "Canada Original Airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are...
SELECT "Title" FROM table_30932 WHERE "Written by" = 'Eric Trueheart'
wikisql
CREATE TABLE table_26962 ( "Name" text, "Position" text, "Period" text, "Appearances\u00b9" real, "Goals\u00b9" real, "Nationality\u00b2" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of goals scored
SELECT MAX("Goals\u00b9") FROM table_26962
wikisql
CREATE TABLE table_name_3 ( score VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the wigan athletic home team?
SELECT score FROM table_name_3 WHERE home_team = "wigan athletic"
sql_create_context
CREATE TABLE table_60471 ( "English name" text, "Thai name" text, "Abbr." text, "Transcription" text, "Sanskrit word" text, "Zodiac sign" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the English word that is abbreviated . .?
SELECT "English name" FROM table_60471 WHERE "Abbr." = 'พ.ย.'
wikisql
CREATE TABLE table_23614702_1 ( main_artillery VARCHAR, warship VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's Blanco Encalada's main artillery?
SELECT main_artillery FROM table_23614702_1 WHERE warship = "Blanco Encalada"
sql_create_context
CREATE TABLE table_23616 ( "Divisions" text, "Prize (EUR)" text, "Odds of winning (1in)" text, "Number of winning tickets" real, "In order to win" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many odd of winning have 6th as the division?
SELECT "Odds of winning (1in)" FROM table_23616 WHERE "Divisions" = '6th'
wikisql
CREATE TABLE table_47656 ( "Nat." text, "Name" text, "Since" text, "Goals" real, "Ends" text, "Transfer fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Since, when Transfer Fee is ' 12m'?
SELECT "Since" FROM table_47656 WHERE "Transfer fee" = '£ 12m'
wikisql
CREATE TABLE table_55447 ( "Date" text, "Tournament" text, "Winning score" text, "To par" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Runner(s)-up in the race with a winning score of ...
SELECT "Runner(s)-up" FROM table_55447 WHERE "Winning score" = '67-66-65-69=267'
wikisql
CREATE TABLE table_59674 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What district is Jim Moran the incumbent for.
SELECT "District" FROM table_59674 WHERE "Incumbent" = 'jim moran'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE p...
SELECT t3.diagnosisname FROM (SELECT t2.diagnosisname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime, patient.patienthealthsystemstayid FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'cardi...
eicu
CREATE TABLE table_48834 ( "Game" text, "Date" text, "Score" text, "Opponent" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Opponent of the game with more than 13,567 in Attendanc...
SELECT "Opponent" FROM table_48834 WHERE "Points" > '5' AND "Attendance" > '13,567'
wikisql
CREATE TABLE table_name_45 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2009 when there's 11.8 in 2005 and less than 12.6 in 2006?
SELECT MIN(2009) FROM table_name_45 WHERE 2005 = 11.8 AND 2006 < 12.6
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Users ( Id number, Reputation number, CreationDate time, ...
SELECT i.Id, i.CreationDate, i.Title, i.Tags, i.Body, i.Score, i.AnswerCount, i.CommentCount, i.Link FROM (SELECT DISTINCT p.Id, p.CreationDate, p.Title, p.Tags, p.Body, p.Score, p.AnswerCount, p.CommentCount, CONCAT('http://stackoverflow.com/questions/', p.Id) AS Link FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id ...
sede
CREATE TABLE table_79875 ( "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 largest money for a t4 place, for Tiger Woods?
SELECT MAX("Money ( $ )") FROM table_79875 WHERE "Place" = 't4' AND "Player" = 'tiger woods'
wikisql
CREATE TABLE table_16779068_5 ( weightlifter VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the 3 where weightlifter is m. van der goten ( bel )
SELECT 3 FROM table_16779068_5 WHERE weightlifter = "M. Van der Goten ( BEL )"
sql_create_context
CREATE TABLE table_name_15 ( erp_w VARCHAR, frequency_mhz VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which ERP W has a Frequency MHz of 88.5 FM?
SELECT erp_w FROM table_name_15 WHERE frequency_mhz = "88.5 fm"
sql_create_context
CREATE TABLE table_203_584 ( id number, "date" text, "race name" text, "d(f)" number, "course" text, "prize (\u00a3)" number, "odds" text, "runners" number, "place" number, "margin" number, "winner/runner-up" text, "time" text, "jockey" text ) -- Using valid SQLite,...
SELECT "race name" FROM table_203_584 WHERE "date" = 1880 ORDER BY "date" LIMIT 1
squall
CREATE TABLE table_2668199_2 ( candidates VARCHAR, party VARCHAR, result VARCHAR, first_elected VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who were all the candidates when the results were re-elected, first elected was 1832 and the party was jack...
SELECT candidates FROM table_2668199_2 WHERE result = "Re-elected" AND first_elected = "1832" AND party = "Jacksonian"
sql_create_context
CREATE TABLE table_26375386_20 ( public VARCHAR, vote_percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the public when the vote percentage is 16.0%
SELECT public FROM table_26375386_20 WHERE vote_percentage = "16.0%"
sql_create_context
CREATE TABLE table_204_711 ( id number, "dance" text, "best dancer(s)" text, "best score" number, "worst dancer(s)" text, "worst score" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many of the worst dancers scored less than 15 points for...
SELECT COUNT("worst dancer(s)") FROM table_204_711 WHERE "worst score" < 15
squall
CREATE TABLE table_name_84 ( location VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which location has an Opponent of masanori suda?
SELECT location FROM table_name_84 WHERE opponent = "masanori suda"
sql_create_context
CREATE TABLE table_name_86 ( lost INTEGER, against INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number lost when the against value is less than 5?
SELECT AVG(lost) FROM table_name_86 WHERE against < 5
sql_create_context
CREATE TABLE table_74537 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the report for 30 july
SELECT "Report" FROM table_74537 WHERE "Date" = '30 july'
wikisql
CREATE TABLE Financial_Transactions ( transaction_id INTEGER, previous_transaction_id INTEGER, account_id INTEGER, card_id INTEGER, transaction_type VARCHAR(15), transaction_date DATETIME, transaction_amount DOUBLE, transaction_comment VARCHAR(255), other_transaction_details VARCHAR(...
SELECT card_type_code, COUNT(*) FROM Financial_Transactions AS T1 JOIN Customers_Cards AS T2 ON T1.card_id = T2.card_id GROUP BY T2.card_type_code ORDER BY card_type_code
nvbench
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_SEX = '姜舒方' AND t_kc22.STA_DATE BETWEEN '2005-02-06' AND '2017-08-25' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE table_5594 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the oilers record for the game on November 27 when the Edmonton oilers were playing at home and the Ch...
SELECT "Record" FROM table_5594 WHERE "Home" = 'edmonton oilers' AND "Visitor" = 'chicago blackhawks' AND "Date" = 'november 27'
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.Manufacturer 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_26136228_3 ( directed_by VARCHAR, series_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed episode 11 in the series?
SELECT directed_by FROM table_26136228_3 WHERE series_no = 11
sql_create_context
CREATE TABLE table_name_14 ( date VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the date in 1986?
SELECT date FROM table_name_14 WHERE year = 1986
sql_create_context
CREATE TABLE table_67834 ( "Sydney" text, "Melbourne" text, "Perth" text, "Adelaide" text, "Gold Coast" text, "Auckland" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- yes or no for the adelaide with no for auckland, yes for melbourne, yes for t...
SELECT "Adelaide" FROM table_67834 WHERE "Auckland" = 'no' AND "Melbourne" = 'yes' AND "Gold Coast" = 'yes'
wikisql
CREATE TABLE table_23284271_11 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for l 89 92 (ot)
SELECT date FROM table_23284271_11 WHERE score = "L 89–92 (OT)"
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 demographic ( subject_id text, hadm_id t...
SELECT demographic.gender FROM demographic WHERE demographic.name = "Tiffany Williams"
mimicsql_data
CREATE TABLE table_66349 ( "Manufacturer" text, "Model" text, "Transmission" text, "Engine Capacity" text, "Fuel Type" text, "L/100km Urban (Cold)" real, "L/100km Extra-Urban" real, "L/100km Combined" real, "mpg-UK Urban (Cold)" real, "mpg-UK Extra-Urban" real, "mpg-UK Combin...
SELECT "Fuel Type" FROM table_66349 WHERE "mpg-US Extra-Urban" > '53.5' AND "mpg-US Combined" > '50' AND "Manufacturer" = 'renault'
wikisql
CREATE TABLE table_29622 ( "Game" real, "January" real, "Opponent" text, "Score" text, "Location/Attendance" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what day in January was the record 15-29-3?
SELECT MAX("January") FROM table_29622 WHERE "Record" = '15-29-3'
wikisql
CREATE TABLE club ( club_id number, name text, region text, start_year text ) CREATE TABLE player ( player_id number, name text, position text, club_id number, apps number, tries number, goals text, points number ) CREATE TABLE club_rank ( rank number, club_id n...
SELECT COUNT(DISTINCT position) FROM player
spider
CREATE TABLE table_871 ( "Draft Year" real, "Player" text, "Position" text, "Round" real, "Overall" real, "NFL Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What numer pick in the draft for jerry marion
SELECT MAX("Overall") FROM table_871 WHERE "Player" = 'Jerry Marion'
wikisql
CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Coun...
SELECT meter_500, meter_100 FROM swimmer
nvbench
CREATE TABLE table_2182562_1 ( year VARCHAR, winnings VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year did the winnings equal $281,945?
SELECT year FROM table_2182562_1 WHERE winnings = "$281,945"
sql_create_context
CREATE TABLE table_name_63 ( attendance VARCHAR, site VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number in attendance at Dowdy-Ficklen stadium Greenville, NC, and the opponent was Ohio?
SELECT attendance FROM table_name_63 WHERE site = "dowdy-ficklen stadium • greenville, nc" AND opponent = "ohio"
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 prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, ...
SELECT diagnoses.short_title, diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "4271"
mimicsql_data