if you are actually executing a query with a subquery, then you must be on 4.1, which is still in "alpha" release status
in any case, you can rewrite your query like this:
Code:
select count(distinct people.ID)
from people
inner
join event
on people.ID
= event.Owner
where event.Place like '%sh%'
and event.Type in ('Birthday', 'Wedding')
the DISTINCT is necessary because while your subquery can return the same person for more than one event, your outer query's use of IN (subquery) effectively counts just distinct people
Bookmarks