how to retrieve groupby results from a table using URL query?

raghuapce
Kilo Contributor

ex:

table name: salesData

DAY         SALES

Mon         12

Tue         66

wed         33

Thu         45

Fri             68

I would like to get the above results in JSON format while querying through URL but i dont know how to use groupby function in url to query table. Please help me!

2 REPLIES 2

solymyr
Kilo Expert

take a look at this link: Navigating by URL - ServiceNow Wiki


I think you might find the solution in section 2.


And particulary this line will interest you, I think: sysparm_query=priority=2^active=true^EQ^GROUPBYcategory


I would like to use aggregate function (MIN, MAX, SUM, COUNT, AVG) in URL query along with groupby function.