instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_51 ( round VARCHAR, position VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of round for wide receiver for kent state
SELECT COUNT(round) FROM table_name_51 WHERE position = "wide receiver" AND college = "kent state"
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "41" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE weather ( date text, max_temperature_f number, mean_temperature_f number, min_temperature_f number, max_dew_point_f number, mean_dew_point_f number, min_dew_point_f number, max_humidity number, mean_humidity number, min_humidity number, max_sea_level_pressure_inc...
SELECT DISTINCT zip_code FROM weather EXCEPT SELECT DISTINCT zip_code FROM weather WHERE max_dew_point_f >= 70
spider
CREATE TABLE table_15852257_1 ( podiums VARCHAR, final_placing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which podiums have a final placing of 10th?
SELECT podiums FROM table_15852257_1 WHERE final_placing = "10th"
sql_create_context
CREATE TABLE table_16901 ( "number" real, "date of debut" text, "name" text, "date of birth" text, "number of caps" real, "number of goals" real, "date of death\u2020" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of person...
SELECT "name" FROM table_16901 WHERE "number of goals" = '10'
wikisql
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId numb...
SELECT Id, PostTypeId, Body, ParentId, CreationDate, Score FROM Posts AS p WHERE p.ParentId IN (SELECT Id FROM Posts AS q WHERE (q.Tags LIKE '%<swift>%' OR q.Tags LIKE '%<swift2>%' OR q.Tags LIKE '%<swift-playground>%' OR q.Tags LIKE '%<swift-json>%' OR q.Tags LIKE '%<swift-generics>%' OR q.Tags LIKE '%<swift-extension...
sede
CREATE TABLE table_name_27 ( fourth_quarter VARCHAR, rank VARCHAR, second_quarter VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the rank is less than 4, and has a second quarter of exxon mobil 341,140.3, what is the fourth quarter?
SELECT fourth_quarter FROM table_name_27 WHERE rank < 4 AND second_quarter = "exxon mobil 341,140.3"
sql_create_context
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id nu...
SELECT SUM(inputevents_cv.amount) 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 = 24894)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii
CREATE TABLE Customer ( CustomerId integer, FirstName varchar(40), LastName varchar(20), Company varchar(80), Address varchar(70), City varchar(40), State varchar(40), Country varchar(40), PostalCode varchar(10), Phone varchar(24), Fax varchar(24), Email varchar(60), ...
SELECT T1.Title, T1.AlbumId FROM Album AS T1 JOIN Track AS T2 ON T1.AlbumId = T2.AlbumId WHERE T2.UnitPrice > 1 ORDER BY T1.AlbumId
nvbench
CREATE TABLE table_name_59 ( rank INTEGER, annual_change VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average rank of the airport with a 9.3% annual change?
SELECT AVG(rank) FROM table_name_59 WHERE annual_change = "9.3%"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admityear < "2154" AND diagnoses.long_title = "Congestive heart failure, unspecified"
mimicsql_data
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 WHERE demographic.age < "81" AND prescriptions.formulary_drug_cd = "METD10"
mimicsql_data
CREATE TABLE table_9220 ( "Tournament" text, "Surface" text, "Week" text, "Winner and score" text, "Finalist" text, "Semifinalists" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the week when the finalist is marcelo r os?
SELECT "Week" FROM table_9220 WHERE "Finalist" = 'marcelo ríos'
wikisql
CREATE TABLE table_204_261 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many medals did france get in total ?
SELECT "total" FROM table_204_261 WHERE "nation" = 'france'
squall
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) 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 T...
SELECT HIRE_DATE, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_75839 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average Total with a Nation of ethiopia (eth) and a Rank that is larger than 9?
SELECT AVG("Total") FROM table_75839 WHERE "Nation" = 'ethiopia (eth)' AND "Rank" > '9'
wikisql
CREATE TABLE table_3618 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was William Kennedy first elected?
SELECT "First elected" FROM table_3618 WHERE "Incumbent" = 'William Kennedy'
wikisql
CREATE TABLE college ( cname text, state text, enr number ) CREATE TABLE player ( pid number, pname text, ycard text, hs number ) CREATE TABLE tryout ( pid number, cname text, ppos text, decision text ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT DISTINCT T1.state, T1.enr FROM college AS T1 JOIN tryout AS T2 ON T1.cname = T2.cname WHERE T2.decision = 'yes'
spider
CREATE TABLE table_202_75 ( id number, "award" text, "category" text, "recipients and nominees" text, "result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which category did both warren beatty and jeremy pikser each won together ?
SELECT "category" FROM table_202_75 WHERE "recipients and nominees" = 'warren beatty' AND "result" = 'won' INTERSECT SELECT "category" FROM table_202_75 WHERE "recipients and nominees" = 'jeremy pikser' AND "result" = 'won'
squall
CREATE TABLE table_name_71 ( record VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the record with opponent of christian nielson
SELECT record FROM table_name_71 WHERE opponent = "christian nielson"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "WHITE" AND prescriptions.route = "REPLACE"
mimicsql_data
CREATE TABLE category ( id int, business_id varchar, category_name varchar ) CREATE TABLE review ( rid int, business_id varchar, user_id varchar, rating float, text longtext, year int, month varchar ) CREATE TABLE business ( bid int, business_id varchar, name varcha...
SELECT business.name FROM business, category WHERE business.city = 'Dallas' AND category.business_id = business.business_id AND category.category_name = 'Bars'
yelp
CREATE TABLE table_38761 ( "The Kennel Club (UK) Toy Group" text, "Canadian Kennel Club Toy Dogs Group" text, "American Kennel Club Toy Group" text, "Australian National Kennel Council Toy Dogs Group" text, "New Zealand Kennel Club Toy Group" text ) -- Using valid SQLite, answer the following ques...
SELECT "New Zealand Kennel Club Toy Group" FROM table_38761 WHERE "Australian National Kennel Council Toy Dogs Group" = 'papillon'
wikisql
CREATE TABLE table_name_20 ( sales_area__m²_ INTEGER, sales_per_area VARCHAR, no_of_stores VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest sales area (m ) that has 4,094/m and more than 2 stores?
SELECT MIN(sales_area__m²_) FROM table_name_20 WHERE sales_per_area = "€4,094/m²" AND no_of_stores > 2
sql_create_context
CREATE TABLE table_12896884_1 ( city VARCHAR, enrollment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many cities have an enrollment of 19082?
SELECT COUNT(city) FROM table_12896884_1 WHERE enrollment = 19082
sql_create_context
CREATE TABLE table_name_27 ( competition VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Competition had a Score of 3 3?
SELECT competition FROM table_name_27 WHERE score = "3–3"
sql_create_context
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 procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, ...
SELECT COUNT(*) > 0 FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31325 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND microbiologyevents.spec_type_desc = 'bone marrow' AND NOT microbiologyevents.org_...
mimic_iii
CREATE TABLE table_14549 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Game site" text, "NFL Recap" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the NFL Recap of the game held o...
SELECT "NFL Recap" FROM table_14549 WHERE "Date" = 'december 24, 2005'
wikisql
CREATE TABLE table_26449 ( "Song title" text, "Artist" text, "Year" real, "Genre" text, "Single / Pack name" text, "Release date" text, "Family Friendly" text, "Additional Rock Band 3 Features" text ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT MAX("Year") FROM table_26449 WHERE "Genre" = 'Emo' AND "Artist" = 'All-American Rejects' AND "Song title" = ' Move Along '
wikisql
CREATE TABLE table_65988 ( "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 Bronze has a Nation of austria, and a Total larger than 6?
SELECT MAX("Bronze") FROM table_65988 WHERE "Nation" = 'austria' AND "Total" > '6'
wikisql
CREATE TABLE gyb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '59839403' AND qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 2930.76) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '59839403' AND gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOU...
css
CREATE TABLE table_43011 ( "Game" real, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team has a Score of 89-123?
SELECT "Team" FROM table_43011 WHERE "Score" = '89-123'
wikisql
CREATE TABLE table_name_2 ( region VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Region of the release on December 22, 2008?
SELECT region FROM table_name_2 WHERE date = "december 22, 2008"
sql_create_context
CREATE TABLE table_name_40 ( prize_money VARCHAR, matches VARCHAR, new_entries_this_round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the prize money amount after match 1, with 102 new entries to the round?
SELECT prize_money FROM table_name_40 WHERE matches > 1 AND new_entries_this_round = "102"
sql_create_context
CREATE TABLE table_1388 ( "Frequency" text, "Station" text, "Operator" text, "Language" text, "Genre" text, "Coverage Area" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the station where the language is tamil malay?
SELECT "Station" FROM table_1388 WHERE "Language" = 'Tamil Malay'
wikisql
CREATE TABLE table_80318 ( "Year" real, "Tournament" text, "Venue" text, "Result" text, "Extra" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which venue had an extra of Junior Race?
SELECT "Venue" FROM table_80318 WHERE "Extra" = 'junior race'
wikisql
CREATE TABLE table_61236 ( "Position" text, "Driver" text, "Entrant" text, "Class" text, "Laps" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Position that has the Entrant of j ampt?
SELECT "Position" FROM table_61236 WHERE "Entrant" = 'j ampt'
wikisql
CREATE TABLE table_27950 ( "meas. num." real, "passed" text, "YES votes" real, "NO votes" real, "% YES" text, "Const. Amd.?" text, "type" text, "description" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Was the constitution amended whe...
SELECT "Const. Amd.?" FROM table_27950 WHERE "% YES" = '69.82%'
wikisql
CREATE TABLE Maintenance_Engineers ( engineer_id INTEGER, company_id INTEGER, first_name VARCHAR(50), last_name VARCHAR(50), other_details VARCHAR(255) ) CREATE TABLE Third_Party_Companies ( company_id INTEGER, company_type VARCHAR(5), company_name VARCHAR(255), company_address VARC...
SELECT T1.part_name, T1.part_id FROM Parts AS T1 JOIN Part_Faults AS T2 ON T1.part_id = T2.part_id ORDER BY T1.part_id
nvbench
CREATE TABLE projects ( code text, name text, hours number ) CREATE TABLE scientists ( ssn number, name text ) CREATE TABLE assignedto ( scientist number, project text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the names of all the...
SELECT name FROM scientists ORDER BY name
spider
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.age < "70" AND diagnoses.long_title = "Acute myocardial infarction of inferolateral wall, initial episode of care"
mimicsql_data
CREATE TABLE table_name_81 ( year INTEGER, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year with a 1:42.85 time?
SELECT AVG(year) FROM table_name_81 WHERE time = "1:42.85"
sql_create_context
CREATE TABLE table_name_67 ( pick__number INTEGER, overall VARCHAR, name VARCHAR, round VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Pick # has a Round larger than 5, and a Position of wide receiver, and a Name of gregor...
SELECT AVG(pick__number) FROM table_name_67 WHERE round > 5 AND position = "wide receiver" AND name = "gregory spann" AND overall > 228
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 t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4645126' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-02-07' AND '2010-03-27'
css
CREATE TABLE table_name_91 ( losses INTEGER, wins VARCHAR, byes VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the total losses when there are 8 wins and less than 2 byes?
SELECT SUM(losses) FROM table_name_91 WHERE wins = 8 AND byes < 2
sql_create_context
CREATE TABLE table_name_18 ( round VARCHAR, position VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT ROUND HAS A GUARD POSITION AT OHIO COLLEGE?
SELECT round FROM table_name_18 WHERE position = "guard" AND college = "ohio"
sql_create_context
CREATE TABLE table_61134 ( "Opposing Teams" text, "Against" real, "Date" text, "Venue" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the venue for the match on 30/03/1985?
SELECT "Venue" FROM table_61134 WHERE "Date" = '30/03/1985'
wikisql
CREATE TABLE table_14603212_5 ( class_aAA VARCHAR, school_year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all the AAA classes in the school years of 2004-05?
SELECT class_aAA FROM table_14603212_5 WHERE school_year = "2004-05"
sql_create_context
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 BGDH FROM jybgb WHERE JZLSH = '49142439579' AND KSMC LIKE '%美容%'
css
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 MED_ORG_DEPT_CD, MED_ORG_DEPT_NM FROM t_kc22 WHERE STA_DATE BETWEEN '2013-02-06' AND '2015-06-12' AND MED_INV_ITEM_TYPE = '手术费' GROUP BY MED_ORG_DEPT_CD ORDER BY COUNT(*) LIMIT 16
css
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicatio...
SELECT SUM(CASE WHEN patient.hospitaldischargestatus = 'alive' THEN 1 WHEN STRFTIME('%j', patient.hospitaldischargetime) - STRFTIME('%j', t2.diagnosistime) > 5 * 365 THEN 1 ELSE 0 END) * 100 / COUNT(*) FROM (SELECT t1.uniquepid, t1.diagnosistime FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOI...
eicu
CREATE TABLE table_17474 ( "Year" real, "Division" text, "League" text, "Regular Season" text, "Playoffs" text, "Open Cup" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the playoffs when the regular season was 7th, southe...
SELECT "Playoffs" FROM table_17474 WHERE "Regular Season" = '7th, Southeast'
wikisql
CREATE TABLE table_55031 ( "Year" real, "Award" text, "Category" text, "Nominee" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What award was Denis Lawson nominated for in the Best Actor in a Musical category?
SELECT "Award" FROM table_55031 WHERE "Category" = 'best actor in a musical' AND "Nominee" = 'denis lawson'
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 WHERE demographic.gender = "F" AND diagnoses.short_title = "Preterm NEC 2500+g"
mimicsql_data
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 zyjzjlb ( YLJGDM text, JZLSH ...
SELECT SHRGH, SHRXM FROM jybgb WHERE JZLSH = '22035367321'
css
CREATE TABLE table_54944 ( "Year" real, "Artist" text, "Composition" text, "Mintage" real, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Artist Steve Hepburn's Mintage?
SELECT SUM("Mintage") FROM table_54944 WHERE "Artist" = 'steve hepburn'
wikisql
CREATE TABLE table_17413485_1 ( first_broadcast VARCHAR, episode VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- in what date was aired the first broacast of the episode 1x02
SELECT first_broadcast FROM table_17413485_1 WHERE episode = "1x02"
sql_create_context
CREATE TABLE table_44695 ( "Solution" text, "Other Name" text, "[Na + ](mmol/L)" real, "[Cl - ](mmol/L)" real, "[Glucose](mmol/L)" real, "[Glucose](mg/dl)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much is the lowest glucose(mmol/L) wit...
SELECT MIN("[Glucose](mmol/L)") FROM table_44695 WHERE "[Na + ](mmol/L)" < '0'
wikisql
CREATE TABLE table_74320 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the epi...
SELECT "Written by" FROM table_74320 WHERE "U.S. viewers (million)" = '5.95'
wikisql
CREATE TABLE table_name_9 ( club_team VARCHAR, round VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Club team with a Round larger than 5 have a defense position?
SELECT club_team FROM table_name_9 WHERE round > 5 AND position = "defense"
sql_create_context
CREATE TABLE table_63037 ( "Player" text, "County" text, "Tally" text, "Total" real, "Matches" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total points did Oisin McConville have from his 5 matches?
SELECT COUNT("Total") FROM table_63037 WHERE "Player" = 'oisin mcconville' AND "Matches" < '5'
wikisql
CREATE TABLE table_48980 ( "Region" text, "1950" real, "1960" real, "1970" real, "1980" real, "1990" real, "2000" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest value for 1990, when the Region is East Asia (10 Economies), ...
SELECT MIN("1990") FROM table_48980 WHERE "Region" = 'east asia (10 economies)' AND "1960" < '12.6'
wikisql
CREATE TABLE table_name_18 ( date VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game with a loss of Bush (1 5)?
SELECT date FROM table_name_18 WHERE loss = "bush (1–5)"
sql_create_context
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 * FROM t_kc21 WHERE t_kc21.PERSON_NM = '秦欣美' AND t_kc21.MED_SER_ORG_NO = '1186418' AND NOT t_kc21.MED_ORG_DEPT_NM LIKE '%新生儿%'
css
CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), CLASS_ROOM varchar(8), PROF_NUM int ) CREATE TABLE COURSE ( CRS_CODE varchar(10), DEPT_CODE varchar(10), CRS_DESCRIPTION varchar(35), CRS_CREDIT float(8) ) CREATE...
SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY CRS_DESCRIPTION, PROF_OFFICE ORDER BY PROF_OFFICE DESC
nvbench
CREATE TABLE table_79648 ( "Year" real, "Player" text, "Country" text, "Score" text, "To Par" text, "Margin" real, "Earnings ($)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which To Par has Earnings ($) larger than 360,000, and a Year la...
SELECT "To Par" FROM table_79648 WHERE "Earnings ($)" > '360,000' AND "Year" > '1998' AND "Country" = 'united states' AND "Score" = '69-68-66-64=267'
wikisql
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE icustays ( row...
SELECT MAX(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'male gen inflam dis nec')) AND STRFTIME('%y', cost.chargetime) ...
mimic_iii
CREATE TABLE table_76304 ( "noun root (meaning)" text, "case suffix (case)" text, "postposition" text, "full word" text, "English meaning" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Case Suffix (Case), when Postposition is '-mde (drops d...
SELECT "case suffix (case)" FROM table_76304 WHERE "postposition" = '-mde (drops d)'
wikisql
CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), HIRE_DATE date, JOB_ID varchar(10), SALARY decimal(8,2), COMMISSION_PCT decimal(2,2), MANAGER_ID decimal(6,0), DEPARTMENT_ID decimal(...
SELECT SALARY, COMMISSION_PCT FROM employees WHERE HIRE_DATE < '2002-06-21'
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
SELECT MIN(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-86645') AND NOT patient.admissionweight IS NULL AND STRFTIME('%y', patient.unitadmittime) <= '2104' GROUP BY STRFTIME('%y', patient.unitadmitt...
eicu
CREATE TABLE table_26967904_2 ( f_bolt VARCHAR, p1_diameter__mm_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the f bolt for 11.35 p1 diameter (mm)?
SELECT f_bolt FROM table_26967904_2 WHERE p1_diameter__mm_ = "11.35"
sql_create_context
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '苏清华' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC
css
CREATE TABLE table_17926 ( "Position" real, "Club" text, "Played" real, "Won" real, "Drawn" real, "Lost" real, "Pts For" real, "Pts Agst" real, "B.P." real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position di...
SELECT MAX("Position") FROM table_17926 WHERE "Club" = 'Sheffield Eagles'
wikisql
CREATE TABLE manufacturers ( code number, name text, headquarter text, founder text, revenue number ) CREATE TABLE products ( code number, name text, price number, manufacturer number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What a...
SELECT name FROM products WHERE price <= 200
spider
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 MIN(t_kc24.MED_AMOUT), MAX(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '9343283' AND t_kc24.t_kc21_OUT_DIAG_DIS_NM = '慢性牙周炎')
css
CREATE TABLE table_18812 ( "Specification" text, "Gender" text, "Junior High School (12\u201315 yrs)" text, "Senior High School (15\u201318 yrs)" text, "University students and Adults (18yrs+)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What amo...
SELECT "Senior High School (15\u201318 yrs)" FROM table_18812 WHERE "Junior High School (12\u201315 yrs)" = '114cm'
wikisql
CREATE TABLE table_67528 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had a score of 69-70=139?
SELECT "Player" FROM table_67528 WHERE "Score" = '69-70=139'
wikisql
CREATE TABLE table_name_86 ( winners VARCHAR, runners_up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner when the runner-up was Chemnitzer FC II?
SELECT winners FROM table_name_86 WHERE runners_up = "chemnitzer fc ii"
sql_create_context
CREATE TABLE table_5974 ( "Rank" real, "Rider" text, "Team" text, "Speed" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Team of honda 250cc, and a Time of 31 03.093 has what lowest rank?
SELECT MIN("Rank") FROM table_5974 WHERE "Team" = 'honda 250cc' AND "Time" = '31’ 03.093'
wikisql
CREATE TABLE table_33071 ( "Lecturers" real, "Associate professors" real, "Assistant professors" real, "Professors" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total in the case where theere are 6 lecturers and fewer tha...
SELECT AVG("Total") FROM table_33071 WHERE "Lecturers" = '6' AND "Professors" < '48'
wikisql
CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, ...
SELECT DISTINCT ground_service.transport_type FROM city, ground_service WHERE city.city_name = 'DENVER' AND ground_service.city_code = city.city_code
atis
CREATE TABLE table_29880 ( "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. -- How ma...
SELECT COUNT("High points") FROM table_29880 WHERE "Date" = 'January 7'
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 AVG(demographic.age) FROM demographic WHERE demographic.language = "CAPE" AND demographic.diagnosis = "CORONARY ARTERY DISEASE"
mimicsql_data
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE admissions ( row_id number, subject_id number, ...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 17462 AND admissions.dischtime IS NULL) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') ORDER BY labevents.charttime L...
mimic_iii
CREATE TABLE college ( college_id number, name text, leader_name text, college_location text ) CREATE TABLE member ( member_id number, name text, country text, college_id number ) CREATE TABLE round ( round_id number, member_id number, decoration_theme text, rank_in_rou...
SELECT name FROM member WHERE NOT member_id IN (SELECT member_id FROM round)
spider
CREATE TABLE table_name_57 ( score VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final score for the match where Hereford United was the home team?
SELECT score FROM table_name_57 WHERE home_team = "hereford united"
sql_create_context
CREATE TABLE table_name_6 ( name VARCHAR, transfer_window VARCHAR, moving_to VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the name that had a moving to Anorthosis Famagusta and a transfer window of winter?
SELECT name FROM table_name_6 WHERE transfer_window = "winter" AND moving_to = "anorthosis famagusta"
sql_create_context
CREATE TABLE table_44862 ( "Rank" real, "Name" text, "S-League" text, "Singapore Cup" text, "Singapore League Cup" text, "AFC Cup" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which AFC cup does Kenji Arai have?
SELECT "AFC Cup" FROM table_44862 WHERE "Name" = 'kenji arai'
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 prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "80" AND prescriptions.formulary_drug_cd = "AZTR1000FB"
mimicsql_data
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.days_stay > "1" AND diagnoses.short_title = "Malnutrition mild degree"
mimicsql_data
CREATE TABLE table_name_24 ( location VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where did arturo segovia compete?
SELECT location FROM table_name_24 WHERE opponent = "arturo segovia"
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID...
SELECT HIRE_DATE, AVG(DEPARTMENT_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY AVG(DEPARTMENT_ID)
nvbench
CREATE TABLE table_77539 ( "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 with 18.185 points round 1
SELECT "Rider" FROM table_77539 WHERE "Round 1 Points" = '18.185'
wikisql
CREATE TABLE mzb ( CLINIC_ID 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, INSU_TYPE text, IN...
SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '何美华' AND t_kc22.STA_DATE BETWEEN '2002-07-14' AND '2014-08-18' AND qtb.MED_SER_ORG_NO = '5350296' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLIN...
css
CREATE TABLE people ( person_id number, first_name text, middle_name text, last_name text, cell_mobile_number text, email_address text, login_name text, password text ) CREATE TABLE courses ( course_id text, course_name text, course_description text, other_details text )...
SELECT first_name FROM people ORDER BY first_name
spider
CREATE TABLE table_name_49 ( voltage VARCHAR, model_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the voltage for the pentium dual-core e2140?
SELECT voltage FROM table_name_49 WHERE model_number = "pentium dual-core e2140"
sql_create_context
CREATE TABLE table_name_55 ( result VARCHAR, week VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the game on week 11?
SELECT result FROM table_name_55 WHERE week = 11
sql_create_context
CREATE TABLE table_36958 ( "Outcome" text, "Date" text, "Location" text, "Surface" text, "Opponent in final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for clay surface and location of santos, brazil
SELECT "Date" FROM table_36958 WHERE "Surface" = 'clay' AND "Location" = 'santos, brazil'
wikisql
CREATE TABLE table_67901 ( "Tournament" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the 2010 result of a tournament that is A in 2006 a...
SELECT "2010" FROM table_67901 WHERE "2011" = 'a' AND "2006" = 'a'
wikisql
CREATE TABLE table_37942 ( "School" text, "City" text, "Team Name" text, "Enrollment" real, "IHSAA Class" text, "IHSAA Football Class" text, "County" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school is in Brookville?
SELECT "School" FROM table_37942 WHERE "City" = 'brookville'
wikisql