Soheil_MKSwap from ETH of miners VS ETH price
Updated 2022-09-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
›
⌄
with eth_price as (
select
date_trunc('day',HOUR) as date,
round(avg(price)) as eth_price
from ethereum.core.fact_hourly_token_prices
where symbol = 'WETH'
and date >='2022-01-01'
group by date
order by date
),
miners AS (
SELECT distinct miner
FROM ethereum.core.fact_blocks
where BLOCK_TIMESTAMP <='2022-09-14'
)
SELECT
b.date as date,
sum (a.AMOUNT_IN) as ETH_amounts,
b.eth_price
from Ethereum.core.ez_dex_swaps a
join eth_price b
on a.BLOCK_TIMESTAMP::date =b.date
where SYMBOL_IN='WETH'
and BLOCK_TIMESTAMP >='2022-06-01'
and ORIGIN_FROM_ADDRESS IN (SELECT * FROM miners)
group by 1,3
Run a query to Download Data