mucrypto2023-05-26 07:55 PM
Updated 2023-05-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
32
33
34
35
36
›
⌄
with inflow as (select
block_timestamp::date as day,
sum(amount) as amount_inflow,
'Inflow' as category_inflow,
to_address
from ethereum.core.ez_token_transfers
where block_timestamp::date between '2021-10-13' and current_date()
and to_address = '0x78605df79524164911c144801f41e9811b7db73d' -- BitDAO treasury
and contract_address = '0x1a4b46696b2bb4794eb3d4c26f1c55f9170fa4c5' --BIT
group by 1,4),
outflow as (select
block_timestamp::date as day,
-sum(amount) as amount_outflow,
'Outflow' as category_outflow,
from_address
from ethereum.core.ez_token_transfers
where block_timestamp::date between '2021-10-13' and current_date()
and from_address = '0x78605df79524164911c144801f41e9811b7db73d' -- BitDAO treasury
and contract_address = '0x1a4b46696b2bb4794eb3d4c26f1c55f9170fa4c5' --BIT
group by 1,4)
-- total_flow as (
-- select *
-- from inflow
-- union all
-- select *
-- from outflow),
-- total as (
-- select
-- to_address
-- from ethereum.core.ez_token_transfers)
select
*
Run a query to Download Data