Could you please share with me a database querry code that could make remove members from a date to another one or 2 years ago...
No, that's not what we do here. We do not provide custom code on request or anything of the sort. Deleting users from the database manually doesn't do a full clean up anyway. Delete them from CB > User Management, which you can filter as needed.