0xHaM-dTop 10 Swapped Pairs by All Users
Updated 2023-01-22
99
1
2
3
4
5
6
7
8
9
10
11
12
13
›
⌄
SELECT
date_trunc('{{timespan}}', block_timestamp) as date,
SYMBOL_IN || ' => ' || SYMBOL_OUT as "Pair",
sum(CASE
WHEN TOKEN_IN = lower('0x92D6C1e31e14520e676a687F0a93788B716BEff5') THEN amount_in
WHEN TOKEN_OUT = lower('0x92D6C1e31e14520e676a687F0a93788B716BEff5') THEN amount_out
END) as "Total Volume",
ROW_NUMBER() over (partition by date order by "Total Volume") as rank
FROM ethereum.core.ez_dex_swaps
WHERE block_timestamp::date >= CURRENT_DATE - INTERVAL '{{Past_Months}} Month'
AND (TOKEN_IN = lower('0x92D6C1e31e14520e676a687F0a93788B716BEff5') OR TOKEN_OUT = lower('0x92D6C1e31e14520e676a687F0a93788B716BEff5'))
GROUP BY 1,2
qualify rank <= 10
Run a query to Download Data