Can this be done using 1 SOQL Query? I came up with the following:
SELECT Id, Name
FROM Profile
WHERE Id in
(SELECT Parent.ProfileId
FROM ObjectPermissions
WHERE SObjectType = 'Account'
AND (PermissionsCreate = true OR PermissionsEdit = true))
But this gives me an error:
The inner select field 'Parent.ProfileId' cannot have more than one level of relationships
This could probably be done in 2 queries, but it would be ideal for me to retrieve in a single result set otherwise I would have to write a script to combine results.