instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_76708 ( "Year" real, "Artist" text, "Title" text, "Label" text, "Type" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Title has a Type of ep and a Year larger than 2003?
SELECT "Title" FROM table_76708 WHERE "Type" = 'ep' AND "Year" > '2003'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemics...
SELECT intakeoutput.celllabel FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '016-28377') AND NOT patient.unitdischargetime IS NULL ORDER ...
eicu
CREATE TABLE table_name_76 ( score VARCHAR, winner VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What were the total number scores after 2005, when the winner was David Patrick?
SELECT COUNT(score) FROM table_name_76 WHERE winner = "david patrick" AND year > 2005
sql_create_context
CREATE TABLE table_21302_1 ( area___ha__ INTEGER, no_of_villages VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- If there are 18 villages, what is the minimum area ?
SELECT MIN(area___ha__) FROM table_21302_1 WHERE no_of_villages = 18
sql_create_context
CREATE TABLE PostsWithDeleted ( Id number, PostTypeId number, AcceptedAnswerId number, ParentId number, CreationDate time, DeletionDate time, Score number, ViewCount number, Body text, OwnerUserId number, OwnerDisplayName text, LastEditorUserId number, LastEditorDispl...
SELECT COUNT(Id) FROM Posts WHERE CreationDate < '2009-01-27' AND PostTypeId = 1
sede
CREATE TABLE table_8065 ( "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 To par of the T3 Player?
SELECT "To par" FROM table_8065 WHERE "Place" = 't3'
wikisql
CREATE TABLE table_33976 ( "Date" text, "Visitor" text, "Score" text, "Home" text, "Attendance" real, "Record" text, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the attendance for the March 6 game, where one of the teams...
SELECT "Attendance" FROM table_33976 WHERE "Points" = '53' AND "Date" = 'march 6'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT COUNT(*) FROM t_kc22 WHERE t_kc22.t_kc21_PERSON_ID = '96775087' AND t_kc22.STA_DATE BETWEEN '2001-12-08' AND '2012-06-21' AND t_kc22.SOC_SRT_DIRE_CD = '921496'
css
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), FIRST_NAME varchar(20), LAST_NAME varchar(25), EMAIL varchar(25), PHONE_NUMBER varchar(20), ...
SELECT HIRE_DATE, AVG(EMPLOYEE_ID) FROM employees WHERE SALARY BETWEEN 8000 AND 12000 AND COMMISSION_PCT <> "null" OR DEPARTMENT_ID <> 40
nvbench
CREATE TABLE table_name_76 ( game_site VARCHAR, week VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which game site has a Week bigger than 13, and a Result of l 20 0?
SELECT game_site FROM table_name_76 WHERE week > 13 AND result = "l 20–0"
sql_create_context
CREATE TABLE flight ( flno number(4,0), origin varchar2(20), destination varchar2(20), distance number(6,0), departure_date date, arrival_date date, price number(7,2), aid number(9,0) ) CREATE TABLE employee ( eid number(9,0), name varchar2(30), salary number(10,2) ) CREATE...
SELECT destination, COUNT(*) FROM flight GROUP BY destination ORDER BY COUNT(*) DESC
nvbench
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 t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_NM = '水高超' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 8518.36)
css
CREATE TABLE table_204_811 ( id number, "year" number, "ring name\n(birth name)" text, "inducted by" text, "inducted for" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was inducted after royal ?
SELECT "ring name\n(birth name)" FROM table_204_811 WHERE id = (SELECT id FROM table_204_811 WHERE "ring name\n(birth name)" = 'nelson royal') + 1
squall
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 d_items ( row_id number, itemid number, label text, linksto text ) CREATE TABLE procedures_icd ( ...
SELECT 1 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', transfers.intime)) FROM transfers WHERE transfers.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 20898 AND admissions.dischtime IS NULL) AND transfers.careunit = 'csru' ORDER BY transfers.intime DESC LIMIT 1
mimic_iii
CREATE TABLE table_27378582_1 ( founded INTEGER, nickname VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most founded for bison
SELECT MAX(founded) FROM table_27378582_1 WHERE nickname = "Bison"
sql_create_context
CREATE TABLE table_65386 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What time did Sara Nordenstam get?
SELECT "Time" FROM table_65386 WHERE "Name" = 'sara nordenstam'
wikisql
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE labevents ( row_id number, subject_id number, hadm_id number, itemid number, charttime time, valuenum number...
SELECT AVG(inputevents_cv.amount) FROM inputevents_cv WHERE inputevents_cv.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 26350)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab...
mimic_iii
CREATE TABLE table_name_74 ( frequency VARCHAR, branding VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the branding frequency of cbc radio 2?
SELECT frequency FROM table_name_74 WHERE branding = "cbc radio 2"
sql_create_context
CREATE TABLE table_79266 ( "Constructor" text, "Chassis" text, "Starts" real, "Finishes" real, "Wins" real, "Podiums" real, "Stage wins" real, "Points" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the highest points when the ch...
SELECT MAX("Points") FROM table_79266 WHERE "Chassis" = 'focus rs wrc 08 and 09' AND "Stage wins" > '91'
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 demographic.admission_type, prescriptions.formulary_drug_cd FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.subject_id = "2560"
mimicsql_data
CREATE TABLE t_kc24 ( ACCOUNT_DASH_DATE time, ACCOUNT_DASH_FLG number, CASH_PAY number, CIVIL_SUBSIDY number, CKC102 number, CLINIC_ID text, CLINIC_SLT_DATE time, COMP_ID text, COM_ACC_PAY number, COM_PAY number, DATA_ID text, ENT_ACC_PAY number, ENT_PAY number, F...
SELECT SUM(t_kc22.AMOUNT) FROM t_kc22 JOIN mzb ON mzb.MED_ORG_DEPT_CD = t_kc22.MED_CLINIC_ID WHERE mzb.PERSON_NM = '61225965' AND t_kc22.STA_DATE BETWEEN '2007-04-13' AND '2011-03-11' AND t_kc22.MED_INV_ITEM_TYPE = '检查费'
css
CREATE TABLE table_48646 ( "Discipline" text, "Circuit" text, "Event" text, "Session" text, "Cause" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What circuit has a race for the session, and open wheel as the discipline, and the 1977 Japanese Grand...
SELECT "Circuit" FROM table_48646 WHERE "Session" = 'race' AND "Discipline" = 'open wheel' AND "Event" = '1977 japanese grand prix'
wikisql
CREATE TABLE table_77810 ( "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 is the record when the leading scorer is Antawn Jamison...
SELECT "Record" FROM table_77810 WHERE "Leading scorer" = 'antawn jamison (14)'
wikisql
CREATE TABLE table_16533 ( "Year" real, "Numer of Jamaicans granted British citizenship" real, "Naturalisation by residence" real, "Naturalisation by marriage" real, "Registration of a minor child" real, "Registration by other means" real ) -- Using valid SQLite, answer the following questions...
SELECT "Numer of Jamaicans granted British citizenship" FROM table_16533 WHERE "Naturalisation by residence" = '927'
wikisql
CREATE TABLE table_8728 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the round when the opponent is Andre Roberts?
SELECT "Round" FROM table_8728 WHERE "Opponent" = 'andre roberts'
wikisql
CREATE TABLE diagnoses ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) 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 ) C...
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.icd9_code = "V433" AND prescriptions.drug_type = "MAIN"
mimicsql_data
CREATE TABLE Customers_Cards ( card_id INTEGER, customer_id INTEGER, card_type_code VARCHAR(15), card_number VARCHAR(80), date_valid_from DATETIME, date_valid_to DATETIME, other_card_details VARCHAR(255) ) CREATE TABLE Accounts ( account_id INTEGER, customer_id INTEGER, account_...
SELECT customer_last_name, COUNT(customer_last_name) FROM Customers GROUP BY customer_last_name ORDER BY COUNT(customer_last_name) DESC
nvbench
CREATE TABLE table_14576 ( "Pos." text, "Player" text, "Team" text, "Height" text, "Weight" real, "First round" real, "Final round" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What final round had a weight of 245?
SELECT "Final round" FROM table_14576 WHERE "Weight" = '245'
wikisql
CREATE TABLE table_13553701_1 ( mens_doubles VARCHAR, mens_singles VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who are the mens doubles and and mens singles is lee hyun-il?
SELECT mens_doubles FROM table_13553701_1 WHERE mens_singles = "Lee Hyun-il"
sql_create_context
CREATE TABLE table_name_54 ( total INTEGER, nation VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average total with a nation of thailand with a gold smaller than 17?
SELECT AVG(total) FROM table_name_54 WHERE nation = "thailand" AND gold < 17
sql_create_context
CREATE TABLE ReviewTaskStates ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TA...
WITH CWAnswers AS (SELECT Posts.Id AS "post_link", Posts.LastEditDate, Posts.CommunityOwnedDate, Posts.LastEditorUserId AS "user_link" FROM PostHistory INNER JOIN Posts ON Posts.Id = PostHistory.PostId WHERE PostHistory.PostHistoryTypeId = 16 AND PostHistory.UserId != Posts.OwnerUserId AND Posts.PostTypeId = 2 AND Post...
sede
CREATE TABLE table_45742 ( "Name" text, "Club" text, "Debut round" real, "Games (2008)" real, "Goals (2008)" real, "Previous club(s)" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the average number of goals with 21 games for a debut ro...
SELECT AVG("Goals (2008)") FROM table_45742 WHERE "Games (2008)" = '21' AND "Debut round" < '1'
wikisql
CREATE TABLE diagnoses_icd ( row_id number, subject_id number, hadm_id number, icd9_code text, charttime time ) CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE chartevents ( row_id number, subject_id number, ...
SELECT chartevents.charttime FROM chartevents WHERE chartevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 15794)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial...
mimic_iii
CREATE TABLE table_2950 ( "Condition" text, "Prothrombin time" text, "Partial thromboplastin time" text, "Bleeding time" text, "Platelet count" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the prothrombin time of von willebrand disease?
SELECT COUNT("Prothrombin time") FROM table_2950 WHERE "Condition" = 'Von Willebrand disease'
wikisql
CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, HOSP_DOC_CD text, HOSP_DOC_NM text, MED_CLINIC_ID text, MED_DIRE_CD tex...
SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '32360025' GROUP BY t_kc22.SOC_SRT_DIRE_CD ORDER BY COUNT(*) DESC
css
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.discharge_location = "DEAD/EXPIRED" AND procedures.short_title = "Cardiac mapping"
mimicsql_data
CREATE TABLE table_32248 ( "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 saw their opponents score 4.5 (29...
SELECT "Away team" FROM table_32248 WHERE "Home team score" = '4.5 (29)'
wikisql
CREATE TABLE table_name_70 ( country VARCHAR, to_par VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What country is player ed sneed, who has a to par of +3, from?
SELECT country FROM table_name_70 WHERE to_par = "+3" AND player = "ed sneed"
sql_create_context
CREATE TABLE table_203_713 ( id number, "s.no." number, "name of kingdom" text, "name of king" text, "no. of villages" number, "capital" text, "names of districts" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the total number of d...
SELECT COUNT(*) FROM table_203_713
squall
CREATE TABLE ReviewTaskTypes ( Id number, Name text, Description text ) CREATE TABLE CloseReasonTypes ( Id number, Name text, Description text ) CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDat...
SELECT DISTINCT p.Id AS "post_link", p.CreationDate, url = 'site://posts/' + CAST(p.Id AS TEXT) + '/revisions' FROM Posts AS p JOIN PostHistory AS ph ON (ph.PostId = p.Id) WHERE (ph.Text LIKE '%www.math.uga.edu%') OR (ph.Text LIKE '%mysite.verizon.net%') OR (ph.Text LIKE '%www.iecn.u-nancy.fr%') ORDER BY p.CreationDate...
sede
CREATE TABLE table_250 ( "Comparisons" text, "Hub Base Class" text, "Emulated Class" text, "Semi-DDM Class" text, "DDM Class" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Is the drawing tablet support part of the DDM class?
SELECT "DDM Class" FROM table_250 WHERE "Comparisons" = 'Drawing Tablet Support'
wikisql
CREATE TABLE table_18324 ( "District" text, "Incumbent" text, "Party" text, "First elected" real, "Result" text, "Candidates" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When was the earliest first election?
SELECT MIN("First elected") FROM table_18324
wikisql
CREATE TABLE table_name_84 ( iucn VARCHAR, district VARCHAR, reserve VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the IUNC of district of Cayo and reserve of Actun Tunichil Muknal?
SELECT iucn FROM table_name_84 WHERE district = "cayo" AND reserve = "actun tunichil muknal"
sql_create_context
CREATE TABLE table_57162 ( "Entrant" text, "Constructor" text, "Chassis" text, "Driver" text, "Rounds" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the driver for the Entract of Enrico Plat ?
SELECT "Driver" FROM table_57162 WHERE "Entrant" = 'enrico platé'
wikisql
CREATE TABLE table_33340 ( "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 was the crowd size at Collingwood's match?
SELECT "Crowd" FROM table_33340 WHERE "Home team" = 'collingwood'
wikisql
CREATE TABLE table_45777 ( "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. -- For the match played on 7 January 1956, with away team of Accrington Stanley, who was the home team?
SELECT "Home team" FROM table_45777 WHERE "Date" = '7 january 1956' AND "Away team" = 'accrington stanley'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.insurance = "Government" AND lab.label = "WBC, Joint Fluid"
mimicsql_data
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 WHERE demographic.expire_flag = "0" AND diagnoses.short_title = "Preterm NEC 1750-1999g"
mimicsql_data
CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit te...
SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t3.icd9_code FROM (SELECT t2.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, procedures_icd.charttime FROM procedures_icd JOIN admissions ON procedures_icd.hadm_id = admi...
mimic_iii
CREATE TABLE jyjgzbb ( BGDH text, BGRQ time, CKZFWDX text, CKZFWSX number, CKZFWXX number, JCFF text, JCRGH text, JCRXM text, JCXMMC text, JCZBDM text, JCZBJGDL number, JCZBJGDW text, JCZBJGDX text, JCZBMC text, JLDW text, JYRQ time, JYZBLSH text, ...
SELECT mzjzjlb.YLJGDM 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 = '赵芳荃' UNION SELECT wdmzjzjlb.YLJGDM FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = ...
css
CREATE TABLE diagnosis ( diagnosisid number, patientunitstayid number, diagnosisname text, diagnosistime time, icd9code text ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE cost ( c...
SELECT DISTINCT cost.cost FROM cost WHERE cost.eventtype = 'diagnosis' AND cost.eventid IN (SELECT diagnosis.diagnosisid FROM diagnosis WHERE diagnosis.diagnosisname = 'intra-abdominal abscess - postoperative')
eicu
CREATE TABLE table_204_539 ( id number, "date" text, "name" text, "moving from" text, "moving to" text, "fee" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was the only player to be transferred for a fee of 24,000,000 ?
SELECT "name" FROM table_204_539 WHERE "fee" = 24000000
squall
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE CloseAsOffTopicReasonTypes ( Id number, IsUniversal boolean, InputTitle text, MarkdownInputGuidance text, ...
WITH questions AS (SELECT question.Id, question.ViewCount, accepted.Score AS AcceptedScore, (SELECT MAX(Score) FROM Posts WHERE ParentId = question.Id AND question.AcceptedAnswerId != Id) AS HighestScore FROM Posts AS question, Posts AS accepted WHERE question.AcceptedAnswerId = accepted.Id AND question.PostTypeId = 1 ...
sede
CREATE TABLE table_32024 ( "Res." text, "Record" text, "Opponent" text, "Method" text, "Event" text, "Round" real, "Time" text, "Location" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- At the UFC 78, what is the average round when the t...
SELECT AVG("Round") FROM table_32024 WHERE "Time" = '5:00' AND "Event" = 'ufc 78'
wikisql
CREATE TABLE table_6310 ( "Date" text, "Opponent" text, "Score" text, "Loss" text, "Attendance" real, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the score on september 14
SELECT "Score" FROM table_6310 WHERE "Date" = 'september 14'
wikisql
CREATE TABLE table_38762 ( "The Kennel Club (UK) Toy Group" text, "Canadian Kennel Club Toy Dogs Group" text, "American Kennel Club Toy Group" text, "Australian National Kennel Council Toy Dogs Group" text, "New Zealand Kennel Club Toy Group" text ) -- Using valid SQLite, answer the following ques...
SELECT "Canadian Kennel Club Toy Dogs Group" FROM table_38762 WHERE "Australian National Kennel Council Toy Dogs Group" = 'australian silky terrier'
wikisql
CREATE TABLE resultsdata15 ( sample_pk number, commod text, commtype text, lab text, pestcode text, testclass text, concen number, lod number, conunit text, confmethod text, confmethod2 text, annotate text, quantitate text, mean text, extract text, determi...
SELECT sample_pk, testclass FROM resultsdata15
pesticide
CREATE TABLE table_6949 ( "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. -- Who was second for the United States team?
SELECT "Second" FROM table_6949 WHERE "Nation" = 'united states'
wikisql
CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Percutaneous aspiration of liver"
mimicsql_data
CREATE TABLE table_38444 ( "Club" text, "League" text, "Venue" text, "Established" real, "Championships" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- With less than 1 Championship, what es the Established date of the Niagara Rugby Union League?
SELECT SUM("Established") FROM table_38444 WHERE "Championships" < '1' AND "League" = 'niagara rugby union'
wikisql
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE medication ( medicationid number, patientunitstayid number, drugname text, dosage text, routeadmin text, drugstarttime time, drugstoptime t...
SELECT t1.drugname FROM (SELECT medication.drugname, COUNT(medication.drugstarttime) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '007...
eicu
CREATE TABLE demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, language text, religion text, admission_type text, days_stay text, insurance text, ethnicity text, expire_flag text, admission_location t...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.marital_status = "WIDOWED" AND lab.label = "Hematocrit"
mimicsql_data
CREATE TABLE table_6039 ( "City" text, "State" text, "School" text, "Colony Name" text, "Date Founded" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Colony Name was Founded on january 19, 2012?
SELECT "Colony Name" FROM table_6039 WHERE "Date Founded" = 'january 19, 2012'
wikisql
CREATE TABLE table_7788 ( "Home team" text, "Home team score" text, "Away team" text, "Away team score" text, "Ground" text, "Crowd" real, "Date" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Home team with a crowd greater than ...
SELECT "Home team" FROM table_7788 WHERE "Crowd" > '13,905' AND "Ground" = 'telstra stadium'
wikisql
CREATE TABLE table_30933 ( "Series #" real, "Production Code" real, "Title" text, "Directed by" text, "Written by" text, "United States Original Airdate" text, "Canada Original Airdate" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is ...
SELECT MAX("Series #") FROM table_30933 WHERE "Title" = 'The Ruff Ruff Bunch'
wikisql
CREATE TABLE table_204_780 ( id number, "year" number, "competition" text, "venue" text, "position" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- other than 1984 , what year did he place first ?
SELECT "year" FROM table_204_780 WHERE "year" <> 1984 AND "position" = 1
squall
CREATE TABLE table_204_804 ( id number, "version" text, "length" text, "album" text, "remixed by" text, "year" number, "comment" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what was the shortest song ?
SELECT "version" FROM table_204_804 ORDER BY "length" LIMIT 1
squall
CREATE TABLE allergy ( allergyid number, patientunitstayid number, drugname text, allergyname text, allergytime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, sy...
SELECT COUNT(*) > 0 FROM diagnosis WHERE diagnosis.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '005-87465' AND patient.hospitaldischargetime IS NULL))
eicu
CREATE TABLE table_name_61 ( away_team VARCHAR, home_team VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What away team did Melbourne play as the home team?
SELECT away_team FROM table_name_61 WHERE home_team = "melbourne"
sql_create_context
CREATE TABLE table_204_468 ( id number, "pos" number, "no" number, "driver" text, "team" text, "laps" number, "time/retired" text, "grid" number, "points" number ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the name of the first...
SELECT "team" FROM table_204_468 WHERE id = 1
squall
CREATE TABLE PostNotices ( Id number, PostId number, PostNoticeTypeId number, CreationDate time, DeletionDate time, ExpiryDate time, Body text, OwnerUserId number, DeletionUserId number ) CREATE TABLE PendingFlags ( Id number, FlagTypeId number, PostId number, Creati...
SELECT Votes.UserId AS "user_link", Posts.Id AS "post_link" FROM Votes JOIN Posts ON Posts.Id = Votes.PostId WHERE VoteTypeId = 5 AND Posts.OwnerUserId = @UserID
sede
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 t_kc21 JOIN t_kc22 ON t_kc21.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE t_kc21.PERSON_ID = '34931218' AND t_kc22.STA_DATE BETWEEN '2011-11-01' AND '2019-07-11' AND t_kc21.MED_SER_ORG_NO = '1853262' AND t_kc22.MED_INV_ITEM_TYPE = '西药费'
css
CREATE TABLE gwyjzb ( 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 COUNT(gwyjzb.IN_DIAG_DIS_CD) FROM gwyjzb WHERE gwyjzb.PERSON_ID = '28382024' AND gwyjzb.IN_HOSP_DATE BETWEEN '2004-09-29' AND '2010-04-29' UNION SELECT COUNT(fgwyjzb.IN_DIAG_DIS_CD) FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '28382024' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2004-09-29' AND '2010-04-29'
css
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 mzjzjlb.JZLSH FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '40108491' AND NOT mzjzjlb.JZLSH IN (SELECT jybgb.JZLSH FROM jybgb WHERE jybgb.BGRQ <= '2011-09-11')
css
CREATE TABLE table_204_29 ( id number, "rank" number, "lane" number, "name" text, "nationality" text, "time" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was in last place ?
SELECT "name" FROM table_204_29 ORDER BY "rank" DESC LIMIT 1
squall
CREATE TABLE table_73857 ( "Result" text, "Date" text, "Race" text, "Venue" text, "Group" text, "Distance" text, "Weight (kg)" text, "Jockey" text, "Winner/2nd" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- List the weight for 56 ki...
SELECT "Distance" FROM table_73857 WHERE "Weight (kg)" = '56'
wikisql
CREATE TABLE table_name_18 ( segment_a VARCHAR, netflix VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the segment A name, having a Netflix of s01e12?
SELECT segment_a FROM table_name_18 WHERE netflix = "s01e12"
sql_create_context
CREATE TABLE table_74972 ( "Year" real, "Location" text, "Gold" text, "Silver" text, "Bronze" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which Bronze has a Year smaller than 1994, and a Silver of south korea?
SELECT "Bronze" FROM table_74972 WHERE "Year" < '1994' AND "Silver" = 'south korea'
wikisql
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 TIME_TO_STR(p.LastActivityDate, '%Y') AS YEAR, TIME_TO_STR(p.LastActivityDate, '%B') AS MONTH, MONTH(p.LastActivityDate) AS ACTIVE_MONTH_DAY, COUNT(*) AS Total FROM Posts AS p, PostTags AS ptags, Tags AS t, PostTypes AS ptypes WHERE p.PostTypeId = ptypes.Id AND ptypes.Id = 1 AND p.Id = ptags.PostId AND ptags.Tag...
sede
CREATE TABLE table_name_19 ( sport VARCHAR, championships VARCHAR, club VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the sport with championships less than 1 and club of erie bayhawks
SELECT sport FROM table_name_19 WHERE championships < 1 AND club = "erie bayhawks"
sql_create_context
CREATE TABLE d_icd_procedures ( row_id number, icd9_code text, short_title text, long_title text ) CREATE TABLE cost ( row_id number, subject_id number, hadm_id number, event_type text, event_id number, chargetime time, cost number ) CREATE TABLE chartevents ( row_id nu...
SELECT prescriptions.startdate FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 10855) AND prescriptions.route = 'tt' AND STRFTIME('%y-%m', prescriptions.startdate) >= '2102-11' ORDER BY prescriptions.startdate DESC LIMIT 1
mimic_iii
CREATE TABLE entrepreneur ( Company VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many distinct companies are there?
SELECT COUNT(DISTINCT Company) FROM entrepreneur
sql_create_context
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 demographic.admittime, procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.subject_id = "17595"
mimicsql_data
CREATE TABLE table_65737 ( "Season" text, "Division" text, "Tms." text, "Pos." text, "PFF NMCC" text, "UFL Cup" text, "AFC PC" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- which Tms has a Season of 2013?
SELECT "Tms." FROM table_65737 WHERE "Season" = '2013'
wikisql
CREATE TABLE table_name_73 ( yes_vote VARCHAR, date VARCHAR, state VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many positive votes for Tennessee in 2006?
SELECT yes_vote FROM table_name_73 WHERE date = "2006" AND state = "tennessee"
sql_create_context
CREATE TABLE accounts ( account_id number, statement_id number, account_details text ) CREATE TABLE ref_budget_codes ( budget_type_code text, budget_type_description text ) CREATE TABLE projects ( project_id number, project_details text ) CREATE TABLE documents_with_expenses ( documen...
SELECT budget_type_description FROM ref_budget_codes WHERE budget_type_code = "ORG"
spider
CREATE TABLE table_11964047_9 ( home VARCHAR, score VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what's the home team where score is l 80 88
SELECT home FROM table_11964047_9 WHERE score = "L 80–88"
sql_create_context
CREATE TABLE table_name_12 ( attendance VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the attendance when the result was w61-7?
SELECT attendance FROM table_name_12 WHERE result = "w61-7"
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.JCRGH, jyjgzbb.JCRXM FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB ...
css
CREATE TABLE table_name_77 ( _neutrons_per_fission VARCHAR, yield INTEGER, group VARCHAR, decay_constant__s_−1__ VARCHAR, half_life__s_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the yield, neutrons per fission of the group with decay...
SELECT SUM(yield), _neutrons_per_fission FROM table_name_77 WHERE decay_constant__s_−1__ < 0.301 AND half_life__s_ = 22.72 AND group > 2
sql_create_context
CREATE TABLE table_12232526_2 ( class VARCHAR, note VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who is the class where note is reportedly still active as of 2012?
SELECT class FROM table_12232526_2 WHERE note = "Reportedly still active as of 2012"
sql_create_context
CREATE TABLE locations ( LOCATION_ID decimal(4,0), STREET_ADDRESS varchar(40), POSTAL_CODE varchar(12), CITY varchar(30), STATE_PROVINCE varchar(25), COUNTRY_ID varchar(2) ) CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), ...
SELECT HIRE_DATE, SALARY FROM employees WHERE NOT EMPLOYEE_ID IN (SELECT EMPLOYEE_ID FROM job_history) ORDER BY HIRE_DATE
nvbench
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 * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2609401' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-07-02' AND '2021-01-28' EXCEPT SELECT * FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '2609401' AND t_kc21.IN_HOSP_DATE BETWEEN '2006-07-02' AND '2021-01-28' AND t_kc21.MED_ORG_DEPT_NM = '麻醉科'
css
CREATE TABLE table_1242447_1 ( strongs_words_compounded VARCHAR, english_spelling VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the strongs words compounded when the english spelling is jonadab?
SELECT strongs_words_compounded FROM table_1242447_1 WHERE english_spelling = "Jonadab"
sql_create_context
CREATE TABLE table_10708 ( "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 the away team at Victoria Park?
SELECT "Away team" FROM table_10708 WHERE "Venue" = 'victoria park'
wikisql
CREATE TABLE stadium ( id int, name text, Home_Games int, Average_Attendance real, Total_Attendance real, Capacity_Percentage real ) CREATE TABLE injury_accident ( game_id int, id int, Player text, Injury text, Number_of_matches text, Source text ) CREATE TABLE game ( ...
SELECT Away_team, COUNT(Away_team) FROM game GROUP BY Home_team, Away_team ORDER BY COUNT(Away_team) DESC
nvbench
CREATE TABLE hz_info ( KH text, KLX number, YLJGDM text, RYBH text ) 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 t...
SELECT mzjzjlb.JZLSH 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 = '褚修筠' AND hz_info.YLJGDM = '1673796' AND NOT mzjzjlb.JZKSMC LIKE '%呼吸%'
css
CREATE TABLE table_name_78 ( player VARCHAR, to_par VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What Player had a To Par of +2?
SELECT player FROM table_name_78 WHERE to_par = "+2"
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 t_kc21.MED_CLINIC_ID FROM t_kc21 JOIN t_kc24 JOIN t_kc21_t_kc24 ON t_kc21.MED_CLINIC_ID = t_kc21_t_kc24.MED_CLINIC_ID AND t_kc21_t_kc24.MED_SAFE_PAY_ID = t_kc24.MED_SAFE_PAY_ID WHERE t_kc21.PERSON_NM = '吴涵润' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2005-12-31' AND '2011-07-11'
css
CREATE TABLE table_55345 ( "Rank" real, "Nation" text, "Gold" real, "Silver" real, "Bronze" real, "Total" real ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the sum of a rank whose nation is West Germany and has bronze larger than 0?
SELECT SUM("Rank") FROM table_55345 WHERE "Nation" = 'west germany' AND "Bronze" > '0'
wikisql