Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

SQL course: reporting with SQL: Counting groups challenge 1 out of 2 help!

This is the code I have come up with. I have tried to consider what else it could possibly be but have not had any ideas.

SELECT genre, COUNT(genre) AS genre_count FROM books GROUP BY genre;

I also came to the same conclusion. The error produced is useless ("Bummer: Your query didn't perform the correct count.")

2 Answers

Mita Una
PLUS
Mita Una
Courses Plus Student 1,123 Points

This is EXACTLY what I have, and I'm also struggling. Anyone have an answer to this?

SELECT genre FROM books GROUP BY (genre), genre_count;