MySQL Forums
Forum List  »  Newbie

Doing a two-way summarization
Posted by: Jack Luk
Date: January 30, 2015 04:40AM

Table Cat1 Cat2 Cat3 Total
G1      1    2    3     6
G2      2    1    4     7
G3      0    3    1     4
Total   3    6    8    17

In the above table,
I can do a sum across Cats and Grouos individually
But not at the same time,
it is possible to do a two-way summarization in a single query
I am pursuing the sums of sums too at the lower right corner namely 17
How do I go about achieving this?
Thanks
Jack

Options: ReplyQuote


Subject
Written By
Posted
Doing a two-way summarization
January 30, 2015 04:40AM
February 06, 2015 04:18AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.