É possível com
GROUPING SETS
, tente isso:SELECT Name,datee,SUM (val)
FROM @t
GROUP BY
GROUPING SETS((NAME ,datee), ())
SQL Fiddle
GROUPING SETS
, tente isso:SELECT Name,datee,SUM (val)
FROM @t
GROUP BY
GROUPING SETS((NAME ,datee), ())