postgresql-count

0

Please login or register to vote for this query.

(click on this box to dismiss)

Game Development Meta

Q&A about the site for professional and independent game developers

SELECT 
    MONTH(p.CreationDate) AS month,
    t.TagName,
    SUM(p.ViewCount) AS TotalViews
FROM 
    Posts p
JOIN 
    PostTags pt ON p.Id = pt.PostId
JOIN 
    Tags t ON pt.TagId = t.Id
WHERE 
    t.TagName IN ('postgresql', 'sql-server', 'postgis')
GROUP BY 
    MONTH(p.CreationDate),
    t.TagName
ORDER BY 
    month,
    t.TagName;

Enter Parameters

Options:
Switch to main site
loading Hold tight while we fetch your results