How to get the desired output?

General

How to get the desired output?

Input data:

product_idPrice
1100
1120
1130
2140
2150
3160
3170
3180

 

Need the ooutput as mentioed below:

Product Price
1100,120,130
2140,150
3160,170,180

 

Tried with recursive query but not able to get the exact result set. Need help