# Creating custom badge with custom rules

**URL:** https://meta.discourse.org/t/creating-custom-badge-with-custom-rules/257688
**Category:** Data & reporting
**Tags:** sql-triggered-badge
**Created:** [March 10, 2023, 11:27am UTC](https://meta.discourse.org/t/creating-custom-badge-with-custom-rules/257688 "2023-03-10T11:27:22Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Lhc\_fl](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lhc_fl/32/268115_2.png) [@Lhc\_fl](https://meta.discourse.org/u/Lhc_fl)
#### Post date: [March 10, 2023, 3:01pm UTC](https://meta.discourse.org/t/creating-custom-badge-with-custom-rules/257688/2 "2023-03-10T15:01:02Z")

</div>

May it help?

> [@Enable Badge SQL](https://meta.discourse.org/t/enable-badge-sql/47894):
>
> bookmark This guide explains how to enable Badge SQL in Discourse and discusses the associated security and performance risks. person_raising_hand Required user level: Administrator warning Enabling Badge SQL can pose security and performance risks. To maintain security and performance integrity, as of Discourse 1.6, the ability for administrators to edit badge SQL directly is disabled by default. The two primary concerns around enabling Badge SQL are: Security: Allowing direct SQL …

> [@\[Superseded\] What cool badge queries have you come up with?](https://meta.discourse.org/t/what-cool-badge-queries-have-you-come-up-with/18978):
>
> warning Enabling Badge SQL entails security and performance risks so it is not available by default. For more information, see: [Enable Badge SQL](https://meta.discourse.org/t/badge-sql-can-no-longer-be-edited-by-default/47894) This topic became too long to be easily searched and has been broken down into separate topics. If you have any questions about how to write a badge query, or have one to share, please start a new topic in the #data & reporting category and tag it with the #sql-triggered-badge tag. +1 More ideas: [Some common badge queries](https://meta.discourse.org/t/some-common-badge-queries-idea/31859)

---

_[View the full topic](https://meta.discourse.org/t/creating-custom-badge-with-custom-rules/257688)._
