How to show all data but limit the same name value only 2 rows to show for example, here is my table 'test':
id name
1 title-1
2 title-1
3 title-2
4 title-1
5 title-3
6 title-2
7 title-1
8 title-2
and i want the output to get all data, but limit only 2 rows to show if it's same name value, like this:
id name
4 title-1
7 title-1
6 title-2
8 title-2
5 title-3