Given a table with 10000 rows. I want to split the rows to 9 segments each of 10000/9 rows. (all numbers are dynamic 42987/14 for example). So I want my select query results to look like. I am using BigQuery
row number | segment | Other headers |
---|---|---|
1 | 1 | other columns |
2 | 1 | other columns |
… | … | … |
1111 | 1 | other columns |
1112 | 2 | other columns |
1113 | 2 | other columns |
… | … | … |
9999 | 9 | other columns |
10000 | 10 | other columns |