In PostgreSQL, is it possible to generate a series of repeating numbers? For example, I want to generate the numbers 1 to 10, with each number repeated 3 times:
SELECT a.x from generate_series(0, 100) as a(x), generate_series(1, 3)