sakineh5021-nIQRzBbento 2
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
25
26
27
28
29
30
31
›
⌄
with inflow as (
SELECT SYMBOL , sum(AMOUNT_USD) as inpu , sum(amount) as inpu_num
from polygon.udm_events
where to_address = '0x0319000133d3ada02600f0875d2cf03d442c3367'
and from_address <> '0x0319000133d3ada02600f0875d2cf03d442c3367'
and event_type = 'erc20_transfer'
and symbol is not null
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_type = 'erc20_transfer'
and symbol is not null
group by 1
)
SELECT o.SYMBOL as locked_token , inpu-outpu as amount_usd , inpu_num , outpu_num
,inpu_num-outpu_num
from inflow I , outflow o
where O.symbol= I.Symbol
order by 2 DESC
Run a query to Download Data