Mrftiawkward-teal
Updated 2025-02-01
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
›
⌄
WITH datatbl AS (
SELECT *
FROM berachain.testnet.ez_decoded_event_logs
WHERE contract_address = '0xbb57539243c4d35265fbf4b2f17d67219200450f'
AND contract_name = 'Beranames'
AND event_name = 'Mint'
AND ORIGIN_FUNCTION_SIGNATURE = '0x3d30c7f6'
AND origin_from_address = lower ('{{address}}')
),
extracted_chars AS (
SELECT
tx_hash,
VALUE::STRING AS char,
SEQ4() AS seq
FROM
datatbl,
LATERAL FLATTEN(INPUT => DECODED_LOG:chars)
),
beranametbl AS (
SELECT
tx_hash,
LISTAGG(char, '') WITHIN GROUP (ORDER BY seq) AS "Beraname"
FROM extracted_chars
GROUP BY tx_hash
)
SELECT
datatbl.BLOCK_TIMESTAMP AS "Timestamp",
datatbl.tx_hash,
datatbl.origin_from_address AS "Address",
beranametbl."Beraname"
FROM datatbl
JOIN beranametbl
ON datatbl.tx_hash = beranametbl.tx_hash
QueryRunArchived: QueryRun has been archived