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 = 0x4e5f7e4a774bd30b9bdca7eb84ce3681a71676e1 --cobieAND 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