Moeflow dec 8
    Updated 2023-04-20
    select
    'Flow' as chain ,
    date_trunc(week , BLOCK_TIMESTAMP)::date as date ,
    COUNT(distinct tx_id) as "tot stakes",
    sum("tot stakes")over(order by date) as cum_tot_stakes,
    COUNT(distinct delegator) as "tot users",
    sum("tot users")over(order by date) as cum_tot_users,
    COUNT(distinct node_id) as "tot nodes",
    sum("tot nodes")over(order by date) as cum_tot_nodes
    from
    flow.core.ez_staking_actions
    where
    date >= '2022-01-01'
    group by date
    union all

    select
    'Near' as chain ,
    date_trunc(week , BLOCK_TIMESTAMP)::date as date ,
    COUNT(distinct TX_HASH) as "tot stakes",
    sum("tot stakes")over(order by date) as cum_tot_stakes,
    COUNT(distinct TX_SIGNER) as "tot users",
    sum("tot users")over(order by date) as cum_tot_users,
    count (distinct pool_address) as "tot nodes",
    sum("tot nodes")over(order by date) as cum_tot_nodes
    from
    near.core.dim_staking_actions where
    date >= '2022-01-01'
    group by date
    union all
    select

    'Axelar' as chain ,
    date_trunc(week , BLOCK_TIMESTAMP)::date as date ,
    COUNT(distinct tx_id) as "tot stakes",
    sum("tot stakes")over(order by date) as cum_tot_stakes,
    Run a query to Download Data