Flipside TeamVolume Token Transfers Cumulative (7d)
    Updated 2024-12-04
    -- Reference queries to join with the price table by mo115, marqu https://flipsidecrypto.xyz/edit/queries/48ff41e4-68a5-421c-a83a-6f2ffde60475

    with

    t1 as (
    select
    transfers.amount as transfer_amount_token,
    transfers.mint as token_address,
    prices.symbol as token,
    (transfer_amount_token * prices.price) as transfer_amount_usd
    from solana.core.fact_transfers transfers
    inner join solana.price.ez_prices_hourly prices
    on date_trunc('hour', transfers.block_timestamp) = prices.hour
    and transfers.mint = prices.token_address
    where transfers.block_timestamp >= current_date - 8
    and transfers.block_timestamp < current_date
    )

    select
    sum(transfer_amount_usd) as total_transfer_volume_usd,
    avg(transfer_amount_usd) as avg_transfer_volume_usd
    from t1
    ;
    QueryRunArchived: QueryRun has been archived