sql - Merge two rows into single row with addition -
2 abc ds a@gmail.com 123 2000.00 1500.00 500.00 0.00 0.00 0.00 500.00 2 abc ds a@gmail.com 123 0.00 0.00 0.00 500.00 200.00 300.00 300.00 i want display single row addition of last column.
as suggested need use simple group method , decide want each of columns do.
i'm assuming want max value each column except last want sum of values. achieve need use this:
select cola, max(colb), max(colc), max(cold), max(cole), max(colf), max(colg), sum(collast) table group cola
Comments
Post a Comment