问题描述
如题,实现类型以下SQL的效果:SELECTB.LvlCode,B.OrgName,COUNT(A.UserId)ASTotalFROM[User]ASAINNERJOINdbo.OrganizationASBONB.OrgId=A.EmpOrgIdGROUPBYB.LvlCode,B.OrgNameHAVINGCOUNT(A.UserId)BETWEEN1AND5
解决方案
时间: 2025-01-30 12:30:41
如题,实现类型以下SQL的效果:SELECTB.LvlCode,B.OrgName,COUNT(A.UserId)ASTotalFROM[User]ASAINNERJOINdbo.OrganizationASBONB.OrgId=A.EmpOrgIdGROUPBYB.LvlCode,B.OrgNameHAVINGCOUNT(A.UserId)BETWEEN1AND5