Query editor
--NAODA # of POP holders by Day of the Weekwith first_date as (selectto,min(evt_block_time) as first_datefrom erc1155_polygon.evt_TransferSinglewhere 1=1and contract_address = 0xA9AfA77d0D960735BBac48782947F8E86f24C87Agroup by 1),new_holder as (selectdate_trunc('day', first_date) as dt,count(*) as newfrom first_dategroup by 1),total_stat as (selectdate_trunc('day', evt_block_time) as dt,count(distinct 'from') as unique_address_from,count(distinct to) as unique_address_to,count(*) as txsfrom erc1155_polygon.evt_TransferSinglewhere 1=1and contract_address = 0xA9AfA77d0D960735BBac48782947F8E86f24C87Agroup by 1),FINALTABLE as (selectdt,t.*,t.unique_address_to - new as old,new,row_number() over (order by dt asc) as daycountfrom total_stat tleft join new_holder n using(dt)order by dt desc),finaltable2 as (selectdaycount,dt,new,CASEWHEN MOD(daycount,7) = 1 THEN 'Friday'WHEN MOD(daycount,7) = 2 THEN 'Saturday'WHEN MOD(daycount,7) = 3 THEN 'Sunday'WHEN MOD(daycount,7) = 4 THEN 'Monday'WHEN MOD(daycount,7) = 5 THEN 'Tuesday'WHEN MOD(daycount,7) = 6 THEN 'Wednesday'WHEN MOD(daycount,7) = 0 THEN 'Thursday'ELSE 'Error'END AS "DAY" from finaltable)selectDAY,sum(new) as number_of_new_holdersfrom Finaltable2group by DAY/*