I have table(SALES) with data values below.
ID FACEVAL FFEE SVCAMT SALESZONE OPERATIONCD
45678 15 10 23.22 AJ87 G122
45678 17 12 13.34 AJ87 G122
Required output (HEADER to repeat only one time, LINE items with multiple lines). Header is unique row with total amount. Line item is sum of above two rows into column.
Desired output for above (SALES)table.
H 45678 AJ87 G122 90.56
L 001 FACEVAL 32
L 002 FFEE 22
L 003 SVCAMT 36.56
SQL query required to get the output.