USER_STATUS | STAKED_AMOUNT | |
---|---|---|
1 | New | 8839118.34900975 |
2 | Returning | 40095381.2444318 |
ArioAmnis - Staked Distribution by Users Type
Updated 2025-03-19
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 main as (
select
block_timestamp,
tx_hash,
sender as User_address,
EVENT_DATA:amapt :: float / pow(10, 8) as amount
FROM
aptos.core.fact_events
join aptos.core.fact_transactions using(tx_hash, block_timestamp)
WHERE
EVENT_ADDRESS = '0x111ae3e5bc816a5e63c2da97d0aa3886519e0cd5e4b046659fa35796bd11542a'
AND EVENT_RESOURCE IN ('MintEvent')
and SUCCESS = 'TRUE'
),
first_tx as (
select
user_address,
min(block_timestamp) as first_timestamp
from
main
group by
1
)
select
--date_trunc(week, block_timestamp) as date,
case
when a.user_address = b.user_address then 'New'
else 'Returning'
end as User_Status,
sum(amount) as Staked_Amount
from
main a
left join first_tx b on a.block_timestamp = b.first_timestamp
where
block_timestamp > '2023-08-28'
group by
Last run: 20 days ago
2
57B
2s