What's the best way to get from this input to output?
Input:
date id name info price qty
-----------------------------------------------
20140523 10036 ABC B 12 100
20140523 10036 ABC S 13 75
20140523 10034 XYZ B 22 56
20140523 10034 XYZ S 24 41
20151023 10037 PQR B 30 45
20151023 10037 PQR S 5 20
Output:
date id name b_price b_qty s_price s_qty
---------------------------------------------------------
20140523 10036 ABC 12 100 13 75
20140523 10034 XYZ 22 56 24 41
20140523 10037 PQR 30 45 5 20