Hmmm, using "distinct email" in a query where you want
to count email won't work.

select mail, count(mail) as mailcnt from guest
where voted='yes'
group by mail
order by mailcnt;

should do the trick.

On Tue, April 3, 2007 12:51, Me2resh Lists wrote:
> hi
> i need help regarding a sql query in my php app.
>
> the query is :
>     $SQL = "SELECT DISTINCT(EMail) FROM mena_guests WHERE Voted = 'yes'
> LIMIT $startingID,$items_numbers_list";
>
> i want to sort this query by the number of the repeated EMail counts.
> can anyone help me with that please ?
>
> --
> This message has been scanned for viruses and
> dangerous content by OpenProtect(http://www.openprotect.com), and is
> believed to be clean.
>
>


-- 
Later

Mogens Melander
+45 40 85 71 38
+66 870 133 224



-- 
This message has been scanned for viruses and
dangerous content by OpenProtect(http://www.openprotect.com), and is
believed to be clean.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to