kiacryptoweekly info
    Updated 2022-09-23
    select
    date_trunc('week', block_timestamp) as date,
    case
    when contract_address = '0x3a58a54c066fdc0f2d55fc9c89f0415c92ebf3c4' then 'Lido: stMATIC'
    when contract_address = '0x7ed6390f38d554b8518ef30b925b46972e768af8' then 'ClayStack: csMATIC'
    when contract_address = '0x03a97594aa5ece130e2e956fc0ced2fea8ed8989' then 'Ankr: aMATICb'
    when contract_address = '0x3ad736904e9e65189c3000c7dd2c8ac8bb7cd4e3' then 'Stader: MaticX'
    else 'others'
    end as platform,
    count(distinct origin_from_address) as stakers_count,
    count(distinct tx_hash) as staking_tx_count,
    sum(staking_tx_count) over (partition by platform order by date) as cumulative_staking_tx_count,
    sum(raw_amount/1e18) as staking_amount_in_matic,
    sum(staking_amount_in_matic) over (partition by platform order by date) as cumulative_staking_amount_in_matic
    from polygon.core.fact_token_transfers
    where platform != 'others' and from_address = '0x0000000000000000000000000000000000000000'
    group by 1, 2
    Run a query to Download Data