hayha6-bIFSI5Player Activity Points - All Time 23518 Gold share
Updated 2024-08-04
999
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 tables AS (
-- Lucky Coin 500 points per 10 billion Interest
SELECT
decoded_log['tableId'] AS tableId,
MAX(decoded_log['host']) AS host,
MAX(decoded_log['player']) AS player,
MAX(decoded_log['winner']) AS winner,
MAX(decoded_log['cost'] / POW(10, 18)) AS cost,
MAX(decoded_log['reward'] / POW(10, 18)) AS reward
FROM
blast.core.ez_decoded_event_logs el
WHERE
contract_address = '0xaf466677d96e6df2e31a86fda7e54a31d64647ed'
AND event_name IN ('NewTable', 'Play', 'Claim')
GROUP BY
decoded_log['tableId']
),
info AS (
-- winner
SELECT
winner AS address,
SUM(cost * 90 / 100) AS reward,
MAX(cost) AS cost,
COUNT(*) AS times
FROM
tables tb
WHERE
winner IS NOT NULL
GROUP BY
winner
UNION ALL -- unlucky
SELECT
CASE
WHEN winner = player THEN host
ELSE player
END AS address,
Auto-refreshes every 12 hours
QueryRunArchived: QueryRun has been archived