Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
2
Indexable
Never
CREATE MATERIALIZED VIEW hobs_ods_staging.hos_cart_details_by_status AS SELECT * FROM hobs_ods_staging.hos_cart_details WHERE hoscd_status IS NOT NULL AND hoscd_event_date IS NOT NULL AND hoscd_businessid IS NOT NULL AND hoscd_key IS NOT NULL PRIMARY KEY (hoscd_status, hoscd_event_date, hoscd_businessid, hoscd_key) WITH CLUSTERING ORDER BY (hoscd_event_date ASC, hoscd_businessid ASC, hoscd_key ASC);



CREATE MATERIALIZED VIEW hobs_ods_staging.hos_cart_details_by_businessid AS SELECT * FROM hobs_ods_staging.hos_cart_details WHERE hoscd_businessid IS NOT NULL AND hoscd_event_date IS NOT NULL AND hoscd_key IS NOT NULL AND hoscd_username IS NOT NULL PRIMARY KEY (hoscd_businessid, hoscd_event_date, hoscd_key, hoscd_username) WITH CLUSTERING ORDER BY (hoscd_event_date ASC, hoscd_key ASC, hoscd_username ASC);




CREATE MATERIALIZED VIEW hobs_ods_staging.hos_cart_details_by_username_v2 AS SELECT * FROM hobs_ods_staging.hos_cart_details WHERE hoscd_username IS NOT NULL AND hoscd_event_date IS NOT NULL AND hoscd_businessid IS NOT NULL AND hoscd_key IS NOT NULL PRIMARY KEY (hoscd_username, hoscd_event_date, hoscd_businessid, hoscd_key) WITH CLUSTERING ORDER BY (hoscd_event_date ASC, hoscd_businessid ASC, hoscd_key ASC);