17. Write a SELECT query for the palateE4 database that produces a result grid listing paintName, and a count of the occurrences of each paintName value where the count for each paintName is greater than 2. Sort the result grid in ascending sequence by paintName.

Respuesta :

Answer:

SELECT paintname, COUNT(paintname) as count_paintname

FROM paint

GROUP BY paintname HAVING COUNT(paintname) > 2

ORDER BY paintname

Explanation:

The structured query language or SQL statement returns two columns of paintname and the count of the distinct paint names in the paint table with rows of grouped paint names greater than two and in the ascending order of the names.