SELECT DISTINCT year(`a`.`completedDate`) AS `year`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '1') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_1`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '2') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_2`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '3') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_3`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '4') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_4`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '5') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_5`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '6') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_6`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '7') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_7`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '8') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_8`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '9') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_9`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '10') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_10`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '11') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_11`,
			(SELECT if((count(`b`.`ID`) > 0),count(`b`.`ID`),0) FROM `mgsdb_master`.`job` `b` WHERE ((month(`b`.`completedDate`) = '12') AND (`b`.`is_delete` = 0) AND (year(`b`.`completedDate`) = year(`a`.`completedDate`)) AND (`b`.`departmentID` = 2))) AS `complete_12` 
			FROM `mgsdb_master`.`job` `a` 
			WHERE (`a`.`is_delete` = 0)
			AND (`a`.`departmentID` = 2)
			AND year(`a`.`createdTS`) = 2019
			GROUP BY year(`a`.`completedDate`),month(`a`.`completedDate`)