title: retreive underlying records from grouping
body: <p>SQL question grouping</p>
  <p>We have a table with 100 colums. (Table A)<br />
  The user has the option to aggregate data from this table using (nested) grouping and filters. (Aggregate B)<br />
  After applying the grouping and filtering (Aggregate B)  we have to post-process the individual records (Table A)  based on the groups (Aggregate B).</p>
  <p>Is there an SQL solution to retrieve the detail records of a group?</p>