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 trialDonnie Driskell
2,243 Pointssql reporting by example: Day 2 Review (stuck)
I am completely stuck on this one.
Write a query to figure out how many employees are in each job role. SELECT JOBS.ROLE, COUNT(1) FROM EMPLOYEES JOIN JOBS ON EMPLOYEES.JOB_ID = JOBS.ID _____________;
Thanks for any help. Donnie
2 Answers
David Evans
10,490 PointsHi Donnie,
I believe they are looking for you to use the SQL Group By function.
You can read about it here: https://dev.mysql.com/doc/refman/5.7/en/group-by-handling.html
Basically though for the quiz, you'll add the following
GROUP BY JOBS.ROLE
Donnie Driskell
2,243 PointsYes, I did a "GROUP BY" but I barely missed it. I put GROUP BY JOBS (and did not put the .ROLE there)
thanks for the quick response