pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Broersma Jr <rabroersma@yahoo.com>
To: operationsengineer1@yahoo.com, "pgsql-sql@postgresql.org" <pgsql-sql@postgresql.org>
Subject: Re: How To Exclude True Values
Date: Wed, 7 Jun 2006 18:03:21 -0700 (PDT)
Message-ID: <20060608010321.70607.qmail@web31812.mail.mud.yahoo.com> (raw)
In-Reply-To: <20060607232928.51859.qmail@web33310.mail.mud.yahoo.com>

> i think i've figured out the gist of the thought
> process behind the SQL query...
> 
> 1. select everything from t_inspect_result as table a
> 2. select max timestamp value entries in
> t_inspect_result as table b
> 3. choose only choose those rows where the max
> timestamps of table a and b are equal.
> 
> is that about it?

The one problem with query would be if there is a possibility that two differnt tests will have
the exact same time stamp.

If that is a possibility, then you could use the exact same query structure but replace
Max(timestamp) with max(inspect_result_id) and then join on inspect_result_id instead.

Regards,
Richard Broersma 



view thread (17+ messages)  latest in thread

Message-ID: <20060608010321.70607.qmail@web31812.mail.mud.yahoo.com>
Permalink:  ../20060608010321.70607.qmail@web31812.mail.mud.yahoo.com/
Also on:    postgresql.org/message-id/20060608010321.70607.qmail@web31812.mail.mud.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: rabroersma@yahoo.com
  Subject: Re: How To Exclude True Values
  In-Reply-To: <20060608010321.70607.qmail@web31812.mail.mud.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox