0xHaM-d⚡️RUNE Trader Count and Trades copy
Updated 2024-12-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
›
⌄
select
date_trunc('{{Time_Interval}}', block_timestamp) as date,
count(distinct(from_address)) as number_of_traders,
count(distinct(tx_id)) as number_of_swaps,
avg(number_of_swaps) over (order by date rows between 6 preceding and current row) as "7d-MA # Swaps",
avg(number_of_traders) over (order by date rows between 6 preceding and current row) as "7d-MA # Traders"
from thorchain.defi.fact_swaps
where date BETWEEN '{{start_date}}' and Current_date() - 1
-- and date != date_trunc('day', current_date)
group by 1
ORDER BY 2 DESC
QueryRunArchived: QueryRun has been archived