instruction
stringlengths
151
7.46k
output
stringlengths
2
4.44k
source
stringclasses
26 values
CREATE TABLE table_name_63 ( location VARCHAR, rank_final VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the Location of the Competition with a Rank-Final of 10?
SELECT location FROM table_name_63 WHERE rank_final = "10"
sql_create_context
CREATE TABLE fare ( fare_id int, from_airport varchar, to_airport varchar, fare_basis_code text, fare_airline text, restriction_code text, one_direction_cost int, round_trip_cost int, round_trip_required varchar ) CREATE TABLE food_service ( meal_code text, meal_number int, ...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'CINCINNATI' AND flight.departure_time > 1500 AND flight.to_airport = AIRPORT_SERVICE_1.ai...
atis
CREATE TABLE table_55189 ( "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. -- Who was the visiting team on April 8 where more than 19,141 ...
SELECT "Visitor" FROM table_55189 WHERE "Attendance" > '19,141' AND "Date" = 'april 8'
wikisql
CREATE TABLE table_72744 ( "Former kingdom" text, "Province" text, "Hangul" text, "Hanja" text, "Capital" text, "Modern equivalent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- The hanja is for what capital?
SELECT "Capital" FROM table_72744 WHERE "Hanja" = '尙州'
wikisql
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 gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM, AVG(gwyjzb.PERSON_AGE) FROM gwyjzb WHERE gwyjzb.MED_SER_ORG_NO = '5211360' GROUP BY gwyjzb.MED_ORG_DEPT_NM, gwyjzb.OUT_DIAG_DIS_NM HAVING AVG(gwyjzb.PERSON_AGE) > 10 UNION SELECT fgwyjzb.MED_ORG_DEPT_NM, fgwyjzb.OUT_DIAG_DIS_NM, AVG(fgwyjzb.PERSON_AGE) FROM fgwyjzb...
css
CREATE TABLE table_64943 ( "Heat" real, "Lane" real, "Name" text, "Nationality" text, "Time" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What lane has a time of 24.83 and a heat less than 11?
SELECT SUM("Lane") FROM table_64943 WHERE "Time" = '24.83' AND "Heat" < '11'
wikisql
CREATE TABLE table_name_2 ( bronze VARCHAR, sport VARCHAR, total VARCHAR, gold VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When athletics has a total more than 2 and 0 gold, what is the total number of bronze?
SELECT COUNT(bronze) FROM table_name_2 WHERE total > 2 AND gold = 0 AND sport = "athletics"
sql_create_context
CREATE TABLE bdmzjzjlb ( CYBQDM text, CYBQMC text, CYCWH text, CYKSDM text, CYKSMC text, CYSJ time, CYZTDM number, HZXM text, JZKSDM text, JZKSMC text, JZLSH number, KH text, KLX number, MZBMLX number, MZJZLSH text, MZZDBM text, MZZDMC text, MZZYZD...
SELECT * FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '章雅柔' AND hz_info.YLJGDM = '0809864' AND wdmzjzjlb.CYKSMC LIKE '%肝胆科%' UNION SELECT * FROM person_info JOIN ...
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 jyjgzbb.JCZBJGDL, jyjgzbb.JCZBJGDW 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.JZ...
css
CREATE TABLE Manufacturers ( Code INTEGER, Name VARCHAR(255), Headquarter VARCHAR(255), Founder VARCHAR(255), Revenue REAL ) CREATE TABLE Products ( Code INTEGER, Name VARCHAR(255), Price DECIMAL, Manufacturer INTEGER ) -- Using valid SQLite, answer the following questions for the...
SELECT T1.Name, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name, T1.Name ORDER BY T1.Name DESC
nvbench
CREATE TABLE TagSynonyms ( Id number, SourceTagName text, TargetTagName text, CreationDate time, OwnerUserId number, AutoRenameCount number, LastAutoRename time, Score number, ApprovedByUserId number, ApprovalDate time ) CREATE TABLE PostTypes ( Id number, Name text ) C...
SELECT DISTINCT PostId FROM PostTags ORDER BY PostId LIMIT 10
sede
CREATE TABLE vitalperiodic ( vitalperiodicid number, patientunitstayid number, temperature number, sao2 number, heartrate number, respiration number, systemicsystolic number, systemicdiastolic number, systemicmean number, observationtime time ) CREATE TABLE intakeoutput ( in...
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 = '027-154299')) AND intakeoutput.cellpath LIKE '%intake%' AND ...
eicu
CREATE TABLE DEPARTMENT ( DEPT_CODE varchar(10), DEPT_NAME varchar(30), SCHOOL_CODE varchar(8), EMP_NUM int, DEPT_ADDRESS varchar(20), DEPT_EXTENSION varchar(4) ) CREATE TABLE CLASS ( CLASS_CODE varchar(5), CRS_CODE varchar(10), CLASS_SECTION varchar(2), CLASS_TIME varchar(20), ...
SELECT DEPT_CODE, COUNT(*) FROM STUDENT GROUP BY DEPT_CODE ORDER BY DEPT_CODE DESC
nvbench
CREATE TABLE table_2661 ( "Performance comparison" text, "78 Fury" text, "78 Monaco" text, "79 St. Regis" text, "80 St. Regis" text, "81 St. Regis" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is every performance comparison when 80 St. R...
SELECT "Performance comparison" FROM table_2661 WHERE "80 St. Regis" = '360'
wikisql
CREATE TABLE table_76288 ( "Year" real, "Category" text, "President" text, "Nominee" text, "Film or Television Series or Miniseries" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of Frank Langella?
SELECT "Result" FROM table_76288 WHERE "Nominee" = 'frank langella'
wikisql
CREATE TABLE table_name_18 ( round VARCHAR, winning_manufacturer VARCHAR, circuit VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the final number for the winning manufacturer with Mercedes-benz, and a circuit of hockenheimring?
SELECT COUNT(round) FROM table_name_18 WHERE winning_manufacturer = "mercedes-benz" AND circuit = "hockenheimring"
sql_create_context
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 lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.dob_year < "2170" AND lab.fluid = "Blood"
mimicsql_data
CREATE TABLE table_203_270 ( id number, "year" number, "competition" text, "venue" text, "position" text, "event" text, "notes" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- what is the total amount of times the frankfurt marathon occurred ...
SELECT COUNT(*) FROM table_203_270 WHERE "competition" = 'frankfurt marathon'
squall
CREATE TABLE compartment_class ( compartment varchar, class_type varchar ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE time_interval ( period text...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE (CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'DENVER' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'LAS VE...
atis
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE PostNotices ( Id number, PostId number, PostNot...
SELECT * FROM Tags ORDER BY ExcerptPostId DESC
sede
CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday varchar, thursday varchar, friday varchar, saturday varchar, sunday varchar, has_final_proje...
SELECT DISTINCT course.department, course.name, course.number, program_course.workload FROM course INNER JOIN area ON course.course_id = area.course_id INNER JOIN program_course ON program_course.course_id = course.course_id WHERE area.area LIKE '%human computer interaction%' AND program_course.workload < (SELECT MIN(P...
advising
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 SOC_SRT_DIRE_CD FROM t_kc22 WHERE MED_CLINIC_ID = '21173614248' AND SOC_SRT_DIRE_NM = '螺内酯片'
css
CREATE TABLE architect ( id VARCHAR, name VARCHAR, gender VARCHAR ) CREATE TABLE bridge ( architect_id VARCHAR ) CREATE TABLE mill ( architect_id VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What are the ids, names and genders of the architec...
SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN bridge AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 2 UNION SELECT T1.id, T1.name, T1.gender FROM architect AS T1 JOIN mill AS T2 ON T1.id = T2.architect_id GROUP BY T1.id HAVING COUNT(*) = 1
sql_create_context
CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, UserId number, VoteTypeId number, CreationDate time, TargetUserId number, TargetRepChange number ) CREATE TABLE FlagTypes ( Id ...
SELECT UserId AS "user_link", COUNT(*) AS Hammers FROM Badges AS b WHERE b.TagBased = 1 AND b.Class = 1 GROUP BY UserId ORDER BY COUNT(*) DESC LIMIT 200
sede
CREATE TABLE airport_service ( city_code varchar, airport_code varchar, miles_distant int, direction varchar, minutes_distant int ) CREATE TABLE restriction ( restriction_code text, advance_purchase int, stopovers text, saturday_stay_required text, minimum_stay int, maximum_...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'NASHVILLE' AND CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SEAT...
atis
CREATE TABLE table_40815 ( "1935" text, "1936" text, "1937" text, "1938" text, "1939" text, "1940" text, "1941" text, "1943" text, "1945" text, "1946" text, "1947" text, "1948" text, "1949" text, "1950" text, "1951" text, "1952" text, "1953" text ) -...
SELECT "1938" FROM table_40815 WHERE "1948" = 'n/a'
wikisql
CREATE TABLE program ( program_id int, name varchar, college varchar, introduction varchar ) CREATE TABLE course_offering ( offering_id int, course_id int, semester int, section_number int, start_time time, end_time time, monday varchar, tuesday varchar, wednesday va...
SELECT DISTINCT instructor.name FROM course INNER JOIN course_offering ON course.course_id = course_offering.course_id INNER JOIN offering_instructor ON offering_instructor.offering_id = course_offering.offering_id INNER JOIN instructor ON offering_instructor.instructor_id = instructor.instructor_id WHERE course_offeri...
advising
CREATE TABLE table_18554 ( "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. -- What party does the incumbent from the Ohio 20 district belong to?
SELECT "Party" FROM table_18554 WHERE "District" = 'Ohio 20'
wikisql
CREATE TABLE table_28092844_16 ( intermediate_sprints_classification_klasyfikacja_najaktywniejszych VARCHAR, winner VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the intermediate sprint classification for the race whose winner was Daniel Martin?
SELECT intermediate_sprints_classification_klasyfikacja_najaktywniejszych FROM table_28092844_16 WHERE winner = "Daniel Martin"
sql_create_context
CREATE TABLE patients ( row_id number, subject_id number, gender text, dob time, dod time ) CREATE TABLE inputevents_cv ( row_id number, subject_id number, hadm_id number, icustay_id number, charttime time, itemid number, amount number ) CREATE TABLE outputevents ( ...
SELECT admissions.dischtime FROM admissions WHERE admissions.subject_id = 29666 AND DATETIME(admissions.dischtime, 'start of year') = DATETIME(CURRENT_TIME(), 'start of year', '-1 year') ORDER BY admissions.dischtime LIMIT 1
mimic_iii
CREATE TABLE SuggestedEdits ( Id number, PostId number, CreationDate time, ApprovalDate time, RejectionDate time, OwnerUserId number, Comment text, Text text, Title text, Tags text, RevisionGUID other ) CREATE TABLE Badges ( Id number, UserId number, Name text, ...
SELECT ph.PostId AS "post_link", u.DisplayName AS CloseUser, COUNT(v.value) AS VoterCount FROM PostHistory AS ph JOIN Posts AS p ON p.Id = ph.PostId JOIN Users AS u ON u.Id = ph.UserId JOIN LATERAL OPENJSON(ph.Text, '$.Voters') AS v WHERE PostHistoryTypeId = 10 AND p.PostTypeId = 1 GROUP BY ph.PostId, ph.Text, ph.Comme...
sede
CREATE TABLE table_35698 ( "Track" text, "City" text, "State" text, "Opened (closing date if defunct)" text, "Surface" text, "Length" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the track in Washington state?
SELECT "Track" FROM table_35698 WHERE "State" = 'washington'
wikisql
CREATE TABLE ReviewRejectionReasons ( Id number, Name text, Description text, PostTypeId number ) CREATE TABLE Badges ( Id number, UserId number, Name text, Date time, Class number, TagBased boolean ) CREATE TABLE Posts ( Id number, PostTypeId number, AcceptedAnswer...
SELECT DISTINCT CONCAT('https://stackoverflow.com/users/', u.Id) AS "profile_link", u.DisplayName, u.Reputation, u.Location, u.WebsiteUrl, REPLACE(REPLACE(u.AboutMe, CHAR(13), ''), CHAR(10), '') AS AboutMe FROM Users AS u WHERE (u.AboutMe LIKE '%linux%' OR u.AboutMe LIKE '%ubuntu%' OR u.AboutMe LIKE '%unix%' OR u.About...
sede
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 wdmzjzjlb.SG, wdmzjzjlb.TZ FROM person_info JOIN hz_info JOIN wdmzjzjlb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX WHERE person_info.XM = '姜君昊' UNION SELECT bdmzjzjlb.SG, bdmzjzjlb.TZ FROM person_info JOIN hz_info JOIN bd...
css
CREATE TABLE t_kc21_t_kc22 ( MED_CLINIC_ID text, MED_EXP_DET_ID number ) CREATE TABLE t_kc22 ( AMOUNT number, CHA_ITEM_LEV number, DATA_ID text, DIRE_TYPE number, DOSE_FORM text, DOSE_UNIT text, EACH_DOSAGE text, EXP_OCC_DATE time, FLX_MED_ORG_ID text, FXBZ number, H...
SELECT t_kc21.IN_DIAG_DIS_CD, t_kc21.IN_DIAG_DIS_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '06397639' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc24.MED_CLINIC_ID FROM t_kc24 WHERE t_kc24.MED_AMOUT >= 6289.51)
css
CREATE TABLE table_204_885 ( id number, "season" text, "competition" text, "round" text, "opponent" text, "home" text, "away" text, "agg." text, "bye" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- who was their last opponent in the ...
SELECT "opponent" FROM table_204_885 WHERE "competition" = 'uefa cup' AND "season" = '2007-08' ORDER BY id DESC LIMIT 1
squall
CREATE TABLE table_11803648_22 ( position VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the position of player Tobias Lindberg?
SELECT position FROM table_11803648_22 WHERE player = "Tobias Lindberg"
sql_create_context
CREATE TABLE table_29254 ( "District" text, "Incumbent" text, "Party" text, "Elected" real, "Status" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the district with the result mac collins (r) unopposed?
SELECT "District" FROM table_29254 WHERE "Result" = 'Mac Collins (R) unopposed'
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_DIRE_CD text, MED_DIRE_NM text,...
SELECT t_kc21.MED_CLINIC_ID FROM t_kc21 WHERE t_kc21.PERSON_ID = '59839403' AND t_kc21.MED_CLINIC_ID IN (SELECT t_kc21_t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT > 2930.76)
css
CREATE TABLE nomination ( Artwork_ID int, Festival_ID int, Result text ) CREATE TABLE festival_detail ( Festival_ID int, Festival_Name text, Chair_Name text, Location text, Year int, Num_of_Audience int ) CREATE TABLE artwork ( Artwork_ID int, Type text, Name text ) -...
SELECT T3.Festival_Name, T1.Festival_ID FROM nomination AS T1 JOIN artwork AS T2 ON T1.Artwork_ID = T2.Artwork_ID JOIN festival_detail AS T3 ON T1.Festival_ID = T3.Festival_ID ORDER BY T1.Festival_ID
nvbench
CREATE TABLE table_1342370_10 ( party VARCHAR, incumbent VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many parties were represented for Charles R. Crisp?
SELECT COUNT(party) FROM table_1342370_10 WHERE incumbent = "Charles R. Crisp"
sql_create_context
CREATE TABLE Tags ( Id number, TagName text, Count number, ExcerptPostId number, WikiPostId number ) CREATE TABLE ReviewTaskResultTypes ( Id number, Name text, Description text ) CREATE TABLE VoteTypes ( Id number, Name text ) CREATE TABLE ReviewTaskResults ( Id number, ...
SELECT COUNT(1) AS Users, SUM(s) AS Writers, ROUND(SUM(s) * 100.0 / COUNT(1), 2) AS "writers_%" FROM (SELECT u.Id, (CASE WHEN SUM(CASE WHEN p.PostTypeId = 2 AND (p.Score >= @minVote) THEN 1 ELSE 0 END) >= @minPost THEN 1 ELSE 0 END) AS s, (TIME_TO_STR(u.CreationDate, '%Y') * 100 + TIME_TO_STR(u.CreationDate, '%q')) AS ...
sede
CREATE TABLE table_74424 ( "Week #" text, "Theme" text, "Song choice" text, "Original artist" text, "Order #" text, "Result" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which artists have order number 6?
SELECT "Original artist" FROM table_74424 WHERE "Order #" = '6'
wikisql
CREATE TABLE table_31720 ( "Frequency" text, "Call sign" text, "Branding" text, "Format" text, "Owner" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who is the owner with the branding fox fm?
SELECT "Owner" FROM table_31720 WHERE "Branding" = 'fox fm'
wikisql
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 * FROM t_kc21 WHERE MED_SER_ORG_NO = '1303547' AND IN_HOSP_DATE BETWEEN '2003-02-21' AND '2005-09-08') EXCEPT (SELECT * FROM t_kc21 WHERE MED_SER_ORG_NO = '1303547' AND IN_HOSP_DATE BETWEEN '2003-02-21' AND '2005-09-08' AND MED_ORG_DEPT_NM = '乳腺外科')
css
CREATE TABLE table_11677691_1 ( hometown VARCHAR, player VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is Jeremy Hill's hometown?
SELECT hometown FROM table_11677691_1 WHERE player = "Jeremy Hill"
sql_create_context
CREATE TABLE table_77439 ( "Week" real, "Date" text, "Opponent" text, "Result" text, "Record" text, "Game site" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What team was the opponent in a week earlier than 17 on June 17, 2006?
SELECT "Opponent" FROM table_77439 WHERE "Week" < '17' AND "Date" = 'june 17, 2006'
wikisql
CREATE TABLE table_72671 ( "Position" real, "Team" text, "Points" real, "Played" real, "Won" real, "Drawn" real, "Lost" real, "For" real, "Against" real, "Difference" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the most f...
SELECT MAX("For") FROM table_72671 WHERE "Difference" = '7'
wikisql
CREATE TABLE table_name_37 ( result VARCHAR, work VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What was the result of t.u.f.f. puppy?
SELECT result FROM table_name_37 WHERE work = "t.u.f.f. puppy"
sql_create_context
CREATE TABLE table_name_71 ( engine VARCHAR, points VARCHAR, year VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which engine has more than 1 point after 1981?
SELECT engine FROM table_name_71 WHERE points > 1 AND year > 1981
sql_create_context
CREATE TABLE table_23284271_6 ( score VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the score for december 27
SELECT COUNT(score) FROM table_23284271_6 WHERE date = "December 27"
sql_create_context
CREATE TABLE table_train_214 ( "id" int, "gender" string, "lead_ecg" bool, "systolic_blood_pressure_sbp" int, "qt_interval" bool, "urine_dipstick_protein" int, "stroke" bool, "transient_ischemic_attack" bool, "qtc" int, "long_qt_syndrome" bool, "cardiovascular_disease" bool, ...
SELECT * FROM table_train_214 WHERE estimated_glomerular_filtration_rate_egfr < 60
criteria2sql
CREATE TABLE ReviewTaskResults ( Id number, ReviewTaskId number, ReviewTaskResultTypeId number, CreationDate time, RejectionReasonId number, Comment text ) CREATE TABLE PostTypes ( Id number, Name text ) CREATE TABLE SuggestedEditVotes ( Id number, SuggestedEditId number, U...
WITH USER_BY_TAG AS (SELECT ROW_NUMBER() OVER (ORDER BY COUNT(*) DESC) AS Rank, u.Id AS "user_link", COUNT(*) AS UpVotes FROM Tags AS t INNER JOIN PostTags AS pt ON pt.TagId = t.Id INNER JOIN Posts AS p ON p.ParentId = pt.PostId INNER JOIN Votes AS v ON v.PostId = p.Id AND VoteTypeId = 2 INNER JOIN Users AS u ON u.Id =...
sede
CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, first_careunit text, last_careunit text, first_wardid number, last_wardid number, intime time, outtime time ) CREATE TABLE inputevents_cv ( 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 = 8244)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'arterial ...
mimic_iii
CREATE TABLE table_27003223_4 ( registered_voters VARCHAR, d_r_spread VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the percentage of registered voters in which the d-r spread is +14.3%?
SELECT registered_voters FROM table_27003223_4 WHERE d_r_spread = "+14.3%"
sql_create_context
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.days_stay > "6"
mimicsql_data
CREATE TABLE students ( student_id number, date_of_registration time, date_of_latest_logon time, login_name text, password text, personal_name text, middle_name text, family_name text ) CREATE TABLE student_tests_taken ( registration_id number, date_test_taken time, test_res...
SELECT T1.personal_name, T1.family_name, T2.author_id FROM course_authors_and_tutors AS T1 JOIN courses AS T2 ON T1.author_id = T2.author_id GROUP BY T2.author_id ORDER BY COUNT(*) DESC LIMIT 1
spider
CREATE TABLE procedures ( 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 ) ...
SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.age < "56" AND demographic.admityear < "2176"
mimicsql_data
CREATE TABLE table_19948664_2 ( ranking_la__2_ VARCHAR, world_ranking__1_ VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many items were under ranking l.a.(2) when the world ranking was 21st?
SELECT COUNT(ranking_la__2_) FROM table_19948664_2 WHERE world_ranking__1_ = "21st"
sql_create_context
CREATE TABLE table_name_53 ( laps INTEGER, time_retired VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- How many laps were there when time/retired was gearbox?
SELECT SUM(laps) FROM table_name_53 WHERE time_retired = "gearbox"
sql_create_context
CREATE TABLE table_42223 ( "Former kingdom" text, "Province" text, "Hangul" text, "Hanja" text, "Capital" text, "Modern equivalent" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the capital of the province with in Hanja?
SELECT "Capital" FROM table_42223 WHERE "Hanja" = '漢州'
wikisql
CREATE TABLE table_25185 ( "Romanised name" text, "Chinese name" text, "age at appointment" real, "Portfolio" text, "Prior occupation" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the romanised name of the official who was Secretary for hea...
SELECT "Romanised name" FROM table_25185 WHERE "Portfolio" = 'Secretary for Health, Welfare and Food'
wikisql
CREATE TABLE paperdataset ( paperid int, datasetid int ) CREATE TABLE dataset ( datasetid int, datasetname varchar ) CREATE TABLE writes ( paperid int, authorid int ) CREATE TABLE author ( authorid int, authorname varchar ) CREATE TABLE paperfield ( fieldid int, paperid int )...
SELECT DISTINCT AUTHOR_1.authorid FROM author AS AUTHOR_0, author AS AUTHOR_1, writes AS WRITES_0, writes AS WRITES_1 WHERE AUTHOR_0.authorname = 'lorenzo bruzzone' AND WRITES_0.authorid = AUTHOR_0.authorid AND WRITES_1.authorid = AUTHOR_1.authorid AND WRITES_1.paperid = WRITES_0.paperid
scholar
CREATE TABLE table_9255 ( "Season" real, "Conference" text, "Champion" text, "Format" text, "Series" text, "Runner-Up" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What series has a season after 2008, super leg final as the format, and confere...
SELECT "Series" FROM table_9255 WHERE "Season" > '2008' AND "Format" = 'super leg final' AND "Conference" = 'conference v'
wikisql
CREATE TABLE state ( state_code text, state_name text, country_name text ) CREATE TABLE date_day ( month_number int, day_number int, year int, day_name varchar ) CREATE TABLE code_description ( code varchar, description text ) CREATE TABLE city ( city_code varchar, city_na...
SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'BALTIMORE' AND flight.arrival_time = 1900 AND flight.to_airport = AIRPORT_SERVICE_1.airp...
atis
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 AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.age >= "76"
mimicsql_data
CREATE TABLE table_name_59 ( long INTEGER, loss VARCHAR, gain VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- When the player gained below 1,405 yards and lost over 390 yards, what's the sum of the long yards?
SELECT SUM(long) FROM table_name_59 WHERE loss > 390 AND gain < 1 OFFSET 405
sql_create_context
CREATE TABLE table_61505 ( "Year" real, "Binibining Pilipinas-Universe" text, "Binibining Pilipinas-World" text, "Binibining Pilipinas International" text, "Miss Maja Pilipinas" text, "First runner-up" text, "Second runner-up" text ) -- Using valid SQLite, answer the following questions fo...
SELECT "Year" FROM table_61505 WHERE "Binibining Pilipinas International" = 'alma concepcion'
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 demographic ( subject_id text, hadm_id text, name text, marital_status text, age text, dob text, gender text, ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.admission_type = "EMERGENCY" AND demographic.diagnosis = "POSTERIOR COMMUNICATING ANEURYSM/SDA"
mimicsql_data
CREATE TABLE table_name_19 ( venue VARCHAR, result VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- In what venues was the match with a final result of Eng by 4 wkts?
SELECT venue FROM table_name_19 WHERE result = "eng by 4 wkts"
sql_create_context
CREATE TABLE table_58848 ( "Year" real, "Manufacturer" text, "Start" real, "Finish" real, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- WHAT MANUFACTURER AFTER 1966 HAD A START SMALLER THAN 5, A WOOD TEAM AND FINISHED 35?
SELECT "Manufacturer" FROM table_58848 WHERE "Year" > '1966' AND "Start" < '5' AND "Team" = 'wood' AND "Finish" = '35'
wikisql
CREATE TABLE countries ( COUNTRY_ID varchar(2), COUNTRY_NAME varchar(40), REGION_ID decimal(10,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 employees ( EMPLOYEE_ID decimal(6,0),...
SELECT HIRE_DATE, SUM(MANAGER_ID) FROM employees WHERE FIRST_NAME LIKE '%D%' OR FIRST_NAME LIKE '%S%' ORDER BY SUM(MANAGER_ID) DESC
nvbench
CREATE TABLE table_48456 ( "Game" real, "Date" text, "Team" text, "Score" text, "Location Attendance" text, "Record" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What is the location and attendance of the game when the score is 125-100?
SELECT "Location Attendance" FROM table_48456 WHERE "Score" = '125-100'
wikisql
CREATE TABLE table_name_31 ( tries_for VARCHAR, tries_against VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- tries against correct as of 2007-10-15 has what tries for?
SELECT tries_for FROM table_name_31 WHERE tries_against = "correct as of 2007-10-15"
sql_create_context
CREATE TABLE employees ( employee_id VARCHAR, first_name VARCHAR, last_name VARCHAR, job_id VARCHAR, salary INTEGER ) -- Using valid SQLite, answer the following questions for the tables provided above. -- display the employee number, name( first name and last name ) and job title for all employe...
SELECT employee_id, first_name, last_name, job_id FROM employees WHERE salary > (SELECT MAX(salary) FROM employees WHERE job_id = 'PU_MAN')
sql_create_context
CREATE TABLE table_2160008_4 ( reason_for_change VARCHAR, date_successor_seated VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the number of reason for change on may 11, 1939
SELECT COUNT(reason_for_change) FROM table_2160008_4 WHERE date_successor_seated = "May 11, 1939"
sql_create_context
CREATE TABLE table_2861364_1 ( place_of_execution VARCHAR, executed_person VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- where was mazouz ghaouti executed?
SELECT place_of_execution FROM table_2861364_1 WHERE executed_person = "Mazouz Ghaouti"
sql_create_context
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE treatment ( treatmentid number, patientunitstayid number, treatmentname text, treatmenttime time ) CREATE TABLE vitalperiodic ( vitalperiodicid number, ...
SELECT COUNT(DISTINCT t1.uniquepid) FROM (SELECT patient.uniquepid, diagnosis.diagnosistime, patient.patienthealthsystemstayid FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'pancreatitis - acute' AND STRFTIME('%y', diagnosis.diagnosistime) <= '210...
eicu
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 ) CREATE TABLE icustays ( row_id number, subject_id number, hadm_id number, icustay_id number, ...
SELECT t3.drug FROM (SELECT t2.drug, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT admissions.subject_id, prescriptions.startdate FROM prescriptions JOIN admissions ON prescriptions.hadm_id = admissions.hadm_id WHERE prescriptions.drug = 'vincristine sulfate' AND DATETIME(prescriptions.startdate, 'start...
mimic_iii
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 COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.ethnicity = "BLACK/HAITIAN" AND demographic.diagnosis = "AORTIC INSUFFICIENCY\RE-DO STERNOTOMY; AORTIC VALVE REPLACEMENT "
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.JCZBJGDL, jyjgzbb.JCZBJGDW FROM hz_info JOIN wdmzjzjlb JOIN jybgb JOIN jyjgzbb ON hz_info.YLJGDM = wdmzjzjlb.YLJGDM AND hz_info.KH = wdmzjzjlb.KH AND hz_info.KLX = wdmzjzjlb.KLX AND wdmzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND wdmzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jyb...
css
CREATE TABLE table_13741576_6 ( club VARCHAR, points_for VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What club has 536 points for?
SELECT club FROM table_13741576_6 WHERE points_for = "536"
sql_create_context
CREATE TABLE table_16418 ( "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 was the bleeding time for the factor x deficiency as...
SELECT "Bleeding time" FROM table_16418 WHERE "Condition" = 'Factor X deficiency as seen in amyloid purpura'
wikisql
CREATE TABLE table_6309 ( "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 team scored 65-87
SELECT "Date" FROM table_6309 WHERE "Record" = '65-87'
wikisql
CREATE TABLE prescriptions ( subject_id text, hadm_id text, icustay_id text, drug_type text, drug text, formulary_drug_cd text, route text, drug_dose text ) CREATE TABLE procedures ( subject_id text, hadm_id text, icd9_code text, short_title text, long_title text ) ...
SELECT AVG(demographic.age) FROM demographic WHERE demographic.expire_flag = "0" AND demographic.diagnosis = "VENTRICULAR TACHYCARDIA"
mimicsql_data
CREATE TABLE table_26893 ( "Team" text, "Truck(s)" text, "#" real, "Driver(s)" text, "Primary Sponsor(s)" text, "Listed Owner(s)" text, "Crew Chief" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the team for susan bates
SELECT "Team" FROM table_26893 WHERE "Listed Owner(s)" = 'Susan Bates'
wikisql
CREATE TABLE lessons ( lesson_id number, customer_id number, lesson_status_code text, staff_id number, vehicle_id number, lesson_date time, lesson_time text, price number ) CREATE TABLE customer_payments ( customer_id number, datetime_payment time, payment_method_code text, ...
SELECT payment_method_code, COUNT(*) FROM customer_payments GROUP BY payment_method_code
spider
CREATE TABLE transfers ( row_id number, subject_id number, hadm_id number, icustay_id number, eventtype text, careunit text, wardid number, intime time, outtime time ) CREATE TABLE microbiologyevents ( row_id number, subject_id number, hadm_id number, charttime time,...
SELECT d_labitems.label FROM d_labitems WHERE d_labitems.itemid IN (SELECT t1.itemid FROM (SELECT labevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM labevents WHERE STRFTIME('%y', labevents.charttime) = '2105' GROUP BY labevents.itemid) AS t1 WHERE t1.c1 <= 3)
mimic_iii
CREATE TABLE table_name_28 ( school VARCHAR, mascot VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Which School's Mascot is Raiders?
SELECT school FROM table_name_28 WHERE mascot = "raiders"
sql_create_context
CREATE TABLE table_51195 ( "Year" real, "Theme" text, "Artist" text, "Composition" text, "Mintage" real, "Issue Price" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- What's the mintage when the theme was year of the rabbit?
SELECT "Mintage" FROM table_51195 WHERE "Theme" = 'year of the rabbit'
wikisql
CREATE TABLE lab ( labid number, patientunitstayid number, labname text, labresult number, labresulttime time ) CREATE TABLE microlab ( microlabid number, patientunitstayid number, culturesite text, organism text, culturetakentime time ) CREATE TABLE vitalperiodic ( vitalpe...
SELECT t3.drugname FROM (SELECT t2.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, medication.drugstarttime FROM medication JOIN patient ON medication.patientunitstayid = patient.patientunitstayid WHERE medication.drugname = '2 ml vial: midazolam hcl 2 mg/2ml ij soln' AND STRF...
eicu
CREATE TABLE table_name_9 ( name VARCHAR, caps VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has a 59 cap?
SELECT name FROM table_name_9 WHERE caps = 59
sql_create_context
CREATE TABLE table_59082 ( "Season" text, "GP/MP" text, "Kills" real, "K/Game" real, "Errors" real, "Total Attempts" real, "Percentage" real, "Assists" real, "Service Aces" real, "Digs" real, "Solo Blocks" real, "Block Assists" real, "Total Blocks" real, "Points" ...
SELECT MAX("Percentage") FROM table_59082 WHERE "Total Blocks" > '361'
wikisql
CREATE TABLE Dorm ( dormid INTEGER, dorm_name VARCHAR(20), student_capacity INTEGER, gender VARCHAR(1) ) CREATE TABLE Dorm_amenity ( amenid INTEGER, amenity_name VARCHAR(25) ) CREATE TABLE Lives_in ( stuid INTEGER, dormid INTEGER, room_number INTEGER ) CREATE TABLE Student ( S...
SELECT dorm_name, AVG(T1.Age) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid GROUP BY T3.dorm_name
nvbench
CREATE TABLE mzjzjlb ( YLJGDM text, JZLSH text, KH text, KLX number, MJZH text, HZXM text, NLS number, NLY number, ZSEBZ number, JZZTDM number, JZZTMC text, JZJSSJ time, TXBZ number, ZZBZ number, WDBZ number, JZKSBM text, JZKSMC text, JZKSRQ time, ...
SELECT COUNT(*) FROM zyjzjlb WHERE JZKSMC = '创伤骨科' AND RYDJSJ BETWEEN '2012-09-21' AND '2017-09-17'
css
CREATE TABLE admissions ( row_id number, subject_id number, hadm_id number, admittime time, dischtime time, admission_type text, admission_location text, discharge_location text, insurance text, language text, marital_status text, ethnicity text, age number ) CREATE ...
SELECT DISTINCT cost.cost FROM cost WHERE cost.event_type = 'prescriptions' AND cost.event_id IN (SELECT prescriptions.row_id FROM prescriptions WHERE prescriptions.drug = 'verapamil sr')
mimic_iii
CREATE TABLE departments ( DEPARTMENT_ID decimal(4,0), DEPARTMENT_NAME varchar(30), MANAGER_ID decimal(6,0), LOCATION_ID decimal(4,0) ) CREATE TABLE job_history ( EMPLOYEE_ID decimal(6,0), START_DATE date, END_DATE date, JOB_ID varchar(10), DEPARTMENT_ID decimal(4,0) ) CREATE TABLE...
SELECT FIRST_NAME, COMMISSION_PCT FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY COMMISSION_PCT
nvbench
CREATE TABLE table_23285761_11 ( high_assists VARCHAR, date VARCHAR ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Who has the high assists when April 26 is the date?
SELECT high_assists FROM table_23285761_11 WHERE date = "April 26"
sql_create_context
CREATE TABLE table_68212 ( "Year" real, "Manufacturer" text, "Start" real, "Finish" real, "Team" text ) -- Using valid SQLite, answer the following questions for the tables provided above. -- Name the total number of start when finish is less than 4
SELECT COUNT("Start") FROM table_68212 WHERE "Finish" < '4'
wikisql
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 jybgb ( BBCJBW text, BBDM tex...
SELECT jyjgzbb.JCRGH, jyjgzbb.JCRXM FROM hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb JOIN jybgb_jyjgzbb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jybgb_jyjgzbb.YLJGDM ...
css