Demo for 11140169

0

Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

SELECT
* 
FROM
(SELECT 
    T.TagName,
    Year(a.creationDate) yr,
    Substring(DateName(m,Month(a.creationDate)),1,3) mh,
    SUM(a.score) Total
FROM
  Posts a
  INNER JOIN Posts q
  ON a.ParentID = q.id
  INNER JOIN postTags pt 
  ON q.id = pt.PostId
  INNER JOIN Tags t
  ON Pt.TagiD = t.id
  WHERE a.owneruserID = ##UserID##
GROUP BY
    t.TagName,
    Year(a.creationDate) ,
    Substring(DateName(m,Month(a.creationDate)),1,3) 
    ) SourceTable
PIVOT
(
sum( Total )
FOR mh IN ([Jan],[Feb],[Mar],[Apr],[May],[Jun],[Jul],[Aug],[Sep],[Oct],[Nov],[Dec])
) AS PivotTable

Enter Parameters

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