jerdog
(Jeremy M)
1
So we’re wanting to measure the number of views a specific category gets and so I have done a query for it:
SELECT date_part('month', created_at) as Mth,
sum(views) as FAQViews
FROM topics
WHERE category_id = '11'
GROUP BY Mth
and its returning values grouped by the month, but the values are like 1/100th what the category listing shows… Not sure what I am missing here
sam
(Sam Saffron)
2
Looks more or less right except that you are not including year and you are including deleted content. Maybe your category_id is wrong…
3 Likes
jerdog
(Jeremy M)
3
Yeah - had the wrong category and need to also ignore deleted
1 Like
system
(system)
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.