您的位置:首页 >MySQL如何使用distinct()命令
发布于2023-04-26 阅读(0)
扫一扫,手机访问
distinct()
命令: distinct
作用:去重
应用场景:需要统计类型,状态,计算区分度时。
例子:
mysql> select count(distinct(name))/count(*) from t_base_user; +--------------------------------+ | count(distinct(name))/count(*) | +--------------------------------+ | 0.6667 | +--------------------------------+ 1 row in set (0.00 sec)
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
售后无忧
立即购买>office旗舰店
正版软件
正版软件
正版软件
正版软件
正版软件
1
2
3
7
9