Query editor
select *,row_number() over(partition by day order by users desc) as day_rank from(select day,project_name,count(distinct (t_90d_address)) as usersfrom(select t1.*,t2.day,t2."from",COALESCE(t2.num,0) as num,t_24h_address,t_24h_txnum,t_7d_address,t_7d_txnum,t_30d_address,t_30d_txnum,t_90d_address,t_90d_txnum from(select * from query_2069848) t1join(select *,1 as num, date_trunc('day',block_time) as day,case when block_time>=date_trunc('hour', now())- interval '24' hour then "from" end as t_24h_address,case when block_time>=date_trunc('hour', now())- interval '24' hour then 1 else 0 end as t_24h_txnum,case when block_time>=date_trunc('hour', now())- interval '168' hour then "from" end as t_7d_address,case when block_time>=date_trunc('hour', now())- interval '168' hour then 1 else 0 end as t_7d_txnum,case when block_time>=date_trunc('hour', now())- interval '720' hour then "from" end as t_30d_address,case when block_time>=date_trunc('hour', now())- interval '720' hour then 1 else 0 end as t_30d_txnum,case when block_time>=date_trunc('hour', now())- interval '2160' hour then "from" end as t_90d_address,case when block_time>=date_trunc('hour', now())- interval '2160' hour then 1 else 0 end as t_90d_txnumfrom bnb.transactions where block_time>=date_trunc('day', now())- interval '2160' hour and success = Trueand substring(data from 1 for 4) not in (0x632a9a52,0x379607f5,0x6f49a3c0)) t2on t1.contract_address=t2.to) tgroup by day,project_name) qorder by day_rank limit 1800-- select * from bsc."transactions" where substring(data from 1 for 10) not in (0x41c20811,0xb00b52f1,0x0a5936f1) limit 100