SQL COUNT
Another arithematic function is COUNT. This allows us to COUNT up the number of row in a certain table. The syntax is,
SELECT COUNT("column_name")
For example, if we want to find the number of store entries in our table,
Table Store_Information
we'd key in
SELECT COUNT(store_name)
Result:
COUNT and DISTINCT can be used together in a statement to fetch the number of distinct entries in a table. For example, if we want to find out the number of distinct stores, we'd type,
SELECT COUNT(DISTINCT store_name)
Result:
|