A few versions ago, ServiceNow added the ability in filters to query for records where one field was “the same as” another field…
I’ve occasionally wondered if I could accomplish the same thing in a GlideRecord Query. A few weeks ago, a coworker had a dire need for this functionality, so we experimented and figured it out:
gr.addQuery(‘sys_updated_on’, “SAMEAS”, “sys_created_on”);