MLDZMNTMG5
    Updated 2023-02-02
    SELECT
    date_trunc('week',a.BLOCK_TIMESTAMP) as date,
    count(distinct base64_decode_string(outcome:outcome:status:SuccessValue)) as no_proposal,
    sum(args:proposal:kind:Transfer:amount/1e24) as volume,
    avg(args:proposal:kind:Transfer:amount/1e24) as avg_volume,
    median(args:proposal:kind:Transfer:amount/1e24) as median_volume,
    sum(volume) over (order by date) as cumulative_amount
    FROM near.core.fact_actions_events_function_call a left join near.core.fact_transactions b on a.tx_hash = b.tx_hash
    join near.core.fact_receipts c on a.tx_hash = c.tx_hash
    WHERE RECEIVER_ID = 'marketing.sputnik-dao.near' and METHOD_NAME = 'add_proposal'
    group by 1
    Run a query to Download Data