Query editor
WITH usernames AS (SELECTcall_tx_from AS wallet,_username AS usernameFROM newthrone_base.GamePool_call_changeUsername), ETH_Price AS (SELECTDATE_TRUNC('hour', minute) AS "DATE",AVG(price) AS PriceFROM prices.usdWHEREsymbol = 'ETH' AND blockchain IS NULLGROUP BY1)SELECTDATE_TRUNC('hour', evt_block_time) AS hour_block,COUNT(*) AS number_of_attacks /* You can include other aggregations or details here if needed */FROM newthrone_base.GamePool_evt_AttackResult AS aLEFT JOIN ETH_Price AS bON DATE_TRUNC('hour', evt_block_time) = b.DATEWHEREevt_block_time >= CURRENT_TIMESTAMP - INTERVAL '7' dayGROUP BY1ORDER BYhour_block DESC