How to get the below result set from mysql query. The challenge is everything is just in single table and only way to differentiate one row with another is Date field.
product_id | CREATED_STAMP | PRODUCT_PRICE_PURPOSE_ID | PRICE | SERIAL_NUMBER
10000000349098 | 2017-01-04 13:11:07 | Purchase_Price | 30 | ytre
10000000349098 | 2017-01-04 13:11:07 | MRP | 50 | ytre
10000000349098 | 2017-01-04 13:09:43 | Purchase_Price | 100 | gfr
10000000349098 | 2017-01-04 13:09:43 | MRP | 280 | gfr
Result
Product Id | SN Purchase | Price | MRP | Serial Number | Purchase Price | MRP
10000000349098 | gfr | 100 | 280 | ytre | 30 | 50