I have a .shp file of a country in which I have NAME_1 as state/province name. NAME_2 as district name and NAME_3 as towns of the district. I want to merge the polygons based on NAME_2 for the whole country except 30 entries out of them. I tried dissolve tool of QGIS but it didn't helped. There is one more problem here is that NAME_2 can be repeated for more than one NAME_1. So I have to take care of this also. I am doing it manually one by one using merge selected features in QGIS. Could somebody show me a way for doing this as fast as possible.