SingleStore DB

Query 2

Finds the most volatile stocks (highest variance in prices).

SELECT stock_symbol, VARIANCE(share_price) var
  FROM trade
  GROUP BY stock_symbol
  ORDER BY var DESC;