# 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:** 4

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [May 24, 2019, 12:46am UTC](https://meta.discourse.org/t/problem-testing-badge-query-from-data-explorer/118568/4 "2019-05-24T00:46:42Z")

</div>

> [@Mark\_Schmucker](#):
>
> Can you tell me what the clause does (assuming it gets the parameters passed in), so I can decide whether to keep it?

If your badge is triggered by a user acting on a post, then you need to include this condition. The best description I’ve seen of how the `:backfill` and `:user_ids` parameters are used in badge queries is in the ‘Triggered badges have 2 extra constraints’ section of [Creating triggered custom badge queries](https://meta.discourse.org/t/triggered-custom-badge-queries/19336).

---

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