Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Is it possible to group multiple columns individually without using union?

967955Nov 2 2012 — edited Nov 2 2012
Hi, if I have a table with a numebr of columns I want to group eg gender, nationality, age and I want to produce a summary such like:

Group Count
Male 10
Female 23
British 19
Irish 14
18 10

...
etc.

Or even better:
Group Count
Gender-Male 10
Gender-Female 23
Nationaility-British 19
Nationality-Irish 14
Age-18 10

Is this possible without using loads of unions? I just want to do this in the best, most efficient way as the table involved has >100 million rows.

Many thanks

Jen :)
This post has been answered by Frank Kulash on Nov 2 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 30 2012
Added on Nov 2 2012
4 comments
837 views