My Table :

```
HEAD_ID  LINE ID  ADJUST_ID  LIST_PRICE  DISCOUNT
01       01       01         200         15
01       01       02         200         0
01       01       03         200         10
01       02       01         300         16
01       02       02         300         0
02       01       01         300         15
02       01       02         300         0
02       01       03         300         10
02       02       01         100         16
02       02       02         100         0

```

I need a sum over LIST\_PRICE group by HEAD\_ID and LINE\_ID but exclude the ADJUST\_ID. The TOTAL\_LIST\_PRICE should be the sum of all line ID from a head id but not repeated. For example : 

```
For the TOTAL_LIST_PRICE for HEAD_ID 01 is (HEAD_ID 01 LINE_ID 01) + (HEAD_ID 01 LINE_ID 02) = 200 + 300 = 500
For the TOTAL_LIST_PRICE for HEAD_ID 02 is (HEAD_ID 02 LINE_ID 01) + (HEAD_ID 02 LINE_ID 02) = 300 + 105 = 405

```

Result expected is like this :

```
HEAD_ID  LINE ID  ADJUST_ID  LIST_PRICE  DISCOUNT  TOTAL_LIST_PRICE
01       01       01         200         15        500
01       01       02         200         0         500
01       01       03         200         10        500
01       02       01         300         16        500
01       02       02         300         0         500
02       01       01         300         15        405 
02       01       02         300         0         405
02       01       03         300         10        405
02       02       01         105         16        405
02       02       02         105         0         405

```

MY query is like this -

```
SELECT head_id, line_id, adjust_id, list_price, discount,
   SUM(LIST_PRICE) OVER (PARTITION BY head_id, line_id) TOTAL_LIST_PRICE 
FROM TABLE;

```

The output - 

```
HEAD_ID  LINE ID  ADJUST_ID  LIST_PRICE  DISCOUNT  TOTAL_LIST_PRICE
01       01       01         200         15        600
01       01       02         200         0         600
01       01       03         200         10        600
01       02       01         300         16        600
01       02       02         300         0         600
02       01       01         300         15        900 
02       01       02         300         0         900
02       01       03         300         10        900
02       02       01         105         16        210
02       02       02         105         0         210

```

Is there anything I missing in the SUM OVER PARTITION? Or I'm using a wrong approach for this?

Thanks