Here is a sample query to create a group including all the robots under a hub.
Release : 20.3
Component : UIM OPERATOR CONSOLE - GROUPS
select distinct cs.cs_id from cm_computer_system cs inner join cm_device cd on cs.cs_id = cd.cs_id inner join cm_nimbus_robot cr on cd.dev_id = cr.dev_id where cr.hub = 'hub_name'