How do I make my own badge query?

there is a topic describing other badges:

the faq topic for badge (which may not be what you want):

creating badge:

3 Likes