saeedmznDimension X vs Genopets average per user
    Updated 2023-03-27
    with events as (select TX_ID
    from flow.core.fact_events
    where EVENT_CONTRACT ilike '%Dimension%'
    group by 1
    ),
    per_user as (
    select proposer user,
    count (tx_id ) num_transactions
    from flow.core.fact_transactions
    where tx_id in (select tx_id from events )
    and TX_SUCCEEDED = true
    group by 1
    ),
    Genopets as (
    SELECT
    signers[0] user,
    count (DISTINCT TX_ID ) num_transactions
    FROM solana.core.fact_events
    where program_id='StaKe9nb7aUjXpjpZ45o6uJBsZxj2BWCDBtjk8LCg2v'
    and SUCCEEDED = true
    group by 1
    )
    select 'Dimension X' platform , round (avg(num_transactions)) avg_trasnactions_per_user
    from per_user
    UNION
    select 'Genopets' platform , round (avg(num_transactions)) avg_trasnactions_per_user
    from Genopets
    Run a query to Download Data