find min value query 2, new structure for enhancing querys