包含外部參考的彙總運算式必須包含於選取清單中,或是查詢中的 HAVING 子句子查詢,其 FROM 子句中的資料表包含了要彙總之資料行。
Click to search this error in Google
English version
An aggregated expression containing an outer reference must be contained in either the select list, or a HAVING clause subquery in the query whose FROM clause contains the table with the column being aggregated.