instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_29 ( away_team VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Away team at the game with a Score of 4 2?
SELECT away_team FROM table_name_29 WHERE score = "4 – 2"
sql_create_context
CREATE TABLE table_55674 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the fewest Laps for Huub Rothengatter and grid less than 24
SELECT MIN("Laps") FROM table_55674 WHERE "Driver" = 'huub rothengatter' AND "Grid" < '24'
wikisql
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, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '19033476084' AND NOT SOC_SRT_DIRE_NM LIKE '%奈德%'
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.UNIVALENT FROM t_kc22 WHERE t_kc22.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '54049149' AND t_kc22.t_kc21_MED_SER_ORG_NO = '1343392') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1
css
CREATE TABLE table_name_40 ( robbery INTEGER, crime_index_total VARCHAR, aggravated_assault VARCHAR, non_violent_crime VARCHAR, rape VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which average Robbery has the following criteria: Non-Violent crim...
SELECT AVG(robbery) FROM table_name_40 WHERE non_violent_crime < 1147 AND rape < 11 AND aggravated_assault > 167 AND crime_index_total = 1313
sql_create_context
CREATE TABLE table_name_3 ( ties VARCHAR, lost VARCHAR, win__percentage VARCHAR, tenure VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- I want the total number of ties for win % more than 0 and tenure of 2001-2011 with lost more than 16
SELECT COUNT(ties) FROM table_name_3 WHERE win__percentage > 0 AND tenure = "2001-2011" AND lost > 16
sql_create_context
CREATE TABLE table_name_24 ( country VARCHAR, place VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Country, when Place is 'T3', and when Score is '67-70=137'?
SELECT country FROM table_name_24 WHERE place = "t3" AND score = 67 - 70 = 137
sql_create_context
CREATE TABLE table_43710 ( "Call sign" text, "Frequency MHz" real, "City of license" text, "ERP W" real, "FCC info" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is FCC info when ERP W is larger than 92 and call sign has k264ba?
SELECT "FCC info" FROM table_43710 WHERE "ERP W" > '92' AND "Call sign" = 'k264ba'
wikisql
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number,...
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...
sede
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ...
SELECT Id FROM Posts
sede
CREATE TABLE table_72407 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the incumbent from 1941?
SELECT "Incumbent" FROM table_72407 WHERE "First elected" = '1941'
wikisql
CREATE TABLE table_name_81 ( floor_exercise INTEGER, pommel_horse VARCHAR, horizontal_bar VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the floor exercise score with a pommel horse score of 9.65 and horizontal bar score more than 9.475?
SELECT MAX(floor_exercise) FROM table_name_81 WHERE pommel_horse = 9.65 AND horizontal_bar > 9.475
sql_create_context
CREATE TABLE document_functional_areas ( document_code text, functional_area_code text ) CREATE TABLE images ( image_id number, image_alt_text text, image_name text, image_url text ) CREATE TABLE roles ( role_code text, role_description text ) CREATE TABLE documents ( document_cod...
SELECT COUNT(*) FROM users WHERE user_login = 1
spider
CREATE TABLE table_train_165 ( "id" int, "gender" string, "hemoglobin_a1c_hba1c" float, "visual_impairment" bool, "blood_glucose" int, "body_mass_index_bmi" float, "a1c" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT * FROM table_train_165 WHERE blood_glucose > 150 AND a1c > 7.5
criteria2sql
CREATE TABLE table_40900 ( "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 rank has 1 silver, more than 2 gold, and a total larger than 3?
SELECT COUNT("Rank") FROM table_40900 WHERE "Silver" = '1' AND "Total" > '3' AND "Gold" > '2'
wikisql
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) 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), CO...
SELECT JOB_ID, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' GROUP BY JOB_ID ORDER BY JOB_ID DESC
nvbench
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE employees ( EMPLOYE...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(EMPLOYEE_ID)
nvbench
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TAB...
SELECT STRFTIME('%j', patient.unitdischargetime) - STRFTIME('%j', patient.unitadmittime) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '025-50079') AND NOT patient.unitadmittime IS NULL ORDER BY patient.unitadmittime LIMIT 1
eicu
CREATE TABLE table_35905 ( "Date" text, "Tournament" text, "Winning score" text, "Margin of victory" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what Date was Judy Rankin Runner(s)-up?
SELECT "Date" FROM table_35905 WHERE "Runner(s)-up" = 'judy rankin'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.person_info_XM = '水天干' AND hz_info.YLJGDM = '7539997' AND zyjzjlb.JZKSMC LIKE '%耳鼻喉科%'
css
CREATE TABLE table_63244 ( "Country/Territory" text, "Established" real, "Degree" text, "Regional/Offshore" text, "IMED/Avicenna Listed" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average year that the medical school in dominican rep...
SELECT AVG("Established") FROM table_63244 WHERE "Country/Territory" = 'dominican republic'
wikisql
CREATE TABLE table_68545 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponents have a record of 90-70?
SELECT "Opponent" FROM table_68545 WHERE "Record" = '90-70'
wikisql
CREATE TABLE table_name_99 ( owner VARCHAR, post_position VARCHAR, jockey VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who owns the horse with a post position of less than 4 with jockey todd pletcher?
SELECT owner FROM table_name_99 WHERE post_position < 4 AND jockey = "todd pletcher"
sql_create_context
CREATE TABLE staff_department_assignments ( staff_id number, department_id number, date_assigned_from time, job_title_code text, date_assigned_to time ) CREATE TABLE staff ( staff_id number, staff_gender text, staff_name text ) CREATE TABLE department_stores ( dept_store_id number,...
SELECT product_name FROM products WHERE product_type_code = 'Hardware' ORDER BY product_price DESC LIMIT 1
spider
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 ORDER BY T1.Code
nvbench
CREATE TABLE Ref_Transaction_Types ( transaction_type_code VARCHAR(10), transaction_type_description VARCHAR(80) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_transaction DATETIME, amount_of_transaction DECIMAL(19,4), ...
SELECT Investor_details, COUNT(Investor_details) FROM Investors GROUP BY Investor_details ORDER BY Investor_details
nvbench
CREATE TABLE table_name_4 ( competition_finish INTEGER, average VARCHAR, number_of_dances VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the greatest competition finish with average more than 32.9 and number of dances more than 16
SELECT MAX(competition_finish) FROM table_name_4 WHERE average > 32.9 AND number_of_dances > 16
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "0" AND diagnoses.long_title = "Tobacco use disorder"
mimicsql_data
CREATE TABLE table_68862 ( "Episode No." real, "Airdate" text, "Total Viewers" real, "Share" text, "BBC One Weekly Ranking" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the average total viewers that has 17.6% Share?
SELECT AVG("Total Viewers") FROM table_68862 WHERE "Share" = '17.6%'
wikisql
CREATE TABLE trip ( id number, duration number, start_date text, start_station_name text, start_station_id number, end_date text, end_station_name text, end_station_id number, bike_id number, subscription_type text, zip_code number ) CREATE TABLE status ( station_id numb...
SELECT id FROM trip WHERE duration >= (SELECT AVG(duration) FROM trip WHERE zip_code = 94103)
spider
CREATE TABLE table_12996 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the maximum week that 69,372 people attended the game?
SELECT MAX("Week") FROM table_12996 WHERE "Attendance" = '69,372'
wikisql
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT COUNT(*) > 0 FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-77687')) AND intakeoutput.cellpath LIKE '%output%' AND intakeoutpu...
eicu
CREATE TABLE table_29068 ( "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. -- What were the results in the bryant-de...
SELECT "Result" FROM table_29068 WHERE "Site" = 'Bryant-Denny Stadium • Tuscaloosa, AL'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) C...
SELECT prescriptions.formulary_drug_cd FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Jerry Deberry"
mimicsql_data
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 zyjzjlb.JZLSH FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '秦傲雪' AND NOT zyjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2014-09-06')
css
CREATE TABLE table_name_56 ( det_pre_amp VARCHAR, _number_tubes VARCHAR, rectifier VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the det/pre-amp with # tubes of 4 and rectifier of x
SELECT det_pre_amp FROM table_name_56 WHERE _number_tubes = "4" AND rectifier = "x"
sql_create_context
CREATE TABLE table_79828 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the goal conceded that had a los...
SELECT MAX("Goals Conceded") FROM table_79828 WHERE "Lost" > '8' AND "Points" > '17'
wikisql
CREATE TABLE table_45991 ( "Team 1" text, "Agg." text, "Team 2" text, "1st leg" text, "2nd leg" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Team 2 has a Team 1 of vardar?
SELECT "Team 2" FROM table_45991 WHERE "Team 1" = 'vardar'
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.drug_type, prescriptions.drug_dose FROM prescriptions WHERE prescriptions.subject_id = "65652"
mimicsql_data
CREATE TABLE diagnoses ( 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 ) C...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.age < "36" AND lab."CATEGORY" = "Hematology"
mimicsql_data
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 zyjzjlb.ZYBMLX, zyjzjlb.ZYZDBM, zyjzjlb.ZYZDMC FROM zyjzjlb WHERE zyjzjlb.JZLSH = '46834040128'
css
CREATE TABLE table_70114 ( "City of license" text, "Identifier" text, "Frequency" text, "Power" text, "Class" text, "RECNet" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the city of license when the class is LP and the identifier is CB...
SELECT "City of license" FROM table_70114 WHERE "Class" = 'lp' AND "Identifier" = 'cbdk'
wikisql
CREATE TABLE table_name_79 ( set_3 VARCHAR, set_4 VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Set 3, when Set 4 is 25-21, and when Date is Jun 14?
SELECT set_3 FROM table_name_79 WHERE set_4 = "25-21" AND date = "jun 14"
sql_create_context
CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), personal_name VARCHAR(80), middle_name VARCHAR(80), family_name VARCHAR(80), gender_mf VARCHAR(1), address_line_1 VARCHAR(80) ) CREATE TABLE Student...
SELECT family_name, author_id FROM Course_Authors_and_Tutors ORDER BY personal_name
nvbench
CREATE TABLE table_33820 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the game with a loss of White (4-5)?
SELECT "Date" FROM table_33820 WHERE "Loss" = 'white (4-5)'
wikisql
CREATE TABLE table_75013 ( "Vol. #" real, "Title" text, "Material collected" text, "Publication date" text, "ISBN" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the Lowest Volume Number that was published November 2004?
SELECT MIN("Vol. #") FROM table_75013 WHERE "Publication date" = 'november 2004'
wikisql
CREATE TABLE department_stores ( dept_store_id number, dept_store_chain_id number, store_name text, store_address text, store_phone text, store_email text ) CREATE TABLE products ( product_id number, product_type_code text, product_name text, product_price number ) CREATE TABLE...
SELECT product_type_code, AVG(product_price) FROM products GROUP BY product_type_code
spider
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE...
SELECT Nationality, SUM(ID) FROM swimmer GROUP BY Nationality ORDER BY Nationality
nvbench
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Road, Team_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road ORDER BY ACC_Road DESC
nvbench
CREATE TABLE table_8935 ( "Name" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a gain of 1,380, what is the highest Avg/G?
SELECT MAX("Avg/G") FROM table_8935 WHERE "Gain" = '1,380'
wikisql
CREATE TABLE table_name_59 ( nickname VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the nickname of the team in the Geelong West Cricket & Football Club?
SELECT nickname FROM table_name_59 WHERE club = "geelong west cricket & football club"
sql_create_context
CREATE TABLE table_name_2 ( release_date VARCHAR, developer_s_ VARCHAR, type VARCHAR, genre VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When did Riot Games release their 3D MOBA game?
SELECT release_date FROM table_name_2 WHERE type = "3d" AND genre = "moba" AND developer_s_ = "riot games"
sql_create_context
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostFeedback ( Id number, PostId numb...
SELECT UpVotes, DownVotes, ROUND((CAST(DownVotes AS FLOAT) / (DownVotes + UpVotes)) * 100, 2) AS "DownVote %" FROM Users WHERE Id = @UserId
sede
CREATE TABLE table_63210 ( "Game" real, "Date" text, "Opponent" 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. -- Wh...
SELECT "Game" FROM table_63210 WHERE "High rebounds" = 'jones (10)'
wikisql
CREATE TABLE table_dev_48 ( "id" int, "gender" string, "systolic_blood_pressure_sbp" int, "hiv_infection" bool, "body_weight" float, "diabetic" string, "active_hepatitis" bool, "diastolic_blood_pressure_dbp" int, "liver_disease" bool, "high_density_lipoprotein_cholesterol_hdl_c" ...
SELECT * FROM table_dev_48 WHERE hypertension = 1 OR systolic_blood_pressure_sbp > 160 OR diastolic_blood_pressure_dbp > 95
criteria2sql
CREATE TABLE table_16494599_5 ( no INTEGER, years_for_grizzlies VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the highest player number from the list from 2000-2001
SELECT MAX(no) FROM table_16494599_5 WHERE years_for_grizzlies = "2000-2001"
sql_create_context
CREATE TABLE Museums ( Museum_ID INTEGER, Museum_Details VARCHAR(255) ) CREATE TABLE Royal_Family ( Royal_Family_ID INTEGER, Royal_Family_Details VARCHAR(255) ) CREATE TABLE Features ( Feature_ID INTEGER, Feature_Details VARCHAR(255) ) CREATE TABLE Visits ( Visit_ID INTEGER, Tourist_A...
SELECT Name, COUNT(*) FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID ORDER BY Name
nvbench
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "56" AND prescriptions.drug = "Benztropine Mesylate"
mimicsql_data
CREATE TABLE region ( region_id number, region_code text, region_name text ) CREATE TABLE storm ( storm_id number, name text, dates_active text, max_speed number, damage_millions_usd number, number_deaths number ) CREATE TABLE affected_region ( region_id number, storm_id nu...
SELECT COUNT(*) FROM storm WHERE number_deaths > 0
spider
CREATE TABLE table_25732 ( "Rank" real, "Team" text, "Total Points" real, "2008-09 Points" real, "2007-08 Points" real, "2006-07 Points" real, "2005-06 Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the total points is 5, what is ...
SELECT COUNT("2005-06 Points") FROM table_25732 WHERE "Total Points" = '5'
wikisql
CREATE TABLE table_name_36 ( hr_no VARCHAR, lms_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the HR number when the LMS number is 14758?
SELECT hr_no FROM table_name_36 WHERE lms_no = 14758
sql_create_context
CREATE TABLE table_2012 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the frequency 102.3mhz and 5kw power?
SELECT "Location" FROM table_2012 WHERE "Power (kW)" = '5kW' AND "Frequency" = '102.3MHz'
wikisql
CREATE TABLE table_name_4 ( top_speed VARCHAR, model VARCHAR, power VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the top speed of the SLK200K that produces 122kw (163hp)?
SELECT top_speed FROM table_name_4 WHERE model = "slk200k" AND power = "122kw (163hp)"
sql_create_context
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( ...
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 = 'therapeutic antibacterials - fourth generati...
eicu
CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0), FIRST_NAME varchar(20), ...
SELECT FIRST_NAME, COMMISSION_PCT 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 Courses ( course_id INTEGER, author_id INTEGER, subject_id INTEGER, course_name VARCHAR(120), course_description VARCHAR(255) ) CREATE TABLE Course_Authors_and_Tutors ( author_id INTEGER, author_tutor_ATB VARCHAR(3), login_name VARCHAR(40), password VARCHAR(40), per...
SELECT date_of_completion, COUNT(date_of_completion) FROM Student_Course_Enrolment AS T1 JOIN Student_Tests_Taken AS T2 ON T1.registration_id = T2.registration_id WHERE T2.test_result = "Fail" GROUP BY date_of_completion ORDER BY COUNT(date_of_completion)
nvbench
CREATE TABLE table_name_27 ( team VARCHAR, games VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the team with a Games listing of 7?
SELECT team FROM table_name_27 WHERE games = "7"
sql_create_context
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT jyjgzbb.CKZFWXX, jyjgzbb.CKZFWSX FROM mzjzjlb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jyjgzbb.jybgb_YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jyjgzbb.jybgb_JZLSH_MZJZJLB WHERE mzjzjlb.JZZDBM = 'M60.726' AND jyjgzbb.JCZBMC = 'D2聚体(柠檬酸盐)'
css
CREATE TABLE table_name_19 ( against INTEGER, wins VARCHAR, losses VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Against, when Wins is greater than 8, and when Losses is greater than 6?
SELECT SUM(against) FROM table_name_19 WHERE wins > 8 AND losses > 6
sql_create_context
CREATE TABLE table_name_61 ( constructor VARCHAR, laps VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the constructor that has 35 Laps with a grid more than 5
SELECT constructor FROM table_name_61 WHERE laps = 35 AND grid > 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 qtb.OUT_DIAG_DOC_CD, qtb.OUT_DIAG_DOC_NM FROM qtb WHERE qtb.PERSON_ID = '12012612' GROUP BY qtb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT gyb.OUT_DIAG_DOC_CD, gyb.OUT_DIAG_DOC_NM FROM gyb WHERE gyb.PERSON_ID = '12012612' GROUP BY gyb.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC UNION SELECT zyb.OUT_DIAG_DOC_...
css
CREATE TABLE table_77304 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result in a week lower than 10 with an opponent of Chicago Bears?
SELECT "Result" FROM table_77304 WHERE "Week" < '10' AND "Opponent" = 'chicago bears'
wikisql
CREATE TABLE table_17939 ( "Year" text, "Championship" text, "54 holes" text, "Winning score" text, "Margin" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score of the PGA Championship (3)?
SELECT "Winning score" FROM table_17939 WHERE "Championship" = 'PGA Championship (3)'
wikisql
CREATE TABLE table_2078 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "Average Speed (mph)" FROM table_2078 WHERE "Team" = 'Jon Thorne'
wikisql
CREATE TABLE table_name_59 ( console VARCHAR, arcade VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Console when Space Invaders is the Arcade?
SELECT console FROM table_name_59 WHERE arcade = "space invaders"
sql_create_context
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.age < "55" AND prescriptions.formulary_drug_cd = "SYR60ML"
mimicsql_data
CREATE TABLE table_20898602_1 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- howe many positions did wallace, mike mike wallace play for
SELECT COUNT(position) FROM table_20898602_1 WHERE player = "Wallace, Mike Mike Wallace"
sql_create_context
CREATE TABLE table_name_77 ( skip VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Skip has a Season of 2002 03?
SELECT skip FROM table_name_77 WHERE season = "2002–03"
sql_create_context
CREATE TABLE table_23621 ( "\u0410 \u0430 [a]" text, "\u0411 \u0431 [b]" text, "\u0412 \u0432 [v]" text, "\u0413 \u0433 [\u0261]" text, "\u0413\u044c \u0433\u044c [\u0261\u02b2]" text, "\u0413\u04d9 \u0433\u04d9 [\u0261\u02b7]" text, "\u0494 \u0495 [\u0281/\u0263]" text, "\u0494\u044c \u...
SELECT "\u0413 \u0433 [\u0261]" FROM table_23621 WHERE "\u0410 \u0430 [a]" = 'Ҕә ҕә [ʁʷ/ɣʷ]'
wikisql
CREATE TABLE table_17766232_7 ( radio_commentator VARCHAR, final_television_commentator VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the radio commentator when the final television commentator was John Dunn?
SELECT radio_commentator FROM table_17766232_7 WHERE final_television_commentator = "John Dunn"
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '91571030' AND t_kc22.STA_DATE BETWEEN '2000-01-26' AND '2000-08-16' AND t_kc21.MED_SER_ORG_NO = '2703962' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
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 t_kc24.t_kc21_MED_ORG_DEPT_NM, AVG(t_kc24.OVE_PAY) FROM t_kc24 WHERE t_kc24.t_kc21_MED_SER_ORG_NO = '8731863' GROUP BY t_kc24.t_kc21_MED_ORG_DEPT_NM
css
CREATE TABLE table_49492 ( "Year (Ceremony)" text, "Film title used in nomination" text, "Original title" text, "Director" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Year (Ceremony), when Director is 'Wang Siu-Di'?
SELECT "Year (Ceremony)" FROM table_49492 WHERE "Director" = 'wang siu-di'
wikisql
CREATE TABLE table_train_226 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "active_metabolic" bool, "diabetic" string, "hepatic_disease" bool, "gastrointestinal_disease" bool, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer ...
SELECT * FROM table_train_226 WHERE active_metabolic = 1 OR hepatic_disease = 1 OR gastrointestinal_disease = 1
criteria2sql
CREATE TABLE table_53598 ( "Athlete" text, "Sport" text, "Asian Games" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest number of bronze medals for nations with over 6...
SELECT MIN("Bronze") FROM table_53598 WHERE "Gold" = '2' AND "Total" > '6'
wikisql
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE stadium ( ID int, name text, Capacity int, City text, Country text, Opening_year int ) CREATE TABLE record ( ID int, Result text, Swimmer_ID int, Event_ID int ) CREATE TABLE swimme...
SELECT Time, meter_100 FROM swimmer ORDER BY meter_100
nvbench
CREATE TABLE Lots ( lot_id INTEGER, investor_id INTEGER, lot_details VARCHAR(255) ) CREATE TABLE Sales ( sales_transaction_id INTEGER, sales_details VARCHAR(255) ) CREATE TABLE Transactions ( transaction_id INTEGER, investor_id INTEGER, transaction_type_code VARCHAR(10), date_of_tr...
SELECT transaction_type_code, AVG(amount_of_transaction) FROM Transactions GROUP BY transaction_type_code
nvbench
CREATE TABLE table_204_145 ( id number, "representative" text, "state" text, "district(s)" text, "served" text, "party" text, "date of birth" text, "date of death" text, "age" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many d...
SELECT COUNT(*) FROM table_204_145 WHERE "party" = 'democratic'
squall
CREATE TABLE Premises ( premise_id INTEGER, premises_type VARCHAR(15), premise_details VARCHAR(255) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, premise_id INTEGER, date_address_from DATETIME, address_type_code VARCHAR(15), date_address_to DATETIME ) CREATE TABLE Products (...
SELECT premises_type, COUNT(*) FROM Premises GROUP BY premises_type
nvbench
CREATE TABLE transactions_lots ( lot_id VARCHAR ) CREATE TABLE Lots ( lot_details VARCHAR, lot_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the details of the lots which are not used in any transactions?
SELECT lot_details FROM Lots EXCEPT SELECT T1.lot_details FROM Lots AS T1 JOIN transactions_lots AS T2 ON T1.lot_id = T2.lot_id
sql_create_context
CREATE TABLE table_33663 ( "Team" text, "Outgoing manager" text, "Manner of departure" text, "Date of vacancy" text, "Replaced by" text, "Date of appointment" text, "Position in table" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tea...
SELECT "Team" FROM table_33663 WHERE "Replaced by" = 'gary megson'
wikisql
CREATE TABLE Customers ( customer_id INTEGER, customer_first_name VARCHAR(20), customer_last_name VARCHAR(20), customer_address VARCHAR(255), customer_phone VARCHAR(255), customer_email VARCHAR(255), other_customer_details VARCHAR(255) ) CREATE TABLE Financial_Transactions ( transaction...
SELECT card_id, customer_id FROM Customers_Cards
nvbench
CREATE TABLE table_name_61 ( candidate_name VARCHAR, list VARCHAR, gender VARCHAR, votes VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which candidate has more than 279 votes, rank less than 50, is and al-ahd?
SELECT candidate_name FROM table_name_61 WHERE votes > 279 AND rank < 50 AND gender = "♀" AND list = "al-ahd"
sql_create_context
CREATE TABLE table_13348 ( "Parameter" text, "Symbol" text, "Best fit (WMAP only)" text, "Best fit (WMAP, extra parameter)" text, "Best fit (all data)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the best fit (all data) when the parameter...
SELECT "Best fit (all data)" FROM table_13348 WHERE "Parameter" = 'fluctuation amplitude at 8h −1 mpc'
wikisql
CREATE TABLE table_name_57 ( school VARCHAR, city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school comes from Brookville?
SELECT school FROM table_name_57 WHERE city = "brookville"
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "DIVORCED" AND demographic.ethnicity = "WHITE"
mimicsql_data
CREATE TABLE table_name_5 ( position VARCHAR, season VARCHAR, nationality VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What position did the 2010-11 USA r player have?
SELECT position FROM table_name_5 WHERE nationality = "usa" AND team = "ír" AND season = "2010-11"
sql_create_context
CREATE TABLE table_70713 ( "Dance" text, "Best dancer(s)" text, "Best score" real, "Worst dancer(s)" text, "Worst score" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the worst dance of jive dancer(s)?
SELECT "Worst dancer(s)" FROM table_70713 WHERE "Dance" = 'jive'
wikisql
CREATE TABLE table_77190 ( "Model number" text, "Frequency" text, "L2 cache" text, "Mult." text, "Voltage" text, "Socket" text, "Release date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What model number uses standard voltage socket?
SELECT "Model number" FROM table_77190 WHERE "Socket" = 'standard voltage'
wikisql
CREATE TABLE All_Documents ( Document_ID INTEGER, Date_Stored DATETIME, Document_Type_Code CHAR(15), Document_Name CHAR(255), Document_Description CHAR(255), Other_Details VARCHAR(255) ) CREATE TABLE Document_Locations ( Document_ID INTEGER, Location_Code CHAR(15), Date_in_Location_...
SELECT Date_in_Location_From, COUNT(Date_in_Location_From) FROM Document_Locations GROUP BY Location_Code ORDER BY COUNT(Date_in_Location_From)
nvbench