instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program ( progr...
SELECT COUNT(DISTINCT course.course_id) FROM course INNER JOIN program_course ON program_course.course_id = course.course_id WHERE course.credits = 9 AND program_course.category LIKE 'ULCS'
advising
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Tags ( Id number, TagName text, C...
WITH PostCounts AS (SELECT Tags.Id AS TagId, COUNT(Posts.Id) AS PostCount FROM Posts INNER JOIN PostTags ON Posts.Id = PostTags.PostId INNER JOIN Tags ON PostTags.TagId = Tags.Id GROUP BY Tags.Id), Variants AS (SELECT * FROM (SELECT REPLACE(TagName, 'ou', 'o') AS vname, * FROM Tags) AS r WHERE vname != TagName) SELECT ...
sede
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT jyjgzbb.JCFF FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON 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 AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH...
css
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJ...
css
CREATE TABLE table_name_81 ( mountains_classification VARCHAR, team_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Mountains classification has a Team classification of quick step?
SELECT mountains_classification FROM table_name_81 WHERE team_classification = "quick step"
sql_create_context
CREATE TABLE table_455 ( "Episode" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the order number for songs by the original artist Luis Fonsi?
SELECT "Order #" FROM table_455 WHERE "Original artist" = 'Luis Fonsi'
wikisql
CREATE TABLE table_name_94 ( home_team VARCHAR, attendance VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Home Team, when Attendance is '112', and when Away Team is 'Kentish Town'?
SELECT home_team FROM table_name_94 WHERE attendance = "112" AND away_team = "kentish town"
sql_create_context
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 diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime ti...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'heparin flush port (10units/ml)' AND DATETIME(prescriptions.start...
mimic_iii
CREATE TABLE table_10267 ( "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. -- When st kilda played as the Away team which date...
SELECT "Date" FROM table_10267 WHERE "Away team" = 'st kilda'
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 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.diagnosis = "BRAIN MASS;INTRACRANIAL HEMORRHAGE" AND lab.fluid = "Joint Fluid"
mimicsql_data
CREATE TABLE table_65002 ( "World record" text, "Snatch" text, "Yang Lian ( CHN )" text, "98kg" text, "Santo Domingo , Dominican" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the figure for Santo Domingo, Dominican for the world record in ...
SELECT "Santo Domingo , Dominican" FROM table_65002 WHERE "World record" = 'clean & jerk'
wikisql
CREATE TABLE table_203_355 ( id number, "year" number, "total" number, "romanians" text, "hungarians" text, "roma" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what were the total number of times the romanians had a population percentage above...
SELECT COUNT(*) FROM table_203_355 WHERE "romanians" > 70
squall
CREATE TABLE camera_lens ( id int, brand text, name text, focal_length_mm real, max_aperture real ) CREATE TABLE mountain ( id int, name text, Height real, Prominence real, Range text, Country text ) CREATE TABLE photos ( id int, camera_lens_id int, mountain_id ...
SELECT T1.name, COUNT(T1.name) FROM camera_lens AS T1 JOIN photos AS T2 ON T2.camera_lens_id = T1.id WHERE T1.brand = 'Sigma' OR T1.brand = 'Olympus' GROUP BY T1.name ORDER BY T1.name DESC
nvbench
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT All_Neutral, Team_ID FROM basketball_match ORDER BY All_Neutral
nvbench
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT cname FROM college WHERE enr < 13000 AND state = "AZ" UNION SELECT cname FROM college WHERE enr > 15000 AND state = "LA"
spider
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 prescriptions.route FROM prescriptions WHERE prescriptions.drug = "Nitroglycerin SL"
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 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 INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Private" AND procedures.icd9_code = "4105"
mimicsql_data
CREATE TABLE table_name_3 ( conductor VARCHAR, orchestra VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the conductor when the chicago symphony orchestra is featured?
SELECT conductor FROM table_name_3 WHERE orchestra = "chicago symphony orchestra"
sql_create_context
CREATE TABLE table_name_81 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which 2007 has a 2003 of 1r?
SELECT 2007 FROM table_name_81 WHERE 2003 = "1r"
sql_create_context
CREATE TABLE table_13338 ( "Name" text, "Platform" text, "Indication" text, "Status" text, "Collaboration" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What company collaborated in pre-clinical autoimmune disease and inflammation?
SELECT "Collaboration" FROM table_13338 WHERE "Status" = 'pre-clinical' AND "Indication" = 'autoimmune disease and inflammation'
wikisql
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, Vote...
WITH PostAge AS (SELECT Id, DATEDIFF(day, CreationDate, @LastVote) AS Age FROM Posts WHERE PostTypeId = '##PostTypeId:int?2##'), PostsByAge AS (SELECT Age, COUNT(*) AS Count FROM PostAge GROUP BY Age) SELECT Age, Count, SUM(Count) OVER (ORDER BY Age DESC ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS RollingCount...
sede
CREATE TABLE table_15265 ( "Rank" real, "Population" real, "Name" text, "Former Name" text, "Municipality" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rank of the town with a population of 258?
SELECT COUNT("Rank") FROM table_15265 WHERE "Population" = '258'
wikisql
CREATE TABLE table_27906667_2 ( legs_won INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many legs were own by alan tabern?
SELECT MAX(legs_won) FROM table_27906667_2 WHERE player = "Alan Tabern"
sql_create_context
CREATE TABLE table_16268026_3 ( state VARCHAR, interview VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What state has an interview of 8.313 (8) ?
SELECT state FROM table_16268026_3 WHERE interview = "8.313 (8)"
sql_create_context
CREATE TABLE table_8688 ( "Winner" text, "Country" text, "Winter Olympics" text, "FIS Nordic World Ski Championships" text, "Holmenkollen" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The winner Arnfinn Bergmann has what under country?
SELECT "Country" FROM table_8688 WHERE "Winner" = 'arnfinn bergmann'
wikisql
CREATE TABLE table_78391 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of surface was the tournament at Pune played on?
SELECT "Surface" FROM table_78391 WHERE "Tournament" = 'pune'
wikisql
CREATE TABLE table_name_9 ( word__number INTEGER, name VARCHAR, subframe__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average word count with crs and subframes lesser than 2?
SELECT AVG(word__number) FROM table_name_9 WHERE name = "crs" AND subframe__number < 2
sql_create_context
CREATE TABLE table_name_4 ( position INTEGER, draws VARCHAR, goals_against VARCHAR, goals_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the average position when the goals against are more than 42 and draws less than 16 with goals of 44
SELECT AVG(position) FROM table_name_4 WHERE goals_against > 42 AND goals_for = 44 AND draws < 16
sql_create_context
CREATE TABLE table_name_9 ( date VARCHAR, site VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which date had a site of N/A?
SELECT date FROM table_name_9 WHERE site = "n/a"
sql_create_context
CREATE TABLE table_13464416_6 ( record VARCHAR, high_assists VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times have there been helps by damon stoudamire (13)
SELECT COUNT(record) FROM table_13464416_6 WHERE high_assists = "Damon Stoudamire (13)"
sql_create_context
CREATE TABLE table_20854943_2 ( loa__metres_ VARCHAR, yacht VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many LOA (metres) reported for Black Jack?
SELECT COUNT(loa__metres_) FROM table_20854943_2 WHERE yacht = "Black Jack"
sql_create_context
CREATE TABLE Fault_Log ( fault_log_entry_id INTEGER, asset_id INTEGER, recorded_by_staff_id INTEGER, fault_log_entry_datetime DATETIME, fault_description VARCHAR(255), other_fault_details VARCHAR(255) ) CREATE TABLE Maintenance_Contracts ( maintenance_contract_id INTEGER, maintenance_co...
SELECT fault_short_name, COUNT(fault_short_name) FROM Part_Faults AS T1 JOIN Skills_Required_To_Fix AS T2 ON T1.part_fault_id = T2.part_fault_id JOIN Skills AS T3 ON T2.skill_id = T3.skill_id GROUP BY fault_short_name ORDER BY fault_short_name
nvbench
CREATE TABLE table_name_79 ( team VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the team for game 34?
SELECT team FROM table_name_79 WHERE game = 34
sql_create_context
CREATE TABLE table_name_60 ( date VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game with a score of 2 1?
SELECT date FROM table_name_60 WHERE score = "2–1"
sql_create_context
CREATE TABLE table_67930 ( "Year" text, "League" text, "Reg. Season" text, "Playoffs" text, "Avg. attendance \u2020" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What regular season had an average attendance of 1,242?
SELECT "Reg. Season" FROM table_67930 WHERE "Avg. attendance \u2020" = '1,242'
wikisql
CREATE TABLE table_name_10 ( channel VARCHAR, digital_terrestrial_channel VARCHAR, position VARCHAR, analogue_terrestrial_channel VARCHAR, internet VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the channel when the analogue terrestrial c...
SELECT channel FROM table_name_10 WHERE analogue_terrestrial_channel = "n/a" AND internet = "itv.com" AND position > 6 AND digital_terrestrial_channel = "6 27 (+1)"
sql_create_context
CREATE TABLE table_28715942_6 ( arranger_s_ VARCHAR, track VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the arranger for 'I KIssed a Girl'?
SELECT arranger_s_ FROM table_28715942_6 WHERE track = "I Kissed a Girl"
sql_create_context
CREATE TABLE table_53427 ( "Name" text, "League" real, "FA Cup" real, "League Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of goals scored by a player in the normal league games where more than 8 total ...
SELECT MIN("League") FROM table_53427 WHERE "Total" > '8'
wikisql
CREATE TABLE table_43785 ( "Name" text, "Latitude" text, "Longitude" text, "Diameter (km)" real, "Year named" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How long is the diameter that has a longitude of 8.0e?
SELECT "Diameter (km)" FROM table_43785 WHERE "Longitude" = '8.0e'
wikisql
CREATE TABLE table_77901 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the top grid that laps less than 66 and a retried engine?
SELECT MAX("Grid") FROM table_77901 WHERE "Time/Retired" = 'engine' AND "Laps" < '66'
wikisql
CREATE TABLE table_name_96 ( elimination VARCHAR, wrestler VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Elimination for Candice?
SELECT elimination FROM table_name_96 WHERE wrestler = "candice"
sql_create_context
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
(SELECT jyjgzbb.JCFF 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_i...
css
CREATE TABLE table_1140083_2 ( rnd VARCHAR, pole_position VARCHAR, fastest_lap VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many rounds were won with James Hunt as pole position and John Watson as fastest lap?
SELECT COUNT(rnd) FROM table_1140083_2 WHERE pole_position = "James Hunt" AND fastest_lap = "John Watson"
sql_create_context
CREATE TABLE table_29743928_5 ( int_caps INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest value for int. caps?
SELECT MIN(int_caps) FROM table_29743928_5
sql_create_context
CREATE TABLE table_204_878 ( id number, "model" text, "release date" text, "sensor\nres., size" text, "lens (35 mm equiv.)\nzoom, aperture" text, "screen\nsize, pixels" text, "dimensions\nw (mm) \u00d7 h (mm) \u00d7 d (mm)" text, "weight" text, "features" text ) -- Using valid SQLi...
SELECT COUNT("model") FROM table_204_878 WHERE "weight" >= 100 AND "weight" <= 200
squall
CREATE TABLE has_amenity ( dormid number, amenid number ) CREATE TABLE dorm_amenity ( amenid number, amenity_name text ) CREATE TABLE lives_in ( stuid number, dormid number, room_number number ) CREATE TABLE dorm ( dormid number, dorm_name text, student_capacity number, ge...
SELECT COUNT(*), city_code FROM student GROUP BY city_code HAVING COUNT(*) > 1
spider
CREATE TABLE table_201_19 ( id number, "rank" number, "title" text, "studio" text, "director" text, "actors" text, "gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many movies did 20th century fox create that were in the top 10 gro...
SELECT COUNT("title") FROM table_201_19 WHERE "title" IN (SELECT "title" FROM table_201_19 ORDER BY "gross" DESC LIMIT 10) AND "studio" = '20th century fox'
squall
CREATE TABLE table_name_65 ( score_points VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With Olympic Bronze Medalist as the total what are the score points?
SELECT score_points FROM table_name_65 WHERE total = "olympic bronze medalist"
sql_create_context
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 t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030...
eicu
CREATE TABLE table_name_7 ( week INTEGER, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which week did the Seattle Seahawks have a record of 6-6?
SELECT AVG(week) FROM table_name_7 WHERE record = "6-6"
sql_create_context
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '周兰若' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-11-15' AND '2020-06-07' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal bool...
SELECT COUNT(DISTINCT p.Id) AS QuestionWithBounty, COUNT(DISTINCT Answer.Id) AS BountyAnswers, SUM(CASE WHEN PostsBeforeBounty.Id IS NULL THEN 1 ELSE 0 END) AS FirstTimePosts FROM Posts AS P INNER JOIN Votes AS bStart ON p.Id = bStart.PostId AND bStart.VoteTypeId = 8 INNER JOIN Posts AS Answer ON Answer.ParentId = p.Id...
sede
CREATE TABLE table_2383498_4 ( last_year_in_qld_cup VARCHAR, qld_cup_premierships VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many values of last year in QLD Cup if QLD Cup Premierships is 1996, 2001?
SELECT COUNT(last_year_in_qld_cup) FROM table_2383498_4 WHERE qld_cup_premierships = "1996, 2001"
sql_create_context
CREATE TABLE table_203_872 ( id number, "year" number, "location(s)" text, "number of contestants" number, "ladies winner" text, "men's winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name of the location listed first on this ...
SELECT "location(s)" FROM table_203_872 WHERE id = 1
squall
CREATE TABLE table_75462 ( "Date" text, "Venue" text, "Opponents" text, "Score" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Competition has a Score of 0-1, and Opponents of pkns fc?
SELECT "Competition" FROM table_75462 WHERE "Score" = '0-1' AND "Opponents" = 'pkns fc'
wikisql
CREATE TABLE table_13715 ( "Sr No" real, "Name" text, "Locale" text, "Height" text, "Floors" real, "Building Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name when the sr no is less than 74 and floors is more than 36?
SELECT "Name" FROM table_13715 WHERE "Sr No" < '74' AND "Floors" > '36'
wikisql
CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE enroll ( class_code text, stu_num number, enroll_grade text ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_add...
SELECT COUNT(*), dept_code FROM professor WHERE prof_high_degree = 'Ph.D.' GROUP BY dept_code
spider
CREATE TABLE table_name_13 ( tries VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tries did the player have which ended with 20 Points?
SELECT tries FROM table_name_13 WHERE points = 20
sql_create_context
CREATE TABLE table_38755 ( "Couple" text, "Score" text, "Style" text, "Music" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has a Couple comprised of jason & edyta, and a Style of freestyle?
SELECT "Score" FROM table_38755 WHERE "Couple" = 'jason & edyta' AND "Style" = 'freestyle'
wikisql
CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE TABLE EMPLOYEE ( EMP_NUM int, EMP_LNAME varchar(15), EMP_FNAME varchar(12), EMP_INITIAL varchar(1), EMP_JOBCODE varchar(5), EMP_HIREDATE datetime, EMP...
SELECT DEPT_CODE, MIN(STU_GPA) FROM STUDENT GROUP BY DEPT_CODE
nvbench
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 outputevents ( row_id number, subject_id number, hadm_id number,...
SELECT t1.drug FROM (SELECT prescriptions.drug, COUNT(prescriptions.startdate) AS c1 FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 76372) AND DATETIME(prescriptions.startdate, 'start of month') = DATETIME(CURRENT_TIME(), 'start of month', '-0 ...
mimic_iii
CREATE TABLE table_204_770 ( id number, "season" number, "date" text, "jia-a/csl winner" text, "result" text, "fa cup winner" text, "scorers" text, "stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many had a total goals score...
SELECT COUNT(*) FROM table_204_770 WHERE "result" + "result" > 6
squall
CREATE TABLE table_39542 ( "Rank" real, "Place" text, "County" text, "Per Capita Income" text, "Median House- hold Income" text, "Median Family Income" text, "Population" real, "Number of Households" real ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT SUM("Population") FROM table_39542 WHERE "Rank" > '51' AND "Median House- hold Income" = '$25,250'
wikisql
CREATE TABLE manager_half ( player_id TEXT, year INTEGER, team_id TEXT, league_id TEXT, inseason INTEGER, half INTEGER, g INTEGER, w INTEGER, l INTEGER, rank INTEGER ) CREATE TABLE salary ( year INTEGER, team_id TEXT, league_id TEXT, player_id TEXT, salary IN...
SELECT yearid, COUNT(*) FROM hall_of_fame GROUP BY yearid ORDER BY yearid
nvbench
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate n...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT microlab.patientunitstayid FROM microlab WHERE microlab.culturesite = 'abscess' AND STRFTIME('%y', microlab.culturetakentime) >= '2104')
eicu
CREATE TABLE table_38387 ( "Product" text, "Extensions" text, "Projects templates" text, "MSDN integration" text, "Debugging" text, "Profiling" text, "IntelliTrace" text, "Unit test" text, "Code coverage" text, "Test impact analysis" text, "Load testing" text, "Lab manage...
SELECT "Architecture and modelling" FROM table_38387 WHERE "Unit test" = 'no' AND "Projects templates" = 'limited'
wikisql
CREATE TABLE table_58487 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance when the Hawks played?
SELECT COUNT("Attendance") FROM table_58487 WHERE "Home" = 'hawks'
wikisql
CREATE TABLE table_name_35 ( celebrity VARCHAR, exited VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the celebrity who exited on day 13?
SELECT celebrity FROM table_name_35 WHERE exited = "day 13"
sql_create_context
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuo...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B...
mimic_iii
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC...
SELECT mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '69954049'
css
CREATE TABLE table_name_35 ( episode VARCHAR, rating VARCHAR, viewers__m_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Episode has a Rating of 1.8, and Viewers (m) smaller than 2.73?
SELECT episode FROM table_name_35 WHERE rating = "1.8" AND viewers__m_ < 2.73
sql_create_context
CREATE TABLE table_57670 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the time of the driver on grid 7?
SELECT "Time/Retired" FROM table_57670 WHERE "Grid" = '7'
wikisql
CREATE TABLE table_59940 ( "Spaceport" text, "Launch complex" text, "Launcher" text, "Spacecraft" text, "Flights" text, "Years" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the launcher vehicle for Apollo-Soyuz?
SELECT "Launcher" FROM table_59940 WHERE "Spacecraft" = 'apollo-soyuz'
wikisql
CREATE TABLE table_name_74 ( against INTEGER, status VARCHAR, opposing_teams VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Against, when Status is '2007 Rugby World Cup', and when Opposing Teams is 'U.S.A.'?
SELECT AVG(against) FROM table_name_74 WHERE status = "2007 rugby world cup" AND opposing_teams = "u.s.a."
sql_create_context
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE prescriptions.formulary_drug_cd = "VANC250L"
mimicsql_data
CREATE TABLE table_73077 ( "Round" text, "Clubs remaining" real, "Clubs involved" real, "Winners from previous round" text, "New entries this round" text, "Leagues entering this round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the new ...
SELECT "New entries this round" FROM table_73077 WHERE "Round" = 'Third round'
wikisql
CREATE TABLE table_name_95 ( rider VARCHAR, grid VARCHAR, laps VARCHAR, manufacturer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rider had more than 23 laps, a manufacturer of Aprilia, and a grid of 14
SELECT rider FROM table_name_95 WHERE laps > 23 AND manufacturer = "aprilia" AND grid = 14
sql_create_context
CREATE TABLE table_name_61 ( opponent VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the Opponent on July 29?
SELECT opponent FROM table_name_61 WHERE date = "july 29"
sql_create_context
CREATE TABLE table_name_80 ( date VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Attendance of 29,000 occurred on what date?
SELECT date FROM table_name_80 WHERE attendance = "29,000"
sql_create_context
CREATE TABLE table_name_77 ( seasons VARCHAR, goals VARCHAR, lost VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many seasons have goals of 261-338 with more than 111 losses?
SELECT COUNT(seasons) FROM table_name_77 WHERE goals = "261-338" AND lost > 111
sql_create_context
CREATE TABLE table_name_57 ( name VARCHAR, medal VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which participants won the silver medal for the Men's Doubles?
SELECT name FROM table_name_57 WHERE medal = "silver" AND event = "men's doubles"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text ) CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM number ) CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZ...
SELECT zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM person_info JOIN hz_info JOIN zyjzjlb JOIN person_info_hz_info ON person_info.RYBH = person_info_hz_info.RYBH AND 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_...
css
CREATE TABLE table_11964154_9 ( record VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the record where score is w 105 92 (ot)
SELECT record FROM table_11964154_9 WHERE score = "W 105–92 (OT)"
sql_create_context
CREATE TABLE media_types ( id number, name text ) CREATE TABLE playlists ( id number, name text ) CREATE TABLE sqlite_sequence ( name text, seq text ) CREATE TABLE albums ( id number, title text, artist_id number ) CREATE TABLE playlist_tracks ( playlist_id number, track_...
SELECT T1.first_name, T1.last_name FROM customers AS T1 JOIN invoices AS T2 ON T2.customer_id = T1.id ORDER BY total LIMIT 10
spider
CREATE TABLE table_name_57 ( opponent VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Opponent has a Score that is 1-6, 3-6?
SELECT opponent FROM table_name_57 WHERE score = "1-6, 3-6"
sql_create_context
CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15), Workshop_Group_ID INTEGER, Product_Description VARCHAR(255), Product_Name VARCHAR(255), Product_Price DECIMAL(20,4), Other_Product_Service_Details VARCHAR(255) ) CREATE TABLE Invoice_Items ( Invoice_Item_ID INTEGER,...
SELECT Order_Date, COUNT(Order_Date) FROM Bookings
nvbench
CREATE TABLE table_10234 ( "Date" text, "Venue" text, "Opponent" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the result of game played on 10-05-2012?
SELECT "Result" FROM table_10234 WHERE "Date" = '10-05-2012'
wikisql
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
SELECT DISTINCT flight_id FROM flight WHERE (((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 = 27 AND DATE_DAYalias0.month_number = 8 AND DATE_DAYalias0.year = 1991)) AND to...
atis
CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advisor number, city_code text ) CREATE TABLE faculty_participates_in ( facid number, actid number ) CREATE TABLE participates_in ( stuid number, actid number ) CREATE TABL...
SELECT T1.fname, T1.lname FROM faculty AS T1 JOIN student AS T2 ON T1.facid = T2.advisor WHERE T2.fname = "Linda" AND T2.lname = "Smith"
spider
CREATE TABLE table_name_64 ( seats_2006 INTEGER, _percentage_2001 VARCHAR, seats_2001 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the seats 2006 total with %2001 of 39 and seats 2001 less than 12?
SELECT MAX(seats_2006) FROM table_name_64 WHERE _percentage_2001 = 39 AND seats_2001 < 12
sql_create_context
CREATE TABLE table_17755 ( "Clinical Status" text, "Compound Name" text, "Trademark" text, "Marine Organism \u03b1" text, "Chemical Class" text, "Molecular Target" text, "Clinical Trials \u03b2" text, "Disease Area" text ) -- Using valid SQLite, answer the following questions for the t...
SELECT "Trademark" FROM table_17755 WHERE "Molecular Target" = 'DNA-Binding'
wikisql
CREATE TABLE table_20630462_1 ( years INTEGER, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most years that tournaments held in Rome have lasted?
SELECT MAX(years) FROM table_20630462_1 WHERE tournament = "Rome"
sql_create_context
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 credits FROM course WHERE department = 'EECS' AND number = 425
advising
CREATE TABLE table_name_20 ( effic INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total effic for the quarterbacks?
SELECT MIN(effic) FROM table_name_20 WHERE name = "total"
sql_create_context
CREATE TABLE table_203_109 ( id number, "treaty" text, "organization" text, "introduced" number, "signed" number, "ratified" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which was the first treaty in morocco to be ratified ?
SELECT "treaty" FROM table_203_109 ORDER BY "ratified" LIMIT 1
squall
CREATE TABLE table_name_16 ( against INTEGER, opposing_teams VARCHAR, venue VARCHAR, status VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest against score for Twickenham, London with the status of Five Nations against Ireland?
SELECT MIN(against) FROM table_name_16 WHERE venue = "twickenham, london" AND status = "five nations" AND opposing_teams = "ireland"
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 jybgb.JYSQJGMC, jybgb.JYJGMC FROM jybgb WHERE jybgb.BGDH = '05899581944'
css
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 zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '水幼安' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2004-09-08')
css
CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, ...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, COUNT(procedures_icd.charttime) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 471...
mimic_iii