You can use the group name to check if all members of a group are dead. In this example, alldead can be the condition of a trigger in your map for something that happens. Substitute Alpha with the groupname you're using.
;-----------------------------------------------------
#loop
? NOT(alive player) : exit
?(("Alive _x" count units Alpha) == 0): alldead=true; exit
~2
goto "loop"
;-----------------------------------------------------