Query editor
/*Table(s): wifecoin_bnb.WifeCoin_evt_Transfer, wifimap_polygon.WiFi_Map_evt_TransferReason: Based on contract addresses or possible project names*/WITH Transfer_Combined AS (SELECTcontract_address,evt_tx_hash,evt_index,DATE_TRUNC('day', evt_block_time) AS evt_day,t."from",t."to",valueFROM wifecoin_bnb.WifeCoin_evt_Transfer AS tUNION ALLSELECTcontract_address,evt_tx_hash,evt_index,DATE_TRUNC('day', evt_block_time) AS evt_day,tm."from",tm."to",valueFROM wifimap_polygon.WiFi_Map_evt_Transfer AS tm), Whales AS (SELECTaddress,SUM(amount) AS total_amountFROM (SELECT"to" AS address,SUM(TRY_CAST(value AS DECIMAL(38, 0))) AS amountFROM Transfer_CombinedGROUP BY"to"UNION ALLSELECT"from" AS address,SUM(TRY_CAST(value AS DECIMAL(38, 0))) * -1 AS amountFROM Transfer_CombinedGROUP BY"from") AS transfersGROUP BYaddressHAVINGSUM(amount) > 1000000 /* Define whale threshold here */)SELECTa.address,SUM(a.total_amount) AS total_amount,t.evt_day,t.value AS transaction_valueFROM Whales AS aJOIN Transfer_Combined AS tON a.address = t."to" OR a.address = t."from"GROUP BYa.address,