"james stuart" <[EMAIL PROTECTED]> wrote:
> I'm hope somebody can help me get unstuck here -
> 
> I'm trying to use an aggregate function in a select statement but it appears
> that you can't use one as a column -
> 
> SELECT number, name, (SELECT COUNT(*) FROM pet WHERE employee.number =
> pet.number) AS pets FROM employee
> 
> I can't come up with another way of doing this, or working out what I'm
> doing wrong.

There is a bug in SQLite that prevents it from working
correctly with aggregate functions is correlated subqueries.
This is going to be something that is very difficult to fix
and so I have not yet started to fix it :-)  See the ticket
at

   http://www.sqlite.org/cvstrac/tktview?tn=2652

--
D. Richard Hipp <[EMAIL PROTECTED]>


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

Reply via email to