Run Code  | API  | Code Wall  | Users  | Misc  | Feedback  | Login  | Theme  | Privacy  | Blog 

count events by 2 shift cycles using CTE

Language: Layout:
View schema
Execution time: 0,03 sec, rows selected: 6, rows affected: 77, absolute service time: 0,19 sec 
edit mode |  history  | discussion
   shift_type shift_no prev_year this_year
1 8 hour 1 11 0
2 8 hour 2 14 26
3 8 hour 3 13 13
4 12 hour 1 21 22
5 12 hour 2 17 17

    
                
stackse - search stackoverflow differently