Reputation: 1
I'm looking to aggregate a customer journey from a eCommerce website within SQL however first I must transpose a table which currently stores each unique view of a URL as a rows with a unique primary index (the session id) and secondly an column for index number, to sequence steps taken in the journey alongside the type of page this is, aliased as a 'page type.
I'm looking to essentially transpose this table so each pageview index number is a column and the value of the column is populated with the corresponding page type value.
I've tired using CASE and TD_UNPIVOT to achieve this however had little luck.
Any suggestions?
Upvotes: 0
Views: 156