statistics and tool query