Last night I spent an inordinate amount of time trying to get a query to work for Engineering Faith. All I wanted to know is how many followers each faith had.
I made a query like this (slightly simplified):
[code:3uubksc2]SELECT SUM(following_size)
FROM followings
GROUP BY faith[/code:3uubksc2]
This should have returned a list, like 3618 followers, 837 followers, and so on. Instead, it returned "1000" for each faith.
Now, I could easily tell that no faith had exactly 1000 followers. 1000 wasn't in the database at all actually. So I assumed I was doing something wrong, and got annoyed with it, and spent a good hour or so messing with it.
In frustration I tried this:
[code:3uubksc2]SELECT SUM(following_size) * 1
FROM followings
GROUP BY faith[/code:3uubksc2]
And it worked exactly as expected. For those less technically inclined, I multiplied all the results by one, and it went from always giving "1000" to giving the right results. Keep in mind, this is not my code doing this - this is the industry-standard MySQL database.
So my question is... can I swear off computers and live as a hermit in the woods?
- Allen