nitsDeposits bLUNA
    Updated 2022-03-21
    select date(block_timestamp) as day,contract_label, sum(amt_net) as net_amt_deposited , sum(net_amt_deposited ) over(partition by contract_label order by day) as cumulative_amt_deposited
    from
    (SELECT *,
    case when event_type = 'provide' then amount
    else amount*(-1) end as amt_net
    from anchor.collateral
    where contract_label = 'bLuna Custody'
    )
    GROUP by 1,2
    order by 1,2

    Run a query to Download Data