I have flipped a table from horizontal into vertical using the following SQL:
max(case when role = ‘Masseuse’ then user else null end) as Masseuse_lead,
max(case when role = ‘Retail’ then user else null end) as Retail_lead
group by 1
It works, but where it falls apart is if one client has two masseuses assigned to them. In that scenario, it will only pick one of the masseuses (the max). How can I make it so that it concatenates all of that client’s masseuses and fills that field with it? I would do a group concat in sql, but not sure what to do here.
Before you ask, yes, I am new to Looker! Please advise!