Pmisha-bmlMdxKatana.mSol
    Updated 2022-03-28
    with t1 as(select
    date_trunc('day',block_timestamp) as dt1,
    sum(INNER_INSTRUCTION:instructions[0]:parsed:info:amount/1e9) as MsolDep
    from solana.fact_events
    where block_timestamp>='2022-02-01'
    and PROGRAM_ID='1349iiGjWC7ZTbu6otFmJwztms122jEEnShKgpVnNewy'
    and INNER_INSTRUCTION:instructions[0]:parsed:info:destination='ELds55KR26LFYij54C2go84LAMVUWhkc5MpUrMo7nhkK'
    group by 1 order by 1),

    t2 as (select
    date_trunc('day',block_timestamp) as dt2,
    sum(INNER_INSTRUCTION:instructions[0]:parsed:info:amount/1e9) as MsolWith
    from solana.fact_events
    where block_timestamp>='2022-02-01'
    --and index=2
    and PROGRAM_ID='1349iiGjWC7ZTbu6otFmJwztms122jEEnShKgpVnNewy'
    and INNER_INSTRUCTION:instructions[0]:parsed:info:source='ELds55KR26LFYij54C2go84LAMVUWhkc5MpUrMo7nhkK' --withdrawMsol
    group by 1 order by 1)

    select
    t1.dt1 as dt,
    MsolDep,
    MsolWith
    from t1
    full outer join t2 on t1.dt1=t2.dt2
    Run a query to Download Data