BlockTrackeroverview
Updated 2025-04-14
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
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
QueryRunArchived: QueryRun has been archived