We do a <i>ton</i> of complex biz rule SQL, and CTEs are something we do dabble in today (w/ SQLite).<p>After reading this article, I think I want to push this idea a lot harder on the team. Seems there is a more elegant pattern that may emerge if you go further into this rabbit hole.