SELECT tb_Users.col_UsersName, count(*) FROM tb_ListCompany LEFT JOIN tb_Users ON tb_Users.col_UserID = tb_ListCompany.col_UserID LEFT JOIN tb_DeficiencyAssignment ON tb_DeficiencyAssignment.col_CompanyName = tb_ListCompany.col_CompanyName AND col_CompletedDate='0000-00-00' LEFT JOIN tb_Deficiency ON tb_Deficiency.col_DeficiencyID = tb_DeficiencyAssignment.col_DeficiencyID WHERE (tb_ListCompany.col_UserID IS NOT NULL AND tb_ListCompany.col_UserID <> '0') AND tb_Deficiency.col_Centre LIKE '$var_Centre' GROUP BY tb_ListCompany.col_UserID ORDER BY tb_Users.col_UsersName LIMIT 7