Select w/ Max

  • select * from (select top 1 * from AAA where loaded_unloaded ='U' order by scale_dt desc)A

    UNION

    select * from (select top 1 * from AAA where loaded_unloaded ='L' order by scale_dt desc)B

  • select * from (select top 1 * from AAA where loaded_unloaded ='U' order by scale_dt desc)A

    UNION

    select * from (select top 1 * from AAA where loaded_unloaded ='L' order by scale_dt desc)B

Viewing 2 posts - 16 through 17 (of 17 total)

You must be logged in to reply to this topic. Login to reply