I will explain my question here...
This is the table:
id | column 1 | column 2
---+----------+---------
1 | green | 15
2 | green | 84
3 | green | 88
4 | red | 85
5 | red | 51
6 | red | 45
7 | red | 54
8 | blue | 58
9 | blue | 58
10 | blue | 78
Now i only want the most recent 2 green, most recent 2 of red, and most recent 2 of blue.
The output must seem like this:
id | column 1 | column 2
---+----------+---------
2 | green | 84
3 | green | 88
6 | red | 45
7 | red | 54
9 | blue | 58
10 | blue | 78
How can i accomplish this in one mysql statement or is there more i need to do?