Why does Location=emptystring occupy two rows on this data.stackexchange query? https://data.stackexchange.com/stackoverflow/query/1627756/test
SELECT
SUM(Reputation) AS rep,
Location
FROM Users
GROUP BY Location
ORDER BY rep DESC
Why does Location=emptystring occupy two rows on this data.stackexchange query? https://data.stackexchange.com/stackoverflow/query/1627756/test
SELECT
SUM(Reputation) AS rep,
Location
FROM Users
GROUP BY Location
ORDER BY rep DESC
If you try this verison you'll see Location has both blank string and
null
valuesYou can
IsNull / Coalesce
to sum both together: