Query editor
-- Query 3: Daily keys sold + ETH revenueWITH purchases AS (SELECTdate_trunc('day', l.block_time) AS day,l.tx_hash,-- decode player address from topic1from_hex(substr(cast(topic1 as varchar), 27)) AS player,-- topic2 is uint256 keyscast(bytearray_to_uint256(topic2) as double) AS keys_bought,t.value / 1e18 AS eth_spentFROM abstract.logs lJOIN abstract.transactions tON l.tx_hash = t.hashWHERE l.contract_address = 0xBDE2483b242C266a97E39826b2B5B3c06FC02916AND l.topic0 = 0x404d1f54ee326d5c061a2c9116c429c3dd776456700e045b563d2f68bea27089)SELECTday,COUNT(DISTINCT player) AS unique_buyers,COUNT(*) AS purchase_txs,SUM(keys_bought) AS total_keys_sold,SUM(eth_spent) AS total_eth_revenue,AVG(keys_bought) AS avg_keys_per_txFROM purchasesGROUP BY 1ORDER BY 1