instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE wedding ( church_id VARCHAR, year VARCHAR ) CREATE TABLE church ( name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show all church names except for those that had a wedding in year 2015.
SELECT name FROM church EXCEPT SELECT T1.name FROM church AS T1 JOIN wedding AS T2 ON T1.church_id = T2.church_id WHERE T2.year = 2015
sql_create_context
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.marital_status = "SINGLE" AND procedures.short_title = "Int insert lead in vent"
mimicsql_data
CREATE TABLE table_64144 ( "Name" text, "Championship" real, "League Cup" real, "FA Cup" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Name has a Championship larger than 2, and a Total larger than 4, and an FA Cup larger than 0...
SELECT "Name" FROM table_64144 WHERE "Championship" > '2' AND "Total" > '4' AND "FA Cup" > '0'
wikisql
CREATE TABLE table_name_93 ( composer_s_ VARCHAR, chr_chart_peak VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which composer had a CHR chart peak at #2?
SELECT composer_s_ FROM table_name_93 WHERE chr_chart_peak = 2
sql_create_context
CREATE TABLE table_8937 ( "Date" text, "Opponent" text, "Venue" text, "Result F \u2013 A" text, "Competition" text, "Scorers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game where Inter Milan was the opponent.
SELECT "Date" FROM table_8937 WHERE "Opponent" = 'inter milan'
wikisql
CREATE TABLE table_60917 ( "Year" text, "Venue" text, "Winner" text, "Runner-up" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What runner-up has 1925 as the year?
SELECT "Runner-up" FROM table_60917 WHERE "Year" = '1925'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.diagnosis = "PNEUMONIA;HUMAN IMMUNODEFIENCY VIRUS;RULE OUT TUBERCULOSIS" AND demographic.dod_year <= "2173.0"
mimicsql_data
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT t1.spec_type_desc FROM (SELECT microbiologyevents.spec_type_desc, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM microbiologyevents WHERE DATETIME(microbiologyevents.charttime) >= DATETIME(CURRENT_TIME(), '-5 year') GROUP BY microbiologyevents.spec_type_desc) AS t1 WHERE t1.c1 <= 4
mimic_iii
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 person_info.JGDM, person_info.JGMC, COUNT(person_info.RYBH) FROM person_info JOIN hz_info JOIN zzmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zzmzjzjlb.YLJGDM AND hz_info.KH = zzmzjzjlb.KH AND hz_info.KLX = zzmzjzjlb.KLX WHERE zzmzjzjlb.JZZDBM = 'N08.618' GROUP BY person_info.JGDM UNION SELECT...
css
CREATE TABLE table_68401 ( "School" text, "Nickname" text, "City" text, "Affiliation" text, "Conference" text, "National Championships" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Conference has a City of boca raton, and a School of flo...
SELECT "Conference" FROM table_68401 WHERE "City" = 'boca raton' AND "School" = 'florida atlantic university'
wikisql
CREATE TABLE table_name_52 ( place VARCHAR, country VARCHAR, money___$__ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ranking for the United States when the money is $200?
SELECT place FROM table_name_52 WHERE country = "united states" AND money___$__ = "200"
sql_create_context
CREATE TABLE table_27319183_5 ( share___percentage_ VARCHAR, episode VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the share (%) for the Semi-Final 2 episode?
SELECT share___percentage_ FROM table_27319183_5 WHERE episode = "Semi-final 2"
sql_create_context
CREATE TABLE table_20323 ( "Pick #" real, "CFL Team" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of CFL teams in the college Wilfrid Laurier
SELECT COUNT("CFL Team") FROM table_20323 WHERE "College" = 'Wilfrid Laurier'
wikisql
CREATE TABLE course ( course_id int, name varchar, department varchar, number varchar, credits varchar, advisory_requirement varchar, enforced_requirement varchar, description varchar, num_semesters int, num_enrolled int, has_discussion varchar, has_lab varchar, has_p...
SELECT DISTINCT department, name, number FROM course WHERE credits = 15 AND department = 'AT' AND number < 200 + 100 AND number >= 200
advising
CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) -- Using valid SQLite, answer the following questions fo...
SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Type, Nationality ORDER BY COUNT(Nationality) DESC
nvbench
CREATE TABLE table_name_43 ( player VARCHAR, uefa_cup VARCHAR, total VARCHAR, ekstraklasa VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Player has a Total of 3, and an Ekstraklasa smaller than 3, and a UEFA Cup of 2?
SELECT player FROM table_name_43 WHERE total = 3 AND ekstraklasa < 3 AND uefa_cup = 2
sql_create_context
CREATE TABLE table_16149 ( "Rd" real, "Name" text, "Pole Position" text, "Fastest Lap" text, "Winning driver" text, "Winning team" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the report on Penske Racing winning while...
SELECT COUNT("Report") FROM table_16149 WHERE "Pole Position" = 'Al Unser' AND "Winning team" = 'Penske Racing'
wikisql
CREATE TABLE table_33672 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT WAS ESSENDON'S HIGHEST CROWD NUMBER WHEN PL...
SELECT MAX("Crowd") FROM table_33672 WHERE "Away team" = 'essendon'
wikisql
CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE time_slot ( time_slot_id varchar(4), day varchar(1), start_hr numeric(2), start_min numeric(2), end_hr numeric(2), end_min numeric(2) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), ...
SELECT dept_name, COUNT(dept_name) FROM course AS T1 JOIN prereq AS T2 ON T1.course_id = T2.course_id GROUP BY dept_name
nvbench
CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varchar, how varchar, transfer_source varchar, earn_credit varchar, repeat_term varchar, test_id varchar ) CREATE TABLE semester ( semester_id int, semester varchar, year int ) CREATE TABLE...
SELECT COUNT(DISTINCT course_offering.course_id) FROM course_offering, semester WHERE semester.semester = 'FA' AND semester.semester_id = course_offering.semester AND semester.year = 2016
advising
CREATE TABLE table_name_4 ( score VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of Game 16?
SELECT score FROM table_name_4 WHERE game = "16"
sql_create_context
CREATE TABLE music_festival ( ID int, Music_Festival text, Date_of_ceremony text, Category text, Volume int, Result text ) CREATE TABLE artist ( Artist_ID int, Artist text, Age int, Famous_Title text, Famous_Release_date text ) CREATE TABLE volume ( Volume_ID int, V...
SELECT Category, COUNT(Category) FROM music_festival WHERE Result = "Awarded" GROUP BY Category ORDER BY COUNT(Category)
nvbench
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.subject_id = "25167"
mimicsql_data
CREATE TABLE table_40852 ( "Republican ticket" text, "Democratic ticket" text, "American Labor ticket" text, "Communist ticket" text, "Socialist ticket" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who's the Republican ticket with a Communist tick...
SELECT "Republican ticket" FROM table_40852 WHERE "Communist ticket" = '(none)' AND "Socialist ticket" = 'joseph g. glass'
wikisql
CREATE TABLE table_1908049_1 ( year VARCHAR, playoffs VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the year where in the playoffs was champions
SELECT year FROM table_1908049_1 WHERE playoffs = "Champions"
sql_create_context
CREATE TABLE table_name_10 ( rider VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rider has the time of +31.426?
SELECT rider FROM table_name_10 WHERE time_retired = "+31.426"
sql_create_context
CREATE TABLE table_28898948_3 ( incumbent VARCHAR, reason VARCHAR, by_election VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 1881 is the by-election and death is the reason who is the incumbent?
SELECT incumbent FROM table_28898948_3 WHERE reason = "Death" AND by_election = 1881
sql_create_context
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugst...
SELECT COUNT(*) FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-46456')) AND lab.labname = 'mch' AND DATETIME(lab.labresulttime, 'start of month') = DAT...
eicu
CREATE TABLE table_203_346 ( id number, "date" text, "location" text, "venue" text, "opening act" text, "supporting" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which leg was the last leg ?
SELECT "location" FROM table_203_346 ORDER BY "date" DESC LIMIT 1
squall
CREATE TABLE table_49369 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Away Team is 'Ipswich Town'?
SELECT "Date" FROM table_49369 WHERE "Away team" = 'ipswich town'
wikisql
CREATE TABLE table_name_90 ( college_junior_club_team VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What college, junior, or club team did Victor Ignatjev play for?
SELECT college_junior_club_team FROM table_name_90 WHERE player = "victor ignatjev"
sql_create_context
CREATE TABLE technician ( Name VARCHAR, technician_ID VARCHAR ) CREATE TABLE machine ( machine_id VARCHAR, value_points INTEGER ) CREATE TABLE repair_assignment ( machine_id VARCHAR, technician_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. ...
SELECT T3.Name FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.machine_id = T2.machine_id JOIN technician AS T3 ON T1.technician_ID = T3.technician_ID WHERE T2.value_points > 70
sql_create_context
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, Ta...
SELECT p.Score, p.Id, p.Tags, pt.PostId AS "post_link", pt.TagId FROM Posts AS p INNER JOIN PostTags AS pt ON pt.PostId = p.Id WHERE pt.TagId = '3' AND p.Score >= '100' AND p.Score < '301'
sede
CREATE TABLE table_34309 ( "Round" real, "Player" text, "Position" text, "Nationality" text, "College/Junior/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Player that has the Round smaller than 6, and the College/Juni...
SELECT "Player" FROM table_34309 WHERE "Round" < '6' AND "College/Junior/Club Team" = 'hull olympiques (qmjhl)'
wikisql
CREATE TABLE table_27623 ( "Episode" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the order number where the song choice is 'l'appuntamento'?
SELECT "Order #" FROM table_27623 WHERE "Song choice" = 'L''appuntamento'
wikisql
CREATE TABLE table_74080 ( "Club" text, "Played" text, "Won" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Points" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many matches were d...
SELECT COUNT("Drawn") FROM table_74080 WHERE "Won" = '10'
wikisql
CREATE TABLE table_71568 ( "Rank" real, "Name" text, "Nationality" text, "Score" text, "Perfection" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had a perfection percentage of 77.96%?
SELECT "Name" FROM table_71568 WHERE "Perfection" = '77.96%'
wikisql
CREATE TABLE table_72357 ( "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. -- Incumbent Deborah Pryce was a member of what party?
SELECT "Party" FROM table_72357 WHERE "Incumbent" = 'Deborah Pryce'
wikisql
CREATE TABLE table_53770 ( "Group name" text, "English abbr." text, "French abbr." text, "Formal European Parliament name" text, "From" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On the date of 20 July 1999 what is the English abbr.?
SELECT "English abbr." FROM table_53770 WHERE "From" = '20 july 1999'
wikisql
CREATE TABLE ta ( campus_job_id int, student_id int, location varchar ) CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE area ( course_id int, area varchar ) CREATE TABLE program_requirement ( program_id int, catego...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester WHERE course_offering.friday = 'N' AND course.department = 'RCLANG' AND semester.semester = 'WN' AND...
advising
CREATE TABLE table_203_290 ( id number, "game" number, "date" text, "opponent" text, "location" text, "score" text, "ot" text, "attendance" number, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- when was the score difference...
SELECT "date" FROM table_203_290 ORDER BY ABS("score" - "score") DESC LIMIT 1
squall
CREATE TABLE table_70388 ( "Year" real, "Entrant" text, "Class" text, "Chassis" text, "Engine" text, "Tyres" text, "Rank" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the engine for the bmw motorsport entrant wit...
SELECT "Engine" FROM table_70388 WHERE "Year" < '2004' AND "Entrant" = 'bmw motorsport' AND "Points" = '123'
wikisql
CREATE TABLE table_5725 ( "Game" real, "February" real, "Opponent" text, "Score" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did the Flyers have against the New York Islanders with a February bigg...
SELECT COUNT("Points") FROM table_5725 WHERE "February" > '12' AND "Game" < '60' AND "Opponent" = 'new york islanders'
wikisql
CREATE TABLE table_name_21 ( game_status VARCHAR, occupation VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the occupation was utility worker on-air talent, what was the game status?
SELECT game_status FROM table_name_21 WHERE occupation = "utility worker on-air talent"
sql_create_context
CREATE TABLE table_27487310_5 ( name VARCHAR, network VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the version aired on SBS 6 called?
SELECT name FROM table_27487310_5 WHERE network = "SBS 6"
sql_create_context
CREATE TABLE table_14477002_1 ( record VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the total number of records from Lambeau Field.
SELECT COUNT(record) FROM table_14477002_1 WHERE location = "Lambeau Field"
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 COUNT(DISTINCT PERSON_ID) FROM t_kc21 WHERE IN_DIAG_DIS_NM = '抽动障碍'
css
CREATE TABLE club ( Club_ID int, name text, Region text, Start_year text ) CREATE TABLE player ( Player_ID int, name text, Position text, Club_ID int, Apps real, Tries real, Goals text, Points real ) CREATE TABLE competition ( Competition_ID int, Year real, ...
SELECT Position, COUNT(*) FROM player WHERE Points < 30 GROUP BY Position ORDER BY Position DESC
nvbench
CREATE TABLE rating ( rid number, mid number, stars number, ratingdate time ) CREATE TABLE reviewer ( rid number, name text ) CREATE TABLE movie ( mid number, title text, year number, director text ) -- Using valid SQLite, answer the following questions for the tables provide...
SELECT DISTINCT T2.title FROM rating AS T1 JOIN movie AS T2 ON T1.mid = T2.mid JOIN reviewer AS T3 ON T1.rid = T3.rid WHERE T3.name = 'Brittany Harris' OR T2.year > 2000
spider
CREATE TABLE course_prerequisite ( pre_course_id int, course_id int ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int, additional_req varchar ) CREATE TABLE ta ( campus_job_id int, ...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE (area.area LIKE '%U S%' OR course.description LIKE '%U S%' OR course.name LIKE '%U S%') AND program_course.categor...
advising
CREATE TABLE table_76428 ( "Tournament" text, "2003" text, "2004" text, "2005" text, "2006" text, "2007" text, "2008" text, "2009" text, "2010" text, "2011" text, "2012" text, "2013" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "2008" FROM table_76428 WHERE "2011" = '1r'
wikisql
CREATE TABLE flight ( aircraft_code_sequence text, airline_code varchar, airline_flight text, arrival_time int, connections int, departure_time int, dual_carrier text, flight_days text, flight_id int, flight_number int, from_airport varchar, meal_code text, stops int,...
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 = 'BOSTON' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'ATLANTA...
atis
CREATE TABLE table_19276 ( "Player" text, "Position" text, "Starter" text, "Touchdowns" real, "Extra points" real, "Field goals" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What positions does Hal Weeks play?
SELECT "Position" FROM table_19276 WHERE "Player" = 'Hal Weeks'
wikisql
CREATE TABLE table_56013 ( "Agent" text, "Melting / boiling point" text, "Effectiveness as blood agent" real, "Persistence, open area" real, "Persistence, enclosed area" real, "Field stability" real, "Storage stability" real, "Toxicity as blood agent" real ) -- Using valid SQLite, answ...
SELECT COUNT("Field stability") FROM table_56013 WHERE "Agent" = 'cyanogen bromide' AND "Effectiveness as blood agent" > '9'
wikisql
CREATE TABLE prereq ( course_id varchar(8), prereq_id varchar(8) ) CREATE TABLE instructor ( ID varchar(5), name varchar(20), dept_name varchar(20), salary numeric(8,2) ) CREATE TABLE classroom ( building varchar(15), room_number varchar(7), capacity numeric(4,0) ) CREATE TABLE ta...
SELECT dept_name, budget FROM department WHERE budget > (SELECT AVG(budget) FROM department) ORDER BY dept_name DESC
nvbench
CREATE TABLE table_1958768_3 ( vacator VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the vacator for wisconsin 1st
SELECT vacator FROM table_1958768_3 WHERE district = "Wisconsin 1st"
sql_create_context
CREATE TABLE table_35258 ( "Rank" real, "Airport" text, "Location" text, "Code (IATA)" text, "Total Cargo (Metric Tonnes)" text, "2003 Rank" text, "% Change" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What % Change is listed against the ...
SELECT "% Change" FROM table_35258 WHERE "Rank" < '8' AND "2003 Rank" = '6'
wikisql
CREATE TABLE table_15283 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what player has To par of 3, and a Score of 73-68=141?
SELECT "Player" FROM table_15283 WHERE "To par" = '–3' AND "Score" = '73-68=141'
wikisql
CREATE TABLE table_63674 ( "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 "Record" FROM table_63674 WHERE "Opponent" = 'new york'
wikisql
CREATE TABLE table_203_367 ( id number, "year" text, "driver" text, "constructor" text, "location" text, "report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- did alan prost have mclaren honda or ferrari as the constructor in 1988 ?
SELECT "constructor" FROM table_203_367 WHERE "year" = 1988
squall
CREATE TABLE ground_service ( city_code text, airport_code text, transport_type text, ground_fare int ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, economy text, discounted text, night text, season text, basis_da...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, airport_service AS AIRPORT_SERVICE_2, city AS CITY_0, city AS CITY_1, city AS CITY_2, flight, flight_stop WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND CIT...
atis
CREATE TABLE table_name_63 ( cuts_made INTEGER, top_25 VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest cuts made that had a Top-25 less than 6 and wins greater than 0?
SELECT MIN(cuts_made) FROM table_name_63 WHERE top_25 < 6 AND wins < 0
sql_create_context
CREATE TABLE table_name_76 ( opponent VARCHAR, week VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What opponent had an attendance of 12,508 during weeks 1 through 8?
SELECT opponent FROM table_name_76 WHERE week < 8 AND attendance = "12,508"
sql_create_context
CREATE TABLE table_name_41 ( wins INTEGER, top_10 INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the least number of wins when the top 10 is more than 8?
SELECT MIN(wins) FROM table_name_41 WHERE top_10 > 8
sql_create_context
CREATE TABLE table_25341765_1 ( us_viewers__million_ VARCHAR, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many millions of viewers did the episode directed by Jeffrey Blitz have?
SELECT us_viewers__million_ FROM table_25341765_1 WHERE directed_by = "Jeffrey Blitz"
sql_create_context
CREATE TABLE table_name_88 ( position VARCHAR, round VARCHAR, college VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Position has a Round smaller than 14, and a College of illinois?
SELECT position FROM table_name_88 WHERE round < 14 AND college = "illinois"
sql_create_context
CREATE TABLE table_name_8 ( label VARCHAR, format VARCHAR, date VARCHAR, region VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Label of the CD released in Germany on June 6, 2005?
SELECT label FROM table_name_8 WHERE date = "june 6, 2005" AND region = "germany" AND format = "cd"
sql_create_context
CREATE TABLE table_30059 ( "Dates" text, "Race Name" text, "Location" text, "UCI Rating" text, "Winner" text, "Team" text, "Series Leader" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what race name had a uci rating of cn?
SELECT "Race Name" FROM table_30059 WHERE "UCI Rating" = 'CN'
wikisql
CREATE TABLE table_name_9 ( shooter VARCHAR, total VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Shooter has a Total of 28?
SELECT shooter FROM table_name_9 WHERE total = "28"
sql_create_context
CREATE TABLE table_17697980_1 ( no_of_episodes INTEGER, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the largest number of episodes for a 1989 season dvd release?
SELECT MAX(no_of_episodes) FROM table_17697980_1 WHERE year = "1989"
sql_create_context
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 Founder, SUM(Price) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Founder ORDER BY Founder DESC
nvbench
CREATE TABLE table_77010 ( "Player" text, "Nationality" text, "Jersey Number(s)" text, "Position" text, "Years" text, "From" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Alton Lister Category:Articles with hCards has what as the listed years?
SELECT "Years" FROM table_77010 WHERE "Player" = 'alton lister category:articles with hcards'
wikisql
CREATE TABLE table_15969 ( "District" text, "Vacator" text, "Reason for change" text, "Successor" text, "Date successor seated" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the vacator for district Louisiana 1st?
SELECT "Vacator" FROM table_15969 WHERE "District" = 'Louisiana 1st'
wikisql
CREATE TABLE table_name_30 ( opponent VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent in the game that had an attendance of 60,066?
SELECT opponent FROM table_name_30 WHERE attendance = "60,066"
sql_create_context
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.admission_type = "URGENT" AND procedures.long_title = "Single internal mammary-coronary artery bypass"
mimicsql_data
CREATE TABLE table_55241 ( "Player" text, "Date of birth (age when delisted)" text, "Draft details" text, "Rookie list" text, "Senior list" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed under Senior List for Date of Birth (Age When D...
SELECT "Senior list" FROM table_55241 WHERE "Date of birth (age when delisted)" = '5 june 1984 (aged 23)'
wikisql
CREATE TABLE table_20442 ( "No" text, "Season" text, "Start date (1st night)" text, "End date (Last night)" text, "Location" text, "No of Proms" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When are end dates (last night) for the season of 191...
SELECT "End date (Last night)" FROM table_20442 WHERE "Season" = '1918'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT procedures.icd9_code, procedures.long_title FROM procedures WHERE procedures.subject_id = "31066"
mimicsql_data
CREATE TABLE table_32921 ( "Date" text, "Result" text, "Score" text, "Stadium" text, "City" text, "Crowd" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the game in halifax?
SELECT "Result" FROM table_32921 WHERE "City" = 'halifax'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.admission_location = "CLINIC REFERRAL/PREMATURE" AND diagnoses.icd9_code = "1550"
mimicsql_data
CREATE TABLE table_38428 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the Loss is Johnson (4-12), what is the date?
SELECT "Date" FROM table_38428 WHERE "Loss" = 'johnson (4-12)'
wikisql
CREATE TABLE table_name_43 ( total INTEGER, name VARCHAR, premier_league VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average total of kenwyne jones, who has more than 10 premier leagues?
SELECT AVG(total) FROM table_name_43 WHERE name = "kenwyne jones" AND premier_league > 10
sql_create_context
CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time, spec_type_desc text, org_name text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT transfers.hadm_id FROM transfers WHERE transfers.careunit = 'sicu')
mimic_iii
CREATE TABLE table_name_70 ( tournament VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which tournament had a score of 6 4, 4 6, 7 5?
SELECT tournament FROM table_name_70 WHERE score = "6–4, 4–6, 7–5"
sql_create_context
CREATE TABLE table_27813010_2 ( weeks_in_top_10 INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How long has the longest song spent in the top 10?
SELECT MAX(weeks_in_top_10) FROM table_27813010_2
sql_create_context
CREATE TABLE table_name_83 ( rank VARCHAR, total_passengers__millions__2011_12 VARCHAR, annual_interchanges__millions__2011_12 VARCHAR, annual_entry_exit__millions__2011_12 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What rank has an annual interc...
SELECT rank FROM table_name_83 WHERE annual_interchanges__millions__2011_12 < 1.99 AND annual_entry_exit__millions__2011_12 < 13.835 AND total_passengers__millions__2011_12 > 13.772
sql_create_context
CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic (...
SELECT demographic.admittime, demographic.dischtime FROM demographic WHERE demographic.name = "Alice Nixon"
mimicsql_data
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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, ...
SELECT demographic.age, prescriptions.drug_type FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "81254"
mimicsql_data
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_descriptio...
SELECT DISTINCT flight.flight_id FROM airport_service, city, fare, flight, flight_fare WHERE city.city_code = airport_service.city_code AND city.city_name = 'MONTREAL' AND fare.one_direction_cost < 150 AND flight_fare.fare_id = fare.fare_id AND flight.flight_id = flight_fare.flight_id AND flight.from_airport = airport_...
atis
CREATE TABLE table_name_30 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the away team when the home team was Ramsgate?
SELECT away_team FROM table_name_30 WHERE home_team = "ramsgate"
sql_create_context
CREATE TABLE table_59540 ( "Rank" real, "Local government area" text, "Population 2006 census" real, "Population 2007 estimate" real, "Growth rate" text, "Stat. division/district" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the 2006 ...
SELECT AVG("Population 2006 census") FROM table_59540 WHERE "Local government area" = 'alexandrina council' AND "Rank" < '19'
wikisql
CREATE TABLE table_23670057_7 ( current_club VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every current club for the player Art rs t lbergs?
SELECT current_club FROM table_23670057_7 WHERE player = "Artūrs Štālbergs"
sql_create_context
CREATE TABLE table_204_332 ( id number, "administrative\narea" text, "area\nkm2" number, "area\nsq mi" number, "population" number, "administrative\ncentre" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many administrative areas have a popu...
SELECT COUNT("administrative\narea") FROM table_204_332 WHERE "population" >= 500
squall
CREATE TABLE table_31022 ( "Distance" text, "Adelaide" text, "Brisbane" text, "Canberra" text, "Melbourne" text, "Perth" text, "Sydney" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the distance when brisbane is $4.80?
SELECT "Distance" FROM table_31022 WHERE "Brisbane" = '$4.80'
wikisql
CREATE TABLE d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE outputevents ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, value number ) CREATE TABLE labevents ( row_id number, sub...
SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.hadm_id IN (SELECT diagnoses_icd.hadm_id FROM diagnoses_icd WHERE diagnoses_icd.icd9_code = (SELECT d_icd_diagnoses.icd9_code FROM d_icd_diagnoses WHERE d_icd_diagnoses.short_title = 'bulimia nervosa')) GROUP BY cost.hadm_id) AS t1
mimic_iii
CREATE TABLE hotels ( hotel_id number, star_rating_code text, pets_allowed_yn text, price_range number, other_hotel_details text ) CREATE TABLE street_markets ( market_id number, market_details text ) CREATE TABLE staff ( staff_id number, tourist_attraction_id number, name text...
SELECT T1.name FROM tourist_attractions AS T1 JOIN tourist_attraction_features AS T2 ON T1.tourist_attraction_id = T2.tourist_attraction_id JOIN features AS T3 ON T2.feature_id = T3.feature_id WHERE T3.feature_details = 'park' UNION SELECT T1.name FROM tourist_attractions AS T1 JOIN tourist_attraction_features AS T2 ON...
spider
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.icustay_id FROM prescriptions WHERE prescriptions.subject_id = "6983"
mimicsql_data
CREATE TABLE table_35027 ( "Round" text, "Pick" text, "Player" text, "Position" text, "College" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position's round was 3 when pick was 70?
SELECT "Position" FROM table_35027 WHERE "Round" = '3' AND "Pick" = '70'
wikisql
CREATE TABLE procedures_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE icustays ...
SELECT COUNT(*) FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'arterial catheterization') AND STRFTIME('%y', procedures_icd.charttime) = '2102'
mimic_iii
CREATE TABLE table_21541 ( "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 i...
SELECT "High points" FROM table_21541 WHERE "Team" = 'Washington'
wikisql