instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.age >= "31" AND demographic.admityear >= "2155"
mimicsql_data
CREATE TABLE table_name_33 ( tournament VARCHAR, winner_and_score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Tournament has a Winner and score of goran ivani evi 6 4, 6 2, 7 6(2)?
SELECT tournament FROM table_name_33 WHERE winner_and_score = "goran ivanišević 6–4, 6–2, 7–6(2)"
sql_create_context
CREATE TABLE table_27776266_1 ( title VARCHAR, production_code VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the title of the episode with a production code of 3x6404?
SELECT title FROM table_27776266_1 WHERE production_code = "3X6404"
sql_create_context
CREATE TABLE table_203_327 ( id number, "player" text, "country" text, "year(s) won" text, "r1" number, "r2" number, "total" number, "to par" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times did gene sarazen win ?
SELECT "year(s) won" FROM table_203_327 WHERE "player" = 'gene sarazen'
squall
CREATE TABLE table_203_239 ( id number, "year" number, "title" text, "chinese title" text, "role" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did lantern come out in 1994 or 1997 ?
SELECT "year" FROM table_203_239 WHERE "year" IN (1994, 1997) AND "title" = 'lantern'
squall
CREATE TABLE table_203_197 ( id number, "#" number, "title" text, "artist" text, "highest pos. reached" number, "weeks at no. 1" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who had the most weeks at number one , according to the table ?
SELECT "artist" FROM table_203_197 ORDER BY "weeks at no. 1" DESC LIMIT 1
squall
CREATE TABLE table_name_69 ( goals VARCHAR, club_apps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals did the player with 229 club apps have?
SELECT goals FROM table_name_69 WHERE club_apps = "229"
sql_create_context
CREATE TABLE Shipment_Items ( shipment_id INTEGER, order_item_id INTEGER ) CREATE TABLE Products ( product_id INTEGER, product_name VARCHAR(80), product_details VARCHAR(255) ) CREATE TABLE Order_Items ( order_item_id INTEGER, product_id INTEGER, order_id INTEGER, order_item_status ...
SELECT T2.order_status, COUNT(T2.order_status) FROM Customers AS T1 JOIN Orders AS T2 ON T1.customer_id = T2.customer_id WHERE T1.customer_name = "Jeramie" GROUP BY order_status
nvbench
CREATE TABLE table_name_20 ( label VARCHAR, format VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What label has cd single as the format?
SELECT label FROM table_name_20 WHERE format = "cd single"
sql_create_context
CREATE TABLE table_48176 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text, "Money ( $ )" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much money did Ben Crenshaw earn?
SELECT "Money ( $ )" FROM table_48176 WHERE "Player" = 'ben crenshaw'
wikisql
CREATE TABLE table_2503102_2 ( chassis VARCHAR, primary_sponsor VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What kind of chassis on the angie's list sponsored car?
SELECT chassis FROM table_2503102_2 WHERE primary_sponsor = "Angie's List"
sql_create_context
CREATE TABLE table_name_92 ( attendance VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the attendance with result of t 14-14
SELECT attendance FROM table_name_92 WHERE result = "t 14-14"
sql_create_context
CREATE TABLE table_16527640_3 ( vfl_games VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many VFL games were located off Goodenough Island Milne Bay?
SELECT vfl_games FROM table_16527640_3 WHERE location = "off Goodenough Island Milne Bay"
sql_create_context
CREATE TABLE table_1671401_2 ( poles VARCHAR, avg_finish VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the poles for avg finish is 26.8
SELECT poles FROM table_1671401_2 WHERE avg_finish = "26.8"
sql_create_context
CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt int ) CREATE TABLE city ( city_code varchar, city_name varchar, state_code varchar, country_name varchar, time_zone_code varchar ) CREATE TABLE flight ( aircraft_code_sequence text, airline_code v...
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 = 'LAS VEGAS' AND date_day.day_number = 27 AND date_day.month_number = 8 AN...
atis
CREATE TABLE table_name_5 ( city_of_license VARCHAR, frequency_mhz INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which city of license has a frequency less than 100.1?
SELECT city_of_license FROM table_name_5 WHERE frequency_mhz < 100.1
sql_create_context
CREATE TABLE table_69715 ( "Player" text, "Games" text, "Tries" text, "Goals" text, "F. Goals" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the F. Goals with tries of 0 0 and games of 05 5
SELECT "F. Goals" FROM table_69715 WHERE "Tries" = '0 0' AND "Games" = '05 5'
wikisql
CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREAT...
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006...
eicu
CREATE TABLE table_14662 ( "Player" text, "Height" real, "Position" text, "Year born" real, "Current Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was tony parker (guard) born?
SELECT MAX("Year born") FROM table_14662 WHERE "Position" = 'guard' AND "Player" = 'tony parker'
wikisql
CREATE TABLE table_40016 ( "Date" text, "Home captain" text, "Away captain" text, "Venue" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was Arthur Jones the away captain at Sydney Cricket Ground?
SELECT "Date" FROM table_40016 WHERE "Away captain" = 'arthur jones' AND "Venue" = 'sydney cricket ground'
wikisql
CREATE TABLE table_25818630_1 ( candidate VARCHAR, constituency VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every candidate for the Cardiff Central constituency?
SELECT candidate FROM table_25818630_1 WHERE constituency = "Cardiff Central"
sql_create_context
CREATE TABLE table_51701 ( "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the tournament for april 3, 2005
SELECT "Tournament" FROM table_51701 WHERE "Date" = 'april 3, 2005'
wikisql
CREATE TABLE table_name_99 ( total INTEGER, year_s__won INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Highest Total, when Year(s) Won is before 1959?
SELECT MAX(total) FROM table_name_99 WHERE year_s__won < 1959
sql_create_context
CREATE TABLE table_204_44 ( id number, "face value" number, "\u20ac0.01" number, "\u20ac0.02" number, "\u20ac0.05" number, "\u20ac0.10" number, "\u20ac0.20" number, "\u20ac0.50" number, "\u20ac1.00" number, "\u20ac2.00" number ) -- Using valid SQLite, answer the following quest...
SELECT "\u20ac0.01" FROM table_204_44 WHERE "face value" = 2010
squall
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 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 <= '2012-07-16')
css
CREATE TABLE Settlements ( Settlement_ID INTEGER, Claim_ID INTEGER, Effective_Date DATE, Settlement_Amount REAL ) CREATE TABLE Customers ( Customer_ID INTEGER, Customer_name VARCHAR(40) ) CREATE TABLE Claims ( Claim_ID INTEGER, FNOL_ID INTEGER, Effective_Date DATE ) CREATE TABLE F...
SELECT Date_Opened, COUNT(Date_Opened) FROM Customers AS t1 JOIN Customers_Policies AS t2 ON t1.Customer_ID = t2.Customer_ID WHERE t1.Customer_name LIKE "%Diana%" ORDER BY COUNT(Date_Opened) DESC
nvbench
CREATE TABLE table_21313327_1 ( no_in_series INTEGER, written_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the No in series when Rob wright & Debra j. Fisher & Erica Messer were the writers?
SELECT MIN(no_in_series) FROM table_21313327_1 WHERE written_by = "Rob Wright & Debra J. Fisher & Erica Messer"
sql_create_context
CREATE TABLE Order_Items ( Order_Item_ID INTEGER, Order_ID INTEGER, Product_ID INTEGER, Order_Quantity VARCHAR(288), Other_Item_Details VARCHAR(255) ) CREATE TABLE Bookings ( Booking_ID INTEGER, Customer_ID INTEGER, Workshop_Group_ID VARCHAR(100), Status_Code CHAR(15), Store_ID ...
SELECT Actual_Delivery_Date, COUNT(Actual_Delivery_Date) FROM Bookings
nvbench
CREATE TABLE table_11961582_10 ( high_rebounds VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had the high rebounds for the game on april 23?
SELECT high_rebounds FROM table_11961582_10 WHERE date = "April 23"
sql_create_context
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 OUT_DIAG_DOC_CD, OUT_DIAG_DOC_NM FROM t_kc21 WHERE PERSON_NM = '昌梦秋' AND IN_HOSP_DATE BETWEEN '2008-11-16' AND '2010-10-26' GROUP BY OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1
css
CREATE TABLE table_42880 ( "Name" text, "GP-GS" text, "Gain" real, "Loss" real, "Long" real, "Avg/G" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total gain for Brandon Mcrae with a loss less than 4, and an Avg/g less than -0.1?
SELECT COUNT("Gain") FROM table_42880 WHERE "Long" < '4' AND "Name" = 'brandon mcrae' AND "Avg/G" < '-0.1'
wikisql
CREATE TABLE table_2879165_1 ( television_station VARCHAR, radio_station VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many television station listing have a radio station as lao national radio?
SELECT COUNT(television_station) FROM table_2879165_1 WHERE radio_station = "Lao National Radio"
sql_create_context
CREATE TABLE flight_leg ( flight_id int, leg_number int, leg_flight int ) 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 TA...
SELECT DISTINCT flight_id FROM flight WHERE (((flight_days IN (SELECT DAYSalias0.days_code FROM days AS DAYSalias0 WHERE DAYSalias0.day_name IN (SELECT DATE_DAYalias0.day_name FROM date_day AS DATE_DAYalias0 WHERE DATE_DAYalias0.day_number = 23 AND DATE_DAYalias0.month_number = 4 AND DATE_DAYalias0.year = 1991)) AND fl...
atis
CREATE TABLE table_45866 ( "Game" real, "Date" text, "Opponent" text, "Score" text, "Location" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location of the game with a 115-105 score?
SELECT "Location" FROM table_45866 WHERE "Score" = '115-105'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int,...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program_course, semester WHERE course_offering.end_time <= '12:00:00' AND course.course_id = course_offering.course_id AND program_course.category LIKE '%ULCS%' AND program_course.course_id = course.course_id AND semester.semest...
advising
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE diagnoses.icd9_code = "34831"
mimicsql_data
CREATE TABLE teaches ( ID varchar(5), course_id varchar(8), sec_id varchar(8), semester varchar(6), year numeric(4,0) ) CREATE TABLE advisor ( s_ID varchar(5), i_ID varchar(5) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min...
SELECT title, COUNT(title) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY title ORDER BY title
nvbench
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 ( 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 INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.gender = "F" AND diagnoses.icd9_code = "6961"
mimicsql_data
CREATE TABLE table_62698 ( "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, "FLT Apps" text, "FLT Goals" real, "Total Apps" text, "Total Goals" real ) -- Usin...
SELECT "FA Cup Apps" FROM table_62698 WHERE "League Cup Goals" = '0' AND "Total Apps" = '43'
wikisql
CREATE TABLE table_name_16 ( date VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was a game played, which left the team with a record of 5-7?
SELECT date FROM table_name_16 WHERE record = "5-7"
sql_create_context
CREATE TABLE table_1139835_9 ( venue VARCHAR, runner_up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What other venue was a runner up to Hawthorn?
SELECT venue FROM table_1139835_9 WHERE runner_up = "Hawthorn"
sql_create_context
CREATE TABLE table_31216 ( "Skip (Club)" text, "W" real, "L" real, "PF" real, "PA" real, "Ends Won" real, "Ends Lost" real, "Blank Ends" real, "Stolen Ends" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total mumber of s...
SELECT COUNT("Skip (Club)") FROM table_31216 WHERE "PF" = '40'
wikisql
CREATE TABLE table_name_43 ( round INTEGER, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest round number that Ian Forbes was picked in the draft?
SELECT MIN(round) FROM table_name_43 WHERE player = "ian forbes"
sql_create_context
CREATE TABLE table_22297198_3 ( team VARCHAR, outgoing_manager VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many teams did Farhad Kazemi leave?
SELECT COUNT(team) FROM table_22297198_3 WHERE outgoing_manager = "Farhad Kazemi"
sql_create_context
CREATE TABLE track ( seating INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the minimum, maximum, and average seating for all tracks.
SELECT MIN(seating), MAX(seating), AVG(seating) FROM track
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM FROM t_kc22 WHERE MED_CLINIC_ID = '17223260426' GROUP BY SOC_SRT_DIRE_CD ORDER BY SUM(SELF_PAY_AMO) DESC LIMIT 1
css
CREATE TABLE table_38174 ( "Tournament" text, "2009" text, "2010" text, "2011" text, "2012" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament had a 2010 result of QF and a 2012 result of SF?
SELECT "Tournament" FROM table_38174 WHERE "2012" = 'sf' AND "2010" = 'qf'
wikisql
CREATE TABLE table_69247 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was their record when they lost with Lilly (0-1) pitching?
SELECT "Record" FROM table_69247 WHERE "Loss" = 'lilly (0-1)'
wikisql
CREATE TABLE table_34441 ( "Date" text, "Label" text, "Region" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Label is dated April 1986 in 7' single Format in France?
SELECT "Label" FROM table_34441 WHERE "Region" = 'france' AND "Format" = '7" single' AND "Date" = 'april 1986'
wikisql
CREATE TABLE table_31420 ( "Official name" text, "INE code" real, "Name in Spanish" text, "Name in Basque" text, "Population (2007)" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name in Basque of the municipality whose official name is...
SELECT "Name in Basque" FROM table_31420 WHERE "Official name" = 'Kuartango'
wikisql
CREATE TABLE table_name_73 ( year VARCHAR, award VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many years have an Award of venice film festival, and a Title of lust, caution?
SELECT COUNT(year) FROM table_name_73 WHERE award = "venice film festival" AND title = "lust, caution"
sql_create_context
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 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', intakeoutput.intakeoutputtime)) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid ...
eicu
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_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_NM = '卫祺祥' AND t_kc22.t_kc21_MED_SER_ORG_NO = '1070682') ORDER BY t_kc22.UNIVALENT DESC LIMIT 1
css
CREATE TABLE zyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '63491444' AND NOT qtb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 3235.03) UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '63491444' AND NOT gyb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_...
css
CREATE TABLE table_204_971 ( id number, "m" number, "date" text, "tournament" text, "round" text, "ground" text, "opponent" text, "score" text, "attendance" number, "dinamo scorers" text, "report" text ) -- Using valid SQLite, answer the following questions for the tables p...
SELECT SUM("attendance") FROM table_204_971 WHERE "date" = 3
squall
CREATE TABLE table_name_93 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score with a Date that is march 12?
SELECT score FROM table_name_93 WHERE date = "march 12"
sql_create_context
CREATE TABLE table_name_64 ( version VARCHAR, year VARCHAR, length VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Version before 2001 with a Length of 7:42?
SELECT version FROM table_name_64 WHERE year < 2001 AND length = "7:42"
sql_create_context
CREATE TABLE table_name_19 ( position VARCHAR, bike_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the aggregate number of Position that has a Bike No of 4?
SELECT COUNT(position) FROM table_name_19 WHERE bike_no = 4
sql_create_context
CREATE TABLE table_15621 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many lanes have a Nationality of united states, and a Name of aaron peirsol?
SELECT COUNT("Lane") FROM table_15621 WHERE "Nationality" = 'united states' AND "Name" = 'aaron peirsol'
wikisql
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 ReviewTaskTypes ( Id number, Name tex...
SELECT MIN(a.Id) AS "post_link", a.OwnerUserId AS "user_link", MAX(a.OwnerDisplayName), COUNT(*) AS COUNT FROM Posts AS q INNER JOIN Posts AS a ON q.Id = a.ParentId WHERE q.PostTypeId = 1 AND a.PostTypeId = 2 AND (q.ClosedDate IS NULL OR '##excludeclosed:int?1##' = 0) AND (q.CommunityOwnedDate IS NULL OR '##excludewiki...
sede
CREATE TABLE table_name_55 ( tournament VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the tournament that was on july 6, 1987?
SELECT tournament FROM table_name_55 WHERE date = "july 6, 1987"
sql_create_context
CREATE TABLE table_17642 ( "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. -- How many results are there with the original title of ani ohev o...
SELECT COUNT("Result") FROM table_17642 WHERE "Original title" = 'Ani Ohev Otach Roza (אני אוהב אותך רוזה)'
wikisql
CREATE TABLE table_64029 ( "Class to 1928" text, "Class from 1928" text, "Seats" text, "Quantity" real, "Year(s) of Manufacture" text, "Remarks" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which class from 1928 had a class to 1928 of BDi-21?
SELECT "Class from 1928" FROM table_64029 WHERE "Class to 1928" = 'bdi-21'
wikisql
CREATE TABLE table_name_33 ( goals_scored INTEGER, points VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many goals were scored when they had over 28 points and played over 18 games?
SELECT MAX(goals_scored) FROM table_name_33 WHERE points > 28 AND played > 18
sql_create_context
CREATE TABLE table_50173 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the place for the player whose final score was 71-69=140?
SELECT "Place" FROM table_50173 WHERE "Score" = '71-69=140'
wikisql
CREATE TABLE table_name_40 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which place is payne stewart, the player in?
SELECT place FROM table_name_40 WHERE player = "payne stewart"
sql_create_context
CREATE TABLE table_80407 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What week did the September 9, 1967 game occur on?
SELECT MIN("Week") FROM table_80407 WHERE "Date" = 'september 9, 1967'
wikisql
CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program ( program_id int, name varchar, college varchar...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor, semester WHERE course.course_id = course_offering.course_id AND instructor.name LIKE '%Stacy-lynn Sant%' AND offering_instructor.instructor_id = instructor.instructor_id AND offering_instructor.o...
advising
CREATE TABLE table_name_74 ( high_rebounds VARCHAR, game VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the high rebounds after game 14 for Denver?
SELECT high_rebounds FROM table_name_74 WHERE game > 14 AND team = "denver"
sql_create_context
CREATE TABLE table_name_21 ( weekly_schedule VARCHAR, timeslot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What days of the week is the show aired on that runs at 16:45?
SELECT weekly_schedule FROM table_name_21 WHERE timeslot = "16:45"
sql_create_context
CREATE TABLE table_name_72 ( visitor VARCHAR, home VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Visitor has a Home of calgary, and a Date of april 17?
SELECT visitor FROM table_name_72 WHERE home = "calgary" AND date = "april 17"
sql_create_context
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT MED_ORG_DEPT_CD, OUT_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '7124001' GROUP BY MED_ORG_DEPT_CD, OUT_DIAG_DIS_NM
css
CREATE TABLE table_12364 ( "Place" text, "Player" text, "Country" text, "Score" real, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Place that has the Country of australia, and the Player of ian baker-finch?
SELECT "Place" FROM table_12364 WHERE "Country" = 'australia' AND "Player" = 'ian baker-finch'
wikisql
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, Owne...
SELECT p.Id AS "post_id", CONCAT('https://stackoverflow.com/q/', p.Id, '|', p.Title) AS "so_link" FROM Posts AS p JOIN PostHistory AS ph ON ph.PostId = p.Id WHERE p.PostTypeId = 1 AND ph.PostHistoryTypeId = 10 AND ph.Comment = 103 AND p.AnswerCount > 5
sede
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, C...
SELECT * FROM PostTypes
sede
CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTask...
SELECT Id AS "user_link", Id, Reputation FROM Users WHERE Id NOT IN (SELECT UserId FROM Badges WHERE Name = 'Legendary' AND TagBased = 0) ORDER BY Reputation DESC, Id LIMIT 100
sede
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT demographic.diagnosis, prescriptions.route FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.name = "Wilbur Braatz"
mimicsql_data
CREATE TABLE table_53096 ( "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 is the average crowd when footscray is at h...
SELECT AVG("Crowd") FROM table_53096 WHERE "Home team" = 'footscray'
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 procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "68" AND procedures.short_title = "Arterial catheterization"
mimicsql_data
CREATE TABLE table_68407 ( "Tournament" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "Win %" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the win percentage when 2010 was 98?
SELECT "Win %" FROM table_68407 WHERE "2010" = '98'
wikisql
CREATE TABLE table_42783 ( "Volume:Issue" text, "Issue Date(s)" text, "Weeks on Top" real, "Song" text, "Artist" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the longest weeks on top when the Artist was Bruce Hornsby and the Range?
SELECT MAX("Weeks on Top") FROM table_42783 WHERE "Artist" = 'bruce hornsby and the range'
wikisql
CREATE TABLE table_60404 ( "Game" text, "Date" text, "Home Team" text, "Result" text, "Road Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Road Team, when Date is 'April 10'?
SELECT "Road Team" FROM table_60404 WHERE "Date" = 'april 10'
wikisql
CREATE TABLE table_name_64 ( city_of_license VARCHAR, frequency_mhz VARCHAR, erp_w VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the city of license for the station with the frequency mhz less than 102.3 abd erp w of 25?
SELECT city_of_license FROM table_name_64 WHERE frequency_mhz < 102.3 AND erp_w = 25
sql_create_context
CREATE TABLE table_17861265_1 ( written_by VARCHAR, no_in_season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who wrote the last episode (episode 15) of season 3?
SELECT written_by FROM table_17861265_1 WHERE no_in_season = 15
sql_create_context
CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE movie ( mid number, title text, year number, director text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT mid, AVG(stars) FROM rating WHERE NOT mid IN (SELECT T1.mid FROM rating AS T1 JOIN reviewer AS T2 ON T1.rid = T2.rid WHERE T2.name = "Brittany Harris") GROUP BY mid
spider
CREATE TABLE playlisttrack ( playlistid number, trackid number ) CREATE TABLE genre ( genreid number, name text ) CREATE TABLE customer ( customerid number, firstname text, lastname text, company text, address text, city text, state text, country text, postalcode te...
SELECT T2.city FROM customer AS T1 JOIN employee AS T2 ON T1.supportrepid = T2.employeeid WHERE T1.postalcode = "70174"
spider
CREATE TABLE table_55961 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the score when it had a decision of dipietro and visitor of n...
SELECT "Score" FROM table_55961 WHERE "Decision" = 'dipietro' AND "Visitor" = 'ny islanders' AND "Home" = 'colorado'
wikisql
CREATE TABLE person_info_hz_info ( RYBH text, KH number, KLX number, YLJGDM number ) 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,...
SELECT jybgb.BGDH FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND person_info_hz_info.KH = hz_info.KH AND pers...
css
CREATE TABLE table_175980_2 ( season VARCHAR, ranking VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What seasons had a ranking of #47?
SELECT season FROM table_175980_2 WHERE ranking = "#47"
sql_create_context
CREATE TABLE table_name_16 ( mountain_peak VARCHAR, rank VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the mountain peak with rank less than 6 abd location of 81.9083 n 75.0250 w
SELECT mountain_peak FROM table_name_16 WHERE rank < 6 AND location = "81.9083°n 75.0250°w"
sql_create_context
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE Comments ( Id number, PostId number, Score num...
SELECT COUNT(*) AS UnansweredCount, OwnerUserId AS "user_link" FROM Posts AS p WHERE p.PostTypeId = 1 AND p.AnswerCount = 0 AND p.OwnerUserId NOT IN (SELECT DISTINCT OwnerUserId FROM Posts AS p2 WHERE p2.PostTypeId = 1 AND NOT p2.OwnerUserId IS NULL AND p2.AnswerCount > 0) GROUP BY OwnerUserId ORDER BY UnansweredCount ...
sede
CREATE TABLE table_name_92 ( sport VARCHAR, year_of_award VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In 2011 which sport had the year award?
SELECT sport FROM table_name_92 WHERE year_of_award = 2011
sql_create_context
CREATE TABLE Teachers ( teacher_id INTEGER, address_id INTEGER, first_name VARCHAR(80), middle_name VARCHAR(80), last_name VARCHAR(80), gender VARCHAR(1), cell_mobile_number VARCHAR(40), email_address VARCHAR(40), other_details VARCHAR(255) ) CREATE TABLE Student_Addresses ( stu...
SELECT date_address_from, SUM(monthly_rental) FROM Student_Addresses GROUP BY other_details ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_name_74 ( goals_against INTEGER, club VARCHAR, played VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Goals Against, when Club is 'Pontevedra CF', and when Played is less than 38?
SELECT MAX(goals_against) FROM table_name_74 WHERE club = "pontevedra cf" AND played < 38
sql_create_context
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 swimmer ( ID int, name text, Nationality text, meter_100 real, meter_20...
SELECT meter_700, meter_100 FROM swimmer ORDER BY meter_700
nvbench
CREATE TABLE table_14342367_7 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What positions did Paul Jones play?
SELECT position FROM table_14342367_7 WHERE player = "Paul Jones"
sql_create_context
CREATE TABLE table_68698 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest round for UFC 109?
SELECT MAX("Round") FROM table_68698 WHERE "Event" = 'ufc 109'
wikisql
CREATE TABLE table_80397 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player was place of t1 in To Par and had a score of 70-73-69=212?
SELECT "To par" FROM table_80397 WHERE "Place" = 't1' AND "Score" = '70-73-69=212'
wikisql
CREATE TABLE table_name_17 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the home team when the away team is frickley colliery?
SELECT home_team FROM table_name_17 WHERE away_team = "frickley colliery"
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
SELECT MZZYZDZZBM, MZZYZDZZMC FROM mzjzjlb WHERE JZLSH = '74461685601'
css