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

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -