我有以下佈局的表:各部門的統計用戶
+----+-----------+-------------+ | id | name | department | +----+-----------+-------------+ | 1| John | Finance | +----+-----------+-------------+ | 2| Bob | Optics | +----+-----------+-------------+ | 3| Jill | Finance | +----+-----------+-------------+ | 4| Jake | Finance | +----+-----------+-------------+ | 5| Mike | Support | +----+-----------+-------------+
我想所有的人都在各部門的總和:
+-----------+-------------+ | people | department | +-----------+-------------+ | 3| Finance | +-----------+-------------+ | 1| Optics | +-----------+-------------+ | 1| Support | +-----------+-------------+
我有麻煩建設一個正確的查詢