0xaimanDeposit Mango MAkrte
    Updated 2022-02-21

    --with a as (
    select date(block_timestamp) as date1, sum(sol_amount) as total_sol_deposited,
    sum(total_sol_deposited) OVER(ORDER BY date1 asc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW) AS cum_deposit
    from (select block_timestamp,
    inner_instruction:instructions[0]:parsed:info:amount/1000000000 as SOL_amount
    from solana.events
    Where block_timestamp::date >='2022-02-10' AND Succeeded = 'True'
    and INSTRUCTION:programId='mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68' and
    inner_instruction:instructions[0]:parsed:info:amount/1000000000 is not null
    and
    pretokenbalances[0]:mint='So11111111111111111111111111111111111111112'

    )

    group by 1 order by 1
    /*
    group by 1 order by 1
    ),

    b as (
    SELECT date(fd) as date2, count(user) as n_user, count(user)*0.035 as first_time_fee
    from (select inner_INSTRUCTION:instructions[0]:parsed:info:source as user, min(block_timestamp) as fd

    from solana.events
    Where block_timestamp::date >='2022-02-10' AND Succeeded = 'True'
    and INSTRUCTION:programId='mv3ekLzLbnVPNxjSKvqBpU3ZeZXPQdEC3bp5MDEBG68' and
    inner_instruction:instructions[0]:parsed:info:amount/1000000000 is not null

    group by 1)

    where fd>='2022-02-10'
    Run a query to Download Data