This script answers the question, “How long have marriages lasted?”. For each Marriage and corresponding Annulment or Divorce event for a couple, it extracts the year of the events and also gets the year of the death of the earlier of the two to have died. It then calculates the length in time between the…