join to terms and add yearid to query to handle holdovers