consolidate Query