Dit zou de slag moeten slaan:
SELECT
UID,
DATEADD(d, -1, DATEDIFF(d, -1, t.DT)/7 * 7) [WeekBeginDate] ,
SUM(HOURS) AS TOTAL_HOURS
FROM myTable t
WHERE DT >= DATEADD(WEEK, -6, GetDate())
GROUP BY UID, DATEDIFF(d, -1, t.DT)/7
Dit zou de slag moeten slaan:
SELECT
UID,
DATEADD(d, -1, DATEDIFF(d, -1, t.DT)/7 * 7) [WeekBeginDate] ,
SUM(HOURS) AS TOTAL_HOURS
FROM myTable t
WHERE DT >= DATEADD(WEEK, -6, GetDate())
GROUP BY UID, DATEDIFF(d, -1, t.DT)/7