rezarwzVolume(USD) Key Metrics
    Updated 2024-09-07
    with all_trades as (
    select
    tr1.tx_hash,
    lo.block_timestamp,
    tr1.symbol as in_token,
    tr2.symbol as out_token,
    tr1.AMOUNT_USD as amount_in,
    tr2.AMOUNT_USD as amount_out,
    lo.decoded_log:taker as taker,
    CASE
    when amount_in is not null then amount_in
    else amount_out
    end as volume_usd,
    CASE
    WHEN in_token < out_token THEN in_token || '-' || out_token
    ELSE out_token || '-' || in_token
    END AS Pairs_trade
    from
    blast.core.ez_decoded_event_logs lo
    left join blast.core.ez_token_transfers tr1 on lo.tx_hash = tr1.tx_hash
    left join blast.core.ez_token_transfers tr2 on tr1.tx_hash = tr2.tx_hash
    where
    lo.contract_address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and lo.event_name = 'OrderComplete'
    and tr1.from_Address = tr1.origin_from_address
    and tr1.to_Address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and tr2.from_Address = '0xb1a49c54192ea59b233200ea38ab56650dfb448c'
    and tr2.to_Address = tr2.origin_from_address
    ),
    last_24 as (
    SELECT
    sum(volume_usd) as last_24_vol,
    count(tx_hash) as tx_last24_vol
    FROM
    all_trades
    WHERE
    Last run: about 9 hours ago
    LAST_24_VOL
    LAST_7_D_VOL
    LAST_30_D_VOL
    ALL_TIME_VOL
    AVG_DAILY_VOL
    AVG_VOL_TX
    AVG_VOL_PER_USER
    AVG_WEEKLY_VOL
    TX_LAST24_VOL
    TX_7_D
    TX_30_D
    ALL_TX
    AVG_DAILY_TX
    AVG_TX_PER_USER
    AVG_WEEKLY_TX
    MED_DAILY_TX
    1
    12.662115771500060437.26442747584.82013406931.76648517669414.27502282111906200.88724760012488112948.79120974.49750112778.095238638.5
    1
    159B
    29s