SELECT * FROM A ; JOIN B ON A.Cusip=B.Cusip WHERE EXIST ( SELECT * FROM (SELECT Cusip, MAX(Price_Date) as Max_Price_Date FROM B GROUP BY Cusip) dtb WHERE dtb.Cusip = B.Cusip and dtb.Max_Price_Date = B.Price_Date) -- or SELECT * FROM A ; JOIN B ON A.Cusip=B.Cusip JOIN (SELECT Cusip, MAX(Price_Date) as Max_Price_Date FROM B GROUP BY Cusip) dtb ON dtb.Cusip = B.Cusip and dtb.Max_Price_Date = B.Price_Date)>I've created a query that does indeed work the way I want, but I'm not convinced it's the most efficient way to achieve the results. Here's the situation:
>SELECT A.*, > (SELECT TOP 1 Price > FROM B > WHERE A.Cusip=B.Cusip > ORDER BY Price_Date DESC), > (SELECT TOP 1 Price_Date > FROM B > WHERE A.Cusip=B.Cusip > ORDER BY Price_Date DESC), > (SELECT TOP 1 Value > FROM B > WHERE A.Cusip=B.Cusip > ORDER BY Price_Date DESC) >FROM A >>