• Jeff Moden wrote:

    wrote:

    SELECT DATEADD(DAY, -DATEDIFF(DAY, 0, [Order Date]) % 7, [Order Date]) AS [Week of],
    COUNT(*) AS Count
    FROM dbo.your_table_name
    GROUP BY DATEADD(DAY, -DATEDIFF(DAY, 0, [Order Date]) % 7, [Order Date])

    Welcome aboard!  That's a great bit of code considering the OP offered almost no details.

    It does seem to assume that weeks start on Mondays (which I totally agree with and is ISO).  We'll see how the OP defines what a week is.

    Not so sure about that.  I live in the middle east and here the week starts at Sunday.  I think that this would also be the case at most Muslim countries since for Muslims Friday is  the holy day so the weekend starts at Friday and not at Saturday.  In any case I  agree with you that the original poster should have write more details.

    Adi