sql - Raw data before each group by -
which queries should execute in order show raw data before every group row? there way that?
user receiptno price ----- ---------- ------ 876 100 877 50 **150** b 960 60 b 961 40 **100**
most database support standard group modifiers such rollup
or grouping sets
. if so, can do:
select user, receiptno, sum(price) price t group grouping sets ((user, receiptno), (user));
Comments
Post a Comment