Query editor
withtransfers as (select * from query_2248971 where evt_index is not null and account <> 0x0000000000000000000000000000000000000000 and evt_block_time >= timestamp '2022-04-03'),all_accounts as (select distinct account from transfers),all_labels as (select*from (selecta.account,casewhen q.name is not null then q.namewhen e.ens is not null then array_join(e.ens, ',')when l.address is not null then array_join(l.names, ',')when s.address is not null then 'Safe'else concat(cast(bytearray_substring(a.account, 1, 3) as varchar), '...', substring(cast(bytearray_substring(a.account, 18, 3) as varchar), 3))end as name, case when c.address is not null then true end as is_contract, case when s.address is not null then true end as is_safe, q.is_internal, q.name as manual_name, array_join(l.names, ',') as all_labelsfromall_accounts aleft outer join (select distinct address from labels.contracts where blockchain = 'ethereum') c on a.account = c.addressleft outer join (select distinct address from labels.safe) s on a.account = s.addressleft outer join query_2260391 q on a.account = q.address -- manual labelsleft outer join (select array_agg(name) as ens, address from labels.ens where address in (select account from all_accounts) group by address) eon a.account = e.addressleft outer join(select array_agg(name) as names, address from labels.all where blockchain = 'ethereum' and label_type = 'identifier' and address in (select account from all_accounts) group by address) lon a.account = l.address) wherename is not nullor is_contract is not nullor is_safe is not nullor is_internal is not nullor manual_name is not nullor all_labels is not null)/**,labels as (selectname,label_type,addressfrom labels.allwhereaddress in (select distinct account from transfers)and label_type = 'identifier'and blockchain = 'ethereum')