• based on your data, and some substantial cleanup of what you pasted,(year 2104) i get a max of 60 shipped for week 2:

    ;WITH MyCTE([Invtid],[Case_ship],[Trandate],[FiscYr],[PerPost],[week_period],[day_period])

    AS

    (

    SELECT 'A',CONVERT(int,'10'),convert(date,' 1/1/2014'),'2014',' 1',' 1',' 1' UNION ALL

    SELECT 'A','3',' 1/1/2014','2014',' 1',' 1',' 1' UNION ALL

    SELECT 'A','50',' 1/2/2014','2014',' 1',' 1',' 2' UNION ALL

    SELECT 'A','30',' 1/3/2014','2014',' 1',' 1',' 3' UNION ALL

    SELECT 'A','20',' 1/9/2014','2014',' 1',' 2',' 2' UNION ALL

    SELECT 'A','5',' 1/9/2014','2014',' 1',' 2',' 2' UNION ALL

    SELECT 'A','20','1/10/2014','2014','1','2','3' UNION ALL

    SELECT 'A','60','1/10/2014','2014','1','2','3'

    )

    SELECT max(Case_Ship),datepart(week,Trandate) FROM MyCTE group by datepart(week,Trandate) order by datepart(week,Trandate) ;

    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!