lagandispenserUntitled Query
Updated 2022-06-30
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with positive_inflow as (
select SUM(amount) as amt, DATE(block_timestamp) as inflow_day
from polygon.udm_events
where contract_address = lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3')
and from_address = '0x0000000000000000000000000000000000000000'
and amount > 0
group by 2
),
negative_outflow as (
select SUM(-1 * amount) as amt, DATE(block_timestamp) as inflow_day
from polygon.udm_events
where contract_address = lower('0xe94b5eec1fa96ceecbd33ef5baa8d00e4493f4f3')
and to_address = '0x0000000000000000000000000000000000000000'
and amount < 0
group by 2
)
select SUM(amt) as inflow, inflow_day from (
select * from positive_inflow
union all
select * from negative_outflow
) group by 2;
Run a query to Download Data