Adding query for code frequency.