Query editor
with hd_pr as (selectbuyer,date_diff('day', min(block_date), max(block_date)) as holding_periodfrom nft.tradesgroup by 1)selectcasewhen holding_period = 0 then 'Less Than 1 Day'when holding_period < 30 then 'Less Than 1 Month'when holding_period < 90 then 'Less Than 3 Month'when holding_period < 180 then 'Less Than 6 Month'when holding_period < 365 then 'Less Than 1 Year'when holding_period > 365 then 'More Than 1 Year'end as holder_type, sum(buyers) as num_of_buyerfrom (select holding_period, count(distinct buyer) as buyersfrom hd_prgroup by 1)group by 1order by num_of_buyer desc