Im trying to get this result:
NULL 350
google 98
yahoo 5
bing 4
With this query:
SELECT engine, COUNT(engine) AS count
FROM visits
GROUP BY engine
ORDER BY count DESC
But it returns:
google 98
yahoo 5
bing 4
NULL 0
How can i solve this?
Use COUNT(1)
instead:
SELECT engine, COUNT(1) AS count
FROM visits
GROUP BY engine
ORDER BY count DESC;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With