A [small edit](https://data.stackexchange.com/stackoverflow/query/114033/votes-with-non-null-userid) of your query makes it clear: <!-- language: lang-sql --> SELECT COUNT(*) FROM Votes WHERE VoteTypeId = 2 AND UserId IS NOT NULL - 0 (1 row(s) affected) <sub>This is really just a comment.</sub>