我有一张这样的桌子:
+--------+--------+
| name | kind |
+--------+--------+
| cat | animal |
| dog | animal |
| horse | animal |
| ant | animal |
| bird | animal |
| tree | plant |
| grass | plant |
| carrot | plant |
| |
| ... etc. |
+--------+--------+
我如何获得每种类型的 Top N 项?例如 N=2:
+--------+--------+
| name | kind |
+--------+--------+
| ant | animal |
| bird | animal |
| carrot | plant |
| grass | plant |
+--------+--------+
提前致谢!