公式document
クエリのネストを解除するために、Amazon Redshift には、SUPER 配列を反復処理する 2 つの方法があります。FROM 句の PartiQL 構文と UNNEST オペレーションです。
SQLサンプル
WITH input_data as ( SELECT split_to_array('1,2,3', ',') as ids ) -- , ids as ( SELECT id FROM input_data, input_data.ids AS id -- ) -- select * from users where in (select id from ids);
活用どころ
文字列で'1,2,3'を渡すときに便利(tableauなど)