instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE candidate ( Candidate_ID int, People_ID int, Poll_Source text, Date text, Support_rate real, Consider_rate real, Oppose_rate real, Unsure_rate real ) CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight re...
SELECT Sex, MIN(Weight) FROM people GROUP BY Sex
nvbench
CREATE TABLE table_203_652 ( id number, "goal" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which type of competition was listed the most ?
SELECT "competition" FROM table_203_652 GROUP BY "competition" ORDER BY COUNT(*) DESC LIMIT 1
squall
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 lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text,...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2152" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_9734 ( "Season" text, "Winner" text, "Prize" text, "Runner-Up" text, "3rd place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Prize, when Winner is 'John Shaw'?
SELECT "Prize" FROM table_9734 WHERE "Winner" = 'john shaw'
wikisql
CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime time ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime t...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'lab' AND cost.eventid IN (SELECT lab.labid FROM lab WHERE lab.labname = 'gentamicin - trough')
eicu
CREATE TABLE table_204_227 ( id number, "week" number, "date" text, "opponent" text, "score" text, "result" text, "record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- on which date did the bombers score the least points ?
SELECT "date" FROM table_204_227 ORDER BY "score" LIMIT 1
squall
CREATE TABLE table_1341453_37 ( first_elected INTEGER, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the incumbent Sherrod Brown first elected?
SELECT MAX(first_elected) FROM table_1341453_37 WHERE incumbent = "Sherrod Brown"
sql_create_context
CREATE TABLE table_76482 ( "Model" text, "Sensor Size" text, "Resolution" text, "Active Pixels" text, "Display" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the resolution of the camera that has 6726 x 5040 pixels and a model of afi 7?
SELECT "Resolution" FROM table_76482 WHERE "Active Pixels" = '6726 x 5040' AND "Model" = 'afi 7'
wikisql
CREATE TABLE airline ( airline_code varchar, airline_name text, note text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_stay int, application text, no_discounts text ) CREATE ...
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 = 'PHILADELPHIA' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'D...
atis
CREATE TABLE table_13434 ( "Non-dictatorship" text, "Pareto efficiency" text, "Majority" text, "Monotone" text, "Consistency & Participation" text, "Condorcet" text, "Condorcet loser" text, "Clone independence" text, "Reversal symmetry" text ) -- Using valid SQLite, answer the foll...
SELECT "Reversal symmetry" FROM table_13434 WHERE "Non-dictatorship" = 'no' AND "Condorcet loser" = 'no'
wikisql
CREATE TABLE table_name_95 ( frequency_mhz VARCHAR, call_sign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what frequency does W233AG broadcast?
SELECT COUNT(frequency_mhz) FROM table_name_95 WHERE call_sign = "w233ag"
sql_create_context
CREATE TABLE table_name_41 ( position VARCHAR, time VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which position has a time of 1:45:53:00?
SELECT position FROM table_name_41 WHERE time = "1:45:53:00"
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 * FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGD...
css
CREATE TABLE basketball_match ( Team_ID int, School_ID int, Team_Name text, ACC_Regular_Season text, ACC_Percent text, ACC_Home text, ACC_Road text, All_Games text, All_Games_Percent int, All_Home text, All_Road text, All_Neutral text ) CREATE TABLE university ( Scho...
SELECT ACC_Road, School_ID FROM basketball_match GROUP BY ACC_Home, ACC_Road
nvbench
CREATE TABLE table_75212 ( "Year" text, "Channel" text, "Play-by-play" text, "Color commentator(s)" text, "Courtside reporter" text, "Studio host" text, "Studio analysts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Color commentator...
SELECT "Color commentator(s)" FROM table_75212 WHERE "Channel" = 'fsn new england' AND "Year" = '2004-05'
wikisql
CREATE TABLE table_70287 ( "Date" text, "Venue" text, "Score [A ]" text, "Competition" text, "Att." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score [A] of the match on 19 September 1998?
SELECT "Score [A ]" FROM table_70287 WHERE "Date" = '19 september 1998'
wikisql
CREATE TABLE table_204_114 ( id number, "pos" text, "rider" text, "manufacturer" text, "time/retired" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which rider earned only 2 points ?
SELECT "rider" FROM table_204_114 WHERE "points" = 2
squall
CREATE TABLE table_29743928_4 ( games VARCHAR, years VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 2010 is the year what is the game?
SELECT games FROM table_29743928_4 WHERE years = "2010"
sql_create_context
CREATE TABLE table_52240 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the opponent during the UFC 90 event with a...
SELECT "Opponent" FROM table_52240 WHERE "Round" < '4' AND "Event" = 'ufc 90'
wikisql
CREATE TABLE table_68394 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the venue when the score is 1 goal, and the date is August 27, 1980?
SELECT "Venue" FROM table_68394 WHERE "Score" = '1 goal' AND "Date" = 'august 27, 1980'
wikisql
CREATE TABLE table_name_18 ( runs VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many runs happened in 2013?
SELECT runs FROM table_name_18 WHERE year = "2013"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code tex...
SELECT DISTINCT medication.routeadmin FROM medication WHERE medication.drugname = 'definity'
eicu
CREATE TABLE table_name_87 ( number_of_bearers_2008 INTEGER, surname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Highest Number of Bearers 2008, when Surname is Jacobsen?
SELECT MAX(number_of_bearers_2008) FROM table_name_87 WHERE surname = "jacobsen"
sql_create_context
CREATE TABLE table_13876 ( "Lane" real, "Athlete" text, "Nationality" text, "Time" real, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the greatest lane that David Payne was in when he ran longer than 13.17?
SELECT MAX("Lane") FROM table_13876 WHERE "Athlete" = 'david payne' AND "Time" > '13.17'
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 MAX(demographic.days_stay) FROM demographic WHERE demographic.diagnosis = "BLADDER CANCER/SDA"
mimicsql_data
CREATE TABLE table_name_9 ( writer VARCHAR, actual_title VARCHAR, artist VARCHAR, issue VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What writer has mort drucker as the artist, an issue greater than 470, and law & order: svu as an actual title?
SELECT writer FROM table_name_9 WHERE artist = "mort drucker" AND issue > 470 AND actual_title = "law & order: svu"
sql_create_context
CREATE TABLE table_name_3 ( birth_date VARCHAR, weight__kg_ VARCHAR, world_rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the birth date when the weight (kg) is 100 and the world rank is 2?
SELECT birth_date FROM table_name_3 WHERE weight__kg_ = "100" AND world_rank = "2"
sql_create_context
CREATE TABLE table_name_88 ( year INTEGER, bronze VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT YEAR HAS A BRONZE OF VALENTIN NOVIKOV?
SELECT AVG(year) FROM table_name_88 WHERE bronze = "valentin novikov"
sql_create_context
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT EMAIL, EMPLOYEE_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY EMAIL
nvbench
CREATE TABLE table_74636 ( "Date" text, "Venue" text, "Score" text, "Result" text, "Competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the score of the game played on 16 August 2006?
SELECT "Score" FROM table_74636 WHERE "Date" = '16 august 2006'
wikisql
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 Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT OwnerUserId, AVG(Score) AS AvgScore, COUNT(*) AS AnswersPosted FROM Posts WHERE PostTypeId = 2 AND OwnerUserId > 0 GROUP BY OwnerUserId ORDER BY AVG(Score) DESC LIMIT 10
sede
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25...
SELECT EMAIL, MANAGER_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY MANAGER_ID DESC
nvbench
CREATE TABLE t_kc21_t_kc24 ( MED_CLINIC_ID text, MED_SAFE_PAY_ID number ) 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, ...
SELECT AVG(t_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.MED_ORG_DEPT_NM = '小儿妇科内分泌' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-01-09' AND '2004-04-18' AND t_kc21.IN_DIAG_DIS_CD = 'Z32.698' AND t_kc21.CLINIC_TYPE = '住院'
css
CREATE TABLE VISITS ( Tourist_Attraction_ID VARCHAR ) CREATE TABLE Tourist_Attractions ( Name VARCHAR, Tourist_Attraction_ID VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the names and ids of tourist attractions that are visited at most once.
SELECT T1.Name, T1.Tourist_Attraction_ID FROM Tourist_Attractions AS T1 JOIN VISITS AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID HAVING COUNT(*) <= 1
sql_create_context
CREATE TABLE table_name_66 ( date_of_birth VARCHAR, begin_date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of birth of the member of the United States House of Representatives that began their term on April 24, 1902?
SELECT date_of_birth FROM table_name_66 WHERE begin_date = "april 24, 1902"
sql_create_context
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.Code, T1.Manufacturer FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter
nvbench
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE month ( month_number int, month_name text ) CREATE TABLE time_zone ( time_zone_code text, time_zone_name text, hours_from_gmt ...
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 = 'PITTSBURGH' AND CITY_2...
atis
CREATE TABLE table_name_68 ( attendance VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number in attendance for may 1
SELECT COUNT(attendance) FROM table_name_68 WHERE date = "may 1"
sql_create_context
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE Votes ( Id number, PostId number, VoteTypeId number, UserId number, CreationDate time, BountyAmount number ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE ReviewTaskSt...
SELECT b.Id AS "post_link", c.Name AS PostType, b.Score AS PostScore, COUNT(CASE WHEN a.VoteTypeId = 2 THEN 1 END) AS Helpful, COUNT(CASE WHEN a.VoteTypeId = 3 THEN 1 END) AS Unhelpful FROM PostFeedback AS a INNER JOIN Posts AS b ON a.PostId = b.Id INNER JOIN PostTypes AS c ON b.PostTypeId = c.Id WHERE b.OwnerUserId = ...
sede
CREATE TABLE table_22334 ( "Eliminated" real, "Wrestler" text, "Entered" real, "Eliminated by" text, "Method of elimination" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many entered the match with a time of 14:42?
SELECT "Entered" FROM table_22334 WHERE "Time" = '14:42'
wikisql
CREATE TABLE table_54431 ( "Player" text, "Position" text, "Date of Birth (Age)" text, "Caps" real, "Club/province" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player has a 1 February 1982 birthday and more than 16 caps?
SELECT "Player" FROM table_54431 WHERE "Caps" > '16' AND "Date of Birth (Age)" = '1 february 1982'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT jybgb.BGRQ FROM jybgb WHERE jybgb.BGDH = '42948232740'
css
CREATE TABLE ftxmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZD...
SELECT txmzjzjlb.JZKSRQ FROM txmzjzjlb WHERE txmzjzjlb.JZLSH = '21018594065' UNION SELECT ftxmzjzjlb.JZKSRQ FROM ftxmzjzjlb WHERE ftxmzjzjlb.JZLSH = '21018594065'
css
CREATE TABLE table_203_829 ( id number, "event" text, "record" text, "athlete(s)" text, "date" text, "time (s)" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the date of the last event listed ?
SELECT "date" FROM table_203_829 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense...
SELECT RANK() OVER (ORDER BY COUNT(DISTINCT pt.TagId) DESC) AS Rank, u.Id AS "user_link", COUNT(DISTINCT pt.TagId) AS "#_of_tags" FROM Users AS u INNER JOIN Posts AS a ON a.OwnerUserId = u.Id INNER JOIN Posts AS q ON a.ParentId = q.Id INNER JOIN PostTags AS pt ON pt.PostId = q.Id WHERE (a.CommunityOwnedDate IS NULL) GR...
sede
CREATE TABLE table_204_261 ( 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. -- what is the last nation on the list ?
SELECT "nation" FROM table_204_261 ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_name_72 ( favorable INTEGER, date VARCHAR, unfavorable VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which is the lowest favorable on 1954 June and more unfavorable than 45?
SELECT MIN(favorable) FROM table_name_72 WHERE date = "1954 june" AND unfavorable > 45
sql_create_context
CREATE TABLE table_59491 ( "Name" text, "Position" text, "League Apps" text, "League Goals" real, "FA Cup Apps" text, "FA Cup Goals" real, "League Cup Apps" text, "League Cup Goals" real, "Total Apps" text, "Total Goals" real ) -- Using valid SQLite, answer the following questi...
SELECT "Total Apps" FROM table_59491 WHERE "League Cup Apps" = '0 (1)' AND "Position" = 'df'
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 Id AS "post_link", Title, Score FROM Posts WHERE Posts.CreationDate > CURRENT_TIMESTAMP() - 21 ORDER BY Score DESC LIMIT 20
sede
CREATE TABLE table_62204 ( "Date From" text, "Date To" text, "Pos." text, "Name" text, "Moving To" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was febian brandy loaned out until, when was loaned out on 2 february 2009.?
SELECT "Date To" FROM table_62204 WHERE "Name" = 'febian brandy' AND "Date From" = '2 february 2009'
wikisql
CREATE TABLE table_12962773_14 ( year_born INTEGER, height VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the player born who is 2.02m tall?
SELECT MAX(year_born) FROM table_12962773_14 WHERE height = "2.02"
sql_create_context
CREATE TABLE table_2079 ( "Year" real, "Date" text, "Driver" text, "Team" text, "Manufacturer" text, "Laps" text, "Miles (km)" text, "Race Time" text, "Average Speed (mph)" text, "Report" text ) -- Using valid SQLite, answer the following questions for the tables provided above...
SELECT "Date" FROM table_2079 WHERE "Year" = '1974'
wikisql
CREATE TABLE table_name_7 ( d_42 VARCHAR, d_43 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the D 42 with D 43 of d 14
SELECT d_42 FROM table_name_7 WHERE d_43 = "d 14"
sql_create_context
CREATE TABLE table_27854 ( "Settlement" text, "Cyrillic Name Other Names" text, "Type" text, "Population (2011)" real, "Largest ethnic group (2002)" text, "Dominant religion (2002)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When ratkovo is ...
SELECT "Cyrillic Name Other Names" FROM table_27854 WHERE "Settlement" = 'Ratkovo'
wikisql
CREATE TABLE table_name_31 ( tournament VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If the French Open tournament had 2r in 2012, what was it in 2010?
SELECT 2010 FROM table_name_31 WHERE 2012 = "2r" AND tournament = "french open"
sql_create_context
CREATE TABLE table_40145 ( "Value" text, "\u20ac equiv." text, "Diameter" text, "Weight" text, "Composition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the value of the coin weighing 10.5 g and made of cupronickel?
SELECT "Value" FROM table_40145 WHERE "Composition" = 'cupronickel' AND "Weight" = '10.5 g'
wikisql
CREATE TABLE table_22883210_11 ( high_points VARCHAR, game VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 5 is the game who has the highest amount of points?
SELECT high_points FROM table_22883210_11 WHERE game = 5
sql_create_context
CREATE TABLE table_name_10 ( year_built VARCHAR, class VARCHAR, number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year was the class 253 larger than 18 built?
SELECT year_built FROM table_name_10 WHERE class = "class 253" AND number > 18
sql_create_context
CREATE TABLE table_name_5 ( to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What did billy andrade to par?
SELECT to_par FROM table_name_5 WHERE player = "billy andrade"
sql_create_context
CREATE TABLE follows ( f1 int(11), f2 int(11) ) CREATE TABLE user_profiles ( uid int(11), name varchar(255), email varchar(255), partitionid int(11), followers int(11) ) CREATE TABLE tweets ( id bigint(20), uid int(11), text char(140), createdate datetime ) -- Using valid...
SELECT name, followers FROM user_profiles ORDER BY followers DESC
nvbench
CREATE TABLE table_7649 ( "Week" real, "Date" text, "Opponent" text, "Game Site" text, "Final Score" text, "Record" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Record with a Game Site that is joe robbie stad...
SELECT "Record" FROM table_7649 WHERE "Game Site" = 'joe robbie stadium'
wikisql
CREATE TABLE table_name_61 ( points INTEGER, driver VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest points total scored by Dan Clarke in a grid higher than 10?
SELECT MAX(points) FROM table_name_61 WHERE driver = "dan clarke" AND grid > 10
sql_create_context
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE T...
SELECT COUNT(a.Id) AS "accepted_answers", SUM(CASE WHEN a.Score = 0 THEN 0 ELSE 1 END) AS "scored_answers", SUM(CASE WHEN a.Score = 0 THEN 1 ELSE 0 END) AS "unscored_answers", SUM(CASE WHEN a.Score = 0 THEN 1 ELSE 0 END) * 1000 / COUNT(a.Id) / 10.0 AS "percentage_unscored", MAX(a.CreationDate) AS LastActivity FROM Post...
sede
CREATE TABLE people ( People_ID int, Name text, Height real, Weight real, Birth_Date text, Birth_Place text ) CREATE TABLE body_builder ( Body_Builder_ID int, People_ID int, Snatch real, Clean_Jerk real, Total real ) -- Using valid SQLite, answer the following questions fo...
SELECT Body_Builder_ID, Snatch FROM body_builder
nvbench
CREATE TABLE wdmzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH number, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZ...
SELECT jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT gwyjzb.IN_DIAG_DIS_CD, gwyjzb.IN_DIAG_DIS_NM FROM gwyjzb WHERE gwyjzb.PERSON_ID = '89171613' UNION SELECT fgwyjzb.IN_DIAG_DIS_CD, fgwyjzb.IN_DIAG_DIS_NM FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '89171613'
css
CREATE TABLE table_71025 ( "County" text, "Kerry%" text, "Kerry#" real, "Bush%" text, "Bush#" real, "Others%" text, "Others#" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When Keey has 58.1% what % does Bush have?
SELECT "Bush%" FROM table_71025 WHERE "Kerry%" = '58.1%'
wikisql
CREATE TABLE table_28521 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" text, "U.S. viewers (million)" text ) -- Using valid SQLite, answer the following questions for the tables provided ab...
SELECT "Production code" FROM table_28521 WHERE "Original air date" = 'February20,2011'
wikisql
CREATE TABLE table_56566 ( "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 home team played the away team South Melbou...
SELECT "Home team" FROM table_56566 WHERE "Away team" = 'south melbourne'
wikisql
CREATE TABLE table_204_54 ( id number, "pondicherry assembly" text, "duration" text, "name of m.l.a." text, "party affiliation" text, "election year" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- the last winner of the twelfth pondicherry ass...
SELECT "name of m.l.a." FROM table_204_54 WHERE "pondicherry assembly" = 'twelfth'
squall
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 text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admityear < "2111" AND lab.label = "Heparin, LMW"
mimicsql_data
CREATE TABLE table_25556 ( "No." real, "#" real, "Title" text, "Directed by" text, "Written by" text, "U.S. viewers (million)" text, "Rank (week)" real, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the 1st air ...
SELECT "Original air date" FROM table_25556 WHERE "Written by" = 'Russel Friend & Garrett Lerner'
wikisql
CREATE TABLE table_204_913 ( id number, "#" number, "date" text, "venue" text, "opponent" text, "score" text, "result" text, "competition" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many times was laos the opponent ?
SELECT COUNT(*) FROM table_204_913 WHERE "opponent" = 'laos'
squall
CREATE TABLE airport ( airport_code varchar, airport_name text, airport_location text, state_code varchar, country_name varchar, time_zone_code varchar, minimum_connect_time int ) CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, ...
SELECT COUNT(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 WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DALLAS' AND CITY_2.city_cod...
atis
CREATE TABLE table_18378 ( "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. -- When was the first elected when the party was republican and the candida...
SELECT MIN("First elected") FROM table_18378 WHERE "Party" = 'Republican' AND "Candidates" = 'Robert H. Michel (R) 66.1% Rosa Lee Fox (D) 33.9%'
wikisql
CREATE TABLE table_name_80 ( qual_2 VARCHAR, team VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Ryan Hunter-Reay of the Herdez Competition's Qual 2 time?
SELECT qual_2 FROM table_name_80 WHERE team = "herdez competition" AND name = "ryan hunter-reay"
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_CLINIC_ID text, MED_DIRE_CD tex...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '80665777' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2001-06-23' AND '2021-06-24' AND t_kc22.MED_INV_ITEM_TYPE = '手术费'
css
CREATE TABLE dual_carrier ( main_airline varchar, low_flight_number int, high_flight_number int, dual_airline varchar, service_name text ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, m...
SELECT DISTINCT airline_code FROM airline WHERE airline_code = 'HP'
atis
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, itemid text, charttime text, flag text, value_unit text, label text, fluid text ) CREATE TABLE demographic (...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dod_year <= "2111.0" AND lab.fluid = "Cerebrospinal Fluid (CSF)"
mimicsql_data
CREATE TABLE table_11677691_3 ( player VARCHAR, hometown VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What player's hometown is Roebuck, South Carolina?
SELECT player FROM table_11677691_3 WHERE hometown = "Roebuck, South Carolina"
sql_create_context
CREATE TABLE party ( Party_ID int, Year real, Party text, Governor text, Lieutenant_Governor text, Comptroller text, Attorney_General text, US_Senate text ) CREATE TABLE election ( Election_ID int, Counties_Represented text, District int, Delegate text, Party int, ...
SELECT Governor, COUNT(Governor) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID WHERE T1.District = 1 GROUP BY Governor
nvbench
CREATE TABLE table_1059743_2 ( member_association VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many countries earned 177.2 points?
SELECT COUNT(member_association) FROM table_1059743_2 WHERE points = "177.2"
sql_create_context
CREATE TABLE table_47653 ( "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 w...
SELECT "Location Attendance" FROM table_47653 WHERE "Team" = 'philadelphia'
wikisql
CREATE TABLE table_name_61 ( final_round VARCHAR, weight VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What final round had a weight of 245?
SELECT final_round FROM table_name_61 WHERE weight = 245
sql_create_context
CREATE TABLE table_59364 ( "Region" text, "Date" text, "Label" text, "Format" text, "Catalog" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What label is in CD format in Australia?
SELECT "Label" FROM table_59364 WHERE "Format" = 'cd' AND "Region" = 'australia'
wikisql
CREATE TABLE zyjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH text, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZDZZBM...
SELECT * FROM person_info JOIN hz_info JOIN zzmzjzjlb JOIN jybgb JOIN jyjgzbb 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 AND zzmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND zzmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jy...
css
CREATE TABLE table_5258 ( "Episode" real, "Title" text, "Airdate (Canada)" text, "Airdate (USA)" text, "CBS airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the CBS airdate of the episode with a number under 70 with a USA airdate of 1...
SELECT "CBS airdate" FROM table_5258 WHERE "Episode" < '70' AND "Airdate (USA)" = '1 april 2005'
wikisql
CREATE TABLE table_name_25 ( circuit VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the circuit for round 18
SELECT circuit FROM table_name_25 WHERE round = 18
sql_create_context
CREATE TABLE table_34472 ( "Rank" real, "Player" text, "Country" text, "Earnings ( $ )" real, "Events" real, "Wins" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Country has a Rank of 5?
SELECT "Country" FROM table_34472 WHERE "Rank" = '5'
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.insurance = "Medicaid" AND procedures.icd9_code = "5198"
mimicsql_data
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_MZJZJLB text, YLJGDM_ZYJZJLB text, BGDH text, BGRQ time, JYLX number, JZLSH text, JZLSH_MZJZJLB text, JZLSH_ZYJZJLB text, JZLX number, KSBM text, ...
SELECT JYKSBM, JYKSMC FROM jybgb WHERE BGDH = '33231555965'
css
CREATE TABLE table_name_94 ( drawn VARCHAR, losing_bonus VARCHAR, played VARCHAR, points_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- For the club that had 453 points against, losing bonus of 5 and played of 22, what is the drawn?
SELECT drawn FROM table_name_94 WHERE played = "22" AND points_against = "453" AND losing_bonus = "5"
sql_create_context
CREATE TABLE table_name_61 ( wins VARCHAR, ballarat_fl VARCHAR, against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many total wins does Ballarat FL of East point have when the against is greater than 1000?
SELECT COUNT(wins) FROM table_name_61 WHERE ballarat_fl = "east point" AND against > 1000
sql_create_context
CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE Comments ( Id number, PostId number, ...
SELECT DISTINCT Tags.Id, Tags.TagName, 'site://tags/' + Tags.TagName + '/info|Url' AS Url, LENGTH(Posts.Body) FROM Tags LEFT JOIN Posts ON Posts.Id = Tags.WikiPostId OR Posts.Id = Tags.ExcerptPostId WHERE (LOWER(Posts.Body) LIKE '%secure.wikimedia.org%') ORDER BY Tags.Id
sede
CREATE TABLE table_name_83 ( tournament VARCHAR, opponent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Tournament, when the Opponent is Patricia Mayr-Achleitner?
SELECT tournament FROM table_name_83 WHERE opponent = "patricia mayr-achleitner"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text ) CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, ...
SELECT wdmzjzjlb.JZLSH FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '苏正诚' AND NOT wdmzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ >= '2021-04-1...
css
CREATE TABLE table_name_83 ( try_bonus VARCHAR, drawn VARCHAR, points_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What try bonus drew 0 and scored 427 points for?
SELECT try_bonus FROM table_name_83 WHERE drawn = "0" AND points_for = "427"
sql_create_context
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT KH, KLX FROM mzjzjlb WHERE JZLSH = '96594667159'
css
CREATE TABLE table_40956 ( "Position" text, "Jersey number" real, "Name v t e" text, "Height (cm)" real, "Weight (kg)" real, "Birthplace" text, "1995-96 team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the average Height (cm), f...
SELECT AVG("Height (cm)") FROM table_40956 WHERE "Position" = 'c' AND "1995-96 team" = 'buffalo sabres' AND "Weight (kg)" < '82'
wikisql
CREATE TABLE table_11613 ( "Type" text, "Model" text, "Tuner" text, "Host Interface" text, "Digital" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the digital for tuner of thomson dtt75105
SELECT "Digital" FROM table_11613 WHERE "Tuner" = 'thomson dtt75105'
wikisql