instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE table_name_50 (
margin VARCHAR,
country VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Margin has a Country of united states, and a Score of 63-70-65-69=267?
| SELECT margin FROM table_name_50 WHERE country = "united states" AND score = 63 - 70 - 65 - 69 = 267 | sql_create_context |
CREATE TABLE table_204_99 (
id number,
"#" number,
"club" text,
"winner" number,
"last win" number,
"runner-up" number,
"last losing final" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- who has only 2 wins ?
| SELECT "club" FROM table_204_99 WHERE "winner" = 2 | squall |
CREATE TABLE table_48021 (
"Region (year)" text,
"No. 1" text,
"No. 2" text,
"No. 3" text,
"No. 4" text,
"No. 5" text,
"No. 6" text,
"No. 7" text,
"No. 8" text,
"No. 9" text,
"No. 10" text
)
-- Using valid SQLite, answer the following questions for the tables provided above... | SELECT "Region (year)" FROM table_48021 WHERE "No. 7" = 'abigail' AND "No. 1" = 'sophia' AND "No. 5" = 'aaliyah' | wikisql |
CREATE TABLE music_festival (
ID int,
Music_Festival text,
Date_of_ceremony text,
Category text,
Volume int,
Result text
)
CREATE TABLE artist (
Artist_ID int,
Artist text,
Age int,
Famous_Title text,
Famous_Release_date text
)
CREATE TABLE volume (
Volume_ID int,
V... | SELECT Result, COUNT(*) FROM music_festival GROUP BY Result ORDER BY COUNT(*) DESC | nvbench |
CREATE TABLE table_203_691 (
id number,
"week" number,
"date" text,
"opponent" text,
"result" text,
"attendance" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how much higher was the attendance in week 15 as compared to in week 14 ?
| SELECT (SELECT "attendance" FROM table_203_691 WHERE "week" = 15) - (SELECT "attendance" FROM table_203_691 WHERE "week" = 14) | squall |
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 mzjzjlb.SG, mzjzjlb.TZ FROM hz_info JOIN mzjzjlb JOIN person_info_hz_info JOIN person_info ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND person_info_hz_info.KH = hz_info.KH AND person_info_hz_info.KLX = hz_info.KLX AND person_info_hz_info.YLJGDM = hz_info.YLJGDM... | css |
CREATE TABLE table_25085059_1 (
college VARCHAR,
cfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What college did the Toronto Argonauts draft pick come from?
| SELECT college FROM table_25085059_1 WHERE cfl_team = "Toronto Argonauts" | sql_create_context |
CREATE TABLE table_10595672_1 (
score VARCHAR,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the score of the game when the team reached a record of 6-9?
| SELECT score FROM table_10595672_1 WHERE record = "6-9" | sql_create_context |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom te... | SELECT SUM(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 = 15107)) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.lab... | mimic_iii |
CREATE TABLE fare_basis (
fare_basis_code text,
booking_class text,
class_type text,
premium text,
economy text,
discounted text,
night text,
season text,
basis_days text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE equipment_... | SELECT DISTINCT flight.flight_id FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, date_day, days, flight WHERE (((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'SAN FRANCISCO' AND date_day.day_number = 27 AND date_day.month_number =... | atis |
CREATE TABLE csu_fees (
campusfee INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the count of universities whose campus fee is greater than the average campus fee.
| SELECT COUNT(*) FROM csu_fees WHERE campusfee > (SELECT AVG(campusfee) FROM csu_fees) | sql_create_context |
CREATE TABLE Things (
thing_id INTEGER,
organization_id INTEGER,
Type_of_Thing_Code CHAR(15),
service_type_code CHAR(10),
service_details VARCHAR(255)
)
CREATE TABLE Customer_Events (
Customer_Event_ID INTEGER,
customer_id INTEGER,
date_moved_in DATETIME,
property_id INTEGER,
re... | SELECT date_moved_in, COUNT(date_moved_in) FROM Residents ORDER BY COUNT(date_moved_in) | nvbench |
CREATE TABLE table_name_21 (
runner_up VARCHAR,
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the Japan open runner up?
| SELECT runner_up FROM table_name_21 WHERE tournament = "japan open" | sql_create_context |
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
... | SELECT COUNT(*) > 0 FROM course, course_offering, semester WHERE course.course_id = course_offering.course_id AND course.department = 'NAVARCH' AND course.number = 483 AND semester.semester = 'Spring-Summer' AND semester.semester_id = course_offering.semester | advising |
CREATE TABLE status (
station_id INTEGER,
bikes_available INTEGER,
docks_available INTEGER,
time TEXT
)
CREATE TABLE weather (
date TEXT,
max_temperature_f INTEGER,
mean_temperature_f INTEGER,
min_temperature_f INTEGER,
max_dew_point_f INTEGER,
mean_dew_point_f INTEGER,
min_... | SELECT date, COUNT(date) FROM weather WHERE mean_sea_level_pressure_inches BETWEEN 30.3 AND 31 ORDER BY COUNT(date) | 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_ID = '21348966' AND NOT t_kc21.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT >= 4552.52) | css |
CREATE TABLE table_31385 (
"Value" text,
"Dimensions" text,
"Main Color" text,
"Obverse" text,
"Reverse" text,
"Watermark" text,
"Date of issue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What are the dimensions of the coin with western ... | SELECT "Dimensions" FROM table_31385 WHERE "Reverse" = 'Western sea barrage and locks at Taedong Gang' | wikisql |
CREATE TABLE table_57971 (
"Episode" real,
"Rating" real,
"Share" real,
"Rating/share (18-49)" text,
"Rank (Timeslot)" real,
"Rank (Night)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest rating with nightly rank smaller than... | SELECT MIN("Rating") FROM table_57971 WHERE "Rank (Night)" < '7' AND "Rank (Timeslot)" < '5' AND "Episode" > '6' | wikisql |
CREATE TABLE table_40638 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Attendance has a Result of l 29 23?
| SELECT "Attendance" FROM table_40638 WHERE "Result" = 'l 29–23' | wikisql |
CREATE TABLE table_13897690_1 (
area__sqmi_ VARCHAR,
area__km_2__ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How big (in sq mi) is the island that's 4065 km2?
| SELECT area__sqmi_ FROM table_13897690_1 WHERE area__km_2__ = 4065 | 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 procedures.short_title FROM procedures WHERE procedures.subject_id = "18480" | mimicsql_data |
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 Founder, SUM(Revenue) FROM Manufacturers GROUP BY Founder ORDER BY Founder 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 PostNoticeTypes (
Id number,
ClassId ... | SELECT u.Id, u.DisplayName, COUNT(*) AS NumPosts FROM Posts AS p INNER JOIN Users AS u ON u.Id = p.OwnerUserId WHERE p.PostTypeId = 1 GROUP BY U.Id, U.DisplayName ORDER BY NumPosts DESC | sede |
CREATE TABLE table_name_41 (
saturday_shani__saturn_ VARCHAR,
sunday_surya__the_sun_ VARCHAR,
tuesday_mangala__mars_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the result on Saturday when it's raviv r on Sunday and manga av r on Tuesday?
| SELECT saturday_shani__saturn_ FROM table_name_41 WHERE sunday_surya__the_sun_ = "रविवार ravivār" AND tuesday_mangala__mars_ = "मंगळवार mangaḷavār" | sql_create_context |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time... | SELECT DISTINCT flight.flight_id FROM airport_service, city, flight WHERE city.city_code = airport_service.city_code AND city.city_name = 'BALTIMORE' AND flight.from_airport = airport_service.airport_code | atis |
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_kc21.MED_AMOUT) FROM t_kc21 WHERE t_kc21.PERSON_NM = '许斌斌' AND t_kc21.CLINIC_TYPE = '门诊' | css |
CREATE TABLE table_255885_1 (
no_of_s_barangay VARCHAR,
municipality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of S Barangay for Paracale?
| SELECT no_of_s_barangay FROM table_255885_1 WHERE municipality = "Paracale" | sql_create_context |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
... | SELECT p.Id, t.Id AS TagId, t.TagName FROM Posts AS p, PostTags AS pt, Tags AS t WHERE p.Id = pt.PostId AND pt.TagId = t.Id AND pt.TagId = 3 AND pt.TagId = 17 | sede |
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDa... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS Link, DisplayName, Reputation, Location FROM Users WHERE (LOWER(Location) LIKE '%hong%kong%' OR Location LIKE '% %') ORDER BY Reputation DESC LIMIT 50 | sede |
CREATE TABLE table_16677 (
"Source" text,
"Date" text,
"Method" text,
"iOS" text,
"Android" text,
"BlackBerry" text,
"Symbian / Series 40" text,
"Bada" text,
"Windows" text,
"Other" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- ... | SELECT "Windows" FROM table_16677 WHERE "Other" = '0.7%' | wikisql |
CREATE TABLE Has_amenity (
dormid INTEGER,
amenid INTEGER
)
CREATE TABLE Student (
StuID INTEGER,
LName VARCHAR(12),
Fname VARCHAR(12),
Age INTEGER,
Sex VARCHAR(1),
Major INTEGER,
Advisor INTEGER,
city_code VARCHAR(3)
)
CREATE TABLE Dorm (
dormid INTEGER,
dorm_name VARC... | SELECT dorm_name, COUNT(*) FROM Student AS T1 JOIN Lives_in AS T2 ON T1.stuid = T2.stuid JOIN Dorm AS T3 ON T3.dormid = T2.dormid WHERE T1.Age > 20 GROUP BY T3.dorm_name ORDER BY dorm_name DESC | nvbench |
CREATE TABLE table_name_25 (
conf VARCHAR,
original_nfl_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What conference did the player originally from the denver broncos play in?
| SELECT conf FROM table_name_25 WHERE original_nfl_team = "denver broncos" | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
d... | SELECT MIN(t1.c1) FROM (SELECT SUM(cost.cost) AS c1 FROM cost WHERE cost.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.patientunitstayid IN (SELECT lab.patientunitstayid FROM lab WHERE lab.labname = 'pressure control')) AND STRFTIME('%y', cost.chargetime) <= '2104' GR... | eicu |
CREATE TABLE jybgb (
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text,
BGDH text,
BGRQ time,
JYLX number,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SQRGH text,
SQRXM text,
BGRGH text,
BGRXM text,
SHRGH ... | SELECT AVG(jyjgzbb.JCZBJGDL), MIN(jyjgzbb.JCZBJGDL), MAX(jyjgzbb.JCZBJGDL) FROM mzjzjlb JOIN jybgb JOIN jyjgzbb ON mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = jyjgzbb.YLJGDM AND jybgb.BGDH = jyjgzbb.BGDH WHERE mzjzjlb.JZZDBM = 'H19.777' AND jyjgzbb.JCZBMC = '促甲状腺激素' | css |
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 number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
v... | SELECT COUNT(DISTINCT admissions.subject_id) FROM admissions WHERE admissions.hadm_id IN (SELECT procedures_icd.hadm_id FROM procedures_icd WHERE procedures_icd.icd9_code = (SELECT d_icd_procedures.icd9_code FROM d_icd_procedures WHERE d_icd_procedures.short_title = 'part gastrec w jej anast') AND DATETIME(procedures_i... | mimic_iii |
CREATE TABLE table_46811 (
"Event" text,
"Date" text,
"Rating" text,
"Share" text,
"Viewers" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Event, when Viewers is 2.4 Million, and when Rating is 1.4?
| SELECT "Event" FROM table_46811 WHERE "Viewers" = '2.4 million' AND "Rating" = '1.4' | wikisql |
CREATE TABLE t_kc21_t_kc22 (
MED_CLINIC_ID text,
MED_EXP_DET_ID number
)
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 ... | SELECT t_kc21.OUT_DIAG_DOC_CD, t_kc21.OUT_DIAG_DOC_NM FROM t_kc21 WHERE t_kc21.PERSON_ID = '78376442' AND t_kc21.IN_HOSP_DATE BETWEEN '2003-06-30' AND '2019-07-06' GROUP BY t_kc21.OUT_DIAG_DOC_CD ORDER BY COUNT(*) DESC LIMIT 1 | css |
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 diagnosis (
diagn... | SELECT MAX(t1.c1) FROM (SELECT COUNT(DISTINCT diagnosis.patientunitstayid) AS c1 FROM diagnosis WHERE diagnosis.diagnosisname = 'neutropenia - from chemotherapy' AND STRFTIME('%y', diagnosis.diagnosistime) = '2101' GROUP BY STRFTIME('%y-%m-%d', diagnosis.diagnosistime)) AS t1 | eicu |
CREATE TABLE restaurant (
id int,
name varchar,
food_type varchar,
city_name varchar,
rating "decimal
)
CREATE TABLE geographic (
city_name varchar,
county varchar,
region varchar
)
CREATE TABLE location (
restaurant_id int,
house_number int,
street_name varchar,
city_n... | SELECT location.house_number, restaurant.name FROM geographic, location, restaurant WHERE geographic.region = 'bay area' AND restaurant.city_name = geographic.city_name AND restaurant.food_type = 'american' AND restaurant.id = location.restaurant_id AND restaurant.rating = (SELECT MAX(RESTAURANTalias1.rating) FROM geog... | restaurants |
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden ... | SELECT * FROM Users WHERE Id IN (SELECT OwnerUserId FROM Posts WHERE ParentId IN (SELECT Id FROM Posts WHERE Tags LIKE '%aws-lambda%')) | sede |
CREATE TABLE table_31514 (
"Townland" text,
"Area( acres )" real,
"Barony" text,
"Civil parish" text,
"Poor law union" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the poor law union when the townland is bohonagh?
| SELECT "Poor law union" FROM table_31514 WHERE "Townland" = 'Bohonagh' | wikisql |
CREATE TABLE table_name_49 (
seats VARCHAR,
leader VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the number of Seats for Leader Enda kenny?
| SELECT seats FROM table_name_49 WHERE leader = "enda kenny" | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Code, T2.Revenue FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Headquarter | nvbench |
CREATE TABLE table_name_72 (
race_name VARCHAR,
winning_driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the name of the race won by driver Carlos Reutemann?
| SELECT race_name FROM table_name_72 WHERE winning_driver = "carlos reutemann" | sql_create_context |
CREATE TABLE table_52822 (
"Player" text,
"Rec." real,
"Yards" real,
"Avg." real,
"TD's" real,
"Long" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a long of less than 15 and an average of 6 yards.
| SELECT "Player" FROM table_52822 WHERE "Long" < '15' AND "Avg." = '6' | wikisql |
CREATE TABLE table_54275 (
"Date and time" text,
"Round" text,
"Opponent" text,
"Venue" text,
"Result" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the result when the opponent was fenerbah e?
| SELECT "Result" FROM table_54275 WHERE "Opponent" = 'fenerbahçe' | wikisql |
CREATE TABLE gyb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN... | SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '吕德业' AND t_kc22.STA_DATE BETWEEN '2001-12-19' AND '2007-11-18' AND t_kc22.SOC_SRT_DIRE_CD = '621283-a' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.PERSON_NM = '吕德业... | css |
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.OUT_DIAG_DIS_NM, AVG(t_kc21.PERSON_AGE) FROM t_kc21 WHERE t_kc21.MED_SER_ORG_NO = '4420698' GROUP BY t_kc21.OUT_DIAG_DIS_NM | css |
CREATE TABLE table_name_19 (
game INTEGER,
record VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Game has a Record of 27-11-10?
| SELECT AVG(game) FROM table_name_19 WHERE record = "27-11-10" | sql_create_context |
CREATE TABLE table_13913 (
"Year(s)" text,
"Selection show" text,
"Venue" text,
"National final main host" text,
"National final co host" text,
"Semi final/heat host" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the host for the semi ... | SELECT "Semi final/heat host" FROM table_13913 WHERE "National final main host" = 'terry wogan' AND "National final co host" = 'gaby roslin' | wikisql |
CREATE TABLE table_name_24 (
weight_at_birth VARCHAR,
meaning VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much did the baby who name means God knows my journey weigh at birth?
| SELECT weight_at_birth FROM table_name_24 WHERE meaning = "god knows my journey" | sql_create_context |
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 * FROM qtb WHERE qtb.PERSON_ID = '42289604' AND qtb.MED_SER_ORG_NO = '9183421' AND NOT qtb.MED_ORG_DEPT_NM LIKE '%内%' UNION SELECT * FROM gyb WHERE gyb.PERSON_ID = '42289604' AND gyb.MED_SER_ORG_NO = '9183421' AND NOT gyb.MED_ORG_DEPT_NM LIKE '%内%' UNION SELECT * FROM zyb WHERE zyb.PERSON_ID = '42289604' AND zyb... | css |
CREATE TABLE table_34879 (
"Round" real,
"Player" text,
"Position" text,
"Nationality" text,
"College/Junior/Club Team (League)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest round of the Kitchener Rangers (OHA)?
| SELECT MIN("Round") FROM table_34879 WHERE "College/Junior/Club Team (League)" = 'kitchener rangers (oha)' | wikisql |
CREATE TABLE lots (
lot_id number,
investor_id number,
lot_details text
)
CREATE TABLE transactions (
transaction_id number,
investor_id number,
transaction_type_code text,
date_of_transaction time,
amount_of_transaction number,
share_count text,
other_details text
)
CREATE TAB... | SELECT transaction_type_description FROM ref_transaction_types WHERE transaction_type_code = "PUR" | spider |
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 real
)
CREATE TABLE people (
People_ID int,
Sex text,
Name text,
Date_of_Birth text,
Height real,
Weight re... | SELECT Date_of_Birth, Weight FROM people | nvbench |
CREATE TABLE table_33405 (
"Year" real,
"Chassis" text,
"Engine" text,
"Start" text,
"Finish" text,
"Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What engine was used by the team the finished 2nd?
| SELECT "Engine" FROM table_33405 WHERE "Finish" = '2nd' | wikisql |
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 COUNT(*) FROM txmzjzjlb WHERE txmzjzjlb.YLJGDM = '9694993' AND txmzjzjlb.JZKSRQ BETWEEN '2001-05-28' AND '2021-09-21' AND txmzjzjlb.ZSEBZ > 0 UNION SELECT COUNT(*) FROM ftxmzjzjlb WHERE ftxmzjzjlb.YLJGDM = '9694993' AND ftxmzjzjlb.JZKSRQ BETWEEN '2001-05-28' AND '2021-09-21' AND ftxmzjzjlb.ZSEBZ > 0 | css |
CREATE TABLE table_24132083_1 (
no_in_series INTEGER,
written_by VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the series number of the episode written by Tim Schlattmann?
| SELECT MIN(no_in_series) FROM table_24132083_1 WHERE written_by = "Tim Schlattmann" | sql_create_context |
CREATE TABLE table_56000 (
"Home team" text,
"Home team score" text,
"Away team" text,
"Away team score" text,
"Venue" text,
"Crowd" real,
"Date" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What home team played an away team of melbourne?... | SELECT "Home team" FROM table_56000 WHERE "Away team" = 'melbourne' | wikisql |
CREATE TABLE table_name_75 (
pick__number INTEGER,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the pick number for the player Chris Gomez?
| SELECT SUM(pick__number) FROM table_name_75 WHERE player = "chris gomez" | sql_create_context |
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 CO... | SELECT SCHOOL_CODE, COUNT(DISTINCT DEPT_NAME) FROM DEPARTMENT ORDER BY SCHOOL_CODE 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 * FROM t_kc21 WHERE t_kc21.PERSON_NM = '方语诗' AND t_kc21.MED_SER_ORG_NO = '8013694' AND t_kc21.MED_ORG_DEPT_NM LIKE '%全科%' | css |
CREATE TABLE table_11294 (
"Parties and voter communities" text,
"% 2006" real,
"Seats 2006" real,
"% 2001" real,
"Seats 2001" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- None of the communities listed has a percentage smaller than 8.6 in 2006.
| SELECT COUNT("Seats 2001") FROM table_11294 WHERE "% 2006" < '8.6' | wikisql |
CREATE TABLE table_name_38 (
drawn INTEGER,
position VARCHAR,
against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest amount of draws when the position is less than 7 and the against is 19?
| SELECT MIN(drawn) FROM table_name_38 WHERE position < 7 AND against = 19 | sql_create_context |
CREATE TABLE table_53840 (
"Year" real,
"Class" text,
"Tyres" text,
"Team" text,
"Co-Drivers" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which tyres has more than 5 laps with team nissan m... | SELECT "Tyres" FROM table_53840 WHERE "Laps" > '5' AND "Team" = 'nissan motorsports international' | wikisql |
CREATE TABLE table_77074 (
"Season" real,
"Team 1" text,
"Score" text,
"Team 2" text,
"Venue" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which venue was used for the game whose score was 2:3?
| SELECT "Venue" FROM table_77074 WHERE "Score" = '2:3' | wikisql |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time... | SELECT (SELECT lab.labresult FROM lab WHERE lab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '028-25829' AND NOT patient.hospitaldischargetime IS NULL ORDER BY patient.hospi... | eicu |
CREATE TABLE table_71430 (
"Country" text,
"Film title used in nomination" text,
"Language" text,
"Original title" text,
"Director" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the original title directed by sudhendu roy
| SELECT "Original title" FROM table_71430 WHERE "Director" = 'sudhendu roy' | wikisql |
CREATE TABLE table_name_65 (
label VARCHAR,
format VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Label of the release in CD Maxi Format?
| SELECT label FROM table_name_65 WHERE format = "cd maxi" | sql_create_context |
CREATE TABLE table_name_6 (
place VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What place was the player who scored 70-69-68=207?
| SELECT place FROM table_name_6 WHERE score = 70 - 69 - 68 = 207 | 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 INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "NEWBORN" AND lab."CATEGORY" = "Blood Gas" | mimicsql_data |
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 Name, Manufacturer FROM Products WHERE Price BETWEEN 60 AND 120 | nvbench |
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 = '31294224' AND t_kc22.STA_DATE BETWEEN '2004-11-03' AND '2019-06-03' AND t_kc21.MED_SER_ORG_NO = '3614796' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.days_stay > "2" AND lab.fluid = "Blood" | mimicsql_data |
CREATE TABLE table_204_876 (
id number,
"ecclesiastical jurisdictions" text,
"latin name" text,
"type" text,
"rite" text,
"ecclesiastical province" text,
"established" text,
"area (km2)" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- w... | SELECT "latin name" FROM table_204_876 WHERE id = 1 | squall |
CREATE TABLE diagnoses (
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 WHERE demographic.insurance = "Medicaid" AND demographic.age < "68" | mimicsql_data |
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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 te... | SELECT person_info.XM FROM person_info JOIN hz_info JOIN zyjzjlb JOIN jybgb 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 AND zyjzjlb.YLJGDM = jybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = jybgb.JZLSH_ZYJZJLB WHERE jybgb.BGDH = '94625262145' | css |
CREATE TABLE table_53551 (
"Player" text,
"Competition" text,
"Team" text,
"Opponent" text,
"Year" real,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the team for victorian football league
| SELECT "Team" FROM table_53551 WHERE "Competition" = 'victorian football league' | wikisql |
CREATE TABLE regions (
REGION_ID decimal(5,0),
REGION_NAME varchar(25)
)
CREATE TABLE countries (
COUNTRY_ID varchar(2),
COUNTRY_NAME varchar(40),
REGION_ID decimal(10,0)
)
CREATE TABLE jobs (
JOB_ID varchar(10),
JOB_TITLE varchar(35),
MIN_SALARY decimal(6,0),
MAX_SALARY decimal(6,... | SELECT JOB_ID, AVG(SALARY) FROM employees WHERE HIRE_DATE < '2002-06-21' GROUP BY JOB_ID | nvbench |
CREATE TABLE table_25095 (
"Post" real,
"Horse name" text,
"Trainer" text,
"Jockey" text,
"Opening Odds" text,
"Starting Odds" text,
"Finishing Pos." real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the starting odds for the opening ... | SELECT "Starting Odds" FROM table_25095 WHERE "Opening Odds" = '2-1' | 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 COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.dod_year <= "2112.0" AND prescriptions.drug = "Dexamethasone" | mimicsql_data |
CREATE TABLE reservations (
code number,
room text,
checkin text,
checkout text,
rate number,
lastname text,
firstname text,
adults number,
kids number
)
CREATE TABLE rooms (
roomid text,
roomname text,
beds number,
bedtype text,
maxoccupancy number,
basepric... | SELECT bedtype, AVG(baseprice) FROM rooms GROUP BY bedtype | spider |
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 lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,... | SELECT procedures.short_title FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.name = "Thomas Nazario" | mimicsql_data |
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_NM = '华文星' AND t_kc21.MED_SER_ORG_NO = '5083153' AND t_kc21.OUT_DIAG_DIS_NM LIKE '%阿片类%' | css |
CREATE TABLE table_62681 (
"Constituency number" text,
"Name" text,
"Reserved for ( SC / ST /None)" text,
"District" text,
"Number of electorates (2009)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the constituency number with electorates... | SELECT "Constituency number" FROM table_62681 WHERE "Number of electorates (2009)" > '152,958' | wikisql |
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 PERSON_NM = '褚子琪' AND CLINIC_TYPE = '住院' AND MOD(MED_AMOUT, 1) = 0 | css |
CREATE TABLE table_name_60 (
assists INTEGER,
club VARCHAR,
points VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Assists have a Club of adler mannheim, and Points larger than 57?
| SELECT SUM(assists) FROM table_name_60 WHERE club = "adler mannheim" AND points > 57 | sql_create_context |
CREATE TABLE repair (
repair_ID int,
name text,
Launch_Date text,
Notes text
)
CREATE TABLE repair_assignment (
technician_id int,
repair_ID int,
Machine_ID int
)
CREATE TABLE machine (
Machine_ID int,
Making_Year int,
Class text,
Team text,
Machine_series text,
val... | SELECT Name, COUNT(Name) FROM repair_assignment AS T1 JOIN machine AS T2 ON T1.Machine_ID = T2.Machine_ID JOIN technician AS T3 ON T1.technician_id = T3.technician_id WHERE T2.value_points > 70 GROUP BY Name ORDER BY COUNT(Name) DESC | nvbench |
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.admission_location = "EMERGENCY ROOM ADMIT" AND procedures.icd9_code = "9744" | mimicsql_data |
CREATE TABLE table_name_7 (
player VARCHAR,
bowling_style VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who has a bowling style of source:?
| SELECT player FROM table_name_7 WHERE bowling_style = "source:" | sql_create_context |
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE p... | 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 movie (
title VARCHAR,
YEAR VARCHAR,
director VARCHAR,
budget_million VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show all movie titles, years, and directors, ordered by budget.
| SELECT title, YEAR, director FROM movie ORDER BY budget_million | sql_create_context |
CREATE TABLE savings (
balance VARCHAR,
custid VARCHAR
)
CREATE TABLE accounts (
name VARCHAR,
custid VARCHAR
)
CREATE TABLE checking (
balance VARCHAR,
custid VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Find the name, checking balance a... | SELECT T2.balance, T3.balance, T1.name FROM accounts AS T1 JOIN checking AS T2 ON T1.custid = T2.custid JOIN savings AS T3 ON T1.custid = T3.custid ORDER BY T2.balance + T3.balance DESC | sql_create_context |
CREATE TABLE Products (
Code INTEGER,
Name VARCHAR(255),
Price DECIMAL,
Manufacturer INTEGER
)
CREATE TABLE Manufacturers (
Code INTEGER,
Name VARCHAR(255),
Headquarter VARCHAR(255),
Founder VARCHAR(255),
Revenue REAL
)
-- Using valid SQLite, answer the following questions for the... | SELECT T1.Name, COUNT(T1.Name) FROM Products AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T1.Name ORDER BY COUNT(T1.Name) | nvbench |
CREATE TABLE table_52337 (
"Week" text,
"Performer(s)" text,
"Hot 100 Reaction" text,
"Hot Digital Songs Reaction" text,
"Notes" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which week has hot 100 reaction as did not debut for Natalie Cole?
| SELECT "Week" FROM table_52337 WHERE "Hot 100 Reaction" = 'did not debut' AND "Performer(s)" = 'natalie cole' | wikisql |
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 WHERE t_kc22.t_kc21_PERSON_ID = '19494267' AND t_kc22.t_kc21_CLINIC_TYPE = '门诊' AND t_kc22.STA_DATE BETWEEN '2006-02-17' AND '2006-06-28' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' | css |
CREATE TABLE departments (
DEPARTMENT_ID decimal(4,0),
DEPARTMENT_NAME varchar(30),
MANAGER_ID decimal(6,0),
LOCATION_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(25... | SELECT LAST_NAME, DEPARTMENT_ID FROM employees WHERE NOT DEPARTMENT_ID IN (SELECT DEPARTMENT_ID FROM departments WHERE MANAGER_ID BETWEEN 100 AND 200) ORDER BY LAST_NAME DESC | nvbench |
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost numbe... | SELECT t1.drugname FROM (SELECT medication.drugname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM medication WHERE medication.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age BETWEEN 30 AND 39) AND DATETIME(medication.drugstarttime, 'start of year') = DATETIME(CURRENT_TIME(... | eicu |
CREATE TABLE table_name_41 (
tournament VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which 2004 has a Tournament of french open?
| SELECT 2004 FROM table_name_41 WHERE tournament = "french open" | sql_create_context |
CREATE TABLE table_35031 (
"Player" text,
"Rec." real,
"Yards" real,
"Average" real,
"s Touchdown" real,
"Year" real,
"Opponent" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which rec has Yards of 192, and a Touchdown smaller than 1?
| SELECT AVG("Rec.") FROM table_35031 WHERE "Yards" = '192' AND "s Touchdown" < '1' | wikisql |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.