--------------------------------------------------------
--  DDL for View SMD_PDBS_HISTORY_MOVES_PRODUCTION_VW
--------------------------------------------------------

  CREATE OR REPLACE FORCE EDITIONABLE VIEW "OTHQ_OWN"."SMD_PDBS_HISTORY_MOVES_PRODUCTION_VW" ("PDBID", "CREATED", "MOVEDFROM", "MOVEDTO", "DELETED", "REGION", "ENDPOINT", "METADATA_DOWNLOADED_TIMESTAMP_UTC", "PRODUCT_TYPE") DEFAULT COLLATION "USING_NLS_COMP"  AS 
  select
    PDBID, CREATED, MOVEDFROM, MOVEDTO, DELETED, REGION, ENDPOINT, METADATA_DOWNLOADED_TIMESTAMP_UTC,
    case when ENDPOINT like '%nsx%' then 'NSX' else 'NSN' end as PRODUCT_TYPE
from
    SRC_SMD_PDBS_HISTORY_MOVES_TB
where
    ENDPOINT like 'netsuite-production%'
;
