Query editor
with requests_by_sender_gnosis as (selectlower('0x' || substr(to_hex(topic2), -40)) as sender,'gnosis' as chain,count(*) as total_marketplace_requests,sum(varbinary_to_uint256(varbinary_substring(data, 1, 32))) as total_requestsfrom gnosis.logswhere contract_address = 0x735FAAb1c4Ec41128c367AFb5c3baC73509f70bBand topic0 in (0x5d60556939d4ab71b3129033c865bf7e828306916fd94fd35019d3d530eb36b3,0xb1ea35a385d4517ac7b3fb0eac4f62db4f0c5b4cf8b7aef789bbd1db097edb25)group by topic2),requests_by_sender_base as (selectlower('0x' || substr(to_hex(topic2), -40)) as sender,'base' as chain,count(*) as total_marketplace_requests,sum(varbinary_to_uint256(varbinary_substring(data, 1, 32))) as total_requestsfrom base.logswhere contract_address = 0xf24eE42edA0fc9b33B7D41B06Ee8ccD2Ef7C5020and topic0 in (0x5d60556939d4ab71b3129033c865bf7e828306916fd94fd35019d3d530eb36b3,0xb1ea35a385d4517ac7b3fb0eac4f62db4f0c5b4cf8b7aef789bbd1db097edb25)group by topic2),offchain_requests_by_sender_gnosis as (selectlower('0x' || substr(to_hex(topic2), -40)) as sender,sum(varbinary_to_uint256(varbinary_substring(data, 1, 32))) as total_offchain_requestsfrom gnosis.logswhere contract_address = 0x735FAAb1c4Ec41128c367AFb5c3baC73509f70bBand topic0 = 0xf980d83e9456535b0f9f3634d171df2a5f052f5d5e706b75d30c4e0433da927dgroup by topic2),offchain_requests_by_sender_base as (selectlower('0x' || substr(to_hex(topic2), -40)) as sender,sum(varbinary_to_uint256(varbinary_substring(data, 1, 32))) as total_offchain_requestsfrom base.logswhere contract_address = 0xf24eE42edA0fc9b33B7D41B06Ee8ccD2Ef7C5020and topic0 = 0xf980d83e9456535b0f9f3634d171df2a5f052f5d5e706b75d30c4e0433da927dgroup by topic2)selectm.sender,m.chain,m.total_marketplace_requests,coalesce(o.total_offchain_requests, 0) as total_offchain_requests,m.total_requests + coalesce(o.total_offchain_requests, 0) as total_requestsfrom requests_by_sender_gnosis mleft join offchain_requests_by_sender_gnosis o on m.sender = o.senderunion allselectm.sender,m.chain,m.total_marketplace_requests,coalesce(o.total_offchain_requests, 0) as total_offchain_requests,