I am new to Oracle and maybe use the wrong approach here.
Current result:
Expected result:
The problem is that in my case the text "Items" appears instead of the first item for each ID instead of above it.
My query (simplified):
SELECT
CASE
WHEN ROW_NUMBER() OVER (PARTITION BY sd.ID ORDER BY sd.ITEM) = 1 THEN sd.ID
ELSE ''
END AS ID
, CASE
WHEN ROW_NUMBER() OVER (PARTITION BY sd.ID ORDER BY sd.ITEM) = 1 THEN 'Items'
ELSE sd.ITEM
END AS Details
, CASE
WHEN ROW_NUMBER() OVER (PARTITION BY sd.ID ORDER BY sd.ITEM) = 1 THEN TO_CHAR((sd.SUBTOTAL + sd.SUBTOTAL_TAX), 'FM9,990.00')
ELSE ''
END AS Total_Price
FROM
SHIP_DETAILS sd
/* ... */
Note: Total price in the screenshots above is just a placeholder to explain the content, it would just be a sum amount.
Can someone tell me what I am doing wrong here ?
Many thanks in advance for any help,
Mike