From: Jeremy F. <je...@go...> - 2004-09-10 22:02:45
|
On Fri, 2004-09-10 at 12:05 +0200, Marcin Wojdyr wrote: > Hi, > I needed to answer question like this: > > -- How many people have at least one address with given zip > SELECT COUNT(DISTINCT person.id) FROM person, address > WHERE address.person_id = person.id AND address.zip = 50482 I thought about this, but SQLite doesn't support the count(distinct ...) syntax - you need to use a sub-select. So I punted and left it to stuff which should be common to all databases. > BTW, are there any plans to include distinct and index patches to SQLObject? I haven't got any feedback about them. I guess I should stick them in the SF patch manager... J |