adambalaUntitled Query
Updated 2022-10-13
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 min_time as (
select
min(block_timestamp) as min_time_sushi
from ethereum.core.ez_balance_deltas
where block_timestamp >= '2020-08-01'
and user_address = lower('0x7af2d9a872cbb1bc19fcbd75a4241776ab63dcca') -- sushi token
),
date_list as (
select
distinct block_timestamp::date as dates
from ethereum.core.ez_balance_deltas
where block_timestamp >= (select min_time_sushi from min_time)
),
user_list as (
select
distinct user_address as user_list_all
from ethereum.core.ez_balance_deltas
where block_timestamp >= (select min_time_sushi from min_time)
and user_address = lower('0x7af2d9a872cbb1bc19fcbd75a4241776ab63dcca') -- sushi
),
date_x_user as (
select * from date_list
cross join user_list
),
balance_raw as (
select
block_timestamp::date as day,
user_address,
prev_bal,
current_bal
from ethereum.core.ez_balance_deltas
where block_timestamp >= (select min_time_sushi from min_time)
Run a query to Download Data