add min max stats in sql requests
add min max stats in sql requests