Need sql query to get the no of robots displayed in IM
Release: DX UIM
COmponent: Roboo
first try what output you are getting with below:
SELECT DISTINCT cnr.robot
FROM cm_nimbus_robot cnr
JOIN s_qos_data sqd ON cnr.robot = sqd.robot
JOIN s_qos_snapshot s ON sqd.table_id = s.table_id
if the number is huge:
SELECT DISTINCT cnr.robot
FROM cm_nimbus_robot cnr
JOIN s_qos_data sqd ON cnr.robot = sqd.robot
JOIN s_qos_snapshot s ON sqd.table_id = s.table_id
WHERE s.sampletime >= DATEADD(DAY, -60, GETDATE());
above gives the robots which has sample data for last 60 days
SELECT DISTINCT cnr.robot
FROM cm_nimbus_robot cnr
JOIN s_qos_data sqd ON cnr.robot = sqd.robot
JOIN s_qos_snapshot s ON sqd.table_id = s.table_id
WHERE s.sampletime >= DATEADD(DAY, -15, GETDATE());
above gives the robots which has sample data for last 15 days