The COUNT function returns the number of input rows that match a specific condition or query
SELECT COUNT(*)
FROM table_name
COUNT - does not consider null values in the column — SELECT COUNT(DISTINCT col)
FROM table
use above instead of
SELECT DISTINCT COUNT(col)
FROM table
because the first one works and the second does not
We use cookies to understand our websites traffic and offer our website visitors personalized experience. To find out more, click ‘More Information’. In addition, please, read our
Privacy policy.