← 🗄️ Data & SQL EngineeringNEXT IN DATA & SQL ENGINEERINGIncremental Models and MERGE/UPSERT→
Core
Slowly Changing Dimensions (SCD)
Slowly changing dimensions are the patterns for handling dimension attributes that change over time, such as a customer moving cities or a product changing category. Type 1 overwrites history, Type 2 keeps versioned rows with effective dates and a current flag, and Type 3 keeps a prior-value column. Applied-AI interviews probe it because answering what something looked like at the time of an event requires deliberate history tracking, and most analysts only know how to overwrite.
a free account unlocks the core curriculum tier · no card
COURSES COVERING THIS TOPIC
No lesson covers this one directly yet. These teach the surrounding topic from the beginning.
RELATED CONCEPTS
PRACTICE THIS IN REAL QUESTIONS
SQL & Data EngineeringSCD Type 2 in Delta Lake: track history with one atomic MERGE.→SQL & Data EngineeringWhat is a MERGE (upsert), and how do you use it for incremental loads and SCDs?→SQL & Data EngineeringGiven rows with start and end timestamps, merge all overlapping intervals per user in SQL.→SQL & Data EngineeringGroup a stream of user events into sessions in SQL (30-minute inactivity gap) using window functions.→SQL & Data EngineeringTop-N per group in SQL: ROW_NUMBER vs RANK vs DENSE_RANK.→SQL & Data EngineeringA SQL query is slow. How do you diagnose and optimize it?→
COMPANIES THAT ASSUME THIS
