select date_trunc('day',block_timestamp) as dayt
,currency
,sum(amount) as daily_amount
,sum(daily_amount) over(partition by currency order by dayt asc)
from terra.transfer_events
where currency = 'LUNA' and
recipient = 'terra1kq2rzz6fq2q7fsu75a9g7cpzjeanmk68wplle5' -- Terra bridge Osmosis contract
-- 'terra1v0zuhlzznmz8r5csel3dtrm0pst0dmett62j6z', -- Terra bridge Secret contract
-- 'terra17nsujlwvwf4xrgawwgxqphdak2anflw5hga0zu') -- Terra bridge Injective contract
group by 1,2
--