Re: count distinct support?

"Michael Toth" <[email protected]>
Newsgroups gmane.comp.db.mysql.perl
Message-ID <[email protected]>
On Thu, 10 Nov 2005 08:17:54 -0800, Dave Dyer wrote
> At 06:43 AM 11/10/2005, Simon Rees wrote:
> >On Thursday 10 November 2005 00:48, Dave Dyer wrote:
> >> Current version of dbd-mysql doesn't seem to support COUNT(DISTINCT xx)
> >> support, although current versions of mysql do:
> >
> >It works for me. The only slight difference is I'm using a column alias. 
e.g:
> >
> >SELECT COUNT( DISTINCT m.id ) AS count
> >FROM mortgage_cases m
> >...
> >
> >Give that a try. I'm using MySql 4.0.18, DBI 1.41 and DBD-mysql 3.0002
> 
> No joy here, using mysql 4.0.25 
> DBD-mysql 3.0002: up to date.
> DBI 1.48: up to date.
> 
> The exact query is
> SELECT COUNT ( DISTINCT ip) as count FROM hit WHERE client='1' AND 
> latitude>=1000 AND longitude>=1000 AND (date > 1131034482 AND date 
> <= 1131639282)
> 
> I've attached the schema
try (I think the <space> after count is the problem)  =)

SELECT COUNT( DISTINCT ip) as count FROM hit WHERE client='1' AND 
 latitude>=1000 AND longitude>=1000 AND (date > 1131034482 AND date 
 <= 1131639282)




--
[ Toth ]
(Warning: This message may cause you to understand something)


-- 
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.