Salesforce Marketing Cloud Tag Trends


Please login or register to vote for this query.

(click on this box to dismiss)

Open Source Meta

Q&A about the site for people organizing, marketing or licensing open source development projects

WITH yearmonth 
     AS (SELECT y.number year, 
                m.number month 
         FROM   master..spt_values y 
                CROSS JOIN master..spt_values m 
         WHERE  y.type = 'P' 
                AND y.number >= 2006 
                AND m.type = 'P' 
                AND m.number >= 1 
                AND m.number <= 12) 
SELECT yearmonth, 
FROM   (SELECT t.tagname, 
               cast(Cast(ym.year AS CHAR(4)) + CASE WHEN ym.month < 10 THEN '0' 
                      '' END 
                      + Cast(ym.month AS CHAR(2)) as int) yearmonth, 
        FROM   posts p 
               INNER JOIN posttags pt 
                       ON = pt.postid 
               INNER JOIN tags t 
                       ON pt.tagid = 
               INNER JOIN yearmonth ym 
                       ON Year(p.creationdate) = ym.year 
                          AND Month(p.creationdate) = ym.month 
        WHERE  t.tagname IN ( 'marketing-cloud', 'ampscript', 'ssjs')) 
       AS data 
       PIVOT ( Count(id) 
             FOR tagname IN ([marketing-cloud], 
                             ssjs) ) AS pivottable 
ORDER  BY yearmonth

Enter Parameters

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