sakineh5021-nIQRzBSushibar Servings 2
Updated 2022-04-19
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with inflow_xsushi as(
SELECT date_trunc('month', block_timestamp) as weekly
, sum(amount) as inflow
from ethereum.udm_events U
where weekly > '2021-01-01'
and to_address ='0x8798249c2e607446efb7ad49ec89dd1865ff4272'
group by 1
)
,
outflow_xsushi as(
SELECT date_trunc('month', block_timestamp) as weekly
, sum(amount) as OUtflo
from ethereum.udm_events U
where weekly > '2021-01-01'
and from_address ='0x8798249c2e607446efb7ad49ec89dd1865ff4272'
group by 1
)
SELECT I.weekly , inflow, -outflo as outflow , inflow-outflo as net_flow
from inflow_xsushi I , outflow_xsushi O
where I.weekly = O.weekly
Run a query to Download Data