Group by name

Resolves #272 and allows Dashboard to run on Postgresql 8.4.