MLDZMNmgf8
    Updated 2023-03-14
    select
    case when block_timestamp >= '2023-02-08' THEN 'After MarginFi' else 'Before MarginFi' end as Time_gp,
    l.LABEL_TYPE as type,
    count(distinct t.signers[0]) as no_users,
    count(distinct tx_id) as no_txn,
    no_users/count(distinct date_trunc(day, block_timestamp)) as average_user_day,
    no_txn/no_users as txn_per_user
    from solana.core.fact_events t join solana.core.dim_labels l on t.PROGRAM_ID = l.address
    where l.label_subtype != 'token_contract'
    and l.LABEL_TYPE in ('defi','dex','nft')
    and l.label != 'solana'
    and t.succeeded = TRUE
    and block_timestamp>='2023-01-01'
    group by 1,2
    Run a query to Download Data