Hi,
I have a summarize query -
summary = sg.summarize(
entity_type='Version',
filters=[["project", "is", some_project]],
summary_fields=[{'field': 'id', 'type': 'count'}],
grouping=[
{'field': 'entity', 'type': 'entitytype', 'direction': 'asc'},
]
)
And it shows me a count of all versions for a particular entity type. It works great.
However, I’d like to also be able to do this for just the most recently created versions as well.
I can achieve this with a normal Version query and a filter preset like
versions = sg.find(
"Version",
[["project", "is", some_project]],
[],
additional_filter_presets: [{'preset_name': 'LATEST', 'latest_by': 'ENTITIES_CREATED_AT'}]
)
But of course I lose the ability to get a count per entity.
I’m not super familiar with the summarize syntax. Can anyone provide some insight here?
Thanks!
-Mark