If Greater Than Function in SQL ?

Original text of this message