Updated getQueries method to return queries by dbId or schemaId