title: remove immediate duplicate steps from a sequence and keep one instance
body: <p>I have a following sequence of paths in bigquery </p>
  
  <p>other>>other>>other>>other>>PDP Base>>PDP Base>>Tariff>>other>>other>>other>>other>>other>>other>>other>>other>>other>>other>>other>>other</p>
  
  <p>I want to remove immediate duplicates to change the string to something like
  other>>pdp base>>tariff>>other</p>