NavidUntitled Query
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 addresses as (
select
address,
address_name,
label_subtype
from
ethereum.core.dim_labels
where
label like '%tornado cash%'
), transactions as (
select
date(block_timestamp) as day,
from_address,
eth_value
from
ethereum.core.fact_transactions
where
to_address in (select address from addresses) and
block_timestamp > CURRENT_DATE-90
)
select
day,
case
when day>='2022-08-08' then 'Sanctioned'
else 'Not Sanctioned'
end as sanction_label,
count(distinct from_address) as "Number of Unique Daily Users",
avg("Number of Unique Daily Users") over (order by day asc rows between 14 PRECEDING and current row) as "Moving Average",
sum(eth_value) as "Daily Amount of Transfers",
avg("Daily Amount of Transfers") over (order by day asc rows between 14 PRECEDING and current row) as "Daily Amount Moving Average"
from
transactions
group by
day
order by
day asc
Run a query to Download Data