「コミュニティの現状」レポートを作成しており、「今月の新人バッジ」のリストを載せると面白いかと思いました。以下が私のクエリです。
SELECT u.id,
b.name,
u.created_at,
ub.granted_at,
to_char(date_trunc('month', ub.granted_at), 'YYYY Mon')
from badges b
join user_badges ub on b.id = ub.badge_id
join users u on u.id = ub.user_id
where b.name like '%Month%'
order by ub.granted_at desc
結果は奇妙です。
| id | name | created_at | granted_at | to_char |
|---|---|---|---|---|
| 1613225 | New User of the Month | 2022-09-10T14:27:10.130Z | 2022-09-30T23:59:59.999Z | 2022 Sep |
| 1613874 | New User of the Month | 2022-09-18T21:57:19.944Z | 2022-09-30T23:59:59.999Z | 2022 Sep |
| 1611913 | New User of the Month | 2022-08-23T11:30:12.639Z | 2022-08-31T23:59:59.999Z | 2022 Aug |
| 1610355 | New User of the Month | 2022-07-30T20:12:00.342Z | 2022-07-31T23:59:59.999Z | 2022 Jul |
| 1609245 | New User of the Month | 2022-07-12T16:11:48.272Z | 2022-07-31T23:59:59.999Z | 2022 Jul |
| 1607137 | New User of the Month | 2022-06-09T23:37:46.687Z | 2022-06-30T23:59:59.999Z | 2022 Jun |
| 1607399 | New User of the Month | 2022-06-14T14:16:14.247Z | 2022-06-30T23:59:59.999Z | 2022 Jun |
多くの場合、New User of the Monthバッジが2つ授与されています。同時に付与されていることに注意してください。(7月のバッジを見ると、ユーザーが1日後にバッジを受け取っているのは少し奇妙ですが、誰かが非常にアクティブに始めたということは確かに可能です。)
貢献を称えるために追加の人を認識することは構いませんが、これをまとめる際に何が起こっているのかを説明したいと思います。構成に何か問題がある可能性もあります。