SUM
AVG
MIN
Returns the average.
AVG(expr)
Enter values below to update the example in real time.
category
price
avg_price
products
SELECT category, ROUND(AVG(price)::numeric, 2) AS avg_price FROM products GROUP BY category;