union
select
case
-when PFI.filetype is PFC.filetype
+when PFI.filetype is not 'l'
+ and PFI.filetype is PFC.filetype
+ and PFI.mode is PFC.mode and PFI.username is PFC.username
+ and PFI.groupname is PFC.groupname and PFI.hash is PFC.hash
+ then 'noop'
+when PFI.filetype is 'l'
+ and PFI.target is PFC.target
+ and PFI.filetype is PFC.filetype
and PFI.mode is PFC.mode and PFI.username is PFC.username
and PFI.groupname is PFC.groupname and PFI.hash is PFC.hash
then 'noop'