I'm trying to `GROUP BY` same records but different `timestamp` or `datetime`.
The difference of time is only about 3 minutes from the first entry.

example:

This is what the database table looks like.

```
*-------------------------------------------*
|   id  |   name    |         time          |
|   1   |   Lei     | 2018-02-21 12:00:10   |
|   2   |   Lei     | 2018-02-21 12:01:11   |
|   3   |   Lei     | 2018-02-21 12:01:15   |
|   4   |   Lei     | 2018-02-21 12:01:16   |
|   5   |   Anna    | 2018-02-21 12:03:11   |
|   6   |   Anna    | 2018-02-21 12:03:13   |
|   7   |   Bell    | 2018-02-21 12:05:01   |
|   8   |   Lei     | 2018-02-21 12:10:00   |
*-------------------------------------------*

```

I want to get Lei's entry from 12:00:10 up to 3 minutes from her first `timestamp` or `datetime` record. 

so the output would be like this.

```
*-------------------------------------------*
|   id  |   name    |         time          |
|   1   |   Lei     | 2018-02-21 12:00:10   |
|   5   |   Anna    | 2018-02-21 12:03:11   |
|   7   |   Bell    | 2018-02-21 12:05:01   |
|   8   |   Lei     | 2018-02-21 12:10:00   |
*-------------------------------------------*

```

I'll be gladly appreciate your help, mysql or php it is.