Upper and lower bounds for the degree of Groebner bases