In this puzzle you have to have find the sum of sales for each employee. The catch here is that for inactive employees(IsActive=0) group the sum under Inactive name and rest under their respective names. Another catch is that you need to do this in a single select.Please check out the sample input and the expected output.