1
SELECT system.mgm_id,
2
system.system_id,
3
system.profile_name AS system_name,
4
system.organization,
5
system.last_checkin_time,
6
(CURRENT_TIMESTAMP - system.last_checkin_time) AS inactivity,
7
system.synced_date
8
FROM system
9
ORDER BY system.mgm_id, system.system_id, system.organization;