I am using PostgreSQL, I’ve one column named Result in Job table,
it contains values like 2/3, 1/3, 2/3.
For Example: Job table rows are:
job_id result
------ ------
1 2/3
2 1/3
3 2/3
I want to apply aggregate function on result column in such way that
I can get result like: 5/9
But Result is of text type column and we cannot directly apply sum/avg/min/max etc. function on that column.
Can anybody suggest any other approach to achieve that result using query itself?
All suggestions are appreciated.
Thanks.
1 Answer