Try this

select cat, count(elements(co))
                            from Category cat left join cat.Courses co
                            where cat.ParentCategory is null
                            and (co.Visible=true or co.Visible is
null) and (co.Active=true or co.Active is null)
                            group by cat.Id, cat.ParentCategory,
cat.Site, cat.Name, cat.ImageFile
                            order by cat.Name asc

Kind regards

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to