instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_2780146_6 ( hc__g_kwh_ VARCHAR, standard VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the HC for the Euro I standard?
SELECT hc__g_kwh_ FROM table_2780146_6 WHERE standard = "Euro I"
sql_create_context
CREATE TABLE table_21153 ( "Season" real, "Class" text, "Motorcycle" text, "Team" text, "Races" real, "Wins" real, "Podiums" real, "Poles" real, "FLaps" real, "Points" text, "Placement" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT COUNT("FLaps") FROM table_21153 WHERE "Points" = '63'
wikisql
CREATE TABLE table_77151 ( "Round" real, "Pick" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest pick of the player from texas a&i with an overall less than 28?
SELECT MAX("Pick") FROM table_77151 WHERE "College" = 'texas a&i' AND "Overall" < '28'
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 zyjybgb ( BBCJBW text, BBDM t...
SELECT * FROM hz_info JOIN mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE hz_inf...
css
CREATE TABLE table_203_687 ( id number, "#" number, "title" text, "time" text, "performer(s)" text, "songwriters" text, "producer(s)" text, "samples and notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which track has the same produ...
SELECT "title" FROM table_203_687 WHERE "title" <> '"say something"' AND "producer(s)" = (SELECT "producer(s)" FROM table_203_687 WHERE "title" = '"say something"')
squall
CREATE TABLE table_name_36 ( points INTEGER, difference VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the highest points that have a difference of 8, with a position less than 4?
SELECT MAX(points) FROM table_name_36 WHERE difference = "8" AND position < 4
sql_create_context
CREATE TABLE paperkeyphrase ( paperid int, keyphraseid int ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE journal ( journalid int, journalname varchar ) CREATE TABLE cite ( citingpaperid int, citedpape...
SELECT DISTINCT paper.paperid FROM dataset, paper, paperdataset WHERE dataset.datasetname IN ('WordNet', 'Dbpedia') AND paperdataset.datasetid = dataset.datasetid AND paper.paperid = paperdataset.paperid GROUP BY paper.paperid
scholar
CREATE TABLE table_34919 ( "School" text, "City" text, "Mascot" text, "Enrollment" real, "County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Mascot of blazers involves what city?
SELECT "City" FROM table_34919 WHERE "Mascot" = 'blazers'
wikisql
CREATE TABLE table_1751142_2 ( shuttle_time__seconds_ VARCHAR, speed__km_h_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the shuttle time for the level where the speed is 15.5 km/h?
SELECT shuttle_time__seconds_ FROM table_1751142_2 WHERE speed__km_h_ = "15.5"
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 procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "7" AND procedures.short_title = "Hemodialysis"
mimicsql_data
CREATE TABLE table_33975 ( "'Name' or designation" text, "Wheel arrangement" text, "Builder" text, "Year built" text, "Year withdrawn" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the builder in 1929
SELECT "Builder" FROM table_33975 WHERE "Year built" = '1929'
wikisql
CREATE TABLE table_17835 ( "Colt model no." text, "Name" text, "Stock" text, "Fire control" text, "Rear sight" text, "Forward assist" text, "Barrel length" text, "Barrel profile" text, "Barrel twist" text, "Hand guards" text, "Bayonet Lug" text, "Muzzle device" text ) -...
SELECT "Name" FROM table_17835 WHERE "Barrel profile" = 'A2'
wikisql
CREATE TABLE table_name_94 ( award VARCHAR, year VARCHAR, result VARCHAR, category VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the award won for category of choice tv villain in years after 2008
SELECT award FROM table_name_94 WHERE result = "won" AND category = "choice tv villain" AND year > 2008
sql_create_context
CREATE TABLE table_12593 ( "Year" real, "Date" text, "Home Team" text, "Result" text, "Visiting Team" text, "Venue" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the visiting team of Los Angeles Rams, earlie...
SELECT "Date" FROM table_12593 WHERE "Visiting Team" = 'los angeles rams' AND "Year" < '1958'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT * FROM hz_info JOIN zyjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM AND person_info_hz_i...
css
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 medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-4119'))
eicu
CREATE TABLE sqlite_sequence ( name any, seq any ) CREATE TABLE genres ( id INTEGER, name VARCHAR(120) ) CREATE TABLE artists ( id INTEGER, name VARCHAR(120) ) CREATE TABLE invoice_lines ( id INTEGER, invoice_id INTEGER, track_id INTEGER, unit_price NUMERIC(10,2), quantity...
SELECT name, COUNT(name) FROM playlists GROUP BY name ORDER BY name DESC
nvbench
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '00069816988'
css
CREATE TABLE table_62795 ( "Number" text, "Previous Number(s)" real, "Previous Class" text, "Converted" real, "Withdrawn" real, "Disposal" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a number of 30, what would be listed for previous numb...
SELECT "Previous Number(s)" FROM table_62795 WHERE "Number" = '30'
wikisql
CREATE TABLE table_name_87 ( loss VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the loss with record of 45-59
SELECT loss FROM table_name_87 WHERE record = "45-59"
sql_create_context
CREATE TABLE table_name_30 ( result VARCHAR, home_team VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result has a Home team of portland, and a Date of may 31?
SELECT result FROM table_name_30 WHERE home_team = "portland" AND date = "may 31"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "72" AND demographic.days_stay > "43"
mimicsql_data
CREATE TABLE list ( lastname text, firstname text, grade number, classroom number ) CREATE TABLE teachers ( lastname text, firstname text, classroom number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find all students taught by MARROTTE KIRK....
SELECT T1.firstname, T1.lastname FROM list AS T1 JOIN teachers AS T2 ON T1.classroom = T2.classroom WHERE T2.firstname = "MARROTTE" AND T2.lastname = "KIRK"
spider
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE airport ( airport_code varchar, airport_name text, ...
SELECT DISTINCT flight_id FROM flight WHERE (((departure_time < 800 AND flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 21 AND DATE_DAYalias0.month_number = 2 AND DATE_DAYal...
atis
CREATE TABLE table_39257 ( "Round" real, "Pick #" real, "Overall" real, "Name" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What name has an overall less than 268, and 1 as the round?
SELECT "Name" FROM table_39257 WHERE "Overall" < '268' AND "Round" = '1'
wikisql
CREATE TABLE table_14464 ( "Year" real, "Entrant" text, "Chassis" text, "Engine" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Points when the engine was a climax straight-4 earlier than 1958?
SELECT AVG("Points") FROM table_14464 WHERE "Engine" = 'climax straight-4' AND "Year" < '1958'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_type = "URGENT" AND demographic.dob_year < "2076"
mimicsql_data
CREATE TABLE CLASS ( class_code VARCHAR, crs_code VARCHAR ) CREATE TABLE student ( stu_fname VARCHAR, stu_num VARCHAR, stu_lname VARCHAR ) CREATE TABLE enroll ( stu_num VARCHAR, class_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- ...
SELECT T1.stu_fname FROM student AS T1 JOIN enroll AS T2 ON T1.stu_num = T2.stu_num JOIN CLASS AS T3 ON T2.class_code = T3.class_code WHERE T3.crs_code = 'ACCT-211' AND T1.stu_lname LIKE 'S%'
sql_create_context
CREATE TABLE table_name_69 ( country VARCHAR, airport VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what country is Hiroshima Airport located?
SELECT country FROM table_name_69 WHERE airport = "hiroshima airport"
sql_create_context
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as ...
SELECT DISTINCT num_enrolled FROM course WHERE department = 'EECS' AND number = 581
advising
CREATE TABLE table_name_80 ( venue VARCHAR, competition VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which venue held the Euro 2012 Qualifier?
SELECT venue FROM table_name_80 WHERE competition = "euro 2012 qualifier"
sql_create_context
CREATE TABLE table_203_266 ( id number, "group" text, "members" number, "caucusing" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of members between all of the groups ?
SELECT "members" FROM table_203_266 WHERE "group" = 'total'
squall
CREATE TABLE ENROLLED_IN ( StuID VARCHAR, Grade VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the number of students that have at least one grade 'B'.
SELECT COUNT(DISTINCT StuID) FROM ENROLLED_IN WHERE Grade = "B"
sql_create_context
CREATE TABLE table_name_19 ( opponent VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponent had a record of 37-27?
SELECT opponent FROM table_name_19 WHERE record = "37-27"
sql_create_context
CREATE TABLE table_name_24 ( drawn VARCHAR, played VARCHAR, first_game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was there a draw when played is more than 4 and the first game is in 2000?
SELECT drawn FROM table_name_24 WHERE played > 4 AND first_game = 2000
sql_create_context
CREATE TABLE table_60702 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MAX("Goals against") FROM table_60702 WHERE "Points" > '25' AND "Club" = 'sd indautxu' AND "Position" > '3'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABL...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 27146 AND admissions.admission_location = 'phys referral/normal deli' AND STRFTIME('%y', admissions.admittime) >= '2103' ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE elimination ( elimination_id text, wrestler_id text, team text, eliminated_by text, elimination_move text, time text ) CREATE TABLE wrestler ( wrestler_id number, name text, reign text, days_held text, location text, event text ) -- Using valid SQLite, ans...
SELECT elimination_move FROM elimination WHERE team = "Team Orton"
spider
CREATE TABLE table_29936 ( "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 i...
SELECT "Score" FROM table_29936 WHERE "High points" = 'Monta Ellis (29)'
wikisql
CREATE TABLE table_31447 ( "Game" real, "Date" text, "Team" text, "Score" text, "High points" text, "High rebounds" text, "Location Attendance" text, "Series" text, "Streak" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in april 13 ...
SELECT "High rebounds" FROM table_31447 WHERE "Date" = 'April 13'
wikisql
CREATE TABLE table_204_667 ( id number, "year" number, "film title" text, "genre" text, "cast" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are the total number of times ananth nag appears under cast ?
SELECT COUNT(*) FROM table_204_667 WHERE "cast" = 'ananth nag'
squall
CREATE TABLE table_35049 ( "gzip" text, "bzip2" text, "LHA/LZH" text, "StuffIt" text, "StuffIt X" text, "ISO/CD Image" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the gzip value associated with a stuffit of no, bzip2 of no, and LHA.LZ...
SELECT "gzip" FROM table_35049 WHERE "StuffIt" = 'no' AND "bzip2" = 'no' AND "LHA/LZH" = 'no'
wikisql
CREATE TABLE table_28003469_1 ( event_date VARCHAR, event_day VARCHAR, starting_time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every event date on Sunday with a starting time of 9:30 am?
SELECT event_date FROM table_28003469_1 WHERE event_day = "Sunday" AND starting_time = "9:30 am"
sql_create_context
CREATE TABLE table_name_65 ( cuts_made INTEGER, wins INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the lowest number of cuts made while the win was less than 0?
SELECT MIN(cuts_made) FROM table_name_65 WHERE wins < 0
sql_create_context
CREATE TABLE table_7811 ( "State" text, "Preliminary Average" text, "Interview" text, "Swimsuit" text, "Evening Gown" text, "Semifinal Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the swimsuit score when evening gown score is ...
SELECT "Swimsuit" FROM table_7811 WHERE "Evening Gown" = '9.165 (3)'
wikisql
CREATE TABLE catalog_contents ( catalog_entry_name VARCHAR, product_stock_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the names of all the products whose stock number starts with '2'.
SELECT catalog_entry_name FROM catalog_contents WHERE product_stock_number LIKE "2%"
sql_create_context
CREATE TABLE table_13710464_1 ( location VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where was the game played on may 20?
SELECT location FROM table_13710464_1 WHERE date = "May 20"
sql_create_context
CREATE TABLE table_name_77 ( saka_era VARCHAR, months_in_malayalam_era VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE SAKA ERA WITH MONTHS IN MEDAM?
SELECT saka_era FROM table_name_77 WHERE months_in_malayalam_era = "medam"
sql_create_context
CREATE TABLE table_16710829_2 ( result VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of results for new orleans saints
SELECT COUNT(result) FROM table_16710829_2 WHERE opponent = "New Orleans Saints"
sql_create_context
CREATE TABLE table_39569 ( "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Switzerland has how many gold and less than 0 silver?
SELECT MAX("Gold") FROM table_39569 WHERE "Nation" = 'switzerland' AND "Silver" < '0'
wikisql
CREATE TABLE table_name_4 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the score for december 3
SELECT score FROM table_name_4 WHERE date = "december 3"
sql_create_context
CREATE TABLE table_1342359_5 ( candidates VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many candidates with district being california 7
SELECT COUNT(candidates) FROM table_1342359_5 WHERE district = "California 7"
sql_create_context
CREATE TABLE table_name_96 ( week INTEGER, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Result of w 21 7 had what average week?
SELECT AVG(week) FROM table_name_96 WHERE result = "w 21–7"
sql_create_context
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) 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...
SELECT Nationality, COUNT(Nationality) FROM swimmer GROUP BY Nationality ORDER BY Nationality
nvbench
CREATE TABLE table_46267 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rider has a time of +2:11.524?
SELECT "Rider" FROM table_46267 WHERE "Time" = '+2:11.524'
wikisql
CREATE TABLE user ( uid int, user_id varchar, name varchar ) CREATE TABLE category ( id int, business_id varchar, category_name varchar ) CREATE TABLE review ( rid int, business_id varchar, user_id varchar, rating float, text longtext, year int, month varchar ) CRE...
SELECT tip.text FROM review, tip, user WHERE review.year = 2012 AND user.user_id = review.user_id AND user.user_id = tip.user_id
yelp
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PostLinks ( Id number, CreationDate time, Pos...
SELECT u.DisplayName, COUNT(*) AS num_of_posts FROM Users AS u INNER JOIN Posts AS p ON u.Id = p.OwnerUserId WHERE p.Score = 0 AND p.PostTypeId = 2 GROUP BY u.DisplayName ORDER BY num_of_posts DESC
sede
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
SELECT Body FROM Posts WHERE PostTypeId = 2 AND Score >= 7 AND Body LIKE ('%##param##%')
sede
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 42211) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'base excess') AND DATETIME(labevents.charttime, 'start of year') = DATETIME(CURR...
mimic_iii
CREATE TABLE table_name_39 ( attendance VARCHAR, week VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Attendance for a Week earlier than 16, and a Date of bye?
SELECT attendance FROM table_name_39 WHERE week < 16 AND date = "bye"
sql_create_context
CREATE TABLE table_203_543 ( id number, "year" text, "show" text, "role" text, "channel" text, "extra" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- list at least one show that she was on in 2012 .
SELECT "show" FROM table_203_543 WHERE "year" = 2012
squall
CREATE TABLE acceptance ( submission_id number, workshop_id number, result text ) CREATE TABLE submission ( submission_id number, scores number, author text, college text ) CREATE TABLE workshop ( workshop_id number, date text, venue text, name text ) -- Using valid SQLit...
SELECT author FROM submission WHERE college = "Florida" OR college = "Temple"
spider
CREATE TABLE table_name_71 ( year VARCHAR, award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For how many years has the Mercury Prize been awarded?
SELECT COUNT(year) FROM table_name_71 WHERE award = "mercury prize"
sql_create_context
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) -- Using valid SQLite, answer the following questions fo...
SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type
nvbench
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 jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN zyjybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB AND zyjybgb.YLJGDM = jyjgzbb.YLJGDM AND zyjybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDSM = '持久的妄想性障碍' AND jyjgzbb.JCZBMC = '补体C4' UNION SELECT jyjgzbb.CKZFW...
css
CREATE TABLE table_54033 ( "Rank" real, "Player" text, "County" text, "Tally" text, "Total" real, "Opposition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total for David O'Callaghan, and a Tally of 1-9?
SELECT SUM("Total") FROM table_54033 WHERE "Player" = 'david o''callaghan' AND "Tally" = '1-9'
wikisql
CREATE TABLE table_name_13 ( authors VARCHAR, novelty VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Authors, when Novelty is Gen Et Sp Nov, and when Name is Lanthanocephalus?
SELECT authors FROM table_name_13 WHERE novelty = "gen et sp nov" AND name = "lanthanocephalus"
sql_create_context
CREATE TABLE table_63214 ( "Island" text, "Country" text, "Population" text, "Area km\u00b2" text, "Density (per km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Japan's Area km ?
SELECT "Area km\u00b2" FROM table_63214 WHERE "Country" = 'japan'
wikisql
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationD...
SELECT t.TagName AS Tag, ROUND(SUM(CASE WHEN NOT AcceptedAnswerId IS NULL THEN 1 ELSE 0 END) * 100.0 / COUNT(1), 2) AS "percent_answered" FROM Posts AS p INNER JOIN PostTags AS pt ON p.Id = pt.PostId INNER JOIN Tags AS t ON pt.TagId = t.Id WHERE p.PostTypeId = 1 AND t.TagName = 'office-js' GROUP BY t.Id, t.TagName ORDE...
sede
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT zzmzjzjlb.SG, zzmzjzjlb.TZ, zzmzjzjlb.TW, zzmzjzjlb.SSY, zzmzjzjlb.SZY, zzmzjzjlb.XL, zzmzjzjlb.HXPLC, zzmzjzjlb.ML FROM zzmzjzjlb WHERE zzmzjzjlb.JZLSH = '72157551077' UNION SELECT fzzmzjzjlb.SG, fzzmzjzjlb.TZ, fzzmzjzjlb.TW, fzzmzjzjlb.SSY, fzzmzjzjlb.SZY, fzzmzjzjlb.XL, fzzmzjzjlb.HXPLC, fzzmzjzjlb.ML FROM fz...
css
CREATE TABLE table_name_94 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the match on 11/2/01?
SELECT score FROM table_name_94 WHERE date = "11/2/01"
sql_create_context
CREATE TABLE table_39851 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the finish when the to par is +18?
SELECT "Finish" FROM table_39851 WHERE "To par" = '+18'
wikisql
CREATE TABLE table_name_9 ( score VARCHAR, money__$_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the player who earned $5,000?
SELECT score FROM table_name_9 WHERE money__$_ = "5,000"
sql_create_context
CREATE TABLE table_12962773_12 ( height VARCHAR, no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the height for player number 5?
SELECT COUNT(height) FROM table_12962773_12 WHERE no = 5
sql_create_context
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_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, H...
SELECT SUM(t_kc24.MED_AMOUT) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '褚泰鸿' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2011-01-20' AND '2021-04-06'
css
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE mzjzjlb ( HXPLC number, HZXM ...
SELECT * 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_zyjzjlb.YLJGDM AND hz_info_zyjz...
css
CREATE TABLE Ref_Calendar ( Calendar_Date DATETIME, Day_Number INTEGER ) CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Ref_Document_...
SELECT Location_Code, COUNT(Location_Code) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Location_Code)
nvbench
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT COUNT(*) FROM 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_kc22.STA_DATE BETWEEN '2011-12-30' AND '2015-04-15' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE departments ( department_id VARCHAR ) CREATE TABLE employees ( department_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- display the department name and number of employees in each of the department.
SELECT department_name, COUNT(*) FROM employees AS T1 JOIN departments AS T2 ON T1.department_id = T2.department_id GROUP BY department_name
sql_create_context
CREATE TABLE table_name_75 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the record on April 10?
SELECT record FROM table_name_75 WHERE date = "april 10"
sql_create_context
CREATE TABLE table_14440 ( "Player" text, "Position" text, "Round" text, "Overall" real, "MLB Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the lowest overall for Louis Coleman?
SELECT MIN("Overall") FROM table_14440 WHERE "Player" = 'louis coleman'
wikisql
CREATE TABLE table_name_37 ( round VARCHAR, venue VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round at St. Mirren Park with more than 4,555 people attending?
SELECT round FROM table_name_37 WHERE venue = "st. mirren park" AND attendance > 4 OFFSET 555
sql_create_context
CREATE TABLE table_name_86 ( team VARCHAR, high_rebounds VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the team that has a High rebounds of popeye jones (14), and when the Record was 16-28?
SELECT team FROM table_name_86 WHERE high_rebounds = "popeye jones (14)" AND record = "16-28"
sql_create_context
CREATE TABLE fgwyjzb ( 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 gwyjzb.OUT_DIAG_DOC_CD, gwyjzb.OUT_DIAG_DOC_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '44983349' GROUP BY gwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT fgwyjzb.OUT_DIAG_DOC_CD, fgwyjzb.OUT_DIAG_DOC_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '44983349' GROUP BY fgwyjzb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) ...
css
CREATE TABLE job_history ( employee_id VARCHAR, end_date INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- display the employee ID for each employee and the date on which he ended his previous job.
SELECT employee_id, MAX(end_date) FROM job_history GROUP BY employee_id
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.marital_status = "MARRIED" AND diagnoses.short_title = "Hy kid NOS w cr kid I-IV"
mimicsql_data
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime ti...
SELECT (SELECT chartevents.valuenum FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 18877) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND chartevents...
mimic_iii
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND diagnoses.icd9_code = "4373"
mimicsql_data
CREATE TABLE table_55706 ( "Race" text, "Date" text, "Location" text, "Pole Position" text, "Fastest Lap" text, "Race Winner" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Report includes the Bel...
SELECT "Report" FROM table_55706 WHERE "Race" = 'belgian grand prix'
wikisql
CREATE TABLE table_34738 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has Points larger than 46, and a Game smaller than 35, and a December of 2...
SELECT "Score" FROM table_34738 WHERE "Points" > '46' AND "Game" < '35' AND "December" = '21'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.admission_location = "PHYS REFERRAL/NORMAL DELI" AND demographic.admityear < "2178"
mimicsql_data
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 WHERE demographic.insurance = "Government" AND procedures.short_title = "Abdominal wall incision"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz...
css
CREATE TABLE table_29414946_3 ( replaced_by VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the new Santos manager?
SELECT replaced_by FROM table_29414946_3 WHERE team = "Santos"
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob te...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.route = "DWELL"
mimicsql_data
CREATE TABLE club_rank ( Rank real, Club_ID int, Gold real, Silver real, Bronze real, Total real ) CREATE TABLE competition_result ( Competition_ID int, Club_ID_1 int, Club_ID_2 int, Score text ) CREATE TABLE player ( Player_ID int, name text, Position text, Clu...
SELECT Position, COUNT(Position) FROM player GROUP BY Position HAVING AVG(Points) >= 20 ORDER BY Position DESC
nvbench
CREATE TABLE album ( albumid number, title text, artistid number ) CREATE TABLE genre ( genreid number, name text ) CREATE TABLE track ( trackid number, name text, albumid number, mediatypeid number, genreid number, composer text, milliseconds number, bytes number, ...
SELECT birthdate FROM employee WHERE city = "Edmonton"
spider
CREATE TABLE wdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT COUNT(*) FROM wdmzjzjlb WHERE wdmzjzjlb.JZKSMC = '小儿口腔颌面外科' AND wdmzjzjlb.RYDJSJ BETWEEN '2003-01-26' AND '2012-09-17' UNION SELECT COUNT(*) FROM bdmzjzjlb WHERE bdmzjzjlb.JZKSMC = '小儿口腔颌面外科' AND bdmzjzjlb.RYDJSJ BETWEEN '2003-01-26' AND '2012-09-17'
css
CREATE TABLE table_name_9 ( east VARCHAR, south VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was in the East when TUS Geretsried II was in the South?
SELECT east FROM table_name_9 WHERE south = "tus geretsried ii"
sql_create_context
CREATE TABLE table_47417 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the tie number with the home team of Swindon Town?
SELECT "Tie no" FROM table_47417 WHERE "Home team" = 'swindon town'
wikisql