select * from wc; select loc,count(loc) from wc lateral view explode(split(word,’ ')) a as loc group by loc;