We’ve gotten the message that some of our DBAs are loosing grasp of the internal structure of our FakeCompany inc. Let’s try to help them out!
To aid in this, we’re initiating a challenge! Your task is to create a reference table that encapsulates the essential aspects of our internal database structure.
What You Need to Do
Examine the Provided Table Image: A reference image (see below) outlines the basic format and information your table should include.
Create a Similar Table: Develop a table that mirrors the structure shown in the image. Make sure your table is tailored to reflect our specific database architecture at FakeCompany Inc.
The starting code for this challenge:
Startup code
CREATE OR REPLACE table departments (department_name varchar, department_ID int, head_department_ID int);
INSERT INTO departments (department_name, department_ID, head_department_ID) VALUES
('Research & Development', 1, NULL), -- The Research & Development department is the top level.
('Product Development', 11, 1),
('Software Design', 111, 11),
('Product Testing', 112, 11),
('Human Resources', 2, 1),
('Recruitment', 21, 2),
('Employee Relations', 22, 2);
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‘ (note joining our mailing list does not give you a Frosty Friday account)
- 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.
21 responses to “Week 73 – Intermediate”
-
Love this! So many use cases in Snowflake: role hierarchy, grants, access history…
- Solution URL – https://github.com/mferle/FrostyFriday/tree/main/Week%2073%20%E2%80%93%20Intermediate
-
Thanks for the challenge… flashbacks from some time ago working with oracle!
- Solution URL – https://github.com/dsmdavid/frostyfridays-sf/blob/main/models/challenge_73.sql
-
I’ve been waiting for a chance to use this functionality for years. Every time I think I’ve found a use case, we either reshape the data or opt for an alternative pattern (deliberately being vague to avoid spoilers in my comment).
Thanks for another fun challenge!
- Solution URL – https://github.com/ChrisHastieIW/Frosty-Friday
-
buy sildenafil without prescription cheap
Week 73 – Intermediate
-
First time using this subclause, cool! It seems to be supported by Oracle databases as well
- Solution URL – https://github.com/darko-nimbus/FROSTYFRIDAYCHALLENGES/blob/98e9f5f8130d155a8bb3e73674c3bfcea26edef7/73%20-%20Intermediate%20-%20Interconnected%20Data/73%20-%20Intermediate%20-%20Interconnected%20Data.sql
-
robaxin and gabapentin
Week 73 – Intermediate
-
remeron success stories
Week 73 – Intermediate
-
protonix half life
Week 73 – Intermediate
-
is abilify a controlled substance
Week 73 – Intermediate
-
x-actos segurança
Week 73 – Intermediate
-
acarbose dogs
Week 73 – Intermediate
-
repaglinide manufacturers hyderabad
Week 73 – Intermediate
-
semaglutide essence trial
Week 73 – Intermediate
-
synthroid emotional
Week 73 – Intermediate
-
voltaren tabletki
Week 73 – Intermediate
-
how long does it take for venlafaxine to work
Week 73 – Intermediate
-
sitagliptin medscape
Week 73 – Intermediate
-
ivermectin stromectol
Week 73 – Intermediate
-
tizanidine overdose fatal
Week 73 – Intermediate
-
tamsulosin chest pain
Week 73 – Intermediate
Leave a Reply
You must be logged in to post a comment.