Rank() function Selected Non Aggregated Value must be part of the associated group

Analytics

Rank() function Selected Non Aggregated Value must be part of the associated group

Hi Everyone,

Was wondering if anyone could help me? I'm trying to write a query where one of the parts is to rank a "user session" based on their session_log_id, session_date and session_time

I've identified that this is the piece of code that is giving me the error

rank() over (
ORDER BY b.src_cre_time
) as SessionRank

The error i keep getting is "Selected Non Aggregated Value must be part of the associated group" which doesn't mean anything to me. I need to be able to order by this time field so that i can track the users path activity.

Can anyone help me out

many thanks

mike
1 REPLY
Junior Contributor

Re: Rank() function Selected Non Aggregated Value must be part of the associated group

Hi Mike,
there's probably an Aggregate/GROUP BY within your query and OLAP functions are processed *after* that.

If you still need help, please post your query...

Dieter