saeedmzn[new accounts on base] NFT sales vs trades
Updated 2024-08-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
›
⌄
with new_accounts as ( select
FROM_ADDRESS ,
min (BLOCK_TIMESTAMP) min_date
from base.core.fact_transactions
group by 1 having min_date >= current_date - 30
),
swaps as (
select
sender account
from base.defi.ez_dex_swaps
where SENDER in (select FROM_ADDRESS from new_accounts )
),
nft_sales as (
select
ORIGIN_FROM_ADDRESS account
from base.nft.ez_nft_sales
where ORIGIN_FROM_ADDRESS in (select FROM_ADDRESS from new_accounts )
)
select 'Swapped and traded NFTs' type , count (DISTINCT account) num_accounts from swaps join nft_sales using (account)
UNION
select 'Only swapped tokens' type , count (DISTINCT account) num_accounts from swaps left join nft_sales n using (account) where n.account is NULL
UNION
select 'Only traded NFTs' type , count (DISTINCT account) num_accounts from nft_sales left join swaps s using (account) where s.account is NULL
UNION
select 'Not swapped and not traded NFTs' type ,
count (DISTINCT FROM_ADDRESS ) num_accounts from new_accounts
where FROM_ADDRESS not in (select * from swaps )
and FROM_ADDRESS not in (select * from nft_sales )
QueryRunArchived: QueryRun has been archived