Madimain metrics total
Updated 2023-04-13Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
⌄
/*select * from near.core.ez_dex_swaps
where TOKEN_IN = 'wNEAR' or TOKEN_IN = 'STNEAR'
limit 1000
--wNEAR STNEAR NearX */
select
date_trunc('week', block_timestamp) as date,
token_out as token,
count(DISTINCT tx_hash) as Tx_count,
count(DISTINCT trader) as unique_traders,
sum(amount_in) as amount_near,
avg(amount_in) as avg_amount,
sum(amount_near) over (order by date) as cumulative_amount,
sum(Tx_count) over (order by date) as cumulative_swaps,
sum(unique_traders) over (order by date) as cumulative_traders
from near.core.ez_dex_swaps
where token_in = 'wNEAR'
group by date, token
Run a query to Download Data