Probe con el sql que me pasaste y me dio este error
Código:
Server: Msg 8120, Level 16, State 1, Line 1
Column 'locales.nombre' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Server: Msg 8120, Level 16, State 1, Line 1
Column 'categorias.grupo' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Server: Msg 8120, Level 16, State 1, Line 1
Column 'categorias.nombre' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Si le saco el group by funciona bien pero me trae registros duplicados, por ejemplo el local GARBARINO aparece tres veces, uno por la categoria Electrónica, uno por la categoría Electrodomésticos y otro por la categoría Informática...