Print Patterns Using Functions In Sql