Not sure about the tables for DCM, but this works for me using the regular inventory tables:
SELECT<o p=""></o>
_itemguid = i.Guid<o p=""></o>
,Computername = i.Name<o p=""></o>
,TotalMemory = SUM(mem.[Capacity (Bytes)])<o p=""></o>
FROM<o p=""></o>
Inv_HW_Physical_Memory mem<o p=""></o>
INNER JOIN vitem i<o p=""></o>
ON mem.[_ResourceGuid] = i.Guid<o p=""></o>
GROUP BY<o p=""></o>
i.guid<o p=""></o>
,i.Name<o p=""></o>
ORDER BY<o p=""></o>
SUM(mem.[Capacity (Bytes)]) DESC<o p=""></o>