instruction stringlengths 151 7.46k | output stringlengths 2 4.44k | source stringclasses 26
values |
|---|---|---|
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE TagSynonyms (
Id number,
SourceTagName text,
TargetTagName text,
CreationDate time,
OwnerUserId number,
AutoRenameCount number,
LastAutoRename time,
Score number,
ApprovedByUserId number,
ApprovalDate time
)
C... | SELECT COUNT(*) FROM Users AS u FULL OUTER JOIN Posts AS p ON p.OwnerUserId = u.Id FULL OUTER JOIN PostTags AS pt ON pt.PostId = p.Id FULL OUTER JOIN Tags AS t ON t.Id = pt.TagId WHERE u.Id = '##UserId##' AND t.TagName IN ('##Tag1:string##') | sede |
CREATE TABLE table_28043 (
"Series no." real,
"No. in season" real,
"Title" text,
"Written by" text,
"Directed by" text,
"Original air date" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the writer fo... | SELECT "Written by" FROM table_28043 WHERE "No. in season" = '14' | wikisql |
CREATE TABLE flight_stop (
flight_id int,
stop_number int,
stop_days text,
stop_airport text,
arrival_time int,
arrival_airline text,
arrival_flight_number int,
departure_time int,
departure_airline text,
departure_flight_number int,
stop_time int
)
CREATE TABLE date_day (
... | 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 (((flight.arrival_time <= 1930 AND flight.arrival_time >= 1830) AND date_day.day_number = 23 AND date_day.month_number = 4 AND date_day.year = 19... | atis |
CREATE TABLE table_8613 (
"Peak" text,
"Location" text,
"Height (m)" real,
"Prominence (m)" real,
"Col (m)" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the smallest col where height is less than 4,274 and peak is Triglav and prominence is... | SELECT MIN("Col (m)") FROM table_8613 WHERE "Height (m)" < '4,274' AND "Peak" = 'triglav' AND "Prominence (m)" < '2,052' | wikisql |
CREATE TABLE table_9664 (
"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.
-- Which Date has a Home team of rochdale?
| SELECT "Date" FROM table_9664 WHERE "Home team" = 'rochdale' | 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 diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures (
... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE demographic.admityear < "2170" AND prescriptions.drug = "Atorvastatin" | mimicsql_data |
CREATE TABLE table_76421 (
"Date" text,
"Opponent" text,
"Score" text,
"Result" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the Result on July 24?
| SELECT "Result" FROM table_76421 WHERE "Date" = 'july 24' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE demographic (... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic WHERE demographic.gender = "F" AND demographic.admission_type = "ELECTIVE" | mimicsql_data |
CREATE TABLE table_74168 (
"Game" real,
"Date" text,
"Team" text,
"Score" text,
"High points" text,
"High rebounds" text,
"High assists" text,
"Location Attendance" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What g... | SELECT COUNT("Game") FROM table_74168 WHERE "Team" = 'Washington' | wikisql |
CREATE TABLE table_name_73 (
examples VARCHAR,
american VARCHAR,
semi_closed_initial_unstressed_vowels VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the example for the American of , , and a Semi-closed initial unstressed vowels of y / /?
| SELECT examples FROM table_name_73 WHERE american = "ɪ, ə" AND semi_closed_initial_unstressed_vowels = "y /ɨ/" | sql_create_context |
CREATE TABLE table_name_34 (
type VARCHAR,
moving_from VARCHAR,
ends VARCHAR,
transfer_window VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the type of the player who ended in 2013, had a summer transfer window, and moved from kalmar ff?
| SELECT type FROM table_name_34 WHERE ends = 2013 AND transfer_window = "summer" AND moving_from = "kalmar ff" | sql_create_context |
CREATE TABLE table_17768 (
"Day: (see Irregularities )" text,
"Sunday S\u014dl (Sun)" text,
"Monday Luna (Moon)" text,
"Tuesday Mars (Mars)" text,
"Wednesday Mercurius (Mercury)" text,
"Thursday Iuppiter (Jupiter)" text,
"Friday Venus (Venus)" text,
"Saturday Saturnus ( Saturn)" text
)
... | SELECT "Sunday S\u014dl (Sun)" FROM table_17768 WHERE "Friday Venus (Venus)" = 'vernes' | wikisql |
CREATE TABLE table_14342480_6 (
starter VARCHAR,
position VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the starter for position being left end
| SELECT starter FROM table_14342480_6 WHERE position = "Left end" | 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 diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON demographic.hadm_id = prescriptions.hadm_id WHERE diagnoses.short_title = "Acq coagul factor defic" AND prescriptions.route = "NEB" | mimicsql_data |
CREATE TABLE table_name_53 (
team__number1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 1st leg when team number 1 is CSU SIBIU?
| SELECT 1 AS st_leg FROM table_name_53 WHERE team__number1 = "csu sibiu" | sql_create_context |
CREATE TABLE table_1574968_1 (
creator VARCHAR,
viewer VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the creator when the view happens to gddm, afp viewer?
| SELECT creator FROM table_1574968_1 WHERE viewer = "GDDM, AFP viewer" | sql_create_context |
CREATE TABLE table_name_2 (
fastest_lap VARCHAR,
constructor VARCHAR,
race VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the fastest lap time at the British Grand Prix with Mercedes as the constructor?
| SELECT fastest_lap FROM table_name_2 WHERE constructor = "mercedes" AND race = "british grand prix" | sql_create_context |
CREATE TABLE table_10960039_1 (
pick__number VARCHAR,
player VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is player Alexis Bwenge's pick number?
| SELECT pick__number FROM table_10960039_1 WHERE player = "Alexis Bwenge" | sql_create_context |
CREATE TABLE table_43389 (
"Player" text,
"Club" text,
"League" real,
"FA Cup" real,
"FA Trophy" real,
"League Cup" real,
"Total" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average total with 1 FA cup and more than 0 FA troph... | SELECT AVG("Total") FROM table_43389 WHERE "FA Cup" = '1' AND "FA Trophy" > '0' | wikisql |
CREATE TABLE table_name_91 (
current_name VARCHAR,
year_first_opened INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What ride opened after 2011?
| SELECT current_name FROM table_name_91 WHERE year_first_opened > 2011 | 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 qtb.OUT_DIAG_DIS_CD, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '4553560' GROUP BY qtb.OUT_DIAG_DIS_CD UNION SELECT gyb.OUT_DIAG_DIS_CD, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '4553560' GROUP BY gyb.OUT_DIAG_DIS_CD UNION SELECT zyb.OUT_DIAG_DIS_CD, AVG(zyb.PERSON_AGE) FROM zyb WHERE... | css |
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 demographic (
subject_id text,
hadm_id t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE diagnoses.icd9_code = "99859" AND lab.fluid = "Ascites" | mimicsql_data |
CREATE TABLE fgwyjzb (
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(*) FROM gwyjzb JOIN t_kc22 ON gwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gwyjzb.PERSON_NM = '陈玲玲' AND t_kc22.STA_DATE BETWEEN '2007-04-17' AND '2014-06-22' AND t_kc22.MED_INV_ITEM_TYPE = '西药费' UNION SELECT COUNT(*) FROM fgwyjzb JOIN t_kc22 ON fgwyjzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE fgwyjz... | css |
CREATE TABLE film (
Film_ID int,
Rank_in_series int,
Number_in_season int,
Title text,
Directed_by text,
Original_air_date text,
Production_code text
)
CREATE TABLE cinema (
Cinema_ID int,
Name text,
Openning_year int,
Capacity int,
Location text
)
CREATE TABLE schedule... | SELECT Location, COUNT(*) FROM cinema GROUP BY Location ORDER BY Location | nvbench |
CREATE TABLE Parts (
part_id INTEGER,
part_name VARCHAR(255),
chargeable_yn VARCHAR(1),
chargeable_amount VARCHAR(20),
other_part_details VARCHAR(255)
)
CREATE TABLE Staff (
staff_id INTEGER,
staff_name VARCHAR(255),
gender VARCHAR(1),
other_staff_details VARCHAR(255)
)
CREATE TABL... | SELECT COUNT(*), T1.maintenance_contract_id FROM Maintenance_Contracts AS T1 JOIN Assets AS T2 ON T1.maintenance_contract_id = T2.maintenance_contract_id GROUP BY T1.maintenance_contract_id | nvbench |
CREATE TABLE inventory (
inventory_id MEDIUMINT UNSIGNED,
film_id SMALLINT UNSIGNED,
store_id TINYINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE film_actor (
actor_id SMALLINT UNSIGNED,
film_id SMALLINT UNSIGNED,
last_update TIMESTAMP
)
CREATE TABLE customer (
customer_id SMALLINT ... | SELECT name, COUNT(*) FROM film_category AS T1 JOIN category AS T2 ON T1.category_id = T2.category_id GROUP BY T1.category_id | nvbench |
CREATE TABLE patient (
uniquepid text,
patienthealthsystemstayid number,
patientunitstayid number,
gender text,
age text,
ethnicity text,
hospitalid number,
wardid number,
admissionheight number,
admissionweight number,
dischargeweight number,
hospitaladmittime time,
... | SELECT t1.treatmentname FROM (SELECT treatment.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM treatment WHERE treatment.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.age >= 60) AND DATETIME(treatment.treatmenttime, 'start of year') = DATETIME(CURRENT_TIME(), 'st... | eicu |
CREATE TABLE table_48822 (
"Year" real,
"Team" text,
"Co-Drivers" text,
"Class" text,
"Laps" real,
"Pos." text,
"Class Pos." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the class of car that is earlier than 2005 and has a class po... | SELECT "Class" FROM table_48822 WHERE "Year" < '2005' AND "Class Pos." = '2nd' | wikisql |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)... | SELECT 24 * (STRFTIME('%j', CURRENT_TIME()) - STRFTIME('%j', patient.unitadmittime)) FROM patient WHERE patient.uniquepid = '032-9230' AND patient.wardid = 1068 AND patient.hospitaldischargetime IS NULL ORDER BY patient.unitadmittime LIMIT 1 | eicu |
CREATE TABLE table_32708 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Record" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the opponent for week 6?
| SELECT "Opponent" FROM table_32708 WHERE "Week" = '6' | wikisql |
CREATE TABLE demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location t... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE procedures.long_title = "Thoracentesis" AND lab."CATEGORY" = "Chemistry" | mimicsql_data |
CREATE TABLE table_35203 (
"Year" real,
"Class" text,
"Team" text,
"Points" real,
"Wins" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many points are there later than 1992?
| SELECT COUNT("Points") FROM table_35203 WHERE "Year" > '1992' | wikisql |
CREATE TABLE table_name_71 (
place VARCHAR,
country VARCHAR,
money___$__ VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where did the player place who is from the United States, who made more than $216, and whose score was 74-70-71-69=... | SELECT place FROM table_name_71 WHERE country = "united states" AND money___$__ > 216 AND score = 74 - 70 - 71 - 69 = 284 | sql_create_context |
CREATE TABLE table_5711 (
"District" real,
"Name" text,
"Party" text,
"Home city/town" text,
"First elected" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which First elected is the highest one that has a Party of dem, and a District larger than 24... | SELECT MAX("First elected") FROM table_5711 WHERE "Party" = 'dem' AND "District" > '24' AND "Home city/town" = 'berlin' | wikisql |
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 PostHistoryTypes (
Id number,
Name te... | SELECT Score, Id AS "post_link", CreationDate, Tags FROM Posts WHERE PostTypeId = 1 AND Tags LIKE '%<self-learning>%' AND (Tags LIKE '%<advice>%' OR Tags LIKE '%<soft-question>%' OR Tags LIKE '%<big-list>%' OR Tags LIKE '%<education>%' OR Tags LIKE '%<teaching>%' OR Tags = '<self-learning>' OR (NOT Body LIKE '%$%' AND ... | sede |
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 SG, TZ, TW, SSY, SZY, XL, HXPLC, ML FROM mzjzjlb WHERE JZLSH = '08031682316' | css |
CREATE TABLE table_924 (
"RNA Segment (Gene)" real,
"Size ( s base pair )" real,
"Protein" text,
"Molecular weight kDa" text,
"Location" text,
"Copies per particle" text,
"Function" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many cop... | SELECT "Copies per particle" FROM table_924 WHERE "Location" = 'Forms inner shell of the core' | 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 demographic (
subject_id text,
hadm_id text,
name text,
marital_status text,
age text,
dob te... | SELECT demographic.language, demographic.expire_flag FROM demographic WHERE demographic.subject_id = "3623" | mimicsql_data |
CREATE TABLE table_56178 (
"Name" text,
"Location" text,
"Elevation + Height" text,
"Delivery" text,
"Purpose" text,
"Yield" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the locaction of the Evans test blast?
| SELECT "Location" FROM table_56178 WHERE "Name" = 'evans' | wikisql |
CREATE TABLE table_38092 (
"7:00" text,
"7:30" text,
"8:00" text,
"8:30" text,
"9:00" text,
"9:30" text,
"10:00" text,
"10:30" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the 8:00 feature with a 7:00 feature Air Farce?
| SELECT "8:00" FROM table_38092 WHERE "7:00" = 'air farce' | wikisql |
CREATE TABLE player (
pid number,
pname text,
ycard text,
hs number
)
CREATE TABLE college (
cname text,
state text,
enr number
)
CREATE TABLE tryout (
pid number,
cname text,
ppos text,
decision text
)
-- Using valid SQLite, answer the following questions for the tables ... | SELECT COUNT(*) FROM college WHERE enr > 15000 | spider |
CREATE TABLE table_203_865 (
id number,
"place" number,
"athlete" text,
"nation" text,
"best mark" text,
"throw 1" number,
"throw 2" number,
"throw 3" number,
"throw 4" number,
"throw 5" number,
"throw 6" number
)
-- Using valid SQLite, answer the following questions for th... | SELECT "athlete" FROM table_203_865 WHERE "best mark" > 18 | squall |
CREATE TABLE table_train_76 (
"id" int,
"mini_mental_state_examination_mmse" int,
"language" string,
"csf" int,
"rosen_modified_hachinski_ischemic_score" int,
"ad" bool,
"age" float,
"NOUSE" float
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-... | SELECT * FROM table_train_76 WHERE rosen_modified_hachinski_ischemic_score >= 4 | criteria2sql |
CREATE TABLE table_6097 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Decision" text,
"Attendance" real,
"Series" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who recorded the decision when philadelphia was away?
| SELECT "Decision" FROM table_6097 WHERE "Visitor" = 'philadelphia' | wikisql |
CREATE TABLE table_name_13 (
Local VARCHAR,
local_position VARCHAR,
mission VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the local mission that has ambassador as the local position, and a mission of suriname?
| SELECT Local AS mission FROM table_name_13 WHERE local_position = "ambassador" AND mission = "suriname" | sql_create_context |
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
... | SELECT COUNT(*) > 0 FROM microlab WHERE microlab.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '031-4987')) AND microlab.culturesite = 'nasopharynx' AND DATETIME(microlab.cul... | eicu |
CREATE TABLE table_name_25 (
japanese_voice_actor VARCHAR,
eagle_riders VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the Japanese voice actor of Eagle Rider Ollie Keeawani?
| SELECT japanese_voice_actor FROM table_name_25 WHERE eagle_riders = "ollie keeawani" | sql_create_context |
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id numbe... | SELECT (SELECT labevents.valuenum FROM labevents WHERE labevents.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 594) AND labevents.itemid IN (SELECT d_labitems.itemid FROM d_labitems WHERE d_labitems.label = 'po2') AND labevents.charttime = '2105-05-20 04:34:00') - (SELECT labevents... | mimic_iii |
CREATE TABLE Apartment_Facilities (
apt_id VARCHAR,
facility_code VARCHAR
)
CREATE TABLE Apartments (
room_count INTEGER,
apt_id VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the total number of rooms of all apartments with facility code 'Gym'... | SELECT SUM(T2.room_count) FROM Apartment_Facilities AS T1 JOIN Apartments AS T2 ON T1.apt_id = T2.apt_id WHERE T1.facility_code = "Gym" | sql_create_context |
CREATE TABLE table_23999 (
"Name" text,
"Completions" real,
"Attempts" real,
"Completion %" text,
"Yards" real,
"Touchdowns" real,
"Interceptions" real,
"QB Rating" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many touchdowns were ... | SELECT "Touchdowns" FROM table_23999 WHERE "QB Rating" = '66.6' | wikisql |
CREATE TABLE table_77716 (
"Player" text,
"Position" text,
"Date of Birth (Age)" text,
"Caps" real,
"Club/province" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player has a Position of fly-half, and a Caps of 3?
| SELECT "Player" FROM table_77716 WHERE "Position" = 'fly-half' AND "Caps" = '3' | wikisql |
CREATE TABLE table_55813 (
"Locomotive" text,
"Serial No" text,
"Entered service" text,
"Gauge" text,
"Livery" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the livery on the locomotive with a serial number 83-1011?
| SELECT "Livery" FROM table_55813 WHERE "Serial No" = '83-1011' | wikisql |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
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... | SELECT demographic.name, demographic.discharge_location FROM demographic WHERE demographic.subject_id = "2560" | mimicsql_data |
CREATE TABLE table_59633 (
"Round" text,
"Date" text,
"Event" text,
"Circuit" text,
"Winning Driver" text,
"Winning Team" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the winning team on July 13?
| SELECT "Winning Team" FROM table_59633 WHERE "Date" = 'july 13' | 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 gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_NM = '郑英武' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT < 2518.38) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_NM = '郑英武' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FRO... | css |
CREATE TABLE table_29031 (
"No. in series" real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"Production code" text,
"U.S. viewers (millions)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the prod... | SELECT "Production code" FROM table_29031 WHERE "No. in series" = '5' | 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 zyjzjlb (
CYBQDM text,
CYBQMC... | SELECT jyjgzbb.JYZBLSH FROM person_info JOIN hz_info JOIN mzjzjlb JOIN jybgb JOIN jyjgzbb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = jybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = jybgb.JZLSH_MZJZJLB AND jybgb.YLJGDM = ... | css |
CREATE TABLE table_name_58 (
lost INTEGER,
points VARCHAR,
played VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the highest number of losses with 23 points and 22 plays?
| SELECT MAX(lost) FROM table_name_58 WHERE points = 23 AND played > 22 | sql_create_context |
CREATE TABLE table_name_37 (
position INTEGER,
played VARCHAR,
points VARCHAR,
goals_against VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the lowest position with 32-6 points and less then 59 goals when there are more than 38 played?
| SELECT MIN(position) FROM table_name_37 WHERE points = "32-6" AND goals_against < 59 AND played > 38 | sql_create_context |
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
Deletio... | SELECT number = ROW_NUMBER() OVER (ORDER BY YEAR(CreationDate), TIME_TO_STR(CreationDate, '%W')), (CAST(SUM(CASE WHEN (Tags LIKE '%<##Tagname##>%') THEN 1 ELSE 0 END) AS FLOAT) * 100 / COUNT(Posts.Id)) AS "perc" FROM Posts WHERE (PostTypeId = 1 AND CreationDate >= '##Date1##' AND CreationDate <= '##Date2##') GROUP BY Y... | sede |
CREATE TABLE table_8781 (
"Tournament" text,
"1987" text,
"1988" text,
"1989" text,
"1990" text,
"1991" text,
"1992" text,
"1993" text,
"1994" text,
"Career SR" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What result in 1994 h... | SELECT "1994" FROM table_8781 WHERE "Tournament" = 'sr' | wikisql |
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE transfers (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
eventtype text,
careunit text,
war... | SELECT MAX(outputevents.value) FROM outputevents WHERE outputevents.icustay_id IN (SELECT icustays.icustay_id FROM icustays WHERE icustays.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 4469) AND NOT icustays.outtime IS NULL ORDER BY icustays.intime DESC LIMIT 1) AND outputevents.it... | mimic_iii |
CREATE TABLE table_name_45 (
partner VARCHAR,
surface VARCHAR,
opponents VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the partner of the team that faced the guillermo garc a-l pez albert portas on clay?
| SELECT partner FROM table_name_45 WHERE surface = "clay" AND opponents = "guillermo garcía-lópez albert portas" | sql_create_context |
CREATE TABLE jybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH text,
BGJGDM text,
BGJGMC text,
BGRGH text,
BGRQ time,
BGRXM text,
BGSJ time,
CJRQ time,
JSBBRQSJ time,
JSBBSJ time,
JYBBH text,
JYJGMC text,
JYJSGH text,
JYJSQM text,
JY... | SELECT * FROM hz_info JOIN txmzjzjlb ON hz_info.YLJGDM = txmzjzjlb.YLJGDM AND hz_info.KH = txmzjzjlb.KH AND hz_info.KLX = txmzjzjlb.KLX WHERE hz_info.RYBH = '23602060' AND hz_info.YLJGDM = '9638787' AND txmzjzjlb.JZZDSM LIKE '%后遗症%' UNION SELECT * FROM hz_info JOIN ftxmzjzjlb ON hz_info.YLJGDM = ftxmzjzjlb.YLJGDM AND h... | css |
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TA... | SELECT t3.treatmentname FROM (SELECT t2.treatmentname, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM (SELECT patient.uniquepid, diagnosis.diagnosistime FROM diagnosis JOIN patient ON diagnosis.patientunitstayid = patient.patientunitstayid WHERE diagnosis.diagnosisname = 'nutritional deficiency' AND DATETIME(dia... | eicu |
CREATE TABLE station (
Station_ID int,
Name text,
Annual_entry_exit real,
Annual_interchanges real,
Total_Passengers real,
Location text,
Main_Services text,
Number_of_Platforms int
)
CREATE TABLE train_station (
Train_ID int,
Station_ID int
)
CREATE TABLE train (
Train_ID ... | SELECT Location, SUM(Number_of_Platforms) FROM station GROUP BY Location | nvbench |
CREATE TABLE table_name_3 (
a_ VARCHAR,
year_ INTEGER,
position VARCHAR,
college VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the most recent year georgia tech chose a linebacker?
| SELECT MAX(year_) AS "a_" FROM table_name_3 WHERE position = "linebacker" AND college = "georgia tech" | sql_create_context |
CREATE TABLE table_name_40 (
lost INTEGER,
season VARCHAR,
avg_attend VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the maximum number of losses that the Minnesota Kicks had after 1979 with an average attendance of 16,605?
| SELECT MAX(lost) FROM table_name_40 WHERE season > 1979 AND avg_attend = 16 OFFSET 605 | sql_create_context |
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code tex... | SELECT t1.celllabel FROM (SELECT intakeoutput.celllabel, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM intakeoutput WHERE intakeoutput.cellpath LIKE '%output%' AND DATETIME(intakeoutput.intakeoutputtime) >= DATETIME(CURRENT_TIME(), '-5 year') GROUP BY intakeoutput.celllabel) AS t1 WHERE t1.c1 <= 3 | eicu |
CREATE TABLE table_37333 (
"Unit" text,
"Russian" text,
"Translation" text,
"Ratio" real,
"Metric value" text,
"Avoirdupois value" text,
"Ordinary value" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Avoirdupois value is translated to... | SELECT "Avoirdupois value" FROM table_37333 WHERE "Translation" = 'grain' | wikisql |
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
... | SELECT TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG = '$database' AND TABLE_SCHEMA != 'sys' ORDER BY TABLE_CATALOG, TABLE_SCHEMA, TABLE_NAME, ORDINAL_POSITION | sede |
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE icustays (
row_id number,
... | SELECT d_icd_procedures.short_title FROM d_icd_procedures WHERE d_icd_procedures.icd9_code IN (SELECT t1.icd9_code FROM (SELECT procedures_icd.icd9_code, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM procedures_icd WHERE procedures_icd.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.age B... | mimic_iii |
CREATE TABLE table_18274 (
"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.
-- where is the district where the incumbent is del latta?
| SELECT "District" FROM table_18274 WHERE "Incumbent" = 'Del Latta' | wikisql |
CREATE TABLE table_17161 (
"Suburb" text,
"Population (in 2008)" real,
"Median age (in 2006)" text,
"Mean household size (in 2006)" text,
"Area (km\u00b2)" text,
"Density (/km\u00b2)" real,
"Date first settled as a suburb" real,
"Gazetted as a Division Name" text
)
-- Using valid SQLit... | SELECT "Date first settled as a suburb" FROM table_17161 WHERE "Median age (in 2006)" = '40 years' | wikisql |
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
... | SELECT ROW_NUMBER() OVER (ORDER BY Reputation DESC) AS "#", Id AS "user_link", Reputation FROM Users WHERE Location LIKE '%Turkey%' ORDER BY Reputation DESC | sede |
CREATE TABLE table_14945608_1 (
attendance INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the highest attendance?
| SELECT MAX(attendance) FROM table_14945608_1 | sql_create_context |
CREATE TABLE table_80229 (
"Year" text,
"Start" text,
"Qual" text,
"Rank" text,
"Finish" text,
"Laps" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In 1937, what was the finish?
| SELECT "Finish" FROM table_80229 WHERE "Year" = '1937' | wikisql |
CREATE TABLE table_70 (
"County" text,
"Precincts" real,
"Lunsford" real,
"% Lunsford" text,
"McConnell" real,
"% McConnell" text,
"Total" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- If % lunsford is 51.82% what is the % mcconnell in Letc... | SELECT "% McConnell" FROM table_70 WHERE "% Lunsford" = '51.82%' | wikisql |
CREATE TABLE Assessment_Notes (
notes_id INTEGER,
student_id INTEGER,
teacher_id INTEGER,
date_of_notes DATETIME,
text_of_notes VARCHAR(255),
other_details VARCHAR(255)
)
CREATE TABLE Students (
student_id INTEGER,
address_id INTEGER,
first_name VARCHAR(80),
middle_name VARCHAR(... | SELECT date_address_from, COUNT(date_address_from) FROM Student_Addresses ORDER BY monthly_rental DESC | nvbench |
CREATE TABLE table_name_43 (
score VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Tell me the score for Venue of tanteen recreation ground, st. george's
| SELECT score FROM table_name_43 WHERE venue = "tanteen recreation ground, st. george's" | sql_create_context |
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessD... | WITH RecentUsers AS (SELECT Posts.OwnerUserId, MAX(Posts.LastActivityDate) AS LastActivityDate, SUM(CASE WHEN Posts.PostTypeId = 1 THEN 1 ELSE 0 END) AS Questions, SUM(CASE WHEN Posts.PostTypeId = 2 THEN 1 ELSE 0 END) AS Answers FROM Posts WHERE Posts.OwnerUserId IN (SELECT Posts.Id FROM Posts ORDER BY Posts.LastActivi... | sede |
CREATE TABLE table_name_5 (
played VARCHAR,
drawn VARCHAR,
lost VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times is there more than 0 draws and more than 0 losses?
| SELECT COUNT(played) FROM table_name_5 WHERE drawn > 0 AND lost > 0 | sql_create_context |
CREATE TABLE table_35843 (
"Game" real,
"January" real,
"Opponent" text,
"Score" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many Januarys had records of 22-15-6?
| SELECT COUNT("January") FROM table_35843 WHERE "Record" = '22-15-6' | wikisql |
CREATE TABLE table_name_26 (
to_par INTEGER,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum To par for score of 71-74-71-72=288
| SELECT SUM(to_par) FROM table_name_26 WHERE score = 71 - 74 - 71 - 72 = 288 | sql_create_context |
CREATE TABLE table_203_234 (
id number,
"description" text,
"total" number,
"poland" number,
"baltic states(resettled in poland during war)" number,
"resettled in poland during war(from ussr and romania)" number,
"sudetendeutsch" number,
"se europe\n(hungary, romania, yugoslavia & slovak... | SELECT "total" FROM table_203_234 WHERE "description" = 'violent deaths' | squall |
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compa... | SELECT DISTINCT airport.airport_code FROM airport, airport_service, city WHERE airport.airport_code = airport_service.airport_code AND city.city_code = airport_service.city_code AND city.city_name = 'PHILADELPHIA' | atis |
CREATE TABLE county (
County_Id int,
County_name text,
Population real,
Zip_code text
)
CREATE TABLE election (
Election_ID int,
Counties_Represented text,
District int,
Delegate text,
Party int,
First_Elected real,
Committee text
)
CREATE TABLE party (
Party_ID int,
... | SELECT T2.Party, AVG(COUNT(*)) FROM election AS T1 JOIN party AS T2 ON T1.Party = T2.Party_ID GROUP BY T2.Party ORDER BY AVG(COUNT(*)) | nvbench |
CREATE TABLE company (
company_id number,
rank number,
company text,
headquarters text,
main_industry text,
sales_billion number,
profits_billion number,
assets_billion number,
market_value number
)
CREATE TABLE station_company (
station_id number,
company_id number,
ran... | SELECT location, COUNT(*) FROM gas_station GROUP BY location ORDER BY COUNT(*) | spider |
CREATE TABLE table_5753 (
"Season" real,
"Level" text,
"Division" text,
"Administration" text,
"Position" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Season has a Level of tier 2 and a Position of 1st?
| SELECT COUNT("Season") FROM table_5753 WHERE "Level" = 'tier 2' AND "Position" = '1st' | wikisql |
CREATE TABLE table_name_5 (
d_45_o VARCHAR,
d_44_o VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the D 45 O with D 44 O majority
| SELECT d_45_o FROM table_name_5 WHERE d_44_o = "majority →" | sql_create_context |
CREATE TABLE event (
ID int,
Name text,
Stadium_ID int,
Year text
)
CREATE TABLE record (
ID int,
Result text,
Swimmer_ID int,
Event_ID int
)
CREATE TABLE swimmer (
ID int,
name text,
Nationality text,
meter_100 real,
meter_200 text,
meter_300 text,
meter_40... | SELECT Nationality, AVG(meter_100) FROM swimmer GROUP BY Nationality ORDER BY AVG(meter_100) DESC | nvbench |
CREATE TABLE table_49818 (
"Name" text,
"Built" text,
"Listed" text,
"Location" text,
"County" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- In which county is the swann covered bridge located?
| SELECT "County" FROM table_49818 WHERE "Name" = 'swann covered bridge' | wikisql |
CREATE TABLE table_name_44 (
name VARCHAR,
nationality VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which player is from Belgium?
| SELECT name FROM table_name_44 WHERE nationality = "belgium" | sql_create_context |
CREATE TABLE Payments (
Payment_ID INTEGER,
Settlement_ID INTEGER,
Payment_Method_Code VARCHAR(255),
Date_Payment_Made DATE,
Amount_Payment INTEGER
)
CREATE TABLE Settlements (
Settlement_ID INTEGER,
Claim_ID INTEGER,
Date_Claim_Made DATE,
Date_Claim_Settled DATE,
Amount_Claimed... | SELECT Date_Claim_Made, COUNT(Date_Claim_Made) FROM Settlements ORDER BY COUNT(Date_Claim_Made) DESC | nvbench |
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE prescriptions... | SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.religion = "JEHOVAH'S WITNESS" AND lab.label = "Triglycerides" | mimicsql_data |
CREATE TABLE table_name_1 (
event VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the event with a 2:08 time?
| SELECT event FROM table_name_1 WHERE time = "2:08" | sql_create_context |
CREATE TABLE student (
stuid number,
lname text,
fname text,
age number,
sex text,
major number,
advisor number,
city_code text
)
CREATE TABLE member_of_club (
stuid number,
clubid number,
position text
)
CREATE TABLE club (
clubid number,
clubname text,
clubdes... | SELECT t3.fname, t3.lname FROM club AS t1 JOIN member_of_club AS t2 ON t1.clubid = t2.clubid JOIN student AS t3 ON t2.stuid = t3.stuid WHERE t1.clubname = "Hopkins Student Enterprises" AND t2.position = "CTO" | spider |
CREATE TABLE body_builder (
body_builder_id number,
people_id number,
snatch number,
clean_jerk number,
total number
)
CREATE TABLE people (
people_id number,
name text,
height number,
weight number,
birth_date text,
birth_place text
)
-- Using valid SQLite, answer the fol... | SELECT T2.name FROM body_builder AS T1 JOIN people AS T2 ON T1.people_id = T2.people_id ORDER BY T2.weight DESC LIMIT 1 | spider |
CREATE TABLE table_10073 (
"City" text,
"Province" text,
"Country" text,
"IATA" text,
"ICAO" text,
"Airport" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the IATA with a City of budapest?
| SELECT "IATA" FROM table_10073 WHERE "City" = 'budapest' | 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 qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.PERSON_NM = '陶乐贤' AND t_kc22.MED_INV_ITEM_TYPE = '检查费' UNION SELECT t_kc22.SOC_SRT_DIRE_CD, t_kc22.SOC_SRT_DIRE_NM FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.P... | css |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.