printing query frequence