Split database per pool I need to split a database of users by X pool and each pool need to have nearly the same number of users based on their email provider... 

For explain to you better, if my database content:
100 users outlook.com, 50 live.com, 10 gmail.com and 1 toto.com
And one ask me to split database by 5 (for example, it's can be 6, 9 or something else)  

I need to have pool A / B / C / D with 20 outlook.com, 10 live.com, 2 gmail.com
and the pool E like above but with 1 toto.com  

Actually I already splited the database per each email provider but I don't find how can I balancing the pools per ESP for be nearly equal.
The database content more than 500 different domains and some domains have only 2 or 3 users. I have to dispatch all that smartly :p  

UPDATE #1
The split can be randomly, the goal if one ask me needs 8 pools it's to provide the pools with each pool content +/- 1/8 of database but with nearly each ESP. 

UPDATE #2
About the split, I will create the new columns named Pool_ESP and with data like A, B, C... I need to have a history of action we will do on each pool, example we send message type 1 to pool B, type 2 to pool C...
About distro it can be randomly but by ESP (like above) the goal it is to respect the criteria of balancing (here per ESP and per number of pool they will ask me)
If somebody looking something for solve the similare issue look for by the side of  

MySQL NTILE()  


You can split database on equal part based on a column value.
https://dev.mysql.com/doc/refman/8.0/en/window-function-descriptions.html#function_ntile