• Another option:

    ;with MyRank (col1)

    as

    (

    select 5 union all

    select 4 union all

    select 3 union all

    select 2 union all

    select 1 union all

    select 1 union all

    select 1

    )

    SELECT TOP 5 col1

    FROM MyRank

    GROUP BY col1

    HAVING COUNT(*) = 1

    ORDER BY col1

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2