Hello guys,
I would like to calculate distinct Active Employees for the last month of the year,
I have below scenario
YYYYMM EmpID Status
202212 2 0
202301 2 0
202302 2 1
202303 2 1
202212 3 1
202301 3 1
202302 3 1
202303 3 1
202212 4 0
202301 4 1
202302 4 0
202303 4 1
so the desire output will be like
YYYY EmpID Active
2022 2 0
2023 2 1
2022 3 1
2023 3 1
2022 4 0
2023 4 1
so i care for each year the last status of last month of the year
Any idea,
Thank you
User | Count |
---|---|
63 | |
28 | |
23 | |
23 | |
22 |