# Problem testing Badge Query from Data Explorer

**URL:** <https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568>\
**Category:** Data & reporting\
**Tags:** sql-triggered-badge\
**Created:** [May 24, 2019, 12:14am UTC](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568 "2019-05-24T00:14:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Mark\_Schmucker](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mark_schmucker/32/124810_2.png) [@Mark\_Schmucker](https://meta.discourse.org/u/Mark_Schmucker)\
**Post date:** [May 24, 2019, 12:14am UTC](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568/1 "2019-05-24T00:14:35Z")

</div>

Should I be able to run any Badge Query in [Data Explorer](https://meta.discourse.org/t/32566?silent=true)?

I want to create a custom Badge Query using “Appreciated” as a starting point. I type the Appreciated query in [Data Explorer](https://meta.discourse.org/t/32566?silent=true):

```
SELECT p.user_id, current_timestamp AS granted_at
FROM posts AS p
WHERE p.like_count >= 1
    AND (:backfill OR p.user_id IN (:user_ids))
GROUP by p.user_id
HAVING count(*) > 20

```

This gives an error:

`missing value for :backfill`

I vaguely understand that the “:” is a “bind variable” which improves efficiency. I tried removing the bit about backfill but that gives another error.

---

_[View the full topic](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568)._
