Migrate Multiple Nextcloud Instances into One Instance

Hi, currently we have multiple Nextcloud instances in order to handle multitenancy for our clients but this produce an issue as the number of clients keep growing and so is our servers. So, we decided to use only one Nextcloud instance with multiple groups (for each clients) but to achieve that we need to migrate multiple Nextcloud’s databases into a new single database. Where do I start? Meaning, what tables or data should I focus on to migrate? Or is there any other easier method to achieve our target?