Skip to main content
added 190 characters in body
Source Link
unidha
  • 2.6k
  • 5
  • 40
  • 61

When I run

select count() from attachment ; it returns 3099 .

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment ; it return 3099

when I run

Select count(Parent.Type) from Attachment ; -- it return 3091

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment order by Parent.Type; it return 3050

I played with SOQL above today and I have no idea why it returns data count differently.Which one is accurate?

The aggregate value still return null but total count is different between select count() from attachment.

enter image description here

When I run

select count() from attachment ; it returns 3099 .

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment ; it return 3099

when I run

Select count(Parent.Type) from Attachment ; -- it return 3091

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment order by Parent.Type; it return 3050

I played with SOQL above today and I have no idea why it returns data count differently.Which one is accurate?

When I run

select count() from attachment ; it returns 3099 .

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment ; it return 3099

when I run

Select count(Parent.Type) from Attachment ; -- it return 3091

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment order by Parent.Type; it return 3050

I played with SOQL above today and I have no idea why it returns data count differently.Which one is accurate?

The aggregate value still return null but total count is different between select count() from attachment.

enter image description here

Source Link
unidha
  • 2.6k
  • 5
  • 40
  • 61

Query return different data count

When I run

select count() from attachment ; it returns 3099 .

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment ; it return 3099

when I run

Select count(Parent.Type) from Attachment ; -- it return 3091

when I run

Select Name,Id,ParentId,Parent.Type,Owner.Name,Owner.Id ,Owner.IsActive ,ContentType,isPrivate from Attachment order by Parent.Type; it return 3050

I played with SOQL above today and I have no idea why it returns data count differently.Which one is accurate?