No, the best way is to use metadata
http://en.wikipedia.org/wiki/Oracle_metadata
-
Find all columns (that is trivial using metadata)
-
Construct SQL statement. select sum(a1), sum(a2)… group by b1, b2. Also trivial once you know the group by column. Group by columns are fixed
-
Execute dynamic SQL to get result. All in all is pretty trivial.
bchad
#22
Yes, that sounds pretty trivial. Is metadata now available in standard SQL, or is step zero, “migrate your database to Oracle?”
I had to urbandictionary that one.