Rob van Maris <[EMAIL PROTECTED]> wrote: > > SELECT COUNT(DISTINCT news.number,urls.number) AS number FROM > > mm_news news,mm_insrel insrel,mm_urls urls WHERE news.number > > IN (396) AND (news.number=insrel.snumber AND urls.number=insrel > > > > but I do not think this last query can be made with the > > SearchQuery frame work. > > Correct. This is quite an unusual construction, and I'm not so sure it's > commonly supported by databases. > > > Btw, I just discoved that also my postgresql 7.3 chokes in > > this last syntax (how silly), but mysql has no problems. > > This demonstrates my point. >
But does this justify that it also cannot be supported in MMBase?; even if your database supports it (mysql, a quite commond database), you cannot use it now. The syntax is e.g. also very cleary explained in: http://www.w3schools.com/sql/func_count_distinct.asp I consider it a bug that it is not possible a database like postgresql. Anyhow, for the moment, <mm:size /> is throwing an unsupportedoperation exception if your query contains not 1 field (unless it is a NodeQuery, in which case the count(distinct can simply be done on the 'number' field). Michiel -- Michiel Meeuwissen Mediapark C101 Hilversum +31 (0)35 6772979 nl_NL eo_XX en_US mihxil' [] ()
