In the object Asset
we have a custom lookup field called License__C
and in License__C
there's a custom lookup field called Account__C
i want to receive the amount of assets, per license, per account. Something like that:
the number of assets is determined in the field Quantity
.
i have no idea how to do this, i tried this first but i know its not even near the answer:
select License__r.Account__c, sum(Quantity)
from Asset
group by License__r.Account__c
LIMIT 50
Please help Thanks