theericstoneTarnodo DAIquiry
Updated 2020-12-16
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 torn_in AS (
SELECT
date_trunc('day',block_timestamp) as date,
from_address,
from_label,
sum(amount) as amount_sent
FROM
gold.ethereum_events
where
contract_address = '0x6b175474e89094c44da98b954eedeac495271d0f' -- DAI token
and
to_label = 'tornado_cash'
and block_timestamp > getdate() - interval '3 months'
GROUP BY 1, 2,3
),
torn_out AS (
SELECT
date_trunc('day',block_timestamp) as date,
to_address,
to_label,
sum(amount) as amount_sent
FROM
gold.ethereum_events
where
contract_address = '0x6b175474e89094c44da98b954eedeac495271d0f' -- DAI token
and
from_label = 'tornado_cash'
and block_timestamp > getdate() - interval '3 months'
GROUP BY 1,2,3
)
SELECT
torn_out.date as date,
torn_in.from_address,
torn_in.from_label,
torn_in.amount_sent as amount_to_tornado,
torn_out.to_address,
Run a query to Download Data