Lorang Jacques wrote:

> Hello,
> How can I limit the query to those rows where "SUM(value) as Tot > 0". If I
> put it in an where clause it get an error. So how to do that
> SELECT id,url,title,description,top,keyword,SUM(value) as Tot FROM links
> LEFT JOIN keywords on links.id=keywords.LinkId Group by id order by tot desc

SELECT id,url,title,description,top,keyword,SUM(value) as Tot FROM links LEFT
JOIN keywords on links.id=keywords.LinkId Group by id order by tot desc HAVING
Tot>0

--Bill




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to