Need help figuring out a query
I am struggling with what should be a fairly easy query but cannot seem to figure it out so any help is appreciated.
to keep it simple I will not include everything in my query here, but just where the problem seems to lie.
I am selecting so basic fields from the JOB record, and then some fields from the LEAVE_ACCRUAL.
JOB.EMPLID, LEAVE_ACCRUAL.PLAN_TYPE, LEAVE_ACCRUAL.HRS_TAKEN_YTD where LEAVE_ACCRUAL plan type is in('50','51')
so for instance I could get
EMPLID PLAN_TYPE HRS_TAKEN_YTD
000001 50 8
000001 51 16
000002 50 10
000003 51 8
So not all employees have both sick and vacation ( plan types 50 and 51)