I would also consider a computed column in a table if this is often used.
ALTER TABLE prices ADD total_price AS (price1 + price2 + price3)
Then your request
select total_price, (price4 + total_price) as total_price2 from prices
So you can apply the DRY principle ...
source share