Hi all,
Another question on getting a record for the most recent date...
I have a list of prices in a table and I need to get the most recent price for a specified item.
I've got the following query which correctly brings back the most recent price:
Would I be able to optimize this query so I don't need to have the select MAX() subquery?
Thanks as always
Craftor

Another question on getting a record for the most recent date...
I have a list of prices in a table and I need to get the most recent price for a specified item.
I've got the following query which correctly brings back the most recent price:
Code:
select priceID, price_date, price_value
from real_time_prices
where priceID = 1003
and price_date = (select max(price_date) from real_time_prices where priceID = 1003)
Would I be able to optimize this query so I don't need to have the select MAX() subquery?
Thanks as always
Craftor