mucryptoBIT inflow and outflow
Updated 2023-05-29
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 transaction_outflow as (
select
block_timestamp::date as day,
amount*(-1) as amount,
amount_usd*(-1) as amount_usd,
to_address,
tx_hash,
'Outflow' as category
from ethereum.core.ez_token_transfers
where from_address = '0x78605df79524164911c144801f41e9811b7db73d' --BitDAO treasury
and contract_address = '0x1a4b46696b2bb4794eb3d4c26f1c55f9170fa4c5'), --BIT
labels_from as (
select
address,
address_name as receiving_address
from ethereum.core.dim_labels),
outflow as (select
day,
case when labels_from.receiving_address is null then 'To unknown address'
when labels_from.receiving_address = 'alameda research' then 'To Alameda Research'
when labels_from.receiving_address = 'gnosis safe: general contract' then 'To Gnosis Safe'
end as transfer,
amount,
amount_usd,
tx_hash,
category
from transaction_outflow
left outer join labels_from
on transaction_outflow.to_address=labels_from.address
order by amount desc),
transaction_inflow as (
select
block_timestamp::date as day,
Run a query to Download Data