Re: How To Exclude True Values - Mailing list pgsql-sql

From Richard Broersma Jr
Subject Re: How To Exclude True Values
Date
Msg-id 20060608010321.70607.qmail@web31812.mail.mud.yahoo.com
Whole thread Raw
In response to Re: How To Exclude True Values  (<operationsengineer1@yahoo.com>)
List pgsql-sql
> 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 


pgsql-sql by date:

Previous
From:
Date:
Subject: Re: How To Exclude True Values
Next
From: George Handin
Date:
Subject: Query to return modified results at runtime?