I’m partial to Window Functions because you don’t have to mess with Sub-Queries.
I’m not sure what you are joining to the Quotes but assuming that you want the Last Quote for a Part you would join the tables and create a calculated field. The formula would then be something like:
LAST_VALUE(QuoteDtl.QuoteNum) OVER (PARTITION BY QuoteDtl.PartNum ORDER BY
QuoteDtl.QuoteNum ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
There are probably other ways to do this, but this is how I would. You need to have three queries: 1) your top level, “All Parts”, 2) an innersubquery called “MaxQuoteNum” and 3) another innersubquery called “QuoteDetails”.
1 & 2 are connected via PartNum
2 & 3 are connected via MaxQuoteNum and QuoteNum (see below)