Re: MAX() with Joins and Subqueries

From: Brian E Dick <bdick_at_cox.net>
Date: Tue, 14 Jan 2003 13:59:11 GMT
Message-ID: <PIUU9.63557$t06.3147574_at_news2.east.cox.net>


Your base query is something like the following.

select *
from tbl_doc_ver tdv1
where doc_ver_num = (
select max(doc_ver_num)
from tbl_doc_ver tdv2
where tdv2.doc_id = tdv1.doc_id
and tdv2.domain_id = tdv1.domain_id)

From there you would add the additional columns by adding joins to the outer select.

--
Later,
BEDick
Received on Tue Jan 14 2003 - 14:59:11 CET

Original text of this message