New JSON view
GROUP BY support for buildQuery method