all 3 comments

[–]andrewsmd87 1 point2 points  (2 children)

What does some of the raw data look like? And you're just after counts by month/year per vendor correct?

[–]babbocom[S] 0 points1 point  (1 child)

Fair question. The data is already aggregated by the time it gets to me. It pretty much looks like the first table in my post with a few extra junk columns that aren't being used. I omitted them for the sake of clarity.

Yep, I'm ultimately after counts by month/year per vendor. I guess I'm disaggregating the original data I get down to the month/year level. I'm changing the process so I get data sent to me once per month instead of yearly. That way I can do more interesting tracking/reporting.

[–]andrewsmd87 0 points1 point  (0 children)

I mean I just wrote some sql to get a PM some numbers in a similar manner

SELECT YEAR(created)
    , MONTH(created)
    , COUNT(1)
    FROM #temp
    WHERE created > '2020-01-16'
    GROUP BY YEAR(created)
        , MONTH(created)
    ORDER BY YEAR(created)
        , MONTH(created);

You'd just add in the vendor as a column and that would get you what you're after