Thanks a lot for the help.I have run the query with some additions to it,but i get error"max functions requires on argument"query is: select min(max(power(13.2846176*(10/5),4 )- power(24.27436623*(20/5),3) + power(14.27967309*(30/5),2) + -2.455442334*(40/5) + 0.114953113,0),1))