BlockTrackeroverview
    Updated 3 days ago
    with one_month_volume as (
    select
    sum(coalesce(from_amount_usd,to_amount_usd)) as one_month_volume
    from maya.defi.fact_swaps
    where block_timestamp::date > current_date - interval '1 month'
    and tx_id not in (select tx_id from maya.defi.fact_refund_events)
    )

    ,
    sevent_days_volume as (
    select
    sum(coalesce(from_amount_usd,to_amount_usd)) as one_week_volume
    from maya.defi.fact_swaps
    where block_timestamp::date > current_date - interval '1 week'
    and tx_id not in (select tx_id from maya.defi.fact_refund_events)
    )
    ,
    one_day_volume as (
    select
    sum(coalesce(from_amount_usd,to_amount_usd)) as one_day_volume
    from maya.defi.fact_swaps
    where block_timestamp > current_date - interval '24 hours'
    and tx_id not in (select tx_id from maya.defi.fact_refund_events)
    -- and block_timestamp::date > current_date - interval '1 day'
    )

    select
    one_month_volume as "30 Days Volume $",
    one_week_volume as "7 Days Volume $",
    one_day_volume as "24 Hours Volume $"
    from one_month_volume a
    left join sevent_days_volume b ON TRUE
    left join one_day_volume c ON TRUE



    Last run: 3 days ago
    30 Days Volume $
    7 Days Volume $
    24 Hours Volume $
    1
    113970909.66242420051788.64733077958055.50872423
    1
    54B
    3s