You could do something like this externally to BigFix/IEM by using the REST API to get both queries and then compare in your language of choice. We are using python, but just about anything is possible.
You may also be able to do it through session relevance, depending on what it is.