Two mass shootings within two hours of each other left at least 17 injured, two fatally, police said.