Hi Here is my query which aggregates data from 2 tabledw_t_asw_host_jobdata and crmbuildto PL, There are some jobs which are there in DW_T_ASW_HOST_JOBDATA table but not in CRMBuildtoPL, and i want all the jobs aggregated with having the word "NotDefined" for ProductLine column for the jobs not in CRMBuildtoPL table.Here is my Query , could any body please let mw know if this sql query is valid and how to include word "NotDefined" for productLine whereever NULL.... SELECT A.FINISH_DAY, C.PRODUCTLINE, SUM(A.PENDING_MINUTES) AS TOTAL_PEND_MINUTES, SUM(A.RUN_MINUTES) AS TOTAL_RUN_MINUTES, COUNT(A.JOB_STEP_ID) AS NUM_JOB_STEPSFROM dbo.DW_T_ASW_HOST_JOBDATA AS A left outer join ( select distinct jobname, productline from aswtrans.dbo.CRMBUILDTOPL ) Con A.JOB_NAME = C.JOBNAMEGROUP BY A.FINISH_DAY,C.PRODUCTLINE