Consolidating queries for common data