I have tried all the methods from This Link, and other similar answers from google, but none worked.

I want get first N rows for each `categoryId`

Following is Table format:

```
+-----------------------+-------------------+-----------------------+
| id | categoryId | title |
+-----------------------+-------------------+-----------------------+
| 16181504-00000000079 | 1603012000000 | category-2 prod 2 |
| 16181504-00000000064 | 1603012000000 | category-2 prod 3 |
| 16181504-00000000027 | 1603012000000 | category-2 prod 4 |
| 16181504-00000000065 | 1603012000000 | category-2 prod 5 |
| 16181504-00000000096 | 1603012000000 | category-2 prod 6 |
| 16181504-00000000028 | 1603012000000 | category-2 prod 7 |
| 16181504-00000000536 | 1603012000004 | category-3 prod 1 |
| 16181504-00000000508 | 1603012000004 | category-3 prod 2 |
| 16181504-00000000512 | 1603012000004 | category-3 prod 3 |
| 16181504-00000000511 | 1603012000004 | category-3 prod 4 |
| 16181504-00000000509 | 1603012000004 | category-3 prod 5 |
| 16181504-00000000510 | 1603012000004 | category-3 prod 6 |
| 16181504-00000000538 | 1603012000004 | category-3 prod 7 |
| 16181504-00000000540 | 1603012000004 | category-3 prod 8 |
| 16181504-00000000915 | 1603012000005 | category-5 prod 1 |
| 16181504-00000000913 | 1603012000005 | category-5 prod 2 |
| 16181504-00000000914 | 1603012000005 | category-5 prod 3 |
| 16181504-00000001148 | 1603012000006 | category-1 prod 1 |
| 16181504-00000001146 | 1603012000006 | category-1 prod 2 |
| 16181504-00000001147 | 1603012000006 | category-1 prod 3 |
| 16181504-00000001922 | 1603012000009 | category-4 prod 1 |
| 16181504-00000001924 | 1603012000009 | category-4 prod 2 |
+-----------------------+-------------------+-----------------------+
```