For more information, please refer to this announcement explaining best practices for getting answers to questions.
How to return only the max ID grouped by selected column (SQL)?
Summary:
Content (please ensure you mask any confidential information):
I am working on an OTBI report that uses Advanced SQL to create the analysis. The reason for using this method is specific to the type of report I am working to build, which is joining information from a pending worker relationship (worker assignment real time) with the allocated checklist table (checklist real time).
See below for code snippet.
The challenge that I have encountered is I'd like for this analysis to return or filter only the MAX "Checklist Task Details"."Allocated Task Identifier" grouped by the "Checklist Task Details"."Task Name". This is because a user could have more than one of the same task (perhaps due to their previous employment), but the report always need to look at the latest information for their checklist.