If you can solve it using simple subqueries, you should solve it that way. These things tend to get complex enough without developers trying to prove their SQL skills.
The subtitle and first section of every datawarehouse standards document should be, "Everything should be kept as simple as possible."
Always keep the sanity of the run/fix maintenance coder that has to maintain your code in mind when you write it. You never know when you might run into them in a dark alley....
:-)
If you can solve it using simple subqueries, you should solve it that way. These things tend to get complex enough without developers trying to prove their SQL skills.
The subtitle and first section of every datawarehouse standards document should be, "Everything should be kept as simple as possible."
Always keep the sanity of the run/fix maintenance coder that has to maintain your code in mind when you write it. You never know when you might run into them in a dark alley....
:-)