Welcome to the Treehouse Community
Looking to learn something new?
Anthony Kanellis5,150 Points
unique genre count
Challenge says it didn't perform the correct count? My code: SELECT DISTINCT genre, COUNT(*) AS "total_genres" FROM books GROUP BY genre;
Leandro Botella Penalva17,618 Points
In your SQL you are counting repeated genres. To count unique genres you must use DISTINCT inside the COUNT function as well like this example:
SELECT COUNT(DISTINCT column_name) FROM table_name;