Updated 2022-09-28Copy Reference Fork
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
›
⌄
-- credit to pinehearst
with TX_RECEIPT AS (
SELECT
block_timestamp,
tx_hash,
tx_signer, -- left joined from transactions
receipt_object_id,
regexp_substr(status_value, 'Success') as reg_success,
receiver_id,
logs
-- proof, metadata
FROM near.core.fact_receipts
LEFT JOIN (SELECT tx_signer, tx_hash as tx_hash1 FROM near.core.fact_transactions) ON tx_hash = tx_hash1
WHERE receiver_Id = 'marketplace.paras.near'
AND reg_success IS NOT NULL
-- WHERE tx_hash = 'AS5QLqtdQKz4fGZeqtBgXHhLbkA1HpVCM4fRaSoBqK5y' -- sale https://paras.id/token/x.paras.near::426086
),
logs_flatten AS (
SELECT
block_timestamp,
tx_hash,
tx_signer,
receiver_id,
seq,key,path,index,
value,
check_json(value) as checks
FROM TX_RECEIPT,
table(flatten(input => logs))
),
nft_tx_log AS (
SELECT
block_timestamp,
tx_hash,
tx_signer,
receiver_id,
Run a query to Download Data