removed locations id from select
added rest of select to group by
fixed group by for chart data
fixed typo