This is a follow up from this [question](https://stackoverflow.com/questions/37542924/laravel-order-user-by-role). I have a query that looks like this:

```
$users = User::leftjoin('role_user', 'users.id', '=', 'role_user.user_id')
              ->select('users.*')
              ->orderBy(DB::raw('role_id IS NULL'))
              ->groupBy('users.id')
              ->orderBy('role_id', 'asc')
              ->get();

```

When I do it like that I get distinct values for users, and they are ordered by role\_id in asc order, the only thing with this query is that users that have two or more roles are behind the ones with who have only one role. For example, user has roles with `id=1` and `id=2`, and other user has a only a role with `id=1`, that user will be before the user with two roles in the list. I would like to change that and have users with more roles above the ones with only one role.