How to get the Employee Year Wise Depend upon Joining Resigning and Status

can you please check below link.