t sql cte with multiple select statements