Have you tried the "best choice" pattern -- where you select the set of candidate rows and then exclude those for which a better choice exists within the set? I often get better results with this pattern than with the alternatives. Transmuting your query to use this patter gives: select PlayerID,AtDate from Player a where PlayerID='22220' and not exists (select * from Player b where b.PlayerID = a.PlayerID and b.AtDate > a.AtDate); >>> K C Lau <[EMAIL PROTECTED]> 09/21/05 11:21 PM >>>
select PlayerID,AtDate from Player a where PlayerID='22220' and AtDate = (select b.AtDate from Player b where b.PlayerID = a.PlayerID order by b.PlayerID desc, b.AtDate desc LIMIT 1); ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly