HosseinUniswap Ethereum Share copy
Updated 2024-06-26
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
prices as (
select
hour::date as date,
avg(price) as price_usd
from ethereum.price.ez_prices_hourly
where symbol = 'WAVAX'
group by 1
),
main as (
select
tx_hash,
block_timestamp,
nvl(amount_in_usd, amount_out_usd) as amount_usd,
origin_from_address as user,
tx_fee,
gas_used,
tx_fee * price_usd as tx_fee_usd,
case platform
when 'kyberswap-v2' then 'kyberswap'
when 'kyberswap-v1' then 'kyberswap'
when 'uniswap-v2' then 'uniswap'
when 'uniswap-v3' then 'uniswap'
when 'trader-joe-v1' then 'trader-joe'
when 'trader-joe-v2' then 'trader-joe'
when 'pancakeswap-v2' then 'pancakeswap'
when 'pancakeswap-v3' then 'pancakeswap'
when 'dodo-v1' then 'dodo'
when 'dodo-v2' then 'dodo'
when 'hashflow-v3' then 'hashflow'
else platform
end as platform
from avalanche.defi.ez_dex_swaps
join avalanche.core.fact_transactions
QueryRunArchived: QueryRun has been archived