Group by query in Service-now!!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-16-2011 08:08 AM
Hi,
Any one can reply me how we write this query in Service-now.
SELECT INC_NO, MAX (LAST_MODIFIED_DATE_TIME) FROM TABLE_NAME WHERE ACTIVE = 'true' GROUP BY INCIDENT_NO
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-18-2011 06:15 PM
Need more details...
You syntax suggests SQL, which would only apply in a DB view. Where are you trying to provide this logic? Can you provide your business case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 02:54 AM
Hi Alok,
The answer you are looking for depends on use case.
1. If you want this to be applied on list view of a table, directly click on filter option available in top left corner and set active as true. Once data is presented then right click on header "INCIDENT_NO" and select option "group by".
2. If you wanna code use Glide Aggregate API's groupBy method to achieve this