Split query building out of collection