Rollup data from one table to a different level logic question
I have data in a table rolled up to a Group Id level. However, I need to report on it at at a cost and volumn level as it relates to a product code. I am trying to understand how to orient the logic to do this task.
I have written the code BASICALLY as below:
I need the data to rollup as a total for the first row in the select condition, but it is not doing that obviously. I just need a bump to my thinking to understand how I can do this task. I need a sinlge row for each "product_cd||priority_cd" without getting an error for a non-agragation not being part of the set error.