The scenario I have is as follows:
I have the following data -
ID, Name, Place, Location, GroupID
1, samename, Grand Central, New York, 12
2, samename, Opera House, Sydney, 12
3, samename, Opera House, Sydney, 12
4, name2, Emirates, London, 13
5, name3, Opera House, Sydney, 14
And I would like to output it as two tables
GroupID,Name
12, samename
13, name2
14, name3
GroupID, Place, Location
Grand Central, New York, 12
Opera House, Sydney, 12
Opera House, Sydney, 12
Emirates, London, 13
Opera House, Sydney, 14
This was really bad design that I have inherited - and I am trying to make it better.. without breaking the old code.