# What is SQL Badge Query for invited \>25 People?

**URL:** <https://meta.discourse.org/t/what-is-sql-badge-query-for-invited-25-people/83451>\
**Category:** Support\
**Created:** [21.Март.2018 03:22:44 UTC](https://meta.discourse.org/t/what-is-sql-badge-query-for-invited-25-people/83451 "2018-03-21T03:22:44Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![schleifer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schleifer/32/86416_2.png) [@schleifer](https://meta.discourse.org/u/schleifer)\
**Post date:** [21.Март.2018 16:13:43 UTC](https://meta.discourse.org/t/what-is-sql-badge-query-for-invited-25-people/83451/2 "2018-03-21T16:13:43Z")

</div>

The specific query for each invitation badge is generated with two variables:

- How many people do they have to invite?
- What TL do those people have to reach?

The answers for the existing badges are:

| Badge | People | TL |
| --- | --- | --- |
| Promoter | 1 | 0 |
| Campaigner | 3 | 1 |
| Champion | 5 | 2 |

So for your new badge, take the SQL in the invite\_badge method at [discourse/lib/badge\_queries.rb at 43f63c435d0098ffb0bc66c5544e026099818310 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/43f63c435d0098ffb0bc66c5544e026099818310/lib/badge_queries.rb#L136) and replace `#{count.to_i}` with the number of people and `#{trust_level.to_i}` with the TL.

---

_[View the full topic](https://meta.discourse.org/t/what-is-sql-badge-query-for-invited-25-people/83451)._
