Substring Last Character Sql Interview