> SELECT number, name, (SELECT COUNT(*) FROM pet WHERE employee.number =
> pet.number) AS pets FROM employee

That seems like it should work, provided the tables have the definitions 
implied by the query.  What error are you getting?

Or you could try something like this completely off-the-cuff-and-untested thing.

select   employee.number,
         employee.name,
         count(pet.name) as petcount
from     employee
         join pet on employee.number = pet.number
group by employee.number, employee.name
order by employee.number, employee.name


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to