Added GROUP BY to database:select