I am using the following SOQL query to get the documents attached to an account:
select LinkedEntityId
, ContentDocument.Title
, ContentDocument.ContentSize
,ContentDocument.Description
, ContentDocument.FileExtension
, ContentDocument.FileType
, ContentDocument.Id
, ContentDocument.ContentAssetId
, ContentDocument.LatestPublishedVersion.VersionData
, ContentDocument.LatestPublishedVersion.PathOnClient
,ContentDocument.CreatedBy.Name
FROM ContentDocumentLink
WHERE LinkedEntityId in (SELECT Id from Account where id='0014W00002nVX2KQAW')
I need to include the account Name in the result. How can I join to the account table? Thanks in advance.