Stuck with Sql code and need urgent response : This is how my data look like :
id 	type	times_purchased
1a	a	1
1a	a	2
1a	b	3
1a	b	4
1a	c	5
1a	b	6
2a	b	1
2a	b	2
2a	c	3
2a	a	4
2a	c	
		
and I want the new variable new_type as mentioned below, 	
			
id 	new_type	
1a	a_b_c	
2a	b_c_a	

for eg: ID = 1a,times purchased = 1 then new_type = type and it will add another type like concat (times purchased doesnot matter for next type)