i hate writing reporting code. data handling and manipulation just isn’t fun. i want to create something beautiful, something functional, something useful. and i guess i don’t find reports all that fun.
but i think i have just constructed the longest SQL query i have ever written. there has got to be a simpler way to do what i’m doing. i’m updating some code that was previously written and the code that was written before uses all of these temporary tables and it got all confusing for me. i’m sure that it’s probably easier to join against these temporary tables and views, but i decided to wrap it all in one big query. sure, it spans a couple of databases but it all works.
a 1568 byte query. 24 lines long. one query. sheesh, this is why i hate reporting.