COUNT_DISTINCT

description

Syntax

COUNT_DISTINCT(expr)

用于返回满足要求的行的数目,或者非NULL行的数目

example

  1. MySQL > select count_distinct(query_id) from log_statis group by datetime;
  2. +----------------------------+
  3. | count_distinct(`query_id`) |
  4. +----------------------------+
  5. | 577 |
  6. +----------------------------+

keyword COUNT_DISTINCT,COUNT,DISTINCT