From: | <operationsengineer1(at)yahoo(dot)com> |
---|---|
To: | "pgsql-sql(at)postgresql(dot)org" <pgsql-sql(at)postgresql(dot)org> |
Subject: | Refactor Query... |
Date: | 2006-06-12 18:11:42 |
Message-ID: | 20060612181142.30113.qmail@web33304.mail.mud.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
hi all,
i'm trying to refactor this query:
http://www.rafb.net/paste/results/RnkFWZ46.html
i've added notes to make its function a bit more
clear. i have trie dto refactor it to get rid of the
"distinct on" function, but i've had no luck.
due to all the WHERE clauses, i can't figure out how
to do an inner join with something like this:
select max(t_inspect_result.inspect_result_timestamp)
as mstamp,
t_inspect_result.inspect_id
from t_inspect_result
group by t_inspect_result.inspect_id
) AS b
thanks in advance...
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | operationsengineer1 | 2006-06-12 20:19:55 | Re: Refactor Query... SOLVED |
Previous Message | Aaron Bono | 2006-06-12 14:42:48 | Fwd: COPY to table with array columns (Longish) |