0

I was using Google SQL and I ran into the following challenge. For practical issues, let's assume we have the following table:

TABLE_1

Status (string) Values (array)
Status 1 [a,b]
Status 1 [c,d]
Status 1 [e,f]
Status 2 [g,h]
Status 2 [i,j]

And the desired outcome is the table_2, which should be structured as follows:

TABLE_2

Status (string) Values (array of arrays)
Status 1 [[a,b],[c,d],[e,f]]
Status 2 [[g,h],[i,j]]

I have tried using array grouping functions but I didn't manage to get SQL to build arrays of arrays in the process of grouping by status. What am I missing?

2
  • 1
    Nested arrays are not supported in BigQuery. So, you need to revisit your expected output Commented Feb 2, 2022 at 17:56
  • Noted, thanks Mikhail! Commented Feb 2, 2022 at 18:48

1 Answer 1

1

According to Mikhail, this is not possible with BigQuery, so I am closing this thread.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.