Fix two query-related bugs

- Multiple tags weren't showing up due to the GROUP BY clause
- Application logic was causing later-completed applications for earlier terms
  to show up, when the inverse is desired. We now pull all applications
  completed in the past year as long as the effective date is in the past, and
  grab the one with the most recent effective date to use.