Fiserv interview question

oops, sql queries and a code.. reverse an integer.