# Accepted Solutions Query

**URL:** https://meta.discourse.org/t/accepted-solutions-query/372514
**Category:** Data & reporting
**Tags:** sql-query, reporting
**Created:** [July 1, 2025, 10:19pm UTC](https://meta.discourse.org/t/accepted-solutions-query/372514 "2025-07-01T22:19:48Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Shreyas\_Kulkarni](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/shreyas_kulkarni/32/510405_2.png) [@Shreyas\_Kulkarni](https://meta.discourse.org/u/Shreyas_Kulkarni)
#### Post date: [July 1, 2025, 10:19pm UTC](https://meta.discourse.org/t/accepted-solutions-query/372514/1 "2025-07-01T22:19:48Z")

</div>

Hi, I am using the following query to check accepted solutions this month. However, I do not see data past March. Additionally, these numbers do not match what is shown on the Accepted solutions Report. Could I get some guidance here on what I’m doing wrong?

```plaintext
SELECT DISTINCT 
YEAR(p.created_at), MONTH(p.created_at), 
count(distinct(p.topic_id))
    FROM posts p
    JOIN posts_custom_fields pcf ON pcf.post_id = p.id
    WHERE (pcf.name = 'is_accepted_answer' AND pcf.value = 'true') AND YEAR(p.created_at) = 2025
    GROUP BY 1,2

```

---

_[View the full topic](https://meta.discourse.org/t/accepted-solutions-query/372514)._
