mucrypto2023-05-26 06:45 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 dates as (
select
date_day
from ethereum.core.dim_dates
where date_day between '2023-02-01' and '2023-02-28'
),
contract_address AS (
SELECT
*
FROM
(
VALUES
('0xae7ab96520de3a18e5e111b5eaab095312d7fe84', 'USDC'), --stETH
('ETH', 'USDC')
) t (address, address_two)
),
full_list as (
select
date_day,
address,
row_number() over (partition by address order by date_day asc) as row_number -- not used at all
from dates
cross join contract_address
),
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
Run a query to Download Data