Hi everyone. I need some help formating the output of my query. My query currently displays multiple charge items per trip in multiple rows. What I want to be able to do is display these rows in columns so that I only have one distinct row containing all the information. Please see below. Thanks in advance for everyones help.
Normally I'm terribly suspicious of posts like this... This kind of question at this time of year is almost always homework. For some weird reason I can't identify, I'm willing to give you a straight answer.
, Sum(CASE WHEN 'Shipping' = Charge THEN rate END) AS Shipping_Charge
, Sum(CASE WHEN 'FSC' = Charge THEN rate END) AS FSC
GROUP BY Trip