I have some data that I'm wanting to use to determine what products every customer has opened. With this data, I'm wanting to either create a new column or multiple Columns indicating these products. For example, consider the data below.
CustomerKey ProductType
6458 Checking
6458 Savings
6458 Savings
6461 Savings
6461 IRA
For customer 6458, I'd either like to have a products column that concat his/her products like one of the ways below.
Customer Products Checking/Savings Savings/IRA
6458 Checking/Savings 1 0
6461 Savings/IRA 0 1
Is there anything I can use besides min/max around product type that will concat all of the members?
Select Customerkey, producttype
from share
group by customerkey