Get the App
SLTechnology News&Howtos  ›  Database  › 

How MySQL uses the distinct () command

Shulou Source: shulou.com Published: 2022-05-31 10:53:47 10月03日 Update

This article will explain in detail how MySQL uses the distinct () command. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.

Distinct ()

Command: distinct

Function: weight removal

Application scenario: when statistical type, status, and discrimination are needed.

Example:

Mysql > select count (distinct (name)) / count (*) from t_base_user +-- + | count (distinct (name)) / count (*) | +-+ | 0.6667 | +-+ 1 row in This is the end of the article set (0.00 sec) on "how MySQL uses the distinct () command". Hope that the above content can be helpful to you, so that you can learn more knowledge, if you think the article is good, please share it for more people to see.

Tags: Commands articles more good practical useful examples content scenes articles status knowledge types differentiation references help applications related Statistics Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Shulou Tech Info Docker NVidia Linux