- 3 Posts
- 12 Views
Hi Am using an expression in PS Query to extract an average retirement or resignation age for a particular year - AVG(MONTHS_BETWEEN(A.EFFDT,F.BIRTHDATE)/12). Some employees appear in the data more than once due to having multiple jobs etc. Just wondering how to adjust the expression so that it only refers to Distinct Employee ID. Thanks
I don't know if there's a way to do this within regular query, but you may want to look at Composite Query functionality.
This would allow you to create an initial query (selecting a distinct emplid and perhaps the max or min dates you are looking for) and then the composite query would be a query on top of that.