It’s hard to keep up with new Snowflake features coming out left, right and center. Here’s one that’s created a lot of buzz in the community – EXCLUDE and RENAME. So simple, and yet so much time saved!
create or replace table frosty_db.challenges.week27
(
icecream_id int,
icecream_flavour varchar(15),
icecream_manufacturer varchar(50),
icecream_brand varchar(50),
icecreambrandowner varchar(50),
milktype varchar(15),
region_of_origin varchar(50),
recomendad_price number,
wholesale_price number
);
insert into frosty_db.challenges.week27 values
(1, 'strawberry', 'Jimmy Ice', 'Ice Co.', 'Food Brand Inc.', 'normal', 'Midwest', 7.99, 5),
(2, 'vanilla', 'Kelly Cream Company', 'Ice Co.', 'Food Brand Inc.', 'dna-modified', 'Northeast', 3.99, 2.5),
(3, 'chocolate', 'ChoccyCream', 'Ice Co.', 'Food Brand Inc.', 'normal', 'Midwest', 8.99, 5.5);
Take the start up code above, and write a SELECT * query that:
- Excludes
milktype
- Renames
icecreambrandowner
toice_cream_brand_owner
This one should only take 5 minutes!
Remember, if you want to participate: