Sequentially Fill in Integers
Start Timer
0:00:00
You have been given a table tbl_numbers with only one column: int_numbers. It can have one integer number value per row in a sequential manner.
Write a query to return the number repeated by one times its own value.
For example, the integer number 5 would appear five times in the output (1 times 5).
Example:
Input:
tbl_numbers table
| int_numbers |
|---|
1 |
2 |
3 |
4 |
Output:
| seq_numbers |
|---|
1 |
2 |
2 |
3 |
3 |
3 |
4 |
4 |
4 |
4 |
.
.
.
.
.
.
.
.
.
Comments