Here an example Table:
+--------+------------+
| itemID | itemvalue |
+--------+------------+
| 1 | a |
| 2 | b |
| 3 | a |
| 4 | a |
| 5 | b |
| 6 | a |
| 7 | b |
| 8 | a |
| 9 | a |
| 10 | b |
+--------+------------+
I like to know how many 'a' are in the first 5 rows of the table. So in words should do the following:
Select only the first 5 rows from table X WHERE itemvalue = a
This should return rows 1, 3 and 4
Is it possible to do this with just a Mysql Query and without further computing?
itemID?