Much simpler and more consistent SQL compilation approach