I have an custom Invoice object with a look-up relationship to Accounts.
I'm trying to query the data base to get the total number of invoices of the accounts where Connection_Date__c
has a value (Connection_Date__c
is a custom field of Accounts object)
How can I do this? The query I'm using gives me only the number of accounts but not the number of invoices.
SELECT Name,(SELECT name FROM Invoices__r) FROM Account WHERE Connection_Date__c != null