saeedmznDimension X vs Genopets over time
    Updated 2023-03-27
    with Genopets as (
    SELECT
    COUNT(DISTINCT signers[0] ) users,
    count (DISTINCT TX_ID ) num_transactions

    FROM solana.core.fact_events
    where program_id='StaKe9nb7aUjXpjpZ45o6uJBsZxj2BWCDBtjk8LCg2v'
    and SUCCEEDED = true
    ),
    Genopets_monthly as (
    SELECT date_trunc(month, BLOCK_TIMESTAMP)::date monthly ,
    COUNT(DISTINCT signers[0] ) active_users,
    count (DISTINCT TX_ID ) num_transactions ,
    sum (num_transactions) over (order by monthly) cum_transactions
    FROM solana.core.fact_events
    where program_id='StaKe9nb7aUjXpjpZ45o6uJBsZxj2BWCDBtjk8LCg2v'
    and SUCCEEDED = true
    group by 1 order by 1
    ),
    events as (
    select TX_ID
    from flow.core.fact_events
    where EVENT_CONTRACT ilike '%Dimension%'
    group by 1
    ),
    DimensionX_monthly as (
    select date_trunc(month, BLOCK_TIMESTAMP)::date monthly,
    count (DISTINCT proposer) active_users ,
    count (tx_id) num_transactions ,
    sum (num_transactions) over (order by monthly) cum_transactions
    from flow.core.fact_transactions
    where tx_id in (select tx_id from events )
    and TX_SUCCEEDED = true
    group by 1 order by 1
    )
    select 'Genopets' platform ,*
    Run a query to Download Data