check out (NPM 10.6)
SELECT TOP 1000 * FROM ContainerMemberSnapshots where status in (2,3)
this will give you the members of a Container (Group) that are down or warning, and the ContainerID
here is a more worked example to go from group, to the members with issues:
select * from
(SELECT EntityID GroupID,Name GroupName,Status GroupStatus FROM [dbo].[ContainerMemberSnapshots] where status in (2,3) and ContainerID=1 and EntityType='Orion.Groups') GroupInfo
Inner Join
(SELECT EntityID ,ContainerId,EntityType,Name ,status FROM [dbo].[ContainerMemberSnapshots] where status in (2,3) and ContainerID<>1) ObjectInfo
on GroupInfo.GroupID=ObjectInfo.ContainerId