Only if you assume that ordering by unique_id and by date_sent are equivalent.  That may be the case but I personally hate making assumptions like that.  When someone goes into the database and updates records (clean up bad data, etc.) your perfectly running query can suddenly produce bad results.

-Aaron

On 6/2/06, Klay Martens <[EMAIL PROTECTED]> wrote:

Sorry to stick my nose in here...
would not this work better?

SELECT broadcast_id,date_sent,status from broadcast_history where
unique_id in (
SELECT max(unique_id) from broadcast_history group by broadcast_id);

Seems like a simpler option.

 

Reply via email to