libruarynft_ez_nft_sales_reference
Updated 2024-10-04
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 SalesData AS (
SELECT
es.tx_id, -- Transaction ID
es.block_height, -- Block height the block was recorded at
es.block_timestamp, -- Date and time when the block was written
es.marketplace, -- Contract address for the marketplace where the transaction occurred
es.nft_collection, -- Contract address or ID for the NFT collection
es.nft_id, -- NFT ID, usually a number
es.buyer, -- Buyer in the transaction
es.seller, -- Seller in the transaction
es.price AS sale_price, -- Sale price of the asset
es.currency, -- Currency used in the transaction
es.tx_succeeded, -- Whether the transaction succeeded
es.tokenflow, -- Array of events tracking the flow of tokens
es.counterparties, -- Array of addresses interacted with during the transaction
es.ez_nft_sales_id, -- Unique identifier assigned by a surrogate key
es.inserted_timestamp, -- Timestamp when the record was inserted
es.modified_timestamp -- Timestamp when the record was last modified
FROM
flow.nft.ez_nft_sales es
WHERE
es.nft_collection = 'A.0b2a3299cc857e29.TopShot' -- Only include TopShot NFT sales
AND es.tx_succeeded = TRUE -- Only include successful transactions
)
-- Final Query: Fetching All Available Fields
SELECT
sd.tx_id,
sd.block_height,
sd.block_timestamp,
sd.marketplace,
sd.nft_collection,
sd.nft_id,
sd.buyer,
sd.seller,
sd.sale_price,
QueryRunArchived: QueryRun has been archived