I need to find the total number of logins per day, but how would I select count() and group by day in DQL? I'm using Doctrine 2.3.
public function getLoginCount()
{
return $this->createQueryBuilder('i')
->select('i') // and count(*)
->groupBy('i.timestamp') // group by day
->getQuery()
->execute()
;
}
I need something like this:
Date | count
2013-01-01 | 6
2013-01-02 | 7
2013-01-03 | 3