SELECT type, count(1) AS counts FROM material GROUP BY type
count(1),代表统计第一列,写上1 比写 *的效率高!
以上所述就是本文的全部内容了,希望大家能够喜欢。