Updated 2 days ago
    with main as (
    select
    tx_id,
    block_timestamp,
    pool_address,
    provider_address as user,
    pool_name,
    platform,
    token_a_amount_usd + token_b_amount_usd as amount_usd,
    action_type as event_name
    from
    solana.marinade.ez_liquidity_pool_actions
    )

    select
    platform,
    event_name,
    count(distinct tx_id) as transactions,
    count(distinct user) as users,
    sum(amount_usd) as volume_usd,
    avg(amount_usd) as average_amount_usd,
    count(distinct tx_id) / count(distinct block_timestamp::date) as daily_average_txns,
    count(distinct user) / count(distinct block_timestamp::date) as daily_average_users
    from
    main
    group by 1, 2
    order by platform, event_name

    Last run: 2 days ago
    PLATFORM
    EVENT_NAME
    TRANSACTIONS
    USERS
    VOLUME_USD
    AVERAGE_AMOUNT_USD
    DAILY_AVERAGE_TXNS
    DAILY_AVERAGE_USERS
    1
    meteoradeposit498243338086913395.0306142590.94932271915453.23076935.662393
    2
    meteorawithdraw418962878484148841.43173982841.04262236199144.61767830.653887
    3
    orcadeposit1860380483282084727460.7967011157.9458303760851386.27421836.011923
    4
    orcawithdraw138503264722082249657.217054616174.446019536377103.28337119.740492
    5
    raydiumdeposit423749903211565387120.01318429447.42320122925312.4992636.660767
    6
    raydiumwithdraw806981097911687999950.583334177742.6313236919259.5997058.108567
    6
    545B
    3s