I need to pivot the activity table below into a flat structure. The number of activities is unknown, but all users will have the same number of activities, with the same set of activity Ids. The activity table has the following structure with example data.
The header / column names are not need but some type of column name is. There is on group of columns (Activity,start,end,hours)
for each activity. So if there are 25 activities there would be 101 columns ((4*25)+1). If there are 50 users there would be 50 rows.
What would be the Oracle SQL to accomplish this ?