lagandispenserBLAST | Bridge data
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
-- ETH
t1 as (
SELECT
DATE(block_timestamp) as date,
'ETH' as symbol,
SUM(eth_value) as amount_eth,
count(distinct TX_HASH) as tx,
count(distinct FROM_ADDRESS) users,
AVG(TX_FEE) as avg_tx_fees
FROM
ethereum.core.fact_transactions
WHERE
to_address = LOWER('0x5F6AE08B8AeB7078cf2F96AFb089D7c9f51DA47d')
AND STATUS ='SUCCESS'
GROUP BY 1,2
ORDER BY 1 DESC),
-- ETH Price
eth_token_price AS(
select DATE(HOUR)as date1, AVG(price) as eth_price
from ethereum.price.fact_hourly_token_prices
where TOKEN_ADDRESS = LOWER('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')
GROUP BY 1
ORDER BY 1 DESC),
-- ETH x USD
t2 as(
SELECT
date,
symbol,
amount_eth,
amount_eth * eth_price as amount_usd,
Run a query to Download Data