I am utilizing the Account object to store both the Customer Account and its associated Billing accounts. How do I write a SOQL query to pull all billing accounts related to the customer account.
In the below image you can see the first account as Customer Account and all the below records are billing accounts related with the first Customer. The current relationship is using the Id field of the Customer Account to ParentId field of the Billing Accounts.
How do I write a SOQL to pull in related records if it is in the same object?