I have a some fields like this:
**Group_servers|Name_server|Status**
Group1| server1|OK
Group1| server2|OK
Group2| server1|OK
Group2| server1|No data
Group2| server1|Yellow
Group2| server1|
I want to get the result as shown below
Group_servers|Status
Group1|OK
Group1| No data
Сonditions for the formation of status groups are as follows:
1. If at least one server in the group has the status "No data" or the field is empty, the status for the group is " No data"
2. If at least one server in the group has the "Yellow" status, the status for the group is " Yellow"
3. If all servers in the group have the status "OK", the status for the group is " OK"
↧