Witam, mam takie zadanie.
Wyświetl liczbę filmów, które miały premierę w danym roku, wyświetl również lata premier filmów obok policzonych agregatów
Napisałem coś takiego
SELECT title, release_year FROM films WHERE release_year=2000 GROUP BY release_year;
Dostaje taki błąd, czy mógłby mi ktoś powiedzieć dlaczego to nie działa?
Msg 8120, Level 16, State 1, Line 1
Column 'films.title' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
Completion time: 2021-03-21T16:43:09.5657155+01:00
Screen z bazy danych.
