MLDZMNparcl 3 amt *
    Updated 2023-10-10
    with base as (
    select
    distinct block_timestamp,
    tx_id,
    tt.amount,
    signers [0] user,
    tt.mint
    from
    solana.core.fact_events
    join solana.core.fact_transfers tt using(tx_id)
    where
    succeeded = True
    and program_id = 'pAMMTYk2C9tAxenepGk8a1bi9JQtUdnzu3UAh7NxYcW'
    )
    select
    count(distinct tx_id) as no_txns,

    count(distinct user) as no_users,

    sum(amount) as USDC_amt,
    no_txns / no_users as tx_per_user,
    USDC_amt / no_users as usdc_per_user,
    no_txns / count(distinct block_timestamp::date) as tx_per_day,
    no_users / count(distinct block_timestamp::date) as user_per_day,
    USDC_amt / count(distinct block_timestamp::date) as usdc_per_day
    from
    base where mint='EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v'
    and BLOCK_TIMESTAMP >= current_date - {{days_back}}



    Run a query to Download Data