From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org> |
Subject: | SQL Question |
Date: | 2006-05-24 22:06:53 |
Message-ID: | 20060524220653.76449.qmail@web33307.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
i'm setting up a system that will record passes or
fails for a given inspection.
i have created a t_inspect_result table with three
columns (to keep it simple) - inspect_id (fk to
t_inspect.inspect_id), inspect_pass (boolean),
inspect_date.
to keep it simple, let's say i have qa (quality
assurance) and ft (functional test) inspections.
i need to generate a report that will let me know if a
given serial number has any inspections that have not
yet had a pass (still a failed unit for that test node
- qa or ft).
i must add that a unit can go through qa twice... for
example
qa test 1
fail
fail
pass
ft 1
pass
... more work done ...
qa test 2
pass
given this structure, and hopefully i've communicated
it well enough, i'm concerned that it might be
difficult to weed out qa 1 fail followed by qa 2 pass.
that is...
qa test 1
fail
... the bizrre happens ...
qa test 2
pass
how can i go about finding the qa test 1 failure?
if i did a inspect_date descending query with a limit
of 1, i'd get a pass and miss the failure.
i think it has to do with "group," but i'm not mind
gripping the concept.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2006-05-25 03:30:40 | Re: SQL Question |
Previous Message | Brad Nicholson | 2006-05-24 21:10:45 | Re: PostgreSQL Update + (PGISDBRU) PGSQL is Slow Debunked |