crabtriumph-3379TOP Rice Bag copy
Updated 2024-06-02
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
›
⌄
-- forked from sssstatistic / TOP Rice Bag @ https://flipsidecrypto.xyz/sssstatistic/q/g2LfIseOt9AX/top-rice-bag
With total AS (
select
SUM(
CASE event_name
WHEN 'ClaimPoint' THEN decoded_log ['points']
WHEN 'ClaimPointOfLand' THEN decoded_log ['totalPoints']
WHEN 'LandWithdrawRewardFromPool' THEN decoded_log ['points'] * -1
WHEN 'WithdrawRewardFromPool' THEN decoded_log ['points'] * -1
ELSE 0
END / pow(10, 18)
) AS bag
from
blast.core.ez_decoded_event_logs
where
contract_address = '0xc48f6213a1a4d3ead79db812c2b91817980532c3'
and event_name in (
'ClaimPointOfLand',
'ClaimPoint',
'LandWithdrawRewardFromPool',
'WithdrawRewardFromPool'
)
)
select
coalesce(decoded_log ['account'], concat('#', decoded_log ['landId'])) AS account,
round(SUM(
CASE event_name
WHEN 'ClaimPoint' THEN decoded_log ['points']
WHEN 'ClaimPointOfLand' THEN decoded_log ['totalPoints']
WHEN 'LandWithdrawRewardFromPool' THEN decoded_log ['points'] * -1
WHEN 'WithdrawRewardFromPool' THEN decoded_log ['points'] * -1
ELSE 0
END / pow(10, 18)
)) AS "Rice Bag",
round(SUM(
QueryRunArchived: QueryRun has been archived