KeyrockBalance Overtime
Updated 2023-11-24
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
›
⌄
WITH USER_DATA AS (
select
block_timestamp,
user_address,
balance * pow(10,(-1) * 16) as balance
from
ethereum.core.fact_eth_balances
where
user_address = lower('0x4ec2DcdFb3c165dA62DD1367cB42fe7551524984')
ORDER by
BLOCK_TIMESTAMP DESC
)
SELECT
AVG(BALANCE) AS avg_balance,
MEDIAN(BALANCE) AS median_balance,
MAX(BALANCE) AS max_balance,
MIN(BALANCE) AS min_balance,
COUNT(*) AS total_transactions,
MIN(BLOCK_TIMESTAMP) as start_date,
MAX(BLOCK_TIMESTAMP) as end_date,
TIMESTAMPDIFF(day, start_date, end_date) as active_days
FROM
USER_DATA
Run a query to Download Data