User Story
As a Salesforce administrator,
I want to retrieve a list of all accounts in the healthcare industry along with their related contacts and the cases associated with each contact,
so that I can better understand the relationships between healthcare accounts, their key contacts, and any support cases they have opened.
Code
List<Account> accountsWithContactsAndCases = [
SELECT Id, Name,
(SELECT Id, LastName,
(SELECT Id, Status FROM Cases)
FROM Contacts)
FROM Account
WHERE Industry = 'Healthcare'
];