hessOverview of Top 100 Pairs
Updated 2024-06-28
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 base as ( select trunc(block_timestamp,'hour') as hourly,
tx_hash,
origin_from_address,
pool_name,
amount_in_usd,
amount_out_usd,
AMOUNT_IN,
AMOUNT_Out,
TOKEN_IN,
TOKEN_out,
symbol_in,
symbol_out
from avalanche.defi.ez_dex_swaps
where platform ilike '%uniswap%')
,
price_base as ( select hour,
token_address,
price
from avalanche.price.ez_prices_hourly)
,
base1 as ( select hourly,
tx_hash,
origin_from_address,
pool_name,
amount_in_usd,
amount_out_usd,
TOKEN_IN,
TOKEN_out,
symbol_in,
symbol_out,
amount_in*b.price as amt_in_usd,
amount_out*c.price as amt_out_usd,
case when amount_in_usd is null then amount_out_usd else amount_in_usd end as volume_1,
case when amt_in_usd is null then amt_out_usd else amt_in_usd end as volume_2,
case when volume_1 is null then volume_2 else volume_1 end as volume_usd
from base a left outer join price_base b on a.hourly = b.hour and a.token_in = b.token_address
QueryRunArchived: QueryRun has been archived