select HMDS,Year(Date),Diagnosis,ReportBy,ReviseDiag,RevisedBy,FinalDiag,FinalBy
from Main join Report on Rpt_ID = DBID
#where FinalDiag is null and ReviseDiag is not null and ReviseDiag = Diagnosis
#where FinalDiag is null and ReviseDiag is not null and ReviseDiag <> Diagnosis
#where ReviseDiag is null and FinalDiag is not null and FinalDiag = Diagnosis
#where ReviseDiag is not null and FinalDiag is not null and FinalDiag <> ReviseDiag and ReviseDiag <> Diagnosis
where ReviseDiag is not null and FinalDiag is not null and FinalDiag <> ReviseDiag and FinalDiag = Diagnosis
order by Rpt_ID desc