StringBuildersql=newStringBuilder("select CourseId,CourseName,(select Count(0) from rb_course_chapter b where b.CourseId=a.CourseId and ParentId=0 and b.`Status`=0) as UnitCount,(select Count(0) from rb_course_chapter b where b.CourseId=a.CourseId and ParentId>0 and b.`Status`=0) as ChapterCount from rb_course a where Status=0");
sql.AppendFormat(" AND a.{0}={1} ",nameof(RB_Course_ViewModel.Group_Id),groupId);