How do COUNT(*) and COUNT(DISTINCT product_name) differ?
COUNT(*)
COUNT(DISTINCT product_name)
COUNT(*) counts only rows whose every column is NULL.
COUNT(*) counts result rows, while COUNT(DISTINCT product_name) counts different non-duplicate product names.
COUNT(DISTINCT product_name) counts only repeated names and excludes names seen once.
They always return the same value because DISTINCT has no effect inside COUNT.