Merge query helper with Rule