instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_1 ( home VARCHAR, leading_scorer VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the home of the team with Carlos Boozer (27) as the leading scorer?
SELECT home FROM table_name_1 WHERE leading_scorer = "carlos boozer (27)"
sql_create_context
CREATE TABLE weather ( date text, max_temperature_f number, mean_temperature_f number, min_temperature_f number, max_dew_point_f number, mean_dew_point_f number, min_dew_point_f number, max_humidity number, mean_humidity number, min_humidity number, max_sea_level_pressure_inc...
SELECT zip_code FROM weather GROUP BY zip_code ORDER BY AVG(mean_sea_level_pressure_inches) LIMIT 1
spider
CREATE TABLE table_51456 ( "Rank" text, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which rank has more than 1 silver and a total nation?
SELECT "Rank" FROM table_51456 WHERE "Silver" > '1' AND "Nation" = 'total'
wikisql
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE PostFeedback ( Id number, PostId number, IsAnonymous boolean, VoteTypeId number, CreationDate time ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE S...
SELECT a.Id AS "post_link", a.Score FROM Posts AS a INNER JOIN Posts AS q ON a.ParentId = q.Id WHERE a.OwnerUserId = '##userid##' AND q.AnswerCount > 1 ORDER BY a.Score DESC
sede
CREATE TABLE Staff ( staff_id INTEGER, staff_address_id INTEGER, nickname VARCHAR(80), first_name VARCHAR(80), middle_name VARCHAR(80), last_name VARCHAR(80), date_of_birth DATETIME, date_joined_staff DATETIME, date_left_staff DATETIME ) CREATE TABLE Vehicles ( vehicle_id INTEGE...
SELECT customer_status_code, COUNT(*) FROM Customers GROUP BY customer_status_code
nvbench
CREATE TABLE mzjzjlb ( HXPLC number, HZXM text, JLSJ time, JZJSSJ time, JZKSBM text, JZKSMC text, JZKSRQ time, JZLSH text, JZZDBM text, JZZDSM text, JZZTDM number, JZZTMC text, KH text, KLX number, MJZH text, ML number, MZZYZDZZBM text, MZZYZDZZMC ...
SELECT COUNT(*) FROM mzjzjlb WHERE mzjzjlb.YLJGDM = '8513028' AND mzjzjlb.JZKSRQ BETWEEN '2015-06-14' AND '2017-01-10' AND mzjzjlb.ZSEBZ > 0
css
CREATE TABLE table_79087 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Results" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the incumbent who was first elected before 2002 from the maryland 3 district?
SELECT "Incumbent" FROM table_79087 WHERE "First elected" < '2002' AND "District" = 'maryland 3'
wikisql
CREATE TABLE ref_incident_type ( incident_type_code text, incident_type_description text ) CREATE TABLE ref_detention_type ( detention_type_code text, detention_type_description text ) CREATE TABLE student_addresses ( student_id number, address_id number, date_address_from time, date_a...
SELECT first_name, last_name FROM teachers ORDER BY last_name
spider
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE time_interval ( period text, begin_time int, end_time int ) CREATE TABLE class_of_service ( booking_class varchar, rank int, class_description text ) CREATE TABLE time_zone ( time_zone_code tex...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'OAKLAND' AND date_day.day_number = 21 AND date_day.month_number = 2 AND d...
atis
CREATE TABLE table_54240 ( "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 time/retired when the laps is 6, the grid is less than 18 and the driver is clay regazz...
SELECT "Time/Retired" FROM table_54240 WHERE "Laps" = '6' AND "Grid" < '18' AND "Driver" = 'clay regazzoni'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE lab ( subject_id text, hadm_id text, ...
SELECT 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 = "DMII oth uncntrld" AND prescriptions.route = "PR"
mimicsql_data
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT jybgb.KSBM, jybgb.KSMC FROM jybgb WHERE jybgb.BGDH = '55858343244'
css
CREATE TABLE t_kc21 ( MED_CLINIC_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, COMP_ID text, PERSON_ID text, PERSON_NM text, IDENTITY_CARD text, SOC_SRT_CARD text, PERSON_SEX number, PERSON_AGE number, IN_HOSP_DATE time, OUT_HOSP_DATE time, DIFF_PLACE_FLG numb...
SELECT MED_ORG_DEPT_NM, IN_DIAG_DIS_NM, AVG(PERSON_AGE) FROM t_kc21 WHERE MED_SER_ORG_NO = '3385540' GROUP BY MED_ORG_DEPT_NM, IN_DIAG_DIS_NM HAVING AVG(PERSON_AGE) < 14
css
CREATE TABLE table_45677 ( "Lane" real, "Name" text, "Country" text, "Mark" text, "React" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the mark is 8.54, the reaction time was over 0.23800000000000002 seconds, what's the hig...
SELECT MAX("Points") FROM table_45677 WHERE "Mark" = '8.54' AND "React" > '0.23800000000000002'
wikisql
CREATE TABLE table_22708 ( "Period" text, "Live births per year" text, "Deaths per year" text, "Natural change per year" text, "CBR*" text, "CDR*" text, "NC*" text, "TFR*" text, "IMR*" real, "Life expectancy total" text, "Life expectancy males" text, "Life expectancy fema...
SELECT "CDR*" FROM table_22708 WHERE "Life expectancy total" = '61.5'
wikisql
CREATE TABLE table_38414 ( "Character" text, "Actor" text, "Years" text, "Series" text, "Episode Count" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Years have a Character of dr trevor stewart?
SELECT "Years" FROM table_38414 WHERE "Character" = 'dr trevor stewart'
wikisql
CREATE TABLE table_name_89 ( english_title VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the English title of the film from 2001?
SELECT english_title FROM table_name_89 WHERE year = 2001
sql_create_context
CREATE TABLE department ( dept_code VARCHAR, dept_name VARCHAR ) CREATE TABLE CLASS ( class_code VARCHAR, crs_code VARCHAR ) CREATE TABLE course ( crs_code VARCHAR, dept_code VARCHAR ) CREATE TABLE enroll ( class_code VARCHAR ) -- Using valid SQLite, answer the following questions for t...
SELECT COUNT(*) FROM CLASS AS T1 JOIN enroll AS T2 ON T1.class_code = T2.class_code JOIN course AS T3 ON T1.crs_code = T3.crs_code JOIN department AS T4 ON T3.dept_code = T4.dept_code WHERE T4.dept_name = 'Accounting'
sql_create_context
CREATE TABLE table_64199 ( "Province" text, "Inhabitants" real, "established" real, "President" text, "Party" text, "Election" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the party affiliation for President Stefano Baccelli?
SELECT "Party" FROM table_64199 WHERE "President" = 'stefano baccelli'
wikisql
CREATE TABLE table_name_44 ( goals_for INTEGER, games_played INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the number of Goals For for Games Played more than 8?
SELECT SUM(goals_for) FROM table_name_44 WHERE games_played > 8
sql_create_context
CREATE TABLE table_7888 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" text, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the sum of the points when attendance is ...
SELECT SUM("Points") FROM table_7888 WHERE "Attendance" = '8,000' AND "Date" = 'february 22'
wikisql
CREATE TABLE perpetrator ( Country VARCHAR, Injured INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the countries that have both perpetrators with injures more than 50 and perpetrators with injures smaller than 20.
SELECT Country FROM perpetrator WHERE Injured > 50 INTERSECT SELECT Country FROM perpetrator WHERE Injured < 20
sql_create_context
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_typ...
SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE NOT admissions.dischtime IS NULL
mimic_iii
CREATE TABLE table_70372 ( "Category" text, "Film" text, "Director(s)" text, "Country" text, "Nominating Festival" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What film was directed by Sandro Aguilar?
SELECT "Film" FROM table_70372 WHERE "Director(s)" = 'sandro aguilar'
wikisql
CREATE TABLE files ( f_id number, artist_name text, file_size text, duration text, formats text ) CREATE TABLE song ( song_name text, artist_name text, country text, f_id number, genre_is text, rating number, languages text, releasedate time, resolution number ) ...
SELECT T1.artist_name, T1.country FROM artist AS T1 JOIN song AS T2 ON T1.artist_name = T2.artist_name ORDER BY T2.rating DESC LIMIT 3
spider
CREATE TABLE table_name_76 ( other_apps INTEGER, division VARCHAR, league_goals VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Division One's average Other Apps, with a League Goal less than 1?
SELECT AVG(other_apps) FROM table_name_76 WHERE division = "one" AND league_goals < 1
sql_create_context
CREATE TABLE table_67444 ( "Date" text, "Opponent" text, "Score" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score of the game with the San Diego Padres as the opponent and a record of 11-23?
SELECT "Score" FROM table_67444 WHERE "Opponent" = 'san diego padres' AND "Record" = '11-23'
wikisql
CREATE TABLE table_203_654 ( id number, "position" number, "team" text, "points" number, "played" number, "won" number, "drawn" number, "lost" number, "for" number, "against" number, "difference" number ) -- Using valid SQLite, answer the following questions for the tables ...
SELECT "team" FROM table_203_654 WHERE "points" = 13
squall
CREATE TABLE table_22871 ( "Outcome" text, "Year" real, "Championship" text, "Surface" text, "Partner" text, "Opponents" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many times was the score 6 7(5), 6 2, 6 3?
SELECT COUNT("Opponents") FROM table_22871 WHERE "Score" = '6–7(5), 6–2, 6–3'
wikisql
CREATE TABLE ENROLL ( CLASS_CODE varchar(5), STU_NUM int, ENROLL_GRADE varchar(50) ) CREATE TABLE STUDENT ( STU_NUM int, STU_LNAME varchar(15), STU_FNAME varchar(15), STU_INIT varchar(1), STU_DOB datetime, STU_HRS int, STU_CLASS varchar(2), STU_GPA float(8), STU_TRANSFER...
SELECT PROF_OFFICE, COUNT(PROF_OFFICE) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM JOIN COURSE AS T3 ON T1.CRS_CODE = T3.CRS_CODE JOIN PROFESSOR AS T4 ON T2.EMP_NUM = T4.EMP_NUM GROUP BY PROF_OFFICE ORDER BY PROF_OFFICE
nvbench
CREATE TABLE table_204_192 ( id number, "year" number, "team" text, "co-drivers" text, "car" text, "class" text, "laps" number, "pos." text, "class\npos." text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- previous to being on the bmw mo...
SELECT "team" FROM table_204_192 WHERE "year" < (SELECT "year" FROM table_204_192 WHERE "team" = 'bmw motorsport')
squall
CREATE TABLE Customers ( customer_id INTEGER, customer_first_name VARCHAR(50), customer_middle_initial VARCHAR(1), customer_last_name VARCHAR(50), gender VARCHAR(1), email_address VARCHAR(255), login_name VARCHAR(80), login_password VARCHAR(20), phone_number VARCHAR(255), town_ci...
SELECT COUNT(*), customer_id FROM Accounts GROUP BY customer_id
nvbench
CREATE TABLE table_12332 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Score, when Attendance is '76', and when Home Team is 'Meir Ka'?
SELECT "Score" FROM table_12332 WHERE "Attendance" = '76' AND "Home team" = 'meir ka'
wikisql
CREATE TABLE table_33874 ( "Player" text, "Ranking" text, "Event" text, "Surface" text, "Round" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Surface has a Score of 2009 wta tour?
SELECT "Surface" FROM table_33874 WHERE "Score" = '2009 wta tour'
wikisql
CREATE TABLE table_33618 ( "Round" real, "Overall" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many drafts featured fred hoaglin?
SELECT COUNT("Overall") FROM table_33618 WHERE "Player" = 'fred hoaglin'
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 diagnoses ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.expire_flag = "1" AND diagnoses.short_title = "Ventricular shunt status"
mimicsql_data
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 Affiliation, SUM(Enrollment) FROM university WHERE Founded > 1850 GROUP BY Affiliation ORDER BY Affiliation
nvbench
CREATE TABLE table_name_29 ( result VARCHAR, game_site VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the Result of the Game at the Meadowlands on 1991-09-01?
SELECT result FROM table_name_29 WHERE game_site = "the meadowlands" AND date = "1991-09-01"
sql_create_context
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE jybgb ( YLJGDM text, YLJGDM_M...
SELECT mzjzjlb.JZZDBM, mzjzjlb.JZZDSM FROM person_info JOIN hz_info JOIN mzjzjlb 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 WHERE person_info.XM = '吕秀艳'
css
CREATE TABLE table_24108789_6 ( events VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of events for 3031
SELECT COUNT(events) FROM table_24108789_6 WHERE points = 3031
sql_create_context
CREATE TABLE table_name_29 ( thai_name VARCHAR, transcription VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Show the Thai name of wan phruehatsabodi?
SELECT thai_name FROM table_name_29 WHERE transcription = "wan phruehatsabodi"
sql_create_context
CREATE TABLE requirement ( requirement_id int, requirement varchar, college varchar ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE student_record ( student_id int, course_id int, semester int, grade varc...
SELECT DISTINCT course.department, course.name, course.number FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN semester ON semester.semester_id = course_offering.semester INNER JOIN program_course ON program_course.course_id = course_offering.course_id WHERE program_cour...
advising
CREATE TABLE enzyme ( id number, name text, location text, product text, chromosome text, omim number, porphyria text ) CREATE TABLE medicine_enzyme_interaction ( enzyme_id number, medicine_id number, interaction_type text ) CREATE TABLE medicine ( id number, name text,...
SELECT COUNT(DISTINCT fda_approved) FROM medicine
spider
CREATE TABLE table_name_89 ( place VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Place has a Player of seve ballesteros?
SELECT place FROM table_name_89 WHERE player = "seve ballesteros"
sql_create_context
CREATE TABLE table_80296 ( "Track" real, "Recorded" text, "Catalogue" text, "Release Date" text, "Chart Peak" text, "Song Title" text, "Writer(s)" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What catalogue is the song It'...
SELECT "Catalogue" FROM table_80296 WHERE "Song Title" = 'it''s now or never'
wikisql
CREATE TABLE table_3797 ( "Branding" text, "Callsign" text, "Frequency" text, "Power (kW)" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the branding for the station located in san jose del monte?
SELECT "Branding" FROM table_3797 WHERE "Location" = 'San Jose Del Monte'
wikisql
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE PostHistory ( Id number, PostHistoryTypeId number, PostId number, RevisionGUID other, C...
SELECT Id, Title, Score, OwnerDisplayName, OwnerUserId FROM Posts WHERE PostTypeId = 1 ORDER BY Score DESC
sede
CREATE TABLE table_name_40 ( club VARCHAR, rank VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Club has a Rank of 5?
SELECT club FROM table_name_40 WHERE rank = "5"
sql_create_context
CREATE TABLE table_name_67 ( position VARCHAR, entrant VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Position that has the Entrant of j ampt?
SELECT position FROM table_name_67 WHERE entrant = "j ampt"
sql_create_context
CREATE TABLE table_204_492 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the number of world indoor championships appearances gordeeva has made ?
SELECT COUNT(*) FROM table_204_492 WHERE "competition" = 'world indoor championships'
squall
CREATE TABLE table_203_74 ( id number, "rank" number, "urban area" text, "population\n(2001 census)" number, "area (km2)" number, "density (people/km2)" number, "major subdivisions" text, "metropolitan area" text ) -- Using valid SQLite, answer the following questions for the tables pr...
SELECT "urban area" FROM table_203_74 WHERE "rank" = 1
squall
CREATE TABLE table_11959669_6 ( team VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the team when the score is 88 86?
SELECT team FROM table_11959669_6 WHERE score = "88–86"
sql_create_context
CREATE TABLE student ( student_id int, lastname varchar, firstname varchar, program_id int, declare_major varchar, total_credit int, total_gpa float, entered_as varchar, admit_term int, predicted_graduation_semester int, degree varchar, minor varchar, internship varch...
SELECT COUNT(*) > 0 FROM course WHERE department = 'EECS' AND has_lab = 'Y' AND number = 498
advising
CREATE TABLE table_61470 ( "Tie no" text, "Home team" text, "Score" text, "Away team" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the game played that had Rochdale as the away team?
SELECT "Date" FROM table_61470 WHERE "Away team" = 'rochdale'
wikisql
CREATE TABLE table_15256 ( "Club" text, "Played" text, "Drawn" text, "Lost" text, "Points for" text, "Points against" text, "Tries for" text, "Tries against" text, "Try bonus" text, "Losing bonus" text ) -- Using valid SQLite, answer the following questions for the tables provi...
SELECT "Tries against" FROM table_15256 WHERE "Points against" = '961'
wikisql
CREATE TABLE table_33042 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Attendance" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of the game played in front of 65,473?
SELECT "Result" FROM table_33042 WHERE "Attendance" = '65,473'
wikisql
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 All_Games, School_ID FROM basketball_match
nvbench
CREATE TABLE table_10705060_1 ( poles INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the least number of poles?
SELECT MIN(poles) FROM table_10705060_1
sql_create_context
CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE cost ( costid number, u...
SELECT DISTINCT patient.gender FROM patient WHERE patient.uniquepid = '006-50368'
eicu
CREATE TABLE table_19996 ( "School Year" text, "Class A" text, "Class AA" text, "Class AAA" text, "Class AAAA" text, "Class AAAAA" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is in class during 1995-96?
SELECT "Class AAAAA" FROM table_19996 WHERE "School Year" = '1995-96'
wikisql
CREATE TABLE table_name_40 ( country VARCHAR, of_1 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country has OF-1 Locotenent?
SELECT country FROM table_name_40 WHERE of_1 = "locotenent"
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 COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_ID = '55185411' AND t_kc22.STA_DATE BETWEEN '2003-04-12' AND '2008-09-25' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_ID = '5...
css
CREATE TABLE table_name_63 ( player VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which player is associated with the date June 14, 1969?
SELECT player FROM table_name_63 WHERE date = "june 14, 1969"
sql_create_context
CREATE TABLE table_name_27 ( capital VARCHAR, largest_city VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the capital for the state that has the largest city of Burlington?
SELECT capital FROM table_name_27 WHERE largest_city = "burlington"
sql_create_context
CREATE TABLE member_attendance ( Member_ID int, Performance_ID int, Num_of_Pieces int ) CREATE TABLE performance ( Performance_ID real, Date text, Host text, Location text, Attendance int ) CREATE TABLE member ( Member_ID text, Name text, Nationality text, Role text ) ...
SELECT Date, COUNT(Date) FROM member_attendance AS T1 JOIN member AS T2 ON T1.Member_ID = T2.Member_ID JOIN performance AS T3 ON T1.Performance_ID = T3.Performance_ID WHERE T2.Role = "Violin" GROUP BY Date ORDER BY Date DESC
nvbench
CREATE TABLE table_name_61 ( lost VARCHAR, against VARCHAR, drawn VARCHAR, points VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How much Lost has a Drawn larger than 1, and Points smaller than 14, and an Against larger than 10?
SELECT COUNT(lost) FROM table_name_61 WHERE drawn > 1 AND points < 14 AND against > 10
sql_create_context
CREATE TABLE table_2638104_1 ( signal_power VARCHAR, callsign VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the signal power for JOAB-DTV?
SELECT signal_power FROM table_2638104_1 WHERE callsign = "JOAB-DTV"
sql_create_context
CREATE TABLE table_178389_1 ( sub_parish__sogn_ VARCHAR, church_name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sub-parish for the church names H yanger Kyrkje?
SELECT sub_parish__sogn_ FROM table_178389_1 WHERE church_name = "Høyanger kyrkje"
sql_create_context
CREATE TABLE table_name_57 ( played INTEGER, blackpool INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Played is the lowest one that has a Blackpool smaller than 0?
SELECT MIN(played) FROM table_name_57 WHERE blackpool < 0
sql_create_context
CREATE TABLE table_262495_1 ( type VARCHAR, nickname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When falcons are the nickname what is the type?
SELECT type FROM table_262495_1 WHERE nickname = "Falcons"
sql_create_context
CREATE TABLE table_10470082_5 ( title VARCHAR, _number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many titles have the number 11
SELECT COUNT(title) FROM table_10470082_5 WHERE _number = 11
sql_create_context
CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, MarkdownPostOwnerGuidance text, MarkdownPrivilegedUserGuidance text, MarkdownConcensusDescription text, CreationDate time, CreationModeratorId number, ApprovalDa...
SELECT TAG.Id, TAG.TagName, COUNT(*) AS numPosts FROM Posts INNER JOIN PostTags AS PT ON PT.PostId = Posts.Id INNER JOIN Tags AS TAG ON TAG.Id = PT.TagId WHERE PostTypeId = 1 GROUP BY TAG.Id, TAG.TagName ORDER BY numPosts DESC
sede
CREATE TABLE table_204_547 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" number, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which competitor was slower , hrafnhildur luthersdottir or jenna lau...
SELECT "name" FROM table_204_547 WHERE "name" IN ('hrafnhildur luthersdottir', 'jenna laukkanen') ORDER BY "time" DESC LIMIT 1
squall
CREATE TABLE offering_instructor ( offering_instructor_id int, offering_id int, instructor_id int ) CREATE TABLE comment_instructor ( instructor_id int, student_id int, score int, comment_text varchar ) CREATE TABLE gsi ( course_offering_id int, student_id int ) CREATE TABLE cours...
SELECT DISTINCT course.department, course.name, course.number, semester.semester FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'EECS' AND course.number BETWEEN 300 AND 300 + 100 AND semester.semester IN ('SP', 'SS', 'SU') AND semester.semester_id = cou...
advising
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 COUNT(*) FROM (SELECT qtb.MED_ORG_DEPT_CD FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '2158734' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2012-03-27' AND '2015-09-07' GROUP BY qtb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 1025.62 UNION SELECT gyb.MED_ORG_DEPT_CD FRO...
css
CREATE TABLE zyjzjlb ( YLJGDM text, JZLSH text, MZJZLSH text, KH text, KLX number, HZXM text, WDBZ number, RYDJSJ time, RYTJDM number, RYTJMC text, JZKSDM text, JZKSMC text, RZBQDM text, RZBQMC text, RYCWH text, CYKSDM text, CYKSMC text, CYBQDM tex...
SELECT BGJGDM, BGJGMC FROM jybgb WHERE BGDH = '39632855563'
css
CREATE TABLE table_21019 ( "Model number" text, "sSpec number" text, "Frequency" text, "GPU frequency" text, "L2 cache" text, "I/O bus" text, "Memory" text, "Voltage" text, "TDP" text, "Socket" text, "Release date" text, "Part number(s)" text, "Release price ( USD )" ...
SELECT "Memory" FROM table_21019 WHERE "Part number(s)" = 'CT80618003201AA'
wikisql
CREATE TABLE table_14752049_6 ( change__2011_to_2012_ VARCHAR, country VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- United kingdom is the country what is the change (2011 to 2012)?
SELECT change__2011_to_2012_ FROM table_14752049_6 WHERE country = "United Kingdom"
sql_create_context
CREATE TABLE cost ( costid number, uniquepid text, patienthealthsystemstayid number, eventtype text, eventid number, chargetime time, cost number ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ...
SELECT MAX(patient.admissionweight) FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '012-84977') AND NOT patient.admissionweight IS NULL AND DATETIME(patient.unitadmittime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year...
eicu
CREATE TABLE table_23405 ( "No. overall" text, "No. in series" real, "Family/families" text, "Location(s)" text, "Original air date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where was the abbas family and the pickering family located
SELECT "Location(s)" FROM table_23405 WHERE "Family/families" = 'The Abbas Family and The Pickering Family'
wikisql
CREATE TABLE jybgb ( BBCJBW text, BBDM text, BBMC text, BBZT number, BGDH text, BGJGDM text, BGJGMC text, BGRGH text, BGRQ time, BGRXM text, BGSJ time, CJRQ time, JSBBRQSJ time, JSBBSJ time, JYBBH text, JYJGMC text, JYJSGH text, JYJSQM text, JY...
SELECT * FROM hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX AND txmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND txmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE hz_i...
css
CREATE TABLE table_8413 ( "School" text, "Locality" text, "Ages" text, "Report" text, "Website" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Report for the School for Ages of 2-17?
SELECT "Report" FROM table_8413 WHERE "Ages" = '2-17'
wikisql
CREATE TABLE table_name_92 ( position INTEGER, goals_against VARCHAR, goals_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the lowest position number when goals against was 59, and a goals for is smaller than 24?
SELECT MIN(position) FROM table_name_92 WHERE goals_against = 59 AND goals_for < 24
sql_create_context
CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDisplayName text...
SELECT a.month, total, unanswered, CAST(CAST(unanswered * 1.0 / total * 100 AS FLOAT(5, 1)) AS TEXT(5)) + '%' AS PercentUnanswered FROM (SELECT CAST(TIME_TO_STR(CreationDate, '%Y%m%d') AS TEXT(6)) AS month, COUNT(*) AS total FROM Posts WHERE PostTypeId = 1 GROUP BY CAST(TIME_TO_STR(CreationDate, '%Y%m%d') AS TEXT(6))) ...
sede
CREATE TABLE table_25037577_1 ( gorham_principal VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who was the gorham principal in 2010-2011?
SELECT gorham_principal FROM table_25037577_1 WHERE year = "2010-2011"
sql_create_context
CREATE TABLE table_train_207 ( "id" int, "anemia" bool, "hemoglobin_a1c_hba1c" float, "diabetic" string, "body_mass_index_bmi" float, "age" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- presence of significant anemia ( hemog...
SELECT * FROM table_train_207 WHERE anemia = 1 OR hemoglobin_a1c_hba1c < 11
criteria2sql
CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId numbe...
SELECT * FROM Users WHERE UPPER(Location) = UPPER('##location##')
sede
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) 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 ...
SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 65786) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'anion gap') AND DATETIME(labevents.charttime) >= DATETIME(CURRENT_TIME(), '-168 ...
mimic_iii
CREATE TABLE table_4095 ( "Country" text, "Area (km 2 )" real, "Population(2012)" real, "Density (/km 2 )" real, "GDP (nominal), USD (2012)" text, "GDP (nominal) per capita, USD (2012)" text, "HDI (2012)" text, "Capital" text ) -- Using valid SQLite, answer the following questions for ...
SELECT "Population(2012)" FROM table_4095 WHERE "Country" = 'Indonesia'
wikisql
CREATE TABLE table_name_59 ( home_arena VARCHAR, joined_tschl VARCHAR, team_nickname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the home arena that joined tschl in 2010 and the team nickname is bearcats?
SELECT home_arena FROM table_name_59 WHERE joined_tschl = 2010 AND team_nickname = "bearcats"
sql_create_context
CREATE TABLE t_kc24 ( MED_SAFE_PAY_ID text, OVERALL_CD_ORG text, OVERALL_CD_PERSON text, MED_CLINIC_ID text, REF_SLT_FLG number, CLINIC_SLT_DATE time, COMP_ID text, PERSON_ID text, FLX_MED_ORG_ID text, INSU_TYPE text, MED_AMOUT number, PER_ACC_PAY number, OVE_PAY numb...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM, t_kc22.QTY, t_kc22.UNIVALENT, t_kc22.AMOUNT FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_NM = '彭嘉怡' AND t_kc21.IN_HOSP_DATE BETWEEN '2015-03-27' AND '2015-11-09'
css
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE d_labitems ( row_id number, itemid number, label text ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time,...
SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26612 AND NOT admissions.dischtime IS NULL ORDER BY admissions.admittime LIMIT 1) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label ...
mimic_iii
CREATE TABLE person_info ( RYBH text, XBDM number, XBMC text, XM text, CSRQ time, CSD text, MZDM text, MZMC text, GJDM text, GJMC text, JGDM text, JGMC text, XLDM text, XLMC text, ZYLBDM text, ZYMC text ) CREATE TABLE jyjgzbb ( JYZBLSH text, YLJGD...
SELECT * FROM jybgb WHERE JZLSH = '71460315159'
css
CREATE TABLE table_59407 ( "Year" real, "Gold" text, "Silver" text, "Bronze" text, "Notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are 2004's notes?
SELECT "Notes" FROM table_59407 WHERE "Year" = '2004'
wikisql
CREATE TABLE PostNoticeTypes ( Id number, ClassId number, Name text, Body text, IsHidden boolean, Predefined boolean, PostNoticeDurationId number ) CREATE TABLE PostHistoryTypes ( Id number, Name text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description t...
SELECT COUNT(Id), PostTypeId FROM Posts WHERE CreationDate >= 2017 - 01 - 01 AND CreationDate <= 2018 - 31 - 12 GROUP BY PostTypeId
sede
CREATE TABLE Order_Items ( order_id INTEGER, product_id INTEGER, order_quantity VARCHAR(15) ) CREATE TABLE Products ( product_id INTEGER, product_details VARCHAR(255) ) CREATE TABLE Customer_Addresses ( customer_id INTEGER, address_id INTEGER, date_address_from DATETIME, address_ty...
SELECT date_became_customer, COUNT(date_became_customer) FROM Customers WHERE customer_id BETWEEN 10 AND 20 ORDER BY COUNT(date_became_customer)
nvbench
CREATE TABLE table_name_55 ( school VARCHAR, enrollment VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which School has a Enrollment of 908?
SELECT school FROM table_name_55 WHERE enrollment = 908
sql_create_context
CREATE TABLE table_68199 ( "Year" real, "English title" text, "Original title" text, "Country" text, "Director'" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the English title of the film from after 2003 directed by Michael Haneke?
SELECT "English title" FROM table_68199 WHERE "Year" > '2003' AND "Director'" = 'michael haneke'
wikisql
CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE Tags ( Id number, TagName text, Count ...
SELECT VoteTypeId AS Type, Votes.CreationDate AS Date FROM Votes INNER JOIN Posts ON Votes.PostId = Posts.Id WHERE Posts.OwnerUserId = @UserId ORDER BY Date
sede
CREATE TABLE table_15319684_1 ( against VARCHAR, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of against for portuguesa santista
SELECT COUNT(against) FROM table_15319684_1 WHERE team = "Portuguesa Santista"
sql_create_context