I am creating a PHP script for maintaining user information, register new user, and login to secure pages. And for that I have a MySQL table user which stores all the information about a user. User table has different fields like userid, username, usergroup_id, email_hash, country etc.
In my script, I want to fetch 10 users from each usergroup_id.
What will be the SQL query for this?