beth
> Schmitz <[EMAIL PROTECTED]> Subject: [SQL] exclude part
> of result To: pgsql-sql@postgresql.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 ...
&
Schmitz <[EMAIL PROTECTED]> wrote:
From: Tarlika Elisabeth Schmitz <[EMAIL PROTECTED]>
Subject: [SQL] exclude part of result
To: pgsql-sql@postgresql.org
Date: Thursday, June 26, 2008, 11:35 PM
SELECT DISTINCT a, b, c, now(), count(item_pk)
FROM product
LEFT JOIN item ON ite
On Fri, 27 Jun 2008 11:33:07 +0200
Harald Fuchs <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Tarlika Elisabeth Schmitz <[EMAIL PROTECTED]> writes:
>
> > PRODUCT table :
>
> > A B C
> > 100 200 300
> > 100 200 301
> > 100 205 300
> > 100 205 301
>
> > NAVIGATION table
> > A B C
Hi,
Two other ideas...
SELECT DISTINCT p.a, p.b, p.c, now(), count(item.item_pk)
FROM product p
JOIN
(select distinct a,b,c from products
except
select distinct a,b,c from navigation
)foo
USING (a,b,c)
LEFT JOIN item ON item.product_fk = product_pk
WHER
In article <[EMAIL PROTECTED]>,
Tarlika Elisabeth Schmitz <[EMAIL PROTECTED]> writes:
> PRODUCT table :
> A B C
> 100 200 300
> 100 200 301
> 100 205 300
> 100 205 301
> NAVIGATION table
> A B C #ITEMS
> 100 200 300 5
> 100 200 301 6
> My query needs to return
> 100 205 300 #items
> 100 205 30
z [mailto:
> [EMAIL PROTECTED]
>
> To: pgsql-sql@postgresql.org
>
> Date: Fri, 27 Jun 2008 00:35:38 +0100
>
> Subject: [SQL] exclude part of result
>
>
> SELECT DISTINCT a, b, c, now(), count(item_pk)
> FROM product
> LEFT JOIN item ON item.product_fk = prod
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 co
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