Using a single array column: SELECT student , score FROM tests CROSS JOIN UNNEST ( scores ) AS t … By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. " SELECT * FROM (VALUES array[2, 2]) a(x) RIGHT OUTER JOIN UNNEST(x) ON true ", " line . New DM on House Rules, concerning Nat20 & Rule of Cool. Were senior officals who outran their executioners pardoned in Ottoman Empire? how can write presto query give me average b value across entries? With tax-free earnings, isn't Roth 401(k) almost always better than 401(k) pre-tax for a young person? UNNEST (CAST(JSON_EXTRACT('{"payload":[{"type":"b","value":"9"},{"type":"a","value":"8"}]}','$.payload') AS ARRAY