I have two tables, organisations and opportunities, linked by a one-to-many relationship on the organisation ID. The opportunity table contains a flag `is_active`, value either 0 or 1. 

I want to determine whether any given organisation has any active opportunities. 

I've written this in mySQL:

```
SELECT orgreg.orgreg_id AS id, orgreg.name AS name, 
  orgreg.doit_uuid As uuid, SUM(oppreg.is_active) AS active
FROM orgreg 
INNER JOIN oppreg ON orgreg.orgreg_id = oppreg.orgreg_id
GROUP BY orgreg.orgreg_id 
ORDER BY orgreg.name ASC

```

If `active` is greater than zero, at least one opportunity is active, which is what I want to test.

However, if the organisation has no opportunities, a result is not returned.

EDIT

Can members suggest a better way of answering the original question that lists *all* organisations with an `active` element that is either 0 or 1, 0 if there are no opportunities or they are all inactive.