Re: SQL Question

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: operationsengineer1(at)yahoo(dot)com
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: SQL Question
Date: 2006-01-07 02:26:51
Message-ID: 20060107022651.GA27664@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Fri, Jan 06, 2006 at 04:02:53PM -0800, operationsengineer1(at)yahoo(dot)com wrote:
> t_sn
> sn_id
> sn
>
> t_inspect
> inspect_id
> sn_id (fkey)
> inspect_pass (boolean)
>
> i want to display all sns where there is not a single
> instance of inspect_pass = t

There are several ways to do this, e.g., a query with NOT IN or a
join with a COUNT or SUM aggregate and a HAVING clause. What have
you tried so far?

--
Michael Fuhr

In response to

  • SQL Question at 2006-01-07 00:02:53 from operationsengineer1

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Tom Lane 2006-01-07 04:35:48 Re: primary key on lower(varchar)
Previous Message me 2006-01-07 00:28:07 primary key on lower(varchar)