Salehbase_nft_new_users-date-volume-compare-Collections
Updated 2024-03-13
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 lst_min as (
select
buyer_address
,min(block_timestamp)::date as min_date
from base.nft.ez_nft_sales
group by 1
)
, lst_new_users as (
select
buyer_address
from lst_min
where min_date>=current_date-30
group by 1
)
,lst_new as (
select
-- block_timestamp::date as date
iff(project_name is null ,'BasePaint',project_name) as collection
,sum(price_usd) as "$Volume"
from base.nft.ez_nft_sales
where block_timestamp::date>=current_date-30
and buyer_address in(select buyer_address from lst_new_users)
group by 1
having "$Volume" >1000
-- order by 1
)
,lst_normal_users as (
select
-- block_timestamp::date as date
iff(project_name is null ,'BasePaint',project_name) as collection
,sum(price_usd) as "$Volume"
from base.nft.ez_nft_sales
where block_timestamp::date>=current_date-30
and buyer_address not in(select buyer_address from lst_new_users)
group by 1
having "$Volume" >1000
QueryRunArchived: QueryRun has been archived