crabtriumph-3379Activity Points - Rice of the Golden Fish copy
Updated 2024-09-28
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
›
⌄
-- forked from sssstatistic / Activity Points - Rice of the Golden Fish @ https://flipsidecrypto.xyz/sssstatistic/q/AMuKN3n-FmA_/activity-points---rice-of-the-golden-fish
With timeline as (
SELECT
to_timestamp(value['start']) AS start_time,
to_timestamp(value['end']) AS end_time,
value['season'] AS season
from
table(
flatten(
PARSE_JSON(
'[
{"start":"2024-06-04 00:00:00", "end":"2024-06-10 23:59:59.9", "season": 1},
{"start":"2024-06-11 00:00:00", "end":"2024-06-17 23:59:59.9", "season": 2},
{"start":"2024-06-18 00:00:00", "end":"2024-06-24 23:59:59.9", "season": 3},
{"start":"2024-07-15 08:00:00", "end":"2024-07-22 08:59:59.9", "season": 4},
{"start":"2024-09-15 00:00:00", "end":"2024-09-28 08:59:59.9", "season": 5}
]'
)
)
) f
),
land AS (
select
decoded_log ['account'] AS address,
decoded_log ['landId'] AS landId,
block_number,
block_timestamp
from
blast.core.ez_decoded_event_logs ln
where
contract_address = '0xc48f6213a1a4d3ead79db812c2b91817980532c3'
and event_name = 'NewAccount'
and exists (
select 1
from timeline tl
QueryRunArchived: QueryRun has been archived