combing queries to find missing agency, add query to resolve agency outside of dates