mrwildcatCopy of Copy of query6_hackaton_netflow
Updated 2022-12-15
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
›
⌄
-- yearly netflow
-- 362
select
sum (
case
when to_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa') then amount_usd
when from_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa') then amount_usd * -1
end ) as netflow
from
ethereum.core.ez_token_transfers
where
block_timestamp::date >= '2022-01-01'
-- 3395
select sum(amount_usd) FROM ethereum.core.ez_token_transfers
where to_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa')
and block_timestamp::date >= '2022-01-01'
-- 3668
select sum(amount_usd) FROM ethereum.core.ez_token_transfers
where origin_from_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa')
and block_timestamp::date >= '2022-01-01'
--
select
sum(
case
when to_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa') then amount_usd
when origin_from_address = lower('0x65392485b8d869e59b5b2a3cf7de815ed16939aa') then amount_usd * -1
else 0
end
) as netflow
from
ethereum.core.ez_token_transfers
Run a query to Download Data