sakineh5021-nIQRzBUntitled Query
Updated 2022-03-26
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
›
⌄
with inflow as (
SELECT SYMBOL , sum(AMOUNT_USD) as inpu , sum(amount) as inpu_num
from polygon.udm_events
where to_address = '0x0319000133d3ada02600f0875d2cf03d442c3367'
and EVENT_NAME = 'transfer'
group by 1
) ,
outflow as (
SELECT SYMBOL , sum(AMOUNT_USD) as outpu , sum(amount) as outpu_num
from polygon.udm_events
where from_address = '0x0319000133d3ada02600f0875d2cf03d442c3367'
and to_address <> '0x0319000133d3ada02600f0875d2cf03d442c3367'
and EVENT_NAME = 'transfer'
group by 1
)
SELECT sum(inpu-outpu) as amount_usd
from inflow I , outflow o
where O.symbol= I.Symbol
Run a query to Download Data