Cześć, pomóżcie znaleźć błąd, błąd zjawia się przy dodaniu SUM(AGE). Ale jeżeli usunięmy (FirstName + ' ' + SecondName) AS FiSeName - wszystko działa, czemu tak?
Wylatuje błąd - Column 'Students.FirstName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
SELECT (FirstName + ' ' + SecondName) AS FiSeName, sum(Age), *
FROM [Students]
WHERE Laptop = 1
ORDER BY FiSeName desc