Query redesign