instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_25 ( coverage_area VARCHAR, city_of_license VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the coverage area for licesne of hillsboro, west virginia
SELECT coverage_area FROM table_name_25 WHERE city_of_license = "hillsboro, west virginia"
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 (SELECT t_kc24.PER_ACC_PAY FROM t_kc24 JOIN t_kc21_t_kc24 JOIN t_kc21 ON t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID AND t_kc21_t_kc24.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '78665747040') / (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc21_t_kc24.MED_CLINIC_ID = '7866574704...
css
CREATE TABLE table_25252080_3 ( march_27_29 VARCHAR, november_3 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number for march 27-29 whern november 3 is 153?
SELECT march_27_29 FROM table_25252080_3 WHERE november_3 = "153"
sql_create_context
CREATE TABLE countries ( country_id text, country_name text, region_id number ) CREATE TABLE job_history ( employee_id number, start_date time, end_date time, job_id text, department_id number ) CREATE TABLE employees ( employee_id number, first_name text, last_name text, ...
SELECT salary, manager_id FROM employees WHERE manager_id <> "null"
spider
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, C...
SELECT u.Id AS "user_link", u.DownVotes FROM Users AS u INNER JOIN Badges AS b ON b.UserId = u.Id WHERE b.Name = 'Marshal' AND u.DownVotes >= '##min?1000##' ORDER BY u.DownVotes DESC
sede
CREATE TABLE table_name_36 ( to_par VARCHAR, margin_of_victory VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is To par, when Margin of Victory is '2 Strokes', and when Tournament is 'Women's British Open'?
SELECT to_par FROM table_name_36 WHERE margin_of_victory = "2 strokes" AND tournament = "women's british open"
sql_create_context
CREATE TABLE table_29062 ( "Date" text, "Time" text, "Visiting team" text, "Home team" text, "Site" text, "Broadcast" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date for espn
SELECT "Date" FROM table_29062 WHERE "Broadcast" = 'ESPN'
wikisql
CREATE TABLE checkin ( cid int, business_id varchar, count int, day varchar ) CREATE TABLE category ( id int, business_id varchar, category_name varchar ) CREATE TABLE neighborhood ( id int, business_id varchar, neighborhood_name varchar ) CREATE TABLE review ( rid int, ...
SELECT AVG(review.rating) FROM review, user WHERE user.name = 'Michelle' AND user.user_id = review.user_id
yelp
CREATE TABLE table_name_52 ( season INTEGER, wins VARCHAR, races VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest season with 6 races, 2 wins, and a Series of all-japan gt championship>
SELECT MIN(season) FROM table_name_52 WHERE races = "6" AND series = "all-japan gt championship" AND wins = "2"
sql_create_context
CREATE TABLE table_name_95 ( national_team VARCHAR, year VARCHAR, club VARCHAR, apps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which National team has a Club of arsenal, and Apps smaller than 4, and a Year of 2010?
SELECT national_team FROM table_name_95 WHERE club = "arsenal" AND apps < 4 AND year = "2010"
sql_create_context
CREATE TABLE media_types ( id number, name text ) CREATE TABLE albums ( id number, title text, artist_id number ) CREATE TABLE artists ( id number, name text ) CREATE TABLE playlists ( id number, name text ) CREATE TABLE invoices ( id number, customer_id number, invoi...
SELECT unit_price FROM tracks WHERE name = "Fast As a Shark"
spider
CREATE TABLE documents ( document_id number, document_type_code text, project_id number, document_date time, document_name text, document_description text, other_details text ) CREATE TABLE accounts ( account_id number, statement_id number, account_details text ) CREATE TABLE p...
SELECT budget_type_description FROM ref_budget_codes WHERE budget_type_code = "ORG"
spider
CREATE TABLE table_262505_1 ( founded VARCHAR, current_conference VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the founded for school closed in 2005
SELECT founded FROM table_262505_1 WHERE current_conference = "school closed in 2005"
sql_create_context
CREATE TABLE table_25675 ( "Player" text, "RR W-L" text, "Sets W-L" text, "Games W-L" text, "Standings" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the games w-1 for cliff richey
SELECT "Games W-L" FROM table_25675 WHERE "Player" = 'Cliff Richey'
wikisql
CREATE TABLE table_57959 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalogue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What format is catalogue 148615 in?
SELECT "Format" FROM table_57959 WHERE "Catalogue" = '148615'
wikisql
CREATE TABLE Events ( Event_ID INTEGER, Service_ID INTEGER, Event_Details VARCHAR(255) ) CREATE TABLE Participants ( Participant_ID INTEGER, Participant_Type_Code CHAR(15), Participant_Details VARCHAR(255) ) CREATE TABLE Services ( Service_ID INTEGER, Service_Type_Code CHAR(15) ) CREA...
SELECT T1.Event_Details, T1.Event_ID FROM Events AS T1 JOIN Participants_in_Events AS T2 ON T1.Event_ID = T2.Event_ID GROUP BY T1.Event_Details ORDER BY T1.Event_Details
nvbench
CREATE TABLE loan ( loan_ID varchar(3), loan_type varchar(15), cust_ID varchar(3), branch_ID varchar(3), amount int ) CREATE TABLE customer ( cust_ID varchar(3), cust_name varchar(20), acc_type char(1), acc_bal int, no_of_loans int, credit_score int, branch_ID int, s...
SELECT cust_name, credit_score FROM customer AS T1 JOIN loan AS T2 ON T1.cust_ID = T2.cust_ID
nvbench
CREATE TABLE table_name_4 ( part_3 VARCHAR, class VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which part three is class 4?
SELECT part_3 FROM table_name_4 WHERE class = "4"
sql_create_context
CREATE TABLE table_29681 ( "Tournament" text, "Games played" real, "Points per game" text, "Rebounds per game" text, "Assists per game" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many assists per game did he have when he had 6.8 points per g...
SELECT "Assists per game" FROM table_29681 WHERE "Points per game" = '6.8'
wikisql
CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age int ) CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of t...
SELECT Country, COUNT(*) FROM people GROUP BY Country ORDER BY COUNT(*) DESC
nvbench
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jybgb JOIN jyjgzbb ON jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE jybgb.JZLSH = '06900614343' AND jyjgzbb.JCRXM LIKE '邹%'
css
CREATE TABLE table_30509 ( "Pick" real, "Player" text, "Position" text, "Nationality" text, "NHL team" text, "College/junior/club team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the person that plays left wing and is from canada that...
SELECT "Player" FROM table_30509 WHERE "Position" = 'Left Wing' AND "Nationality" = 'Canada' AND "NHL team" = 'St. Louis Blues'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
SELECT microlab.organism FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-44495')) AND microlab.culturesite = 'sputum, tracheal specimen' AND D...
eicu
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/CAPE VERDEAN" AND demographic.age < "27"
mimicsql_data
CREATE TABLE table_104858_1 ( country VARCHAR, year_current_scouting_organization_joined_wosm VARCHAR, year_member_organization_was_founded VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which countries have a scouting organization that was founded in 19...
SELECT country FROM table_104858_1 WHERE year_current_scouting_organization_joined_wosm = "1930" AND year_member_organization_was_founded = "1926"
sql_create_context
CREATE TABLE table_43342 ( "Year" real, "Title" text, "Label" text, "RIAA Sales Certification" text, "Billboard 200 Peak" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For how many years did the song 'Lost Without Your Love' win the gold RIAA Sales...
SELECT SUM("Year") FROM table_43342 WHERE "RIAA Sales Certification" = 'gold' AND "Title" = 'lost without your love' AND "Billboard 200 Peak" > '26'
wikisql
CREATE TABLE table_58938 ( "Player" text, "Height" real, "Position" text, "Year born (Age)" text, "Current Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's filiberto rivera's height?
SELECT COUNT("Height") FROM table_58938 WHERE "Player" = 'filiberto rivera'
wikisql
CREATE TABLE Organizations ( organization_id INTEGER, parent_organization_id INTEGER, organization_details VARCHAR(255) ) CREATE TABLE Customers ( customer_id INTEGER, customer_details VARCHAR(255) ) CREATE TABLE Services ( service_id INTEGER, organization_id INTEGER, service_type_code...
SELECT date_moved_in, COUNT(date_moved_in) FROM Customers AS T1 JOIN Customer_Events AS T2 ON T1.customer_id = T2.customer_id ORDER BY COUNT(date_moved_in) DESC
nvbench
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE vitalperiodic ( vitalperio...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = 'azithromycin 500 mg in ns 250 ml iv' AND STRFTIME('...
eicu
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_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '魏阳舒' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 6027.88)
css
CREATE TABLE table_12066 ( "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. -- In the game against Essendon at home, what did t...
SELECT "Away team score" FROM table_12066 WHERE "Home team" = 'essendon'
wikisql
CREATE TABLE table_name_53 ( sydney VARCHAR, gold_coast VARCHAR, melbourne VARCHAR, perth VARCHAR, adelaide VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the sydney with perth of no, adelaide of no with melbourne of yes and gold coast of ye...
SELECT sydney FROM table_name_53 WHERE perth = "no" AND adelaide = "no" AND melbourne = "yes" AND gold_coast = "yes"
sql_create_context
CREATE TABLE member_of_club ( stuid number, clubid number, position text ) CREATE TABLE club ( clubid number, clubname text, clubdesc text, clublocation text ) CREATE TABLE student ( stuid number, lname text, fname text, age number, sex text, major number, advis...
SELECT clublocation FROM club WHERE clubname = "Tennis Club"
spider
CREATE TABLE table_name_31 ( drawn VARCHAR, try_bonus VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the drawn that has 16 as the trys bonus?
SELECT drawn FROM table_name_31 WHERE try_bonus = "16"
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 SUM(t_kc24.MED_AMOUT) FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID IN (SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '6703357' AND gwyjzb.MED_ORG_DEPT_CD = '8237' UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.MED_SER_ORG_NO = '6703357' AND fgwyjzb.MED_ORG_DEPT_CD = '8237') AND t...
css
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJ...
css
CREATE TABLE table_name_5 ( opponents_in_final VARCHAR, score_in_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Opponents in Final during the match with a Score in Final of 6 4, 3 6, 5 7?
SELECT opponents_in_final FROM table_name_5 WHERE score_in_final = "6–4, 3–6, 5–7"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE T...
SELECT FIRST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY FIRST_NAME DESC
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 SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '何子美' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2000-11-27' AND '2017-03-05' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb...
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.ethnicity = "BLACK/HAITIAN" AND procedures.short_title = "Injection oxazolidinone"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2179.0" AND lab.label = "Eosinophils"
mimicsql_data
CREATE TABLE table_203_519 ( id number, "pos" number, "no" number, "driver" text, "team" text, "laps" number, "time/retired" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which driver has the least am...
SELECT "driver" FROM table_203_519 ORDER BY "points" LIMIT 1
squall
CREATE TABLE table_66865 ( "Player" text, "Years" text, "Goals" real, "Assists" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals does Mike Eruzione have in total?
SELECT "Goals" FROM table_66865 WHERE "Player" = 'mike eruzione'
wikisql
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 PROFESSOR ( EMP_NUM int, DEPT_CODE varchar(10), PROF_OFFICE varchar(50), PROF_EXTENSION varchar(4), PROF_HIG...
SELECT STU_FNAME, SUM(STU_GPA) FROM STUDENT WHERE STU_GPA < (SELECT AVG(STU_GPA) FROM STUDENT) GROUP BY STU_FNAME
nvbench
CREATE TABLE producer ( pid int, gender text, name text, nationality text, birth_city text, birth_year int ) CREATE TABLE genre ( gid int, genre text ) CREATE TABLE keyword ( id int, keyword text ) CREATE TABLE classification ( id int, msid int, gid int ) CREATE T...
SELECT director.name FROM company, copyright, directed_by, director, tv_series WHERE company.name = 'Netflix' AND copyright.cid = company.id AND director.did = directed_by.did AND tv_series.sid = copyright.msid AND tv_series.sid = directed_by.msid AND tv_series.title = 'House of Cards'
imdb
CREATE TABLE table_44505 ( "Date" text, "Time" text, "Score" text, "Set 1" text, "Set 2" text, "Set 3" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Set 2 has a Set 3 of 25 20, and a Time of 13:45?
SELECT "Set 2" FROM table_44505 WHERE "Set 3" = '25–20' AND "Time" = '13:45'
wikisql
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 d_icd_procedures ( row_id number, icd9_code text, s...
SELECT d_icd_diagnoses.short_title FROM d_icd_diagnoses WHERE d_icd_diagnoses.icd9_code IN (SELECT t4.icd9_code FROM (SELECT t3.icd9_code, DENSE_RANK() OVER (ORDER BY t3.c1 DESC) AS c2 FROM (SELECT t2.icd9_code, 100 - SUM(CASE WHEN patients.dod IS NULL THEN 1 WHEN STRFTIME('%j', patients.dod) - STRFTIME('%j', t2.chartt...
mimic_iii
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_CLINIC_ID, t_kc21.PERSON_ID, t_kc21.PERSON_NM, t_kc21.IDENTITY_CARD, t_kc21.PERSON_SEX, t_kc21.PERSON_AGE FROM t_kc21 JOIN t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '33088921636')
css
CREATE TABLE table_29547777_1 ( episode VARCHAR, original_performer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the episode when the original performaer is diana ross?
SELECT episode FROM table_29547777_1 WHERE original_performer = "Diana Ross"
sql_create_context
CREATE TABLE table_34445 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what team scored on december 19
SELECT "Record" FROM table_34445 WHERE "Date" = 'december 19'
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 table_name_21 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 2010 has a 2006 less than 6.9, a 2008 greater than 1.6, and 2 for 2007?
SELECT 2010 FROM table_name_21 WHERE 2006 < 6.9 AND 2008 > 1.6 AND 2007 = 2
sql_create_context
CREATE TABLE table_75159 ( "Region" real, "Group A" text, "Group B" text, "Group C" text, "Group D" text, "Group E" text, "Group F" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the group A region with a region number of 2?
SELECT "Group A" FROM table_75159 WHERE "Region" = '2'
wikisql
CREATE TABLE table_name_21 ( nationality VARCHAR, metric VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the nationality with the metric height of 2.36m named sun ming-ming?
SELECT nationality FROM table_name_21 WHERE metric = "2.36m" AND name = "sun ming-ming"
sql_create_context
CREATE TABLE table_13986 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What episode number in the series was 'facing the musi...
SELECT MIN("No. in series") FROM table_13986 WHERE "Title" = 'facing the music' AND "No. in season" > '6'
wikisql
CREATE TABLE table_69184 ( "Year" real, "Category" text, "Film" text, "Winner/Nominee(s)" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which category was Dev Patel nominated for?
SELECT "Category" FROM table_69184 WHERE "Winner/Nominee(s)" = 'dev patel'
wikisql
CREATE TABLE table_28232443_1 ( producer__s_ VARCHAR, song__s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many producers are responsible for the song 'calling out to marlboro?
SELECT COUNT(producer__s_) FROM table_28232443_1 WHERE song__s_ = "Calling Out to Marlboro"
sql_create_context
CREATE TABLE table_name_72 ( result VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Result has an Attendance of 60,705?
SELECT result FROM table_name_72 WHERE attendance = "60,705"
sql_create_context
CREATE TABLE table_75390 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Record of 15-12-4, and a Game larger than 31 involves what highest December?
SELECT MAX("December") FROM table_75390 WHERE "Record" = '15-12-4' AND "Game" > '31'
wikisql
CREATE TABLE table_dev_46 ( "id" int, "ogtt" int, "systolic_blood_pressure_sbp" int, "neuromuscular_disease" bool, "renal_disease" bool, "hepatic_disease" bool, "active_oncologic_disease" bool, "hematologic_disease" bool, "diastolic_blood_pressure_dbp" int, "muscular_disease" boo...
SELECT * FROM table_dev_46 WHERE igt = 1 OR (fasting_glucose > 100 OR fasting_glucose < 126) OR (ogtt > 140 AND ogtt < 200)
criteria2sql
CREATE TABLE table_44859 ( "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. -- What is Norikazu Murakami's total?
SELECT "Total" FROM table_44859 WHERE "Name" = 'norikazu murakami'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodi...
SELECT COUNT(*) > 0 FROM patient WHERE patient.uniquepid = '033-3992' AND STRFTIME('%y', patient.hospitaladmittime) = '2105'
eicu
CREATE TABLE table_20887 ( "Episode #" text, "Original airdate (UK)" text, "Episode title" text, "Doctor Who episode" text, "Webcast link" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the episode number for the episode 'a new dimension'?
SELECT "Episode #" FROM table_20887 WHERE "Episode title" = 'A New Dimension'
wikisql
CREATE TABLE table_31256 ( "Rank by average" real, "Place" real, "Couple" text, "Total points" text, "Number of dances" real, "Average" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the average when the place is 16?
SELECT "Average" FROM table_31256 WHERE "Place" = '16'
wikisql
CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE flight ( aircraft_code_sequence text, air...
SELECT DISTINCT fare.fare_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, fare_basis, flight, flight_fare WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND...
atis
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.days_stay > "26" AND diagnoses.short_title = "Obstructive sleep apnea"
mimicsql_data
CREATE TABLE table_name_74 ( grid VARCHAR, constructor VARCHAR, driver VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which grid is constructed by Maserati and driven by Oscar Alfredo G lvez?
SELECT grid FROM table_name_74 WHERE constructor = "maserati" AND driver = "oscar alfredo gálvez"
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "COLANGITIS" AND demographic.dod_year <= "2180.0"
mimicsql_data
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "89" AND demographic.days_stay > "1"
mimicsql_data
CREATE TABLE table_name_31 ( year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who won the 250cc in 1927?
SELECT 250 AS _cc FROM table_name_31 WHERE year = "1927"
sql_create_context
CREATE TABLE table_63044 ( "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 for Silver medals that have more than 17 Golds?
SELECT AVG("Silver") FROM table_63044 WHERE "Gold" > '17'
wikisql
CREATE TABLE table_204_389 ( id number, "rnd." number, "pick #" number, "nfl team" text, "player" text, "pos." text, "college" text, "conf." text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the number of qb 's se...
SELECT COUNT(*) FROM table_204_389 WHERE "pos." = 'qb' AND "rnd." = 1
squall
CREATE TABLE table_name_65 ( bronze INTEGER, silver INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which country has the highest bronze amount and a silver amount bigger than 41?
SELECT MAX(bronze) FROM table_name_65 WHERE silver > 41
sql_create_context
CREATE TABLE table_20682 ( "!Simple Present/Future" text, "Probable Future" text, "Simple Past" text, "Past Habitual" text, "Injunctive" text, "Imperative" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the imperative for garis 'you did
SELECT "Imperative" FROM table_20682 WHERE "Past Habitual" = 'गरिस् garis ''you did'
wikisql
CREATE TABLE table_47461 ( "Date" real, "Tracks" text, "Length" text, "Label" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tracks of the release in Catalog BA 222304 with a Length of 2:57?
SELECT "Tracks" FROM table_47461 WHERE "Catalog" = 'ba 222304' AND "Length" = '2:57'
wikisql
CREATE TABLE table_16139 ( "Sepal length" text, "Sepal width" text, "Petal length" text, "Petal width" text, "Species" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the sepal lengh when sepal width is 2.9 and petal width 1.3
SELECT "Sepal length" FROM table_16139 WHERE "Sepal width" = '2.9' AND "Petal width" = '1.3'
wikisql
CREATE TABLE ndecoreexcel_math_grade8 ( year number, state text, all_students text, average_scale_score number ) CREATE TABLE finrev_fed_17 ( state_code number, idcensus number, school_district text, nces_id text, yr_data number, t_fed_rev number, c14 number, c25 number ...
SELECT COUNT(*) FROM finrev_fed_17 WHERE school_district LIKE "%Wisconsin%"
studentmathscore
CREATE TABLE table_12931 ( "Age group" text, "Individual Fare" text, "10 Trip Pass" text, "20 Trip Pass" text, "Monthly Pass" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Age group has a 10 Trip Pass of $19.00, and a Monthly Pass of $62.00?
SELECT "Age group" FROM table_12931 WHERE "10 Trip Pass" = '$19.00' AND "Monthly Pass" = '$62.00'
wikisql
CREATE TABLE fgwyjzb ( 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 SUM(t_kc22.AMOUNT) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '周兰若' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-11-15' AND '2020-06-07' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb...
css
CREATE TABLE bdmzjzjlb ( 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 wdmzjzjlb.YLJGDM 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 = '65424109' UNION SELECT bdmzjzjlb.YLJGDM FROM hz_info JOIN bdmzjzjlb ON hz_info.YLJGDM = bdmzjzjlb.YLJGDM AND hz_info.KH = bdmzjzjlb.KH AND hz_info....
css
CREATE TABLE table_name_46 ( opponent VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent at the Steelers game that had a result of l 20 17?
SELECT opponent FROM table_name_46 WHERE result = "l 20–17"
sql_create_context
CREATE TABLE table_29701419_2 ( total_appearances INTEGER, total_goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total appearances when the total goals is 289?
SELECT MIN(total_appearances) FROM table_29701419_2 WHERE total_goals = 289
sql_create_context
CREATE TABLE table_45930 ( "Season" text, "North" text, "South" text, "East" text, "West" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which season had EV Bad W rishofen in the West?
SELECT "Season" FROM table_45930 WHERE "West" = 'ev bad wörishofen'
wikisql
CREATE TABLE table_name_32 ( athlete VARCHAR, venue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which athlete played at the Birmingham venue?
SELECT athlete FROM table_name_32 WHERE venue = "birmingham"
sql_create_context
CREATE TABLE table_204_983 ( id number, "year" number, "1st venue" text, "2nd venue" text, "3rd venue" text, "4th venue" text, "5th venue" text, "6th venue" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the only year that mexic...
SELECT "year" FROM table_204_983 WHERE "2nd venue" = 'mexico city'
squall
CREATE TABLE table_name_20 ( taijijian INTEGER, taijiquan VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest taijijian with a 9.87 taijiquan and a total less than 19.77?
SELECT MAX(taijijian) FROM table_name_20 WHERE taijiquan = 9.87 AND total < 19.77
sql_create_context
CREATE TABLE Apartments ( apt_id INTEGER, building_id INTEGER, apt_type_code CHAR(15), apt_number CHAR(10), bathroom_count INTEGER, bedroom_count INTEGER, room_count CHAR(5) ) CREATE TABLE Apartment_Facilities ( apt_id INTEGER, facility_code CHAR(15) ) CREATE TABLE Apartment_Buildi...
SELECT date_of_birth, COUNT(date_of_birth) FROM Guests WHERE gender_code = "Male"
nvbench
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_gradu...
SELECT DISTINCT name, number FROM course WHERE department = 'JUDAIC' AND credits = 16
advising
CREATE TABLE flight_stop ( flight_id int, stop_number int, stop_days text, stop_airport text, arrival_time int, arrival_airline text, arrival_flight_number int, departure_time int, departure_airline text, departure_flight_number int, stop_time int ) CREATE TABLE flight_fare ...
SELECT DISTINCT fare.fare_id, flight.airline_code, flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, fare, flight, flight_fare WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND CITY_1.city_code = AIRP...
atis
CREATE TABLE table_2714 ( "Edition" text, "Round" text, "Date" text, "Partnering" text, "Against" text, "Surface" text, "Opponents" text, "W/L" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the round for john van...
SELECT "Round" FROM table_2714 WHERE "Opponents" = 'John Van Lottum Martin Verkerk'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREAT...
SELECT DISTINCT FLIGHT_0.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight AS FLIGHT_0, flight AS FLIGHT_1, flight AS FLIGHT_2, flight_leg AS FLIGHT_LEG_0, flight_leg AS FLIGHT_LEG_1, fl...
atis
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 COUNT(qtb.PERSON_ID) FROM qtb WHERE qtb.IN_DIAG_DIS_CD = 'B81.078' UNION SELECT COUNT(gyb.PERSON_ID) FROM gyb WHERE gyb.IN_DIAG_DIS_CD = 'B81.078' UNION SELECT COUNT(zyb.PERSON_ID) FROM zyb WHERE zyb.IN_DIAG_DIS_CD = 'B81.078' UNION SELECT COUNT(mzb.PERSON_ID) FROM mzb WHERE mzb.IN_DIAG_DIS_CD = 'B81.078'
css
CREATE TABLE table_23028629_2 ( frequency VARCHAR, model_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many frequencies have a model number of core i5-655k?
SELECT COUNT(frequency) FROM table_23028629_2 WHERE model_number = "Core i5-655K"
sql_create_context
CREATE TABLE table_26808178_3 ( original_air_date VARCHAR, us_viewers__millions_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which original air date had 0.871 U.S. viewers (millions)?
SELECT original_air_date FROM table_26808178_3 WHERE us_viewers__millions_ = "0.871"
sql_create_context
CREATE TABLE table_58526 ( "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 crowd attendance when the home team...
SELECT COUNT("Crowd") FROM table_58526 WHERE "Home team" = 'melbourne'
wikisql
CREATE TABLE table_1463332_2 ( _number_runner_up INTEGER, years__won_in_bold_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of runner-up results for the years (won in bold) 1984, 2010?
SELECT MAX(_number_runner_up) FROM table_1463332_2 WHERE years__won_in_bold_ = "1984, 2010"
sql_create_context
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ tim...
SELECT * 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 = '37982575' AND hz_info.YLJGDM = '3085666' AND mzjzjlb.JZZDSM LIKE '%龈炎%'
css
CREATE TABLE table_8975 ( "Game" real, "December" real, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score when the opponent was Montreal Canadiens?
SELECT "Score" FROM table_8975 WHERE "Opponent" = 'montreal canadiens'
wikisql
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', lab.labresulttime)) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-34744' AND patient.hospi...
eicu
CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course_tags_count ( course_id int, clear_grading int, pop_quiz int, group_projects int, inspirational int...
SELECT DISTINCT instructor.name FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.department = 'SWC' AND course.number = 105 AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.offering_id = course_offering.of...
advising