KaskoazulPopular Traits without Background and Skin
Updated 2022-03-30
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 sales as
(
SELECT
block_timestamp as fecha,
mint,
marketplace
FROM solana.fact_nft_sales
WHERE succeeded = TRUE
and lower(marketplace) in ('magic eden v1','magic eden v2')
and fecha >= '2022-01-01'
),
traits as
(
select *,
key as trait_type,
value as popular_traits
from solana.dim_nft_metadata, table(flatten(solana.dim_nft_metadata.token_metadata)) tm
where contract_name = 'DeGods'
and key != 'Attribute Count'
and value != 'None'
)
SELECT
date_trunc('week', fecha),
trait_type,
popular_traits,
count(popular_traits) as total_reps
FROM SALES S
INNER JOIN TRAITS T
ON T.mint = S.mint
where trait_type in ('Background')
GROUP BY 1,2,3
order by 1, total_reps desc
Run a query to Download Data