I'm trying to do the following SELECT:
SELECT P.Nome,P.TipoId,P.QuantidadeMensal FROM StockPhotos.Pacote P GROUP BY P.QuantidadeMensal;
However, I'm getting this error message:
Message 8120, Level 16, State 1, Line 2
Column 'StockPhotos.Page.Name' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
I'm not understanding what the problem is, since Nome
is being selected.