Query editor
WITH friends AS (SELECT subject, evt_block_time, ethAmount, shareAmount, CAST(ethAmount AS DOUBLE)/1e18 AS Volume, (CAST(ethAmount AS DOUBLE)/CAST(shareAmount AS DOUBLE))/1e18 AS PriceFROM friendtech_base.FriendtechSharesV1_evt_TradeWHERE subject = 0x976e80df570e6f314396300ea77cb2e7b2f84172 --Vombatus_ethAND CAST(shareAmount AS DOUBLE) > 0),Price AS (SELECTDATE(evt_block_time) AS DATE, AVG(Price) AS Avg_Price, SUM(Volume) as VolumeFROM friendsGROUP BY 1)SELECT * FROM Price