Hi Sam,

I'm not quite sure what you want the query to return, but you've got a problem with your parentheses. You've got two FROM clauses and an INNER JOIN, which together aren't arranged properly. I've rearranged your query a little, but I haven't changed anything. Perhaps this'll make it a little clearer to you.

On Jan 2, 2004, at 10:49 AM, Samuel Tardieu wrote:

In PostgreSQL 7.4, the following select:

select texten, total
from (select protocolid, count(*) as total)
from ips
where catid=1
group by protocolid order by protocolid) as c
inner join protocols using (protocolid);

If you explain a little more what your query is trying to return, I might be able to help more.


Michael Glaesemann
grzm myrealbox com


---------------------------(end of broadcast)--------------------------- TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to