跳转到内容

返回行数或非 NULL 值的数量。

func.count()
func.count()
COUNT()
SELECT COUNT(*) FROM employees;
┌──────────┐
│ count(*) │
├──────────┤
│ 1000 │
└──────────┘
SELECT COUNT(DISTINCT department) FROM employees;
┌──────────────────────────────┐
│ count(distinct department) │
├──────────────────────────────┤
│ 5 │
└──────────────────────────────┘