instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_44892 ( "Year" text, "Gold" text, "Silver" text, "Bronze" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many bronze medals were won in 1998?
SELECT "Bronze" FROM table_44892 WHERE "Year" = '1998'
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 zyjzjlb ( CYBQDM text, CYBQMC...
SELECT * FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON 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_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb...
css
CREATE TABLE table_name_6 ( games_played VARCHAR, wins VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of games played of the team with 4 wins and a position less than 9?
SELECT COUNT(games_played) FROM table_name_6 WHERE wins = 4 AND position < 9
sql_create_context
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb 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 = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM...
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 zyjzjlb.JZLSH FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '58560026' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2003-02-05')
css
CREATE TABLE table_4697 ( "Tournament" text, "2007" text, "2009" text, "2010" text, "2011" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the 2011 US Open when the 2007 was F?
SELECT "2011" FROM table_4697 WHERE "2007" = 'f' AND "Tournament" = 'us open'
wikisql
CREATE TABLE hz_info_mzjzjlb ( JZLSH number, YLJGDM number, mzjzjlb_id number ) 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 t...
SELECT COUNT(*) FROM mzjzjlb JOIN hz_info_mzjzjlb JOIN hz_info ON hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.YLJGDM = hz_info_mzjzjlb.YLJGDM AND hz_info_mzjzjlb.JZLSH = mzjzjlb.JZLSH AND hz_info_mzjzjlb.mzjzjlb_id = mzjzjlb.mzjzjlb_id AND hz_info_mzjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '23...
css
CREATE TABLE Claims ( Claim_ID INTEGER, Policy_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amount_Claimed INTEGER, Amount_Settled INTEGER ) CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Date_Claim_Made DATE, Date_Claim_Settled DATE, Amoun...
SELECT Date_Claim_Settled, COUNT(Date_Claim_Settled) FROM Settlements GROUP BY Date_Claim_Settled ORDER BY Date_Claim_Settled
nvbench
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 WHERE demographic.diagnosis = "CORONARY ARTERY DISEASE\CORONARY ARTERY BYPASS GRAFT /SDA" AND demographic.dob_year < "2097"
mimicsql_data
CREATE TABLE table_50823 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the runner-up at the Chicago challenge?
SELECT "Runner(s)-up" FROM table_50823 WHERE "Tournament" = 'chicago challenge'
wikisql
CREATE TABLE table_203_211 ( id number, "pos." number, "time" text, "athlete" text, "country" text, "venue" text, "date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many of the athletes came from the united states ?
SELECT COUNT("athlete") FROM table_203_211 WHERE "country" = 'united states'
squall
CREATE TABLE table_22821 ( "Team #1" text, "Agg. score" text, "Team #2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's team #2 in the round where team $1 is Ilisiakos?
SELECT "Team #2" FROM table_22821 WHERE "Team #1" = 'Ilisiakos'
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 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2187" AND diagnoses.short_title = "Other lung disease NEC"
mimicsql_data
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Has_amenity ( dormid INTEGER, amenid INTEGER ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTE...
SELECT city_code, COUNT(*) FROM Student GROUP BY city_code ORDER BY city_code
nvbench
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '02126959217' AND SOC_SRT_DIRE_NM LIKE '%泮片%'
css
CREATE TABLE table_31352 ( "Country" text, "Alternante title" text, "TV Network(s)" text, "Series premiere" text, "Series finale" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of series premiere for the novela whose alternate titl...
SELECT "Series premiere" FROM table_31352 WHERE "Alternante title" = 'Miłość i przeznaczenie'
wikisql
CREATE TABLE table_name_21 ( winning_score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the tournament played on 16 Jan 2011, what was the winning score?
SELECT winning_score FROM table_name_21 WHERE date = "16 jan 2011"
sql_create_context
CREATE TABLE table_38592 ( "Distance" text, "Time" text, "Date" text, "Location" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Location has a Time of time?
SELECT "Location" FROM table_38592 WHERE "Time" = 'time'
wikisql
CREATE TABLE table_32821 ( "Week" text, "Date" text, "Opponent" text, "Result" text, "Kickoff" text, "Game site" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the record which shows Kickoff as kickoff?
SELECT "Record" FROM table_32821 WHERE "Kickoff" = 'kickoff'
wikisql
CREATE TABLE table_1529260_2 ( year VARCHAR, champion VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years was Jiyai Shin the champion?
SELECT COUNT(year) FROM table_1529260_2 WHERE champion = "Jiyai Shin"
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 demographic ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.short_title = "Exc/dest hrt lesion open"
mimicsql_data
CREATE TABLE table_8414 ( "School" text, "Locality" text, "Ages" text, "Report" text, "Website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the Ages of the Seashell Trust School with Ofsted Report?
SELECT "Ages" FROM table_8414 WHERE "Report" = 'ofsted' AND "School" = 'seashell trust'
wikisql
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.days_stay > "2" AND procedures.short_title = "Percutan liver aspirat"
mimicsql_data
CREATE TABLE table_name_65 ( city VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Wjich city had a date of october 13?
SELECT city FROM table_name_65 WHERE date = "october 13"
sql_create_context
CREATE TABLE table_995 ( "Variant id" text, "5\u2019UTR splice" text, "Coding" text, "3\u2019UTR sequence" text, "GenBank id" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the coding for hq021442 genbankid?
SELECT "Coding" FROM table_995 WHERE "GenBank id" = 'HQ021442'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, ...
SELECT inputevents_cv.charttime FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12181) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime LIMIT 1) ORDER BY inputeven...
mimic_iii
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, ...
SELECT prescriptions.drug FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 97733) AND DATETIME(prescriptions.startdate) >= DATETIME(CURRENT_TIME(), '-1 month') ORDER BY prescriptions.startdate DESC LIMIT 1
mimic_iii
CREATE TABLE Student_Tests_Taken ( registration_id INTEGER, date_test_taken DATETIME, test_result VARCHAR(255) ) CREATE TABLE Students ( student_id INTEGER, date_of_registration DATETIME, date_of_latest_logon DATETIME, login_name VARCHAR(40), password VARCHAR(10), personal_name VARC...
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY date_of_completion
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 wdmzjzjlb.RZBQDM, wdmzjzjlb.RZBQMC, wdmzjzjlb.RYCWH FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '55601265065' UNION SELECT bdmzjzjlb.RZBQDM, bdmzjzjlb.RZBQMC, bdmzjzjlb.RYCWH FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '55601265065'
css
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 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_ID = '86022614' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2011-04-19' AND '2012-03-01' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
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 OUT_DIAG_DIS_CD, OUT_DIAG_DIS_NM FROM t_kc21 WHERE PERSON_NM = '奚丽珠' AND MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc24 WHERE MED_AMOUT >= 381.88)
css
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE lab.charttime = "2178-02-28 16:58:00"
mimicsql_data
CREATE TABLE table_1583 ( "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. -- Name th...
SELECT "Team" FROM table_1583 WHERE "High assists" = 'Chris Duhon , Nate Robinson , David Lee (3)'
wikisql
CREATE TABLE table_69256 ( "Week" real, "Date" text, "Visiting Team" text, "Final Score" text, "Host Team" text, "Stadium" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When were the Houston Texans the visiting team later in the season?
SELECT MAX("Week") FROM table_69256 WHERE "Visiting Team" = 'houston texans'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dob_year < "2101" AND procedures.short_title = "Gastroenterostomy NEC"
mimicsql_data
CREATE TABLE table_45170 ( "Year" real, "Championship" text, "Winning score" text, "Margin" text, "Runner-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score in 1985 for Championship of u.s. women's open?
SELECT "Winning score" FROM table_45170 WHERE "Year" < '1985' AND "Championship" = 'u.s. women''s open'
wikisql
CREATE TABLE table_name_26 ( score VARCHAR, home VARCHAR, visitor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score for the game played between Cleveland and Orlando at Cleveland?
SELECT score FROM table_name_26 WHERE home = "cleveland" AND visitor = "orlando"
sql_create_context
CREATE TABLE table_name_59 ( release_date VARCHAR, time VARCHAR, track VARCHAR, recorded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the release date of a track greater than 4, 1/12/57 recorded, and a length of 2:31?
SELECT release_date FROM table_name_59 WHERE track > 4 AND recorded = "1/12/57" AND time = "2:31"
sql_create_context
CREATE TABLE table_32874 ( "Name" text, "Circuit" text, "Date" text, "Winning driver" text, "Winning constructor" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Grand Prix has the Circuit of Lille?
SELECT "Name" FROM table_32874 WHERE "Circuit" = 'lille'
wikisql
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...
WITH Actives AS (SELECT Id AS UserId, CreationDate AS DateFrom, DATEADD(dd, 31, CreationDate) AS DateTo FROM Users WHERE CreationDate >= '2014-01-01') SELECT UserId AS "user_link", SUM(PostTypeId - 1) AS AnswerCount FROM Posts INNER JOIN Actives ON UserId = Posts.OwnerUserId AND CreationDate BETWEEN DateFrom AND DateTo...
sede
CREATE TABLE table_name_97 ( points INTEGER, drivers VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Points have Drivers of adri n vall s, and a Year larger than 2006?
SELECT AVG(points) FROM table_name_97 WHERE drivers = "adrián vallés" AND year > 2006
sql_create_context
CREATE TABLE table_77541 ( "Rider" text, "Horse" text, "Faults" text, "Round 1 Points" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the rider that had round 1 points of 7.465 and total more than 16.615
SELECT "Rider" FROM table_77541 WHERE "Total" > '16.615' AND "Round 1 Points" = '7.465'
wikisql
CREATE TABLE table_72099 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "U.S. Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what are all the playoffs for regular season is 1st, atlantic division...
SELECT "Playoffs" FROM table_72099 WHERE "Regular Season" = '1st, Atlantic Division'
wikisql
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 Directed_by, COUNT(*) FROM film GROUP BY Directed_by ORDER BY COUNT(*)
nvbench
CREATE TABLE table_32601 ( "Year" real, "Sportsperson" text, "Nationality" text, "Team" text, "Competition , federation , or league" text, "Sport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years has the winner been a member of the ...
SELECT AVG("Year") FROM table_32601 WHERE "Competition , federation , or league" = 'national football league'
wikisql
CREATE TABLE table_23174 ( "Player" text, "Minutes" real, "Field Goals" real, "Rebounds" real, "Assists" real, "Steals" real, "Blocks" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest number of goals did ...
SELECT MAX("Field Goals") FROM table_23174 WHERE "Assists" = '27'
wikisql
CREATE TABLE table_29486189_4 ( representative VARCHAR, residence VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is beavercreek's representative
SELECT representative FROM table_29486189_4 WHERE residence = "Beavercreek"
sql_create_context
CREATE TABLE table_11270 ( "Draw" real, "Artist" text, "Song" text, "Points" real, "Place" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many places have more than 33 points?
SELECT COUNT("Place") FROM table_11270 WHERE "Points" = '33'
wikisql
CREATE TABLE table_1150 ( "Year (Ceremony)" text, "English title" text, "Hungarian title" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Was diary for my loves nominated?
SELECT "Result" FROM table_1150 WHERE "English title" = 'Diary for My Loves'
wikisql
CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE student_record ( student_id int, course_id int, semester int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course, program_course WHERE program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id
advising
CREATE TABLE table_2562572_46 ( population__2011_ VARCHAR, settlement VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 2011 population of pavli ?
SELECT population__2011_ FROM table_2562572_46 WHERE settlement = "Pavliš"
sql_create_context
CREATE TABLE certificate ( eid number(9,0), aid number(9,0) ) CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREATE TABLE employee ( ei...
SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY destination
nvbench
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (semester.semester = ...
advising
CREATE TABLE table_name_20 ( home VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On December 5 what team played their home game?
SELECT home FROM table_name_20 WHERE date = "december 5"
sql_create_context
CREATE TABLE table_33690 ( "Name" text, "Bullet" text, "Length" text, "Base" text, "Shoulder" text, "Neck" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the neck measurement of the gun with a shoulder measurement of 10.688 (.420)?
SELECT "Neck" FROM table_33690 WHERE "Shoulder" = '10.688 (.420)'
wikisql
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decima...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY AVG(SALARY)
nvbench
CREATE TABLE table_12671 ( "Mininera DFL" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many wins for the Caramut team with fewer than 11 losses and fewer than 2 byes?
SELECT MAX("Wins") FROM table_12671 WHERE "Losses" < '11' AND "Mininera DFL" = 'caramut' AND "Byes" < '2'
wikisql
CREATE TABLE table_3041 ( "Character" text, "Original Berkeley Cast" text, "Original Broadway Cast" text, "Original 1st US Tour Cast" text, "Original UK Cast" text, "Original Tokyo / Seoul Tour Cast" text, "Original 3rd US Tour Cast" text ) -- Using valid SQLite, answer the following quest...
SELECT "Original 3rd US Tour Cast" FROM table_3041 WHERE "Original 1st US Tour Cast" = 'Scott J. Campbell'
wikisql
CREATE TABLE table_name_98 ( season INTEGER, attendance_g INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What season had the highest attendance/g than 3,289?
SELECT MAX(season) FROM table_name_98 WHERE attendance_g < 3 OFFSET 289
sql_create_context
CREATE TABLE table_name_27 ( title VARCHAR, broadcaster VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the title for Sky One in 2005?
SELECT title FROM table_name_27 WHERE broadcaster = "sky one" AND year = "2005"
sql_create_context
CREATE TABLE table_name_36 ( game_site VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the game site with result of l 7-38
SELECT game_site FROM table_name_36 WHERE result = "l 7-38"
sql_create_context
CREATE TABLE table_79171 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did United States place when the player was Raymond Floyd?
SELECT "Place" FROM table_79171 WHERE "Country" = 'united states' AND "Player" = 'raymond floyd'
wikisql
CREATE TABLE airlines ( alid number, name text, iata text, icao text, callsign text, country text, active text ) CREATE TABLE airports ( apid number, name text, city text, country text, x number, y number, elevation number, iata text, icao text ) CREATE ...
SELECT MAX(elevation) FROM airports WHERE country = 'Iceland'
spider
CREATE TABLE table_name_68 ( week_5 VARCHAR, week_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what kind of Week 5 that has a Week 1 of mandy ashford?
SELECT week_5 FROM table_name_68 WHERE week_1 = "mandy ashford"
sql_create_context
CREATE TABLE table_9319 ( "Length feet (m)" text, "Width feet (m)" text, "Load short tons (MT)" text, "Truss type(s)" text, "Year built" text, "Source (Year)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the width feet in meeters for t...
SELECT "Width feet (m)" FROM table_9319 WHERE "Source (Year)" = 'nbi (2009)'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age te...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.patientunitstayid IN (SELECT intakeoutput.patientunitstayid FROM intakeoutput WHERE intakeoutput.celllabel = 'enteral pivot 1.5cal' AND intakeoutput.cellpath LIKE '%input%')
eicu
CREATE TABLE person ( name text, age number, city text, gender text, job text ) CREATE TABLE personfriend ( name text, friend text, year number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the names of females who are friends with Zac...
SELECT T1.name FROM person AS T1 JOIN personfriend AS T2 ON T1.name = T2.name WHERE T2.friend = 'Zach' AND T1.gender = 'female'
spider
CREATE TABLE table_203_799 ( id number, "year" number, "date" text, "title" text, "format(s)" text, "award description(s)" text, "result(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many awards did whitney houston win for singles o...
SELECT COUNT("award description(s)") FROM table_203_799 WHERE "format(s)" = 'single'
squall
CREATE TABLE table_54879 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Home team has an away score of 6.6 (42)?
SELECT "Home team score" FROM table_54879 WHERE "Away team score" = '6.6 (42)'
wikisql
CREATE TABLE table_15301258_1 ( year VARCHAR, best_supporting_actor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the year for sammo hung for ip man 2
SELECT year FROM table_15301258_1 WHERE best_supporting_actor = "Sammo Hung for Ip Man 2"
sql_create_context
CREATE TABLE table_name_44 ( team VARCHAR, series VARCHAR, races VARCHAR, f_laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team had 1 race, 1 F/lap and in the series 24 hours of Nurburgring?
SELECT team FROM table_name_44 WHERE races = "1" AND f_laps = "1" AND series = "24 hours of nurburgring"
sql_create_context
CREATE TABLE table_12564633_1 ( title VARCHAR, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the episode that Richard Thorpe directed?
SELECT title FROM table_12564633_1 WHERE directed_by = "Richard Thorpe"
sql_create_context
CREATE TABLE table_name_16 ( ngc_number VARCHAR, constellation VARCHAR, object_type VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the NGC number for leo of irregular galaxy
SELECT ngc_number FROM table_name_16 WHERE constellation = "leo" AND object_type = "irregular galaxy"
sql_create_context
CREATE TABLE jobs ( job_id text, job_title text, min_salary number, max_salary number ) CREATE TABLE locations ( location_id number, street_address text, postal_code text, city text, state_province text, country_id text ) CREATE TABLE departments ( department_id number, ...
SELECT first_name, last_name, hire_date, salary, department_id FROM employees WHERE NOT first_name LIKE '%M%' ORDER BY department_id
spider
CREATE TABLE table_26692 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is t...
SELECT "Team" FROM table_26692 WHERE "Replaced by" = 'Miroslav Đukić'
wikisql
CREATE TABLE table_60271 ( "Rank" real, "Champion" text, "Runner-up" text, "Third place" text, "Fourth place" text, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the runner-up when the total is 5?
SELECT "Runner-up" FROM table_60271 WHERE "Total" = '5'
wikisql
CREATE TABLE table_name_26 ( leader VARCHAR, _percentage_of_seats VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Leader has Spoilt Votes as % of Seats?
SELECT leader FROM table_name_26 WHERE _percentage_of_seats = "spoilt votes"
sql_create_context
CREATE TABLE table_17992 ( "Year" real, "Competition" text, "Location" text, "Event" text, "Final-Rank" text, "Final-Score" text, "Qualifying Rank" real, "Qualifying Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times is...
SELECT COUNT("Year") FROM table_17992 WHERE "Qualifying Score" = '61.400'
wikisql
CREATE TABLE tourist_attractions ( tourist_attraction_id number, attraction_type_code text, location_id number, how_to_get_there text, name text, description text, opening_hours text, other_details text ) CREATE TABLE locations ( location_id number, location_name text, addre...
SELECT DISTINCT visit_date FROM visits
spider
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, ...
SELECT * 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 hz_info.YLJGDM = '2298626' AND NOT zyjzjlb.JZKSMC LIKE '%咨询%'
css
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 COUNT(*) = 0 FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course.has_exams = 'N' AN...
advising
CREATE TABLE table_6898 ( "Peel" text, "Wins" real, "Byes" real, "Losses" real, "Draws" real, "Against" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Draws has an Against larger than 1158, and a Wins of 9, and a Losses smaller than 9?
SELECT SUM("Draws") FROM table_6898 WHERE "Against" > '1158' AND "Wins" = '9' AND "Losses" < '9'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE allergy ( allergyid number,...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-154299')) AND intakeoutput.cellpath LIKE '%output%' AND ...
eicu
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT patient.hospitaladmittime FROM patient WHERE patient.uniquepid = '027-136854' AND patient.hospitaladmitsource = 'emergency department' AND DATETIME(patient.hospitaladmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE table_77343 ( "Call sign" text, "Frequency" text, "City of license" text, "State" text, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What city is 103.3 FM licensed in?
SELECT "City of license" FROM table_77343 WHERE "Frequency" = '103.3 fm'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.insurance = "Government" AND diagnoses.icd9_code = "20280"
mimicsql_data
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID
nvbench
CREATE TABLE table_40888 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position does the player from Winston-Salem State play?
SELECT "Position" FROM table_40888 WHERE "School/Club Team" = 'winston-salem state'
wikisql
CREATE TABLE table_41482 ( "Date" text, "Time" text, "Home" text, "Away" text, "Score" text, "Ground" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date has high park demons as the away?
SELECT "Date" FROM table_41482 WHERE "Away" = 'high park demons'
wikisql
CREATE TABLE table_name_66 ( date VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of the Int'l Debut of 1967?
SELECT date FROM table_name_66 WHERE year = "1967"
sql_create_context
CREATE TABLE table_name_26 ( cardinalatial_order_and_title VARCHAR, elevated VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the cardinalatial order of the elector elevated circa 1116?
SELECT cardinalatial_order_and_title FROM table_name_26 WHERE elevated = "circa 1116"
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE d_icd_diagnoses ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE d_icd_procedures ...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 12726) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'hematocrit') AND DATETIME(labevents.charttime, 'start of month') = DATETIME(CURR...
mimic_iii
CREATE TABLE table_name_15 ( class VARCHAR, power VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Class, when Power is 78 Watts?
SELECT class FROM table_name_15 WHERE power = "78 watts"
sql_create_context
CREATE TABLE table_1363 ( "N\u00b0" real, "Television service" text, "Country" text, "Language" text, "Content" text, "DAR" text, "HDTV" text, "PPV" text, "Package/Option" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the hdtv ...
SELECT "HDTV" FROM table_1363 WHERE "N\u00b0" = '378'
wikisql
CREATE TABLE table_74456 ( "Tournament" text, "Player" text, "Nationality" text, "Team" text, "Games played" real, "Goals conceded" real, "Coefficient" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the 2012 clausu...
SELECT "Nationality" FROM table_74456 WHERE "Tournament" = '2012 Clausura'
wikisql
CREATE TABLE table_name_10 ( points INTEGER, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did he average in 1964?
SELECT AVG(points) FROM table_name_10 WHERE year = 1964
sql_create_context
CREATE TABLE table_21486890_1 ( matches INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the matches for mark taylor category:articles with hcards
SELECT MAX(matches) FROM table_21486890_1 WHERE name = "Mark Taylor Category:Articles with hCards"
sql_create_context
CREATE TABLE Person ( gender VARCHAR, age INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the number of people who is under 40 for each gender.
SELECT COUNT(*), gender FROM Person WHERE age < 40 GROUP BY gender
sql_create_context
CREATE TABLE table_52233 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The 2002 African Cup of Nations was held on what date?
SELECT "Date" FROM table_52233 WHERE "Competition" = '2002 african cup of nations'
wikisql
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABL...
SELECT ROW_NUMBER() OVER (ORDER BY Views DESC) AS "#", Id AS "user_link", Reputation, Views, LastAccessDate, WebsiteUrl FROM Users ORDER BY Views DESC LIMIT 1000
sede