I am having problems writing a query.
My query is
Code:
SELECT
V_MSTR_PO.CUST_PART,
V_MSTR_PO_PART_PRICE.PRICE_PER_UNIT,
V_MSTR_PO_PART_PRICE.PRICE_EFF_DATE,
V_MSTR_PO.CURR_CODE,
V_MSTR_PO.MULT_RATE_FUNC
FROM
V_MSTR_PO,
V_MSTR_PO_PART_PRICE
WHERE
V_MSTR_PO_PART_PRICE.KEY_ID = V_MSTR_PO.KEY_ID
But I only want to pull in the latest PRICE_PER_UNIT. I know I need to do a subquery and return the max PRICE_EFF_DATE but I can't figure out how to do it. Can somebody please help me?