You had me at “windowing functions.” I need to watch at least that part for sure. I have a project that is working but I bet could be done better or faster with some kind of sum-over-partition magic.
This is excellent. So thorough and starts from the basics (joins) and moves up. Well done.
On this topic, I wanted to also put in a plug for what @jkane and @NateS helped me with the other day, a brilliant way to use calculated fields to fake-pivot some values. I have a bunch of BAQs I need to go rewrite now.