sqlbeginner

Math - Technique 16

Mathematical functions

sql
SELECT product_id,
       round(avg(price), 2) AS avg_price,
       stddev_pop(price) AS volatility
FROM product_prices
GROUP BY product_id;

Use Cases

  • database operations
  • data management

Tags

Related Snippets

Similar patterns you can reuse in the same workflow.