# Badge based on link stats?

**URL:** <https://meta.discourse.org/t/badge-based-on-link-stats/29018>\
**Category:** Data & reporting\
**Tags:** sql-query\
**Created:** [20. Mai 2015 um 02:56 UTC](https://meta.discourse.org/t/badge-based-on-link-stats/29018 "2015-05-20T02:56:16Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)\
**Post date:** [20. Mai 2015 um 07:07 UTC](https://meta.discourse.org/t/badge-based-on-link-stats/29018/5 "2015-05-20T07:07:25Z")

</div>

> [@sam](#):
>
> min(l.created\_at) granted\_at

If the badge is bronze, nobody’s ever going to receive a notification for that; the granted\_at will be too old. You’re going to have to use row\_number() to get the correct date for the badge.

---

_[View the full topic](https://meta.discourse.org/t/badge-based-on-link-stats/29018)._
