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

Databases Querying Relational Databases Joining Table Data with SQL Outer Joins

GROUP BY

You didnt explain what group by is doing here? I just did not get it

2 Answers

If you rewatch the video you will catch it.

We are answering the question of how many models of each make of car there are. @2:55 he says, lets Group By their common attribute (the value that is shared among the tables) which is MakeName (mk.MakeName) which is what he is typing right after he says it.

Hope that helps!

Giuseppe Ardito
Giuseppe Ardito
14,130 Points

I would recommend to watch the course "Reporting with SQL" in order to get a better understanding of this key word. In particular, the video in question is at this link.