rahopokt-cumulative_mintbydate
    Updated 2023-02-24
    with allmints as (
    select
    date(block_timestamp) as block_date,
    tx_hash,
    event_inputs['from'] as from_addy,
    event_inputs['to'] as to_addy,
    event_inputs['value'] as amount
    from gnosis.core.fact_event_logs
    where contract_address = lower('0x59F9e6E5e495F2fB259963DeC5BA56CFBd5846e7')
    ),

    clean_me_up as (
    select
    date_trunc('day', block_date) as date,
    sum(amount) as amount,
    to_addy as recipient
    from allmints
    group by 1, 3
    )

    select
    date as "Date",
    amount as "Amount",
    sum(amount) over (order by date) as "Cumulative Amount ",
    recipient
    from clean_me_up
    order by date asc
    Run a query to Download Data