The Lava command 'sql' is not configured for this template. SELECT dv.Id, dv.Guid, dv.Value, dv.DefinedTypeId FROM DefinedValue dv WHERE DefinedTypeId = 109 AND dv.Value != 'Exclude' AND dv.Value != 'Church-Wide Event' AND dv.Value != 'GraceWorks' AND dv.Value != 'All Students' AND dv.Value != 'Choir' AND dv.Value != 'Median Adults' AND dv.Value != 'Orchestra' AND EXISTS ( SELECT 1 FROM DefinedValue dvx JOIN AttributeValue avx ON avx.AttributeId = 6652 AND avx.Value = dvx.Guid JOIN [Group] gx ON gx.Id = avx.EntityId WHERE dvx.DefinedTypeId = dv.DefinedTypeId AND gx.GroupTypeId = 25 AND gx.IsActive = 1 AND gx.IsArchived = 0 AND gx.IsPublic = 1 AND dvx.Id = dv.Id) ORDER BY dv.Value
{*groupCount*} / {* allGroups.length *} Groups shown
Loading...