You can just do this in SQL using some nested queries. Let's assume you have the following tables: Transaction, User, Device, and Group. The transaction table records the transactions of the User on a Device and has an Amount field to sum. A user belongs to a Group.
So you need to sum the Amount for the User, for the Groups and for the Devices used within a Group which will give you SQL that looks like this:
SELECT G.Description AS [Group], D.Description AS Device, U.Description AS UserName, MAX(GT.GroupTotal) AS GroupTotal, MAX(GDT.GroupDeviceTotal) AS GroupDeviceTotal, SUM(T.Amount) AS UserTotal
FROM Transaction AS T
INNER JOIN User AS U ON L.UserId = F.UserId
INNER JOIN Group AS G ON G.GroupId = L.GroupId
INNER JOIN Device AS D ON T.DeviceId = L.DeviceId
INNER JOIN
(SELECT GroupId, SUM(Amount) AS GroupTotal
FROM Transaction
INNER JOIN User ON User.UserId = Transaction.UserId
WHERE (Transaction.TxDate >= '2011-01-01')
GROUP BY User.GroupId) AS GT ON GT.GroupId = U.GroupId
INNER JOIN
(SELECT GroupId, DeviceId, SUM(Amount) AS GroupDeviceTotal
FROM Transaction
INNER JOIN User ON User.UserId = Transaction.UserId
WHERE (TxDate >= '2011-01-01')
GROUP BY GroupId, DeviceId) AS GDT ON GDT.GroupId = U.GroupId AND GDT.DeviceId = T.DeviceId
WHERE (T.TxDate >= '2011-01-01')
GROUP BY G.GroupId, D.DeviceId, U.UserId
ORDER BY GroupTotal DESC, GroupDeviceTotal DESC, UserTotal DESC
Note that the where clause you use has to be the same in the main query and each nested query (this is the "WHERE (T.TxDate >= '2011-01-01')" bit).