SQL中统计表中多种类型的数据 统计表中多种类型的数据 表中的多种类型的数据,如果类型多的话统计起来比较麻烦。所以有了“in”,in可以指定筛选的数据是某种类型。 select uid,sum(amount) from record where type in(2, 3 , 4 , 5 , 6 , 7) GROUP BY uid ORDER BY uid desc 以上是统计表中多种数据类型的实现