I am trying to Find out the common/similar urls, strip down the parameters in the following urls and add the views/visits column values of the common URLs to essentially eliminate duplicate rows (as shown below)...have tried multiple things and yet not able to achieve the desired results..can someone please help me with this?

Thanks

URL - views - visits

Www.abc.com/407.jsp - 32 -9

Www.abc.com/407.jsp#test - 66 -78

Www.abc.com/407.jsp#test-yhg - 77 - 88

Www.abc.com/407.jsp#testtrue - 54 - 99

Www.abc.com/401.jsp - 67 - 21