Row |day |Prob
--------------------------
1 5 0.3
2 3 0.1
3 2 0.6
4 4 0.5
5 1 0.4
I want to merge day 1 to day 3 to a category and day 4 to 5 to another category how to do that? Prob of the category is not just simply adding each day's prob. Current code:
SELECT day, SUM( new ) / SUM( new+ old ) **AS** Prob
FROM mydata
WHERE year > 2005 and ( day >=1 and day <=5)
GROUP by day;