query manager builder