instruction
stringlengths 151
7.46k
| output
stringlengths 2
4.44k
| source
stringclasses 26
values |
---|---|---|
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 text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE 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,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_DIRE_CD text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 医疗就诊89101528963的总医疗费是多少钱?
| SELECT t_kc21.MED_AMOUT FROM t_kc21 WHERE t_kc21.MED_CLINIC_ID = '89101528963' | css |
CREATE TABLE region (
region_id number,
region_code text,
region_name text
)
CREATE TABLE storm (
storm_id number,
name text,
dates_active text,
max_speed number,
damage_millions_usd number,
number_deaths number
)
CREATE TABLE affected_region (
region_id number,
storm_id number,
number_city_affected number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List name, dates active, and number of deaths for all storms with at least 1 death.
| SELECT name, dates_active, number_deaths FROM storm WHERE number_deaths >= 1 | spider |
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 number,
ILL_PAY number,
CIVIL_SUBSIDY number,
PER_SOL number,
PER_EXP number,
DATA_ID text,
SYNC_TIME time,
OUT_HOSP_DATE time,
CLINIC_ID text,
MED_TYPE number,
INSURED_STS text,
INSURED_IDENTITY number,
TRADE_TYPE number,
RECIPE_BILL_ID text,
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
RECEIVER_DEAL_ID text,
SENDER_REVOKE_ID text,
RECEIVER_REVOKE_ID text,
SENDER_OFFSET_ID text,
RECEIVER_OFFSET_ID text,
LAS_OVE_PAY number,
OVE_ADD_PAY number,
SUP_ADD_PAY number,
CKC102 number,
CASH_PAY number,
COM_ACC_PAY number,
ENT_ACC_PAY number,
ENT_PAY number,
COM_PAY number,
OLDC_FUND_PAY number,
SPE_FUND_PAY number
)
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,
VAL_UNIT text,
DOSE_UNIT text,
DOSE_FORM text,
SPEC text,
USE_FRE text,
EACH_DOSAGE text,
QTY number,
UNIVALENT number,
AMOUNT number,
SELF_PAY_PRO number,
RER_SOL number,
SELF_PAY_AMO number,
UP_LIMIT_AMO number,
OVE_SELF_AMO number,
EXP_OCC_DATE time,
RECIPE_BILL_ID text,
FLX_MED_ORG_ID text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
REF_STA_FLG number,
DATA_ID text,
SYNC_TIME time,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
TRADE_TYPE number,
STA_FLG number,
STA_DATE time,
REIMBURS_TYPE number,
FXBZ number,
REMOTE_SETTLE_FLG text
)
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 number,
FLX_MED_ORG_ID text,
MED_SER_ORG_NO text,
CLINIC_TYPE text,
MED_TYPE number,
CLINIC_ID text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
INPT_AREA_BED text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
MAIN_COND_DES text,
INSU_TYPE text,
IN_HOSP_DAYS number,
MED_AMOUT number,
FERTILITY_STS number,
DATA_ID text,
SYNC_TIME time,
REIMBURSEMENT_FLG number,
HOSP_LEV number,
HOSP_STS number,
INSURED_IDENTITY number,
SERVANT_FLG text,
TRADE_TYPE number,
INSURED_STS text,
REMOTE_SETTLE_FLG text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 看看患者74604701在医院0359926出院诊断中,疾病名称包含使用的医疗就诊记录编码
| SELECT MED_CLINIC_ID FROM t_kc21 WHERE PERSON_ID = '74604701' AND MED_SER_ORG_NO = '0359926' AND OUT_DIAG_DIS_NM LIKE '%使用%' | css |
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE code_description (
code varchar,
description text
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE month (
month_number int,
month_name text
)
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 state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
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 airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- does flight UA 270 from DENVER to PHILADELPHIA have a meal
| SELECT DISTINCT food_service.compartment, food_service.meal_code, food_service.meal_number FROM airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, flight, food_service 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 = 'PHILADELPHIA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND flight.flight_number = 270) AND flight.airline_code = 'UA' AND food_service.meal_code = flight.meal_code | atis |
CREATE TABLE airport_service (
city_code varchar,
airport_code varchar,
miles_distant int,
direction varchar,
minutes_distant int
)
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 ground_service (
city_code text,
airport_code text,
transport_type text,
ground_fare int
)
CREATE TABLE code_description (
code varchar,
description text
)
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 month (
month_number int,
month_name text
)
CREATE TABLE state (
state_code text,
state_name text,
country_name text
)
CREATE TABLE food_service (
meal_code text,
meal_number int,
compartment text,
meal_description varchar
)
CREATE TABLE equipment_sequence (
aircraft_code_sequence varchar,
aircraft_code varchar
)
CREATE TABLE dual_carrier (
main_airline varchar,
low_flight_number int,
high_flight_number int,
dual_airline varchar,
service_name text
)
CREATE TABLE airport (
airport_code varchar,
airport_name text,
airport_location text,
state_code varchar,
country_name varchar,
time_zone_code varchar,
minimum_connect_time int
)
CREATE TABLE restriction (
restriction_code text,
advance_purchase int,
stopovers text,
saturday_stay_required text,
minimum_stay int,
maximum_stay int,
application text,
no_discounts text
)
CREATE TABLE aircraft (
aircraft_code varchar,
aircraft_description varchar,
manufacturer varchar,
basic_type varchar,
engines int,
propulsion varchar,
wide_body varchar,
wing_span int,
length int,
weight int,
capacity int,
pay_load int,
cruising_speed int,
range_miles int,
pressurized varchar
)
CREATE TABLE city (
city_code varchar,
city_name varchar,
state_code varchar,
country_name varchar,
time_zone_code varchar
)
CREATE TABLE time_interval (
period text,
begin_time int,
end_time int
)
CREATE TABLE time_zone (
time_zone_code text,
time_zone_name text,
hours_from_gmt int
)
CREATE TABLE airline (
airline_code varchar,
airline_name text,
note text
)
CREATE TABLE flight_leg (
flight_id int,
leg_number int,
leg_flight int
)
CREATE TABLE date_day (
month_number int,
day_number int,
year int,
day_name varchar
)
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 class_of_service (
booking_class varchar,
rank int,
class_description text
)
CREATE TABLE compartment_class (
compartment varchar,
class_type varchar
)
CREATE TABLE flight (
aircraft_code_sequence text,
airline_code varchar,
airline_flight text,
arrival_time int,
connections int,
departure_time int,
dual_carrier text,
flight_days text,
flight_id int,
flight_number int,
from_airport varchar,
meal_code text,
stops int,
time_elapsed int,
to_airport varchar
)
CREATE TABLE days (
days_code varchar,
day_name varchar
)
CREATE TABLE flight_fare (
flight_id int,
fare_id int
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- EA flies from ATLANTA to DENVER what type of aircraft do you use before 1800
| SELECT DISTINCT aircraft.aircraft_code FROM aircraft, airport_service AS AIRPORT_SERVICE_0, airport_service AS AIRPORT_SERVICE_1, city AS CITY_0, city AS CITY_1, equipment_sequence, flight WHERE ((CITY_1.city_code = AIRPORT_SERVICE_1.city_code AND CITY_1.city_name = 'DENVER' AND flight.departure_time < 1800 AND flight.to_airport = AIRPORT_SERVICE_1.airport_code) AND CITY_0.city_code = AIRPORT_SERVICE_0.city_code AND CITY_0.city_name = 'ATLANTA' AND flight.from_airport = AIRPORT_SERVICE_0.airport_code) AND equipment_sequence.aircraft_code = aircraft.aircraft_code AND flight.aircraft_code_sequence = equipment_sequence.aircraft_code_sequence AND flight.airline_code = 'EA' | atis |
CREATE TABLE table_33534 (
"Network" text,
"Origin of Programming" text,
"Language" text,
"Genre" text,
"Service" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which service has a hindi language, general genre and zee tv network?
| SELECT "Service" FROM table_33534 WHERE "Language" = 'hindi' AND "Genre" = 'general' AND "Network" = 'zee tv' | wikisql |
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
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 Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE PostHistoryTypes (
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
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many tags have issued at least one tag badge?.
| SELECT COUNT(*) FROM (SELECT TagName FROM Badges INNER JOIN Tags ON TagName = Badges.Name WHERE TagBased = 'true' GROUP BY TagName) AS tagbadges | sede |
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text
)
CREATE TABLE jybgb_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC text,
NLS number,
NLY number,
QTJZYSGH text,
SG number,
SSY number,
SZY number,
TW number,
TXBZ number,
TZ number,
WDBZ number,
XL number,
YLJGDM text,
ZSEBZ number,
ZZBZ number,
ZZYSGH text
)
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 text,
RYCWH text,
RYDJSJ time,
RYSJ time,
RYTJDM number,
RYTJMC text,
RZBQDM text,
RZBQMC text,
WDBZ number,
YLJGDM text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
SBBM text,
SHRGH text,
SHRXM text,
YQBH text,
YQMC text,
jyjgzbb_id number
)
CREATE TABLE person_info (
CSD text,
CSRQ time,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
MZDM text,
MZMC text,
RYBH text,
XBDM number,
XBMC text,
XLDM text,
XLMC text,
XM text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在零一年九月十二日到一三年十月十三日内这个3425088号医院开出的检验报告单中,以检测指标名称以及检测指标结果定量单位不同为条件得到的检测指标结果定量的平均值,取最小的13项都为啥?
| SELECT jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW, AVG(jyjgzbb.JCZBJGDL) FROM jyjgzbb JOIN jybgb_jyjgzbb JOIN jybgb ON jybgb_jyjgzbb.JYZBLSH = jyjgzbb.JYZBLSH AND jybgb_jyjgzbb.jyjgzbb_id = jyjgzbb.jyjgzbb_id AND jybgb_jyjgzbb.YLJGDM = jybgb.YLJGDM WHERE jybgb.YLJGDM = '3425088' AND jyjgzbb.BGRQ BETWEEN '2001-09-12' AND '2013-10-13' GROUP BY jyjgzbb.JCZBMC, jyjgzbb.JCZBJGDW ORDER BY AVG(jyjgzbb.JCZBJGDL) LIMIT 13 | css |
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE number
)
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
CREATE TABLE qtb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
CREATE TABLE zyb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE 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,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 医疗机构5664551做叶酸片的检查记录有多少
| SELECT COUNT(*) FROM qtb JOIN t_kc22 ON qtb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '5664551' AND t_kc22.SOC_SRT_DIRE_NM = '叶酸片' UNION SELECT COUNT(*) FROM gyb JOIN t_kc22 ON gyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_NO = '5664551' AND t_kc22.SOC_SRT_DIRE_NM = '叶酸片' UNION SELECT COUNT(*) FROM zyb JOIN t_kc22 ON zyb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE zyb.MED_SER_ORG_NO = '5664551' AND t_kc22.SOC_SRT_DIRE_NM = '叶酸片' UNION SELECT COUNT(*) FROM mzb JOIN t_kc22 ON mzb.MED_CLINIC_ID = t_kc22.MED_CLINIC_ID WHERE mzb.MED_SER_ORG_NO = '5664551' AND t_kc22.SOC_SRT_DIRE_NM = '叶酸片' | css |
CREATE TABLE table_174151_5 (
devices_per_channel VARCHAR,
raw_bandwidth__mbit_s_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the devices per channel for 2560
| SELECT devices_per_channel FROM table_174151_5 WHERE raw_bandwidth__mbit_s_ = 2560 | sql_create_context |
CREATE TABLE table_11308 (
"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.
-- Name the away team for home team of fitzroy
| SELECT "Away team" FROM table_11308 WHERE "Home team" = 'fitzroy' | wikisql |
CREATE TABLE employee (
eid number,
name text,
salary number
)
CREATE TABLE certificate (
eid number,
aid number
)
CREATE TABLE flight (
flno number,
origin text,
destination text,
distance number,
departure_date time,
arrival_date time,
price number,
aid number
)
CREATE TABLE aircraft (
aid number,
name text,
distance number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is average and maximum salary of all employees.
| SELECT AVG(salary), MAX(salary) FROM employee | spider |
CREATE TABLE table_62647 (
"Region" text,
"Date" text,
"Format(s)" text,
"Edition(s)" text,
"Label" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Label of the September 19, 2008 release in Germany?
| SELECT "Label" FROM table_62647 WHERE "Date" = 'september 19, 2008' AND "Region" = 'germany' | wikisql |
CREATE TABLE table_name_26 (
tournament VARCHAR,
year INTEGER
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What tournament has a year prior to 2001?
| SELECT tournament FROM table_name_26 WHERE year < 2001 | sql_create_context |
CREATE TABLE table_name_9 (
home_team VARCHAR,
away_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which home team had the away team Southport?
| SELECT home_team FROM table_name_9 WHERE away_team = "southport" | sql_create_context |
CREATE TABLE table_56466 (
"Date" text,
"Visitor" text,
"Score" text,
"Home" text,
"Leading scorer" text,
"Record" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What date was Carlos Boozer (23) the leading scorer?
| SELECT "Date" FROM table_56466 WHERE "Leading scorer" = 'carlos boozer (23)' | wikisql |
CREATE TABLE table_28646 (
"Rank" real,
"Couple" text,
"Judges" real,
"Public" real,
"Total" real,
"Vote percentage" text,
"Result" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the rank for mikey and melanie
| SELECT "Rank" FROM table_28646 WHERE "Couple" = 'Mikey and Melanie' | wikisql |
CREATE TABLE table_65980 (
"Rank" real,
"Artist" text,
"Album" text,
"Peak position" real,
"Sales" real,
"Certification" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which artist had a 4x platinum?
| SELECT "Artist" FROM table_65980 WHERE "Certification" = '4x platinum' | wikisql |
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 tables provided above.
-- Return a histogram on what are the names and prices of all products in the store?, rank y axis from high to low order.
| SELECT Name, AVG(Price) FROM Products GROUP BY Name ORDER BY AVG(Price) DESC | nvbench |
CREATE TABLE table_48217 (
"Province" text,
"Map #" real,
"ISO 3166-2:AF" text,
"Centers" text,
"Population" real,
"Area (km\u00b2)" real,
"Language" text,
"Notes" text,
"U.N. Region" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which province is Parun in?
| SELECT "Province" FROM table_48217 WHERE "Centers" = 'parun' | wikisql |
CREATE TABLE table_22902 (
"Series No." real,
"Season No." real,
"Title" text,
"Directed by" text,
"Written by" text,
"Original air date" text,
"U.K. viewers (million)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many different original air dates does the episode with series number 13 have?
| SELECT COUNT("Original air date") FROM table_22902 WHERE "Series No." = '13' | wikisql |
CREATE TABLE table_68416 (
"Vol." text,
"English title" text,
"Japanese title" text,
"Release date (Japan)" text,
"Sony Catalog No." text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the English title of ?
| SELECT "English title" FROM table_68416 WHERE "Japanese title" = '餓狼伝説バトルアーカイブズ2' | wikisql |
CREATE TABLE table_32513 (
"Total tenure rank" real,
"Uninterrupted rank" real,
"Name" text,
"State represented" text,
"Total tenure time" text,
"Uninterrupted time" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total tenure time of Warren Magnuson, who had an uninterrupted rank larger than 4 and a total tenure rank larger than 9?
| SELECT "Total tenure time" FROM table_32513 WHERE "Uninterrupted rank" > '4' AND "Total tenure rank" > '9' AND "Name" = 'warren magnuson' | wikisql |
CREATE TABLE table_3964 (
"Operator" text,
"Number purchased" real,
"Variant" text,
"Bodybuilder" text,
"Year(s) purchased" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the bodybuilder when Coventry was operating?
| SELECT "Bodybuilder" FROM table_3964 WHERE "Operator" = 'Coventry' | 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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 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,
label text,
fluid text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is diagnoses long title of diagnoses icd9 code 920?
| SELECT diagnoses.long_title FROM diagnoses WHERE diagnoses.icd9_code = "920" | mimicsql_data |
CREATE TABLE table_27432 (
"Name" text,
"#" real,
"Position" text,
"Height" text,
"Weight" real,
"Year" text,
"Former school" text,
"Hometown" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What were the former schools of the player from East Brunswick, NJ?
| SELECT "Former school" FROM table_27432 WHERE "Hometown" = 'East Brunswick, NJ' | 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 mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC text,
NLS number,
NLY number,
QTJZYSGH text,
SG number,
SSY number,
SZY number,
TW number,
TXBZ number,
TZ number,
WDBZ number,
XL number,
YLJGDM text,
ZSEBZ number,
ZZBZ number,
ZZYSGH text
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
SBBM text,
SHRGH text,
SHRXM text,
YLJGDM text,
YQBH text,
YQMC text
)
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 text,
RYCWH text,
RYDJSJ time,
RYSJ time,
RYTJDM number,
RYTJMC text,
RZBQDM text,
RZBQMC text,
WDBZ number,
YLJGDM text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text
)
CREATE TABLE mzjzjlb_jybgb (
YLJGDM_MZJZJLB text,
BGDH number,
YLJGDM number
)
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM text,
YLJGDM_ZYJZJLB text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在医疗就诊37475427497中,为病患96815436的检验报告做审核的人员姓名及工号
| SELECT jybgb.SHRGH, jybgb.SHRXM FROM jybgb WHERE jybgb.JZLSH = '37475427497' | css |
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 d_items (
row_id number,
itemid number,
label text,
linksto text
)
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 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,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the first dose of pantoprazole until 15 months ago, prescribed to patient 31169?
| SELECT prescriptions.dose_val_rx FROM prescriptions WHERE prescriptions.hadm_id IN (SELECT admissions.hadm_id FROM admissions WHERE admissions.subject_id = 31169) AND prescriptions.drug = 'pantoprazole' AND DATETIME(prescriptions.startdate) <= DATETIME(CURRENT_TIME(), '-15 month') ORDER BY prescriptions.startdate LIMIT 1 | mimic_iii |
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE mzjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM number,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text
)
CREATE TABLE zyjybgb (
BBCJBW text,
BBDM text,
BBMC text,
BBZT number,
BGDH number,
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM number,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
SBBM text,
SHRGH text,
SHRXM text,
YLJGDM text,
YQBH text,
YQMC text
)
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 text,
RYCWH text,
RYDJSJ time,
RYSJ time,
RYTJDM number,
RYTJMC text,
RZBQDM text,
RZBQMC text,
WDBZ number,
YLJGDM text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text
)
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 mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC text,
NLS number,
NLY number,
QTJZYSGH text,
SG number,
SSY number,
SZY number,
TW number,
TXBZ number,
TZ number,
WDBZ number,
XL number,
YLJGDM text,
ZSEBZ number,
ZZBZ number,
ZZYSGH text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在11年3月24日到16年7月23日这段时间,患者陶展鹏一共有多少检验报告单,把这些检验报告单的审核日期列出来
| SELECT zyjybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN zyjybgb ON person_info.RYBH = hz_info.RYBH AND hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX AND mzjzjlb.YLJGDM = zyjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = zyjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '陶展鹏' AND zyjybgb.BGRQ BETWEEN '2011-03-24' AND '2016-07-23' UNION SELECT mzjybgb.SHSJ FROM person_info JOIN hz_info JOIN mzjzjlb JOIN mzjybgb 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 = mzjybgb.YLJGDM_MZJZJLB AND mzjzjlb.JZLSH = mzjybgb.JZLSH_MZJZJLB WHERE person_info.XM = '陶展鹏' AND mzjybgb.BGRQ BETWEEN '2011-03-24' AND '2016-07-23' UNION SELECT zyjybgb.SHSJ FROM person_info JOIN hz_info JOIN zyjzjlb JOIN zyjybgb 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 = zyjybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = zyjybgb.JZLSH_ZYJZJLB WHERE person_info.XM = '陶展鹏' AND zyjybgb.BGRQ BETWEEN '2011-03-24' AND '2016-07-23' UNION SELECT mzjybgb.SHSJ FROM person_info JOIN hz_info JOIN zyjzjlb JOIN mzjybgb 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 = mzjybgb.YLJGDM_ZYJZJLB AND zyjzjlb.JZLSH = mzjybgb.JZLSH_ZYJZJLB WHERE person_info.XM = '陶展鹏' AND mzjybgb.BGRQ BETWEEN '2011-03-24' AND '2016-07-23' | css |
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
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 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 TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- indicate the daily minimum amount of heart rate for patient 3229 since 09/2105.
| SELECT MIN(chartevents.valuenum) 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 = 3229)) AND chartevents.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'heart rate' AND d_items.linksto = 'chartevents') AND STRFTIME('%y-%m', chartevents.charttime) >= '2105-09' GROUP BY STRFTIME('%y-%m-%d', chartevents.charttime) | mimic_iii |
CREATE TABLE table_63112 (
"Season" text,
"LeagueContested" text,
"Level" real,
"LeaguePosition" text,
"Avg.Home Attendance 1" text,
"FA Cup" text,
"FA Trophy" text,
"Leading scorer 1" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Level has a Leading scorer 1 of tom greaves 8?
| SELECT "Level" FROM table_63112 WHERE "Leading scorer 1" = 'tom greaves 8' | wikisql |
CREATE TABLE gsi (
course_offering_id int,
student_id int
)
CREATE TABLE program_course (
program_id int,
course_id int,
workload int,
category varchar
)
CREATE TABLE course_tags_count (
course_id int,
clear_grading int,
pop_quiz int,
group_projects int,
inspirational int,
long_lectures int,
extra_credit int,
few_tests int,
good_feedback int,
tough_tests int,
heavy_papers int,
cares_for_students int,
heavy_assignments int,
respected int,
participation int,
heavy_reading int,
tough_grader int,
hilarious int,
would_take_again int,
good_lecture int,
no_skip int
)
CREATE TABLE course_prerequisite (
pre_course_id int,
course_id int
)
CREATE TABLE course (
course_id int,
name varchar,
department varchar,
number varchar,
credits varchar,
advisory_requirement varchar,
enforced_requirement varchar,
description varchar,
num_semesters int,
num_enrolled int,
has_discussion varchar,
has_lab varchar,
has_projects varchar,
has_exams varchar,
num_reviews int,
clarity_score int,
easiness_score int,
helpfulness_score int
)
CREATE TABLE semester (
semester_id int,
semester varchar,
year int
)
CREATE TABLE comment_instructor (
instructor_id int,
student_id int,
score int,
comment_text varchar
)
CREATE TABLE instructor (
instructor_id int,
name varchar,
uniqname varchar
)
CREATE TABLE program_requirement (
program_id int,
category varchar,
min_credit int,
additional_req varchar
)
CREATE TABLE offering_instructor (
offering_instructor_id int,
offering_id int,
instructor_id int
)
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_project varchar,
has_final_exam varchar,
textbook varchar,
class_address varchar,
allow_audit varchar
)
CREATE TABLE ta (
campus_job_id int,
student_id int,
location varchar
)
CREATE TABLE student_record (
student_id int,
course_id int,
semester int,
grade varchar,
how varchar,
transfer_source varchar,
earn_credit varchar,
repeat_term varchar,
test_id varchar
)
CREATE TABLE student (
student_id int,
lastname varchar,
firstname varchar,
program_id int,
declare_major varchar,
total_credit int,
total_gpa float,
entered_as varchar,
admit_term int,
predicted_graduation_semester int,
degree varchar,
minor varchar,
internship varchar
)
CREATE TABLE area (
course_id int,
area varchar
)
CREATE TABLE requirement (
requirement_id int,
requirement varchar,
college varchar
)
CREATE TABLE jobs (
job_id int,
job_title varchar,
description varchar,
requirement varchar,
city varchar,
state varchar,
country varchar,
zip int
)
CREATE TABLE program (
program_id int,
name varchar,
college varchar,
introduction varchar
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Are there classes on Friday for 941 with Prof. Midhat Farooq ?
| SELECT COUNT(*) = 0 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.number = 941 AND course_offering.friday = 'N' AND instructor.name LIKE '%Midhat Farooq%' | advising |
CREATE TABLE table_name_51 (
attendance VARCHAR,
week VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What's the total attendance of games against the New York Giants after week 13?
| SELECT COUNT(attendance) FROM table_name_51 WHERE week > 13 AND opponent = "new york giants" | 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 text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
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,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE number
)
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,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在患者32284795的医疗记录中,他的药品消费金额在1441.3元以上的医疗就诊有哪几次?编号是什么
| SELECT gwyjzb.MED_CLINIC_ID FROM gwyjzb WHERE gwyjzb.PERSON_ID = '32284795' AND NOT gwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1441.3) UNION SELECT fgwyjzb.MED_CLINIC_ID FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '32284795' AND NOT fgwyjzb.MED_CLINIC_ID IN (SELECT t_kc22.MED_CLINIC_ID FROM t_kc22 WHERE t_kc22.AMOUNT <= 1441.3) | css |
CREATE TABLE table_name_68 (
team VARCHAR,
race_1 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which team received 4 in race 1?
| SELECT team FROM table_name_68 WHERE race_1 = "4" | 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE prescriptions (
subject_id text,
hadm_id text,
icustay_id text,
drug_type text,
drug text,
formulary_drug_cd text,
route text,
drug_dose text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- mention the admission time and diagnosis icd9 code of patient with patient id 74032.
| SELECT demographic.admittime, diagnoses.icd9_code FROM demographic INNER JOIN diagnoses ON demographic.hadm_id = diagnoses.hadm_id WHERE demographic.subject_id = "74032" | mimicsql_data |
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime 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 patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 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 procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- get me the top four most frequent outputs in 2105?
| SELECT d_items.label FROM d_items WHERE d_items.itemid IN (SELECT t1.itemid FROM (SELECT outputevents.itemid, DENSE_RANK() OVER (ORDER BY COUNT(*) DESC) AS c1 FROM outputevents WHERE STRFTIME('%y', outputevents.charttime) = '2105' GROUP BY outputevents.itemid) AS t1 WHERE t1.c1 <= 4) | mimic_iii |
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
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,
valuenum number,
valueuom text
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
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 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 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 labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
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 microbiologyevents (
row_id number,
subject_id number,
hadm_id number,
charttime time,
spec_type_desc text,
org_name text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- among the patients aged 60 or above in 2100, what are the top three most frequent procedures?
| 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 >= 60) AND STRFTIME('%y', procedures_icd.charttime) = '2100' GROUP BY procedures_icd.icd9_code) AS t1 WHERE t1.c1 <= 3) | mimic_iii |
CREATE TABLE table_9073 (
"Week" real,
"Date" text,
"Opponent" text,
"Result" text,
"Attendance" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which date has a Result of l 25-13?
| SELECT "Date" FROM table_9073 WHERE "Result" = 'l 25-13' | wikisql |
CREATE TABLE zyb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE 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,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
MED_CLINIC_ID text,
MED_DIRE_CD text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
CREATE TABLE qtb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在医院5349528所有的就诊记载里根据不一样的科室名字和入院诊断的疾病名字列一下病人平均有多少岁
| SELECT qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM, AVG(qtb.PERSON_AGE) FROM qtb WHERE qtb.MED_SER_ORG_NO = '5349528' GROUP BY qtb.MED_ORG_DEPT_NM, qtb.IN_DIAG_DIS_NM UNION SELECT gyb.MED_ORG_DEPT_NM, gyb.IN_DIAG_DIS_NM, AVG(gyb.PERSON_AGE) FROM gyb WHERE gyb.MED_SER_ORG_NO = '5349528' GROUP BY gyb.MED_ORG_DEPT_NM, gyb.IN_DIAG_DIS_NM UNION SELECT zyb.MED_ORG_DEPT_NM, zyb.IN_DIAG_DIS_NM, AVG(zyb.PERSON_AGE) FROM zyb WHERE zyb.MED_SER_ORG_NO = '5349528' GROUP BY zyb.MED_ORG_DEPT_NM, zyb.IN_DIAG_DIS_NM UNION SELECT mzb.MED_ORG_DEPT_NM, mzb.IN_DIAG_DIS_NM, AVG(mzb.PERSON_AGE) FROM mzb WHERE mzb.MED_SER_ORG_NO = '5349528' GROUP BY mzb.MED_ORG_DEPT_NM, mzb.IN_DIAG_DIS_NM | css |
CREATE TABLE table_20683381_3 (
against___percentage_ VARCHAR,
±_yes_side_2008___percentage_ VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When +18.1 is the yes side 2008 percentage what is the percentage of against?
| SELECT against___percentage_ FROM table_20683381_3 WHERE ±_yes_side_2008___percentage_ = "+18.1" | sql_create_context |
CREATE TABLE table_68445 (
"Need" text,
"Being (qualities)" text,
"Having (things)" text,
"Doing (actions)" text,
"Interacting (settings)" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the being for having things of language, religions, work, customs, values, norms?
| SELECT "Being (qualities)" FROM table_68445 WHERE "Having (things)" = 'language, religions, work, customs, values, norms' | wikisql |
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
CREATE TABLE vitalperiodic (
vitalperiodicid number,
patientunitstayid number,
temperature number,
sao2 number,
heartrate number,
respiration number,
systemicsystolic number,
systemicdiastolic number,
systemicmean number,
observationtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what was the difference in weight of patient 006-123134 second measured on the current hospital visit compared to the first value measured on the current hospital visit?
| SELECT (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-123134' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1 OFFSET 1) - (SELECT patient.admissionweight FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-123134' AND patient.hospitaldischargetime IS NULL) AND NOT patient.admissionweight IS NULL ORDER BY patient.unitadmittime LIMIT 1) | eicu |
CREATE TABLE Ref_Hotel_Star_Ratings (
star_rating_code CHAR(15),
star_rating_description VARCHAR(80)
)
CREATE TABLE Shops (
Shop_ID INTEGER,
Shop_Details VARCHAR(255)
)
CREATE TABLE Staff (
Staff_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(40),
Other_Details VARCHAR(255)
)
CREATE TABLE Theme_Parks (
Theme_Park_ID INTEGER,
Theme_Park_Details VARCHAR(255)
)
CREATE TABLE Photos (
Photo_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Name VARCHAR(255),
Description VARCHAR(255),
Filename VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Hotels (
hotel_id INTEGER,
star_rating_code CHAR(15),
pets_allowed_yn CHAR(1),
price_range real,
other_hotel_details VARCHAR(255)
)
CREATE TABLE Tourist_Attraction_Features (
Tourist_Attraction_ID INTEGER,
Feature_ID INTEGER
)
CREATE TABLE Royal_Family (
Royal_Family_ID INTEGER,
Royal_Family_Details VARCHAR(255)
)
CREATE TABLE Museums (
Museum_ID INTEGER,
Museum_Details VARCHAR(255)
)
CREATE TABLE Tourist_Attractions (
Tourist_Attraction_ID INTEGER,
Attraction_Type_Code CHAR(15),
Location_ID INTEGER,
How_to_Get_There VARCHAR(255),
Name VARCHAR(255),
Description VARCHAR(255),
Opening_Hours VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Visitors (
Tourist_ID INTEGER,
Tourist_Details VARCHAR(255)
)
CREATE TABLE Ref_Attraction_Types (
Attraction_Type_Code CHAR(15),
Attraction_Type_Description VARCHAR(255)
)
CREATE TABLE Visits (
Visit_ID INTEGER,
Tourist_Attraction_ID INTEGER,
Tourist_ID INTEGER,
Visit_Date DATETIME,
Visit_Details VARCHAR(40)
)
CREATE TABLE Street_Markets (
Market_ID INTEGER,
Market_Details VARCHAR(255)
)
CREATE TABLE Features (
Feature_ID INTEGER,
Feature_Details VARCHAR(255)
)
CREATE TABLE Locations (
Location_ID INTEGER,
Location_Name VARCHAR(255),
Address VARCHAR(255),
Other_Details VARCHAR(255)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- A bar chart showing the number of tourist attractions for each attraction name, sort Y from low to high order please.
| SELECT Name, COUNT(*) FROM Tourist_Attractions AS T1 JOIN Visits AS T2 ON T1.Tourist_Attraction_ID = T2.Tourist_Attraction_ID GROUP BY T2.Tourist_Attraction_ID ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_15352382_1 (
against VARCHAR,
difference VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many under the category of Against have a Difference of 11
| SELECT COUNT(against) FROM table_15352382_1 WHERE difference = 11 | sql_create_context |
CREATE TABLE hz_info_mzjzjlb (
JZLSH number,
YLJGDM number,
mzjzjlb_id number
)
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 text,
RYCWH text,
RYDJSJ time,
RYSJ time,
RYTJDM number,
RYTJMC text,
RZBQDM text,
RZBQMC text,
WDBZ number,
YLJGDM text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
SBBM text,
SHRGH text,
SHRXM text,
YLJGDM text,
YQBH text,
YQMC text
)
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 mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC text,
NLS number,
NLY number,
QTJZYSGH text,
SG number,
SSY number,
SZY number,
TW number,
TXBZ number,
TZ number,
WDBZ number,
XL number,
ZSEBZ number,
ZZBZ number,
ZZYSGH text,
mzjzjlb_id number
)
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 医院9235653中列出56017266病患入院科室名称包含角膜的住院就诊记录一共是哪些条?
| SELECT * FROM hz_info JOIN zyjzjlb ON hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE hz_info.RYBH = '56017266' AND hz_info.YLJGDM = '9235653' AND zyjzjlb.JZKSMC LIKE '%角膜%' | css |
CREATE TABLE t_kc22 (
MED_EXP_DET_ID text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
MED_CLINIC_ID text,
MED_EXP_BILL_ID text,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
DIRE_TYPE number,
CHA_ITEM_LEV number,
MED_INV_ITEM_TYPE text,
MED_DIRE_CD text,
MED_DIRE_NM text,
VAL_UNIT text,
DOSE_UNIT text,
DOSE_FORM text,
SPEC text,
USE_FRE text,
EACH_DOSAGE text,
QTY number,
UNIVALENT number,
AMOUNT number,
SELF_PAY_PRO number,
RER_SOL number,
SELF_PAY_AMO number,
UP_LIMIT_AMO number,
OVE_SELF_AMO number,
EXP_OCC_DATE time,
RECIPE_BILL_ID text,
FLX_MED_ORG_ID text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
REF_STA_FLG number,
DATA_ID text,
SYNC_TIME time,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
TRADE_TYPE number,
STA_FLG number,
STA_DATE time,
REIMBURS_TYPE number,
FXBZ number,
REMOTE_SETTLE_FLG text
)
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 number,
ILL_PAY number,
CIVIL_SUBSIDY number,
PER_SOL number,
PER_EXP number,
DATA_ID text,
SYNC_TIME time,
OUT_HOSP_DATE time,
CLINIC_ID text,
MED_TYPE number,
INSURED_STS text,
INSURED_IDENTITY number,
TRADE_TYPE number,
RECIPE_BILL_ID text,
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
RECEIVER_DEAL_ID text,
SENDER_REVOKE_ID text,
RECEIVER_REVOKE_ID text,
SENDER_OFFSET_ID text,
RECEIVER_OFFSET_ID text,
LAS_OVE_PAY number,
OVE_ADD_PAY number,
SUP_ADD_PAY number,
CKC102 number,
CASH_PAY number,
COM_ACC_PAY number,
ENT_ACC_PAY number,
ENT_PAY number,
COM_PAY number,
OLDC_FUND_PAY number,
SPE_FUND_PAY number
)
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 number,
FLX_MED_ORG_ID text,
MED_SER_ORG_NO text,
CLINIC_TYPE text,
MED_TYPE number,
CLINIC_ID text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
INPT_AREA_BED text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
MAIN_COND_DES text,
INSU_TYPE text,
IN_HOSP_DAYS number,
MED_AMOUT number,
FERTILITY_STS number,
DATA_ID text,
SYNC_TIME time,
REIMBURSEMENT_FLG number,
HOSP_LEV number,
HOSP_STS number,
INSURED_IDENTITY number,
SERVANT_FLG text,
TRADE_TYPE number,
INSURED_STS text,
REMOTE_SETTLE_FLG text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在医疗就诊89912914191中,开出的哪些药品的名称不包含舒肝?其对应的价格如何呢
| SELECT SOC_SRT_DIRE_CD, SOC_SRT_DIRE_NM, AMOUNT FROM t_kc22 WHERE MED_CLINIC_ID = '89912914191' AND NOT SOC_SRT_DIRE_NM LIKE '%舒肝%' | css |
CREATE TABLE table_name_33 (
latin VARCHAR,
english VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the Latin word for the English word bone?
| SELECT latin FROM table_name_33 WHERE english = "bone" | sql_create_context |
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 number,
ILL_PAY number,
CIVIL_SUBSIDY number,
PER_SOL number,
PER_EXP number,
DATA_ID text,
SYNC_TIME time,
OUT_HOSP_DATE time,
CLINIC_ID text,
MED_TYPE number,
INSURED_STS text,
INSURED_IDENTITY number,
TRADE_TYPE number,
RECIPE_BILL_ID text,
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
RECEIVER_DEAL_ID text,
SENDER_REVOKE_ID text,
RECEIVER_REVOKE_ID text,
SENDER_OFFSET_ID text,
RECEIVER_OFFSET_ID text,
LAS_OVE_PAY number,
OVE_ADD_PAY number,
SUP_ADD_PAY number,
CKC102 number,
CASH_PAY number,
COM_ACC_PAY number,
ENT_ACC_PAY number,
ENT_PAY number,
COM_PAY number,
OLDC_FUND_PAY number,
SPE_FUND_PAY number
)
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,
VAL_UNIT text,
DOSE_UNIT text,
DOSE_FORM text,
SPEC text,
USE_FRE text,
EACH_DOSAGE text,
QTY number,
UNIVALENT number,
AMOUNT number,
SELF_PAY_PRO number,
RER_SOL number,
SELF_PAY_AMO number,
UP_LIMIT_AMO number,
OVE_SELF_AMO number,
EXP_OCC_DATE time,
RECIPE_BILL_ID text,
FLX_MED_ORG_ID text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
REF_STA_FLG number,
DATA_ID text,
SYNC_TIME time,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
TRADE_TYPE number,
STA_FLG number,
STA_DATE time,
REIMBURS_TYPE number,
FXBZ number,
REMOTE_SETTLE_FLG text
)
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 number,
FLX_MED_ORG_ID text,
MED_SER_ORG_NO text,
CLINIC_TYPE text,
MED_TYPE number,
CLINIC_ID text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
INPT_AREA_BED text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
MAIN_COND_DES text,
INSU_TYPE text,
IN_HOSP_DAYS number,
MED_AMOUT number,
FERTILITY_STS number,
DATA_ID text,
SYNC_TIME time,
REIMBURSEMENT_FLG number,
HOSP_LEV number,
HOSP_STS number,
INSURED_IDENTITY number,
SERVANT_FLG text,
TRADE_TYPE number,
INSURED_STS text,
REMOTE_SETTLE_FLG text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 我想了解一下从零一年九月二十一日到零九年二月二十六日患者奚子默的住院次数
| SELECT COUNT(*) FROM t_kc21 WHERE PERSON_NM = '奚子默' AND IN_HOSP_DATE BETWEEN '2001-09-21' AND '2009-02-26' AND CLINIC_TYPE = '住院' | css |
CREATE TABLE table_name_22 (
attendance INTEGER,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the sum of attendance for round 3
| SELECT SUM(attendance) FROM table_name_22 WHERE round = "round 3" | sql_create_context |
CREATE TABLE table_name_39 (
record VARCHAR,
opponent VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the record of the game with the toronto huskies as the opponent?
| SELECT record FROM table_name_39 WHERE opponent = "toronto huskies" | sql_create_context |
CREATE TABLE mzjzjlb (
HXPLC number,
HZXM text,
JLSJ time,
JZJSSJ time,
JZKSBM text,
JZKSMC text,
JZKSRQ time,
JZLSH text,
JZZDBM text,
JZZDSM text,
JZZTDM number,
JZZTMC text,
KH text,
KLX number,
MJZH text,
ML number,
MZZYZDZZBM text,
MZZYZDZZMC text,
NLS number,
NLY number,
QTJZYSGH text,
SG number,
SSY number,
SZY number,
TW number,
TXBZ number,
TZ number,
WDBZ number,
XL number,
YLJGDM text,
ZSEBZ number,
ZZBZ number,
ZZYSGH text
)
CREATE TABLE jyjgzbb (
BGDH text,
BGRQ time,
CKZFWDX text,
CKZFWSX number,
CKZFWXX number,
JCFF text,
JCRGH text,
JCRXM text,
JCXMMC text,
JCZBDM text,
JCZBJGDL number,
JCZBJGDW text,
JCZBJGDX text,
JCZBMC text,
JLDW text,
JYRQ time,
JYZBLSH text,
SBBM text,
SHRGH text,
SHRXM text,
YQBH text,
YQMC text,
jyjgzbb_id number
)
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 text,
RYCWH text,
RYDJSJ time,
RYSJ time,
RYTJDM number,
RYTJMC text,
RZBQDM text,
RZBQMC text,
WDBZ number,
YLJGDM text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text
)
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_jyjgzbb (
JYZBLSH number,
YLJGDM text,
jyjgzbb_id number
)
CREATE TABLE hz_info (
KH text,
KLX number,
RYBH text,
YLJGDM text
)
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,
JYKSBM text,
JYKSMC text,
JYLX number,
JYRQ time,
JYSQJGMC text,
JYXMDM text,
JYXMMC text,
JZLSH text,
JZLSH_MZJZJLB text,
JZLSH_ZYJZJLB text,
JZLX number,
KSBM text,
KSMC text,
SHRGH text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
SQRGH text,
SQRQ time,
SQRXM text,
YLJGDM text,
YLJGDM_MZJZJLB text,
YLJGDM_ZYJZJLB text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 查出检测指标名称与结果定量单位和检验指标记录22668273085相同,且检测指标结果定量大于其的记录有哪些
| SELECT * FROM jyjgzbb WHERE jyjgzbb.JCZBMC = (SELECT jyjgzbb.JCZBMC FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '22668273085') AND jyjgzbb.JCZBJGDW = (SELECT jyjgzbb.JCZBJGDW FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '22668273085') AND jyjgzbb.JCZBJGDL > (SELECT jyjgzbb.JCZBJGDL FROM jyjgzbb WHERE jyjgzbb.JYZBLSH = '22668273085') | 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 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
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is primary disease and admission time of subject name richard gundlach?
| SELECT demographic.diagnosis, demographic.admittime FROM demographic WHERE demographic.name = "Richard Gundlach" | mimicsql_data |
CREATE TABLE table_75744 (
"Name" text,
"Builder" text,
"Laid down" text,
"Launched" text,
"Completed" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- When did chatham complete the Hmsmedusa?
| SELECT "Completed" FROM table_75744 WHERE "Builder" = 'chatham' AND "Name" = 'hmsmedusa' | wikisql |
CREATE TABLE table_16961 (
"Date" text,
"Tournament" text,
"Location" text,
"Purse( $ )" real,
"Winner" text,
"Score" text,
"1st Prize( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Where was the Fairfield Barnett classic tournament held?
| SELECT "Location" FROM table_16961 WHERE "Tournament" = 'Fairfield Barnett Classic' | wikisql |
CREATE TABLE table_name_41 (
record VARCHAR,
round VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the record when the round is before 3 and the time si 4:59?
| SELECT record FROM table_name_41 WHERE round < 3 AND time = "4:59" | sql_create_context |
CREATE TABLE PostTypes (
Id number,
Name text
)
CREATE TABLE PostTags (
PostId number,
TagId number
)
CREATE TABLE CloseAsOffTopicReasonTypes (
Id number,
IsUniversal boolean,
InputTitle text,
MarkdownInputGuidance text,
MarkdownPostOwnerGuidance text,
MarkdownPrivilegedUserGuidance text,
MarkdownConcensusDescription text,
CreationDate time,
CreationModeratorId number,
ApprovalDate time,
ApprovalModeratorId number,
DeactivationDate time,
DeactivationModeratorId number
)
CREATE TABLE PostHistoryTypes (
Id number,
Name text
)
CREATE TABLE Badges (
Id number,
UserId number,
Name text,
Date time,
Class number,
TagBased boolean
)
CREATE TABLE PostNotices (
Id number,
PostId number,
PostNoticeTypeId number,
CreationDate time,
DeletionDate time,
ExpiryDate time,
Body text,
OwnerUserId number,
DeletionUserId number
)
CREATE TABLE ReviewTaskResults (
Id number,
ReviewTaskId number,
ReviewTaskResultTypeId number,
CreationDate time,
RejectionReasonId number,
Comment text
)
CREATE TABLE Users (
Id number,
Reputation number,
CreationDate time,
DisplayName text,
LastAccessDate time,
WebsiteUrl text,
Location text,
AboutMe text,
Views number,
UpVotes number,
DownVotes number,
ProfileImageUrl text,
EmailHash text,
AccountId number
)
CREATE TABLE CloseReasonTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskStates (
Id number,
Name text,
Description text
)
CREATE TABLE Comments (
Id number,
PostId number,
Score number,
Text text,
CreationDate time,
UserDisplayName text,
UserId number,
ContentLicense text
)
CREATE TABLE VoteTypes (
Id number,
Name text
)
CREATE TABLE PostFeedback (
Id number,
PostId number,
IsAnonymous boolean,
VoteTypeId number,
CreationDate time
)
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 ReviewRejectionReasons (
Id number,
Name text,
Description text,
PostTypeId number
)
CREATE TABLE PendingFlags (
Id number,
FlagTypeId number,
PostId number,
CreationDate time,
CloseReasonTypeId number,
CloseAsOffTopicReasonTypeId number,
DuplicateOfQuestionId number,
BelongsOnBaseHostAddress text
)
CREATE TABLE PostNoticeTypes (
Id number,
ClassId number,
Name text,
Body text,
IsHidden boolean,
Predefined boolean,
PostNoticeDurationId number
)
CREATE TABLE FlagTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Posts (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE Tags (
Id number,
TagName text,
Count number,
ExcerptPostId number,
WikiPostId number
)
CREATE TABLE SuggestedEditVotes (
Id number,
SuggestedEditId number,
UserId number,
VoteTypeId number,
CreationDate time,
TargetUserId number,
TargetRepChange number
)
CREATE TABLE PostsWithDeleted (
Id number,
PostTypeId number,
AcceptedAnswerId number,
ParentId number,
CreationDate time,
DeletionDate time,
Score number,
ViewCount number,
Body text,
OwnerUserId number,
OwnerDisplayName text,
LastEditorUserId number,
LastEditorDisplayName text,
LastEditDate time,
LastActivityDate time,
Title text,
Tags text,
AnswerCount number,
CommentCount number,
FavoriteCount number,
ClosedDate time,
CommunityOwnedDate time,
ContentLicense text
)
CREATE TABLE ReviewTaskResultTypes (
Id number,
Name text,
Description text
)
CREATE TABLE ReviewTaskTypes (
Id number,
Name text,
Description text
)
CREATE TABLE Votes (
Id number,
PostId number,
VoteTypeId number,
UserId number,
CreationDate time,
BountyAmount number
)
CREATE TABLE PostLinks (
Id number,
CreationDate time,
PostId number,
RelatedPostId number,
LinkTypeId number
)
CREATE TABLE ReviewTasks (
Id number,
ReviewTaskTypeId number,
CreationDate time,
DeletionDate time,
ReviewTaskStateId number,
PostId number,
SuggestedEditId number,
CompletedByReviewTaskId number
)
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 PostHistory (
Id number,
PostHistoryTypeId number,
PostId number,
RevisionGUID other,
CreationDate time,
UserId number,
UserDisplayName text,
Comment text,
Text text,
ContentLicense text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Posts deleted by VoteType 4.
| SELECT *, 'site://posts/' + CAST(PostId AS TEXT) + '/revisions' AS Link FROM Votes WHERE VoteTypeId = 4 ORDER BY Id DESC | sede |
CREATE TABLE table_28759261_5 (
dadar_xi_‘b’ VARCHAR,
good_shepherd VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the dadar xi b where the good shepherd is sea liner fc?
| SELECT dadar_xi_‘b’ FROM table_28759261_5 WHERE good_shepherd = "Sea Liner FC" | sql_create_context |
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM text,
CYBQMC text,
CYCWH text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text,
MZBMLX number,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM text,
RYSJ time,
CYSJ time,
CYZTDM number
)
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 text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
JYKSBM text,
JYKSMC text,
BGJGDM text,
BGJGMC text,
SQRQ time,
CJRQ time,
JYRQ time,
BGSJ time,
BBDM text,
BBMC text,
JYBBH text,
BBZT number,
BBCJBW text,
JSBBSJ time,
JYXMMC text,
JYXMDM text,
JYSQJGMC text,
JYJGMC text,
JSBBRQSJ time,
JYJSQM text,
JYJSGH text
)
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,
ZZYSGH text,
QTJZYSGH text,
JZZDBM text,
JZZDSM text,
MZZYZDZZBM text,
MZZYZDZZMC text,
SG number,
TZ number,
TW number,
SSY number,
SZY number,
XL number,
HXPLC number,
ML number,
JLSJ time
)
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text,
YQMC text,
CKZFWDX text,
CKZFWXX number,
CKZFWSX number,
JLDW text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 在2002年9月18日到2018年10月31日期间有几个医生就诊过病患23946092?
| SELECT COUNT(DISTINCT mzjzjlb.ZZYSGH) FROM hz_info JOIN mzjzjlb ON hz_info.YLJGDM = mzjzjlb.YLJGDM AND hz_info.KH = mzjzjlb.KH AND hz_info.KLX = mzjzjlb.KLX WHERE hz_info.RYBH = '23946092' AND mzjzjlb.JZKSRQ BETWEEN '2002-09-18' AND '2018-10-31' | css |
CREATE TABLE procedures (
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 (
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
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
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- give me the number of patients whose procedure long title is aortography?
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE procedures.long_title = "Aortography" | mimicsql_data |
CREATE TABLE table_name_73 (
position VARCHAR,
school_club_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the position from the school/club Far Eastern?
| SELECT position FROM table_name_73 WHERE school_club_team = "far eastern" | sql_create_context |
CREATE TABLE labevents (
row_id number,
subject_id number,
hadm_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
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_diagnoses (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE diagnoses_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
CREATE TABLE cost (
row_id number,
subject_id number,
hadm_id number,
event_type text,
event_id number,
chargetime time,
cost number
)
CREATE TABLE d_labitems (
row_id number,
itemid number,
label text
)
CREATE TABLE chartevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
itemid number,
charttime time,
valuenum number,
valueuom text
)
CREATE TABLE d_icd_procedures (
row_id number,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE procedures_icd (
row_id number,
subject_id number,
hadm_id number,
icd9_code text,
charttime time
)
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 inputevents_cv (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
amount number
)
CREATE TABLE d_items (
row_id number,
itemid number,
label text,
linksto text
)
CREATE TABLE patients (
row_id number,
subject_id number,
gender text,
dob time,
dod time
)
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 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,
first_careunit text,
last_careunit text,
first_wardid number,
last_wardid number,
intime time,
outtime time
)
CREATE TABLE outputevents (
row_id number,
subject_id number,
hadm_id number,
icustay_id number,
charttime time,
itemid number,
value number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- has there ever been any promote w/fiber given to patient 4401 on the current intensive care unit visit?
| SELECT COUNT(*) > 0 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 = 4401) AND icustays.outtime IS NULL) AND inputevents_cv.itemid IN (SELECT d_items.itemid FROM d_items WHERE d_items.label = 'promote w/fiber' AND d_items.linksto = 'inputevents_cv') | mimic_iii |
CREATE TABLE table_49614 (
"Place" text,
"Player" text,
"Country" text,
"Score" text,
"To par" text,
"Money ( $ )" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much did Larry Nelson win?
| SELECT "Money ( $ )" FROM table_49614 WHERE "Player" = 'larry nelson' | wikisql |
CREATE TABLE table_name_79 (
evening_gown VARCHAR,
preliminaries VARCHAR,
state VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the evening gown score of the contestant from the District of Columbia with preliminaries smaller than 8.647?
| SELECT COUNT(evening_gown) FROM table_name_79 WHERE preliminaries < 8.647 AND state = "district of columbia" | sql_create_context |
CREATE TABLE table_name_73 (
tournament VARCHAR,
score VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which Tournament has a Score of 6(4) 7 2 6?
| SELECT tournament FROM table_name_73 WHERE score = "6(4)–7 2–6" | sql_create_context |
CREATE TABLE table_name_25 (
school_club_team VARCHAR,
player VARCHAR,
pick VARCHAR,
round VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which school/club has a pick smaller than 196, a round higher than 5 and has Blake Miller?
| SELECT school_club_team FROM table_name_25 WHERE pick < 196 AND round > 5 AND player = "blake miller" | sql_create_context |
CREATE TABLE table_77883 (
"Race" text,
"Circuit" text,
"Date" text,
"Pole position" text,
"Fastest lap" text,
"Winning driver" text,
"Constructor" text,
"Tyre" text,
"Report" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What circuit was the British Grand Prix?
| SELECT "Circuit" FROM table_77883 WHERE "Race" = 'british grand prix' | wikisql |
CREATE TABLE table_49721 (
"Date" text,
"Opponent" text,
"Result" text,
"Score" text,
"Record" text,
"Location" text,
"Attendance" real
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- For the game showing a final record of 0-5, what was the attendance level?
| SELECT "Attendance" FROM table_49721 WHERE "Record" = '0-5' | wikisql |
CREATE TABLE table_name_49 (
city VARCHAR,
opposition VARCHAR,
year VARCHAR,
venue VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which city held the game in Old Trafford before 1907 when the Opposition was sussex?
| SELECT city FROM table_name_49 WHERE year < 1907 AND venue = "old trafford" AND opposition = "sussex" | 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 text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
CREATE TABLE zyb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE number
)
CREATE TABLE mzb (
CLINIC_ID text,
COMP_ID text,
DATA_ID text,
DIFF_PLACE_FLG number,
FERTILITY_STS number,
FLX_MED_ORG_ID text,
HOSP_LEV number,
HOSP_STS number,
IDENTITY_CARD text,
INPT_AREA_BED text,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
CREATE TABLE qtb (
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_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SERVANT_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 从2010年2月7日到2014年5月21日内医院1521051科室涉及医疗费总额超过1941.65元的有多少?
| SELECT COUNT(*) FROM (SELECT qtb.MED_ORG_DEPT_CD FROM qtb JOIN t_kc24 ON qtb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE qtb.MED_SER_ORG_NO = '1521051' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-02-07' AND '2014-05-21' GROUP BY qtb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 1941.65 UNION SELECT gyb.MED_ORG_DEPT_CD FROM gyb JOIN t_kc24 ON gyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE gyb.MED_SER_ORG_NO = '1521051' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-02-07' AND '2014-05-21' GROUP BY gyb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 1941.65 UNION SELECT zyb.MED_ORG_DEPT_CD FROM zyb JOIN t_kc24 ON zyb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE zyb.MED_SER_ORG_NO = '1521051' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-02-07' AND '2014-05-21' GROUP BY zyb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 1941.65 UNION SELECT mzb.MED_ORG_DEPT_CD FROM mzb JOIN t_kc24 ON mzb.MED_CLINIC_ID = t_kc24.MED_CLINIC_ID WHERE mzb.MED_SER_ORG_NO = '1521051' AND t_kc24.CLINIC_SLT_DATE BETWEEN '2010-02-07' AND '2014-05-21' GROUP BY mzb.MED_ORG_DEPT_CD HAVING SUM(t_kc24.MED_AMOUT) > 1941.65) AS T | css |
CREATE TABLE table_name_85 (
silver VARCHAR,
total VARCHAR,
bronze VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- what is the total silver when total is 30 and bronze is more than 10?
| SELECT COUNT(silver) FROM table_name_85 WHERE total = 30 AND bronze > 10 | sql_create_context |
CREATE TABLE table_203_504 (
id number,
"#" number,
"date" text,
"venue" text,
"opponent" text,
"score" text,
"result" text,
"competition" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many games were classified friendly competition ?
| SELECT COUNT(*) FROM table_203_504 WHERE "competition" = 'friendly' | squall |
CREATE TABLE table_15926991_1 (
winner_2nd VARCHAR,
time VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Which horse won with a time of 1:35.98 and what was their position?
| SELECT winner_2nd FROM table_15926991_1 WHERE time = "1:35.98" | sql_create_context |
CREATE TABLE table_61247 (
"Week 1" text,
"Week 2" text,
"Week 3" text,
"Week 4" text,
"Week 5" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who was the girl on week 5 that came after week 3's Shelly Louise?
| SELECT "Week 5" FROM table_61247 WHERE "Week 3" = 'shelly louise' | wikisql |
CREATE TABLE table_204_47 (
id number,
"outcome" text,
"no." number,
"date" text,
"tournament" text,
"surface" text,
"partner" text,
"opponents" text,
"score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- was there more clay surfaces used than hard surfaces ?
| SELECT (SELECT COUNT(*) FROM table_204_47 WHERE "surface" = 'clay') > (SELECT COUNT(*) FROM table_204_47 WHERE "surface" = 'hard') | squall |
CREATE TABLE Invoice_Items (
Invoice_Item_ID INTEGER,
Invoice_ID INTEGER,
Order_ID INTEGER,
Order_Item_ID INTEGER,
Product_ID INTEGER,
Order_Quantity INTEGER,
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Marketing_Regions (
Marketing_Region_Code CHAR(15),
Marketing_Region_Name VARCHAR(255),
Marketing_Region_Descriptrion VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Stores (
Store_ID VARCHAR(100),
Address_ID INTEGER,
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Invoices (
Invoice_ID INTEGER,
Order_ID INTEGER,
payment_method_code CHAR(15),
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255),
Order_Item_ID INTEGER
)
CREATE TABLE Performers_in_Bookings (
Order_ID INTEGER,
Performer_ID INTEGER
)
CREATE TABLE Ref_Service_Types (
Service_Type_Code CHAR(15),
Parent_Service_Type_Code CHAR(15),
Service_Type_Description VARCHAR(255)
)
CREATE TABLE Ref_Payment_Methods (
payment_method_code CHAR(10),
payment_method_description VARCHAR(80)
)
CREATE TABLE Products (
Product_ID VARCHAR(100),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Product_Description VARCHAR(255),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Services (
Service_ID INTEGER,
Service_Type_Code CHAR(15),
Workshop_Group_ID INTEGER,
Product_Description VARCHAR(255),
Product_Name VARCHAR(255),
Product_Price DECIMAL(20,4),
Other_Product_Service_Details VARCHAR(255)
)
CREATE TABLE Performers (
Performer_ID INTEGER,
Address_ID INTEGER,
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Customer_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Bookings_Services (
Order_ID INTEGER,
Product_ID INTEGER
)
CREATE TABLE Drama_Workshop_Groups (
Workshop_Group_ID INTEGER,
Address_ID INTEGER,
Currency_Code CHAR(15),
Marketing_Region_Code CHAR(15),
Store_Name VARCHAR(255),
Store_Phone VARCHAR(255),
Store_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Bookings (
Booking_ID INTEGER,
Customer_ID INTEGER,
Workshop_Group_ID VARCHAR(100),
Status_Code CHAR(15),
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Order_Items (
Order_Item_ID INTEGER,
Order_ID INTEGER,
Product_ID INTEGER,
Order_Quantity VARCHAR(288),
Other_Item_Details VARCHAR(255)
)
CREATE TABLE Addresses (
Address_ID VARCHAR(100),
Line_1 VARCHAR(255),
Line_2 VARCHAR(255),
City_Town VARCHAR(255),
State_County VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Customer_Orders (
Order_ID INTEGER,
Customer_ID INTEGER,
Store_ID INTEGER,
Order_Date DATETIME,
Planned_Delivery_Date DATETIME,
Actual_Delivery_Date DATETIME,
Other_Order_Details VARCHAR(255)
)
CREATE TABLE Clients (
Client_ID INTEGER,
Address_ID INTEGER,
Customer_Email_Address VARCHAR(255),
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Other_Details VARCHAR(255)
)
CREATE TABLE Customers (
Customer_ID VARCHAR(100),
Address_ID INTEGER,
Customer_Name VARCHAR(255),
Customer_Phone VARCHAR(255),
Customer_Email_Address VARCHAR(255),
Other_Details VARCHAR(255)
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- List the distinct payment method codes with the number of orders mad in a bar chart, list in asc by the y axis.
| SELECT payment_method_code, COUNT(*) FROM Invoices GROUP BY payment_method_code ORDER BY COUNT(*) | nvbench |
CREATE TABLE table_28138035_33 (
mens_doubles VARCHAR,
mens_singles VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many times has Ma Long won the men's singles?
| SELECT COUNT(mens_doubles) FROM table_28138035_33 WHERE mens_singles = "Ma Long" | sql_create_context |
CREATE TABLE jyjgzbb (
JYZBLSH text,
YLJGDM text,
BGDH text,
BGRQ time,
JYRQ time,
JCRGH text,
JCRXM text,
SHRGH text,
SHRXM text,
JCXMMC text,
JCZBDM text,
JCFF text,
JCZBMC text,
JCZBJGDX text,
JCZBJGDL number,
JCZBJGDW text,
SBBM text,
YQBH text,
YQMC text,
CKZFWDX text,
CKZFWXX number,
CKZFWSX number,
JLDW text
)
CREATE TABLE hz_info (
KH text,
KLX number,
YLJGDM text,
RYBH text
)
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,
ZZYSGH text,
QTJZYSGH text,
JZZDBM text,
JZZDSM text,
MZZYZDZZBM text,
MZZYZDZZMC text,
SG number,
TZ number,
TW number,
SSY number,
SZY number,
XL number,
HXPLC number,
ML number,
JLSJ time
)
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 text,
SHRXM text,
SHSJ time,
SQKS text,
SQKSMC text,
JYKSBM text,
JYKSMC text,
BGJGDM text,
BGJGMC text,
SQRQ time,
CJRQ time,
JYRQ time,
BGSJ time,
BBDM text,
BBMC text,
JYBBH text,
BBZT number,
BBCJBW text,
JSBBSJ time,
JYXMMC text,
JYXMDM text,
JYSQJGMC text,
JYJGMC text,
JSBBRQSJ time,
JYJSQM text,
JYJSGH text
)
CREATE TABLE zyjzjlb (
YLJGDM text,
JZLSH text,
MZJZLSH text,
KH text,
KLX number,
HZXM text,
WDBZ number,
RYDJSJ time,
RYTJDM number,
RYTJMC text,
JZKSDM text,
JZKSMC text,
RZBQDM text,
RZBQMC text,
RYCWH text,
CYKSDM text,
CYKSMC text,
CYBQDM text,
CYBQMC text,
CYCWH text,
ZYBMLX number,
ZYZDBM text,
ZYZDMC text,
ZYZYZDZZBM text,
ZYZYZDZZMC text,
MZBMLX number,
MZZDBM text,
MZZDMC text,
MZZYZDZZBM text,
RYSJ time,
CYSJ time,
CYZTDM number
)
CREATE TABLE person_info (
RYBH text,
XBDM number,
XBMC text,
XM text,
CSRQ time,
CSD text,
MZDM text,
MZMC text,
GJDM text,
GJMC text,
JGDM text,
JGMC text,
XLDM text,
XLMC text,
ZYLBDM text,
ZYMC text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 患者65843589的各检验科室的编码及名称在医疗就诊10463927138中分别是什么?
| SELECT JYKSBM, JYKSMC FROM jybgb WHERE JZLSH = '10463927138' | css |
CREATE TABLE lab (
labid number,
patientunitstayid number,
labname text,
labresult number,
labresulttime time
)
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,
hospitaladmitsource text,
unitadmittime time,
unitdischargetime time,
hospitaldischargetime time,
hospitaldischargestatus text
)
CREATE TABLE cost (
costid number,
uniquepid text,
patienthealthsystemstayid number,
eventtype text,
eventid number,
chargetime time,
cost number
)
CREATE TABLE intakeoutput (
intakeoutputid number,
patientunitstayid number,
cellpath text,
celllabel text,
cellvaluenumeric number,
intakeoutputtime time
)
CREATE TABLE microlab (
microlabid number,
patientunitstayid number,
culturesite text,
organism text,
culturetakentime time
)
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 medication (
medicationid number,
patientunitstayid number,
drugname text,
dosage text,
routeadmin text,
drugstarttime time,
drugstoptime time
)
CREATE TABLE allergy (
allergyid number,
patientunitstayid number,
drugname text,
allergyname text,
allergytime time
)
CREATE TABLE treatment (
treatmentid number,
patientunitstayid number,
treatmentname text,
treatmenttime time
)
CREATE TABLE diagnosis (
diagnosisid number,
patientunitstayid number,
diagnosisname text,
diagnosistime time,
icd9code text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many times does patient 006-2586 today have d5ns intake?
| SELECT COUNT(*) FROM intakeoutput WHERE intakeoutput.patientunitstayid IN (SELECT patient.patientunitstayid FROM patient WHERE patient.patienthealthsystemstayid IN (SELECT patient.patienthealthsystemstayid FROM patient WHERE patient.uniquepid = '006-2586')) AND intakeoutput.cellpath LIKE '%intake%' AND intakeoutput.celllabel = 'd5ns' AND DATETIME(intakeoutput.intakeoutputtime, 'start of day') = DATETIME(CURRENT_TIME(), 'start of day', '-0 day') | eicu |
CREATE TABLE table_name_45 (
bandwidth_included VARCHAR,
price VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is Bandwidth Included, when Price is '50 EUR'?
| SELECT bandwidth_included FROM table_name_45 WHERE price = "50 eur" | sql_create_context |
CREATE TABLE table_name_92 (
constructor VARCHAR,
rounds VARCHAR,
driver VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who constructed Gerhard Berger car that went all rounds?
| SELECT constructor FROM table_name_92 WHERE rounds = "all" AND driver = "gerhard berger" | sql_create_context |
CREATE TABLE basketball_match (
team_id number,
school_id number,
team_name text,
acc_regular_season text,
acc_percent text,
acc_home text,
acc_road text,
all_games text,
all_games_percent number,
all_home text,
all_road text,
all_neutral text
)
CREATE TABLE university (
school_id number,
school text,
location text,
founded number,
affiliation text,
enrollment number,
nickname text,
primary_conference text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the total and minimum enrollment of all schools?
| SELECT SUM(enrollment), MIN(enrollment) FROM university | spider |
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
CREATE TABLE 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 text,
gender text,
language text,
religion text,
admission_type text,
days_stay text,
insurance text,
ethnicity text,
expire_flag text,
admission_location text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE diagnoses (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- provide the number of patients whose admission type is urgent and lab test name is glucose, body fluid?
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN lab ON demographic.hadm_id = lab.hadm_id WHERE demographic.admission_type = "URGENT" AND lab.label = "Glucose, Body Fluid" | mimicsql_data |
CREATE TABLE table_204_291 (
id number,
"rank" number,
"name" text,
"nation" text,
"cp" number,
"fp" number,
"points" number,
"placings" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- which woman finished first in the 1971 world figured skating championships ?
| SELECT "name" FROM table_204_291 WHERE "rank" = 1 | squall |
CREATE TABLE ship (
Ship_ID int,
Name text,
Type text,
Nationality text,
Tonnage int
)
CREATE TABLE mission (
Mission_ID int,
Ship_ID int,
Code text,
Launched_Year int,
Location text,
Speed_knots int,
Fate text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Create a pie chart showing the number of nationality across nationality.
| SELECT Nationality, COUNT(Nationality) FROM ship GROUP BY Nationality | nvbench |
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 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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear 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
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How many patients born on or before 2126 have had a (aorto)coronary bypass of two coronary arteries procedure?
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.dod_year <= "2126.0" AND procedures.long_title = "(Aorto)coronary bypass of two coronary arteries" | mimicsql_data |
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
)
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 text,
discharge_location text,
diagnosis text,
dod text,
dob_year text,
dod_year text,
admittime text,
dischtime text,
admityear text
)
CREATE TABLE lab (
subject_id text,
hadm_id text,
itemid text,
charttime text,
flag text,
value_unit text,
label text,
fluid text
)
CREATE TABLE procedures (
subject_id text,
hadm_id text,
icd9_code text,
short_title text,
long_title text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- provide the number of patients with procedure icd9 code 9390 who had inpatient hospital discharge.
| SELECT COUNT(DISTINCT demographic.subject_id) FROM demographic INNER JOIN procedures ON demographic.hadm_id = procedures.hadm_id WHERE demographic.discharge_location = "DISC-TRAN CANCER/CHLDRN H" AND procedures.icd9_code = "9390" | mimicsql_data |
CREATE TABLE table_name_58 (
first_leg VARCHAR,
opposition VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What was the first leg score in the match against Twente?
| SELECT first_leg FROM table_name_58 WHERE opposition = "twente" | sql_create_context |
CREATE TABLE table_name_91 (
wins INTEGER,
cuts_made VARCHAR,
top_10 VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the average wins with 5 cuts and 1 in the top-10?
| SELECT AVG(wins) FROM table_name_91 WHERE cuts_made = 5 AND top_10 = 1 | sql_create_context |
CREATE TABLE Apartment_Facilities (
apt_id INTEGER,
facility_code CHAR(15)
)
CREATE TABLE Apartment_Bookings (
apt_booking_id INTEGER,
apt_id INTEGER,
guest_id INTEGER,
booking_status_code CHAR(15),
booking_start_date DATETIME,
booking_end_date DATETIME
)
CREATE TABLE Apartments (
apt_id INTEGER,
building_id INTEGER,
apt_type_code CHAR(15),
apt_number CHAR(10),
bathroom_count INTEGER,
bedroom_count INTEGER,
room_count CHAR(5)
)
CREATE TABLE Guests (
guest_id INTEGER,
gender_code CHAR(1),
guest_first_name VARCHAR(80),
guest_last_name VARCHAR(80),
date_of_birth DATETIME
)
CREATE TABLE Apartment_Buildings (
building_id INTEGER,
building_short_name CHAR(15),
building_full_name VARCHAR(80),
building_description VARCHAR(255),
building_address VARCHAR(255),
building_manager VARCHAR(50),
building_phone VARCHAR(80)
)
CREATE TABLE View_Unit_Status (
apt_id INTEGER,
apt_booking_id INTEGER,
status_date DATETIME,
available_yn BIT
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Show the number of start dates of all the apartment bookings made by guests with gender code 'Female' for each year in a bar chart.
| SELECT booking_start_date, COUNT(booking_start_date) FROM Apartment_Bookings AS T1 JOIN Guests AS T2 ON T1.guest_id = T2.guest_id WHERE T2.gender_code = "Female" | 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 number,
FLX_MED_ORG_ID text,
MED_SER_ORG_NO text,
CLINIC_TYPE text,
MED_TYPE number,
CLINIC_ID text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
INPT_AREA_BED text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
MAIN_COND_DES text,
INSU_TYPE text,
IN_HOSP_DAYS number,
MED_AMOUT number,
FERTILITY_STS number,
DATA_ID text,
SYNC_TIME time,
REIMBURSEMENT_FLG number,
HOSP_LEV number,
HOSP_STS number,
INSURED_IDENTITY number,
SERVANT_FLG text,
TRADE_TYPE number,
INSURED_STS text,
REMOTE_SETTLE_FLG text
)
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,
VAL_UNIT text,
DOSE_UNIT text,
DOSE_FORM text,
SPEC text,
USE_FRE text,
EACH_DOSAGE text,
QTY number,
UNIVALENT number,
AMOUNT number,
SELF_PAY_PRO number,
RER_SOL number,
SELF_PAY_AMO number,
UP_LIMIT_AMO number,
OVE_SELF_AMO number,
EXP_OCC_DATE time,
RECIPE_BILL_ID text,
FLX_MED_ORG_ID text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
HOSP_DOC_CD text,
HOSP_DOC_NM text,
REF_STA_FLG number,
DATA_ID text,
SYNC_TIME time,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
TRADE_TYPE number,
STA_FLG number,
STA_DATE time,
REIMBURS_TYPE number,
FXBZ number,
REMOTE_SETTLE_FLG text
)
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 number,
ILL_PAY number,
CIVIL_SUBSIDY number,
PER_SOL number,
PER_EXP number,
DATA_ID text,
SYNC_TIME time,
OUT_HOSP_DATE time,
CLINIC_ID text,
MED_TYPE number,
INSURED_STS text,
INSURED_IDENTITY number,
TRADE_TYPE number,
RECIPE_BILL_ID text,
ACCOUNT_DASH_DATE time,
ACCOUNT_DASH_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
RECEIVER_DEAL_ID text,
SENDER_REVOKE_ID text,
RECEIVER_REVOKE_ID text,
SENDER_OFFSET_ID text,
RECEIVER_OFFSET_ID text,
LAS_OVE_PAY number,
OVE_ADD_PAY number,
SUP_ADD_PAY number,
CKC102 number,
CASH_PAY number,
COM_ACC_PAY number,
ENT_ACC_PAY number,
ENT_PAY number,
COM_PAY number,
OLDC_FUND_PAY number,
SPE_FUND_PAY number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 05582791794在医疗就诊中药品764550972-i所属的三大目录类别是什么?
| SELECT DIRE_TYPE FROM t_kc22 WHERE MED_CLINIC_ID = '05582791794' AND SOC_SRT_DIRE_CD = '764550972-i' | css |
CREATE TABLE table_21732 (
"Class" text,
"Part 1" text,
"Part 2" text,
"Part 3" text,
"Part 4" text,
"Verb meaning" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the class for boten
| SELECT "Class" FROM table_21732 WHERE "Part 3" = 'boten' | wikisql |
CREATE TABLE table_203_804 (
id number,
"pos" text,
"no" number,
"driver" text,
"constructor" text,
"laps" number,
"time/retired" text,
"grid" number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- how many drivers had a total of 58 laps or more ?
| SELECT COUNT("driver") FROM table_203_804 WHERE "laps" >= 58 | squall |
CREATE TABLE table_name_72 (
december VARCHAR,
november VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Who is the December playmate with a November playmate Marlene Janssen?
| SELECT december FROM table_name_72 WHERE november = "marlene janssen" | 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 tables provided above.
-- Select the name of the products with a price less than or equal to $200, and count them by a bar chart, and could you display Name from high to low order?
| SELECT Name, COUNT(Name) FROM Products WHERE Price <= 200 GROUP BY Name ORDER BY Name DESC | nvbench |
CREATE TABLE table_name_61 (
married_filing_jointly_or_qualified_widow_er_ VARCHAR,
head_of_household VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- Name the married filing jointly or qualified widow(er) with head of household being $117,451 $190,200
| SELECT married_filing_jointly_or_qualified_widow_er_ FROM table_name_61 WHERE head_of_household = "$117,451–$190,200" | sql_create_context |
CREATE TABLE table_name_69 (
away_team VARCHAR,
home_team VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What did the away team score in the game against Richmond?
| SELECT away_team AS score FROM table_name_69 WHERE home_team = "richmond" | sql_create_context |
CREATE TABLE table_22870 (
"Outcome" text,
"Year" real,
"Championship" text,
"Surface" text,
"Partner" text,
"Opponents" text,
"Score" text
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- What is the first year she played in the french open?
| SELECT MIN("Year") FROM table_22870 WHERE "Championship" = 'French Open' | 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 text,
MED_DIRE_NM text,
MED_EXP_BILL_ID text,
MED_EXP_DET_ID text,
MED_INV_ITEM_TYPE text,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_SELF_AMO number,
PRESCRIPTION_CODE text,
PRESCRIPTION_ID text,
QTY number,
RECIPE_BILL_ID text,
REF_STA_FLG number,
REIMBURS_TYPE number,
REMOTE_SETTLE_FLG text,
RER_SOL number,
SELF_PAY_AMO number,
SELF_PAY_PRO number,
SOC_SRT_DIRE_CD text,
SOC_SRT_DIRE_NM text,
SPEC text,
STA_DATE time,
STA_FLG number,
SYNC_TIME time,
TRADE_TYPE number,
UNIVALENT number,
UP_LIMIT_AMO number,
USE_FRE text,
VAL_UNIT text
)
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,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
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,
FLX_MED_ORG_ID text,
ILL_PAY number,
INSURED_IDENTITY number,
INSURED_STS text,
INSU_TYPE text,
LAS_OVE_PAY number,
MED_AMOUT number,
MED_CLINIC_ID text,
MED_SAFE_PAY_ID text,
MED_TYPE number,
OLDC_FUND_PAY number,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
OVE_ADD_PAY number,
OVE_PAY number,
PERSON_ID text,
PER_ACC_PAY number,
PER_EXP number,
PER_SOL number,
RECEIVER_DEAL_ID text,
RECEIVER_OFFSET_ID text,
RECEIVER_REVOKE_ID text,
RECIPE_BILL_ID text,
REF_SLT_FLG number,
REIMBURS_FLG number,
SENDER_DEAL_ID text,
SENDER_OFFSET_ID text,
SENDER_REVOKE_ID text,
SPE_FUND_PAY number,
SUP_ADD_PAY number,
SYNC_TIME time,
TRADE_TYPE number
)
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,
INSU_TYPE text,
IN_DIAG_DIS_CD text,
IN_DIAG_DIS_NM text,
IN_HOSP_DATE time,
IN_HOSP_DAYS number,
MAIN_COND_DES text,
MED_AMOUT number,
MED_CLINIC_ID number,
MED_ORG_DEPT_CD text,
MED_ORG_DEPT_NM text,
MED_SER_ORG_NO text,
MED_TYPE number,
OUT_DIAG_DIS_CD text,
OUT_DIAG_DIS_NM text,
OUT_DIAG_DOC_CD text,
OUT_DIAG_DOC_NM text,
OUT_HOSP_DATE time,
OVERALL_CD_ORG text,
OVERALL_CD_PERSON text,
PERSON_AGE number,
PERSON_ID text,
PERSON_NM text,
PERSON_SEX number,
REIMBURSEMENT_FLG number,
REMOTE_SETTLE_FLG text,
SOC_SRT_CARD text,
SYNC_TIME time,
TRADE_TYPE number
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- 自二零一零年五月五日开始,截止到二零一一年一月四日,患者35830097去的是哪几家医院看病的
| SELECT COUNT(gwyjzb.MED_SER_ORG_NO) FROM gwyjzb WHERE gwyjzb.PERSON_ID = '35830097' AND gwyjzb.IN_HOSP_DATE BETWEEN '2010-05-05' AND '2011-01-04' UNION SELECT COUNT(fgwyjzb.MED_SER_ORG_NO) FROM fgwyjzb WHERE fgwyjzb.PERSON_ID = '35830097' AND fgwyjzb.IN_HOSP_DATE BETWEEN '2010-05-05' AND '2011-01-04' | css |
CREATE TABLE table_name_65 (
total VARCHAR,
to_par VARCHAR
)
-- Using valid SQLite, answer the following questions for the tables provided above.
-- How much total has a To par of +9?
| SELECT COUNT(total) FROM table_name_65 WHERE to_par = "+9" | sql_create_context |