I am trying out a query wherein I want only one single sum for two different rows.
select sum(holdings)
from market_data.mstar_holdings mh
inner join market_data.holder_type ht
on ht.holder_type_code = mh.mstar_security_specific_holder_type
where mstar_investment_id = 'E0USA00AY9'
and ht.adjustment_flag = true
and ht.is_consolidated =false
--group by ownership_percentage,
ht.adjustment_threshold
having ownership_percentage>ht.adjustment_threshold
Currently, in output, I am getting two records. 1000089 and 616295556 in two rows. But I want the output as 1000089+616295556 in one single row. If I comment the group by line, it is giving me error. Is there any way I'll get only one record each time summing up all holdings rows?