Hessishlka - transfers
Updated 2024-11-17
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 x as
(SELECT
date_trunc('day', BLOCK_TIMESTAMP) AS DAY,
TX_TO AS address,
AMOUNT/pow(10,decimal) AS amountx,
'inflow' AS direction
FROM eclipse.core.fact_transfers
WHERE
MINT = 'LaihKXA47apnS599tyEyasY2REfEzBNe4heunANhsMx'
GROUP BY all
UNION
-- Outflow
SELECT
date_trunc('day', BLOCK_TIMESTAMP) AS DAY,
TX_from AS address,
AMOUNT/pow(10,decimal) AS amountx,
'outflow' AS direction
FROM eclipse.core.fact_transfers
WHERE
MINT = 'LaihKXA47apnS599tyEyasY2REfEzBNe4heunANhsMx'
GROUP BY all)
select DAY, direction, count(DISTINCT address) as users from x group by all
QueryRunArchived: QueryRun has been archived