0

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.

Dai
  • 141,631
  • 28
  • 261
  • 374
Vasu S
  • 1
  • research "pivot" query and/or "conditional aggregates" - this is not an "on demand" query builder site. Have you tried any query? did you get an error? include the query you tried and any error messages (in full) - do not use images – Paul Maxwell May 16 '23 at 01:39

0 Answers0