WITH Osmo_Vol_Count As (
select sum(AMOUNT/1e6) As Sum_amount, count(*) As Cnt, BLOCK_TIMESTAMP::date As Dt
from osmosis.core.fact_staking_rewards
where CURRENCY='uosmo' and BLOCK_TIMESTAMP::date >='2022-10-01'
group by Dt
)
select * from Osmo_Vol_Count order by Dt