# Badges not being assigned

**URL:** <https://meta.discourse.org/t/badges-not-being-assigned/38220>\
**Category:** Product Support\
**Created:** [January 20, 2016, 12:32am UTC](https://meta.discourse.org/t/badges-not-being-assigned/38220 "2016-01-20T00:32:18Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [January 26, 2016, 6:25pm UTC](https://meta.discourse.org/t/badges-not-being-assigned/38220/14 "2016-01-26T18:25:40Z")

</div>

Good news, everyone. :goodnews:

I got a query to work. I wrapped my original query in:

```plaintext
SELECT DISTINCT(user_id), CURRENT_TIMESTAMP granted_at
FROM (my existing query here) AS top_answerers
WHERE (:backfill OR ( user_id IN (:user_ids) ))

```

So in this case, the multiple user\_ids was the issue. I guess users won’t be able to get this badge multiple times, but I can live with that for now.

---

_[View the full topic](https://meta.discourse.org/t/badges-not-being-assigned/38220)._
