# A query for users with a custom title?

**URL:** <https://meta.discourse.org/t/a-query-for-users-with-a-custom-title/275004>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [October 14, 2016, 8:50pm UTC](https://meta.discourse.org/t/a-query-for-users-with-a-custom-title/275004 "2016-10-14T20:50:11Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [October 15, 2016, 6:04pm UTC](https://meta.discourse.org/t/a-query-for-users-with-a-custom-title/275004/4 "2016-10-15T18:04:07Z")

</div>

> [@jomaxro](#):
>
> I did have to change the first line SELECT title FROM users to SELECT username FROM users as I was looking for the usernames, not the custom titles.

Oops, I forgot to copy the query again after fixing that 😊

> [@jomaxro](#):
>
> @Mittineague was able to create a query that seems to work as well in this topic.

That query looks better – I didn’t find the `badge_granted_title` flag. I’m not sure how this query handles titles granted by group membership, though.

---

_[View the full topic](https://meta.discourse.org/t/a-query-for-users-with-a-custom-title/275004)._
