distinct()
Command: distinct
Function: Deduplication
Application scenario: When statistical type, status, and distinction are required .
Example:
mysql> select count(distinct(name))/count(*) from t_base_user; +--------------------------------+ | count(distinct(name))/count(*) | +--------------------------------+ | 0.6667 | +--------------------------------+ 1 row in set (0.00 sec)
The above is the detailed content of How to use distinct() command in MySQL. For more information, please follow other related articles on the PHP Chinese website!