SPINS | SPINNERS | TOTAL_APT_SPENT | TOTAL_SPIN_AMOUNT_USD | |
---|---|---|---|---|
1 | 408837 | 2613 | 40883.7 | 217092.447 |
dannyamahTotal Spins
Updated 2025-03-30
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
›
⌄
WITH token_won AS (
SELECT
COUNT(DISTINCT tx_hash) AS spins,
COUNT(DISTINCT tx_hash) * 0.1 AS total_apt_spent,
COUNT(DISTINCT event_data:spinner) AS spinners
FROM aptos.core.fact_events
WHERE event_type = '0xb588e7842f7fca80cf6d92eeb7a05db0dce6af5e02248374fb4498d96ea23236::spin::SpinEvent'
AND success = TRUE
),
latest_token_price AS (
SELECT
token_address,
price,
ROW_NUMBER() OVER (PARTITION BY token_address ORDER BY hour DESC) AS rn
FROM aptos.price.ez_prices_hourly
WHERE token_address = '0x1::aptos_coin::AptosCoin' -- Fix operator and ensure it's for APT
)
SELECT
t.spins,
t.spinners,
t.total_apt_spent,
t.total_apt_spent * p.price AS total_spin_amount_usd
FROM token_won t
JOIN latest_token_price p
ON p.rn = 1
Last run: 3 months ago
1
34B
29s