I have a very simple rating system in my database where each rating is stored as an enum(\'1\',\'-1\'). To calculate the total I tried using this statement:
Yes, I'd suggest to change the type of the column. The issue becomes clear when you read the doc about enum type (which strongly recommends not to use numbers as enumeration values!) - the index of the enum item is returned, not the enum value itself.