COUNT
noun
say it: “KOWNT” /kaʊnt/
A SQL aggregate function that counts rows, or values that aren't NULL.
What is COUNT in a relational database?
COUNT — An aggregate function returning the number of qualifying rows or non-NULL expression values.
SELECT customer_id, COUNT(*) AS order_count
FROM purchase_order
GROUP BY customer_id;
In a sentence
- “COUNT(*) told me Northwind has 77 products.”
Level: Apprentice · More SQL terms at this level
Updated