Example Snowflake CTE query
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
with sample_data as ( | |
select * | |
from snowflake_sample_data.tpch_sf1.customer | |
), | |
nation_14_customers as ( | |
select * | |
from sample_data | |
where c_nationkey = 14 | |
), | |
nation_9_customers as ( | |
select * | |
from sample_data | |
where c_nationkey = 9 | |
) | |
select * | |
from nation_14_customers | |
union all | |
select * | |
from nation_9_customers |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment