Query editor
WITH smart_contracts_list AS (SELECT DISTINCTaddressFROM sei.tracesWHEREtype LIKE 'create%'AND NOT address IS NULLAND success = TRUEAND NOT code IS NULLAND code <> FROM_HEX('00') /* Using FROM_HEX to properly compare with a varbinary type */), eoa_transactions AS (SELECTtx.*FROM sei.transactions AS txLEFT JOIN sei.contracts AS cON tx."from" = c.address /* Enclosed 'from' in double quotes */WHEREc.address IS NULL AND NOT tx."to" IS NULL /* Enclosed 'to' in double quotes */), first_tx_eth AS (SELECTblock_time,tx."from" AS user /* Enclosed 'from' in double quotes */FROM eoa_transactions AS txWHERENOT tx."from" IN (SELECTaddressFROM smart_contracts_list) /* Enclosed 'from' in double quotes */AND tx.nonce = 0 /* Filtering for the first transaction made by the wallet (nonce = 0) */), new_users_eth AS (SELECTDATE_TRUNC('day', block_time) AS day,COUNT(user) AS new_usersFROM first_tx_ethGROUP BYDATE_TRUNC('day', block_time)), valid_messages AS (SELECTtx_messages.block_height,tx_messages.tx_idFROM sei.cosmos_tx_messages AS tx_messagesWHERENOT tx_messages.message_type LIKE '/seiprotocol.seichain.oracle%'AND NOT tx_messages.message_type LIKE '/seiprotocol.seichain.eth%'AND NOT tx_messages.message_type LIKE '/seiprotocol.seichain.evm%'), first_tx_cosmos AS (SELECTmsg_events.attribute_value AS sender,blocks.block_timestamp AS block_timeFROM sei.cosmos_message_events AS msg_eventsINNER JOIN valid_messages AS val_msgsON msg_events.block_height = val_msgs.block_height AND msg_events.tx_id = val_msgs.tx_idINNER JOIN sei.cosmos_blocks AS blocksON msg_events.block_height = blocks.block_heightWHEREmsg_events.event_type = 'message'AND msg_events.attribute_key = 'sender'AND msg_events.attribute_value LIKE 'sei1%'), new_users_cosmos AS (