schema
stringlengths
20
14.6k
query
stringlengths
17
2.58k
question
stringlengths
8
1.06k
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] }
SELECT AVG( `<table0>`.age ) FROM `<table0>` WHERE `<table0>`.gender = "M" AND `<table0>`.insurance = "Private"
what is the average age of male patients with a private insurance policy?
<table0>[Residents_Services] { <col0>[resident_id]:[INTEGER] <col1>[service_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[property_id]:[INTEGER] <col4>[date_requested]:[DATETIME] <col5>[date_provided]:[DATETIME] <col6>[other_details]:[VARCHAR] } <table1>[Timed_Locations_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Time]:[DATETIME] <col2>[Location_Code]:[CHAR] } <table2>[Timed_Status_of_Things] { <col0>[thing_id]:[INTEGER] <col1>[Date_and_Date]:[DATETIME] <col2>[Status_of_Thing_Code]:[CHAR] } <table3>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[customer_details]:[VARCHAR] } <table4>[Services] { <col0>[service_id]:[INTEGER] <col1>[organization_id]:[INTEGER] <col2>[service_type_code]:[CHAR] <col3>[service_details]:[VARCHAR] } <table5>[Organizations] { <col0>[organization_id]:[INTEGER] <col1>[parent_organization_id]:[INTEGER] <col2>[organization_details]:[VARCHAR] } <table6>[Customer_Event_Notes] { <col0>[Customer_Event_Note_ID]:[INTEGER] <col1>[Customer_Event_ID]:[INTEGER] <col2>[service_type_code]:[CHAR] <col3>[resident_id]:[INTEGER] <col4>[property_id]:[INTEGER] <col5>[date_moved_in]:[DATETIME] } <table7>[Properties] { <col0>[property_id]:[INTEGER] <col1>[property_type_code]:[CHAR] <col2>[property_address]:[VARCHAR] <col3>[255]:[other_details] <col4>[VARCHAR]:[255] } <table8>[Customer_Events] { <col0>[Customer_Event_ID]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[property_id]:[INTEGER] <col4>[resident_id]:[INTEGER] <col5>[thing_id]:[INTEGER] } <table9>[Residents] { <col0>[resident_id]:[INTEGER] <col1>[property_id]:[INTEGER] <col2>[date_moved_in]:[DATETIME] <col3>[date_moved_out]:[DATETIME] <col4>[other_details]:[VARCHAR] } <table10>[Things] { <col0>[thing_id]:[INTEGER] <col1>[organization_id]:[INTEGER] <col2>[Type_of_Thing_Code]:[CHAR] <col3>[service_type_code]:[CHAR] <col4>[service_details]:[VARCHAR] }
SELECT organization_details, COUNT( organization_details ) FROM `<table10>` AS T1 JOIN Organizations AS T2 ON T1.organization_id = T2.organization_id GROUP BY organization_details ORDER BY organization_details
List the number of items by the details of the organization that owns it using a bar chart, rank in ascending by the organization_details.
<table0>[Donations] { <col0>[INT]:[state] <col1>[VARCHAR]:[donation_amount] <col2>[DECIMAL]:[INSERT] }
SELECT AVG( donation_amount ) as avg_donation, state FROM `<table0>` GROUP BY state;
What was the average donation amount by state?
<table0>[table_77655] { <col0>[Date]:[text] <col1>[Round]:[text] <col2>[Opponents]:[text] <col3>[text]:[Result] <col4>[u2013A]:[text] <col5>[Attendance]:[real] }
SELECT "Round" FROM `<table0>` WHERE "Opponents" = 'lille' AND "H / A" = 'h'
Which round has an Opponent of lille, and a H / A of h?
<table0>[table_60155] { <col0>[Team]:[text] <col1>[Opponent]:[text] <col2>[Score]:[text] <col3>[Venue]:[text] <col4>[Round]:[text] }
SELECT "Opponent" FROM `<table0>` WHERE "Venue" = 'toyota stadium'
Who is the opponent at toyota stadium?
<table0>[arctic_fish] { <col0>[INT]:[name] <col1>[VARCHAR]:[water_depth] <col2>[FLOAT]:[INSERT] }
SELECT MAX( water_depth ) FROM arctic_fish;
What is the maximum water depth for Arctic fish farms?
<table0>[RouteOptimization] { <col0>[INT]:[route] <col1>[VARCHAR]:[cost] <col2>[INT]:[INSERT] }
SELECT route, cost FROM `<table0>` WHERE route IN ( 'Route 6', 'Route 7' );
Display route optimization information for Route 6 and Route 7
<table0>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] } <table1>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table2>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table3>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table4>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table5>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table6>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table7>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table8>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table9>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] }
SELECT SUM( `<table9>`.cellvaluenumeric ) FROM `<table9>` WHERE `<table9>`.`<table1>`unitstayid IN ( SELECT `<table1>`.`<table1>`unitstayid FROM `<table1>` WHERE `<table1>`.`<table1>`healthsystemstayid IN ( SELECT `<table1>`.`<table1>`healthsystemstayid FROM `<table1>` WHERE `<table1>`.uniquepid = '030-21071' ) ) AND `<table9>`.celllabel = 'other meds' AND `<table9>`.cellpath LIKE '%intake%' AND DATETIME( `<table9>`.`<table9>`time, 'start of month' ) = DATETIME( CURRENT_TIME( ), 'start of month', '-1 month' ) AND STRFTIME( '%d', `<table9>`.`<table9>`time ) = '21'
exactly what is the total amount of other meds intake that patient 030-21071 has received on last month/21?
<table0>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table3>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table4>[PostTypes] { <col0>[number]:[text] } <table5>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table6>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table7>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table8>[PostHistoryTypes] { <col0>[number]:[text] } <table9>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table10>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table11>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table12>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table13>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table14>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table15>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table16>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table17>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table18>[VoteTypes] { <col0>[number]:[text] } <table19>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table20>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table21>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table22>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table23>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table24>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table25>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table26>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table27>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table28>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] }
SELECT MIN( D`<table15>`.TagName ) AS TagName, COUNT( * ) AS Count FROM `<table15>` AS S`<table15>`, Post`<table15>` AS S, Post`<table15>` AS D, `<table15>` AS D`<table15>` WHERE LOWER( S`<table15>`.TagName ) = LOWER( '##TagName:string##' ) AND S.TagId = S`<table15>`.Id AND S.PostId = D.PostId AND D`<table15>`.Id = D.TagId AND D`<table15>`.Id != S.TagId GROUP BY D`<table15>`.Id ORDER BY Count DESC, D`<table15>`.Id LIMIT 100
Tags coming most likely with your tag together.
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table2>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table3>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] }
SELECT `<table3>`.long_title, procedures.long_title FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.subject_id = "22377"
provide me the long title of diagnoses and procedure of patient with patient id 22377.
<table0>[jyjgzbb] { <col0>[BGDH]:[text] <col1>[BGRQ]:[time] <col2>[CKZFWDX]:[text] <col3>[CKZFWSX]:[number] <col4>[CKZFWXX]:[number] <col5>[JCFF]:[text] <col6>[JCRGH]:[text] <col7>[JCRXM]:[text] <col8>[JCXMMC]:[text] <col9>[JCZBDM]:[text] <col10>[JCZBJGDL]:[number] <col11>[JCZBJGDW]:[text] <col12>[JCZBJGDX]:[text] <col13>[JCZBMC]:[text] <col14>[JLDW]:[text] <col15>[JYRQ]:[time] <col16>[JYZBLSH]:[text] <col17>[SBBM]:[text] <col18>[SHRGH]:[text] <col19>[SHRXM]:[text] <col20>[YLJGDM]:[text] <col21>[YQBH]:[text] <col22>[YQMC]:[text] } <table1>[mzjzjlb] { <col0>[HXPLC]:[number] <col1>[HZXM]:[text] <col2>[JLSJ]:[time] <col3>[JZJSSJ]:[time] <col4>[JZKSBM]:[text] <col5>[JZKSMC]:[text] <col6>[JZKSRQ]:[time] <col7>[JZLSH]:[text] <col8>[JZZDBM]:[text] <col9>[JZZDSM]:[text] <col10>[JZZTDM]:[number] <col11>[JZZTMC]:[text] <col12>[text]:[KLX] <col13>[number]:[MJZH] <col14>[text]:[number] <col15>[MZZYZDZZBM]:[text] <col16>[MZZYZDZZMC]:[text] <col17>[NLS]:[number] <col18>[NLY]:[number] <col19>[QTJZYSGH]:[text] <col20>[number]:[SSY] <col21>[number]:[SZY] <col22>[number]:[number] <col23>[TXBZ]:[number] <col24>[number]:[WDBZ] <col25>[number]:[number] <col26>[YLJGDM]:[text] <col27>[ZSEBZ]:[number] <col28>[ZZBZ]:[number] <col29>[ZZYSGH]:[text] } <table2>[hz_info] { <col0>[text]:[KLX] <col1>[number]:[RYBH] <col2>[text]:[YLJGDM] } <table3>[person_info] { <col0>[CSD]:[text] <col1>[CSRQ]:[time] <col2>[GJDM]:[text] <col3>[GJMC]:[text] <col4>[JGDM]:[text] <col5>[JGMC]:[text] <col6>[MZDM]:[text] <col7>[MZMC]:[text] <col8>[RYBH]:[text] <col9>[XBDM]:[number] <col10>[XBMC]:[text] <col11>[XLDM]:[text] <col12>[XLMC]:[text] <col13>[text]:[ZYLBDM] <col14>[text]:[ZYMC] } <table4>[zyjzjlb] { <col0>[CYBQDM]:[text] <col1>[CYBQMC]:[text] <col2>[CYCWH]:[text] <col3>[CYKSDM]:[text] <col4>[CYKSMC]:[text] <col5>[CYSJ]:[time] <col6>[CYZTDM]:[number] <col7>[HZXM]:[text] <col8>[JZKSDM]:[text] <col9>[JZKSMC]:[text] <col10>[JZLSH]:[text] <col11>[text]:[KLX] <col12>[number]:[MZBMLX] <col13>[number]:[MZJZLSH] <col14>[text]:[MZZDBM] <col15>[text]:[MZZDMC] <col16>[text]:[MZZYZDZZBM] <col17>[text]:[RYCWH] <col18>[text]:[RYDJSJ] <col19>[time]:[RYSJ] <col20>[time]:[RYTJDM] <col21>[number]:[RYTJMC] <col22>[text]:[RZBQDM] <col23>[text]:[RZBQMC] <col24>[text]:[WDBZ] <col25>[number]:[YLJGDM] <col26>[text]:[ZYBMLX] <col27>[number]:[ZYZDBM] <col28>[text]:[ZYZDMC] <col29>[text]:[ZYZYZDZZBM] <col30>[text]:[ZYZYZDZZMC] } <table5>[jybgb] { <col0>[BBCJBW]:[text] <col1>[BBDM]:[text] <col2>[BBMC]:[text] <col3>[BBZT]:[number] <col4>[BGDH]:[text] <col5>[BGJGDM]:[text] <col6>[BGJGMC]:[text] <col7>[BGRGH]:[text] <col8>[BGRQ]:[time] <col9>[BGRXM]:[text] <col10>[BGSJ]:[time] <col11>[CJRQ]:[time] <col12>[JSBBRQSJ]:[time] <col13>[JSBBSJ]:[time] <col14>[JYBBH]:[text] <col15>[JYJGMC]:[text] <col16>[JYJSGH]:[text] <col17>[JYJSQM]:[text] <col18>[JYKSBM]:[text] <col19>[JYKSMC]:[text] <col20>[JYLX]:[number] <col21>[JYRQ]:[time] <col22>[JYSQJGMC]:[text] <col23>[JYXMDM]:[text] <col24>[JYXMMC]:[text] <col25>[JZLSH]:[text] <col26>[JZLSH_MZJZJLB]:[text] <col27>[JZLSH_ZYJZJLB]:[text] <col28>[JZLX]:[number] <col29>[KSBM]:[text] <col30>[KSMC]:[text] <col31>[SHRGH]:[text] <col32>[SHRXM]:[text] <col33>[SHSJ]:[time] <col34>[SQKS]:[text] <col35>[SQKSMC]:[text] <col36>[SQRGH]:[text] <col37>[SQRQ]:[time] <col38>[SQRXM]:[text] <col39>[YLJGDM]:[text] <col40>[YLJGDM_MZJZJLB]:[text] } <table6>[zyjzjlb_jybgb] { <col0>[YLJGDM_ZYJZJLB]:[text] <col1>[BGDH]:[number] <col2>[YLJGDM]:[number] }
SELECT zyjzjlb.JZLSH FROM `<table3>` JOIN hz_info JOIN zyjzjlb ON `<table3>`.RYBH = hz_info.RYBH AND hz_info.YLJGDM = zyjzjlb.YLJGDM AND hz_info.KH = zyjzjlb.KH AND hz_info.KLX = zyjzjlb.KLX WHERE `<table3>`.XM = '范寒雁' AND NOT zyjzjlb.JZLSH IN ( SELECT `<table5>`.JZLSH FROM `<table5>` WHERE `<table5>`.BGRQ >= '2016-12-24' )
范寒雁这个病人在一六年十二月二十四日以前的检验报告单是在哪些住院就诊的?查一下这些住院就诊的流水编码
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table2>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table3>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] }
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` WHERE `<table3>`.expire_flag = "0" AND `<table3>`.diagnosis = "ATRIAL SEPTAL DEFECT\MITRAL VALVE REPLACEMENT;REPAIR ATRIAL-SEPTAL DEFECT/SDA"
how many patients whose death status is 0 and primary disease is atrial septal defect\mitral valve replacement;repair atrial-septal defect/sda?
<table0>[university] { <col0>[School_ID]:[int] <col1>[School]:[text] <col2>[Location]:[text] <col3>[Founded]:[real] <col4>[Affiliation]:[text] <col5>[Enrollment]:[real] <col6>[Nickname]:[text] <col7>[Primary_conference]:[text] } <table1>[basketball_match] { <col0>[Team_ID]:[int] <col1>[School_ID]:[int] <col2>[Team_Name]:[text] <col3>[ACC_Regular_Season]:[text] <col4>[ACC_Percent]:[text] <col5>[ACC_Home]:[text] <col6>[ACC_Road]:[text] <col7>[All_Games]:[text] <col8>[All_Games_Percent]:[int] <col9>[All_Home]:[text] <col10>[All_Road]:[text] <col11>[All_Neutral]:[text] }
SELECT Team_Name, `<col0>` FROM `<table1>` ORDER BY `<col0>` DESC
Show me about the distribution of Team_Name and Team_ID in a bar chart, could you show by the y-axis from high to low?
<table0>[table_name_40] { <col0>[democratic]:[VARCHAR] <col1>[incumbent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "christopher shays"
Who was the Democratic when then Incumbent was Christopher Shays?
<table0>[table_54937] { <col0>[Year]:[text] <col1>[Team]:[text] <col2>[Comp]:[text] <col3>[Rate]:[text] <col4>[RAtt]:[text] <col5>[RYds]:[text] <col6>[RAvg]:[text] }
SELECT "Year" FROM `<table0>` WHERE "RAtt" = '1' AND "Comp" = '49'
What year has a RAtt of 1 and a comp of 49?
<table0>[table_train_233] { <col0>[int]:[serum_bicarbonate] <col1>[int]:[language] <col2>[string]:[hemoglobin_a1c_hba1c] <col3>[float]:[creatinine_clearance_cl] <col4>[float]:[admission_blood_glucose] <col5>[int]:[urine_albumin] <col6>[int]:[ketoacidosis] <col7>[bool]:[age] <col8>[float]:[NOUSE] }
SELECT * FROM `<table0>` WHERE urine_albumin < 300 OR creatinine_clearance_cl < 300
urine albumin / creatinine < 300
<table0>[ports] { <col0>[INT]:[name] <col1>[VARCHAR]:[INSERT] } <table1>[containers] { <col0>[INT]:[weight] <col1>[INT]:[port_id] <col2>[INT]:[INSERT] }
SELECT MAX( weight ) FROM `<table1>` WHERE port_id = ( SELECT id FROM `<table0>` WHERE name = 'Hong Kong' );
What is the maximum weight of a container handled by port 'Hong Kong'?
<table0>[countrylanguage] { <col0>[LANGUAGE]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` GROUP BY `<col0>` ORDER BY COUNT( * ) DESC LIMIT 1
Which language is spoken by the largest number of countries?
<table0>[table_name_24] { <col0>[points]:[VARCHAR] <col1>[draw]:[VARCHAR] <col2>[place]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` > 3 AND `<col2>` = 3
How many points has a draw greater than 3 and 3rd place?
<table0>[musical] { <col0>[Musical_ID]:[int] <col1>[text]:[Year] <col2>[int]:[Award] <col3>[text]:[Category] <col4>[text]:[Nominee] <col5>[text]:[Result] } <table1>[actor] { <col0>[Actor_ID]:[int] <col1>[text]:[Musical_ID] <col2>[int]:[Character] <col3>[text]:[Duration] <col4>[text]:[age] }
SELECT T2.Name, COUNT( * ) FROM `<table1>` AS T1 JOIN musical AS T2 ON T1.Musical_ID = T2.Musical_ID GROUP BY T1.Musical_ID ORDER BY COUNT( * ) DESC
Show names of musicals and the number of actors who have appeared in the musicals Show bar chart, could you rank from high to low by the the total number ?
<table0>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table1>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table2>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table4>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table5>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table6>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table7>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table8>[PostHistoryTypes] { <col0>[number]:[text] } <table9>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table10>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table11>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table12>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table13>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table14>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table15>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table16>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table17>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table18>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table19>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table20>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table21>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table22>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table23>[VoteTypes] { <col0>[number]:[text] } <table24>[PostTypes] { <col0>[number]:[text] } <table25>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table26>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table27>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table28>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] }
SELECT P.Title, P.AcceptedAnswerId FROM `<table7>` AS P, PostTypes AS PT WHERE P.PostTypeId = PT.Id AND PT.Name = 'Question'
Select all posts which are questions.
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] }
SELECT `<table2>`.days_stay, `<table2>`.dischtime FROM `<table2>` WHERE `<table2>`.subject_id = "16438"
what is days of hospital stay and discharge time of subject id 16438?
<table0>[table_16815824_1] { <col0>[round1]:[VARCHAR] <col1>[team]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Great Britain"
What was Great Britain's Round 1 score?
<table0>[table_77161] { <col0>[Date]:[text] <col1>[Venue]:[text] <col2>[Score]:[text] <col3>[Result]:[text] <col4>[Competition]:[text] }
SELECT "Score" FROM `<table0>` WHERE "Competition" = 'fifa world cup 1986 qualifying'
What is the Score of the Fifa World Cup 1986 Qualifying Competition?
<table0>[table_203_522] { <col0>[number]:[week] <col1>[number]:[date] <col2>[text]:[opponent] <col3>[text]:[results] <col4>[nfinal]:[score] <col5>[text]:[results] <col6>[nteam]:[record] <col7>[text]:[venue] <col8>[text]:[attendance] }
SELECT "opponent" FROM `<table0>` ORDER BY "attendance" DESC LIMIT 1
against which opponent was there the greatest attendance ?
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T2.Headquarter, T1.Code FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY T2.Headquarter ORDER BY T2.Headquarter
For those records from the products and each product's manufacturer, draw a bar chart about the distribution of headquarter and the average of code , and group by attribute headquarter, and order from low to high by the bar.
<table0>[table_name_75] { <col0>[losses]:[INTEGER] <col1>[goals_against]:[VARCHAR] <col2>[draws]:[VARCHAR] <col3>[club]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col2>` > 6 AND `<col3>` = "cd mestalla" AND `<col1>` > 44
Which Losses have Draws larger than 6, and a Club of cd mestalla, and Goals against larger than 44?
<table0>[song] { <col0>[Singer_ID]:[VARCHAR] } <table1>[singer] { <col0>[VARCHAR]:[Singer_ID] }
SELECT T1.Name FROM `<table1>` AS T1 JOIN song AS T2 ON T1.Singer_ID = T2.Singer_ID GROUP BY T1.Name HAVING COUNT( * ) > 1
Show the names of singers that have more than one song.
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] }
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN procedures ON `<table0>`.hadm_id = procedures.hadm_id WHERE `<table0>`.admityear < "2151" AND procedures.short_title = "Suture bladder lacerat"
what is the number of patients whose admission year is less than 2151 and procedure short title is suture bladder lacerat?
<table0>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table1>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table2>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table3>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table4>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table5>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table6>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table7>[PostTypes] { <col0>[number]:[text] } <table8>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table9>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table10>[VoteTypes] { <col0>[number]:[text] } <table11>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table12>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table13>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table14>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table15>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table16>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table17>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table18>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table19>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table20>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table21>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table22>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table23>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table24>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table25>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table26>[PostHistoryTypes] { <col0>[number]:[text] } <table27>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table28>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] }
SELECT * FROM `<table10>`
Fastest users to get to X rep. Fastest user to reach a certain rep score.
<table0>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table1>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table2>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] } <table3>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table4>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table5>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table6>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table7>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table8>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table9>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] }
SELECT AVG( `<table8>`.`<table8>`result ) FROM `<table8>` WHERE `<table8>`.`<table7>`unitstayid IN ( SELECT `<table7>`.`<table7>`unitstayid FROM `<table7>` WHERE `<table7>`.`<table7>`healthsystemstayid IN ( SELECT `<table7>`.`<table7>`healthsystemstayid FROM `<table7>` WHERE `<table7>`.uniquepid = '030-47098' ) ) AND `<table8>`.`<table8>`name = 'cortisol' AND DATETIME( `<table8>`.`<table8>`resulttime ) <= DATETIME( CURRENT_TIME( ), '-29 month' )
what is patient 030-47098's average value of cortisol until 29 months ago?
<table0>[customer_complaints] { <col0>[complaint_id]:[INT] <col1>[complaint_date]:[DATE] <col2>[complaint_type]:[VARCHAR] <col3>[255]:[state] <col4>[VARCHAR]:[255] }
DELETE FROM `<table0>` WHERE `<col2>` = 'network';
Delete all customer complaints related to network issues
<table0>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table1>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table2>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table3>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table4>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table5>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] } <table6>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table7>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table8>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table9>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] }
SELECT `<table1>`.drugstarttime FROM `<table1>` WHERE `<table1>`.`<table5>`unitstayid IN ( SELECT `<table5>`.`<table5>`unitstayid FROM `<table5>` WHERE `<table5>`.`<table5>`healthsystemstayid IN ( SELECT `<table5>`.`<table5>`healthsystemstayid FROM `<table5>` WHERE `<table5>`.uniquepid = '015-35874' AND NOT `<table5>`.hospitaldischargetime IS NULL ORDER BY `<table5>`.hospitaladmittime DESC LIMIT 1 ) ) AND `<table1>`.drugname = 'metoprolol' ORDER BY `<table1>`.drugstarttime LIMIT 1
when was the first time in their last hospital visit patient 015-35874 is prescribed metoprolol?
<table0>[table_409] { <col0>[text]:[real] <col1>[Position]:[text] <col2>[Height]:[text] <col3>[Weight]:[real] <col4>[Year]:[text] <col5>[Home]:[Town] <col6>[text]:[High] <col7>[School]:[text] }
SELECT "Height" FROM `<table0>` WHERE "Position" = 'Forward' AND "High School" = 'Crockett'
What height was the forward position at Crockett High School?
<table0>[table_30767] { <col0>[Branding]:[text] <col1>[Callsign]:[text] <col2>[Frequency]:[text] <col3>[Power]:[text] <col4>[Station]:[Type] <col5>[text]:[Location] }
SELECT "Location" FROM `<table0>` WHERE "Frequency" = '1485kHz'
Where are all the 1485khz frequency located?
<table0>[STUDENT] { <col0>[STU_NUM]:[int] <col1>[STU_LNAME]:[varchar] <col2>[STU_FNAME]:[varchar] <col3>[STU_INIT]:[varchar] <col4>[STU_DOB]:[datetime] <col5>[STU_HRS]:[int] <col6>[STU_CLASS]:[varchar] <col7>[STU_GPA]:[float] <col8>[STU_TRANSFER]:[numeric] <col9>[DEPT_CODE]:[varchar] <col10>[STU_PHONE]:[varchar] <col11>[PROF_NUM]:[int] } <table1>[ENROLL] { <col0>[CLASS_CODE]:[varchar] <col1>[STU_NUM]:[int] <col2>[ENROLL_GRADE]:[varchar] } <table2>[DEPARTMENT] { <col0>[DEPT_CODE]:[varchar] <col1>[DEPT_NAME]:[varchar] <col2>[SCHOOL_CODE]:[varchar] <col3>[EMP_NUM]:[int] <col4>[DEPT_ADDRESS]:[varchar] <col5>[DEPT_EXTENSION]:[varchar] } <table3>[CLASS] { <col0>[CLASS_CODE]:[varchar] <col1>[CRS_CODE]:[varchar] <col2>[CLASS_SECTION]:[varchar] <col3>[CLASS_TIME]:[varchar] <col4>[CLASS_ROOM]:[varchar] <col5>[PROF_NUM]:[int] } <table4>[PROFESSOR] { <col0>[EMP_NUM]:[int] <col1>[DEPT_CODE]:[varchar] <col2>[PROF_OFFICE]:[varchar] <col3>[PROF_EXTENSION]:[varchar] <col4>[PROF_HIGH_DEGREE]:[varchar] } <table5>[COURSE] { <col0>[CRS_CODE]:[varchar] <col1>[DEPT_CODE]:[varchar] <col2>[CRS_DESCRIPTION]:[varchar] <col3>[CRS_CREDIT]:[float] } <table6>[EMPLOYEE] { <col0>[EMP_NUM]:[int] <col1>[EMP_LNAME]:[varchar] <col2>[EMP_FNAME]:[varchar] <col3>[EMP_INITIAL]:[varchar] <col4>[EMP_JOBCODE]:[varchar] <col5>[EMP_HIREDATE]:[datetime] <col6>[EMP_DOB]:[datetime] }
SELECT SCHOOL_CODE, COUNT( DISTINCT `<col1>` ) FROM `<table2>` ORDER BY `<col2>`
Return a bar chart on how many departments are in each school?, display in ascending by the names.
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] }
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id INNER JOIN prescriptions ON `<table2>`.hadm_id = prescriptions.hadm_id WHERE diagnoses.icd9_code = "28860" AND prescriptions.drug_type = "ADDITIVE"
show me the number of patients who have diagnoses icd9 code 28860 along with additive type drug prescription.
<table0>[Customers] { <col0>[customer_id]:[INTEGER] <col1>[customer_first_name]:[VARCHAR] <col2>[customer_middle_initial]:[VARCHAR] <col3>[customer_last_name]:[VARCHAR] <col4>[gender]:[VARCHAR] <col5>[email_address]:[VARCHAR] <col6>[255]:[login_name] <col7>[VARCHAR]:[login_password] <col8>[VARCHAR]:[phone_number] <col9>[VARCHAR]:[255] <col10>[town_city]:[VARCHAR] <col11>[state_county_province]:[VARCHAR] <col12>[country]:[VARCHAR] } <table1>[Product_Categories] { <col0>[production_type_code]:[VARCHAR] <col1>[product_type_description]:[VARCHAR] <col2>[vat_rating]:[DECIMAL] } <table2>[Products] { <col0>[product_id]:[INTEGER] <col1>[parent_product_id]:[INTEGER] <col2>[production_type_code]:[VARCHAR] <col3>[unit_price]:[DECIMAL] <col4>[product_name]:[VARCHAR] <col5>[product_color]:[VARCHAR] <col6>[product_size]:[VARCHAR] } <table3>[Order_Items] { <col0>[order_item_id]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[product_quantity]:[VARCHAR] <col4>[other_order_item_details]:[VARCHAR] } <table4>[Orders] { <col0>[order_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_order_placed]:[DATETIME] <col3>[order_details]:[VARCHAR] } <table5>[Invoices] { <col0>[invoice_number]:[INTEGER] <col1>[order_id]:[INTEGER] <col2>[invoice_date]:[DATETIME] } <table6>[Invoice_Line_Items] { <col0>[order_item_id]:[INTEGER] <col1>[invoice_number]:[INTEGER] <col2>[product_id]:[INTEGER] <col3>[product_title]:[VARCHAR] <col4>[product_quantity]:[VARCHAR] <col5>[product_price]:[DECIMAL] <col6>[derived_product_cost]:[DECIMAL] <col7>[derived_vat_payable]:[DECIMAL] <col8>[derived_total_cost]:[DECIMAL] } <table7>[Accounts] { <col0>[account_id]:[INTEGER] <col1>[customer_id]:[INTEGER] <col2>[date_account_opened]:[DATETIME] <col3>[account_name]:[VARCHAR] <col4>[other_account_details]:[VARCHAR] } <table8>[Financial_Transactions] { <col0>[transaction_id]:[INTEGER] <col1>[account_id]:[INTEGER] <col2>[invoice_number]:[INTEGER] <col3>[transaction_type]:[VARCHAR] <col4>[transaction_date]:[DATETIME] <col5>[transaction_amount]:[DECIMAL] <col6>[transaction_comment]:[VARCHAR] <col7>[255]:[other_transaction_details] <col8>[VARCHAR]:[255] }
SELECT other_account_details, COUNT( `<col4>` ) FROM `<table7>` GROUP BY `<col4>`
Show the number of accounts in a pie chart that groups by other account details.
<table0>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table1>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table2>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] }
SELECT COUNT( DISTINCT `<table0>`.subject_id ) FROM `<table0>` INNER JOIN diagnoses ON `<table0>`.hadm_id = diagnoses.hadm_id INNER JOIN lab ON `<table0>`.hadm_id = lab.hadm_id WHERE diagnoses.short_title = "Crn ath atlg vn bps grft" AND lab."CATEGORY" = "Hematology"
provide the number of patients whose diagnoses is crn ath atlg vn bps grft and lab test category is hematology.
<table0>[table_26368963_1] { <col0>[under_13]:[VARCHAR] <col1>[under_11]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Aly Abou El Einen"
When the under-11 was Aly Abou El Einen, who was the under-13?
<table0>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table3>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] }
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.insurance = "Government" AND `<table4>`.admission_location = "EMERGENCY ROOM ADMIT"
how many government insurance patients had emergency room admission?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] }
SELECT COUNT( DISTINCT `<table2>`.subject_id ) FROM `<table2>` INNER JOIN diagnoses ON `<table2>`.hadm_id = diagnoses.hadm_id WHERE `<table2>`.admission_type = "EMERGENCY" AND diagnoses.long_title = "Transient neonatal thrombocytopenia"
among patients admitted to emergency, how many had transient neonatal thrombocytopenia?
<table0>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table3>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] } <table4>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] }
SELECT COUNT( DISTINCT `<table3>`.subject_id ) FROM `<table3>` INNER JOIN procedures ON `<table3>`.hadm_id = procedures.hadm_id WHERE `<table3>`.discharge_location = "DEAD/EXPIRED" AND procedures.short_title = "Contrast aortogram"
how many patients whose discharge location is dead/expired and procedure short title is contrast aortogram?
<table0>[table_name_38] { <col0>[date]:[VARCHAR] <col1>[round]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = 2
What is Date, when Round is "2"?
<table0>[table_2538117_2] { <col0>[type]:[VARCHAR] <col1>[founding_university]:[VARCHAR] }
SELECT COUNT( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "San Diego State University"
how many types of organization were founded in san diego state university?
<table0>[table_44082] { <col0>[School]:[text] <col1>[Conference]:[text] <col2>[Games]:[real] <col3>[Wins]:[real] <col4>[Losses]:[real] <col5>[Winning]:[Pct] }
SELECT COUNT( "Losses" ) FROM `<table0>` WHERE "Games" < '14' AND "Wins" < '3' AND "Conference" = 'maac' AND "School" = 'fairfield'
What is the total number of losses of the team with games less than 14, wins less than 3, in the Maac Conference at Fairfield School?
<table0>[table_17875] { <col0>[real]:[Player] <col1>[text]:[Height] <col2>[text]:[Position] <col3>[text]:[Year] <col4>[born]:[real] <col5>[Current]:[Club] }
SELECT "Player" FROM `<table0>` WHERE "Position" = 'Forward' AND "Current Club" = 'Real Madrid'
what's player with position being forward and current club being real madrid
<table0>[employees] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[FIRST_NAME]:[varchar] <col2>[LAST_NAME]:[varchar] <col3>[EMAIL]:[varchar] <col4>[PHONE_NUMBER]:[varchar] <col5>[HIRE_DATE]:[date] <col6>[JOB_ID]:[varchar] <col7>[SALARY]:[decimal] <col8>[COMMISSION_PCT]:[decimal] <col9>[MANAGER_ID]:[decimal] <col10>[DEPARTMENT_ID]:[decimal] } <table1>[job_history] { <col0>[EMPLOYEE_ID]:[decimal] <col1>[START_DATE]:[date] <col2>[END_DATE]:[date] <col3>[JOB_ID]:[varchar] <col4>[DEPARTMENT_ID]:[decimal] } <table2>[locations] { <col0>[LOCATION_ID]:[decimal] <col1>[STREET_ADDRESS]:[varchar] <col2>[POSTAL_CODE]:[varchar] <col3>[CITY]:[varchar] <col4>[STATE_PROVINCE]:[varchar] <col5>[COUNTRY_ID]:[varchar] } <table3>[departments] { <col0>[DEPARTMENT_ID]:[decimal] <col1>[DEPARTMENT_NAME]:[varchar] <col2>[MANAGER_ID]:[decimal] <col3>[LOCATION_ID]:[decimal] } <table4>[regions] { <col0>[REGION_ID]:[decimal] <col1>[REGION_NAME]:[varchar] } <table5>[countries] { <col0>[COUNTRY_ID]:[varchar] <col1>[COUNTRY_NAME]:[varchar] <col2>[REGION_ID]:[decimal] } <table6>[jobs] { <col0>[JOB_ID]:[varchar] <col1>[JOB_TITLE]:[varchar] <col2>[MIN_SALARY]:[decimal] <col3>[MAX_SALARY]:[decimal] }
SELECT COUNTRY_NAME, SUM( `<col0>` ) FROM `<table0>` AS T1 JOIN departments AS T2 ON T1.DEPARTMENT_ID = T2.DEPARTMENT_ID JOIN locations AS T3 ON T2.LOCATION_ID = T3.LOCATION_ID JOIN countries AS T4 ON T3.COUNTRY_ID = T4.COUNTRY_ID GROUP BY COUNTRY_NAME ORDER BY COUNTRY_NAME DESC
What are all the employee ids and the names of the countries in which they work Visualize by bar chart, and order in descending by the X.
<table0>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table1>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table2>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table3>[PostTypes] { <col0>[number]:[text] } <table4>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table5>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table6>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table7>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table8>[VoteTypes] { <col0>[number]:[text] } <table9>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table10>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table11>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table12>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table13>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table14>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table15>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table16>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table17>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table18>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table19>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table20>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table21>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table22>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table23>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table24>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table25>[PostHistoryTypes] { <col0>[number]:[text] } <table26>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table27>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table28>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] }
SELECT DISTINCT p.Id AS "post_link", p.OwnerUserId AS "user_link", p.LastActivityDate, p.CreationDate, url = 'site://posts/' + CAST( p.Id AS TEXT ) + '/revisions' FROM `<table20>` AS p JOIN PostHistory AS ph ON ( ph.PostId = p.Id ) WHERE ( ph.Text LIKE '%##word?Chebychev##%' ) AND NOT ( p.Body LIKE '%##word##%' ) ORDER BY p.LastActivityDate DESC LIMIT 100
Posts with given word in some of the past revision but not in the current one.
<table0>[farm_locations] { <col0>[location_id]:[INT] <col1>[PRIMARY]:[KEY] <col2>[location_name]:[VARCHAR] <col3>[255]:[country] <col4>[VARCHAR]:[255] <col5>[ocean]:[VARCHAR] }
CREATE TABLE farm_locations ( location_id INT PRIMARY KEY, location_name VARCHAR( 255 ), country VARCHAR( 255 ), ocean VARCHAR( 255 ) );
Create a table named 'farm_locations'
<table0>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table1>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table2>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table3>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table4>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table5>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table6>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table7>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table8>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table9>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table10>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table11>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table12>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table13>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table14>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table15>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table16>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] }
SELECT `<table11>`.admittime FROM `<table11>` WHERE `<table11>`.subject_id = 18841 AND `<table11>`.admission_location = 'emergency room admit' AND DATETIME( `<table11>`.admittime, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) ORDER BY `<table11>`.admittime LIMIT 1
when did patient 18841 get admitted to the hospital for the first time the last year via emergency room admitting?
<table0>[table_203_171] { <col0>[number]:[place] <col1>[posicion]:[number] <col2>[team]:[equipo] <col3>[text]:[played] <col4>[number]:[won] <col5>[number]:[draw] <col6>[number]:[lost] <col7>[number]:[goals] <col8>[scored]:[number] <col9>[goals]:[conceded] <col10>[number]:[dif] <col11>[number]:[points] <col12>[pts]:[number] }
SELECT COUNT( "team\n( equipo )" ) FROM `<table0>` WHERE "goals scored\n( gf )" >= 17
how many teams scored at least 17 goals ?
<table0>[table_203_577] { <col0>[number]:[tenure] <col1>[text]:[coach] <col2>[text]:[years] <col3>[number]:[record] <col4>[text]:[pct] }
SELECT "coach" FROM `<table0>` ORDER BY "years" DESC LIMIT 1
which coach had the most years as a coach ?
<table0>[Student] { <col0>[age]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col0>` = 18
How many students are age 18?
<table0>[table_24984] { <col0>[Year]:[text] <col1>[Chairman]:[text] <col2>[Artistic]:[Director] <col3>[text]:[Performance] <col4>[Liaison]:[text] <col5>[Secretary]:[text] <col6>[Business]:[manager] <col7>[text]:[Production] <col8>[Stagemanager]:[text] <col9>[Dramaturge]:[text] <col10>[Public]:[Relations] <col11>[text]:[Second] <col12>[Year]:[Rep] <col13>[text]:[Male] <col14>[Rep]:[text] }
SELECT "First/Second `<col0>` Rep." FROM `<table0>` WHERE "Performance Liaison" = 'Kira Josephson'
Who was the first/second year rep. when the performance liaison was Kira Josephson?
<table0>[table_name_35] { <col0>[position]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "adam rachel"
What position does adam rachel play?
<table0>[teams] { <col0>[INT]:[name] <col1>[TEXT]:[city] <col2>[TEXT]:[league] <col3>[TEXT]:[rank] <col4>[INT]:[INSERT] } <table1>[games] { <col0>[INT]:[home_team_id] <col1>[INT]:[away_team_id] <col2>[INT]:[points_home] <col3>[INT]:[points_away] }
SELECT MAX( GREATEST( points_home, points_away ) ) FROM `<table1>` JOIN teams ON `<table1>`.home_team_id = teams.id OR `<table1>`.away_team_id = teams.id WHERE teams.rank <= 5;
What is the highest scoring game for the top 5 NBA teams?
<table0>[crop_rainfall] { <col0>[crop_type]:[VARCHAR] <col1>[255]:[rainfall] <col2>[DECIMAL]:[record_date] <col3>[DATE]:[INSERT] }
SELECT c.crop_type, SUM( rainfall ) AS total_rainfall FROM `<table0>` c JOIN ( SELECT CURDATE( ) - INTERVAL 30 DAY AS start_date ) d ON c.record_date >= d.start_date GROUP BY c.crop_type;
Find the total rainfall for each crop type in the past 30 days.
<table0>[record] { <col0>[int]:[Result] <col1>[text]:[Swimmer_ID] <col2>[int]:[Event_ID] } <table1>[event] { <col0>[int]:[text] <col1>[Stadium_ID]:[int] <col2>[Year]:[text] } <table2>[stadium] { <col0>[int]:[name] <col1>[text]:[Capacity] <col2>[int]:[City] <col3>[text]:[Country] <col4>[text]:[Opening_year] } <table3>[swimmer] { <col0>[int]:[name] <col1>[text]:[Nationality] <col2>[text]:[meter_100] <col3>[real]:[meter_200] <col4>[text]:[meter_300] <col5>[text]:[meter_400] <col6>[text]:[meter_500] <col7>[text]:[meter_600] <col8>[text]:[meter_700] <col9>[text]:[Time] }
SELECT meter_400, meter_100 FROM `<table3>` ORDER BY meter_100
Return a bar chart about the distribution of meter_400 and meter_100 , display meter_100 in ascending order.
<table0>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table1>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table2>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table3>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table4>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] }
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` INNER JOIN diagnoses ON `<table4>`.hadm_id = diagnoses.hadm_id WHERE `<table4>`.insurance = "Medicaid" AND diagnoses.short_title = "Renal dialysis status"
give me the number of patients whose insurance is medicaid and diagnoses short title is renal dialysis status?
<table0>[fare] { <col0>[fare_id]:[INT] <col1>[DECIMAL]:[collected_date] <col2>[DATE]:[route_id] <col3>[INT]:[INSERT] } <table1>[route] { <col0>[route_id]:[INT] <col1>[name]:[TEXT] }
SELECT r.name, AVG( f.amount ) FROM `<table0>` f JOIN route r ON f.route_id = r.route_id GROUP BY f.route_id;
Find the average fare for each route
<table0>[table_18475946_2] { <col0>[rnag__mhz]:[VARCHAR] <col1>[transmitter]:[VARCHAR] }
SELECT rnag__mhz_ FROM `<table0>` WHERE `<col1>` = "Kippure"
What is the rnag for kippure transmitter?
<table0>[movie] { <col0>[movie_id]:[number] <col1>[title]:[text] <col2>[year]:[number] <col3>[director]:[text] <col4>[budget_million]:[number] <col5>[gross_worldwide]:[number] } <table1>[culture_company] { <col0>[company_name]:[text] <col1>[type]:[text] <col2>[incorporated_in]:[text] <col3>[group_equity_shareholding]:[number] <col4>[book_club_id]:[text] <col5>[movie_id]:[text] } <table2>[book_club] { <col0>[book_club_id]:[number] <col1>[year]:[number] <col2>[author_or_editor]:[text] <col3>[book_title]:[text] <col4>[publisher]:[text] <col5>[category]:[text] <col6>[result]:[text] }
SELECT category, COUNT( * ) FROM `<table2>` GROUP BY `<col5>`
How many books fall into each category?
<table0>[table_name_86] { <col0>[status]:[VARCHAR] <col1>[date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "24/11/1979"
What is the status for 24/11/1979?
<table0>[table_45277] { <col0>[Senator]:[text] <col1>[Party]:[text] <col2>[District]:[real] <col3>[Home]:[Town] <col4>[text]:[Took] <col5>[Office]:[real] }
SELECT MAX( "District" ) FROM `<table0>` WHERE "Party" = 'democratic' AND "Senator" = 'steve carriker' AND "Took Office" > '1988'
What is the district where Steve Carriker is the Democratic Senator and he took office later than 1988?
<table0>[table_23314] { <col0>[Verbs]:[text] <col1>[text]:[u00fa] <col2>[text]:[Vos] <col3>[text]:[u00c9l] <col4>[Ella]:[Usted] <col5>[text]:[Nosotros] <col6>[Nosotras]:[text] <col7>[Vosotros]:[Vosotras] <col8>[text]:[Ellos] <col9>[Ellas]:[Ustedes] }
SELECT "Yo" FROM `<table0>` WHERE "Vosotros / Vosotras" = 'moláis'
What are all the conjugated forms of the verb moler where the vosotros / vosotras is mol is for the yo tense?
<table0>[Lives_in] { <col0>[stuid]:[INTEGER] <col1>[dormid]:[INTEGER] <col2>[room_number]:[INTEGER] } <table1>[Has_amenity] { <col0>[dormid]:[INTEGER] <col1>[amenid]:[INTEGER] } <table2>[Dorm] { <col0>[dormid]:[INTEGER] <col1>[dorm_name]:[VARCHAR] <col2>[student_capacity]:[INTEGER] <col3>[gender]:[VARCHAR] } <table3>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table4>[Dorm_amenity] { <col0>[amenid]:[INTEGER] <col1>[amenity_name]:[VARCHAR] }
SELECT city_code, AVG( `<col3>` ) FROM `<table3>` GROUP BY `<col7>` ORDER BY AVG( `<col3>` ) DESC
A bar chart about what is the average age for each city and what are those cities?, and show by the Y-axis in descending please.
<table0>[table_48263] { <col0>[State]:[text] <col1>[Type]:[text] <col2>[text]:[Title] <col3>[text]:[Royal] <col4>[house]:[text] }
SELECT "State" FROM `<table0>` WHERE "From" = '830 bc'
What is State, when From is '830 BC'?
<table0>[defense_projects] { <col0>[INT]:[year] <col1>[INT]:[region] <col2>[VARCHAR]:[project_name] <col3>[VARCHAR]:[completed] <col4>[BOOLEAN]:[INSERT] }
SELECT COUNT( * ) FROM `<table0>` WHERE year = 2019 AND region = 'North America' AND completed = true;
How many defense projects were completed in the North American region in 2019?
<table0>[ImpactInvestments] { <col0>[InvestmentID]:[INT] <col1>[InvestmentAmount]:[DECIMAL] <col2>[Sector]:[VARCHAR] }
SELECT COUNT( * ) FROM `<table0>` WHERE `<col2>` = 'Renewable Energy';
How many impact investments were made in the 'Renewable Energy' sector?
<table0>[table_test_6] { <col0>[int]:[scr] <col1>[int]:[anemia] <col2>[bool]:[blood_hemoglobin] <col3>[int]:[bleeding] <col4>[int]:[hemorrhagic_diseases] <col5>[bool]:[stroke] <col6>[bool]:[blood_platelet_counts] <col7>[int]:[trauma] <col8>[bool]:[renal_disease] <col9>[bool]:[hematocrit_hct] <col10>[float]:[hepatic_disease] <col11>[bool]:[polyglobulia] <col12>[bool]:[estimated_glomerular_filtration_rate_egfr] <col13>[int]:[non_ischemic_stroke] <col14>[bool]:[surgery] <col15>[bool]:[NOUSE] }
SELECT * FROM `<table0>` WHERE bleeding = 1 OR ( trauma = 1 OR surgery = 1 OR non_ischemic_stroke = 1 )
increased risk of bleeding ( trauma, surgery or non _ ischemic stroke in last month )
<table0>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table1>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table2>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table3>[requirement] { <col0>[requirement_id]:[int] } <table4>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table5>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[int] <col11>[cares_for_students]:[int] <col12>[heavy_assignments]:[int] <col13>[respected]:[int] <col14>[participation]:[int] <col15>[heavy_reading]:[int] <col16>[tough_grader]:[int] <col17>[hilarious]:[int] <col18>[would_take_again]:[int] <col19>[good_lecture]:[int] <col20>[no_skip]:[int] } <table6>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table7>[semester] { <col0>[semester_id]:[int] } <table8>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has_discussion]:[varchar] <col11>[has_lab]:[varchar] <col12>[has_projects]:[varchar] <col13>[has_exams]:[varchar] <col14>[num_reviews]:[int] <col15>[clarity_score]:[int] <col16>[easiness_score]:[int] <col17>[helpfulness_score]:[int] } <table9>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table10>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table11>[area] { <col0>[course_id]:[int] } <table12>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table13>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[saturday]:[varchar] <col12>[sunday]:[varchar] <col13>[has_final_project]:[varchar] <col14>[has_final_exam]:[varchar] <col15>[textbook]:[varchar] <col16>[class_address]:[varchar] <col17>[allow_audit]:[varchar] } <table14>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table15>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table16>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table17>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degree]:[varchar] <col11>[minor]:[varchar] <col12>[internship]:[varchar] }
SELECT DISTINCT name, `<col3>` FROM `<table8>` WHERE `<col2>` = 'EECS' AND `<col11>` = 'N' AND `<col3>` < 400 + 100 AND `<col3>` >= 400
Which of the 400 -level classes do not have a lab component ?
<table0>[Documents_to_be_Destroyed] { <col0>[Document_ID]:[INTEGER] <col1>[Destruction_Authorised_by_Employee_ID]:[INTEGER] <col2>[Destroyed_by_Employee_ID]:[INTEGER] <col3>[Planned_Destruction_Date]:[DATETIME] <col4>[Actual_Destruction_Date]:[DATETIME] <col5>[Other_Details]:[VARCHAR] } <table1>[All_Documents] { <col0>[Document_ID]:[INTEGER] <col1>[Date_Stored]:[DATETIME] <col2>[Document_Type_Code]:[CHAR] <col3>[Document_Name]:[CHAR] <col4>[255]:[Document_Description] <col5>[CHAR]:[255] <col6>[Other_Details]:[VARCHAR] } <table2>[Ref_Locations] { <col0>[Location_Code]:[CHAR] <col1>[Location_Name]:[VARCHAR] <col2>[255]:[Location_Description] <col3>[VARCHAR]:[255] } <table3>[Employees] { <col0>[Employee_ID]:[INTEGER] <col1>[Role_Code]:[CHAR] <col2>[Employee_Name]:[VARCHAR] <col3>[255]:[Gender_MFU] <col4>[CHAR]:[Date_of_Birth] <col5>[DATETIME]:[Other_Details] <col6>[VARCHAR]:[255] } <table4>[Ref_Document_Types] { <col0>[Document_Type_Code]:[CHAR] <col1>[Document_Type_Name]:[VARCHAR] <col2>[255]:[Document_Type_Description] <col3>[VARCHAR]:[255] } <table5>[Document_Locations] { <col0>[Document_ID]:[INTEGER] <col1>[Location_Code]:[CHAR] <col2>[Date_in_Location_From]:[DATETIME] <col3>[Date_in_Locaton_To]:[DATETIME] } <table6>[Roles] { <col0>[Role_Code]:[CHAR] <col1>[Role_Name]:[VARCHAR] <col2>[255]:[Role_Description] <col3>[VARCHAR]:[255] } <table7>[Ref_Calendar] { <col0>[Calendar_Date]:[DATETIME] <col1>[Day_Number]:[INTEGER] }
SELECT Date_in_Locaton_To, COUNT( `<col3>` ) FROM `<table5>` GROUP BY `<col3>` ORDER BY `<col3>` DESC
How many documents in different ending date? Return a line chart grouping by ending date, and display in desc by the X.
<table0>[table_name_22] { <col0>[score]:[VARCHAR] <col1>[player]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "paul runyan"
What was Paul Runyan's score?
<table0>[polling_stations] { <col0>[name]:[VARCHAR] <col1>[255]:[city] <col2>[VARCHAR]:[255] <col3>[address]:[VARCHAR] <col4>[255]:[num_voters] <col5>[INT]:[INSERT] }
SELECT name, `<col3>` FROM `<table0>` WHERE city = 'Chicago' AND num_voters = ( SELECT MAX( num_voters ) FROM `<table0>` WHERE city = 'Chicago' );
What is the name and address of the polling station with the highest number of voters in the city of Chicago?
<table0>[d_labitems] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] } <table1>[microbiologyevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[charttime]:[time] <col4>[spec_type_desc]:[text] <col5>[org_name]:[text] } <table2>[d_icd_diagnoses] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] } <table3>[transfers] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[eventtype]:[text] <col5>[careunit]:[text] <col6>[wardid]:[number] <col7>[intime]:[time] <col8>[outtime]:[time] } <table4>[diagnoses_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table5>[d_items] { <col0>[row_id]:[number] <col1>[itemid]:[number] <col2>[label]:[text] <col3>[linksto]:[text] } <table6>[labevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[itemid]:[number] <col4>[charttime]:[time] <col5>[valuenum]:[number] <col6>[valueuom]:[text] } <table7>[patients] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[gender]:[text] <col3>[dob]:[time] <col4>[dod]:[time] } <table8>[outputevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] <col6>[value]:[number] } <table9>[prescriptions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[startdate]:[time] <col4>[enddate]:[time] <col5>[drug]:[text] <col6>[dose_val_rx]:[text] <col7>[dose_unit_rx]:[text] <col8>[route]:[text] } <table10>[procedures_icd] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icd9_code]:[text] <col4>[charttime]:[time] } <table11>[chartevents] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[itemid]:[number] <col5>[charttime]:[time] <col6>[valuenum]:[number] <col7>[valueuom]:[text] } <table12>[inputevents_cv] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[charttime]:[time] <col5>[itemid]:[number] } <table13>[cost] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[event_type]:[text] <col4>[event_id]:[number] <col5>[chargetime]:[time] } <table14>[icustays] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[icustay_id]:[number] <col4>[first_careunit]:[text] <col5>[last_careunit]:[text] <col6>[first_wardid]:[number] <col7>[last_wardid]:[number] <col8>[intime]:[time] <col9>[outtime]:[time] } <table15>[admissions] { <col0>[row_id]:[number] <col1>[subject_id]:[number] <col2>[hadm_id]:[number] <col3>[admittime]:[time] <col4>[dischtime]:[time] <col5>[admission_type]:[text] <col6>[admission_location]:[text] <col7>[discharge_location]:[text] <col8>[insurance]:[text] <col9>[language]:[text] <col10>[marital_status]:[text] <col11>[ethnicity]:[text] <col12>[age]:[number] } <table16>[d_icd_procedures] { <col0>[row_id]:[number] <col1>[icd9_code]:[text] <col2>[short_title]:[text] <col3>[long_title]:[text] }
SELECT COUNT( DISTINCT `<table15>`.subject_id ) FROM `<table15>` WHERE `<table15>`.hadm_id IN ( SELECT `<table9>`.hadm_id FROM `<table9>` WHERE `<table9>`.drug = 'maalox/benadryl/lidocaine' AND DATETIME( `<table9>`.startdate, 'start of year' ) = DATETIME( CURRENT_TIME( ), 'start of year', '-1 year' ) )
how many patients were prescribed with maalox/benadryl/lidocaine in the previous year?
<table0>[crime_statistics] { <col0>[crime_type]:[VARCHAR] <col1>[255]:[count] <col2>[INT]:[location] <col3>[VARCHAR]:[255] }
ALTER TABLE crime_statistics ADD COLUMN date DATE;
Alter the 'crime_statistics' table to add a column 'date'
<table0>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table1>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table2>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table3>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table4>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table5>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table6>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table7>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table8>[PostTypes] { <col0>[number]:[text] } <table9>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table10>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table11>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table12>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table13>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table14>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table15>[PostHistoryTypes] { <col0>[number]:[text] } <table16>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table17>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table18>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table19>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] } <table20>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table21>[VoteTypes] { <col0>[number]:[text] } <table22>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table23>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table24>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table25>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table26>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table27>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table28>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] }
SELECT COUNT( Id ) FROM `<table4>` WHERE ( PostTypeId = 1 AND ( Tags LIKE '%java%' ) ) AND CreationDate < '2019-3-10'
Find the # Questions that contain either tag python or javascript per month in 2019 Jan and Feb.
<table0>[paperdataset] { <col0>[paperid]:[int] <col1>[datasetid]:[int] } <table1>[field] { <col0>[fieldid]:[int] } <table2>[paperkeyphrase] { <col0>[paperid]:[int] <col1>[keyphraseid]:[int] } <table3>[dataset] { <col0>[datasetid]:[int] <col1>[datasetname]:[varchar] } <table4>[paperfield] { <col0>[fieldid]:[int] <col1>[paperid]:[int] } <table5>[keyphrase] { <col0>[keyphraseid]:[int] <col1>[keyphrasename]:[varchar] } <table6>[writes] { <col0>[paperid]:[int] <col1>[authorid]:[int] } <table7>[journal] { <col0>[journalid]:[int] <col1>[journalname]:[varchar] } <table8>[venue] { <col0>[venueid]:[int] <col1>[venuename]:[varchar] } <table9>[author] { <col0>[authorid]:[int] <col1>[authorname]:[varchar] } <table10>[paper] { <col0>[paperid]:[int] <col1>[title]:[varchar] <col2>[venueid]:[int] <col3>[year]:[int] <col4>[numciting]:[int] <col5>[numcitedby]:[int] <col6>[journalid]:[int] } <table11>[cite] { <col0>[citingpaperid]:[int] <col1>[citedpaperid]:[int] }
SELECT DISTINCT paper.paperid FROM keyphrase, paper, paperkeyphrase WHERE keyphrase.keyphrasename = 'reinforcement learning' AND paperkeyphrase.keyphraseid = keyphrase.keyphraseid AND paper.paperid = paperkeyphrase.paperid
top reinforcement learning papers
<table0>[Manufacturers] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Headquarter]:[VARCHAR] <col3>[255]:[Founder] <col4>[VARCHAR]:[255] <col5>[Revenue]:[REAL] } <table1>[Products] { <col0>[Code]:[INTEGER] <col1>[VARCHAR]:[255] <col2>[Price]:[DECIMAL] <col3>[Manufacturer]:[INTEGER] }
SELECT T1.Code, T1.Price FROM `<table1>` AS T1 JOIN Manufacturers AS T2 ON T1.Manufacturer = T2.Code GROUP BY Name
For those records from the products and each product's manufacturer, a scatter chart shows the correlation between code and price , and group by attribute name.
<table0>[Participates_in] { <col0>[stuid]:[INTEGER] <col1>[actid]:[INTEGER] } <table1>[Activity] { <col0>[actid]:[INTEGER] <col1>[activity_name]:[varchar] } <table2>[Faculty_Participates_in] { <col0>[FacID]:[INTEGER] <col1>[actid]:[INTEGER] } <table3>[Student] { <col0>[StuID]:[INTEGER] <col1>[LName]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Age]:[INTEGER] <col4>[Sex]:[VARCHAR] <col5>[Major]:[INTEGER] <col6>[Advisor]:[INTEGER] <col7>[city_code]:[VARCHAR] } <table4>[Faculty] { <col0>[FacID]:[INTEGER] <col1>[Lname]:[VARCHAR] <col2>[Fname]:[VARCHAR] <col3>[Rank]:[VARCHAR] <col4>[Sex]:[VARCHAR] <col5>[Phone]:[INTEGER] <col6>[Room]:[VARCHAR] <col7>[Building]:[VARCHAR] }
SELECT Rank, COUNT( * ) FROM `<table4>` GROUP BY `<col3>` ORDER BY COUNT( * ) DESC
How many faculty members do we have for each faculty rank Show bar chart, and sort by the Y-axis from high to low.
<table0>[table_6338] { <col0>[District]:[text] <col1>[Incumbent]:[text] <col2>[Party]:[text] <col3>[elected]:[real] <col4>[Result]:[text] }
SELECT "District" FROM `<table0>` WHERE "Result" = 'lost re-election republican gain'
result is lost re-election republican gain, what is the district?
<table0>[PostFeedback] { <col0>[number]:[PostId] <col1>[number]:[IsAnonymous] <col2>[boolean]:[VoteTypeId] <col3>[number]:[CreationDate] } <table1>[ReviewTaskTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table2>[PostLinks] { <col0>[number]:[CreationDate] <col1>[time]:[PostId] <col2>[number]:[RelatedPostId] <col3>[number]:[LinkTypeId] } <table3>[Votes] { <col0>[number]:[PostId] <col1>[number]:[VoteTypeId] <col2>[number]:[UserId] <col3>[number]:[CreationDate] <col4>[time]:[BountyAmount] } <table4>[Users] { <col0>[number]:[Reputation] <col1>[number]:[CreationDate] <col2>[time]:[DisplayName] <col3>[text]:[LastAccessDate] <col4>[time]:[WebsiteUrl] <col5>[text]:[Location] <col6>[text]:[AboutMe] <col7>[text]:[Views] <col8>[number]:[UpVotes] <col9>[number]:[DownVotes] <col10>[number]:[ProfileImageUrl] <col11>[text]:[EmailHash] <col12>[text]:[AccountId] } <table5>[Posts] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table6>[Tags] { <col0>[number]:[TagName] <col1>[text]:[Count] <col2>[number]:[ExcerptPostId] <col3>[number]:[WikiPostId] } <table7>[SuggestedEdits] { <col0>[number]:[PostId] <col1>[number]:[CreationDate] <col2>[time]:[ApprovalDate] <col3>[time]:[RejectionDate] <col4>[time]:[OwnerUserId] <col5>[number]:[Comment] <col6>[text]:[Text] <col7>[text]:[Title] <col8>[text]:[Tags] <col9>[text]:[RevisionGUID] } <table8>[ReviewRejectionReasons] { <col0>[number]:[text] <col1>[Description]:[text] <col2>[PostTypeId]:[number] } <table9>[TagSynonyms] { <col0>[number]:[SourceTagName] <col1>[text]:[TargetTagName] <col2>[text]:[CreationDate] <col3>[time]:[OwnerUserId] <col4>[number]:[AutoRenameCount] <col5>[number]:[LastAutoRename] <col6>[time]:[Score] <col7>[number]:[ApprovedByUserId] <col8>[number]:[ApprovalDate] } <table10>[PostTags] { <col0>[PostId]:[number] <col1>[TagId]:[number] } <table11>[CloseReasonTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table12>[PostHistoryTypes] { <col0>[number]:[text] } <table13>[PostNoticeTypes] { <col0>[number]:[ClassId] <col1>[number]:[text] <col2>[Body]:[text] <col3>[IsHidden]:[boolean] <col4>[Predefined]:[boolean] <col5>[PostNoticeDurationId]:[number] } <table14>[Badges] { <col0>[number]:[UserId] <col1>[number]:[text] <col2>[Date]:[time] <col3>[Class]:[number] <col4>[TagBased]:[boolean] } <table15>[CloseAsOffTopicReasonTypes] { <col0>[number]:[IsUniversal] <col1>[boolean]:[InputTitle] <col2>[text]:[MarkdownInputGuidance] <col3>[text]:[MarkdownPostOwnerGuidance] <col4>[text]:[MarkdownPrivilegedUserGuidance] <col5>[text]:[MarkdownConcensusDescription] <col6>[text]:[CreationDate] <col7>[time]:[CreationModeratorId] <col8>[number]:[ApprovalDate] <col9>[time]:[ApprovalModeratorId] <col10>[number]:[DeactivationDate] <col11>[time]:[DeactivationModeratorId] } <table16>[PostHistory] { <col0>[number]:[PostHistoryTypeId] <col1>[number]:[PostId] <col2>[number]:[RevisionGUID] <col3>[CreationDate]:[time] <col4>[UserId]:[number] <col5>[UserDisplayName]:[text] <col6>[Comment]:[text] <col7>[Text]:[text] <col8>[ContentLicense]:[text] } <table17>[PendingFlags] { <col0>[number]:[FlagTypeId] <col1>[number]:[PostId] <col2>[number]:[CreationDate] <col3>[time]:[CloseReasonTypeId] <col4>[number]:[CloseAsOffTopicReasonTypeId] <col5>[number]:[DuplicateOfQuestionId] <col6>[number]:[BelongsOnBaseHostAddress] } <table18>[PostNotices] { <col0>[number]:[PostId] <col1>[number]:[PostNoticeTypeId] <col2>[number]:[CreationDate] <col3>[time]:[DeletionDate] <col4>[time]:[ExpiryDate] <col5>[time]:[Body] <col6>[text]:[OwnerUserId] <col7>[number]:[DeletionUserId] } <table19>[ReviewTaskResultTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table20>[PostTypes] { <col0>[number]:[text] } <table21>[FlagTypes] { <col0>[number]:[text] <col1>[Description]:[text] } <table22>[PostsWithDeleted] { <col0>[number]:[PostTypeId] <col1>[number]:[AcceptedAnswerId] <col2>[number]:[ParentId] <col3>[number]:[CreationDate] <col4>[time]:[DeletionDate] <col5>[time]:[Score] <col6>[number]:[ViewCount] <col7>[number]:[Body] <col8>[text]:[OwnerUserId] <col9>[number]:[OwnerDisplayName] <col10>[text]:[LastEditorUserId] <col11>[number]:[LastEditorDisplayName] <col12>[text]:[LastEditDate] <col13>[time]:[LastActivityDate] <col14>[time]:[Title] <col15>[text]:[Tags] <col16>[text]:[AnswerCount] <col17>[number]:[CommentCount] <col18>[number]:[FavoriteCount] <col19>[number]:[ClosedDate] <col20>[time]:[CommunityOwnedDate] <col21>[time]:[ContentLicense] } <table23>[Comments] { <col0>[number]:[PostId] <col1>[number]:[Score] <col2>[number]:[Text] <col3>[text]:[CreationDate] <col4>[time]:[UserDisplayName] <col5>[text]:[UserId] <col6>[number]:[ContentLicense] } <table24>[SuggestedEditVotes] { <col0>[number]:[SuggestedEditId] <col1>[number]:[UserId] <col2>[number]:[VoteTypeId] <col3>[number]:[CreationDate] <col4>[time]:[TargetUserId] <col5>[number]:[TargetRepChange] } <table25>[VoteTypes] { <col0>[number]:[text] } <table26>[ReviewTaskStates] { <col0>[number]:[text] <col1>[Description]:[text] } <table27>[ReviewTaskResults] { <col0>[number]:[ReviewTaskId] <col1>[number]:[ReviewTaskResultTypeId] <col2>[number]:[CreationDate] <col3>[time]:[RejectionReasonId] <col4>[number]:[Comment] } <table28>[ReviewTasks] { <col0>[number]:[ReviewTaskTypeId] <col1>[number]:[CreationDate] <col2>[time]:[DeletionDate] <col3>[time]:[ReviewTaskStateId] <col4>[number]:[PostId] <col5>[number]:[SuggestedEditId] <col6>[number]:[CompletedByReviewTaskId] }
SELECT t.TagName AS "tag", rfaccepting.rep AS "from_accepting_answers" FROM `<table6>` AS t JOIN ( SELECT t.Id, SUM( CASE WHEN NOT p.AcceptedAnswerId IS NULL THEN 2 ELSE 0 END ) AS "rep" FROM `<table5>` AS p JOIN Post`<table6>` AS pt ON pt.PostId = p.Id JOIN `<table6>` AS t ON t.Id = pt.TagId WHERE p.OwnerUserId = '##UserId##' AND p.PostTypeId = 1 GROUP BY t.Id ) AS rfaccepting ON t.Id = rfaccepting.Id GROUP BY t.TagName, rfaccepting.rep
Percentage of user's total rep coming from each tag. As the title says, this grabs the percentage of rep a user earned in a given tag. Note that rep earned in tags is not mutually exclusive, so percentages are gonna exceed 100%, and total rep is gonna exceed the actual rep. This does not take into account suggested edits to tag wikis, and tag excerpts. Also does not account for the edge case of rep lost due to spam/offensive posts.
<table0>[table_name_90] { <col0>[winning_score]:[VARCHAR] <col1>[runner_s__up]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "phillip price"
What was Olazabal's winning score in the event in which Phillip Price finished 2nd?
<table0>[table_204_865] { <col0>[number]:[date] <col1>[text]:[tournament] <col2>[text]:[winner] <col3>[text]:[purse] <col4>[number]:[notes] }
SELECT SUM( "purse ( $ )" ) FROM `<table0>` WHERE "tournament" IN ( 'salta open', 'tandil open' )
what is the total purse amount for the salta open and the tandil open ?
<table0>[table_name_81] { <col0>[time]:[VARCHAR] <col1>[opponent]:[VARCHAR] <col2>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "white sox" AND `<col2>` = "63-70"
At what time was the game when they played the White Sox and had a record of 63-70?
<table0>[circular_economy] { <col0>[INT]:[PRIMARY] <col1>[KEY]:[company_name] <col2>[VARCHAR]:[255] <col3>[location]:[VARCHAR] <col4>[255]:[waste_reuse_rate] }
INSERT INTO circular_economy ( company_name, location, waste_reuse_rate ) VALUES ( 'OPQ Inc', 'Rio de Janeiro, Brazil', 0.28 );
Insert a new record into the "circular_economy" table with "company_name" as "OPQ Inc", "location" as "Rio de Janeiro, Brazil", and "waste_reuse_rate" as 0.28
<table0>[table_name_89] { <col0>[res]:[VARCHAR] <col1>[record]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "2-0"
What was the resolution of the fight when matt grice had a record of 2-0?
<table0>[table_14319023_2] { <col0>[mixed_doubles]:[VARCHAR] <col1>[girls_singles]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "Lindaweni Fanetri"
When the girls singles is lindaweni fanetri what is the mixed doubled?
<table0>[table_23394920_1] { <col0>[power_kw]:[VARCHAR] <col1>[callsign]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "DXRT-TV"
When dxrt-tv is the callsign what is the power kw?
<table0>[Clothing] { <col0>[INT]:[name] <col1>[VARCHAR]:[255] <col2>[material]:[VARCHAR] <col3>[255]:[price] <col4>[DECIMAL]:[country] <col5>[VARCHAR]:[255] }
SELECT AVG( price ) FROM `<table0>` WHERE `<col2>` IN ( 'Organic Cotton', 'Recycled Polyester' )
What is the average price of sustainable materials used in clothing production across all countries?
<table0>[property_ownership] { <col0>[property_id]:[INT] <col1>[owner_name]:[VARCHAR] <col2>[255]:[owner_type] <col3>[VARCHAR]:[255] <col4>[shares]:[FLOAT] }
DELETE FROM `<table0>` WHERE owner_type NOT IN ( 'individual', 'corporation' );
Delete records in the 'property_ownership' table where the 'owner_type' is not 'individual' or 'corporation'
<table0>[table_name_41] { <col0>[floors]:[INTEGER] <col1>[street_address]:[VARCHAR] }
SELECT MIN( `<col0>` ) FROM `<table0>` WHERE `<col1>` = "921 sw sixth avenue"
What's the least amount of floors at 921 sw sixth avenue?
<table0>[landfill_capacity_monthly] { <col0>[region]:[VARCHAR] <col1>[255]:[year] <col2>[INT]:[month] <col3>[INT]:[capacity] <col4>[FLOAT]:[INSERT] }
SELECT region, CONCAT_WS( '-', year, LPAD( month, 2, '0' ) ) AS month_year, capacity FROM landfill_capacity_monthly;
What is the landfill capacity (in m3) for each region and month?
<table0>[lab] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[itemid]:[text] <col3>[charttime]:[text] <col4>[flag]:[text] <col5>[value_unit]:[text] <col6>[label]:[text] <col7>[fluid]:[text] } <table1>[prescriptions] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icustay_id]:[text] <col3>[drug_type]:[text] <col4>[drug]:[text] <col5>[formulary_drug_cd]:[text] <col6>[route]:[text] <col7>[drug_dose]:[text] } <table2>[procedures] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table3>[diagnoses] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[icd9_code]:[text] <col3>[short_title]:[text] <col4>[long_title]:[text] } <table4>[demographic] { <col0>[subject_id]:[text] <col1>[hadm_id]:[text] <col2>[name]:[text] <col3>[marital_status]:[text] <col4>[age]:[text] <col5>[dob]:[text] <col6>[gender]:[text] <col7>[language]:[text] <col8>[religion]:[text] <col9>[admission_type]:[text] <col10>[days_stay]:[text] <col11>[insurance]:[text] <col12>[ethnicity]:[text] <col13>[expire_flag]:[text] <col14>[admission_location]:[text] <col15>[discharge_location]:[text] <col16>[diagnosis]:[text] <col17>[dod]:[text] <col18>[dob_year]:[text] <col19>[dod_year]:[text] <col20>[admittime]:[text] <col21>[dischtime]:[text] <col22>[admityear]:[text] }
SELECT COUNT( DISTINCT `<table4>`.subject_id ) FROM `<table4>` WHERE `<table4>`.diagnosis = "ACUTE SUBDURAL HEMATOMA" AND `<table4>`.age < "74"
what is the number of patients whose primary disease is acute subdural hematoma and age is less than 74?
<table0>[lab] { <col0>[labid]:[number] <col1>[patientunitstayid]:[number] <col2>[labname]:[text] <col3>[labresult]:[number] <col4>[labresulttime]:[time] } <table1>[intakeoutput] { <col0>[intakeoutputid]:[number] <col1>[patientunitstayid]:[number] <col2>[cellpath]:[text] <col3>[celllabel]:[text] <col4>[cellvaluenumeric]:[number] <col5>[intakeoutputtime]:[time] } <table2>[diagnosis] { <col0>[diagnosisid]:[number] <col1>[patientunitstayid]:[number] <col2>[diagnosisname]:[text] <col3>[diagnosistime]:[time] <col4>[icd9code]:[text] } <table3>[cost] { <col0>[costid]:[number] <col1>[uniquepid]:[text] <col2>[patienthealthsystemstayid]:[number] <col3>[eventtype]:[text] <col4>[eventid]:[number] <col5>[chargetime]:[time] } <table4>[treatment] { <col0>[treatmentid]:[number] <col1>[patientunitstayid]:[number] <col2>[treatmentname]:[text] <col3>[treatmenttime]:[time] } <table5>[vitalperiodic] { <col0>[vitalperiodicid]:[number] <col1>[patientunitstayid]:[number] <col2>[temperature]:[number] <col3>[sao2]:[number] <col4>[heartrate]:[number] <col5>[respiration]:[number] <col6>[systemicsystolic]:[number] <col7>[systemicdiastolic]:[number] <col8>[systemicmean]:[number] <col9>[observationtime]:[time] } <table6>[medication] { <col0>[medicationid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[dosage]:[text] <col4>[routeadmin]:[text] <col5>[drugstarttime]:[time] <col6>[drugstoptime]:[time] } <table7>[microlab] { <col0>[microlabid]:[number] <col1>[patientunitstayid]:[number] <col2>[culturesite]:[text] <col3>[organism]:[text] <col4>[culturetakentime]:[time] } <table8>[allergy] { <col0>[allergyid]:[number] <col1>[patientunitstayid]:[number] <col2>[drugname]:[text] <col3>[allergyname]:[text] <col4>[allergytime]:[time] } <table9>[patient] { <col0>[uniquepid]:[text] <col1>[patienthealthsystemstayid]:[number] <col2>[patientunitstayid]:[number] <col3>[gender]:[text] <col4>[age]:[text] <col5>[ethnicity]:[text] <col6>[hospitalid]:[number] <col7>[wardid]:[number] <col8>[admissionheight]:[number] <col9>[admissionweight]:[number] <col10>[dischargeweight]:[number] <col11>[hospitaladmittime]:[time] <col12>[hospitaladmitsource]:[text] <col13>[unitadmittime]:[time] <col14>[unitdischargetime]:[time] <col15>[hospitaldischargetime]:[time] <col16>[hospitaldischargestatus]:[text] }
SELECT COUNT( * ) > 0 FROM `<table2>` WHERE `<table2>`.`<table9>`unitstayid IN ( SELECT `<table9>`.`<table9>`unitstayid FROM `<table9>` WHERE `<table9>`.`<table9>`healthsystemstayid IN ( SELECT `<table9>`.`<table9>`healthsystemstayid FROM `<table9>` WHERE `<table9>`.uniquepid = '015-23047' ) ) AND `<table2>`.`<table2>`name = 'diabetes mellitus'
did patient 015-23047 have diabetes mellitus diagnosed?
<table0>[requirement] { <col0>[requirement_id]:[int] } <table1>[program_requirement] { <col0>[program_id]:[int] <col1>[category]:[varchar] <col2>[min_credit]:[int] <col3>[additional_req]:[varchar] } <table2>[course_prerequisite] { <col0>[pre_course_id]:[int] <col1>[course_id]:[int] } <table3>[jobs] { <col0>[job_id]:[int] <col1>[job_title]:[varchar] <col2>[description]:[varchar] <col3>[requirement]:[varchar] <col4>[city]:[varchar] <col5>[state]:[varchar] <col6>[country]:[varchar] <col7>[zip]:[int] } <table4>[program] { <col0>[program_id]:[int] <col1>[name]:[varchar] <col2>[college]:[varchar] <col3>[introduction]:[varchar] } <table5>[student_record] { <col0>[student_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[grade]:[varchar] <col4>[varchar]:[transfer_source] <col5>[varchar]:[earn_credit] <col6>[varchar]:[repeat_term] <col7>[varchar]:[test_id] } <table6>[student] { <col0>[student_id]:[int] <col1>[lastname]:[varchar] <col2>[firstname]:[varchar] <col3>[program_id]:[int] <col4>[declare_major]:[varchar] <col5>[total_credit]:[int] <col6>[total_gpa]:[float] <col7>[entered_as]:[varchar] <col8>[admit_term]:[int] <col9>[predicted_graduation_semester]:[int] <col10>[degree]:[varchar] <col11>[minor]:[varchar] <col12>[internship]:[varchar] } <table7>[comment_instructor] { <col0>[instructor_id]:[int] <col1>[student_id]:[int] <col2>[score]:[int] <col3>[comment_text]:[varchar] } <table8>[offering_instructor] { <col0>[offering_instructor_id]:[int] <col1>[offering_id]:[int] <col2>[instructor_id]:[int] } <table9>[course_offering] { <col0>[offering_id]:[int] <col1>[course_id]:[int] <col2>[semester]:[int] <col3>[section_number]:[int] <col4>[start_time]:[time] <col5>[end_time]:[time] <col6>[monday]:[varchar] <col7>[tuesday]:[varchar] <col8>[wednesday]:[varchar] <col9>[thursday]:[varchar] <col10>[friday]:[varchar] <col11>[saturday]:[varchar] <col12>[sunday]:[varchar] <col13>[has_final_project]:[varchar] <col14>[has_final_exam]:[varchar] <col15>[textbook]:[varchar] <col16>[class_address]:[varchar] <col17>[allow_audit]:[varchar] } <table10>[program_course] { <col0>[program_id]:[int] <col1>[course_id]:[int] <col2>[workload]:[int] <col3>[category]:[varchar] } <table11>[course] { <col0>[course_id]:[int] <col1>[name]:[varchar] <col2>[department]:[varchar] <col3>[number]:[varchar] <col4>[credits]:[varchar] <col5>[advisory_requirement]:[varchar] <col6>[enforced_requirement]:[varchar] <col7>[description]:[varchar] <col8>[num_semesters]:[int] <col9>[num_enrolled]:[int] <col10>[has_discussion]:[varchar] <col11>[has_lab]:[varchar] <col12>[has_projects]:[varchar] <col13>[has_exams]:[varchar] <col14>[num_reviews]:[int] <col15>[clarity_score]:[int] <col16>[easiness_score]:[int] <col17>[helpfulness_score]:[int] } <table12>[campus_job_id] { <col0>[int]:[student_id] <col1>[int]:[location] } <table13>[semester] { <col0>[semester_id]:[int] } <table14>[gsi] { <col0>[course_offering_id]:[int] <col1>[student_id]:[int] } <table15>[course_tags_count] { <col0>[course_id]:[int] <col1>[clear_grading]:[int] <col2>[pop_quiz]:[int] <col3>[group_projects]:[int] <col4>[inspirational]:[int] <col5>[long_lectures]:[int] <col6>[extra_credit]:[int] <col7>[few_tests]:[int] <col8>[good_feedback]:[int] <col9>[tough_tests]:[int] <col10>[heavy_papers]:[int] <col11>[cares_for_students]:[int] <col12>[heavy_assignments]:[int] <col13>[respected]:[int] <col14>[participation]:[int] <col15>[heavy_reading]:[int] <col16>[tough_grader]:[int] <col17>[hilarious]:[int] <col18>[would_take_again]:[int] <col19>[good_lecture]:[int] <col20>[no_skip]:[int] } <table16>[instructor] { <col0>[instructor_id]:[int] <col1>[name]:[varchar] <col2>[uniqname]:[varchar] } <table17>[area] { <col0>[course_id]:[int] }
SELECT DISTINCT course_offering.end_time, course_offering.start_time, semester.semester, semester.year FROM course, course_offering, semester WHERE course_offering.start_time < '12:00:00' AND course_offering.start_time >= '08:00:00' AND course.course_id = course_offering.course_id AND course.department = 'FRENCH' AND course.number = 490 AND semester.semester = 'semester0' AND semester.semester_id = course_offering.semester AND semester.year = year0
In the morning , what times are there for the FRENCH 490 course ?
<table0>[table_20967430_2] { <col0>[title]:[VARCHAR] <col1>[original_air_date]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "November 08, 1985"
Name the title that aired for november 08, 1985
<table0>[table_name_73] { <col0>[method]:[VARCHAR] <col1>[opponent]:[VARCHAR] }
SELECT `<col0>` FROM `<table0>` WHERE `<col1>` = "chris herring"
Which method took place against Chris Herring?
<table0>[table_17645] { <col0>[Branding]:[text] <col1>[Callsign]:[text] <col2>[text]:[Power] <col3>[text]:[Station] <col4>[Type]:[text] <col5>[Coverage]:[Transmitter] <col6>[site]:[text] }
SELECT "Ch. #" FROM `<table0>` WHERE "Callsign" = 'DWLJ-TV'
What is the ch# of dwlj-tv?