merge into using cte