Query editor
WITH player_base AS (SELECTblock_time AS evt_block_time,tx_hash AS evt_tx_hash,bytearray_substring(topic2,13,20) AS player,'Initialized' AS action,bytearray_to_uint256(topic1) AS battleIdFROM blast.logsWHERE topic0 = 0xe856d9c527bc013d9955698be44d4c7e13739fa87594a8933c0d942daf41e483AND contract_address = 0xc15568330926e2a6f1519992b0364ca00faf6a7aUNION ALLSELECTblock_time AS evt_block_time,tx_hash AS evt_tx_hash,bytearray_substring(topic3,13,20) AS player,'Initialized' AS action,bytearray_to_uint256(topic1) AS battleIdFROM blast.logsWHERE topic0 = 0xe856d9c527bc013d9955698be44d4c7e13739fa87594a8933c0d942daf41e483AND contract_address = 0xc15568330926e2a6f1519992b0364ca00faf6a7aUNION ALLSELECTblock_time AS evt_block_time,tx_hash AS evt_tx_hash,bytearray_substring(topic2,13,20) AS player,'Joined' AS action,bytearray_to_uint256(topic1) AS battleIdFROM blast.logsWHERE topic0 = 0x09afbfed4f33a53c1bff738c8909e5f07a302af749605de0b786f92e40be97f8AND contract_address = 0xc15568330926e2a6f1519992b0364ca00faf6a7aUNION ALLSELECTblock_time AS evt_block_time,tx_hash AS evt_tx_hash,bytearray_substring(topic3,13,20) AS player,'Joined' AS action,bytearray_to_uint256(topic1) AS battleIdFROM blast.logsWHERE topic0 = 0x09afbfed4f33a53c1bff738c8909e5f07a302af749605de0b786f92e40be97f8AND contract_address = 0xc15568330926e2a6f1519992b0364ca00faf6a7a),p1 AS (SELECTDATE_TRUNC('day', evt_block_time) AS period,COUNT(DISTINCT evt_tx_hash) AS transactions,COUNT(DISTINCT player) AS players,COUNT(DISTINCT battleId) AS battlesFROM player_base