Beginner here...
This is what I'm working with.
SELECT distinct [EventId]
,[EventFromDt] as 'Outreach From Date'
,[EventCloseDt] as 'Outreach Close Date'
,[EventSummaryTxt] as 'Outreach Program'
,[IssuerMemberId]
,[BirthDt] as 'Birth Date'
,[FirstNameTxt] as 'First Name'
,[LastNameTxt] as 'Last Name'
,[GenderTxt] as 'Gender'
,[AffiliationGroupCd] 'Master Group Number'
,[AffiliationGroupTxt] 'Master Group Name'
,cc.[GroupId]
,cc.[GroupLevel1Id]
,gp.GroupLevel1NameTxt as 'Group Name'
,[EventReviewTypeTxt] as 'Case Management Condition'
,[DiagnosisCd1]
,[DiagnosisTxt1]
,[DiagnosisCd2]
,[DiagnosisTxt2]
,[DiagnosisCd3]
,[DiagnosisTxt3]
FROM [edw].[vwMedicalManagementCaseMgmtandOutreachSummary] cc
left join edw.DimGroup gp
on gp.groupid = cc.groupid
and gp.GroupLevel1Id = cc.GroupLevel1Id
and gp.GroupLevel2Id = cc.GroupLevel2Id
and gp.GroupLevel3Id = cc.GroupLevel3Id
where AffiliationGroupCd = '10838'
and EventFromDt > '2022-12-31' --this will need updated to '2023-12-31' after 2/1/24
and validind = 'Y'
Tripp B.
you could also change your WHERE clause to only consider the year of the EventFromDt field. Something like YEAR(EventFromDt) = 2024. The exact function call you make to extract the year will depend on what database system you're using, but the basic idea will be the same for most relational database management systems.03/20/24