I am using sum function to find the total but getting error. Here is the query:
select sum(col1)
from table_name
where col2="abc"
Error: function sum(text) does not exist Hint: No function matches the given name and argument types. You might need to add explicit type casts