Hi,
I have a request table(main transaction table).
And Request history table(child table to above mentioned table).
Whenever user change status column value of main table I am adding history information in child table.
My requirement is user can change to same status multiple times,
for example let assume status called in progress. And user changed to this status 3 times so 3 history entry will be added to history table for in progress status. Now I want to fetch recently changed to in progress date.
please anyone help me on this
Hi
If want to use aggregates only then you can join both request and request history table. Sort request history table in descending order of history creation date time, so will get latest history on top. But you will get multiple records for each request. So can use group by requestIdto get single record of each request
Regards
Your History table must have created date? in that case, you can use History table aggregate and add filter condition that return the status for In Progress records and do sorting by created date desc, the current value will be the latest one (or you can use max record 1 if use aggregate)