making a combined sum of two columns
- by bsandrabr
I have a table (apples) containing:
cid date_am date_pm
----------------------
1 1 1
2 2 1
3 1 3
1 1 2
I asked a question earlier (badly) about how I would rank the customers in order of the number of ones(1) they had. The solution was (based on one column):
SELECT cid, sum( date_pm ) AS…