Week 27 - SQL & Query Techniques
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!
Start Up Code
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
icecreambrandownertoice_cream_brand_owner
This one should only take 5 minutes!
Remember, if you want to participate:
- Sign up as a member of Frosty Friday. You can do this by clicking on the sidebar, and then going to ‘REGISTER‘
- Post your code to GitHub and make it publicly available (Check out our guide if you don’t know how to here)
- Post the URL in the comments of the challenge