Query editor
SELECTprotocol,events,transactions,(CAST(events AS double) / SUM(CAST(events AS double)) OVER ()) AS percentage_of_total_events,(CAST(transactions AS double) / SUM(CAST(transactions AS double)) OVER ()) AS percentage_of_total_transactionsFROM (SELECTprotocol,COUNT(*) AS events,COUNT(DISTINCT tx_hash) AS transactionsFROM (SELECTDATE_TRUNC('month', block_time) AS period,COALESCE(protocol, 'others') AS protocol,tx_hashFROM evms.logs lJOIN (SELECT * FROM dune.safe.result_smart_accounts_deployed_info -- https://dune.com/queries/3586448WHERE protocol != 'Safe') qON l.contract_address = q.accountWHERE topic0 IN (0x442e715f626346e8c54381002da614f62bee8d27386535b2521ec8540898556e,0x6895c13664aa4f67288b25d7a21d7aaa34916e355fb9b6fae0a139a9085becb8) -- multisigUNION ALLSELECTDATE_TRUNC('month', block_time) AS period,COALESCE(protocol, 'others') AS protocol,tx_hashFROM account_abstraction_erc4337.useropsJOIN (SELECT * FROM dune.safe.result_smart_accounts_deployed_info -- https://dune.com/queries/3586448WHERE protocol != 'Safe') qON sender = q.accountUNION ALLSELECTblock_month AS period,'Safe' AS protocol,tx_hashFROM safe.transactions_allUNION ALLSELECTDATE_TRUNC('month', block_date) AS period,'Safe' AS protocol,tx_hashFROM dune.safe.result_cross_chain_safe_4337_user_ops) AS subqueryGROUP BY protocol) AS final_queryORDER BY transactions DESC;