I know that in mysql we can disable ONLY_FULL_GROUP_BY to do aggregations in relation to other fields than the selected ones. But in sql server i don't know how.
Here is the query i tried :
select Arrival_Date, sum(Rate)
from Stay
Group by month(Arrival_Date)
i got the followed error:
Msg 8120, Level 16, State 1, Line 2
Column 'Stay.Arr_Date' is invalid in the select list because it is not
contained in either an aggregate function or the GROUP BY clause.