Group By API
Group By API
Is there something like...
[SELECT Country, Region, SUM(sales) AS TotalSales FROM Sales GROUP BY Country, Region;] OR
[SELECT Country, Region, COUNT(*) AS CountryRegionCnt FROM Sales GROUP BY Country, Region;]
in DataTables?
Is there some API to call on the DataTables variable that will provide an aggregation(SUM,COUNT,MAX,etc) on only the filtered rows?
(e.g. user clicks button, a count of distinct filtered rows, based on 2 or more columns)
Thanks
This question has an accepted answers - jump to answer
Answers
There isn't a built in way of doing a group by, but if you just want to could rows use
rows()
to select the rows andcount()
to then count how many were selected.Allan
Thanks Allen for the prompt response. I will certainly give that a try.