Topic Reads by Date

I thought that It would be interesting to see how the interest of a particular topic evolved over time, so I made a query that brings a read count by date of a specific topic.

The problem is that The count it comes back with is less than the count shown for the topic on the UI.

Any ideas what am I missing?

-- [params]
-- integer :tema = 1
select topic_id,viewed_at as fecha,count(1) as vistas from topic_views 
group by topic_id, viewed_at 
having topic_id = :tema
order by fecha asc
1 Like