Creating a Query for the Registration Service