greyswanNFT-DEFI intersection
Updated 2023-04-20
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
unique_NFT_users as (
select distinct
date_trunc('month', block_timestamp) as NFT_month,
seller as seller_purchaser
from
solana.core.fact_nft_sales
where
block_timestamp >= '2022-03-01'
and block_timestamp <= CURRENT_DATE - 1
UNION
select distinct
date_trunc('month', block_timestamp) as NFT_month,
purchaser
from
solana.core.fact_nft_sales
where
block_timestamp >= '2022-03-01'
and block_timestamp <= CURRENT_DATE - 1
),
txs_by_NFTS as (
select
NFT_month,
seller_purchaser,
program_ID
from
unique_NFT_users
left join solana.core.fact_events on seller_purchaser = signers[0]
and NFT_month = date_trunc('month', block_timestamp)
where
succeeded = 'true'
and block_timestamp >= '2022-03-01'
and block_timestamp <= CURRENT_DATE - 1
),
contract_labels as (
select
Run a query to Download Data