Add the query information to the history class for the popular table