Query editor
WITH newpb AS (selectROW_NUMBER() OVER (ORDER BY fid) as row,fid,fname,followers_count,openrank,COUNT(*) OVER () AS total_newpbfrom query_3816272where fid not in (select fid from dune.maheshguild.dataset_powerbadge8thjuly)-- group by fid,fname),totalpb AS (selectROW_NUMBER() OVER (ORDER BY fid) as row,fid,fname,followers_count,openrank,COUNT(*) OVER () AS pb_holdersfrom query_3816272),oldpb AS (selectROW_NUMBER() OVER (ORDER BY fid) as row,fid,fname,followers_count,COUNT(*) OVER () AS total_oldpbfrom dune.maheshguild.dataset_powerbadge8thjulywhere fid not in (select fid from query_3816272))select distinctnew.total_newpb as new_powerbadge,old.total_oldpb as removed_powerbadge,pb.pb_holders as total_pb_holdersfrom newpb as newcross join oldpb as oldcross join totalpb as pb