walemathsUser Balance Changes
Updated 2024-07-11
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
›
⌄
WITH balance_changes AS (
SELECT
date,
address AS user_id,
balance_type,
balance
FROM
axelar.core.fact_daily_balances
WHERE
date >= DATEADD(day, -3000000, CURRENT_DATE())
),
daily_balance_changes AS (
SELECT
date,
balance_type,
SUM(balance) AS total_balance
FROM
balance_changes
GROUP BY
date, balance_type
)
SELECT
date,
balance_type,
total_balance
FROM
daily_balance_changes
ORDER BY
date, balance_type;
QueryRunArchived: QueryRun has been archived