-
Notifications
You must be signed in to change notification settings - Fork 664
Array
Andrey Gershun edited this page May 27, 2015
·
6 revisions
This aggregator is used to aggregate all values into the array.
Syntax:
ARRAY([DISTINCT] expression)
var res = alasql('SELECT userId, FIRST(userName) AS userName, \
ARRAY({category:category,[count]:[count]}) AS purchases, \
SUM([count]) AS totalCount FROM ? GROUP BY userId, userName',[data]);
See example at jsFiddle
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo