instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_80 ( opponent VARCHAR, loss VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who's the opponent when Diegomar Markwell is the loss?
SELECT opponent FROM table_name_80 WHERE loss = "diegomar markwell"
sql_create_context
CREATE TABLE jobs ( JOB_ID varchar(10), JOB_TITLE varchar(35), MIN_SALARY decimal(6,0), MAX_SALARY decimal(6,0) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLO...
SELECT HIRE_DATE, SUM(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40 ORDER BY SUM(EMPLOYEE_ID)
nvbench
CREATE TABLE table_26513 ( "Rank" real, "Dismissals" real, "Player" text, "Caught" real, "Stumped" real, "Matches" real, "Innings" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is stumped when inning is 143?
SELECT "Stumped" FROM table_26513 WHERE "Innings" = '143'
wikisql
CREATE TABLE table_name_46 ( pick INTEGER, round VARCHAR, overall VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest Pick that has a round greater than 6 and an overall greater than 216?
SELECT MAX(pick) FROM table_name_46 WHERE round > 6 AND overall > 216
sql_create_context
CREATE TABLE services ( service_id number, service_type_code text ) CREATE TABLE events ( event_id number, service_id number, event_details text ) CREATE TABLE participants_in_events ( event_id number, participant_id number ) CREATE TABLE participants ( participant_id number, part...
SELECT T1.participant_id, T1.participant_type_code, COUNT(*) FROM participants AS T1 JOIN participants_in_events AS T2 ON T1.participant_id = T2.participant_id GROUP BY T1.participant_id
spider
CREATE TABLE table_203_466 ( 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. -- which country was awarded more than 5 silver medals ?
SELECT "nation" FROM table_203_466 WHERE "silver" > 5
squall
CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, CreationDate time, UserId number, UserDisplayName text, Comment text, Text text, ContentLicense text ) CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE R...
SELECT * FROM Users AS us WHERE us.DisplayName LIKE '%haider%' AND Location LIKE '%islamabad%'
sede
CREATE TABLE t_kc22 ( MED_EXP_DET_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, MED_EXP_BILL_ID text, SOC_SRT_DIRE_CD text, SOC_SRT_DIRE_NM text, DIRE_TYPE number, CHA_ITEM_LEV number, MED_INV_ITEM_TYPE text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '金天和' AND t_kc22.STA_DATE BETWEEN '2004-06-28' AND '2015-02-16' AND t_kc22.SELF_PAY_PRO < 0.79
css
CREATE TABLE table_name_63 ( attendance INTEGER, opponents VARCHAR, falcons_points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average attendance of the game with 38 opponent and less than 14 Falcons points?
SELECT AVG(attendance) FROM table_name_63 WHERE opponents = 38 AND falcons_points < 14
sql_create_context
CREATE TABLE table_27001 ( "Name of Village" text, "Name in Syriac" text, "Number of Believers" real, "Number of Priests" real, "Number of Churches" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of believers for khosrowa
SELECT "Number of Believers" FROM table_27001 WHERE "Name of Village" = 'Khosrowa'
wikisql
CREATE TABLE table_6954 ( "Nation" text, "Skip" text, "Third" text, "Second" text, "Lead" text, "Alternate" text, "Club" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Rosa Pompanin was second for which club?
SELECT "Club" FROM table_6954 WHERE "Second" = 'rosa pompanin'
wikisql
CREATE TABLE table_24254 ( "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 (millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided a...
SELECT "Original air date" FROM table_24254 WHERE "U.S. viewers (millions)" = '3.3' AND "Written by" = 'Rob Wright'
wikisql
CREATE TABLE table_name_26 ( date VARCHAR, game VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date did a game higher than 10 have a score of 99-89?
SELECT date FROM table_name_26 WHERE game > 10 AND score = "99-89"
sql_create_context
CREATE TABLE table_69012 ( "Year" text, "Venue" text, "Winners" text, "Runner-up" text, "3rd place" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What year shows as Runner-up of england (24 pts)?
SELECT "Year" FROM table_69012 WHERE "Runner-up" = 'england (24 pts)'
wikisql
CREATE TABLE wedding ( Church_ID int, Male_ID int, Female_ID int, Year int ) CREATE TABLE church ( Church_ID int, Name text, Organized_by text, Open_Date int, Continuation_of text ) CREATE TABLE people ( People_ID int, Name text, Country text, Is_Male text, Age ...
SELECT Open_Date, COUNT(Open_Date) FROM church GROUP BY Open_Date ORDER BY Open_Date DESC
nvbench
CREATE TABLE table_2668336_24 ( candidates VARCHAR, district VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the candidates for district virginia 12?
SELECT candidates FROM table_2668336_24 WHERE district = "Virginia 12"
sql_create_context
CREATE TABLE table_name_13 ( signed VARCHAR, school VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Was the University of Michigan Signed?
SELECT signed FROM table_name_13 WHERE school = "university of michigan"
sql_create_context
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Has_amenity ( ...
SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name ORDER BY AVG(T1.Age) DESC
nvbench
CREATE TABLE table_33145 ( "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 away team scored 9.15 (69)?
SELECT "Away team" FROM table_33145 WHERE "Away team score" = '9.15 (69)'
wikisql
CREATE TABLE table_78552 ( "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. -- Who was South Melbourne's away opponents?
SELECT "Away team" FROM table_78552 WHERE "Home team" = 'south melbourne'
wikisql
CREATE TABLE table_56938 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Leading scorer" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the date of the Mavericks home game?
SELECT "Date" FROM table_56938 WHERE "Home" = 'mavericks'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.age < "74" AND procedures.icd9_code = "14"
mimicsql_data
CREATE TABLE table_15929156_3 ( others_votes VARCHAR, others__percentage VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of others votes for when others % is 2.0%
SELECT COUNT(others_votes) FROM table_15929156_3 WHERE others__percentage = "2.0%"
sql_create_context
CREATE TABLE table_37497 ( "Date" real, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Score of 7 6(3), 4 6, 6 2?
SELECT SUM("Date") FROM table_37497 WHERE "Score" = '7–6(3), 4–6, 6–2'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) 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_days text ) CREATE TABLE date_day ...
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 = 'ATLANTA' AND CITY_2.ci...
atis
CREATE TABLE table_name_46 ( listed VARCHAR, built VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the date Listed of the Bridge Built CA.1876?
SELECT listed FROM table_name_46 WHERE built = "ca.1876"
sql_create_context
CREATE TABLE table_3010 ( "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. -- When was successor David Atwood (R) seated?
SELECT "Date successor seated" FROM table_3010 WHERE "Successor" = 'David Atwood (R)'
wikisql
CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE food_service ( meal_code text, meal_number int, compartment text, meal_description varchar ) CREATE TABLE fare_basis ( fare_basis_code text, booking_class text, class_type text, premium text, econ...
SELECT DISTINCT fare.fare_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, date_day AS DATE_DAY_0, date_day AS DATE_DAY_1, days AS DAYS_0, days AS DAYS_1, fare, fare_basis, flight, flight_fare WHERE ...
atis
CREATE TABLE instructor ( instructor_id int, name varchar, uniqname varchar ) CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city v...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, instructor, offering_instructor WHERE course.course_id = course_offering.course_id AND course.number <> 329 AND instructor.name LIKE '%Rachel Croskery-roberts%' AND offering_instructor.instructor_id = instructor.instructor_id AN...
advising
CREATE TABLE table_214920_1 ( regional_county_municipality__rcm_ VARCHAR, density__pop_per_km2_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the RCM that has a density of 9.7?
SELECT regional_county_municipality__rcm_ FROM table_214920_1 WHERE density__pop_per_km2_ = "9.7"
sql_create_context
CREATE TABLE table_13249 ( "National team" text, "Club" text, "Year" text, "Apps" real, "Goals" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Goals have a National team of england, and Apps smaller than 6, and a Year of 2012?
SELECT SUM("Goals") FROM table_13249 WHERE "National team" = 'england' AND "Apps" < '6' AND "Year" = '2012'
wikisql
CREATE TABLE table_name_47 ( winning_score VARCHAR, runner_s__up VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the winning score of the event where Brian Kamm was the runner-up?
SELECT winning_score FROM table_name_47 WHERE runner_s__up = "brian kamm"
sql_create_context
CREATE TABLE table_59609 ( "Name" text, "Country" text, "Loan Club" text, "Started" text, "Ended" text, "Start Source" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- From which country was Sodje loaned?
SELECT "Country" FROM table_59609 WHERE "Name" = 'sodje'
wikisql
CREATE TABLE t_kc21 ( CLINIC_ID text, CLINIC_TYPE text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, ...
SELECT t_kc22.DIRE_TYPE 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 = '90338632862' AND t_kc22.SOC_SRT_DIRE_CD = '9147'
css
CREATE TABLE table_29037 ( "Season" real, "Series" text, "Team Name" text, "Races" real, "Wins" real, "Poles" real, "Podiums" real, "Points" real, "Final Placing" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When 12th is the final ...
SELECT "Wins" FROM table_29037 WHERE "Final Placing" = '12th'
wikisql
CREATE TABLE table_name_41 ( language VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Argentina's language?
SELECT language FROM table_name_41 WHERE country = "argentina"
sql_create_context
CREATE TABLE mzb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '8337353' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2002-09-25' AND '2014-10-08' UNION SELECT SUM(t_kc24.MED_AMOUT), SUM(t_kc24.OVE_PAY) FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_k...
css
CREATE TABLE Student ( StuID INTEGER, LName VARCHAR(12), Fname VARCHAR(12), Age INTEGER, Sex VARCHAR(1), Major INTEGER, Advisor INTEGER, city_code VARCHAR(3) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Has_amenity ( dormid...
SELECT Fname, COUNT(Fname) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T3.dorm_name = 'Smith Hall' GROUP BY Fname
nvbench
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 bedType, AVG(basePrice) FROM Rooms GROUP BY bedType ORDER BY AVG(basePrice) DESC
nvbench
CREATE TABLE table_10588 ( "Games" text, "Gold" text, "Silver" text, "Bronze" text, "Total" text, "Rank" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the rank in the 2009 Hanoi Games?
SELECT "Rank" FROM table_10588 WHERE "Games" = '2009 hanoi'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid num...
SELECT COUNT(DISTINCT t2.uniquepid) FROM (SELECT t1.uniquepid, t1.diagnosistime, t1.patienthealthsystemstayid FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = ...
eicu
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 WHERE demographic.religion = "PROTESTANT QUAKER" AND demographic.admityear < "2179"
mimicsql_data
CREATE TABLE courses ( course_id number, author_id number, subject_id number, course_name text, course_description text ) CREATE TABLE student_tests_taken ( registration_id number, date_test_taken time, test_result text ) CREATE TABLE student_course_enrolment ( registration_id numb...
SELECT test_result, COUNT(*) FROM student_tests_taken GROUP BY test_result ORDER BY COUNT(*) DESC
spider
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.BGDH FROM person_info JOIN hz_info JOIN wdmzjzjlb JOIN jybgb 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 AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE person_info.XM = '柳...
css
CREATE TABLE table_6958 ( "Date" text, "Title" text, "Director" text, "Producer" text, "Production Cost" text, "Singapore Gross" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the name of the producer that produced a film with a producti...
SELECT "Producer" FROM table_6958 WHERE "Production Cost" = '$1,000,000'
wikisql
CREATE TABLE table_62514 ( "7:30 am" text, "8:00 am" text, "9:00 am" text, "11:00 am" text, "noon" text, "12:30 pm" text, "1:00 pm" text, "1:30 pm" text, "2:00 pm" text, "3:00 pm" text, "3:30 pm" text, "4:00 pm" text, "5:00 pm" text, "6:30 pm" text ) -- Using va...
SELECT "1:30 pm" FROM table_62514 WHERE "4:00 pm" = 'pinky and the brain'
wikisql
CREATE TABLE table_name_98 ( region VARCHAR, catalog VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Region has a Catalog of kem 072?
SELECT region FROM table_name_98 WHERE catalog = "kem 072"
sql_create_context
CREATE TABLE table_5651 ( "Name" text, "Tenure" text, "Courtesy title" text, "Court Rank" text, "revenues" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the court rank of the person with a courtesy title of nagato-no-kami?
SELECT "Court Rank" FROM table_5651 WHERE "Courtesy title" = 'nagato-no-kami'
wikisql
CREATE TABLE table_76855 ( "Player" text, "Nationality" text, "Jersey Number(s)" real, "Position" text, "Years" text, "From" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What years did the united states player with a jersey number 25 who atten...
SELECT "Years" FROM table_76855 WHERE "Nationality" = 'united states' AND "Jersey Number(s)" < '25' AND "From" = 'delaware state'
wikisql
CREATE TABLE table_name_40 ( ties INTEGER, goals_for VARCHAR, wins VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many ties do teams with 25 Goals For and more than 5 wins have?
SELECT SUM(ties) FROM table_name_40 WHERE goals_for = 25 AND wins > 5
sql_create_context
CREATE TABLE table_11523 ( "Team" text, "Home city" text, "Stadium" text, "Capacity" real, "2011-12 season" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many people attended games at alberto picco stadium?
SELECT COUNT("Capacity") FROM table_11523 WHERE "Stadium" = 'alberto picco'
wikisql
CREATE TABLE table_9855 ( "Rank" real, "Venue name" text, "Highest attendance" text, "Location" text, "Current seating capacity" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Lowest Rank, when Location is Rio De Janeiro, Brazil, and when Cu...
SELECT MIN("Rank") FROM table_9855 WHERE "Location" = 'rio de janeiro, brazil' AND "Current seating capacity" < '78,838'
wikisql
CREATE TABLE table_66445 ( "Rank" real, "Athletes" text, "Country" text, "Time" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the rank for the competitor from Bulgaria?
SELECT MIN("Rank") FROM table_66445 WHERE "Country" = 'bulgaria'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE program_requirement ( program_id int, category varchar, min_credit int,...
SELECT DISTINCT course.department, course.name, course.number FROM course, course_offering, program, program_course, semester WHERE course.course_id = course_offering.course_id AND program_course.category LIKE '%PreMajor%' AND program_course.course_id = course.course_id AND program.name LIKE '%CS-LSA%' AND program.prog...
advising
CREATE TABLE table_name_79 ( republican VARCHAR, lead_margin VARCHAR, poll_source VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What percent is the lead margin of 25 that Republican: Jeff Beatty has according to poll source Rasmussen Reports?
SELECT republican AS :_jeff_beatty FROM table_name_79 WHERE lead_margin = 25 AND poll_source = "rasmussen reports"
sql_create_context
CREATE TABLE table_24431348_18 ( status VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the status of rank 20?
SELECT status FROM table_24431348_18 WHERE rank = 20
sql_create_context
CREATE TABLE table_26040 ( "No. in series" real, "No. in season" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Prod. code" text, "U.S. Viewers (in millions)" text ) -- Using valid SQLite, answer the following questions for the tables provided abo...
SELECT "U.S. Viewers (in millions)" FROM table_26040 WHERE "Title" = 'Ball of Trash'
wikisql
CREATE TABLE table_28925 ( "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. -- Who were the running candidates when Samuel Riker was the incumbent?
SELECT "Candidates" FROM table_28925 WHERE "Incumbent" = 'Samuel Riker'
wikisql
CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationD...
SELECT Id, ViewCount, Title, Tags, AnswerCount, CommentCount, FavoriteCount FROM Posts WHERE Id IN (SELECT PostId FROM Posts JOIN PostLinks ON Posts.Id = PostLinks.RelatedPostId WHERE RelatedPostId = 336859)
sede
CREATE TABLE table_5787 ( "District" text, "Incumbent" text, "Party" text, "Elected" real, "Status" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Status of reelected, and a Incumbent of danny marshall iii is what highest elected?
SELECT MAX("Elected") FROM table_5787 WHERE "Status" = 'reelected' AND "Incumbent" = 'danny marshall iii'
wikisql
CREATE TABLE table_204_631 ( id number, "#" number, "title" text, "english translation" text, "original album" text, "length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- how many total songs are on this album ?
SELECT COUNT("title") FROM table_204_631
squall
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Pericardial disease NEC" AND prescriptions.route = "PO"
mimicsql_data
CREATE TABLE film ( film_id number, rank_in_series number, number_in_season number, title text, directed_by text, original_air_date text, production_code text ) CREATE TABLE schedule ( cinema_id number, film_id number, date text, show_times_per_day number, price number )...
SELECT directed_by, COUNT(*) FROM film GROUP BY directed_by
spider
CREATE TABLE table_10278 ( "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 has a Home team score of 22.12 (1...
SELECT "Home team" FROM table_10278 WHERE "Home team score" = '22.12 (144)'
wikisql
CREATE TABLE market ( Market_ID int, District text, Num_of_employees int, Num_of_shops real, Ranking int ) CREATE TABLE phone ( Name text, Phone_ID int, Memory_in_G int, Carrier text, Price real ) CREATE TABLE phone_market ( Market_ID int, Phone_ID text, Num_of_stoc...
SELECT Carrier, SUM(Memory_in_G) FROM phone GROUP BY Carrier
nvbench
CREATE TABLE table_name_45 ( team VARCHAR, outgoing_manager VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which team had Christoph John as an outgoing manager?
SELECT team FROM table_name_45 WHERE outgoing_manager = "christoph john"
sql_create_context
CREATE TABLE table_24565004_3 ( position VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which position did pierre bajoc play?
SELECT position FROM table_24565004_3 WHERE name = "Pierre Bajoc"
sql_create_context
CREATE TABLE table_7502 ( "Date" text, "Tournament" text, "Venue" text, "Opponent" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the 2012 Waff Women's Futsal Championship game the team played against Iraq?
SELECT "Result" FROM table_7502 WHERE "Tournament" = '2012 waff women''s futsal championship' AND "Opponent" = 'iraq'
wikisql
CREATE TABLE table_32094 ( "Name" text, "Canton" text, "Height (meters)" real, "Crest length (meters)" real, "Type" text, "Year of construction" real, "Name of the Lake" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the name of lake...
SELECT "Name of the Lake" FROM table_32094 WHERE "Crest length (meters)" = '430'
wikisql
CREATE TABLE table_24565004_2 ( appearances¹ VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the appearances for bernard allou
SELECT appearances¹ FROM table_24565004_2 WHERE name = "Bernard Allou"
sql_create_context
CREATE TABLE table_41196 ( "Game" real, "Date" text, "Set 1" text, "Set 2" text, "Set 3" text, "Set 4" text, "Set 5" text, "Result (sets)" text, "Result (Pts)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of the Gam...
SELECT SUM("Game") FROM table_41196 WHERE "Set 4" = '25-21' AND "Set 3" = '25-23'
wikisql
CREATE TABLE table_name_97 ( d_48_√ VARCHAR, d_40_√ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the D 48 when the D 40 is D 37?
SELECT d_48_√ FROM table_name_97 WHERE d_40_√ = "d 37"
sql_create_context
CREATE TABLE hz_info ( KH text, KLX number, RYBH text, YLJGDM text, person_info_CSD text, person_info_CSRQ time, person_info_GJDM text, person_info_GJMC text, person_info_JGDM text, person_info_JGMC text, person_info_MZDM text, person_info_MZMC text, person_info_XBDM ...
SELECT jybgb.SHSJ FROM hz_info JOIN mzjzjlb JOIN jybgb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB WHERE hz_info.person_info_XM = '俞夏岚' AND jybgb.BGRQ BETWEEN '2002-05-16' AND '2003-11-27' ...
css
CREATE TABLE event ( ID int, Name text, Stadium_ID int, Year text ) CREATE TABLE swimmer ( ID int, name text, Nationality text, meter_100 real, meter_200 text, meter_300 text, meter_400 text, meter_500 text, meter_600 text, meter_700 text, Time text ) CREATE...
SELECT name, COUNT(name) FROM swimmer AS t1 JOIN record AS t2 ON t1.ID = t2.Swimmer_ID WHERE Result = 'Win' GROUP BY name ORDER BY COUNT(name)
nvbench
CREATE TABLE table_name_50 ( losses VARCHAR, played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the total number of losses for the over 30 games played?
SELECT COUNT(losses) FROM table_name_50 WHERE played > 30
sql_create_context
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom te...
SELECT SUM(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 88191)) AND outputevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'che...
mimic_iii
CREATE TABLE table_78359 ( "Year" real, "Network" text, "Lap-by-lap" text, "s Color commentator" text, "Pre-Race Host" text, "Pre-Race Analyst(s)" text, "Ratings" text, "Viewers" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many Ra...
SELECT "Ratings" FROM table_78359 WHERE "Year" = '2013'
wikisql
CREATE TABLE table_30366 ( "No. in series" real, "Title" text, "Directed by" text, "Written by" text, "Original air date" text, "Production code" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many different production codes does the episode...
SELECT COUNT("Production code") FROM table_30366 WHERE "Original air date" = 'October 18, 1984'
wikisql
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 ta ( campus_job_id int, student_id int, location varchar ) CREATE TAB...
SELECT DISTINCT instructor.name FROM instructor INNER JOIN offering_instructor ON offering_instructor.instructor_id = instructor.instructor_id INNER JOIN course_offering ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN course ON course.course_id = course_offering.course_id WHERE course.name L...
advising
CREATE TABLE table_79476 ( "Round" real, "Pick" real, "Player" text, "Position" text, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average pick of player jim h. mitchell?
SELECT AVG("Pick") FROM table_79476 WHERE "Player" = 'jim h. mitchell'
wikisql
CREATE TABLE table_58534 ( "Driver" text, "Constructor" text, "Laps" real, "Time/Retired" text, "Grid" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps with a grid larger than 7 did a Lotus - Ford do with a Time/Retired of + 2 laps?
SELECT SUM("Laps") FROM table_58534 WHERE "Grid" > '7' AND "Constructor" = 'lotus - ford' AND "Time/Retired" = '+ 2 laps'
wikisql
CREATE TABLE table_24122653_2 ( reward VARCHAR, eliminated VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the reward for the elimination of Peterson?
SELECT reward FROM table_24122653_2 WHERE eliminated = "Peterson"
sql_create_context
CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospitalid number, wardid number, admissionheight number, admissionweight number, dischargeweight number, hospitaladmittime time, ...
SELECT COUNT(*) > 0 FROM vitalperiodic WHERE vitalperiodic.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '002-34744')) AND vitalperiodic.sao2 > 64.0 AND NOT vitalperiodic.sao...
eicu
CREATE TABLE table_29813 ( "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_29813 WHERE "High rebounds" = 'Andray Blatche (9)'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( ...
SELECT (SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'acute respiratory failure' AND STRFTIME('%y', diagnosis.diagnosistime) <= '2104') AS t1) - (SELECT C...
eicu
CREATE TABLE table_14342480_7 ( points VARCHAR, position VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points were scored by someone who's position was right tackle?
SELECT COUNT(points) FROM table_14342480_7 WHERE position = "Right tackle"
sql_create_context
CREATE TABLE gyb ( CLINIC_ID text, COMP_ID text, DATA_ID text, DIFF_PLACE_FLG number, FERTILITY_STS number, FLX_MED_ORG_ID text, HOSP_LEV number, HOSP_STS number, IDENTITY_CARD text, INPT_AREA_BED text, INSURED_IDENTITY number, INSURED_STS text, INSU_TYPE text, IN...
SELECT qtb.MED_CLINIC_ID FROM qtb WHERE qtb.PERSON_ID = '73140420' AND qtb.MED_SER_ORG_NO = '2020501' AND NOT qtb.OUT_DIAG_DIS_NM LIKE '%活动%' UNION SELECT gyb.MED_CLINIC_ID FROM gyb WHERE gyb.PERSON_ID = '73140420' AND gyb.MED_SER_ORG_NO = '2020501' AND NOT gyb.OUT_DIAG_DIS_NM LIKE '%活动%' UNION SELECT zyb.MED_CLINIC_ID...
css
CREATE TABLE table_name_29 ( d_48 VARCHAR, d_44 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the D 48 when it has a D 44 of d 33
SELECT d_48 FROM table_name_29 WHERE d_44 = "d 33"
sql_create_context
CREATE TABLE weather ( date TEXT, max_temperature_f INTEGER, mean_temperature_f INTEGER, min_temperature_f INTEGER, max_dew_point_f INTEGER, mean_dew_point_f INTEGER, min_dew_point_f INTEGER, max_humidity INTEGER, mean_humidity INTEGER, min_humidity INTEGER, max_sea_level_pre...
SELECT name, id FROM station AS T1 JOIN status AS T2 ON T1.id = T2.station_id WHERE T2.bikes_available > 12 ORDER BY name DESC
nvbench
CREATE TABLE table_26795 ( "Version" text, "Dock Connection" text, "AUX In" text, "Battery" text, "iPhone Certified" text, "Video Out" text, "Dual Voltage" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many connections aux in using FIre...
SELECT COUNT("AUX In") FROM table_26795 WHERE "Dock Connection" = 'FireWire'
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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.ethnicity = "HISPANIC/LATINO - PUERTO RICAN" AND prescriptions.drug = "Albuterol"
mimicsql_data
CREATE TABLE table_18848 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" real, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the weight in kg...
SELECT "Weight (kg)" FROM table_18848 WHERE "Race" = 'Ranvet Stakes'
wikisql
CREATE TABLE table_44 ( "Scheme" text, "Tariff code" text, "BTs retail price (regulated)" text, "Approx premium" text, "Prefixes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many tariff codes have a bts retail price of 2.553p/min?
SELECT COUNT("Tariff code") FROM table_44 WHERE "BTs retail price (regulated)" = '2.553p/min'
wikisql
CREATE TABLE table_9307 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which week was the November 5, 1978 game which had an attendance larger than 62,989?
SELECT "Week" FROM table_9307 WHERE "Attendance" > '62,989' AND "Date" = 'november 5, 1978'
wikisql
CREATE TABLE roles ( role_code text, role_description text ) CREATE TABLE ref_document_types ( document_type_code text, document_type_description text ) CREATE TABLE document_drafts ( document_id number, draft_number number, draft_details text ) CREATE TABLE employees ( employee_id nu...
SELECT document_type_code FROM ref_document_types
spider
CREATE TABLE table_12547903_3 ( callsign VARCHAR, location VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the callsign in Zamboanga?
SELECT callsign FROM table_12547903_3 WHERE location = "Zamboanga"
sql_create_context
CREATE TABLE table_28883 ( "District" text, "Incumbent" text, "Party" text, "First elected" text, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What district(s) did henry clay represent?
SELECT "District" FROM table_28883 WHERE "Incumbent" = 'Henry Clay'
wikisql
CREATE TABLE Staff ( staff_id INTEGER, staff_gender VARCHAR(1), staff_name VARCHAR(80) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_from DATETIME, date_to DATETIME ) CREATE TABLE Products ( product_id INTEGER, product_type_code VARCHAR(10), ...
SELECT customer_name, customer_id FROM Customers WHERE customer_address LIKE "%TN%" ORDER BY customer_id
nvbench
CREATE TABLE table_13563 ( "Year" text, "1851" text, "1861" text, "1871" text, "1881" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the 1881 with 1961 in 1851?
SELECT "1881" FROM table_13563 WHERE "1851" = '1961'
wikisql
CREATE TABLE table_54448 ( "Team" text, "Played" real, "Draw" real, "Lost" real, "Goals For" real, "Goals Against" real, "Goal Difference" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Tell me the totla number of goal dif...
SELECT COUNT("Goal Difference") FROM table_54448 WHERE "Goals Against" = '30' AND "Played" < '18'
wikisql