sort on infrastructure query to ensure that we list the latest sensors and gateways