Smart rules to delete all tags save one?

Somewhat inspired by the basic idea in this thread but with a woeful ignorance of scripting I decided to try to move a short way to the utlimate goal using smart rules (and, possibly, other inbuilt automation).

I have started by tagging relevant items in my personal database with a “Shared” tag. However, as a general principle, I don’t use tags in that database so have a smart rule to delete them (whenever I apply that rule). I do have other databases where tags imported from Finder are useful but don’t wish to have them in this database.

Can somebody tell me why the following smart rule doesn’t work and happily anihilates the “Shared” tag in spite of being told not to?

2020-10-14_09-26-10

Sorry if I’m missing something terribly obvious (which is entirely possible!).

Stephen

The second condition should be Name is not, currently you delete all tags that don’t have the tag “Shared”.

Thanks so much for the very quick response. I knew I must be doing something wrong!

Stephen