Skip to content

Instantly share code, notes, and snippets.

View alcheng10's full-sized avatar

Albert Cheng alcheng10

View GitHub Profile

Date Islands Example

# Customer Contract and Status Dimension Table
CREATE TABLE Dim_Cust_Contract_Status AS (
SELECT 
    ROW_NUMBER() OVER (ORDER BY K.Customer_ID) AS Customer_Contract_Status_SK,
    K.Customer_ID,
    K.Contract_GUID,
    K.Contract_Start_Date,