Having to query several steps to get a "totals" result, I used a cte and I have also used a subquery with OVER (PARTITION BY) command.
Which query, the cte or the subquery with OVER (PARTITION BY) would be best to create a VIEW in order to avoid re-running all the calculations each time. Thank you!
I haven't yet created the VIEW. I am just learning how.