t-sql multiple ctes