amirrzUSDT Weekly Netflow
Updated 2022-12-14Copy 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
›
⌄
with
outflow as ( select
date_trunc('week',BLOCK_TIMESTAMP)::date as date,
sum(amount) as outflow_amount
from
solana.core.fact_transfers t,solana.core.dim_labels l
where
t.TX_TO = l.address
and
mint in ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') group by 1
),
inflow as ( select
date_trunc('week',BLOCK_TIMESTAMP)::date as date,
sum(amount) as inflow_amount
from
solana.core.fact_transfers t,solana.core.dim_labels l
where
t.TX_FROM = l.address
and
mint in ('Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB') group by 1
)
select
a.date,
inflow_amount,
outflow_amount,
inflow_amount - outflow_amount as netflow
from
inflow a inner
join
outflow b on a.date=b.date
Run a query to Download Data