mucrypto2023-05-24 12:05 AM
Updated 2023-05-23
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 dates as (
select
date_day
from ethereum.core.dim_dates
where date_day between '2021-08-01' and '2023-01-01'
),
contracts as (
select
'0x1a4b46696b2bb4794eb3d4c26f1c55f9170fa4c5' as address --BIT
union all
select
'ETH' as address),
full_list as (
select
date_day,
address,
row_number() over (partition by address order by date_day asc) as row_number
from dates
cross join contracts
),
balances as (
select
block_timestamp::date as day,
symbol,
iff(contract_address is null, 'ETH', contract_address) as contract_addresses,
current_bal_usd,
prev_bal_usd
from ethereum.core.ez_balance_deltas
where user_address = '0x78605df79524164911c144801f41e9811b7db73d' --BitDAO treasury
and (contract_address is null
or contract_address = '0x1a4b46696b2bb4794eb3d4c26f1c55f9170fa4c5') --BIT
Run a query to Download Data