• the OP's data as sample data:

    i got that far, but my eyes blurred on the expectations:

    With MySampleData (Date, Name, ID, Result )

    AS

    (

    SELECT CONVERT(datetime,'3/18/2013') ,'A',1,5 UNION ALL

    SELECT '3/18/2013','B',2,16 UNION ALL

    SELECT '3/18/2013','C',3,21 UNION ALL

    SELECT '3/18/2013','D',4,11 UNION ALL

    SELECT '3/18/2013','E',5,45 UNION ALL

    SELECT '3/18/2013','F',6,22 UNION ALL

    SELECT '3/18/2013','G',7,5 UNION ALL

    SELECT '3/19/2013','A',1,2 UNION ALL

    SELECT '3/19/2013','B',2,7 UNION ALL

    SELECT '3/19/2013','C',3,15 UNION ALL

    SELECT '3/19/2013','D',4,9 UNION ALL

    SELECT '3/19/2013','E',5,19 UNION ALL

    SELECT '3/19/2013','F',6,12 UNION ALL

    SELECT '3/19/2013','G',7,3

    )

    select * from MySampleData

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!