rajsFTX
Updated 2022-11-09Copy Reference Fork
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 stablecoin_delta as
(
SELECT
-- *
date_trunc('week', block_timestamp) as date,
-- sum(current_bal_usd) as amount,
-- sum(prev_bal_usd) as prev_amount,
sum(bal_delta_usd) as bal_delta
from ethereum.core.ez_balance_deltas
where user_address IN
(
'0xc098b2a3aa256d2140208c3de6543aaef5cd3a94',
'0x2faf487a4414fe77e2327f0bf4ae2a264a776ad2'
)
and symbol in
(
'BUSD',
'USDC',
'USDT'
)
-- and block_timestamp >= CURRENT_DATE - interval '90 days'
group by 1
order by 1 desc
-- limit 3
)
SELECT
*,
sum(bal_delta) over () as cum_bal_delta
from stablecoin_delta
Run a query to Download Data