A: 

This is the domain of report writers, or equivalent logic in a programming language.

wallyk
Yes... Printing the table with that structure is, of course, the domain of logic in the programming language.. I was just wondering if the details that should be printed in the table can be retrieved with a single query....
SpikETidE