Query editor
WITH game_start AS (SELECT MIN(evt_block_time) as start_timeFROM transientlabs_ethereum.deathandtaxes_evt_gamelive),treasury_addr AS (SELECT treasury, projectFROM transientlabs_ethereum.deathandtaxes_evt_paymenttargetssetORDER BY evt_block_time DESCLIMIT 1),kills AS (SELECT COUNT(*) as total_killedFROM transientlabs_ethereum.deathandtaxes_evt_killed),-- Count total citizens minted via nft.transfersmints AS (SELECT COUNT(*) as total_mintedFROM nft.transfersWHERE contract_address = 0x4f249b2dc6cecbd549a0c354bbfc4919e8c5d3aeAND "from" = 0x0000000000000000000000000000000000000000AND blockchain = 'ethereum'),-- Track all ETH flowing into the game contracteth_inflows AS (SELECT SUM(value / 1e18) as total_eth_inFROM ethereum.tracesWHERE "to" = 0xa448c7f618087dDa1a3B128cAd8A424fBae4B71FAND success = trueAND value > 0),-- Track ETH flowing out of game contract to treasuryeth_to_treasury AS (SELECT SUM(value / 1e18) as eth_in_treasuryFROM ethereum.traces tCROSS JOIN treasury_addr taWHERE t."to" = ta.treasuryAND t."from" = 0xa448c7f618087dDa1a3B128cAd8A424fBae4B71FAND t.success = trueAND t.value > 0),audits AS (SELECT COUNT(*) as total_auditsFROM transientlabs_ethereum.deathandtaxes_evt_audited),insurance AS (SELECT COUNT(*) as total_insuredFROM transientlabs_ethereum.deathandtaxes_evt_lifeinsurancebought),taxes AS (SELECT COUNT(*) as total_tax_paymentsFROM transientlabs_ethereum.deathandtaxes_evt_taxespaid)SELECTm.total_minted,k.total_killed,m.total_minted - k.total_killed as survivors,69 as winners_target,g.start_time as game_start,date_diff('day', g.start_time, NOW()) as days_running,