xkageDaily / weekly / monthly
    Updated 2022-09-21
    select
    date_trunc('day',block_timestamp) as "date(day)",
    date_trunc('week',block_timestamp) as "date(week)",
    date_trunc('month',block_timestamp) as "date(month)",
    count(tx_hash) as "count of stakes",
    sum("count of stakes") over(order by "date(day)") as "cumulative count of stakes",
    count(distinct ORIGIN_FROM_ADDRESS) as "count of stakers",
    sum("count of stakers") over(order by "date(day)") as "cumulative count of stakers",
    sum(amount) as "stake volume (MATIC)",
    sum("stake volume (MATIC)") over(order by "date(day)") as "cumulative stake volume (MATIC)",
    sum(amount_usd) as "stake volume (USD)",
    sum("stake volume (USD)") over(order by "date(day)") as "cumulative stake volume (USD)",
    avg(amount) as "average stake volume (MATIC)",
    avg(amount_usd) as "average stake volume (USD)"
    from polygon.core.ez_matic_transfers a join polygon.core.dim_labels b on b.address = a.matic_to_address
    where address_name like '%staking%'
    and label_subtype = 'pool'
    and block_timestamp >= '2022-07-01'
    group by 1,2,3
    Run a query to Download Data