Skip site navigation (1) Skip section navigation (2)

Re: exclude part of result

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: exclude part of result
Date: 2008-06-27 06:48:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-sql
am  Fri, dem 27.06.2008, um  0:35:38 +0100 mailte Tarlika Elisabeth Schmitz folgendes:
> 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?

For instance with EXCEPT.

Regards, Andreas
Andreas Kretschmer
Kontakt:  Heynitz: 035242/47150,   D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID:   0x3FFF606C, privat 0x7F4584DA

In response to

pgsql-sql by date

Next:From: Tarlika Elisabeth SchmitzDate: 2008-06-27 06:51:36
Subject: Re: exclude part of result
Previous:From: Tarlika Elisabeth SchmitzDate: 2008-06-26 23:35:38
Subject: exclude part of result

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group