I have two tables..
Dates shown above are in MM/dd/yyyy format
From table Plays I got a table enrichedplays which has only one top row per userid
The users table has some 5 mil rows and enrichedplays has around 3mil rows.
There are a lot of users who though are in Users are not in Plays.
I need to group monthly Users (on MONTH(createddate)) with userid who are present in plays.
What I mean is in month January there were 10 users in Users table.
Of these 10 users only 5 are present in Plays table and it does not matter for which month they are present.
So, in my resultant data i need 5 against January.
So, for above sample data the result would be
Though, I'm using SQL SERVER, it might change and so would appreciate answers which are standard sql.