Okay this is confusing. You're using both a windowing function and GROUP BY. I don't think that's right. If all you're doing is looking for duplicates, the simple pattern is like this:
,rn = ROW_NUMBER() OVER (PARTITION BY Subjects.Person, Subjects.Subj
ORDER BY Subjects.Person, Subjects.Subj)
FROM (VALUES ('John','Math'),('John','History'),('John','Math'),
WHERE dupes.rn > 1;
The combination of Person and Total Time is strange. What are you trying to accomplish?