Aggregate functions last() is not working as expected — Cloud Customer Connect
You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register
Get Started with Redwood: Oracle Cloud SCM and Purchasing

Aggregate functions last() is not working as expected

edited Jun 17, 2020 2:18PM in Reporting & Analytics for B2C Service 3 comments

Summary

last() should return last row of the data set, but it is fetching all the records.

Content

Objects : a) Incident b) CO.AuditLog (Custom Object).

Joining Relationship: 1: M (1 Incident : M AuditLog)

Requirement: New report to be developed to show only the last action performed on the incident.

CO.AuditLog has following attributes: ID, CreatedTime, FieldChanged, Value, Incident (Joining attribute)

I am trying to meet this requirement using Last() aggregate function, as per the documentation provided by oracle the syntax should be

last(expr, sort column1[, sort column2][,....]) 

For my requirement I have updated values as shown below:

Last(CO$AuditLog.ID, CO$AuditLog.CreatedTime)  - (Attached Report Defination)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!