I need to export a different set of columns from the same query to different locations on S3 without running the query multiple times.
- SELECT S3EXPORT(col1, col2 USING PARAMETERS url = 'url-1') OVER () FROM (something-fixed)
- SELECT S3EXPORT(col3, col4 USING PARAMETERS url = 'url-2') OVER () FROM (something-fixed)
- SELECT S3EXPORT(col5, col6 USING PARAMETERS url = 'url-3') OVER () FROM (something-fixed)
- SELECT S3EXPORT(col7, col8 USING PARAMETERS url = 'url-4') OVER () FROM (something-fixed)
where "something-fixed" is the same query for all four and is highly complex.
Can I combine all 4 of the above queries into one query somehow so that the "something-fixed" doesn't have to be re-computed four times?
