Producing staging database from production database

Hello.
How to produce new database from production one reducing number of users, for example in result we have the first 30 users, using SQL methods. That is, I have the same database, but it only has 30 users.
Probably for this we need to know the ST database structure and SQL language well.
Let’s assume that I am already connected to MySQL with “mysql -u user -p”.
Best Regards,
Sasha.