Try this
select coalesce (PRICE_INSTORE, 0 ) + coalesce (PRICE_PICKUP, 0) + coalesce (PRICE_DELIVERY , 0) + coalesce (PRICE_SHIP , 0) /
((case when PRICE_INSTORE = null then 0 else 1 end) + (case when PRICE_PICKUP = null then 0 else 1 end) +
(case when PRICE_DELIVERY = null then 0 else 1 end) + (case when PRICE_SHIP = null then 0 else 1 end) )
from product
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…