but I'm sure that wont exactly what OP is looking for. As I understand attempt is to get SUM of Units for distinct comvbination of IDs. But taking just distinct over sum will cause it to consider unit value alone.