Group by not working for more than 1 word which contains space in between