PeopleSoft - Query Manager - Use aggregate function with MAX

115 Views Asked by At

I have a query built from 2 different tables using joins and I want to keep the records that have younger date from rows with same ID. I tried to use WHERE clause on aggregate function but learned that I cant use it in WHERE clause. I tried to set up the DateTime column as aggregate MAX and would like to use HAVING but not sure how to set it up. Once I go to Query Manager "Having" tab there is Condition1, Condition Type and Condition2 what should i set there to be. If I select for Condition1 my agregatte DateTime colum what should Condition Type and Condition2 be?

My result on my query right now looks something like thi s(see image) and I want to keep only records with red line beside it.

My Table

0

There are 0 best solutions below