Cascade delete with many to many relationship

Hi, I have a database with FDFeed, FDTag which has a many-to-many relationship and I have the join schema FDFeedTags. I have followed the guides here and here to set it all up.

When I delete an FDFeed and it is the last parent of an FDTag I want the FDTag to be removed. How can I achieve this?

Here’s a snap of my SQL Schema. Thanks.

I guess you need to aggregate the FDTags to count how many rows it is before delete