instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_98 ( episodes INTEGER, tv_station VARCHAR, romaji_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the episode on Fuji TV titled Absolute Boyfriend?
SELECT MIN(episodes) FROM table_name_98 WHERE tv_station = "fuji tv" AND romaji_title = "absolute boyfriend"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE diagnosis ( diagnosisid...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'oncology consultation' AND DATETIME(treatment.treatmenttime) <= DATETIME(CURRENT_TIME(), '-1 year')) AS t1 J...
eicu
CREATE TABLE table_62446 ( "Elected" text, "Assembled" text, "Dissolved" text, "1st member" text, "2nd member" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the parliament that was elected in 1509/10, and had an unknown second member, diss...
SELECT "Dissolved" FROM table_62446 WHERE "2nd member" = 'unknown' AND "Elected" = '1509/10'
wikisql
CREATE TABLE table_name_74 ( term_end VARCHAR, party VARCHAR, term_in_office VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Term end that has a Party of united australia and 184 days in office?
SELECT term_end FROM table_name_74 WHERE party = "united australia" AND term_in_office = "184 days"
sql_create_context
CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE game ( stadium_id int, id int, Season int, Date text, Home_team text, Away_team text, Score text, Competition text ) ...
SELECT Season, COUNT(Season) FROM game GROUP BY Away_team ORDER BY Season
nvbench
CREATE TABLE table_26919_6 ( hebrew VARCHAR, arabic VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the hebrew for tis -
SELECT hebrew FROM table_26919_6 WHERE arabic = "tisʕ-"
sql_create_context
CREATE TABLE table_203_149 ( id number, "pick" number, "player" text, "team" text, "position" text, "school" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- was kiki jones picked before or after greg gohr ?
SELECT (SELECT "pick" FROM table_203_149 WHERE "player" = 'kiki jones') < (SELECT "pick" FROM table_203_149 WHERE "player" = 'greg gohr')
squall
CREATE TABLE table_78000 ( "Class" text, "GNRI No." real, "Name" text, "BP serial No." real, "Rebuilt" real, "1958" text, "Withdrawn" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest withdrawn value with a GNRI greater tha...
SELECT MIN("Withdrawn") FROM table_78000 WHERE "GNRI No." > '172' AND "Name" = 'croagh patrick' AND "Rebuilt" < '1939'
wikisql
CREATE TABLE table_name_3 ( year_clubhouse_constructed VARCHAR, sign_in_bicker VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the Clubhouse built with a Sign-in/Bicker of bicker, and Named cannon club?
SELECT year_clubhouse_constructed FROM table_name_3 WHERE sign_in_bicker = "bicker" AND name = "cannon club"
sql_create_context
CREATE TABLE table_79211 ( "Actor" text, "Character" text, "Soap Opera" text, "Years" text, "Duration" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which actor played on Home and Away for 20 years?
SELECT "Actor" FROM table_79211 WHERE "Duration" = '20 years' AND "Soap Opera" = 'home and away'
wikisql
CREATE TABLE table_11960610_10 ( high_points VARCHAR, high_rebounds VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had high points when high rebound is gray (8)?
SELECT high_points FROM table_11960610_10 WHERE high_rebounds = "Gray (8)"
sql_create_context
CREATE TABLE table_59397 ( "Frequency" real, "Callsign" text, "Brand" text, "City of License" text, "Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Type, when Frequency is '1480'?
SELECT "Type" FROM table_59397 WHERE "Frequency" = '1480'
wikisql
CREATE TABLE table_65143 ( "Round" real, "Pick" real, "Player" text, "Nationality" text, "College/Junior/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is tom cassidy's nationality?
SELECT "Nationality" FROM table_65143 WHERE "Player" = 'tom cassidy'
wikisql
CREATE TABLE table_name_30 ( place VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Place, when To Par is '5', and when Score is '72-73=145'?
SELECT place FROM table_name_30 WHERE to_par = 5 AND score = 72 - 73 = 145
sql_create_context
CREATE TABLE table_2144389_9 ( japanese_translation VARCHAR, japanese_title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When is the japanese title what is the japanese translation?
SELECT japanese_translation FROM table_2144389_9 WHERE japanese_title = "七色アーチ"
sql_create_context
CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE medicine ( id number, name text, trade_name text, fda_approved text ) CREATE TABLE enzyme ( id number, name text, location text, product text, chromosom...
SELECT T1.interaction_type FROM medicine_enzyme_interaction AS T1 JOIN medicine AS T2 ON T1.medicine_id = T2.id JOIN enzyme AS T3 ON T1.enzyme_id = T3.id WHERE T3.name = 'ALA synthase' AND T2.name = 'Aripiprazole'
spider
CREATE TABLE txmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT txmzjzjlb.JLSJ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '16392541751' UNION SELECT ftxmzjzjlb.JLSJ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '16392541751'
css
CREATE TABLE table_name_74 ( rank VARCHAR, total VARCHAR, nation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rank for the Mixed Team nation with a total of less than 13?
SELECT rank FROM table_name_74 WHERE total < 13 AND nation = "mixed team"
sql_create_context
CREATE TABLE table_28005100_1 ( composer VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the composer of ain shams?
SELECT composer FROM table_28005100_1 WHERE title = "Ain Shams"
sql_create_context
CREATE TABLE table_46567 ( "Position" real, "Club" text, "Played" real, "Points" real, "Wins" real, "Draws" real, "Losses" real, "Goals for" real, "Goals against" real, "Goal Difference" real ) -- Using valid SQLite, answer the following questions for the tables provided above....
SELECT MIN("Goals against") FROM table_46567 WHERE "Club" = 'cd alcoyano' AND "Points" > '25'
wikisql
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Tags ( Id number, TagName text, Count num...
SELECT Title, Body FROM Posts WHERE Tags LIKE '%<java>%' AND Body LIKE '%<code>%'
sede
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_location = "TRSF WITHIN THIS FACILITY" AND procedures.icd9_code = "8847"
mimicsql_data
CREATE TABLE table_15887683_3 ( package_option VARCHAR, television_service VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What package offers Fox Sports HD?
SELECT package_option FROM table_15887683_3 WHERE television_service = "FOX Sports HD"
sql_create_context
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilege...
SELECT COUNT(*) FROM Posts WHERE PostTypeId = 1 AND CreationDate < DATEADD(month, '##Months##', '2008-08-01')
sede
CREATE TABLE table_63107 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Nationality has a Rank larger than 1, and a Time smaller than 22.12, and a Lane smaller than 4, and a N...
SELECT "Nationality" FROM table_63107 WHERE "Rank" > '1' AND "Time" < '22.12' AND "Lane" < '4' AND "Name" = 'ashley callus'
wikisql
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 (SELECT COUNT(*) 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 = '27285110' AND mzjzjlb.JZKSRQ BETWEEN '2013-01-08' AND '2021-04-27') + (SELECT COUNT(*) FROM hz_info JOIN zyjzjlb JOIN hz_info_zyjzjlb ON hz_info.YLJGDM = h...
css
CREATE TABLE table_train_68 ( "id" int, "sequential_organ_failure_assessment_sofa" int, "pregnancy_or_lactation" bool, "piro_predispose_infection_response_organ_dysfunction_score" int, "systolic_blood_pressure_sbp" int, "hypotension" bool, "age" float, "lactate" int, "NOUSE" float ) ...
SELECT * FROM table_train_68 WHERE age < 18
criteria2sql
CREATE TABLE table_48032 ( "Publication" text, "Country" text, "Nominated work" text, "Accolade" text, "Year" real, "Rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the accolade for Scottish albums of the decade?
SELECT "Year" FROM table_48032 WHERE "Accolade" = 'scottish albums of the decade'
wikisql
CREATE TABLE table_57610 ( "Country" text, "Abbreviation" text, "Assets US$Billion" text, "Inception" text, "Origin" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the abbreviation for the country with an inception of 1999 and US$Billion asse...
SELECT "Abbreviation" FROM table_57610 WHERE "Inception" = '1999' AND "Assets US$Billion" = '7.1'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE prescriptions ( subject_id text, hadm_id...
SELECT demographic.diagnosis, lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_87 ( area VARCHAR, authority VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what area is torbay school with a state authority?
SELECT area FROM table_name_87 WHERE authority = "state" AND name = "torbay school"
sql_create_context
CREATE TABLE table_46714 ( "Season" text, "Competition" text, "Round" text, "Club" text, "1st Leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which competition has aik club?
SELECT "Competition" FROM table_46714 WHERE "Club" = 'aik'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT JOB_ID, COUNT(JOB_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE table_name_52 ( tournament VARCHAR, surface VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament was played on clay and there was a score of 4 6, 6 1, 6 4?
SELECT tournament FROM table_name_52 WHERE surface = "clay" AND score = "4–6, 6–1, 6–4"
sql_create_context
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 demographic.admission_location FROM demographic WHERE demographic.subject_id = "6983"
mimicsql_data
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT JZLSH FROM jybgb WHERE BGDH = '06771484381'
css
CREATE TABLE customers ( customer_id number, customer_first_name text, customer_last_name text, customer_address text, customer_phone text, customer_email text, other_customer_details text ) CREATE TABLE accounts ( account_id number, customer_id number, account_name text, ot...
SELECT DISTINCT T1.customer_first_name, T1.customer_last_name FROM customers AS T1 JOIN accounts AS T2 ON T1.customer_id = T2.customer_id
spider
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId n...
SELECT AVG(Score + 0.000001) FROM Posts WHERE PostTypeId = 1 AND AcceptedAnswerId IS NULL
sede
CREATE TABLE table_15660 ( "Rank" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest rank from Lane 4?
SELECT MAX("Rank") FROM table_15660 WHERE "Lane" = '4'
wikisql
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 prescriptions.formulary_drug_cd, prescriptions.drug_dose FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Anna Johnson"
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 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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "ELECTIVE" AND lab.itemid = "50927"
mimicsql_data
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDat...
SELECT TIME_TO_STR(p.LastActivityDate, '%Y') AS YEAR, TIME_TO_STR(p.LastActivityDate, '%B') AS MONTH, MONTH(p.LastActivityDate) AS ACTIVE_MONTH_DAY, COUNT(*) AS Total FROM Posts AS p, PostTags AS ptags, Tags AS t, PostTypes AS ptypes WHERE p.PostTypeId = ptypes.Id AND ptypes.Id = 2 AND p.Id = ptags.PostId AND ptags.Tag...
sede
CREATE TABLE table_name_42 ( gold VARCHAR, total INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many gold medals correspond with a total over 4?
SELECT gold FROM table_name_42 WHERE total > 4
sql_create_context
CREATE TABLE table_name_70 ( crowd INTEGER, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the crowd when Melbourne was the home team?
SELECT AVG(crowd) FROM table_name_70 WHERE home_team = "melbourne"
sql_create_context
CREATE TABLE table_name_88 ( team__number2 VARCHAR, team__number1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the team 2 in the game with a team 1 of Liege Basket?
SELECT team__number2 FROM table_name_88 WHERE team__number1 = "liege basket"
sql_create_context
CREATE TABLE table_2009095_2 ( opponents VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponets for 6 4, 3 6, 6 2
SELECT opponents FROM table_2009095_2 WHERE score = "6–4, 3–6, 6–2"
sql_create_context
CREATE TABLE course ( crs_code text, dept_code text, crs_description text, crs_credit number ) CREATE TABLE department ( dept_code text, dept_name text, school_code text, emp_num number, dept_address text, dept_extension text ) CREATE TABLE employee ( emp_num number, em...
SELECT COUNT(*) FROM professor WHERE prof_high_degree = 'Ph.D.' OR prof_high_degree = 'MA'
spider
CREATE TABLE table_79112 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is Stephen Ames from with a place value of t9?
SELECT "Country" FROM table_79112 WHERE "Place" = 't9' AND "Player" = 'stephen ames'
wikisql
CREATE TABLE table_name_95 ( year_s__won VARCHAR, player VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of years won by Justin Leonard with a to par under 9?
SELECT COUNT(year_s__won) FROM table_name_95 WHERE player = "justin leonard" AND to_par < 9
sql_create_context
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT COUNT(*) FROM (SELECT t_kc21.MED_ORG_DEPT_CD FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '6010828' GROUP BY t_kc21.MED_ORG_DEPT_CD HAVING MAX(t_kc21.IN_HOSP_DAYS) < 24) AS T
css
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT t3.culturesite FROM (SELECT t2.culturesite, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, treatment.treatmenttime FROM treatment JOIN patient ON treatment.patientunitstayid = patient.patientunitstayid WHERE treatment.treatmentname = 'pulmonary/ccm consultation' AND STRFTIME('%y...
eicu
CREATE TABLE DEPARTMENT ( DName VARCHAR, Building VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Find the department name that is in Building 'Mergenthaler'.
SELECT DName FROM DEPARTMENT WHERE Building = "Mergenthaler"
sql_create_context
CREATE TABLE county ( County_Id int, County_name text, Population real, Zip_code text ) CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( ...
SELECT Governor, COUNT(Governor) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor ORDER BY Governor DESC
nvbench
CREATE TABLE table_203_615 ( id number, "district" text, "incumbent" text, "party" text, "first\nelected" number, "result" text, "candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of democratic gains listed ?
SELECT COUNT(*) FROM table_203_615 WHERE "result" = 'democratic gain'
squall
CREATE TABLE table_name_24 ( bronze VARCHAR, total INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of bronzes that is less than 1 in total?
SELECT COUNT(bronze) FROM table_name_24 WHERE total < 1
sql_create_context
CREATE TABLE Services ( service_id INTEGER, organization_id INTEGER, service_type_code CHAR(15), service_details VARCHAR(255) ) CREATE TABLE Customer_Event_Notes ( Customer_Event_Note_ID INTEGER, Customer_Event_ID INTEGER, service_type_code CHAR(15), resident_id INTEGER, property_id...
SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id
nvbench
CREATE TABLE table_203_507 ( id number, "#" text, "player" text, "\u03c3 points" number, "qual." number, "final" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did the two competitors from hungary get more or less combined points than the two ...
SELECT (SELECT SUM("\u03c3 points") FROM table_203_507 WHERE "player" = 'hungary') > (SELECT SUM("\u03c3 points") FROM table_203_507 WHERE "player" = 'argentina')
squall
CREATE TABLE table_1216 ( "Municipality" text, "League of Communists" real, "Peoples Party" real, "Union of Reform Forces" real, "Democratic Coalition" real, "DSSP" real, "Total seats" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is t...
SELECT MIN("League of Communists") FROM table_1216 WHERE "Municipality" = 'Mojkovac'
wikisql
CREATE TABLE table_25163 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the race ...
SELECT "Average Speed (mph)" FROM table_25163 WHERE "Race Time" = '2:00:33'
wikisql
CREATE TABLE table_18052353_4 ( treasurer VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was treasurer in 2008?
SELECT treasurer FROM table_18052353_4 WHERE year = "2008"
sql_create_context
CREATE TABLE table_58817 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the away team playing at Everton?
SELECT "Away team" FROM table_58817 WHERE "Home team" = 'everton'
wikisql
CREATE TABLE table_44831 ( "Game" text, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score of Game 4?
SELECT "Score" FROM table_44831 WHERE "Game" = '4'
wikisql
CREATE TABLE table_32176 ( "Round" real, "Overall" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average round for Wisconsin when the overall is larger than 238 and there is a def...
SELECT AVG("Round") FROM table_32176 WHERE "Overall" > '238' AND "Position" = 'defensive end' AND "School/Club Team" = 'wisconsin'
wikisql
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, KSMC text, SQRGH text, SQRXM text, BGRGH text, BGRXM text, SHRGH ...
SELECT JCZBMC, JCZBJGDL, JCZBJGDW, BGDH FROM jyjgzbb WHERE (BGDH = '22834295801' OR BGDH = '19041832841') AND JCZBMC IN ((SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '22834295801') INTERSECT (SELECT JCZBMC FROM jyjgzbb WHERE BGDH = '19041832841'))
css
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NA...
SELECT JOB_ID, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT
nvbench
CREATE TABLE table_name_34 ( enrollment INTEGER, ihsaa_class VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average enrollment of the IHSAA A class in wolcott?
SELECT AVG(enrollment) FROM table_name_34 WHERE ihsaa_class = "a" AND location = "wolcott"
sql_create_context
CREATE TABLE technician ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many technicians are there?
SELECT COUNT(*) FROM technician
sql_create_context
CREATE TABLE table_40320 ( "Party" text, "1985" real, "1987" real, "1990" real, "1995" real, "1999" real, "2003" real, "2007" real, "2011" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest 2007 value with a 1985 valu...
SELECT MAX("2007") FROM table_40320 WHERE "1985" > '52' AND "1987" > '130' AND "1990" < '1990'
wikisql
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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE diagnoses.short_title = "Lumbago" AND procedures.long_title = "Excision or destruction of other lesion or tissue of heart...
mimicsql_data
CREATE TABLE table_name_80 ( points INTEGER, player VARCHAR, touchdowns VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did Stuart have when he had less than 1 touchdown?
SELECT SUM(points) FROM table_name_80 WHERE player = "stuart" AND touchdowns < 1
sql_create_context
CREATE TABLE table_18904831_7 ( score VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score in the game that had a record of 25-8?
SELECT score FROM table_18904831_7 WHERE record = "25-8"
sql_create_context
CREATE TABLE table_48090 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Opponent has a Time of 4:51?
SELECT "Opponent" FROM table_48090 WHERE "Time" = '4:51'
wikisql
CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, va...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 83499) AND microbiologyevents.spec_type_desc = 'blood culture' AND NOT microbiologyevents.org_name IS NULL AND DATETIME(microbiologyevents.charttime) >= DATETIME(CURRE...
mimic_iii
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeri...
SELECT MAX(intakeoutput.cellvaluenumeric) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-14568')) AND intakeoutput.celllabel = 'ns' A...
eicu
CREATE TABLE table_name_21 ( player VARCHAR, to_par VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Player has a To par less than 15 and a Total of 149?
SELECT player FROM table_name_21 WHERE to_par < 15 AND total = 149
sql_create_context
CREATE TABLE table_21762 ( "Number" real, "Name" text, "Kilometer" real, "Location" text, "Length (in m)" real, "Average climb (%)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the name of race #28?
SELECT "Name" FROM table_21762 WHERE "Number" = '28'
wikisql
CREATE TABLE table_name_8 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the home team when walsall was the away team?
SELECT home_team FROM table_name_8 WHERE away_team = "walsall"
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT * FROM hz_info JOIN wdmzjzjlb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE hz_info.RYBH = '43810325' AND hz_info.YLJGDM = '0319489' AND NOT wdmzjzjlb.CYKSMC LIKE '%关节%' UNION SELECT * FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND ...
css
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT 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.long_title = "Other anomalies of larynx, trachea, and bronchus" AND lab.flag = "delta"
mimicsql_data
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '12960893778' AND OVE_SELF_AMO > 2858.05
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 COUNT(hz_info.RYBH) FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE txmzjzjlb.ZZYSGH = '59997347' AND txmzjzjlb.JZKSRQ BETWEEN '2014-05-11' AND '2016-10-25' UNION SELECT COUNT(hz_info.RYBH) FROM hz_info JOIN ftxmzjzjlb ON hz_inf...
css
CREATE TABLE table_1307572_1 ( composition VARCHAR, edge VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What material is made with a rounded, plain edge?
SELECT composition FROM table_1307572_1 WHERE edge = "Rounded, plain"
sql_create_context
CREATE TABLE table_12496904_1 ( _2012 VARCHAR, population_august_15 INTEGER, population_density_2012__km_2__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the August 15, 2012 population when the population density of 2012 is 307?
SELECT MAX(population_august_15), _2012 FROM table_12496904_1 WHERE population_density_2012__km_2__ = 307
sql_create_context
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT jyjgzbb.JYZBLSH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz...
css
CREATE TABLE table_28543 ( "Round" text, "Circuit" text, "Date" text, "Pole Position" text, "Fastest Lap" text, "Winning Driver" text, "Winning Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In Round 6, who is the winning team?
SELECT "Winning Team" FROM table_28543 WHERE "Round" = '6'
wikisql
CREATE TABLE table_name_43 ( country VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Score of 70-68-70-68=276?
SELECT country FROM table_name_43 WHERE score = 70 - 68 - 70 - 68 = 276
sql_create_context
CREATE TABLE table_21350 ( "Date" text, "Opponent" text, "Venue" text, "Result" text, "Attendance" real, "Competition" text, "Man of the Match" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the man of the maatch for sheffield scimitars...
SELECT "Man of the Match" FROM table_21350 WHERE "Opponent" = 'Sheffield Scimitars'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAno...
SELECT COUNT(*) FROM Users WHERE Location = 'Zurich, Switzerland'
sede
CREATE TABLE table_77603 ( "Entrant" text, "Constructor" text, "Chassis" text, "Engine \u2020" text, "Tyre" text, "Driver" text, "Rounds" text, "Free Practice driver(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the rounds ...
SELECT "Rounds" FROM table_77603 WHERE "Tyre" = 'b' AND "Engine \u2020" = 'ferrari 053'
wikisql
CREATE TABLE table_name_75 ( date VARCHAR, opponent VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the event that had Liberia as an opponent and resulted in a 1-0 score?
SELECT date FROM table_name_75 WHERE opponent = "liberia" AND score = "1-0"
sql_create_context
CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T1.Code FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder, T1.Name
nvbench
CREATE TABLE table_name_14 ( reason_for_termination VARCHAR, appointed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Reason for termination has Appointed by of eisenhower category:articles with hcards?
SELECT reason_for_termination FROM table_name_14 WHERE appointed_by = "eisenhower category:articles with hcards"
sql_create_context
CREATE TABLE table_203_838 ( id number, "year" number, "world car of the year" text, "world performance car" text, "world green car" text, "world car design of the year" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many world performance c...
SELECT "world performance car" FROM table_203_838 WHERE "year" = 2009
squall
CREATE TABLE table_68832 ( "City" text, "Country" text, "IATA" text, "ICAO" text, "Airport" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the airport in the city of Kota Kinabalu?
SELECT "Airport" FROM table_68832 WHERE "City" = 'kota kinabalu'
wikisql
CREATE TABLE table_11075747_4 ( written_by VARCHAR, series__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote Series 38?
SELECT written_by FROM table_11075747_4 WHERE series__number = 38
sql_create_context
CREATE TABLE table_22838 ( "Mission No." text, "Cover Name" text, "Launch Date" text, "NSSDC ID No." text, "Alt. Name" text, "Camera" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the alternative names of those satell...
SELECT "Alt. Name" FROM table_22838 WHERE "Notes" = 'Mission failed. Guidance system failed. No orbit.'
wikisql
CREATE TABLE table_11734041_20 ( player VARCHAR, years_for_rockets VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total number of player where years for rockets is 2004-06
SELECT COUNT(player) FROM table_11734041_20 WHERE years_for_rockets = "2004-06"
sql_create_context
CREATE TABLE table_26166836_1 ( location VARCHAR, road_race VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In which city was the berlin marathon?
SELECT location FROM table_26166836_1 WHERE road_race = "Berlin Marathon"
sql_create_context
CREATE TABLE table_75149 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of field goals for a pla...
SELECT MIN("Field goals") FROM table_75149 WHERE "Touchdowns" = '3'
wikisql
CREATE TABLE table_name_32 ( station_name VARCHAR, platform VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Station Name of Platform 5?
SELECT station_name FROM table_name_32 WHERE platform = "5"
sql_create_context