alitaslimiPrices Swaps Over Time
Updated 2023-07-11
999
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
avalanche_prices as (
select
hour::date as date,
avg(price) as price
from
avalanche.core.fact_hourly_token_prices
where
token_address = '0xc891eb4cbdeff6e073e859e987815ed1505c2acd'
group by
date
),
ethereum_prices as (
select
hour::date as date,
avg(price) as price
from
ethereum.core.fact_hourly_token_prices
where
token_address = '0x1abaea1f7c830bd89acc67ec4af516284b1bc33c'
group by
date
),
avalanche_swaps_raw as (
SELECT
block_timestamp,
(amount_out / amount_in) AS price
FROM
avalanche.core.ez_dex_swaps
WHERE
symbol_out IN ('USDC', 'USDT', 'DAI')
and token_in = '0xc891eb4cbdeff6e073e859e987815ed1505c2acd'
AND amount_in > 0
AND amount_out > 0
UNION
SELECT
Run a query to Download Data