Challenge. Split database 500 records in two smaller datasets, randomly I have a database with 500 records. I want to split these records to 75% and 25% *randomly*in order to use the different datasets for training and testing to machine learning algorithms. Does anyone knows how to do that using an sql query? 
ps. I use mysql.

In addition I find this ...
select ...
from ...
where ...
ORDER BY rand() LIMIT 150 but this gives me only the first dataset

Thanks in advance
Easiest solution would be to store the datasets into tables.
After you use your query to get the first dataset:

 INSERT INTO dataset1 SELECT * FROM foo ORDER BY rand() LIMIT 125


then do:

 INSERT INTO dataset2 SELECT foo.* FROM foo 
   LEFT JOIN dataset1 d1 ON foo.key=d1.key WHERE d1.key IS NULL