jeudi 28 juillet 2016

mysql get last 3 row and compare record

I have a table how can I get last 3 row to compare and get count number?

Example: table

id| name
=========
1 | Apple
2 | Orange
3 | Kiwi
4 | Banana
5 | Apple
6 | Banana
7 | Apple

How can I get Apple count number last 3 row?

Many thanks

Aucun commentaire:

Enregistrer un commentaire