Similar to replicate function In Sql – Query Examples