Reputation: 402
My table has three column
created(Date)
score(int)(value is between 1-3)
id(long)
currently I am using Grails(GORM)
def listData= DaSes.createCriteria().list([max: 5, order: 'desc', sort: 'created']) {
projections {
groupProperty('created')
count('id')
}
}
[[date,count(of all scores)],[date,count(of all scores),...]
But I want result like this
[[date,count(of all scores),count(score1 for current day),count(score2 current day),count(score3 current day)],....]
Please guide me in this .
Upvotes: 3
Views: 788
Reputation: 56
This is logically not possible.If you are using Group by on multiple columns then it gives
And this result is correct.
Upvotes: 3