Odd SQL error

"M. A. Sridhar" <[email protected]> Mon, 17 Jul 2006 10:20:35 -0700 (PDT)
Newsgroups gmane.comp.db.mckoi
Message-ID <[email protected]>
Hello,
 
Here is a query that produces a strange error:
 
select Address.city as atr_0, count(Address.line_1) as atr_1 from Address,Product where Product.address = Address.address_id and Product.inactive = '0' and Product.orgName = 2 group by Address.city order by 1,2
 
The error is:
'count' can only be used as an aggregate function.
But if I remove the '2' in the order by clause, the problem goes away. This means that Mckoi cannot order by aggregate functions, it seems. I'm rather surprised. Any comments? Fixes/changes?

Thanks in advance.
M. A. Sridhar 
m_a_sridhar at yahoo dot com