winnie-fsstrange-chocolate
Updated 2024-08-09
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 ranked_submissions AS (
SELECT
cc."Collector",
cc."Submissions",
DENSE_RANK() OVER (
ORDER BY
cc."Submissions" DESC
) AS "Rank"
FROM
(
SELECT
event_data:owner as "Collector",
COUNT(*) as "Submissions"
FROM
flow.core.fact_events
WHERE
event_contract = 'A.4da127056dc9ba3f.Escrow'
AND event_data:leaderboardName ILIKE 'legends_of_the_turf%'
AND event_type = 'EntryDeposited'
GROUP BY
event_data:owner
) cc
)
SELECT
CONVERT_TIMEZONE('UTC', 'America/Los_Angeles', fe.block_timestamp) AS "Timestamp",
cc."Collector",
metadata."Player",
metadata."Team",
metadata."Series",
metadata."Tier",
metadata."Set Name",
metadata."Serial #",
TO_NUMBER('1') AS "TX",
cc."Submissions" as "Collectors Submissions",
COUNT(DISTINCT cc."Collector") OVER () AS "Collectors Participating",
COUNT(*) OVER (PARTITION BY metadata."Player", metadata."Team", metadata."Series", metadata."Tier", metadata."Set Name") AS "Moment Submissions",
QueryRunArchived: QueryRun has been archived