Query editor
with anchor(address) as ( values (0x732773258e9af476c28d4c010640bf93d9bc818e), (0x87e226feff949a36f66c2a1e6445a6e7d0778269), (0x0d4ad306adea1168ffb1d7db219156dc31649d96),(0x0dc89fef02c7baae688dd53f4fae266a29db104e)),f_txns as (select distinct * from(select * from zksync.transactions a inner join anchor on anchor.address=a."from"union allselect * from zksync.transactions a inner join anchor on anchor.address=a.to)),t as (select block_time, nonce, "from" , to, name from ((select varbinary_substring("from", 1, 2) as "from", to, block_time , nonce from f_txns inner join anchor on anchor.address="from" and "from"!=to)union all(select "from", varbinary_substring(to, 1, 2) as to, block_time , nonce from f_txns inner join anchor on anchor.address=to and "from"!=to)union all(select varbinary_substring("from", 1, 2) as "from", varbinary_substring(to, 1, 2) as to, block_time, nonce from f_txns inner join anchor on anchor.address="from" and "from"=to)) a left join dune.matter_labs.dataset_zksync_era_address_labels bon a.to=b.address-- and project is null),s as (select a.to, count(distinct "from") as usrs from zksync.transactions a left join (select distinct to from t) b on b.to=a.to group by 1)-- select t.*, s.usrs from t left join s on t.to=s.toselect * from(select to, name , count(distinct "from") from t where varbinary_length(to)>2 group by 1,2)a left join s on a.to=s.to