Afonso_DiazTop pairs
Updated 2025-01-24
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
pricet as (
select
hour::date as date,
symbol,
decimals,
token_address,
avg(price) as token_price_usd
from
sei.price.ez_prices_hourly
group by 1, 2, 3, 4
),
main as (
select
tx_id,
block_timestamp,
swapper,
platform,
a.symbol as symbol_in,
(amount_in / pow(10, a.decimals)) * a.token_price_usd as amount_in_usd,
b.symbol as symbol_out,
(amount_out / pow(10, b.decimals)) * b.token_price_usd as amount_out_usd,
nvl(amount_in_usd, amount_out_usd) as amount_usd
from
sei.defi.fact_dex_swaps
left join
pricet a on block_timestamp::date = a.date and a.token_address = currency_in
left join
pricet b on block_timestamp::date = b.date and b.token_address = currency_out
where
tx_succeeded
and platform = 'astroport'
)
QueryRunArchived: QueryRun has been archived