Query editor
SELECTDATE_TRUNC('hour', time) AS time,SUM(lsdoge_amount) AS nett_purchase_lsdoge,SUM(value_lsdoge) AS value_trade,COUNT(action) AS total_tx,AVG(price_lsdoge) AS avg_lsdoge_price,-- AVG(price_weth) AS avg_weth_price,-- AVG(price_weth)/AVG(price_lsdoge) AS lsdoge_per_eth,(AVG(price_lsdoge) - LAG(AVG(price_lsdoge)) OVER (ORDER BY DATE_TRUNC('hour', time))) / LAG(AVG(price_lsdoge)) OVER (ORDER BY DATE_TRUNC('hour', time)) * 100 AS price_change_pctFROMquery_2423816-- WHERE price_lsdoge < 400 -- ** to remove outlier, not recommendedGROUP BY1ORDER BY 1 DESC