Query editor
WITH metadata AS (SELECTtokenId,MAX(tribe) FILTER(WHERE day = 1) AS tribe_day1,MAX(tribe) FILTER(WHERE day = 5) AS tribe_day5,MAX(tribe) FILTER(WHERE latest_day = 1) AS latest_tribe,MAX(status) FILTER(WHERE latest_day = 1) AS latest_statusFROM query_4837194GROUP BY 1)SELECTcurrent_date,COUNT(*) FILTER(WHERE tx_type = 'mint') AS num_players,COUNT(*) FILTER(WHERE tx_type = 'mint') * 0.1 AS pot_size,800 - COUNT(*) FILTER(WHERE tx_type = 'mint') spots_left,COUNT(*) FILTER(WHERE tx_type = 'sale') AS num_sales,COUNT(*) FILTER(WHERE tx_type = 'transfer') AS num_transfers,AVG(price_usd) FILTER(WHERE tx_type = 'sale') AS avg_sale_price,SUM(price_eth) FILTER(WHERE tx_type = 'sale' AND rn_tx_latest = 1) AS latest_sale_price,MAX(DATE_FORMAT(transfer_date, '%m-%d-%Y %H:%i:%S')) FILTER(WHERE tx_type = 'transfer') AS latest_transfer_ts,MAX(DATE_FORMAT(transfer_date, '%m-%d-%Y %H:%i:%S')) FILTER(WHERE tx_type = 'sale') AS latest_sale_ts,(SELECT COUNT(tokenId) FROM metadata WHERE latest_status = 'Alive' AND latest_tribe != 'resurrection') AS num_alive,-(SELECT COUNT(tokenId) FROM metadata WHERE latest_status LIKE '%Eliminated%') AS num_eliminated,(SELECT COUNT(tokenId) FROM metadata WHERE latest_tribe = 'resurrection' AND latest_status = 'Alive') AS num_in_resurrectionFROM query_4816397