Flipside Data ScienceBlockchain Totals
    Updated 2024-03-13
    with eth_games as (select
    'ethereum' as blockchain,
    count(distinct tx_hash) as n_tx,
    count(distinct origin_from_address) as n_users,
    n_tx/n_users as tx_per_user
    from ethereum.core.fact_token_transfers a
    inner join (select distinct address, project_name from crosschain.core.dim_labels where blockchain = 'ethereum' and label_type = 'games') b
    on a.contract_address = b.address
    where block_timestamp > current_date - {{lookback_days}}
    group by 1
    ),
    arb_games as (select
    'arbitrum' as blockchain,
    count(distinct tx_hash) as n_tx,
    count(distinct origin_from_address) as n_users,
    n_tx/n_users as tx_per_user
    from arbitrum.core.fact_token_transfers a
    inner join (select distinct address, project_name from crosschain.core.dim_labels where blockchain = 'arbitrum' and label_type = 'games') b
    on a.contract_address = b.address
    where block_timestamp > current_date - {{lookback_days}}
    group by 1
    ),
    ava_games as (select
    'avalanche' as blockchain,
    count(distinct tx_hash) as n_tx,
    count(distinct origin_from_address) as n_users,
    n_tx/n_users as tx_per_user
    from avalanche.core.fact_token_transfers a
    inner join (select distinct address, project_name from crosschain.core.dim_labels where blockchain = 'avalanche' and label_type = 'games') b
    on a.contract_address = b.address
    where block_timestamp > current_date - {{lookback_days}}
    group by 1
    ),
    base_games as (select
    'base' as blockchain,
    count(distinct tx_hash) as n_tx,
    QueryRunArchived: QueryRun has been archived