CREATE TABLE cn_rs_denorm_rules_all (
    USAGE_ID                  NUMBER            NOT NULL,
    RULE_ID                   NUMBER        ,
    ORG_ID                    NUMBER(18, 0)     NOT NULL,
    ABSOLUTE_RANK             NUMBER        ,
    RELATIVE_RANK             NUMBER        ,
    RELATED_RULE_ID           NUMBER        ,
    START_DATE                DATE          ,
    END_DATE                  DATE          ,
    RANK                      NUMBER        ,
    LEVEL_FROM_ROOT           NUMBER        ,
    LEVEL_FROM_PARENT         NUMBER        ,
    IMMEDIATE_PARENT_FLAG     VARCHAR2(4)   ,
    TOP_LEVEL_RULE_ID         NUMBER        ,
    NUM_WINNERS               NUMBER        ,
    CREATION_DATE             TIMESTAMP(6)      NOT NULL,
    CREATED_BY                VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE          TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY           VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN         VARCHAR2(128) ,
    REQUEST_ID                NUMBER(18, 0) ,
    JOB_DEFINITION_NAME       VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE    VARCHAR2(3600),
    USAGE_ID                  NUMBER            NOT NULL,
    RULE_ID                   NUMBER        ,
    ORG_ID                    NUMBER(18, 0)     NOT NULL,
    ABSOLUTE_RANK             NUMBER        ,
    RELATIVE_RANK             NUMBER        ,
    RELATED_RULE_ID           NUMBER        ,
    START_DATE                DATE          ,
    END_DATE                  DATE          ,
    RANK                      NUMBER        ,
    LEVEL_FROM_ROOT           NUMBER        ,
    LEVEL_FROM_PARENT         NUMBER        ,
    IMMEDIATE_PARENT_FLAG     VARCHAR2(4)   ,
    TOP_LEVEL_RULE_ID         NUMBER        ,
    NUM_WINNERS               NUMBER        ,
    CREATION_DATE             TIMESTAMP(6)      NOT NULL,
    CREATED_BY                VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_DATE          TIMESTAMP(6)      NOT NULL,
    LAST_UPDATED_BY           VARCHAR2(256)     NOT NULL,
    LAST_UPDATE_LOGIN         VARCHAR2(128) ,
    REQUEST_ID                NUMBER(18, 0) ,
    JOB_DEFINITION_NAME       VARCHAR2(400) ,
    JOB_DEFINITION_PACKAGE    VARCHAR2(3600),
    CONSTRAINT pk_cn_rs_denorm_rules_all PRIMARY KEY (RULE_ID, RELATED_RULE_ID, RULE_ID, RELATED_RULE_ID)
);
