vendettaswap TOKEN_PAIR
Updated 2024-08-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
with near as (select block_timestamp, tx_hash,
amount_in_usd as amount_usd, trader as swapper,
symbol_in || '➡' || symbol_out as token_pair,
platform, 'Near' as chain
from near.defi.ez_dex_swaps
WHERE token_in_contract= 'blackdragon.tkn.near')
-- where (token_in_contract='{{Memecoin_Address}}' or token_out_contract='{{Memecoin_Address}}')
-- and block_timestamp::date between '{{Start_Date}}' and '{{End_Date}}')
select token_pair, count(distinct tx_hash) as "Swap Count",
count(distinct swapper) as "Swapper Count", sum(amount_usd) as "Swap Volume", avg(amount_usd) as "Avg Swap Volume",
median(amount_usd) as "Median Swap Volume", sum(amount_usd)/count(distinct swapper) as "Avg Swap Volume per Swapper",
round(count(distinct tx_hash)/count(distinct swapper)) as "Avg Swap Count per Swapper"
from near
group by TOKEN_PAIR
order by 2 desc
QueryRunArchived: QueryRun has been archived