I don’t have an actual query to assist, but some pre-work to assist you is here: Unused ports more than 30 days