1
SELECT systemhistory.mgm_id,
2
systemhistory.system_id,
3
systemhistory.history_id,
4
systemhistory.event_time,
5
'Done'::text AS status,
6
systemhistory.event,
7
systemhistory.event_data,
8
systemhistory.synced_date
9
FROM systemhistory
10
WHERE ((systemhistory.event)::text <> ALL ((ARRAY['Subscribed to channel'::character varying, 'Unsubscribed from channel'::character varying])::text[]))
11
ORDER BY systemhistory.mgm_id, systemhistory.system_id, systemhistory.history_id;