Suppose the following query (simplified from a more complex query):
SELECT ARRAY_CONCAT([1, 2], [3, 4], [5, 6]) as count_to_six;
Which results in the array [1,2,3,4,5,6]
Reformulating in the following query (with WITH statement) results in the error 'The argument to ARRAY_CONCAT (or ARRAY_CONCAT_AGG) must be an array type but was STRUCT, ARRAY, ARRAY> at [3:8]'
WITH q1 AS
(SELECT ([1, 2], [3, 4], [5, 6]) as count_to_six)
SELECT ARRAY_CONCAT(count_to_six) FROM q1
My question is: in the 'WITH AS'-query, how to get the correct query with the same results as in the initial query?