# Created\_at column in the incoming\_links table

**URL:** https://meta.discourse.org/t/created-at-column-in-the-incoming-links-table/209835
**Category:** Support
**Created:** [November 22, 2021, 10:59am UTC](https://meta.discourse.org/t/created-at-column-in-the-incoming-links-table/209835 "2021-11-22T10:59:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![meglio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/meglio/32/71444_2.png) [@meglio](https://meta.discourse.org/u/meglio)
#### Post date: [November 22, 2021, 10:59am UTC](https://meta.discourse.org/t/created-at-column-in-the-incoming-links-table/209835/1 "2021-11-22T10:59:25Z")

</div>

In the `incoming_links` table, what exactly the `created_at` column means?

I’d like to create a badge similar to a Good Share, i.e.:

```sql
select views.user_id, i2.post_id, current_timestamp as granted_at
from (

select i.user_id, min(i.id) i_id
from incoming_links i
join badge_posts p on p.id = i.post_id
join users u on u.id = i.user_id
group by i.user_id, i.post_id
having count(*) >= 300

) as views
join incoming_links i2 on i2.id = views.i_id

```

… but I’d like to only count “clicks” in the same year where the post linked to was created.

Will I solve this problem by simply adding a WHERE clause that makes sure that the year of `incoming_links.created_at` is the same as the year of `badge_posts.created_at`? Or will this WHERE clause mean something else?
