Estou tentando fazer o seguinte SELECT:
SELECT P.Nome,P.TipoId,P.QuantidadeMensal FROM StockPhotos.Pacote P GROUP BY P.QuantidadeMensal;
Porém estou recebendo essa mensagem de erro:
Mensagem 8120, Nível 16, Estado 1, Linha 2
Column 'StockPhotos.Pacote.Nome' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Não estou entendendo qual é o problema, pois Nome
está sendo selecionado.