Sam OZ
asked on
Sql script for Sql server - Get unique user login count from a custom login table
I have a table in Sql server 2018 TB_Login ( This is another application login details not Sql server login)
UserID LoginMonth
UserID1 202103
UserID1 202103
UserID2 202103
UserID3 202104
UserID1 202104
UserID3 202104
UserID4 202104
......
How can I get the unique count of users per month ? In this case result is
202103 2
202104 3
UserID LoginMonth
UserID1 202103
UserID1 202103
UserID2 202103
UserID3 202104
UserID1 202104
UserID3 202104
UserID4 202104
......
How can I get the unique count of users per month ? In this case result is
202103 2
202104 3
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.