Fix get agency query so that it doesn't join to job chronology