helper to create reusable and extendable collection queries