elsina2024-09-14: Unique Days
Updated 2024-11-01
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
with swappers as (
select
buyer_address as user,
count(distinct date_trunc( 'day' , block_timestamp)) as unique_days
from
base.nft.ez_nft_sales
group by
user
)
select
case
when unique_days = 1 then 'A : = 1 days'
when unique_days = 2 then 'B : = 2 days'
when unique_days < 8 then 'C : 3-7 days'
when unique_days < 31 then 'D : 8-30 days'
else 'E : over 30 days'
end as "type",
count( distinct user) as user_count,
100.0 * count(distinct user) / sum(count(distinct user)) over () as user_count_percentage
from swappers
group by 1
order by 1 asc
QueryRunArchived: QueryRun has been archived