<table border="0" cellpadding="0" cellspacing="0"><tr><td style="font: inherit;" valign="top"><br />select * from (<br
/>SELECTDISTINCT a, b, c, now(), count(item_pk)<br />FROM product<br />LEFT JOIN item ON item.product_fk =
product_pk<br/>WHERE ...<br />GROUP BY a, b, c<br />) t1 where not exists (select a,b,c, from navigation t2 where t2.a
=t1.a and t2.b = t1.b and t2.c = t1.c)<br /><br />--- On <b>Thu, 6/26/08, Tarlika Elisabeth Schmitz
<i><postgresql@numerixtechnology.de></i></b>wrote:<br /><blockquote style="border-left: 2px solid rgb(16, 16,
255);margin-left: 5px; padding-left: 5px;">From: Tarlika Elisabeth Schmitz <postgresql@numerixtechnology.de><br
/>Subject:[SQL] exclude part of result<br />To: pgsql-sql@postgresql.org<br />Date: Thursday, June 26, 2008, 11:35
PM<br/><br /><pre>SELECT DISTINCT a, b, c, now(), count(item_pk) <br />FROM product<br />LEFT JOIN item ON
item.product_fk= product_pk<br />WHERE ...<br />GROUP BY a, b, c<br /><br /><br />I have another table'navigation'
whichalso has the columns a,b,c<br /><br />If the combination of (a,b,c) exists in 'navigation', then exclude it<br
/>fromabove result. How can I achieve this?<br /><br />--<br /><br /><br />Best Regards,<br /><br />Tarlika Elisabeth
Schmitz<br/><br /><br />A: Because it breaks the logical sequence of discussion<br />Q: Why is top posting bad? <br
/><br/>-- <br />Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)<br />To make changes to your
subscription:<br/>http://www.postgresql.org/mailpref/pgsql-sql</pre></blockquote></td></tr></table><br />