السلام عليكم ..
عندي جملة SQL وفيها خطأ ولم أعرف كيفية حل هذا الخطأ، هل من مساعد؟
SELECT Guardian.GuardianSocialId, Guardian.GuardianName, Guardian.GuardianMobileNumber, Request.FirstName, Request.FatherName, Request.GrandName, Request.FamilyName, Request.RequestId, Request.Result FROM Request INNER JOIN Guardian ON Request.GuardianId = Guardian.GuardianId GROUP BY Request.IsSonsInSchools ORDER BY Guardian.TypeId ASC
الخطأ
Msg 8120, Level 16, State 1, Line 1 Column 'Guardian.GuardianSocialId' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
وشكراً


