instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_91 ( couple VARCHAR, results VARCHAR, style VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which couple participated in the Paso Doble style and were safe?
SELECT couple FROM table_name_91 WHERE results = "safe" AND style = "paso doble"
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT AVG(Score) FROM Posts WHERE PostTypeId = 1 AND CreationDate > DATEADD(month, -1, GETDATE())
sede
CREATE TABLE table_26220 ( "Season" real, "Champion" text, "Count" real, "Runners-up" text, "Third place" text, "Top scorer" text, "Top scorers club" text, "Goals" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many season had Melgar...
SELECT COUNT("Season") FROM table_26220 WHERE "Champion" = 'Melgar'
wikisql
CREATE TABLE table_name_8 ( year VARCHAR, events_won_by_kclMS INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years were the events won by KCLMS less than 7?
SELECT COUNT(year) FROM table_name_8 WHERE events_won_by_kclMS < 7
sql_create_context
CREATE TABLE table_name_96 ( score VARCHAR, opponent_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final score of the Paul Goldstein match?
SELECT score FROM table_name_96 WHERE opponent_in_the_final = "paul goldstein"
sql_create_context
CREATE TABLE table_52704 ( "Race Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the constructor where the circuit is Silverstone?
SELECT "Constructor" FROM table_52704 WHERE "Circuit" = 'silverstone'
wikisql
CREATE TABLE table_name_15 ( losses INTEGER, benalla_dfl VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Benall DFL is Goorambat with less than 13 wins, what is the least amount of losses?
SELECT MIN(losses) FROM table_name_15 WHERE benalla_dfl = "goorambat" AND wins < 13
sql_create_context
CREATE TABLE subjects ( subject_id number, subject_name text ) CREATE TABLE student_course_enrolment ( registration_id number, student_id number, course_id number, date_of_enrolment time, date_of_completion time ) CREATE TABLE course_authors_and_tutors ( author_id number, author_tu...
SELECT T1.date_of_enrolment, T1.date_of_completion FROM student_course_enrolment AS T1 JOIN students AS T2 ON T1.student_id = T2.student_id WHERE T2.personal_name = "Karson"
spider
CREATE TABLE table_name_35 ( losses VARCHAR, draws VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the number of losses when the wins were more than 11 and had 0 draws?
SELECT COUNT(losses) FROM table_name_35 WHERE draws = 0 AND wins > 11
sql_create_context
CREATE TABLE table_name_31 ( lost VARCHAR, drawn VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of losses that have 1 draw and games over 7?
SELECT COUNT(lost) FROM table_name_31 WHERE drawn = 1 AND games > 7
sql_create_context
CREATE TABLE table_name_25 ( date VARCHAR, away VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date were the Ottawa Swans the away team?
SELECT date FROM table_name_25 WHERE away = "ottawa swans"
sql_create_context
CREATE TABLE table_name_77 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2009 for 2012 1R in Wimbledon and a 2011 2r?
SELECT 2009 FROM table_name_77 WHERE 2012 = "1r" AND tournament = "wimbledon" AND 2011 = "2r"
sql_create_context
CREATE TABLE table_38268 ( "Driver" text, "Season" text, "Entries" real, "Front row starts" real, "Percentage" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest front row starts for Alain Prost?
SELECT MAX("Front row starts") FROM table_38268 WHERE "Driver" = 'alain prost'
wikisql
CREATE TABLE table_43333 ( "Tournament" text, "Wins" real, "Top-5" real, "Top-10" real, "Top-25" real, "Events" real, "Cuts made" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mean number in the top 5 when the top 25 is 1 and th...
SELECT AVG("Top-5") FROM table_43333 WHERE "Top-25" = '1' AND "Wins" < '0'
wikisql
CREATE TABLE table_name_98 ( venue VARCHAR, year VARCHAR, notes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the venue that had 5000 m after 2009?
SELECT venue FROM table_name_98 WHERE year > 2009 AND notes = "5000 m"
sql_create_context
CREATE TABLE table_40257 ( "Rider" text, "Manufacturer" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest grid value for riders with manufacturer of Aprilia and time of +1.660?
SELECT MAX("Grid") FROM table_40257 WHERE "Manufacturer" = 'aprilia' AND "Time/Retired" = '+1.660'
wikisql
CREATE TABLE table_1341423_38 ( candidates VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many candidates were there in the district won by Joe Hoeffel?
SELECT COUNT(candidates) FROM table_1341423_38 WHERE incumbent = "Joe Hoeffel"
sql_create_context
CREATE TABLE table_19551 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the nhl team with college/junior/club team being bran...
SELECT "NHL team" FROM table_19551 WHERE "College/junior/club team" = 'Brandon Wheat Kings (WCHL)'
wikisql
CREATE TABLE table_23137 ( "Pick #" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What nationality for neil korzack?
SELECT "Nationality" FROM table_23137 WHERE "Player" = 'Neil Korzack'
wikisql
CREATE TABLE table_63505 ( "Party" text, "County" real, "City" real, "Borough" real, "Town" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What average city has a total less than 2, with a borough greater than 0?
SELECT AVG("City") FROM table_63505 WHERE "Total" < '2' AND "Borough" > '0'
wikisql
CREATE TABLE table_name_95 ( tenure VARCHAR, cause_of_death VARCHAR, badge_serial_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tenure of the Officer who died in a helicopter accident with Badge/Serial Number 16805?
SELECT tenure FROM table_name_95 WHERE cause_of_death = "helicopter accident" AND badge_serial_number = "16805"
sql_create_context
CREATE TABLE table_3952 ( "Code" text, "District" text, "Headquarters" text, "Population (2001 Census)" real, "Population (2011 Census)" real, "Area (km\u00b2)" real, "Density in 2011 (/km\u00b2)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT "Code" FROM table_3952 WHERE "Population (2011 Census)" = '312520'
wikisql
CREATE TABLE table_name_28 ( crowd INTEGER, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average size of the crowd for matches held at Corio Oval?
SELECT AVG(crowd) FROM table_name_28 WHERE venue = "corio oval"
sql_create_context
CREATE TABLE table_name_60 ( result VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE RESULT OF THE GAME ON APRIL 23?
SELECT result FROM table_name_60 WHERE date = "april 23"
sql_create_context
CREATE TABLE table_name_94 ( preliminaries INTEGER, evening_gown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest Preliminary score of a contestant that has an Evening Gown score of 8.472?
SELECT MIN(preliminaries) FROM table_name_94 WHERE evening_gown = 8.472
sql_create_context
CREATE TABLE Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Students ( stud...
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment GROUP BY date_of_completion ORDER BY date_of_completion DESC
nvbench
CREATE TABLE party ( minister VARCHAR, party_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all ministers who do not belong to Progress Party.
SELECT minister FROM party WHERE party_name <> 'Progress Party'
sql_create_context
CREATE TABLE table_64678 ( "World record" text, "Snatch" text, "Akakios Kakiasvilis ( GRE )" text, "188kg" text, "Athens , Greece" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What world record has the 188kg as 187kg?
SELECT "World record" FROM table_64678 WHERE "188kg" = '187kg'
wikisql
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 patient ( uniquep...
SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-118236' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime DESC LIMIT 1) AND NOT patient.admissionweight IS N...
eicu
CREATE TABLE table_1601792_4 ( television_station VARCHAR, transmitted VARCHAR, frequency VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the station that is transmitted at 20 kw and has a frequency of 48 uhf?
SELECT television_station FROM table_1601792_4 WHERE transmitted = "20 kW" AND frequency = "48 UHF"
sql_create_context
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text 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 varchar...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN program_course WHERE ((course.number < 400 + 100 AND course.number >= 400) OR (course.number < 500 + 100 AND course.number >= 500)) AND course.department = 'PHYSICS' AND program_course.workload = (SELECT MIN(PR...
advising
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE ReviewTaskStates ( Id number, Name te...
SELECT COUNT(*) FROM PostHistory
sede
CREATE TABLE table_name_84 ( d_50 VARCHAR, d_41 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the D 50 when the D 41 is d 41?
SELECT d_50 FROM table_name_84 WHERE d_41 = "d 41"
sql_create_context
CREATE TABLE table_55442 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did the home team score when playing agains...
SELECT "Home team score" FROM table_55442 WHERE "Away team" = 'collingwood'
wikisql
CREATE TABLE table_67074 ( "Competition" text, "1993\u2013 94" text, "1994\u2013 95" text, "1995\u2013 96" text, "1996\u2013 97" text, "1997\u2013 98" text, "1998\u2013 99" text, "1999\u2013 2000" text, "2000\u2013 01" text, "2001\u2013 02" text, "2002\u2013 03" text, "20...
SELECT "2014" FROM table_67074 WHERE "2003\u2013 04" = 'did not participate' AND "2005" = 'did not participate'
wikisql
CREATE TABLE table_5950 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff" text, "Game site" text, "Record" text, "Match Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result when the new england p...
SELECT "Result" FROM table_5950 WHERE "Opponent" = 'new england patriots'
wikisql
CREATE TABLE table_name_31 ( round VARCHAR, fixtures VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Round when the value for Fixtures is 2?
SELECT round FROM table_name_31 WHERE fixtures = 2
sql_create_context
CREATE TABLE table_name_92 ( points VARCHAR, highest_position VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of points associated with the highest position under 9 and a current position of 22?
SELECT points FROM table_name_92 WHERE highest_position < 9 AND position = 22
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT SUM(MED_AMOUT) FROM t_kc24 WHERE PERSON_ID = '91611726' AND CLINIC_SLT_DATE BETWEEN '2005-10-09' AND '2017-10-19'
css
CREATE TABLE project_outcomes ( project_id number, outcome_code text, outcome_details text ) CREATE TABLE projects ( project_id number, organisation_id number, project_details text ) CREATE TABLE document_types ( document_type_code text, document_description text ) CREATE TABLE tasks ...
SELECT COUNT(*) FROM tasks
spider
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConce...
SELECT COUNT(DISTINCT u.Id) FROM Users AS u, Posts AS p, PostTags AS pt, Tags AS t WHERE p.OwnerUserId = u.Id AND pt.PostId = p.Id AND pt.TagId = t.Id AND t.TagName = @Tag AND u.Reputation > @Reputation
sede
CREATE TABLE table_name_75 ( tournament VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What tournament did Nadal win and had a nadal of 16?
SELECT tournament FROM table_name_75 WHERE winner = "nadal" AND "nadal" = 16
sql_create_context
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE course_prerequisite ( pre_course_id ...
SELECT COUNT(*) FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'BIT' AND course.number = 311 AND semester.semester = 'WN' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE Student ( fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR ) CREATE TABLE Sportsinfo ( fname VARCHAR, age VARCHAR, StuID VARCHAR, SportName VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the first name a...
SELECT fname, age FROM Student WHERE StuID IN (SELECT StuID FROM Sportsinfo WHERE SportName = "Football" INTERSECT SELECT StuID FROM Sportsinfo WHERE SportName = "Lacrosse")
sql_create_context
CREATE TABLE table_36551 ( "Year" real, "Title" text, "Format" text, "Label" text, "Catalogno" text, "Remark" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was remark #104 us?
SELECT "Year" FROM table_36551 WHERE "Remark" = '#104 us'
wikisql
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT department, name, number FROM course WHERE (description LIKE '%Physiology Masters Research Capstone%' OR name LIKE '%Physiology Masters Research Capstone%') AND department = 'EECS'
advising
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "11" AND procedures.long_title = "Ureteral catheterization"
mimicsql_data
CREATE TABLE table_78855 ( "Year" real, "Award Ceremony" text, "Category" text, "Nominee" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was Mary Elizabeth Mastrantonio nominated?
SELECT "Year" FROM table_78855 WHERE "Nominee" = 'mary elizabeth mastrantonio'
wikisql
CREATE TABLE table_68932 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponent with round of 1 and time of n/a
SELECT "Opponent" FROM table_68932 WHERE "Round" = '1' AND "Time" = 'n/a'
wikisql
CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi...
mimic_iii
CREATE TABLE table_11796 ( "Team" text, "Seasons" text, "Regular season" real, "Tournament" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the average total for tournament less than 0
SELECT AVG("Total") FROM table_11796 WHERE "Tournament" < '0'
wikisql
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 text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.discharge_location = "HOME" AND diagnoses.long_title = "Anxiety state, unspecified"
mimicsql_data
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 hz_info ( KH text, KLX number...
SELECT jybgb.SHSJ FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '彭...
css
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CR...
SELECT patients.gender FROM patients WHERE patients.subject_id = 53176
mimic_iii
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 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid =...
eicu
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student ( student_id int, lastname varchar, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program, program_course WHERE course.department <> 'EDCURINS' AND program_course.course_id = course.course_id AND program.program_id = program_course.program_id
advising
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, ...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT microbiologyevents.hadm_id FROM microbiologyevents WHERE microbiologyevents.spec_type_desc = 'bone marrow' AND DATETIME(microbiologyevents.charttime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
mimic_iii
CREATE TABLE txmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN txmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE txmzjzjlb.JZZDSM = '抽动秽语综合征' GROUP BY person_info.JGDM UNION SELECT...
css
CREATE TABLE table_name_26 ( rank INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average 1st place with a Rank that is larger than 10?
SELECT AVG(1 AS st_place) FROM table_name_26 WHERE rank > 10
sql_create_context
CREATE TABLE table_202_75 ( id number, "award" text, "category" text, "recipients and nominees" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many awards was warren beatty nominated for ?
SELECT COUNT("award") FROM table_202_75 WHERE "recipients and nominees" = 'warren beatty'
squall
CREATE TABLE table_name_2 ( judaism VARCHAR, christianity VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the percentage of Judaism associated with Christianity at 2.51%?
SELECT judaism FROM table_name_2 WHERE christianity = "2.51%"
sql_create_context
CREATE TABLE table_47715 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which round has a time of 3:01?
SELECT "Round" FROM table_47715 WHERE "Time" = '3:01'
wikisql
CREATE TABLE table_204_476 ( id number, "name" text, "date built" number, "builder" text, "works no." number, "wheels" text, "cylinders" text, "notes" text, "withdrawn" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what name is li...
SELECT "name" FROM table_204_476 WHERE id = (SELECT id FROM table_204_476 WHERE "name" = 'spider') + 1
squall
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostHistory ( Id number, PostHistoryT...
SELECT P.Id AS "post_link", Tags FROM Posts AS P INNER JOIN Votes AS V ON P.Id = V.PostId WHERE VoteTypeId = 2 AND V.UserId = '##userid:int##' AND V.CreationDate BETWEEN DATEADD(m, -6, GETDATE()) AND DATEADD(m, -3, GETDATE())
sede
CREATE TABLE table_79584 ( "Club" text, "Wins" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of losses for Against values over 1510?
SELECT SUM("Losses") FROM table_79584 WHERE "Against" > '1510'
wikisql
CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE...
SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', admissions.admittime)) FROM admissions WHERE admissions.subject_id = 12726 AND admissions.dischtime IS NULL
mimic_iii
CREATE TABLE table_name_16 ( home_team VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team plays home in western oval venue?
SELECT home_team FROM table_name_16 WHERE venue = "western oval"
sql_create_context
CREATE TABLE table_6312 ( "Model" text, "Codename" text, "Capacities (GB)" text, "NAND type" text, "Interface" text, "Form factor" text, "Controller" text, "Seq. read/write MB/s" text, "Rnd 4KB read/write IOPS (K)" text, "Introduced" text ) -- Using valid SQLite, answer the fol...
SELECT "Form factor" FROM table_6312 WHERE "Controller" = 'sandforce' AND "Capacities (GB)" = '80/120/180/240/360/480' AND "Introduced" = 'july 2013'
wikisql
CREATE TABLE table_204_586 ( id number, "game" number, "date" text, "team" text, "score" text, "high points" text, "high rebounds" text, "high assists" text, "location\nattendance" text, "record" text ) -- Using valid SQLite, answer the following questions for the tables provid...
SELECT "high assists" FROM table_204_586 WHERE "date" = 'october 19'
squall
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 lab ( subject_id text, hadm_id text, ...
SELECT demographic.marital_status, demographic.insurance FROM demographic WHERE demographic.subject_id = "3284"
mimicsql_data
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number,...
SELECT a.ParentId AS "post_link", q.Tags, a.Score FROM Posts AS q LEFT OUTER JOIN Posts AS a ON q.Id = a.ParentId WHERE a.OwnerUserId = '##UserID##' AND q.Tags LIKE '%<##TagName##>%' ORDER BY a.Score DESC
sede
CREATE TABLE film ( Film_ID int, Rank_in_series int, Number_in_season int, Title text, Directed_by text, Original_air_date text, Production_code text ) CREATE TABLE schedule ( Cinema_ID int, Film_ID int, Date text, Show_times_per_day int, Price float ) CREATE TABLE cine...
SELECT Openning_year, COUNT(Openning_year) FROM cinema GROUP BY Openning_year ORDER BY Openning_year DESC
nvbench
CREATE TABLE course ( course_id varchar(8), title varchar(50), dept_name varchar(20), credits numeric(2,0) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2), end_min numeric(2) ) CREATE TABLE teaches...
SELECT MAX(capacity), AVG(capacity) FROM classroom GROUP BY building
nvbench
CREATE TABLE table_name_5 ( rider VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT IS THE RIDER WITH A 21 GRID?
SELECT rider FROM table_name_5 WHERE grid = "21"
sql_create_context
CREATE TABLE School ( School_id text, School_name text, Location text, Mascot text, Enrollment int, IHSAA_Class text, IHSAA_Football_Class text, County text ) CREATE TABLE budget ( School_id int, Year int, Budgeted int, total_budget_percent_budgeted real, Invested in...
SELECT County, COUNT(*) FROM School GROUP BY County ORDER BY County
nvbench
CREATE TABLE table_train_260 ( "id" int, "leukocyte_deficiencies" bool, "bleeding" int, "hemoglobin_a1c_hba1c" float, "leukocyte_dysfunction" bool, "renal_disease" bool, "hba1c" float, "serum_creatinine" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions f...
SELECT * FROM table_train_260 WHERE serum_creatinine > 1.6
criteria2sql
CREATE TABLE table_1473672_7 ( pick__number VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many players had been drafted in front of Yves archambault
SELECT pick__number FROM table_1473672_7 WHERE player = "Yves Archambault"
sql_create_context
CREATE TABLE table_51880 ( "D 41" text, "D 42" text, "D 43" text, "D 44" text, "D 45" text, "D 46" text, "R 54" text, "R 53" text, "R 52" text, "R 51" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the D 42 which has a D 46 ...
SELECT "D 42" FROM table_51880 WHERE "D 46" = 'r 26'
wikisql
CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int, long_lectures int, extra_credit int, few_tests int, good_feedback int, tough_tests int, heavy_papers int, cares_for_students int, heavy_assignments ...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN student_record ON student_record.course_id = course.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.department = 'YIDDISH' AND program_course.workload = (SELECT M...
advising
CREATE TABLE school ( school_id number, school text, location text, enrollment number, founded number, denomination text, boys_or_girls text, day_or_boarding text, year_entered_competition number, school_colors text ) CREATE TABLE school_details ( school_id number, nickn...
SELECT location FROM school WHERE NOT school_id IN (SELECT school_id FROM player)
spider
CREATE TABLE table_20499 ( "Position" real, "Club" text, "Games played" real, "Wins" real, "Draws" real, "Loses" real, "Goals scored" real, "Goals conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the least...
SELECT MIN("Position") FROM table_20499
wikisql
CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) 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_40...
SELECT meter_200, AVG(meter_100) FROM swimmer GROUP BY meter_200 ORDER BY meter_200
nvbench
CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE ((date_day.day_number = 24 AND date_day.month_number = 4 AND date_day.year = 1991 AND days.day_name = date_day.day_name AND flight.departure_time...
atis
CREATE TABLE table_2450 ( "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. -- Name the regular season for 2005
SELECT "Regular Season" FROM table_2450 WHERE "Year" = '2005'
wikisql
CREATE TABLE table_name_2 ( game VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game was on September 12?
SELECT game FROM table_name_2 WHERE date = "september 12"
sql_create_context
CREATE TABLE table_name_62 ( year__ceremony_ VARCHAR, result VARCHAR, film_title_used_in_nomination VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year has a not nominated result and a nomination title of 'the color of fame'?
SELECT year__ceremony_ FROM table_name_62 WHERE result = "not nominated" AND film_title_used_in_nomination = "the color of fame"
sql_create_context
CREATE TABLE table_79612 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the total is larger than 1,and the bronze is less than 3, and silver larger than 2, and...
SELECT "Nation" FROM table_79612 WHERE "Total" > '1' AND "Bronze" < '3' AND "Silver" > '2' AND "Gold" > '2'
wikisql
CREATE TABLE table_203_439 ( id number, "pos." number, "rider" text, "semi-final points" number, "final points" number, "final heats" text, "total points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the average number of points
SELECT AVG("total points") FROM table_203_439
squall
CREATE TABLE table_66385 ( "Year" real, "Gross Domestic Product" real, "US Dollar Exchange" text, "Inflation Index (2000=100)" real, "Per Capita Income (as % of USA)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Inflation Index (2000=100) ha...
SELECT MAX("Inflation Index (2000=100)") FROM table_66385 WHERE "Per Capita Income (as % of USA)" = '10.65' AND "Year" < '1990'
wikisql
CREATE TABLE table_name_12 ( record VARCHAR, score VARCHAR, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Record with a Score with 80 87, and a Visitor with bucks?
SELECT record FROM table_name_12 WHERE score = "80–87" AND visitor = "bucks"
sql_create_context
CREATE TABLE table_256862_1 ( winning_yacht VARCHAR, entries VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the wininng yacht for 14 entries
SELECT winning_yacht FROM table_256862_1 WHERE entries = "14"
sql_create_context
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 Headquarter, AVG(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter ORDER BY Headquarter
nvbench
CREATE TABLE table_33573 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the home team when hawthorn is the away s...
SELECT "Home team" FROM table_33573 WHERE "Away team" = 'hawthorn'
wikisql
CREATE TABLE table_name_72 ( fumb_td INTEGER, int_td VARCHAR, fumb_f VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Fumb TD has an Int TD of 1, and a Fumb F. smaller than 1?
SELECT MIN(fumb_td) FROM table_name_72 WHERE int_td = 1 AND fumb_f < 1
sql_create_context
CREATE TABLE table_204_538 ( id number, "pos." number, "driver" text, "co-driver" text, "car" text, "time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the fastest car ?
SELECT "car" FROM table_204_538 ORDER BY "pos." LIMIT 1
squall
CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE venue ( venueid int, venuename varchar ) CREATE TABLE paperfield ( fieldid int, paperid int ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE paperdataset ( paperid int, datasetid int ) CREA...
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'Daphne Koller' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
scholar
CREATE TABLE table_name_74 ( away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the away team's score when footscray is the away team?
SELECT away_team AS score FROM table_name_74 WHERE away_team = "footscray"
sql_create_context
CREATE TABLE table_1302886_1 ( kerry_number VARCHAR, county VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In cook county Kerry# is?
SELECT kerry_number FROM table_1302886_1 WHERE county = "Cook"
sql_create_context
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 prescriptions...
SELECT MAX(demographic.age) FROM demographic WHERE demographic.gender = "M" AND demographic.discharge_location = "SNF"
mimicsql_data
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 demographic ...
SELECT MIN(demographic.age) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.days_stay = "9"
mimicsql_data