#### SQL query to find users in more than one role

This technical problem deals with writing a SQL query to find all the users who are in more than one role. The user table, role table, and user role table are provided, and the expected output is also given.

#### Problem

```Given a table of users and their roles, write a SQL query to find all the users who are in more than one role.
User table:
+----+-------+
| id | name  |
+----+-------+
| 1  | John  |
| 2  | Jane  |
| 3  | Dave  |
| 4  | Sarah |
+----+-------+
Role table:
+----+---------+
| id | name    |
+----+---------+
| 2  | Manager |
| 3  | Analyst |
| 4  | User    |
+----+---------+
UserRole table:
+----+---------+----------+
| id | user_id | role_id  |
+----+---------+----------+
| 1  | 1       | 1        |
| 2  | 1       | 2        |
| 3  | 2       | 2        |
| 4  | 2       | 3        |
| 5  | 3       | 3        |
| 6  | 4       | 4        |
+---- +---------+----------+
Output:
+----+-------+
| id | name  |
+----+-------+
| 1  | John  |
| 2  | Jane  |
| 3  | Dave  |
+----+-------+```

#### Solution

This solution is in SQL. Our A.I. can create solutions in multiple languages.
```SELECT u.id, u.name
FROM User u