Hi All,
I need a basic solution for how to add to a numeric vale in a column which is conditional as in there are thousand of rows having numeric value as (0,1,2,3,23,3,53,0,4,6,10 etc) I want to add +1 to all the data except o, that is o remains 0 but other numbers except o gets added +1 i.e 1 becomes 2, 6 becomes 7, ex- 0=0, 1=2, 5=6, 0=0 .Kindly guide me how can I achieve this.
Then I have one more requirement where if the column has value 2 it should come under a new column in range which is 0-5, in case of 40 it should be >30, in case of 7 it should be 6-15, there are three criteria's in range column which has 0-5,6-15, 16-29 and >30 . To give an overview I am attaching an image to make you understand better. Kindly help me out to solve this.
Ex. Age | Output 2nd Query : Age | Range output
0 | 0 1 | 0-5
0 | 0 4 | 0-5
1 | 2 5 | 0-5
2 | 3 34 | >30
4 | 5 12 | 6-15
6 | 7 80 | >30
2 | 3 9 | 6-15