Histogram: Fixing bug in grouping query.
Histogram: Fix plotting more than one ids.