instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE department ( dept_name varchar(20), building varchar(15), budget numeric(12,2) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2)...
SELECT year, COUNT(year) FROM course AS T1 JOIN section AS T2 ON T1.course_id = T2.course_id WHERE T1.dept_name = 'Psychology' ORDER BY year
nvbench
CREATE TABLE table_204_409 ( id number, "date" text, "race name" text, "location" text, "uci rating" number, "winner" text, "team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the winner of the first race on the tour ?
SELECT "winner" FROM table_204_409 WHERE id = 1
squall
CREATE TABLE table_65248 ( "Opposing Team" text, "Against" real, "Date" text, "Venue" text, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which the lowest Against has a Status of tour match, and a Venue of ravenhill , belfast?
SELECT MIN("Against") FROM table_65248 WHERE "Status" = 'tour match' AND "Venue" = 'ravenhill , belfast'
wikisql
CREATE TABLE table_13794 ( "Name" text, "Position" text, "League Apps" text, "League Goals" real, "FA Cup Apps" text, "FA Cup Goals" real, "League Cup Apps" text, "League Cup Goals" real, "Total Apps" text, "Total Goals" real ) -- Using valid SQLite, answer the following questi...
SELECT "Position" FROM table_13794 WHERE "Total Apps" = '5'
wikisql
CREATE TABLE table_name_94 ( outcome VARCHAR, partner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the outcome of the match when the partner is Nicole Arendt?
SELECT outcome FROM table_name_94 WHERE partner = "nicole arendt"
sql_create_context
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, ...
SELECT * FROM Votes WHERE (EXISTS(SELECT * FROM Posts WHERE ParentId = @QuestionId AND Id = PostId) OR PostId = @QuestionId) AND (VoteTypeId = 8 OR VoteTypeId = 9) ORDER BY CreationDate
sede
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '46237741' AND t_kc22.STA_DATE BETWEEN '2011-01-06' AND '2012-11-24' AND t_kc22.SOC_SRT_DIRE_NM = '北沙参颗粒'
css
CREATE TABLE gwyjzb ( 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 gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '80270684' AND gwyjzb.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT > 3516.12) UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '80270684' AND fgw...
css
CREATE TABLE table_25178 ( "Version" text, "Release date" text, "Distribution mechanism" text, "Features" text, "Security issues" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the distribution mechanism is windows nt 4.0 option pack Microsoft of...
SELECT "Version" FROM table_25178 WHERE "Features" = 'Service release' AND "Distribution mechanism" = 'Windows NT 4.0 Option Pack Microsoft Office 97'
wikisql
CREATE TABLE table_name_47 ( date VARCHAR, visiting_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the date with visiting team of philadelphia eagles
SELECT date FROM table_name_47 WHERE visiting_team = "philadelphia eagles"
sql_create_context
CREATE TABLE table_56826 ( "Chemical class" text, "Group" text, "Formula" text, "Prefix" text, "Suffix" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which item has the suffix containing thiocyanato- (-scn) as a prefix?
SELECT "Suffix" FROM table_56826 WHERE "Prefix" = 'thiocyanato- (-scn)'
wikisql
CREATE TABLE table_name_49 ( record VARCHAR, home VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Home of edmonton oilers, and a Score of 3 6?
SELECT record FROM table_name_49 WHERE home = "edmonton oilers" AND score = "3–6"
sql_create_context
CREATE TABLE table_39874 ( "Season" text, "Team" text, "Conf." text, "Conf. finish" text, "Div." text, "Div. Finish" text, "Awards" text, "Head coach" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the division in the western con...
SELECT "Div." FROM table_39874 WHERE "Conf." = 'western' AND "Div. Finish" = '2nd' AND "Head coach" = 'rick adelman'
wikisql
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE regions ( REGION_ID...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200)
nvbench
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperio...
SELECT patient.uniquepid FROM patient WHERE patient.patientunitstayid IN (SELECT diagnosis.patientunitstayid FROM diagnosis WHERE diagnosis.diagnosisname = 'hypercalcemia' AND DATETIME(diagnosis.diagnosistime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-0 year'))
eicu
CREATE TABLE table_203_512 ( id number, "release date" text, "album" text, "catalog number" text, "chart position" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the title of the last album ?
SELECT "album" FROM table_203_512 ORDER BY "release date" DESC LIMIT 1
squall
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, O...
SELECT Id AS "post_link", * FROM Posts ORDER BY ViewCount DESC LIMIT 10
sede
CREATE TABLE table_213088_1 ( location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp_...
SELECT location_chernobyl_1_chernobyl_2_chernobyl_3_chernobyl_4_chernobyl_5_ignalina_1_ignalina_2_ignalina_3_kursk_1_kursk_2_kursk_3_kursk_4_kursk_5_kursk_6_leningrad_1_leningrad_2_leningrad_3_leningrad_4_smolensk_1_smolensk_2_smolensk_3_smolensk_4_directorate_for_construction_of_kostoma_npp__for_kostroma_1_and_2__tabl...
sql_create_context
CREATE TABLE table_2834 ( "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. -- What is...
SELECT "Score" FROM table_2834 WHERE "Record" = '36-33'
wikisql
CREATE TABLE table_name_99 ( population VARCHAR, gdp_per_capita__us$_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the population of the nation that has a GDP per capita (US$) of 11,929?
SELECT population FROM table_name_99 WHERE gdp_per_capita__us$_ = "11,929"
sql_create_context
CREATE TABLE table_name_71 ( competition VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the competition in 1978?
SELECT competition FROM table_name_71 WHERE year = 1978
sql_create_context
CREATE TABLE table_27473 ( "Team" text, "Home city" text, "Home ground" text, "In Toppserien since" real, "First appearance" real, "Seasons" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home ground for the team whose home city is T...
SELECT "Home ground" FROM table_27473 WHERE "Seasons" = '27' AND "Home city" = 'Trondheim'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE food_service ( meal_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ORLANDO' AND date_day.day_number = 24 AND date_day.month_number = 5 AND d...
atis
CREATE TABLE table_3163 ( "Saddle cloth" real, "Horse" text, "Trainer" text, "Jockey" text, "Weight (kg)" text, "Barrier [b ]" real, "Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the placing when the weight in kg was 58.0...
SELECT "Placing" FROM table_3163 WHERE "Weight (kg)" = '58.0'
wikisql
CREATE TABLE table_10748727_1 ( races VARCHAR, season VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many races were in 2009 with 0 wins?
SELECT races FROM table_10748727_1 WHERE season = "2009" AND wins = 0
sql_create_context
CREATE TABLE table_name_44 ( area VARCHAR, decile VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what area is the decile value 10?
SELECT area FROM table_name_44 WHERE decile = 10
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.insurance = "Medicaid" AND procedures.long_title = "Endoscopic excision or destruction of lesion or tissue of stomach"
mimicsql_data
CREATE TABLE table_9001 ( "Rider" text, "Manufacturer" text, "Laps" text, "Time/Retired" text, "Grid" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the driver of the car that started in grid 14?
SELECT "Rider" FROM table_9001 WHERE "Grid" = '14'
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 JOB_ID, AVG(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID ORDER BY AVG(MANAGER_ID)
nvbench
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE TABLE time_inte...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'PHILADE...
atis
CREATE TABLE table_36364 ( "Year" real, "Location" text, "Gold" text, "Silver" text, "Bronze" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what year(s) did South Korea win silver?
SELECT "Year" FROM table_36364 WHERE "Silver" = 'south korea'
wikisql
CREATE TABLE table_name_69 ( position INTEGER, points VARCHAR, equipment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average position for a driver with less than 54 points and husaberg-bsu as equipment?
SELECT AVG(position) FROM table_name_69 WHERE points < 54 AND equipment = "husaberg-bsu"
sql_create_context
CREATE TABLE table_18522916_5 ( team VARCHAR, date_of_appointment VARCHAR, date_of_vacancy VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the team for 5 september 2008 for date of vacancy for 30 august 2008
SELECT team FROM table_18522916_5 WHERE date_of_appointment = "5 September 2008" AND date_of_vacancy = "30 August 2008"
sql_create_context
CREATE TABLE table_11222744_3 ( studio VARCHAR, catalog_number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who creates the catalog with the number 'cal03 / 0091037137333'?
SELECT studio FROM table_11222744_3 WHERE catalog_number = "CAL03 / 0091037137333"
sql_create_context
CREATE TABLE table_15187735_17 ( segment_a VARCHAR, segment_d VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many segments involve wood boring augers
SELECT segment_a FROM table_15187735_17 WHERE segment_d = "Wood Boring Augers"
sql_create_context
CREATE TABLE table_14871601_1 ( conceded INTEGER, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the smallest conceded value for the team 12 De Octubre?
SELECT MIN(conceded) FROM table_14871601_1 WHERE team = "12 de Octubre"
sql_create_context
CREATE TABLE table_55828 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Series" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game with Detroit as the visitor team?
SELECT "Date" FROM table_55828 WHERE "Visitor" = 'detroit'
wikisql
CREATE TABLE table_name_99 ( record VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a Date of december 17?
SELECT record FROM table_name_99 WHERE date = "december 17"
sql_create_context
CREATE TABLE table_23091 ( "Country" text, "Area km\u00b2" real, "Population" real, "Population density per km\u00b2" real, "HDI (2011)" text, "Capital" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What capital has a population of exactly 1339...
SELECT "Capital" FROM table_23091 WHERE "Population" = '1339724852'
wikisql
CREATE TABLE table_name_54 ( source VARCHAR, michael_signer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which polling source gave Michael Signer 5%?
SELECT source FROM table_name_54 WHERE michael_signer = "5%"
sql_create_context
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE patient ( uniquep...
SELECT patient.hospitaladmitsource FROM patient WHERE patient.uniquepid = '004-34394' AND STRFTIME('%y', patient.hospitaladmittime) = '2103' ORDER BY patient.hospitaladmittime DESC LIMIT 1
eicu
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT (SELECT vitalperiodic.heartrate FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-94096')) AND NOT vitalperiodic.heartrate IS N...
eicu
CREATE TABLE table_69226 ( "Pick" real, "Player" text, "Team" text, "Position" text, "School" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the highest pick for the player Adam Jones?
SELECT MAX("Pick") FROM table_69226 WHERE "Player" = 'adam jones'
wikisql
CREATE TABLE film ( Film_ID int, Title text, Studio text, Director text, Gross_in_dollar int ) CREATE TABLE market ( Market_ID int, Country text, Number_cities int ) CREATE TABLE film_market_estimation ( Estimation_ID int, Low_Estimate real, High_Estimate real, Film_ID ...
SELECT Title, COUNT(Title) FROM film AS T1 JOIN film_market_estimation AS T2 ON T1.Film_ID = T2.Film_ID GROUP BY Type, Title ORDER BY Title DESC
nvbench
CREATE TABLE table_name_24 ( name VARCHAR, height__cm_ VARCHAR, weight__kg_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which name's height in centimeters is 178 when its weight in kilograms is less than 91?
SELECT name FROM table_name_24 WHERE height__cm_ = 178 AND weight__kg_ < 91
sql_create_context
CREATE TABLE program ( Program_ID int, Name text, Origin text, Launch real, Owner text ) CREATE TABLE channel ( Channel_ID int, Name text, Owner text, Share_in_percent real, Rating_in_percent real ) CREATE TABLE broadcast ( Channel_ID int, Program_ID int, Time_of_da...
SELECT Owner, SUM(Rating_in_percent) FROM channel GROUP BY Owner ORDER BY Owner
nvbench
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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '68782989' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 4261.3)
css
CREATE TABLE table_18047346_5 ( tonnes VARCHAR, airport_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Louisville International Airport had how many tonnes of cargo in 2011?
SELECT tonnes FROM table_18047346_5 WHERE airport_name = "Louisville International Airport"
sql_create_context
CREATE TABLE table_46370 ( "Game" real, "Date" text, "Opponent" text, "Result" text, "Score" text, "Record" text, "Streak" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many games have a Result of l, and a Record ...
SELECT COUNT("Game") FROM table_46370 WHERE "Result" = 'l' AND "Record" = '2-6'
wikisql
CREATE TABLE gwyjzb ( 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_ID = '96318606' AND gwyjzb.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2010-04-26' AND '2020-09-06' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT SUM(t_kc22.AMOUNT) FROM fgwyjzb JOIN t_kc22 ON fg...
css
CREATE TABLE table_name_43 ( grid INTEGER, laps VARCHAR, manufacturer VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest grid for Aprilia vehicles, laps over 5, and a retirement finish?
SELECT MAX(grid) FROM table_name_43 WHERE manufacturer = "aprilia" AND time = "retirement" AND laps > 5
sql_create_context
CREATE TABLE table_name_65 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what place is Phil Mickelson?
SELECT place FROM table_name_65 WHERE player = "phil mickelson"
sql_create_context
CREATE TABLE table_63088 ( "Country" text, "Date" text, "Label" text, "Format" text, "Catalogue No." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the catalogue no when the format is cd (limited edition steel-box) and the country is germany...
SELECT "Catalogue No." FROM table_63088 WHERE "Format" = 'cd (limited edition steel-box)' AND "Country" = 'germany'
wikisql
CREATE TABLE table_name_88 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was the home team when Manchester City was the away team?
SELECT home_team FROM table_name_88 WHERE away_team = "manchester city"
sql_create_context
CREATE TABLE table_72956 ( "Name" text, "GP-GS" text, "Solo" real, "Ast" real, "Total" real, "TFL-Yds" text, "No-Yds" text, "BrUp" real, "QBH" real, "No.-Yds" text, "Avg" text, "TD" real, "Long" real, "Rcv-Yds" text, "FF" real, "Blkd Kick" real ) -- Usin...
SELECT COUNT("Solo") FROM table_72956 WHERE "Name" = 'Jake Flaherty'
wikisql
CREATE TABLE table_name_47 ( education VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For natives of St. Louis, Missouri, what was listed under education?
SELECT education FROM table_name_47 WHERE hometown = "st. louis, missouri"
sql_create_context
CREATE TABLE table_7333 ( "Census Year" real, "Number of Muslims '000" real, "Population of England and Wales '000" real, "Muslim (% of Total population)" real, "Registered Mosques" real, "Muslims per mosque" real ) -- Using valid SQLite, answer the following questions for the tables provided ...
SELECT COUNT("Registered Mosques") FROM table_7333 WHERE "Population of England and Wales '000" > '46,196' AND "Census Year" < '1971'
wikisql
CREATE TABLE table_name_87 ( score VARCHAR, place VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What score has 3 as the place?
SELECT score FROM table_name_87 WHERE place = "3"
sql_create_context
CREATE TABLE table_41556 ( "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 identifier that has 50,000 watts of power?
SELECT "Identifier" FROM table_41556 WHERE "Power" = '50,000 watts'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE microlab ( microlabid number, ...
SELECT MAX(vitalperiodic.sao2) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '027-203413')) AND NOT vitalperiodic.sao2 IS NULL AND DATE...
eicu
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE m...
SELECT labevents.charttime FROM labevents WHERE labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'sodium') AND labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 13054) AND STRFTIME('%y-%m', labevents.charttime) >= '2102-11' ORDER BY labev...
mimic_iii
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 HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history)
nvbench
CREATE TABLE table_name_54 ( opponent VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which opponent lost with pitcher Kinney (0-1)?
SELECT opponent FROM table_name_54 WHERE loss = "kinney (0-1)"
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 demographic.admission_location, demographic.diagnosis FROM demographic WHERE demographic.name = "Michelle Skidmore"
mimicsql_data
CREATE TABLE table_14342210_13 ( class VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entries are there for Class for the player Everett Sweeley?
SELECT COUNT(class) FROM table_14342210_13 WHERE player = "Everett Sweeley"
sql_create_context
CREATE TABLE table_51294 ( "Event" text, "2nd round" text, "Quarterfinal" text, "Semifinal" text, "Final" text, "Rank" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Semifinal has an Event of team?
SELECT "Semifinal" FROM table_51294 WHERE "Event" = 'team'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT AVG(vitalperiodic.heartrate) FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-90319')) AND NOT vitalperiodic.heartrate IS NULL...
eicu
CREATE TABLE table_name_58 ( record VARCHAR, december VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Record has a December smaller than 22 and a Score of 4 3?
SELECT record FROM table_name_58 WHERE december < 22 AND score = "4–3"
sql_create_context
CREATE TABLE table_38461 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team (League)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What school did Alexander Korobolin go to?
SELECT "College/Junior/Club Team (League)" FROM table_38461 WHERE "Player" = 'alexander korobolin'
wikisql
CREATE TABLE table_train_212 ( "id" int, "pregnancy_or_lactation" bool, "postmeal_c_peptide" float, "chemotherapy" bool, "liver_disease" bool, "alcohol_abuse" bool, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- alcohol abuse
SELECT * FROM table_train_212 WHERE alcohol_abuse = 1
criteria2sql
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 wdmzjzjlb.ZYBMLX, wdmzjzjlb.ZYZDBM, wdmzjzjlb.ZYZDMC FROM wdmzjzjlb WHERE wdmzjzjlb.JZLSH = '74531070187' UNION SELECT bdmzjzjlb.ZYBMLX, bdmzjzjlb.ZYZDBM, bdmzjzjlb.ZYZDMC FROM bdmzjzjlb WHERE bdmzjzjlb.JZLSH = '74531070187'
css
CREATE TABLE table_5496 ( "Rank" text, "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 sum of gold with a rank that is 3 and a silver larger than 7?
SELECT SUM("Gold") FROM table_5496 WHERE "Rank" = '3' AND "Silver" > '7'
wikisql
CREATE TABLE table_204_576 ( id number, "year" number, "best" text, "location" text, "date" text, "world rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the world rank of paris ?
SELECT "world rank" FROM table_204_576 WHERE "location" = 'paris'
squall
CREATE TABLE table_name_39 ( school VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which school has a Hometown of phoenix, az?
SELECT school FROM table_name_39 WHERE hometown = "phoenix, az"
sql_create_context
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 prescriptions.drug_type FROM prescriptions WHERE prescriptions.drug = "Timolol Maleate 0.5%"
mimicsql_data
CREATE TABLE table_train_190 ( "id" int, "gender" string, "pregnancy_or_lactation" bool, "diabetic" string, "acute_diabetic_complications" bool, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- pregnant
SELECT * FROM table_train_190 WHERE pregnancy_or_lactation = 1
criteria2sql
CREATE TABLE table_name_76 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the score on february 16?
SELECT score FROM table_name_76 WHERE date = "february 16"
sql_create_context
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 demographic.diagnosis, lab.itemid FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE table_name_76 ( year INTEGER, actor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the latest year that Cicely Tyson is the Golden Globe Award actor?
SELECT MAX(year) FROM table_name_76 WHERE actor = "cicely tyson"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) 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, ...
SELECT mzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN mzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE person_info.XM = '王向卉' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2021-05-03')
css
CREATE TABLE table_203_8 ( id number, "player" text, "rec." number, "yards" number, "avg." number, "td's" number, "long" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who had the most touchdowns : jerel myers or cecil moore ?
SELECT "player" FROM table_203_8 WHERE "player" IN ('jerel myers', 'cecil moore') ORDER BY "td's" DESC LIMIT 1
squall
CREATE TABLE table_69153 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text, "Points" text ) -- Using valid SQLite, answer the following questions f...
SELECT "Played" FROM table_69153 WHERE "Lost" = '2'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT COUNT(*) FROM zyjzjlb JOIN hz_info_zyjzjlb JOIN hz_info ON hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.YLJGDM = hz_info_zyjzjlb.YLJGDM AND hz_info_zyjzjlb.JZLSH = zyjzjlb.JZLSH AND hz_info_zyjzjlb.zyjzjlb_id = zyjzjlb.zyjzjlb_id AND hz_info_zyjzjlb.YLJGDM = hz_info.YLJGDM WHERE hz_info.YLJGDM = '14...
css
CREATE TABLE university ( School_ID int, School text, Location text, Founded real, Affiliation text, Enrollment real, Nickname text, Primary_conference text ) CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Per...
SELECT ACC_Road, AVG(School_ID) FROM basketball_match GROUP BY ACC_Road ORDER BY AVG(School_ID)
nvbench
CREATE TABLE table_name_84 ( metro_vincity VARCHAR, opened VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What metro vincity has the venue that opened in 1999?
SELECT metro_vincity FROM table_name_84 WHERE opened = "1999"
sql_create_context
CREATE TABLE table_201400_2 ( sanskrit VARCHAR, western_star_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the sanskrit of western star name arcturus
SELECT sanskrit FROM table_201400_2 WHERE western_star_name = "Arcturus"
sql_create_context
CREATE TABLE table_name_11 ( score VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Curtis Strange's Score?
SELECT score FROM table_name_11 WHERE player = "curtis strange"
sql_create_context
CREATE TABLE table_37062 ( "Driver" text, "Entries" real, "Points" real, "Average points per race entered" real, "Average pre-2010" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of entries driver Mark Webber, who has more...
SELECT AVG("Entries") FROM table_37062 WHERE "Driver" = 'mark webber' AND "Points" > '1014.5'
wikisql
CREATE TABLE table_71872 ( "Year" text, "xDSL" text, "Cable" text, "FTTx" text, "Other" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the other for a 78.2% xDSL?
SELECT "Other" FROM table_71872 WHERE "xDSL" = '78.2%'
wikisql
CREATE TABLE table_6710 ( "Date" text, "Opponent#" text, "Site" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the game that was attended by 16,000 people?
SELECT "Result" FROM table_6710 WHERE "Attendance" = '16,000'
wikisql
CREATE TABLE table_49853 ( "Date" text, "H/A/N" text, "Opponent" text, "Score" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the score 92-134?
SELECT "Date" FROM table_49853 WHERE "Score" = '92-134'
wikisql
CREATE TABLE table_471 ( "Year" text, "Champion" text, "Country" text, "Score" text, "Tournament location" text, "Purse ($)" real, "Winners share ($)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the year that Dewi Claire Schreefel...
SELECT "Year" FROM table_471 WHERE "Champion" = 'Dewi Claire Schreefel'
wikisql
CREATE TABLE table_27723228_12 ( high_rebounds VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the high rebounds for 81 game
SELECT high_rebounds FROM table_27723228_12 WHERE game = 81
sql_create_context
CREATE TABLE table_name_65 ( total INTEGER, bronze VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest total when bronze is less than 1 and gold more than 0?
SELECT MAX(total) FROM table_name_65 WHERE bronze < 1 AND gold > 0
sql_create_context
CREATE TABLE table_204_547 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which country came in last ?
SELECT "nationality" FROM table_204_547 ORDER BY "rank" DESC LIMIT 1
squall
CREATE TABLE table_name_72 ( Id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What 2011 has 2r as 2010, and a 2008 of A?
SELECT 2011 FROM table_name_72 WHERE 2010 = "2r" AND 2008 = "a"
sql_create_context
CREATE TABLE Behavior_Incident ( incident_type_code VARCHAR ) CREATE TABLE Ref_Incident_Type ( incident_type_description VARCHAR, incident_type_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the code and description of the most frequent be...
SELECT T1.incident_type_code, T2.incident_type_description FROM Behavior_Incident AS T1 JOIN Ref_Incident_Type AS T2 ON T1.incident_type_code = T2.incident_type_code GROUP BY T1.incident_type_code ORDER BY COUNT(*) DESC LIMIT 1
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 demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "7702"
mimicsql_data
CREATE TABLE table_20511 ( "Line" text, "Terminals" text, "Status" text, "Length" text, "Total number of stations" real, "Operator" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which operator runs the Mamariga shuttle line?
SELECT "Operator" FROM table_20511 WHERE "Line" = 'Mamariga Shuttle'
wikisql
CREATE TABLE table_name_43 ( wins INTEGER, benalla_dfl VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the most wins of Tatong?
SELECT MAX(wins) FROM table_name_43 WHERE benalla_dfl = "tatong"
sql_create_context