SQL Quest › SQL Interview Questions › Aggregation & Grouping

Quality Grades With 100+ Products

EasyFreeQuerying BasicsAggregation & Grouping

Show only the quality grades with 100 or more products in our sample. Show type, product_count, avg_tool_wear (rounded to 1 decimal). Order by product_count descending.

Solve it in the browser editor →

Runs on SQLite in your browser, graded against the expected result, no signup. A wrong answer gets a diagnosis, not just "incorrect". Free accounts get 10 free challenge solves, and this can be one of them.

Schema

products

udiproduct_idtypetool_wear_min
5640L52819L180
2171M17030M10
228L47407L168

Expected output: Common quality types only

Hint

GROUP BY type HAVING COUNT(*) >= 100.

Concepts

SELECT GROUP BY HAVING Aggregation

Practise the topic: SQL practice questions · GROUP BY exercises

Read the concept: WHERE vs HAVING

Related questions

Common Building ClassesEasy · FreeQuality Grade DistributionEasy · FreeAverage Sensor ReadingsEasy · FreeFailure Count by ModeEasy · FreeMonthly Spend Per AccountEasy · FreeChargeback Reason Codes: Resolved and Still OpenEasy · Free

Where would this cost you points in an interview?

Ten questions, no signup: a Skillmap across nine SQL skills and the one to fix first.

Take the readiness test