Comments for NTH_VALUE Analytic Function
Jim Dickson said...Tim
Are you able to explain Nth_VALUE() documenation?
1) why necessary to have prod_id in both PARTITION BY and GROUP BY?
2) why does GROUP BY require channel_id to be included?
It's not "necessary" from an analytics perspective. It was made necessary in this case because they chose to use MIN as an aggregate function, not an analytic function, which means GROUP BY becomes necessary. I think this is a bad example, for this reason.