Re[2]: [PHP-DB] Re: MySQL query, using DISTINCT...

From: Date: Tue, 06 Jul 2004 13:22:28 +0000
Subject: Re[2]: [PHP-DB] Re: MySQL query, using DISTINCT...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-35136@lists.php.net to get a copy of this message
Hello Tristan, Select count(id) as howmany, file_name, email from completed_downloads where bu='reech' and date BETWEEN '2004-06-01' AND '2004-06-30' group by file_name, email >> > I have a system that tracks downloads, capturing loadsa info, but of >> > interest here, is email and filename. >> > Simply put, I wanna show all results where file name AND email are TPrsc> unique. >> > (so if email '123@hotmail.com' has filename 'word.doc' 5 times in >> > a TPrsc> table, >> > I want to only see it once.) >> > >> > What am I doing wrong...? >> > >> > SELECT DISTINCT(file_name, email) FROM >> > completed_downloads WHERE TPrsc> bu = >> > 'reech' AND date BETWEEN '2004-06-01' AND '2004-06-30' >> > >> > Tris... -- Best regards, Pablo

« previous php.db (#35136) next »