clear markdown feedback
clear markdown feedback
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 3798789 fiddles created (41852 in the last week).

DECLARE @ table(x int, i int identity) INSERT @ values(7),(4),(5),(6) SELECT sum(x)FROM(SELECT*FROM @ UNION SELECT x,i+2FROM @ UNION SELECT 0,i+1FROM @)y GROUP BY i
(No column name)
7
4
12
10
5
6
 hidden batch(es)