Given a contact ID, I'm looking to get all the contact's information as well as their associated account name (if they have one associated account) or the name of the direct account if they have multiple associated accounts.
The following works if the contact has an associated Account, but isn't handling the case where the contact has no account, and I'm not sure if there's a case of a contact having a single account which isn't direct.
SELECT contactID, contact.FirstName, contact.LastName, Account.Name, contact.Phone, contact.Title, contact.Email, contact.Contact_Type__c, contact.Inactive__c, acr.isdirect FROM AccountContactRelation acr where (contactid = '{markId}' and isdirect = true)