• i think u needed the recordid as well,,,

    with CTE

    as

    (

    select *, ROW_NUMBER() over (PARTITION by productid,productclass,producttype,orderdate order by orderdate) as rn

    from tmpOrders

    )

    select * from CTE where rn>1;