NavidCopy of Copy of open
Updated 2022-09-29
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 buys as (
select
date_trunc('month', block_timestamp) as day,
eth_to_address as to_address,
sum(amount) as buy_amount
from
ethereum.core.ez_eth_transfers
group by
day, eth_to_address
), sells as (
select
date_trunc('month', block_timestamp) as day,
eth_from_address as from_address,
sum(amount) as sell_amount
from
ethereum.core.ez_eth_transfers
group by
day, eth_from_address
), asset_change as (
select
b.day,
b.to_address as address,
iff(buy_amount is null, 0, buy_amount)-iff(sell_amount is null, 0, sell_amount) as eth_amount
from
buys b full outer join sells s on b.day=s.day and b.to_address=s.from_address
), asset_trend as (
select
day,
address,
sum(eth_amount) over (partition by address order by day asc) as eth
from
asset_change
), labled_assets_trend as (
select
day,
address,
Run a query to Download Data