SELECT CAST(NVL(COUNT(*), 0) as Numeric(5,0)) as nCount, ; Queue_Names.cQueue_Names_pk, Queue_Names.cQueue_Name, Trans.cDepartment_Code FROM Queue_Names LEFT JOIN Trans_Employees_Queues on Queue_Names.cQueue_Names_pk = Trans_Employees_Queues.cQueue_Names_fk LEFT JOIN Trans on Trans.cTrans_pk = Trans_Employees_Queues.cTrans_fk where Queue_Names.iActive_Flag = 1 and Trans_Employees_Queues.iActive_Flag = 1 group by 2,3,4It returns only 3 records for the 3 queue names I have in Trans_Employees_Queues table. I would expect it to return all possible queue names from Queue Names table with 0 as count. Do you see what's the error in my logic?