Shop Summary
SQL practice problem 16 of 67 · Aggregation · Easy · 10 coins for your first accepted solve
For each item category, return category, item_count and avg_price (rounded to 2 decimals).
Sort by category ascending.
Schema
CREATE TABLE items (
id INT PRIMARY KEY,
name TEXT NOT NULL,
category TEXT NOT NULL,
price NUMERIC(8,2) NOT NULL
);
Write your query in the browser, run it on the sample data, then submit it against hidden test data.
Previous: Nations of the Arena · Next: Busy Days · All problems