Register today for Oracle CloudWorld. October 17th - 20th, Las Vegas

Register now

Hillel Cooperman, Senior VP of User Experience Design, has a message for you on Oracle CloudWorld

Watch now
Aggregate functions first() or last() do not work 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

Aggregate functions first() or last() do not work as expected

Accepted answer
32
Views
1
Comments
edited Aug 2, 2019 7:40PM in Reporting & Analytics for B2C Service 1 comment

Summary

first() should return first value of the aggregated column, but if the value is No Value, it actually returns the next value that isn't No Value

Content

Here is how I expect the function to work. Imagine the following data set - Contact inner join with Incidents:

Contact ID Incident ID Product ID Date Created

100

1 No Value 7/1/2019
100 2 B 8/1/2019
100 3 C 9/1/2019

I only want to return data from the earliest Incident for a Contact. So I put the aggregate function in columns 2-4 like so: first( [column name], Date Created). I'm expecting the report to return all columns from the first row, but instead, I get this:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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