mcfemi6Untitled Query
Updated 2022-10-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
-- SELECT date_trunc('day', block_timestamp) as daily, token_price
--from ethereum.core.ez_token_transfers
--where contract_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984' AND TOKEN_PRICE IS NOT NULL
--AND daily >= current_date - interval '365 days'
--group by 1, 2
--order by 1 desc;
SELECT date_trunc('month', block_timestamp) as month, TX_ID, SUM(GAS_USED) as gas_used, SUM(FEE_USD) as Gas_fee
FROM ethereum.transactions
Where block_timestamp >= CURRENT_DATE -INTERVAL '1 year' AND to_address = LOWER ('0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984')
GROUP BY 1, 2
select
date_trunc('day',hour) as day,
price as uni_price
from ethereum.token_prices_hourly
where
symbol = 'UNI' AND
hour >= '2022-10-29' AND
token_address = '0x1f9840a85d5af5bf1d1762f925bdaddc4201f984'
group by 1, 2
order by 1 DESC
Run a query to Download Data