theericstoneOn-chain Secondary Sales
Updated 2023-10-12
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
›
⌄
-- initially forked from 0xsalty /
-- Starbucks: Secondary Sales
-- @ https://flipsidecrypto.xyz/0xsalty/q/ZdmTI2IBm6V1/starbucks-secondary-sales
with alltxns as (
select tx_hash from
polygon.core.fact_traces trac
where trac.to_address = lower('0x1ff052df592ffcf42fe6a4173975d351dcc99d45')
and block_timestamp > '2022-08-01'
),
transfers as (
SELECT
*
FROM
polygon.core.ez_nft_transfers
WHERE
(nft_address = lower('0x1fF052Df592FFCf42Fe6A4173975d351Dcc99d45')
OR tx_hash IN (select tx_hash from alltxns))
and block_timestamp > '2022-08-01'
),
sales as (
SELECT
*
FROM
polygon.nft.ez_nft_sales
WHERE
nft_address IN (select distinct nft_address from transfers)
OR tx_hash IN (select distinct tx_hash from alltxns)
and block_timestamp > '2022-08-01'
)
select * from sales
SELECT
date,
Run a query to Download Data