instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_78030 ( "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 is the average crowd size of the away team ...
SELECT AVG("Crowd") FROM table_78030 WHERE "Away team score" = '9.6 (60)'
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 SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.MED_SER_ORG_NO = '4227077' AND t_kc22.STA_DATE BETWEEN '2013-03-08' AND '2021-05-12' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, CreationDate time, CloseReasonTypeId number, CloseAsOffTopicReasonTypeId number, DuplicateOfQuestionId number, BelongsOnBaseHostAddress text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversa...
SELECT COUNT(*) AS ActiveUsersLastMonth FROM Users WHERE LastAccessDate >= DATEADD(month, -1, (SELECT MAX(LastAccessDate) FROM Users))
sede
CREATE TABLE table_name_34 ( status VARCHAR, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the status of the Cub/John locomotive?
SELECT status FROM table_name_34 WHERE name = "the cub/john"
sql_create_context
CREATE TABLE Product_Characteristics ( product_id INTEGER, characteristic_id INTEGER, product_characteristic_value VARCHAR(50) ) CREATE TABLE Ref_Characteristic_Types ( characteristic_type_code VARCHAR(15), characteristic_type_description VARCHAR(80) ) CREATE TABLE Characteristics ( characteri...
SELECT product_category_description, COUNT(product_category_description) FROM Ref_Product_Categories AS T1 JOIN Products AS T2 ON T1.product_category_code = T2.product_category_code WHERE T2.product_description LIKE '%t%' GROUP BY product_category_description
nvbench
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE T...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE HIRE_DATE < '2002-06-21' ORDER BY SUM(MANAGER_ID)
nvbench
CREATE TABLE table_43257 ( "Season" text, "Staffel A" text, "Staffel B" text, "Staffel C" text, "Staffel D" text, "Staffel E" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Staffel B that has Hallescher Fc Chemie as Staffel C?
SELECT "Staffel B" FROM table_43257 WHERE "Staffel C" = 'hallescher fc chemie'
wikisql
CREATE TABLE table_name_86 ( college VARCHAR, pick__number VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which college has 41 picks?
SELECT college FROM table_name_86 WHERE pick__number = 41
sql_create_context
CREATE TABLE table_204_104 ( id number, "title" text, "genre" text, "sub\u00addivisions" text, "libretto" text, "premiere date" text, "place, theatre" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- l'inganno innocente premi...
SELECT "title" FROM table_204_104 WHERE "premiere date" < (SELECT "premiere date" FROM table_204_104 WHERE "title" = "l'inganno innocente") ORDER BY "premiere date" DESC LIMIT 1
squall
CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsysto...
SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'av bl...
eicu
CREATE TABLE table_64821 ( "Name (pinyin)" text, "Name (Wade Giles)" text, "Characters" text, "Type" text, "Construction" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which Construction is named heng-hai?
SELECT "Construction" FROM table_64821 WHERE "Name (Wade Giles)" = 'heng-hai'
wikisql
CREATE TABLE table_16388506_1 ( home_team VARCHAR, away_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the home team scores when fremantle is the away team?
SELECT home_team AS score FROM table_16388506_1 WHERE away_team = "Fremantle"
sql_create_context
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.marital_status = "MARRIED" AND demographic.ethnicity = "WHITE - RUSSIAN"
mimicsql_data
CREATE TABLE table_name_29 ( commissioned VARCHAR, nvr_page VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Commissioned date of the ship in NVR Page MCM02?
SELECT commissioned FROM table_name_29 WHERE nvr_page = "mcm02"
sql_create_context
CREATE TABLE table_name_89 ( csa_5_20_09 VARCHAR, ifop__la_croix_5_15_09 VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Ipsos 5/16/09 has an Ifop- La Croix 5/15/09 of 26%?
SELECT csa_5_20_09 FROM table_name_89 WHERE ifop__la_croix_5_15_09 = "26%"
sql_create_context
CREATE TABLE instruments ( songid number, bandmateid number, instrument text ) CREATE TABLE performance ( songid number, bandmate number, stageposition text ) CREATE TABLE songs ( songid number, title text ) CREATE TABLE band ( id number, firstname text, lastname text ) C...
SELECT COUNT(*) FROM band
spider
CREATE TABLE table_name_34 ( season INTEGER, team VARCHAR, series VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the most recent season for the Prema Powerteam with a Masters of Formula Three series?
SELECT MAX(season) FROM table_name_34 WHERE team = "prema powerteam" AND series = "masters of formula three"
sql_create_context
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 jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW FROM jybgb JOIN jyjgzbb ON jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE jybgb.JZLSH = '69277979003' AND jyjgzbb.JCRXM LIKE '袁%'
css
CREATE TABLE table_name_40 ( lead VARCHAR, season VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which lead had a season of 2009-10?
SELECT lead FROM table_name_40 WHERE season = "2009-10"
sql_create_context
CREATE TABLE table_name_51 ( current_club VARCHAR, apps VARCHAR, debut_year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the current club with more than 368 apps and a debut year earlier than 1994?
SELECT current_club FROM table_name_51 WHERE apps > 368 AND debut_year < 1994
sql_create_context
CREATE TABLE table_name_30 ( long INTEGER, name VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of Long for derrick locke?
SELECT SUM(long) FROM table_name_30 WHERE name = "derrick locke"
sql_create_context
CREATE TABLE table_name_25 ( manufacturer VARCHAR, grid VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which manufacturer has a grid of 6?
SELECT manufacturer FROM table_name_25 WHERE grid = "6"
sql_create_context
CREATE TABLE table_11667 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Decision" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many attended the game with a Record of 21 22 2?
SELECT COUNT("Attendance") FROM table_11667 WHERE "Record" = '21–22–2'
wikisql
CREATE TABLE program_course ( program_id int, course_id int, workload int, category varchar ) CREATE TABLE jobs ( job_id int, job_title varchar, description varchar, requirement varchar, city varchar, state varchar, country varchar, zip int ) CREATE TABLE course ( c...
SELECT DISTINCT COURSE_0.department, COURSE_0.name, COURSE_0.number FROM course AS COURSE_0, course AS COURSE_1, course_prerequisite WHERE COURSE_0.course_id = course_prerequisite.pre_course_id AND NOT COURSE_0.course_id IN (SELECT STUDENT_RECORDalias0.course_id FROM student_record AS STUDENT_RECORDalias0 WHERE STUDENT...
advising
CREATE TABLE table_11465521_2 ( opponent VARCHAR, attendance VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many opponents were there at the game with 64,087 people in attendance?
SELECT COUNT(opponent) FROM table_11465521_2 WHERE attendance = "64,087"
sql_create_context
CREATE TABLE table_47797 ( "Place" text, "Player" text, "Country" text, "Score" text, "To par" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Place of the Player from Zimbabwe?
SELECT "Place" FROM table_47797 WHERE "Country" = 'zimbabwe'
wikisql
CREATE TABLE table_name_52 ( points_for VARCHAR, tries_for VARCHAR, try_bonus VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many points did the Club score that has a try bonus of 7 and 52 tries for ?
SELECT points_for FROM table_name_52 WHERE tries_for = "52" AND try_bonus = "7"
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 qtb.MED_CLINIC_ID, qtb.PERSON_ID, qtb.PERSON_NM, qtb.IDENTITY_CARD, qtb.PERSON_SEX, qtb.PERSON_AGE FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE t_kc24.MED_AMOUT = (SELECT t_kc24.MED_AMOUT FROM t_kc24 WHERE t_kc24.MED_CLINIC_ID = '03425240816') UNION SELECT gyb.MED_CLINIC_ID, gyb.PERSON_...
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 COUNT(*) FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '18755221' AND t_kc22.STA_DATE BETWEEN '2009-12-20' AND '2012-11-10' AND t_kc22.SOC_SRT_DIRE_CD = '829624550'
css
CREATE TABLE table_73139 ( "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. -- Name the result for new york 8
SELECT "Result" FROM table_73139 WHERE "District" = 'New York 8'
wikisql
CREATE TABLE table_name_2 ( attendance INTEGER, home VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average attendance for matches where the home team was vida?
SELECT AVG(attendance) FROM table_name_2 WHERE home = "vida"
sql_create_context
CREATE TABLE table_name_74 ( dist__f_ INTEGER, odds VARCHAR, placing VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the highest Dist (f) with Odds of 11/4 and a Placing larger than 1?
SELECT MAX(dist__f_) FROM table_name_74 WHERE odds = "11/4" AND placing > 1
sql_create_context
CREATE TABLE Detention ( detention_id INTEGER, detention_type_code VARCHAR(10), teacher_id INTEGER, datetime_detention_start DATETIME, datetime_detention_end DATETIME, detention_summary VARCHAR(255), other_details VARCHAR(255) ) CREATE TABLE Ref_Incident_Type ( incident_type_code VARCHA...
SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses ORDER BY monthly_rental DESC
nvbench
CREATE TABLE table_1299 ( "Country" text, "Uranium required 2006-08" text, "% of world demand" text, "Indigenous mining production 2006" text, "Deficit (-surplus)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the deficit (-surplus) of Fran...
SELECT "Deficit (-surplus)" FROM table_1299 WHERE "Country" = 'France'
wikisql
CREATE TABLE table_name_35 ( avg_g INTEGER, gain VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With a gain of 1,380, what is the highest Avg/G?
SELECT MAX(avg_g) FROM table_name_35 WHERE gain = 1 OFFSET 380
sql_create_context
CREATE TABLE trip ( id INTEGER, duration INTEGER, start_date TEXT, start_station_name TEXT, start_station_id INTEGER, end_date TEXT, end_station_name TEXT, end_station_id INTEGER, bike_id INTEGER, subscription_type TEXT, zip_code INTEGER ) CREATE TABLE weather ( date TEX...
SELECT start_station_name, start_station_id FROM trip ORDER BY start_station_id DESC
nvbench
CREATE TABLE table_42549 ( "Outcome" text, "Date" text, "Tournament" text, "Surface" text, "Opponent in the final" text, "Score" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Score for 09-oct-2006?
SELECT "Score" FROM table_42549 WHERE "Date" = '09-oct-2006'
wikisql
CREATE TABLE table_12095519_1 ( train_name VARCHAR, origin VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many trains leave from puri?
SELECT COUNT(train_name) FROM table_12095519_1 WHERE origin = "Puri"
sql_create_context
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 procedures ( ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "MARRIED" AND lab.itemid = "51438"
mimicsql_data
CREATE TABLE table_12828723_3 ( tries_against VARCHAR, tries_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the tries against with tries for being 47
SELECT tries_against FROM table_12828723_3 WHERE tries_for = "47"
sql_create_context
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE employees ( EMPLOYEE_ID decimal(6,0...
SELECT HIRE_DATE, AVG(MANAGER_ID) FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY AVG(MANAGER_ID)
nvbench
CREATE TABLE person_info ( CSD text, CSRQ time, GJDM text, GJMC text, JGDM text, JGMC text, MZDM text, MZMC text, RYBH text, XBDM number, XBMC text, XLDM text, XLMC text, XM text, ZYLBDM text, ZYMC text ) CREATE TABLE hz_info ( KH text, KLX number...
SELECT * FROM person_info JOIN hz_info JOIN zyjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE person_info.XM = '施天罡' AND hz_info.YLJGDM = '0004524' AND zyjzjlb.CYKSMC LIKE '%心%'
css
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_DIRE_CD text, MED_DIRE_NM text,...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc21 JOIN t_kc22 JOIN t_kc21_t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc22.MED_CLINIC_ID AND t_kc21_t_kc22.MED_EXP_DET_ID = t_kc22.MED_EXP_DET_ID WHERE t_kc21.PERSON_NM = '韩韵诗' AND t_kc21.CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2003-07-31' AND '2013-12-15' AND t_kc22.MED_INV_IT...
css
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 jyjgzbb.JYZBLSH 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 =...
css
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 MIN(MED_AMOUT), MAX(MED_AMOUT) FROM t_kc24 WHERE MED_CLINIC_ID IN (SELECT MED_CLINIC_ID FROM t_kc21 WHERE MED_SER_ORG_NO = '9880958' AND IN_DIAG_DIS_NM = '矽肺贰期')
css
CREATE TABLE table_2413 ( "Broadcast scope" text, "Broadcast network" text, "Broadcast term" text, "Broadcast day and timings (in JST )" text, "Broadcast format" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the broadcast network for chiba pre...
SELECT "Broadcast network" FROM table_2413 WHERE "Broadcast scope" = 'Chiba Prefecture'
wikisql
CREATE TABLE table_3002 ( "Conference" text, "Regular Season Winner" text, "Conference Player of the Year" text, "Conference Tournament" text, "Tournament Venue (City)" text, "Tournament Winner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Whe...
SELECT "Conference Tournament" FROM table_3002 WHERE "Regular Season Winner" = 'Troy'
wikisql
CREATE TABLE table_name_9 ( record VARCHAR, opponent VARCHAR, res VARCHAR, round VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What record has loss as the res., 1 for the round, and akira maeda as the opponent?
SELECT record FROM table_name_9 WHERE res = "loss" AND round = "1" AND opponent = "akira maeda"
sql_create_context
CREATE TABLE table_204_855 ( id number, "year" number, "date" text, "winner" text, "result" text, "loser" text, "attendance" number, "location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what number of dates were won by the chicago b...
SELECT COUNT("date") FROM table_204_855 WHERE "winner" = 'chicago bears'
squall
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE FlagTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEdits ( Id number, PostId numb...
SELECT * FROM Votes LIMIT 10
sede
CREATE TABLE PostTags ( PostId number, TagId number ) CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDis...
SELECT Users.Id AS "user_link", SUM(Posts.Score) AS "Upvotes", COUNT(*) AS "Answers", 1.0 * SUM(Posts.Score) / COUNT(*) AS "Ave. score", MAX(Posts.Score) AS "Highest score", 1.0 * MAX(Posts.Score) / SUM(Posts.Score) AS "Fraction votes from highest scoring answer" FROM Posts LEFT JOIN Users ON Posts.OwnerUserId = Users....
sede
CREATE TABLE table_name_71 ( game INTEGER, team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the total score where Toronto was played?
SELECT SUM(game) FROM table_name_71 WHERE team = "toronto"
sql_create_context
CREATE TABLE table_30120555_1 ( poor_law_union VARCHAR, townland VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What poor law union is Curradonohoe a part of?
SELECT poor_law_union FROM table_30120555_1 WHERE townland = "Curradonohoe"
sql_create_context
CREATE TABLE table_name_38 ( venue VARCHAR, status VARCHAR, against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the venue for the Status of Five Nations and 0 againts?
SELECT venue FROM table_name_38 WHERE status = "five nations" AND against = 0
sql_create_context
CREATE TABLE party ( Party_ID int, Minister text, Took_office text, Left_office text, Region_ID int, Party_name text ) CREATE TABLE member ( Member_ID int, Member_Name text, Party_ID text, In_office text ) CREATE TABLE region ( Region_ID int, Region_name text, Date ...
SELECT Minister, COUNT(Minister) FROM party GROUP BY Minister ORDER BY COUNT(Minister)
nvbench
CREATE TABLE table_name_77 ( album VARCHAR, year INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the album when the year is later than 2008?
SELECT album FROM table_name_77 WHERE year > 2008
sql_create_context
CREATE TABLE college ( college_id TEXT, name_full TEXT, city TEXT, state TEXT, country TEXT ) CREATE TABLE manager_award ( player_id TEXT, award_id TEXT, year INTEGER, league_id TEXT, tie TEXT, notes NUMERIC ) CREATE TABLE batting ( player_id TEXT, year INTEGER, ...
SELECT yearid, COUNT(yearid) FROM hall_of_fame ORDER BY yearid
nvbench
CREATE TABLE table_73306 ( "Region" text, "Population" text, "Country" text, "Language" text, "N" real, "Total%" text, "R1b1c (R-V88)" text, "R1b1a2 (R-M269)" text, "R1b1c* (R-V88*)" text, "R1b1c4 (R-V69)" text ) -- Using valid SQLite, answer the following questions for the tab...
SELECT COUNT("N") FROM table_73306 WHERE "Population" = 'Berbers from Siwa'
wikisql
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.expire_flag = "0" AND procedures.long_title = "Circumcision"
mimicsql_data
CREATE TABLE table_203_425 ( id number, "season" number, "driver" text, "equipment" text, "position" number, "points" number, "races" number, "wins" number, "second" number, "third" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -...
SELECT "wins" FROM table_203_425 WHERE "season" = 2012 AND "driver" = 'etienne bax'
squall
CREATE TABLE cite ( cited int, citing int ) CREATE TABLE keyword ( keyword varchar, kid int ) CREATE TABLE domain_author ( aid int, did int ) CREATE TABLE domain_publication ( did int, pid int ) CREATE TABLE domain_keyword ( did int, kid int ) CREATE TABLE journal ( home...
SELECT organization.name FROM author, domain, domain_author, organization WHERE domain_author.aid = author.aid AND domain.did = domain_author.did AND domain.name = 'Databases' AND organization.oid = author.oid
academic
CREATE TABLE table_name_81 ( score VARCHAR, record VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the score for the team with a record of 2-1?
SELECT score FROM table_name_81 WHERE record = "2-1"
sql_create_context
CREATE TABLE table_17010 ( "Institution" text, "Location" text, "Founded" real, "Type" text, "Enrollment" real, "Nickname" text, "Joined" real, "Left" real, "Current Conference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What yea...
SELECT "Left" FROM table_17010 WHERE "Founded" = '1880'
wikisql
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE patient ( uniquepid text, patienthealthsystemstayid number, patientunitstayid number, gender text, age text, ethnicity text, hospit...
SELECT medication.drugname FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '009-7776')) AND medication.routeadmin = 'iv push' AND DATETIME(medi...
eicu
CREATE TABLE table_test_30 ( "id" int, "ejection_fraction_ef" int, "multiple_long_bone_fractures" bool, "extracellular_volume_expansion" bool, "pregnancy_or_lactation" bool, "bleeding" int, "serum_potassium" float, "prosthetic_heart_valve" bool, "hbg" int, "anticoagulation" bool,...
SELECT * FROM table_test_30 WHERE previous_hemorrhagic_stroke = 1
criteria2sql
CREATE TABLE table_78978 ( "Place" real, "Name" text, "All Around" real, "Clubs" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the highest total that has andrea sinko as the name, with an all around greater than 9.65?
SELECT MAX("Total") FROM table_78978 WHERE "Name" = 'andrea sinko' AND "All Around" > '9.65'
wikisql
CREATE TABLE table_49191 ( "Event" text, "Time" text, "Name" text, "Nation" text, "Games" text, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- On what date was a record set in the team pursuit (8 laps) event?
SELECT "Date" FROM table_49191 WHERE "Event" = 'team pursuit (8 laps)'
wikisql
CREATE TABLE table_204_125 ( id number, "state" text, "type" text, "name" text, "title" text, "royal house" text, "from" text, "to" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which king ruled the longest ?
SELECT "name" FROM table_204_125 ORDER BY "from" - "to" DESC LIMIT 1
squall
CREATE TABLE table_64536 ( "Rank" text, "Group" text, "Name" text, "Nationality" text, "Mark" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the mark for Grenada in group A?
SELECT "Mark" FROM table_64536 WHERE "Group" = 'a' AND "Nationality" = 'grenada'
wikisql
CREATE TABLE table_28456 ( "Year" real, "Championship" text, "54 holes" text, "Winning score" text, "Margin" text, "Runner(s)-up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the space where the next one was mike turnesa
SELECT "Margin" FROM table_28456 WHERE "Runner(s)-up" = 'Mike Turnesa'
wikisql
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 regions ( REGION_ID...
SELECT HIRE_DATE, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY HIRE_DATE DESC
nvbench
CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_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(...
SELECT FIRST_NAME, MANAGER_ID FROM employees ORDER BY FIRST_NAME
nvbench
CREATE TABLE table_77131 ( "Round" real, "Pick" real, "Player" text, "Position" text, "School/Club Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Round has a School/Club Team of cal-poly slo, and a Pick smaller than 238?
SELECT MAX("Round") FROM table_77131 WHERE "School/Club Team" = 'cal-poly slo' AND "Pick" < '238'
wikisql
CREATE TABLE table_name_42 ( date VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Date has a Result of 0 0?
SELECT date FROM table_name_42 WHERE result = "0–0"
sql_create_context
CREATE TABLE table_name_11 ( to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the to par for the score 72-69-68=209?
SELECT to_par FROM table_name_11 WHERE score = 72 - 69 - 68 = 209
sql_create_context
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 WHERE MED_SER_ORG_NO = '5648027' AND IN_HOSP_DATE BETWEEN '2000-10-16' AND '2016-08-23' AND SERVANT_FLG = '公务员'
css
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 ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT demographic.admission_type, diagnoses.short_title FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "91588"
mimicsql_data
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 jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN txmzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND 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 jyb...
css
CREATE TABLE table_name_34 ( laps VARCHAR, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps have a +0.4865 time/retired?
SELECT laps FROM table_name_34 WHERE time_retired = "+0.4865"
sql_create_context
CREATE TABLE table_name_53 ( vote__percentage INTEGER, election VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most vote % with election of 1946
SELECT MAX(vote__percentage) FROM table_name_53 WHERE election = "1946"
sql_create_context
CREATE TABLE medicine_enzyme_interaction ( enzyme_id int, medicine_id int, interaction_type text ) CREATE TABLE medicine ( id int, name text, Trade_Name text, FDA_approved text ) CREATE TABLE enzyme ( id int, name text, Location text, Product text, Chromosome text, ...
SELECT Trade_Name, id FROM medicine AS T1 JOIN medicine_enzyme_interaction AS T2 ON T2.medicine_id = T1.id ORDER BY Trade_Name DESC
nvbench
CREATE TABLE host ( Host_ID int, Name text, Nationality text, Age text ) CREATE TABLE party_host ( Party_ID int, Host_ID int, Is_Main_in_Charge bool ) CREATE TABLE party ( Party_ID int, Party_Theme text, Location text, First_year text, Last_year text, Number_of_host...
SELECT Location, COUNT(Location) FROM party GROUP BY Location
nvbench
CREATE TABLE table_75609 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Save" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the opponent with loss of sanderson (9-8)
SELECT "Opponent" FROM table_75609 WHERE "Loss" = 'sanderson (9-8)'
wikisql
CREATE TABLE table_name_49 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the Home team of collingwood played, what was the opposing Away team score?
SELECT away_team AS score FROM table_name_49 WHERE home_team = "collingwood"
sql_create_context
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "pO2"
mimicsql_data
CREATE TABLE table_name_10 ( player VARCHAR, to_par VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Player has a To par of +1 and the Score 75-70-71-73=289?
SELECT player FROM table_name_10 WHERE to_par = "+1" AND score = 75 - 70 - 71 - 73 = 289
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(*) FROM treatment WHERE treatment.treatmentname = 'treatment of hyperkalemia - insulin / glucose' AND STRFTIME('%y', treatment.treatmenttime) >= '2100'
eicu
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 numeric, DEPT_CODE varchar(18), STU_PHONE varchar(4), PROF_NUM int ) CREATE TABLE CL...
SELECT EMP_FNAME, COUNT(EMP_FNAME) FROM CLASS AS T1 JOIN EMPLOYEE AS T2 ON T1.PROF_NUM = T2.EMP_NUM GROUP BY CRS_CODE, EMP_FNAME ORDER BY EMP_FNAME
nvbench
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 patient WHERE patient.uniquepid = '032-4849' AND patient.hospitaladmitsource = 'emergency department' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospitaladmittime LIMIT 1
eicu
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 All_Neutral, All_Games_Percent FROM basketball_match ORDER BY All_Neutral DESC
nvbench
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE chartevents ( row_id number, subject_id number, hadm_id number, icustay_id number, itemid number, charttime time, valuenum number, valueuom text ) CREATE TABLE o...
SELECT admissions.admittime FROM admissions WHERE admissions.subject_id = 62977 AND STRFTIME('%y', admissions.admittime) = '2101' ORDER BY admissions.admittime LIMIT 1
mimic_iii
CREATE TABLE table_54660 ( "Name" text, "Scotland career" text, "Caps" real, "Goals" real, "Average" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the low goal for kenny miller with an average smaller than 0.261?
SELECT MIN("Goals") FROM table_54660 WHERE "Name" = 'kenny miller' AND "Average" < '0.261'
wikisql
CREATE TABLE table_dev_35 ( "id" int, "white_blood_cell_count_wbc" int, "platelets" int, "neutrophil_count" int, "serum_creatinine" float, "albumin" float, "NOUSE" float ) -- Using valid SQLite, answer the following questions for the tables provided above. -- platelets >= 100000 / mm3
SELECT * FROM table_dev_35 WHERE platelets >= 100000
criteria2sql
CREATE TABLE people ( People_ID int, Sex text, Name text, Date_of_Birth text, Height real, Weight real ) 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 re...
SELECT People_ID, Height FROM people GROUP BY Sex
nvbench
CREATE TABLE table_name_19 ( civilian_deaths VARCHAR, total_deaths__not_including_foreigners_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many civilians died in the conflict that left 178, excluding foreigners, dead?
SELECT civilian_deaths FROM table_name_19 WHERE total_deaths__not_including_foreigners_ = "178"
sql_create_context
CREATE TABLE table_name_76 ( away_team VARCHAR, tie_no VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In Tie #18, who was the away team?
SELECT away_team FROM table_name_76 WHERE tie_no = "18"
sql_create_context
CREATE TABLE ship ( Ship_ID int, Name text, Type text, Nationality text, Tonnage int ) CREATE TABLE mission ( Mission_ID int, Ship_ID int, Code text, Launched_Year int, Location text, Speed_knots int, Fate text ) -- Using valid SQLite, answer the following questions fo...
SELECT Type, COUNT(Type) FROM ship GROUP BY Nationality, Type ORDER BY Type
nvbench
CREATE TABLE table_204_375 ( id number, "#" number, "season" number, "competition" text, "date" text, "round" text, "opponent" text, "h / a" text, "result" text, "scorer (s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what wa...
SELECT "result" + "result" FROM table_204_375 WHERE "date" = '2013-05-21'
squall
CREATE TABLE table_name_34 ( season VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Can you tell me the Season that has the Score of 1-0?
SELECT season FROM table_name_34 WHERE score = "1-0"
sql_create_context
CREATE TABLE payment ( payment_id SMALLINT UNSIGNED, customer_id SMALLINT UNSIGNED, staff_id TINYINT UNSIGNED, rental_id INT, amount DECIMAL(5,2), payment_date DATETIME, last_update TIMESTAMP ) CREATE TABLE film_actor ( actor_id SMALLINT UNSIGNED, film_id SMALLINT UNSIGNED, last...
SELECT payment_date, COUNT(payment_date) FROM payment WHERE amount > 10 UNION SELECT T1.payment_date FROM payment AS T1 JOIN staff AS T2 ON T1.staff_id = T2.staff_id WHERE T2.first_name = 'Elsa' ORDER BY COUNT(payment_date) DESC
nvbench