Adding query analytics