Here is an example in MSSQL
(*) Tested in UIM 8.5.1
In this example, it displays QOS data that has no data in the last 1 hour.
If you comment out "where" clause, it displays all QOS data and its latest timestamp.
You can change the script to fit your needs.
select
sqd.origin,
sqd.robot,
sqd.probe,
sqd.source as QoS_Source,
ccs.name as QoS_Device_Name,
sqd.qos QoS_Name,
sqd.target,
sqs.samplevalue,
sqs.sampletime
from S_QOS_DATA sqd
INNER JOIN CM_CONFIGURATION_ITEM_METRIC ccim on ccim.ci_metric_id = sqd.ci_metric_id
INNER JOIN CM_CONFIGURATION_ITEM cci on cci.ci_id = ccim.ci_id
INNER JOIN CM_DEVICE cmd on cmd.dev_id = cci.dev_id
INNER JOIN CM_COMPUTER_SYSTEM ccs on ccs.cs_id = cmd.cs_id
INNER JOIN S_QOS_SNAPSHOT sqs on sqs.table_id = sqd.table_id
--- sampletime based filter ---
where sqs.sampletime < dateadd(hour, -1, getdate())
order by sqd.origin,sqd.robot, sqd.probe, ccs.name, sqd.qos,sqd.target