• Hi

    I am very new to SQL and appreciate your help.

    I am not sure about code but here is the query

    Msg 8120, Level 16, State 1, Line 1

    Column 'Company.CompanyName' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.