[Fix bug 984588] Aggregate inactive reps in stats dashboard.
PR changes

* Change thead tbody order
* Fix queries and dates
Merge pull request #717 from johngian/984588-aggregate-inactive

[Fix bug 984588] Aggregate inactive reps in stats dashboard.