cheeyoung-kekTornado after 1.
Updated 2022-08-10Copy Reference Fork
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 tornado_address as(
select
address,
address_name,
project_name
from flipside_prod_db.crosschain.address_labels
where project_name like 'tornado cash' and blockchain = 'ethereum'
) ,
prices as (
select hour as day, avg(price) as price, 'ETH' as symbol
from ethereum.core.fact_hourly_token_prices
WHERE token_address = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2'
group by 1
),
eth_tx as(
select
a.block_timestamp as day,
tx_hash,
eth_from_address,
eth_to_address,
a.amount as amount,
(a.amount*b.price) as USD,
a.amount as amount_eth, b.symbol
from ethereum.core.ez_eth_transfers a
join prices b on date_trunc('hour', a.block_timestamp)=b.day
where block_timestamp::date <= current_date - 1
and amount > 0
),
token_tx as(
Run a query to Download Data