instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_38896 ( "Date" text, "Label" text, "Region" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Date of Catalog 573 194-2?
SELECT "Date" FROM table_38896 WHERE "Catalog" = '573 194-2'
wikisql
CREATE TABLE table_55162 ( "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. -- On the game where the home team scored 9.9 (63),...
SELECT "Venue" FROM table_55162 WHERE "Home team score" = '9.9 (63)'
wikisql
CREATE TABLE table_23158 ( "Institution" text, "Nickname" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Joined" real, "Left" real, "Current Conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's t...
SELECT "Type" FROM table_23158 WHERE "Nickname" = 'Chargers'
wikisql
CREATE TABLE table_name_73 ( date_of_appointment VARCHAR, replaced_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of appointment for the replaced manager, reiner geyer?
SELECT date_of_appointment FROM table_name_73 WHERE replaced_by = "reiner geyer"
sql_create_context
CREATE TABLE table_25246990_5 ( original_us_air_date VARCHAR, directed_by VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the original U.S. air date of the episode directed by Julian Petrillo?
SELECT original_us_air_date FROM table_25246990_5 WHERE directed_by = "Julian Petrillo"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, ...
SELECT SG, TZ, TW, SSY, SZY, XL, HXPLC, ML FROM mzjzjlb WHERE JZLSH = '11382760786'
css
CREATE TABLE table_1660 ( "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. -- How man...
SELECT COUNT("High points") FROM table_1660 WHERE "Team" = 'Oklahoma City'
wikisql
CREATE TABLE table_name_49 ( tournament VARCHAR, opponent_in_the_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Tournament, when Opponent In The Final is 'Andre Agassi'?
SELECT tournament FROM table_name_49 WHERE opponent_in_the_final = "andre agassi"
sql_create_context
CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGDM text, BGDH text, BGRQ time, JYRQ time, JCRGH text, JCRXM text, SHRGH text, SHRXM text, JCXMMC text, JCZBDM text, JCFF text, JCZBMC text, JCZBJGDX text, JCZBJGDL number, JCZBJGDW text, SBBM text, YQBH text...
SELECT SBBM, YQBH, YQMC FROM jyjgzbb WHERE JYZBLSH = '49153085887'
css
CREATE TABLE table_name_51 ( races VARCHAR, top_5 VARCHAR, avg_start VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of races having top 5s over 2 and average starts of 6.5?
SELECT races FROM table_name_51 WHERE top_5 > 2 AND avg_start = 6.5
sql_create_context
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT * FROM Users WHERE Reputation > '##Points##' AND WebsiteUrl != '' AND LOWER(Location) LIKE '%##Location##%' ORDER BY Reputation
sede
CREATE TABLE table_24673888_1 ( station_type VARCHAR, callsign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the station type of DWZM-TV?
SELECT station_type FROM table_24673888_1 WHERE callsign = "DWZM-TV"
sql_create_context
CREATE TABLE table_name_75 ( isbn VARCHAR, series VARCHAR, title VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the ISBN of the Conan the Barbarian series that has the title of Queen of the Black Coast?
SELECT isbn FROM table_name_75 WHERE series = "conan the barbarian" AND title = "queen of the black coast"
sql_create_context
CREATE TABLE table_39906 ( "Number" real, "Builder" text, "Type" text, "Date" text, "Works number" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Works number has a Builder of avonside engine company, and a Type of 4-6-0, and a Number smaller ...
SELECT "Works number" FROM table_39906 WHERE "Builder" = 'avonside engine company' AND "Type" = '4-6-0' AND "Number" < '12' AND "Date" = 'december 1871'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT JOB_ID, AVG(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID
nvbench
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE status ( station_i...
SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31
nvbench
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter, T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE table_10812293_3 ( high_assists VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who had high assists when they played against San Antonio?
SELECT high_assists FROM table_10812293_3 WHERE team = "San Antonio"
sql_create_context
CREATE TABLE table_name_54 ( suburb VARCHAR, date_first_settled_as_a_suburb VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Suburb was First Settled as a Suburb in 1962?
SELECT suburb FROM table_name_54 WHERE date_first_settled_as_a_suburb = 1962
sql_create_context
CREATE TABLE table_name_97 ( opponent VARCHAR, round VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent of the match in round sf with a result of 0-0?
SELECT opponent FROM table_name_97 WHERE round = "sf" AND result = "0-0"
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, ...
SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC), u.Id AS "user_link", COUNT(*) AS Points, Location AS Country FROM Tags AS t WITH (nolock) INNER JOIN PostTags AS pt WITH (nolock) ON pt.TagId = t.Id INNER JOIN Posts AS p WITH (nolock) ON p.ParentId = pt.PostId INNER JOIN Votes AS v WITH (nolock) ON v.PostId = p.Id AND...
sede
CREATE TABLE Accounts ( other_account_details VARCHAR, account_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show other account details for account with name 338.
SELECT other_account_details FROM Accounts WHERE account_name = "338"
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, ...
SELECT CreationDate, LastEditDate FROM Posts WHERE NOT ClosedDate IS NULL AND AcceptedAnswerId IS NULL
sede
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE intakeoutput ( intakeoutputid number, patientunitstayid number, cellpath text, celllabel text, cellvaluenumeric number, intakeoutputtime time ) CREATE TA...
SELECT COUNT(DISTINCT patient.uniquepid) FROM patient WHERE patient.hospitaldischargetime IS NULL AND patient.age BETWEEN 40 AND 49
eicu
CREATE TABLE table_name_2 ( opponents VARCHAR, kick_off VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT OPPONENT HAD A KICKOFF OF 2007-03-06, 20:45?
SELECT opponents FROM table_name_2 WHERE kick_off = "2007-03-06, 20:45"
sql_create_context
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostsWithDeleted ( Id number, PostTyp...
SELECT Posts.Id AS "post_link", Posts.Score AS "score", Posts.Tags AS "tagged_with" FROM Posts WHERE (Posts.OwnerUserId = '##User:int##') AND (Posts.Tags LIKE '%##TagName##%')
sede
CREATE TABLE table_16552 ( "#" real, "Episode" text, "Air Date" text, "Timeslot" text, "Viewers" text, "Weekly Rank for Living" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many episodes aired on october 27, 2008
SELECT COUNT("Episode") FROM table_16552 WHERE "Air Date" = 'October 27, 2008'
wikisql
CREATE TABLE table_54953 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Venue" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In fitzroy's match where they were the home team...
SELECT "Home team score" FROM table_54953 WHERE "Home team" = 'fitzroy'
wikisql
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number,...
SELECT COUNT(*) > 0 FROM allergy WHERE allergy.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007-10135')) AND DATETIME(allergy.allergytime, 'start of year') = DATETIME(CURRE...
eicu
CREATE TABLE table_name_72 ( nationality VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the nationality of the center?
SELECT nationality FROM table_name_72 WHERE position = "center"
sql_create_context
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE days ( days_code varchar, day_name varchar ) CR...
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 = 'BOSTON...
atis
CREATE TABLE table_8697 ( "Season" real, "Champion" text, "Motorcycle" text, "Wins" real, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team had more than 10 wins with a champion of Mat Mladin?
SELECT "Team" FROM table_8697 WHERE "Wins" > '10' AND "Champion" = 'mat mladin'
wikisql
CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE PostNoticeTypes ( Id number, ClassId number...
SELECT TOP(1) AS CreationDate FROM Posts
sede
CREATE TABLE table_name_82 ( try_bonus VARCHAR, points_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- That is the value for Try bonus when the value for Points is 418?
SELECT try_bonus FROM table_name_82 WHERE points_for = "418"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE regions ( REGION_ID decimal(5,0), REGION_NAME varchar(25) ) CREATE TABLE departments ( DEPARTME...
SELECT JOB_ID, SUM(SALARY) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 GROUP BY JOB_ID ORDER BY JOB_ID
nvbench
CREATE TABLE zyjzjlb_jybgb ( YLJGDM_ZYJZJLB text, BGDH number, YLJGDM number ) CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, X...
SELECT COUNT(*) FROM zyjzjlb WHERE zyjzjlb.JZKSMC = '创伤骨科' AND zyjzjlb.RYDJSJ BETWEEN '2012-09-21' AND '2017-09-17'
css
CREATE TABLE table_name_59 ( opera VARCHAR, internet_explorer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percentage of users were using Opera during the period in which 63.67% were using Internet Explorer?
SELECT opera FROM table_name_59 WHERE internet_explorer = "63.67%"
sql_create_context
CREATE TABLE table_37280 ( "Rocket" text, "Country" text, "Type" text, "Launches" real, "Successes" real, "Failures" real, "Partial failures" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest number of successful launches as...
SELECT MAX("Successes") FROM table_37280 WHERE "Launches" > '1' AND "Failures" < '0'
wikisql
CREATE TABLE table_name_76 ( pick INTEGER, draft VARCHAR, player VARCHAR, round VARCHAR, nationality VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average pick of player josh green from Canada from round 2 with a draft after 1996?
SELECT AVG(pick) FROM table_name_76 WHERE round = "2" AND nationality = "canada" AND player = "josh green" AND draft > 1996
sql_create_context
CREATE TABLE table_1342149_6 ( result VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many results does the California 29 voting district have?
SELECT COUNT(result) FROM table_1342149_6 WHERE district = "California 29"
sql_create_context
CREATE TABLE table_36797 ( "Body" text, "Equatorial diameter" text, "Polar diameter" text, "Equatorial bulge" text, "Flattening ratio" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Flattening ratio associated with the Equatorial diamete...
SELECT "Flattening ratio" FROM table_36797 WHERE "Equatorial diameter" = '120,536km'
wikisql
CREATE TABLE table_name_63 ( rank VARCHAR, bronze INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the rank when the bronze is less than 0?
SELECT COUNT(rank) FROM table_name_63 WHERE bronze < 0
sql_create_context
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_MED_SER_ORG_NO = '3306173' AND t_kc22.STA_DATE BETWEEN '2016-01-01' AND '2017-11-11' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
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_Regular_Season, All_Games_Percent FROM basketball_match ORDER BY ACC_Regular_Season DESC
nvbench
CREATE TABLE table_name_88 ( name VARCHAR, team VARCHAR, best VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Name, when Team is 'Herdez Competition', and when Best is 1:27.432?
SELECT name FROM table_name_88 WHERE team = "herdez competition" AND best = "1:27.432"
sql_create_context
CREATE TABLE table_name_14 ( song_title VARCHAR, writer_s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What song title was written by Kal Mann and Bernie Lowe?
SELECT song_title FROM table_name_14 WHERE writer_s_ = "kal mann and bernie lowe"
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Specific Gravity"
mimicsql_data
CREATE TABLE table_14882588_3 ( sail_number VARCHAR, yacht VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are all sail numbers for the yacht Yendys?
SELECT sail_number FROM table_14882588_3 WHERE yacht = "Yendys"
sql_create_context
CREATE TABLE table_name_19 ( played INTEGER, points VARCHAR, draw VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is listed as the Highest Played, has Points of 17, and Draw that is smaller than 5?
SELECT MAX(played) FROM table_name_19 WHERE points = 17 AND draw < 5
sql_create_context
CREATE TABLE table_name_11 ( location VARCHAR, event VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location of the Conquista Fight 1?
SELECT location FROM table_name_11 WHERE event = "conquista fight 1"
sql_create_context
CREATE TABLE table_25271777_1 ( index INTEGER, forcible_rape VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the largest index the year/s forcible rapes numbered 1084?
SELECT MAX(index) FROM table_25271777_1 WHERE forcible_rape = 1084
sql_create_context
CREATE TABLE table_60374 ( "Nation" text, "Distance" text, "Athlete" text, "Venue" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Distance, when Date is '2008-01-12'?
SELECT "Distance" FROM table_60374 WHERE "Date" = '2008-01-12'
wikisql
CREATE TABLE table_1566852_6 ( interview_subject VARCHAR, cover_model VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the interview subjects on those occasions where Bai Ling was the cover model?
SELECT interview_subject FROM table_1566852_6 WHERE cover_model = "Bai Ling"
sql_create_context
CREATE TABLE table_5944 ( "Draw" real, "Artist" text, "Song" text, "Jury" real, "Televote" real, "Total" real, "Place" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which average Total has a Place smaller than 2, and a Draw smaller than 5?
SELECT AVG("Total") FROM table_5944 WHERE "Place" < '2' AND "Draw" < '5'
wikisql
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 WHERE demographic.gender = "M" AND demographic.diagnosis = "RASH"
mimicsql_data
CREATE TABLE table_name_30 ( outcome VARCHAR, tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the outcome of the Tournament in Buenos Aires?
SELECT outcome FROM table_name_30 WHERE tournament = "buenos aires"
sql_create_context
CREATE TABLE Movie ( mID int, title text, year int, director text ) CREATE TABLE Rating ( rID int, mID int, stars int, ratingDate date ) CREATE TABLE Reviewer ( rID int, name text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show ...
SELECT director, stars FROM Rating AS T1 JOIN Movie AS T2 ON T1.mID = T2.mID ORDER BY director
nvbench
CREATE TABLE table_204_854 ( id number, "#" number, "wrestlers" text, "reign" number, "date" text, "days\nheld" number, "location" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the largest days held
SELECT "wrestlers" FROM table_204_854 ORDER BY "days\nheld" DESC LIMIT 1
squall
CREATE TABLE table_65273 ( "Position" text, "Name" text, "Year at CU" text, "Experience" real, "Alma Mater" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The graduate assistant who was in the 1st year at CU has what experience?
SELECT "Experience" FROM table_65273 WHERE "Year at CU" = '1st' AND "Position" = 'graduate assistant'
wikisql
CREATE TABLE table_203_576 ( id number, "rank" number, "nation" text, "gold" number, "silver" number, "bronze" number, "total" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who won more total medals ? japan or china ?
SELECT "nation" FROM table_203_576 WHERE "nation" IN ('japan', 'china') ORDER BY "total" DESC LIMIT 1
squall
CREATE TABLE table_54224 ( "Stage" text, "Winner" text, "General classification" text, "Points classification" text, "Trofeo Fast Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the winner that had a Points Classification of Giuseppe Sa...
SELECT "Winner" FROM table_54224 WHERE "Points classification" = 'giuseppe saronni' AND "Trofeo Fast Team" = 'bianchi' AND "Stage" = '3'
wikisql
CREATE TABLE table_78076 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total grid with laps less than 2?
SELECT SUM("Grid") FROM table_78076 WHERE "Laps" < '2'
wikisql
CREATE TABLE Reservations ( Code INTEGER, Room TEXT, CheckIn TEXT, CheckOut TEXT, Rate REAL, LastName TEXT, FirstName TEXT, Adults INTEGER, Kids INTEGER ) CREATE TABLE Rooms ( RoomId TEXT, roomName TEXT, beds INTEGER, bedType TEXT, maxOccupancy INTEGER, baseP...
SELECT roomName, COUNT(roomName) FROM Reservations AS T1 JOIN Rooms AS T2 ON T1.Room = T2.RoomId WHERE FirstName LIKE '%ROY%' GROUP BY roomName ORDER BY roomName
nvbench
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.short_title = "Cardiac rhythm conv NEC"
mimicsql_data
CREATE TABLE table_name_68 ( player VARCHAR, place VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the player in t8 place with a 75-71=146 score?
SELECT player FROM table_name_68 WHERE place = "t8" AND score = 75 - 71 = 146
sql_create_context
CREATE TABLE table_name_69 ( sacks VARCHAR, solo VARCHAR, ttkl VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many sacks have 72 as the solo and a TTkl less than 112?
SELECT COUNT(sacks) FROM table_name_69 WHERE solo = 72 AND ttkl < 112
sql_create_context
CREATE TABLE table_name_52 ( date VARCHAR, game_site VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date of the game being played at Schaeffer Stadium?
SELECT date FROM table_name_52 WHERE game_site = "schaeffer stadium"
sql_create_context
CREATE TABLE table_name_84 ( date VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was the Opponent Chicago Bears?
SELECT date FROM table_name_84 WHERE opponent = "chicago bears"
sql_create_context
CREATE TABLE table_22287 ( "No. overall" real, "No. in series" real, "Title" text, "Director" text, "Writer" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who directed 'episode 5'?
SELECT "Director" FROM table_22287 WHERE "Title" = 'Episode 5'
wikisql
CREATE TABLE Users ( Id number, Reputation number, CreationDate time, DisplayName text, LastAccessDate time, WebsiteUrl text, Location text, AboutMe text, Views number, UpVotes number, DownVotes number, ProfileImageUrl text, EmailHash text, AccountId number ) CRE...
SELECT p.Id, p.PostTypeId, p.AcceptedAnswerId, p.CreationDate, p.Score, p.ViewCount, p.LastEditDate, p.LastActivityDate, p.Tags, p.AnswerCount, p.CommentCount, p.FavoriteCount, p.ClosedDate, bs.CreationDate AS BountyCreationDate, bs.BountyAmount, bc.CreationDate AS BountyCloseDate FROM Posts AS p INNER JOIN Votes AS bs...
sede
CREATE TABLE table_22648285_1 ( date VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What date was the race in 1968 run on?
SELECT date FROM table_22648285_1 WHERE year = 1968
sql_create_context
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 t2.drugname FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '030-10559') AND diagnosis.diagnos...
eicu
CREATE TABLE table_12936521_2 ( location VARCHAR, institution VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Where is the University at Albany located?
SELECT location FROM table_12936521_2 WHERE institution = "University at Albany"
sql_create_context
CREATE TABLE table_name_34 ( m_r_romaja VARCHAR, capital VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the M-R Romaja for the province having a capital of Cheongju?
SELECT m_r_romaja FROM table_name_34 WHERE capital = "cheongju"
sql_create_context
CREATE TABLE table_32693 ( "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. -- At what venue was the away team Fitzroy?
SELECT "Venue" FROM table_32693 WHERE "Away team" = 'fitzroy'
wikisql
CREATE TABLE table_name_42 ( civil_liberties_2012 INTEGER, political_rights_2011 VARCHAR, status_2011 VARCHAR, political_rights_2012 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average 2012 civil liberties value associated with a 2011 ...
SELECT AVG(civil_liberties_2012) FROM table_name_42 WHERE status_2011 = "not free" AND political_rights_2012 > 6 AND political_rights_2011 > 7
sql_create_context
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description...
SELECT MONTH(CreationDate), COUNT(Id) FROM Posts WHERE Tags LIKE '%<lang>%' GROUP BY MONTH(CreationDate)
sede
CREATE TABLE table_name_63 ( player VARCHAR, pick__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the player with pick number of 7
SELECT player FROM table_name_63 WHERE pick__number = 7
sql_create_context
CREATE TABLE table_name_76 ( score VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Player is 'Dow Finsterwald'?
SELECT score FROM table_name_76 WHERE player = "dow finsterwald"
sql_create_context
CREATE TABLE table_train_8 ( "id" int, "white_blood_cell_count_wbc" int, "systolic_blood_pressure_sbp" int, "active_infection" bool, "intention_to_arterial_catheter" bool, "temperature" float, "intention_to_central_venous_catheter" bool, "sepsis" bool, "heart_rate" int, "paco2" f...
SELECT * FROM table_train_8 WHERE active_infection = 1
criteria2sql
CREATE TABLE employment ( company_id number, people_id number, year_working number ) CREATE TABLE people ( people_id number, age number, name text, nationality text, graduation_college text ) CREATE TABLE company ( company_id number, name text, headquarters text, indust...
SELECT T3.name, T2.name FROM employment AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id JOIN company AS T3 ON T1.company_id = T3.company_id
spider
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 prescriptions...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "76" AND procedures.short_title = "Drug detoxification"
mimicsql_data
CREATE TABLE table_28300 ( "Shortscale comparison" text, "Chuquet" text, "Peletier" text, "Systematics" text, "Base 10" text, "SI Prefix" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of peletier for shortscale comparison ...
SELECT COUNT("Peletier") FROM table_28300 WHERE "Shortscale comparison" = 'Billion'
wikisql
CREATE TABLE table_name_94 ( mountains_classification VARCHAR, winner VARCHAR, sprints_classification VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Mountains Classification for Winner Thor hushovd with Sprints Classification of no award?
SELECT mountains_classification FROM table_name_94 WHERE winner = "thor hushovd" AND sprints_classification = "no award"
sql_create_context
CREATE TABLE table_46353 ( "Date" text, "Venue" text, "Opponents" text, "Score" text, "Competition" text, "Match Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Date, when Score is '0-2', and when Opponents is 'Bayer Leverkusen'?
SELECT "Date" FROM table_46353 WHERE "Score" = '0-2' AND "Opponents" = 'bayer leverkusen'
wikisql
CREATE TABLE table_name_7 ( presentation_of_credentials VARCHAR, title VARCHAR, representative VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the presentation of credentials date of ra l h. castro, who has a title of ambassador extraordinary and ...
SELECT presentation_of_credentials FROM table_name_7 WHERE title = "ambassador extraordinary and plenipotentiary" AND representative = "raúl h. castro"
sql_create_context
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc22.DOSE_FORM, t_kc22.SPEC FROM t_kc22 JOIN t_kc21_t_kc22 JOIN t_kc21 ON t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID AND t_kc21_t_kc22.MED_CLINIC_ID = t_kc21.MED_CLINIC_ID WHERE t_kc21.MED_CLINIC_ID = '52909094350' AND t_kc22.SOC_SRT_DIRE_CD = '9490'
css
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, Po...
SELECT ViewCount, Id AS "post_link", Body FROM Posts AS p WHERE (p.Tags LIKE '%apache-beam%') ORDER BY p.ViewCount DESC
sede
CREATE TABLE table_48990 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Country that has the To par larger than 9, and the Year(s) won of 1984?
SELECT "Country" FROM table_48990 WHERE "To par" > '9' AND "Year(s) won" = '1984'
wikisql
CREATE TABLE prescriptions ( row_id number, subject_id number, hadm_id number, startdate time, enddate time, drug text, dose_val_rx text, dose_unit_rx text, route text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, cha...
SELECT microbiologyevents.charttime FROM microbiologyevents WHERE microbiologyevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 3369 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime DESC LIMIT 1) AND microbiologyevents.spec_type_desc = 'pleural fluid' ORDER BY ...
mimic_iii
CREATE TABLE assignedto ( scientist number, project text ) CREATE TABLE scientists ( ssn number, name text ) CREATE TABLE projects ( code text, name text, hours number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the proje...
SELECT T2.name FROM assignedto AS T1 JOIN projects AS T2 ON T1.project = T2.code JOIN scientists AS T3 ON T1.scientist = T3.ssn WHERE T3.name LIKE '%Smith%'
spider
CREATE TABLE table_48783 ( "Date" text, "Opponents" text, "H / A" text, "Result F \u2013 A" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the H/A when Cork City is the opponent?
SELECT "H / A" FROM table_48783 WHERE "Opponents" = 'cork city'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE prescription...
SELECT prescriptions.formulary_drug_cd FROM prescriptions WHERE prescriptions.drug = "Phenylephrine"
mimicsql_data
CREATE TABLE table_70828 ( "Player" text, "Country" text, "Year(s) won" text, "Total" real, "To par" text, "Finish" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total of David Toms?
SELECT SUM("Total") FROM table_70828 WHERE "Player" = 'david toms'
wikisql
CREATE TABLE table_29783 ( "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 "Location Attendance" FROM table_29783 WHERE "Date" = 'October 18'
wikisql
CREATE TABLE table_13534 ( "Place" real, "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals Scored" real, "Goals Conceded" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total goals scored with more t...
SELECT COUNT("Goals Scored") FROM table_13534 WHERE "Points" > '11' AND "Goals Conceded" = '18' AND "Played" < '18'
wikisql
CREATE TABLE table_20765 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the home team scores when fremantle is...
SELECT "Home team score" FROM table_20765 WHERE "Away team" = 'Fremantle'
wikisql
CREATE TABLE table_30651 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "U.S. air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the direct...
SELECT "Directed by" FROM table_30651 WHERE "Production code" = '2T6404'
wikisql
CREATE TABLE table_19182 ( "Home (1st leg)" text, "Home (2nd leg)" text, "1st Leg" text, "2nd leg" text, "Aggregate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was in home (2nd leg) when Talleres was in home (1st leg)
SELECT "Home (2nd leg)" FROM table_19182 WHERE "Home (1st leg)" = 'Talleres'
wikisql
CREATE TABLE table_21172 ( "Religion" text, "Chester" text, "Congleton" text, "Crewe and Nantwich" text, "Ellesmere Port and Neston" text, "Macclesfield" text, "Vale Royal" text, "Total" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How...
SELECT COUNT("Chester") FROM table_21172 WHERE "Religion" = 'Hindu'
wikisql