Group by issues

Good afternoon
A little new to sql and would be most grateful if someone could point me in the right direction please?
I run a query on a table that uses a group by statement. the group by has only 8 items.
The sqlleft.png attached screen shot shows my code and the result if all 8 group bys has at least one record
The sqlright.png shows there are only 2 group by items
My question is this, is it possible that if one of the groups by has no records that a 0 is used rather than no count as per my screenshot. In closing I always need to return 8 group by values.
My apologies for my poor explanation

Andrew

If there is no Pressbrake_ID in the select without the group by then you won't get the Pressbrake_ID in the group by either. You should make sure that you always have a Pressbrake_ID. You did not provide us much details but if you join to different tables you should use LEFT JOIN to make sure that Pressbrake_ID isn't dissapearing because of the join to another table.

RogierPronk
Many thanks for you help I sorted it will a left outer join as you kindly suggested

Kind Regards
Andrew