Firebase aggregate values over property without fetching all relevant documents
问题 I have the following firebase structure: { "company1": { "name": "Company One", "invoices": { "invoice1": { "amount": 300, "currency": "EUR", "timestamp": 1572608088 }, "invoice2": { "amount": 460, "currency": "EUR", "timestamp": 1572608088 } } } } That is to say: I have a collection companies . There is a document for each company. Each company has a subcollection invoices . Each invoice has the properties amount , currency , timestamp . Is there an efficient way of getting the sum of all