Skip to content

Instantly share code, notes, and snippets.

Created September 24, 2012 20:56
Show Gist options
  • Save anonymous/3778325 to your computer and use it in GitHub Desktop.
Save anonymous/3778325 to your computer and use it in GitHub Desktop.
DataMapper output.
data = AggregateOpenTicket.aggregate(
:date,
:type,
:amount.sum,
:order => [ :date.asc ]
)
output:
[
[Sun, 23 Sep 2012, "INCIDENT", 426],
[Sun, 23 Sep 2012, "SR", 293],
[Mon, 24 Sep 2012, "INCIDENT", 358],
[Mon, 24 Sep 2012, "SR", 293]
]
desired output:
[
[Sun, 23 Sep 2012, 293, 426],
[Mon, 24 Sep 2012, 293, 358]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment