Crediting for queries