instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_45615 ( "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 was ...
SELECT "Date of appointment" FROM table_45615 WHERE "Outgoing manager" = 'javier aguirre'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Chordae tendinae rupture"
mimicsql_data
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 t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_NM, MAX(t_kc24.CIVIL_SUBSIDY) FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc21.MED_SER_ORG_NO = '1996297' GROUP BY t_kc21.MED_ORG_DEPT_CD, t_kc21.IN_DIAG_DIS_NM ORDER BY MAX(t_kc24.CIVIL_SUBSIDY / t_kc24.MED_AMOUT) DESC
css
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name ...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'BALTIMORE' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_name_90 ( year INTEGER, binibining_pilipinas_international VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest Year with a Binibining Pilipinas-International of jessie alice salones dixson?
SELECT MIN(year) FROM table_name_90 WHERE binibining_pilipinas_international = "jessie alice salones dixson"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0...
SELECT LAST_NAME, SALARY FROM employees ORDER BY LAST_NAME
nvbench
CREATE TABLE table_name_23 ( years_in_office VARCHAR, assumed_office VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years in office were served by the person who assumed the office on October 4, 1886?
SELECT years_in_office FROM table_name_23 WHERE assumed_office = "october 4, 1886"
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGD...
SELECT BBCJBW FROM jybgb WHERE BGDH = '33508848033'
css
CREATE TABLE SportsInfo ( StuID INTEGER, SportName VARCHAR(32), HoursPerWeek INTEGER, GamesPlayed INTEGER, OnScholarship VARCHAR(1) ) CREATE TABLE Video_Games ( GameID INTEGER, GName VARCHAR(40), GType VARCHAR(40) ) CREATE TABLE Plays_Games ( StuID INTEGER, GameID INTEGER, ...
SELECT SportName, COUNT(*) FROM SportsInfo GROUP BY SportName ORDER BY SportName
nvbench
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '窦绍钧' AND gwyjzb.MED_SER_ORG_NO = '7282757' AND gwyjzb.IN_DIAG_DIS_NM LIKE '%脑血管病%' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '窦绍钧' AND fgwyjzb.MED_SER_ORG_NO = '7282757' AND fgwyjzb.IN_DIAG_DIS_NM LIKE '%脑血管病%'
css
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.age < "68" AND lab.label = "Sodium"
mimicsql_data
CREATE TABLE table_44186 ( "Club" text, "Location" text, "Stadium" text, "Capacity" real, "Manager" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Location of the Tapiolan Urheilupuisto Stadium with a Capacity or more than 15,000?
SELECT "Location" FROM table_44186 WHERE "Capacity" > '15,000' AND "Stadium" = 'tapiolan urheilupuisto'
wikisql
CREATE TABLE table_name_86 ( college VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college's pick was 14?
SELECT college FROM table_name_86 WHERE pick = "14"
sql_create_context
CREATE TABLE table_26267849_11 ( performance_order VARCHAR, artist VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the performance order of the velasco brothers
SELECT performance_order FROM table_26267849_11 WHERE artist = "Velasco Brothers"
sql_create_context
CREATE TABLE table_name_9 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Away team when the home team was wycombe wanderers?
SELECT away_team FROM table_name_9 WHERE home_team = "wycombe wanderers"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Atrial fibrillation" AND lab.label = "Prostate Specific Antigen"
mimicsql_data
CREATE TABLE table_64855 ( "School" text, "Location" text, "Mascot" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "# / County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which School has a Mascot of squires?
SELECT "School" FROM table_64855 WHERE "Mascot" = 'squires'
wikisql
CREATE TABLE table_62048 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the venue on the 20th?
SELECT "Venue" FROM table_62048 WHERE "Date" = '20th'
wikisql
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T2.Founder, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Founder ORDER BY T2.Founder DESC
nvbench
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT mzjzjlb.JZLSH 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.person_info_XM = '韦文心' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2006-05-29')
css
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE prescriptions.formulary_drug_cd = "ZINC220" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_name_59 ( chassis VARCHAR, year VARCHAR, points VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which chassis has fewer than 2 points, entrants of Goulds' Garage (Bristol), in 1954?
SELECT chassis FROM table_name_59 WHERE points < 2 AND entrant = "goulds' garage (bristol)" AND year = 1954
sql_create_context
CREATE TABLE table_name_16 ( region VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In which region is the Thompson-Boling arena located?
SELECT region FROM table_name_16 WHERE venue = "thompson-boling arena"
sql_create_context
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 MIN(demographic.age) FROM demographic WHERE demographic.marital_status = "WIDOWED" AND demographic.insurance = "Medicaid"
mimicsql_data
CREATE TABLE table_204_516 ( id number, "date" text, "opponents" text, "h / a" text, "result\nf - a" text, "scorers" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the date of the last game of the 1933-1934 seas...
SELECT "date" FROM table_204_516 ORDER BY "date" DESC LIMIT 1
squall
CREATE TABLE table_name_59 ( field_goals__5_points_ VARCHAR, total_points VARCHAR, touchdowns__5_points_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Field goals (5 points) have a Total Points of 123, and Touchdowns (5 points) larger than 13?
SELECT COUNT(field_goals__5_points_) FROM table_name_59 WHERE total_points = 123 AND touchdowns__5_points_ > 13
sql_create_context
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE Comments ( Id number, PostId number, Sc...
SELECT SUM((CASE WHEN (p.PostTypeId = 1 AND v.VoteTypeId = 2 AND (p.CommunityOwnedDate > v.CreationDate OR p.CommunityOwnedDate IS NULL)) THEN 5 WHEN (p.PostTypeId = 2 AND v.VoteTypeId = 2 AND (p.CommunityOwnedDate > v.CreationDate OR p.CommunityOwnedDate IS NULL)) THEN 10 WHEN (v.VoteTypeId = 3 AND (p.CommunityOwnedDa...
sede
CREATE TABLE table_204_128 ( id number, "region" text, "date" text, "label" text, "format" text, "catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many more releases were in compact disc format than cassette tape ?
SELECT (SELECT COUNT(*) FROM table_204_128 WHERE "format" = 'compact disc') - (SELECT COUNT(*) FROM table_204_128 WHERE "format" = 'cassette tape')
squall
CREATE TABLE table_203_790 ( id number, "week" number, "date" text, "opponent" text, "result" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many games were played in the month of november
SELECT COUNT(*) FROM table_203_790 WHERE "date" = 11
squall
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_r...
SELECT COUNT(*) > 0 FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 1249)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial bp mean' ...
mimic_iii
CREATE TABLE table_45942 ( "Day 1" text, "Day 2" text, "Day 3" text, "Day 4" text, "Day 5" text, "Wednesday" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is day 4 when day 2 is PAAQ?
SELECT "Day 4" FROM table_45942 WHERE "Day 2" = 'paaq'
wikisql
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 inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t4.charttime) > 2 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t2.subject_id, t2.charttime FROM (SELECT t1.subject_id, t1.charttime FROM (SELECT admissions.subject_id, diagnoses_icd.charttime FROM diagnoses_icd...
mimic_iii
CREATE TABLE table_204_598 ( id number, "name" text, "state of residence" text, "took office" text, "left office" text, "president served under" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many years did david plouffe serve ?
SELECT "left office" - "took office" FROM table_204_598 WHERE "name" = 'david plouffe'
squall
CREATE TABLE player ( pName VARCHAR, pID VARCHAR ) CREATE TABLE tryout ( pID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the name of all students who were in the tryout sorted in alphabetic order.
SELECT T1.pName FROM player AS T1 JOIN tryout AS T2 ON T1.pID = T2.pID ORDER BY T1.pName
sql_create_context
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.name, course.number, semester.semester, semester.year FROM course, course_offering, semester WHERE ((semester.semester = 'FA' AND semester.year = 2016) OR (semester.semester = 'FA' AND semester.year = 2017) OR (semester.semester = 'FA' AND semester.year = 2018) OR (semester.semester = 'WN' AND se...
advising
CREATE TABLE table_67625 ( "Club" text, "Sport" text, "League" text, "Venue" text, "Championships (Years)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which League has a Venue of martin luther king, jr. recreation center?
SELECT "League" FROM table_67625 WHERE "Venue" = 'martin luther king, jr. recreation center'
wikisql
CREATE TABLE Ship ( Ship_ID int, Name text, Type text, Built_Year real, Class text, Flag text ) CREATE TABLE captain ( Captain_ID int, Name text, Ship_ID int, age text, Class text, Rank text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT Rank, COUNT(*) FROM captain WHERE age < 50 GROUP BY Rank ORDER BY COUNT(*)
nvbench
CREATE TABLE table_61454 ( "Date" text, "Tournament" text, "Surface" text, "Partnering" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Score has an Opponent in the final of chris haggard robbie k...
SELECT "Score" FROM table_61454 WHERE "Opponent in the final" = 'chris haggard robbie koenig'
wikisql
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 mzjzjlb.JZLSH 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 = '06038186' AND NOT mzjzjlb.JZLSH IN (SELECT zyjybgb.JZLSH FROM zyjybgb WHERE zyjybgb.BGRQ >= '2020-12-13' UNION SELECT mzjybgb.JZLSH FROM mzjybgb WHERE mzjybgb...
css
CREATE TABLE table_25401874_1 ( name VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many names are listed for the player with 50 points?
SELECT COUNT(name) FROM table_25401874_1 WHERE points = 50
sql_create_context
CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id WHERE (area.area LIKE '%Advanced Statistical Methods%' OR course.description LIKE '%Advanced Statistical Methods%' OR course.name LIKE '%Advanced Statistical Methods%') AND course.enforced_requ...
advising
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
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.person_info_XM = '郎高义'
css
CREATE TABLE table_78876 ( "Team" text, "Average" real, "Points" real, "Played" real, "1989-90" text, "1990-91" text, "1991-1992" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much 1991-1992 has a Team of gimnasia de la plata, and more ...
SELECT COUNT("1991-1992") FROM table_78876 WHERE "Team" = 'gimnasia de la plata' AND "Points" > '113'
wikisql
CREATE TABLE table_69478 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the partner for may 2, 1993
SELECT "Partner" FROM table_69478 WHERE "Date" = 'may 2, 1993'
wikisql
CREATE TABLE table_22244 ( "Commune" text, "Area (km 2 )" text, "2002 population" real, "Pop. density (km 2 )" text, "Municipality website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What commune has an area of 12.4 sq.km.?
SELECT "Commune" FROM table_22244 WHERE "Area (km 2 )" = '12.4'
wikisql
CREATE TABLE table_204_658 ( id number, "week" number, "date" text, "kickoff" text, "opponent" text, "results\nfinal score" text, "results\nteam record" text, "game site" text, "attendance" number ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT COUNT(*) FROM table_204_658 WHERE "game site" = 'olympic stadium'
squall
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 JCZBJGDX, JCZBJGDL, JCZBJGDW FROM jyjgzbb WHERE JYZBLSH = '60978673374'
css
CREATE TABLE table_name_90 ( game_site VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Game site has an Opponent of Miami Dolphins?
SELECT game_site FROM table_name_90 WHERE opponent = "miami dolphins"
sql_create_context
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 MIN(demographic.age) FROM demographic WHERE demographic.gender = "F" AND demographic.admission_type = "NEWBORN"
mimicsql_data
CREATE TABLE table_name_39 ( player VARCHAR, country VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHo has a Country of united states and a To par of 3?
SELECT player FROM table_name_39 WHERE country = "united states" AND to_par = "–3"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Prophylactic administration of vaccine against other diseases"
mimicsql_data
CREATE TABLE table_67639 ( "Episode" text, "First aired" text, "Entrepreneur(s)" text, "Company or product name" text, "Money requested (\u00a3)" text, "Investing Dragon(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Entrepreneur(s) ha...
SELECT "Entrepreneur(s)" FROM table_67639 WHERE "Company or product name" = 'mixalbum'
wikisql
CREATE TABLE table_72784 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the time for saturday 4 m...
SELECT "Time" FROM table_72784 WHERE "Date" = 'Saturday 4 March 1995'
wikisql
CREATE TABLE table_name_12 ( runner_up VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the runner-up for rank of 7?
SELECT runner_up FROM table_name_12 WHERE rank = 7
sql_create_context
CREATE TABLE table_22640051_3 ( replaced_by VARCHAR, date_of_appointment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of replaced by for 13 june 2009
SELECT COUNT(replaced_by) FROM table_22640051_3 WHERE date_of_appointment = "13 June 2009"
sql_create_context
CREATE TABLE table_21968 ( "Parish (Prestegjeld)" text, "Sub-Parish (Sokn)" text, "Church Name" text, "Year Built" real, "Location of the Church" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of parish for vilnes kyrkje
SELECT COUNT("Parish (Prestegjeld)") FROM table_21968 WHERE "Church Name" = 'Vilnes kyrkje'
wikisql
CREATE TABLE table_203_358 ( id number, "pos." number, "athlete" text, "run 1" number, "run 2" number, "total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the total time for filip trejbal ?
SELECT "total" FROM table_203_358 WHERE "athlete" = 'filip trejbal'
squall
CREATE TABLE table_14889048_1 ( draws VARCHAR, conceded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of draws for when conceded is 25
SELECT COUNT(draws) FROM table_14889048_1 WHERE conceded = 25
sql_create_context
CREATE TABLE Addresses ( city VARCHAR, address_id VARCHAR ) CREATE TABLE Customers ( customer_address_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which city does has most number of customers?
SELECT T2.city FROM Customers AS T1 JOIN Addresses AS T2 ON T1.customer_address_id = T2.address_id GROUP BY T2.city ORDER BY COUNT(*) DESC LIMIT 1
sql_create_context
CREATE TABLE wrestler ( Wrestler_ID int, Name text, Reign text, Days_held text, Location text, Event text ) CREATE TABLE Elimination ( Elimination_ID text, Wrestler_ID text, Team text, Eliminated_By text, Elimination_Move text, Time text ) -- Using valid SQLite, answer...
SELECT Team, COUNT(*) FROM Elimination GROUP BY Team ORDER BY Team
nvbench
CREATE TABLE table_64427 ( "Player" text, "Original Season" text, "Gender" text, "Eliminated" text, "Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who's the player eliminated on episode 5?
SELECT "Player" FROM table_64427 WHERE "Eliminated" = 'episode 5'
wikisql
CREATE TABLE table_24043 ( "Episode" text, "Broadcast date" text, "Run time" text, "Viewers (in millions)" text, "Archive" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions viewers watched the episode that ran 23:25?
SELECT "Viewers (in millions)" FROM table_24043 WHERE "Run time" = '23:25'
wikisql
CREATE TABLE table_63091 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Silver has a Nation of total, and a Bronze smaller than 18?
SELECT MAX("Silver") FROM table_63091 WHERE "Nation" = 'total' AND "Bronze" < '18'
wikisql
CREATE TABLE table_name_83 ( overall INTEGER, college VARCHAR, pick VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Central Michigan's average overall when the pick was 8?
SELECT AVG(overall) FROM table_name_83 WHERE college = "central michigan" AND pick = 8
sql_create_context
CREATE TABLE table_49177 ( "Year" text, "Winner" text, "Jockey" text, "Trainer" text, "Owner" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which owner has the time 2:03.00 and the year of 1991 kd?
SELECT "Owner" FROM table_49177 WHERE "Time" = '2:03.00' AND "Year" = '1991 kd'
wikisql
CREATE TABLE table_27310 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of district for bill shuster
SELECT COUNT("District") FROM table_27310 WHERE "Incumbent" = 'Bill Shuster'
wikisql
CREATE TABLE table_name_65 ( player VARCHAR, position VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a round less than 9 and a position of G?
SELECT player FROM table_name_65 WHERE position = "g" AND round < 9
sql_create_context
CREATE TABLE table_22050 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "Record" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the opponent played on October 4?
SELECT "Opponent" FROM table_22050 WHERE "Date" = 'October 4'
wikisql
CREATE TABLE table_1090 ( "Place" real, "Shooter" text, "Total" real, "Round 1" real, "Round 2" real, "Round 3" real, "Round 4" real, "Round 5" real, "Round 6" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who shot an 80 in round 3
SELECT "Shooter" FROM table_1090 WHERE "Round 3" = '80'
wikisql
CREATE TABLE table_26412 ( "Season" text, "Name" text, "Teams" real, "Relegated to league" text, "Promoted to league" text, "Promoted from league" text, "Relegated from league" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many were pro...
SELECT COUNT("Promoted from league") FROM table_26412 WHERE "Relegated to league" = 'Esher'
wikisql
CREATE TABLE table_name_22 ( tournament VARCHAR, opponent_in_the_final VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament has an opponent in the final of nadia petrova and a score of 6 3, 4 6, 6 1??
SELECT tournament FROM table_name_22 WHERE opponent_in_the_final = "nadia petrova" AND score = "6–3, 4–6, 6–1"
sql_create_context
CREATE TABLE table_74153 ( "Product Name" text, "Form Factor" text, "Storage Medium" text, "Max Usable Capacity (GB)" real, "Speed ( IOPS )" real, "Latency (microseconds)" real, "Bandwidth (GB/s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT COUNT("Storage Medium") FROM table_74153 WHERE "Product Name" = 'RamSan-720'
wikisql
CREATE TABLE table_name_45 ( category VARCHAR, outcome VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What category was the winner in?
SELECT category FROM table_name_45 WHERE outcome = "winner"
sql_create_context
CREATE TABLE table_name_33 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is 2001, when 1990 is A, when 1987 is NME, and when 1997 is 1R?
SELECT 2001 FROM table_name_33 WHERE 1990 = "a" AND 1987 = "nme" AND 1997 = "1r"
sql_create_context
CREATE TABLE table_54714 ( "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 was the away team score when the home team ...
SELECT "Away team score" FROM table_54714 WHERE "Home team" = 'essendon'
wikisql
CREATE TABLE table_22382 ( "Species" text, "Common name" text, "Trinidad" text, "Tobago" text, "Bocas Is." text, "Other" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the trindad for yellow-bellied puffing snake
SELECT "Trinidad" FROM table_22382 WHERE "Common name" = 'Yellow-bellied puffing snake'
wikisql
CREATE TABLE routes ( rid number, dst_apid number, dst_ap text, src_apid number, src_ap text, alid number, airline text, codeshare text ) CREATE TABLE airlines ( alid number, name text, iata text, icao text, callsign text, country text, active text ) CREATE ...
SELECT T1.name FROM airports AS T1 JOIN routes AS T2 ON T1.apid = T2.dst_apid WHERE T1.country = 'China' GROUP BY T1.name ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE table_2401326_1 ( bush_number VARCHAR, bush_percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different counts of the votes for Bush are there in the county where he got 69.7% of the votes?
SELECT COUNT(bush_number) FROM table_2401326_1 WHERE bush_percentage = "69.7%"
sql_create_context
CREATE TABLE table_1108394_34 ( the_bronx VARCHAR, manhattan VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of The Bronx voters occured when Manhattan had 29.9% of voters?
SELECT the_bronx FROM table_1108394_34 WHERE manhattan = "29.9_percentage"
sql_create_context
CREATE TABLE table_204_140 ( id number, "round" number, "#" number, "player" text, "position" text, "nationality" text, "college/junior/club team (league)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the total number of players picked
SELECT COUNT("player") FROM table_204_140
squall
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt ...
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, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ST. LOUIS' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'MILW...
atis
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 microlab ( microl...
SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-202432' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hosp...
eicu
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE area ( course_id int...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN student_record ON student_record.offering_id = offering_instructor.offering_id INNER JOIN student ON student.student_id = student_record.student_id WHERE (student_rec...
advising
CREATE TABLE table_name_43 ( city_of_license VARCHAR, frequency_mhz VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What City of license has a Frequency MHz smaller than 95.9 with w223au as the call sign?
SELECT city_of_license FROM table_name_43 WHERE frequency_mhz < 95.9 AND call_sign = "w223au"
sql_create_context
CREATE TABLE table_name_19 ( region VARCHAR, catalog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which region had a catalog number of 570 734-2?
SELECT region FROM table_name_19 WHERE catalog = "570 734-2"
sql_create_context
CREATE TABLE table_69106 ( "Match" text, "Date" text, "Location" text, "Lineup" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location of the gold medal match?
SELECT "Location" FROM table_69106 WHERE "Competition" = 'gold medal match'
wikisql
CREATE TABLE table_name_76 ( co_drivers VARCHAR, year VARCHAR, laps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the co-drivers before 2010 with under 326 laps?
SELECT co_drivers FROM table_name_76 WHERE year < 2010 AND laps < 326
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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 = jy...
css
CREATE TABLE table_name_18 ( year INTEGER, theme VARCHAR, mintage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the earliest year when the 25th Anniversary Loonie was the theme, and the mintage was less than 35,000?
SELECT MIN(year) FROM table_name_18 WHERE theme = "25th anniversary loonie" AND mintage < 35 OFFSET 000
sql_create_context
CREATE TABLE table_64371 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Week number on October 10, 1976?
SELECT COUNT("Week") FROM table_64371 WHERE "Date" = 'october 10, 1976'
wikisql
CREATE TABLE table_53880 ( "Interregnum began" text, "Interregnum ended" text, "Duration" text, "Count Palatine of Saxony" text, "Count Palatine of the Rhine" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Interregnum ended for the perso...
SELECT "Interregnum ended" FROM table_53880 WHERE "Duration" = '3 months, 6 days'
wikisql
CREATE TABLE Apartment_Bookings ( apt_booking_id INTEGER, apt_id INTEGER, guest_id INTEGER, booking_status_code CHAR(15), booking_start_date DATETIME, booking_end_date DATETIME ) CREATE TABLE Apartments ( apt_id INTEGER, building_id INTEGER, apt_type_code CHAR(15), apt_number CH...
SELECT booking_status_code, COUNT(*) FROM Apartment_Bookings GROUP BY booking_status_code
nvbench
CREATE TABLE table_name_12 ( nomination VARCHAR, director VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the nomination for goran paskaljevic
SELECT nomination FROM table_name_12 WHERE director = "goran paskaljevic"
sql_create_context
CREATE TABLE problem_status_codes ( problem_status_code text, problem_status_description text ) CREATE TABLE problem_log ( problem_log_id number, assigned_to_staff_id number, problem_id number, problem_category_code text, problem_status_code text, log_entry_date time, log_entry_desc...
SELECT T1.problem_id FROM problems AS T1 JOIN staff AS T2 ON T1.reported_by_staff_id = T2.staff_id WHERE date_problem_reported > (SELECT MAX(date_problem_reported) FROM problems AS T3 JOIN staff AS T4 ON T3.reported_by_staff_id = T4.staff_id WHERE T4.staff_first_name = "Rylan" AND T4.staff_last_name = "Homenick")
spider
CREATE TABLE Invoice_Items ( Invoice_Item_ID INTEGER, Invoice_ID INTEGER, Order_ID INTEGER, Order_Item_ID INTEGER, Product_ID INTEGER, Order_Quantity INTEGER, Other_Item_Details VARCHAR(255) ) CREATE TABLE Clients ( Client_ID INTEGER, Address_ID INTEGER, Customer_Email_Address V...
SELECT Planned_Delivery_Date, COUNT(Planned_Delivery_Date) FROM Bookings ORDER BY Planned_Delivery_Date DESC
nvbench
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE labevents ( row...
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 702)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'respirator...
mimic_iii
CREATE TABLE hz_info_zyjzjlb ( JZLSH number, YLJGDM number, zyjzjlb_id number ) 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, ...
SELECT mzjzjlb.SG, mzjzjlb.TZ FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '谢天心'
css
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, Po...
SELECT P1.Tags, P.ParentId, P.Id, P.OwnerUserId, P.Body FROM Posts AS P, Users AS U, Posts AS P1 WHERE P.Id != P.ParentId AND P1.Id = P.ParentId AND P.OwnerUserId = U.Id AND U.Id = @UserId
sede
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost numb...
SELECT COUNT(DISTINCT t1.subject_id) FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admissions.hadm_id WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'cont inv me...
mimic_iii
CREATE TABLE ReviewTasks ( Id number, ReviewTaskTypeId number, CreationDate time, DeletionDate time, ReviewTaskStateId number, PostId number, SuggestedEditId number, CompletedByReviewTaskId number ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Bod...
SELECT * FROM Votes WHERE BountyAmount > 0 ORDER BY CreationDate DESC
sede