How to get the Growth of database using Joined date and UserDetails

I want to make a Graph or a Comparision for my implementation. If I select a month or week DB should return me the No.of users who joined this week/month and No.of users who joined in the previous week/month. From that I can get the growth percentage of my Application,

What kind of Aggregation can I use for this scenario? if I get the Spring Boot that would be more preferrable