Re: exclude part of result

From: Lennin Caro <lennin(dot)caro(at)yahoo(dot)com>
To: pgsql-sql(at)postgresql(dot)org, Tarlika Elisabeth Schmitz <postgresql(at)numerixtechnology(dot)de>
Subject: Re: exclude part of result
Date: 2008-06-27 14:17:11
Message-ID: 811768.24823.qm@web59507.mail.ac4.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


select * from (
SELECT DISTINCT a, b, c, now(), count(item_pk)
FROM product
LEFT JOIN item ON item.product_fk = product_pk
WHERE ...
GROUP BY a, b, c
) 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)

--- On Thu, 6/26/08, Tarlika Elisabeth Schmitz <postgresql(at)numerixtechnology(dot)de> wrote:
From: Tarlika Elisabeth Schmitz <postgresql(at)numerixtechnology(dot)de>
Subject: [SQL] exclude part of result
To: pgsql-sql(at)postgresql(dot)org
Date: Thursday, June 26, 2008, 11:35 PM

SELECT DISTINCT a, b, c, now(), count(item_pk)
FROM product
LEFT JOIN item ON item.product_fk = product_pk
WHERE ...
GROUP BY a, b, c

I have another table 'navigation' which also has the columns a,b,c

If the combination of (a,b,c) exists in 'navigation', then exclude it
from above result. How can I achieve this?

--

Best Regards,

Tarlika Elisabeth Schmitz

A: Because it breaks the logical sequence of discussion
Q: Why is top posting bad?

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Louis-David Mitterrand 2008-06-27 15:11:30 Re: dynamic events categorization
Previous Message Tarlika Elisabeth Schmitz 2008-06-27 11:22:38 Re: exclude part of result