• Ok, I had to refer back to my actual code and you're right; Step 1 should be asking for a MIN DISTINCT c_dt. I've revised the mytable example code, and provided the query that returns the results I'm looking for in step 1. That should help us get to Step 2, which is where I am stuck!

    --===== If the test table already exists, drop it

    IF OBJECT_ID('TempDB..#mytable','U') IS NOT NULL

    DROP TABLE #mytable

    --===== Create the test table with

    CREATE TABLE #mytable

    (

    c_ID INT IDENTITY(10,1),

    c_dt DATETIME,

    c_rep INT,

    )

    --===== All Inserts into the IDENTITY column

    SET IDENTITY_INSERT #mytable ON

    --===== Insert the test data into the test table

    INSERT INTO #mytable

    (c_iD, c_rep, c_dt )

    SELECT '11111','23','2010-09-06 12:00AM' UNION ALL

    SELECT '11111','23','2010-09-07 12:00AM' UNION ALL

    SELECT '11111','23','2010-09-08 12:00AM' UNION ALL

    SELECT '11111','23','2010-09-09 12:00AM' UNION ALL

    SELECT '11111','23','2010-09-10 12:00AM' UNION ALL

    SELECT '11111','25','2010-10-06 12:00AM' UNION ALL

    SELECT '11111','25','2010-10-07 12:00AM' UNION ALL

    SELECT '11111','25','2010-10-08 12:00AM' UNION ALL

    SELECT '11111','25','2010-10-09 12:00AM'

    --===== Set the identity insert back to normal

    SET IDENTITY_INSERT #mytable OFF

    SELECT c_iD ,c_rep, MIN(DISTINCT c_dt) AS c_Date

    FROM #mytable

    GROUP BY c_ID, c_rep

    ORDER BY c_ID, c_rep