Advertisement
aadddrr

tr_current_sales_gross_profit_by_ctgr_product

Aug 25th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE SEQUENCE tr_current_sales_gross_profit_by_ctgr_product_seq
  2.  INCREMENT 1
  3.  MINVALUE 1
  4.  MAXVALUE 9223372036854775807
  5.  START 10
  6.  CACHE 1;
  7.  
  8. CREATE TABLE tr_current_sales_gross_profit_by_ctgr_product
  9. (
  10.     current_sales_gross_profit_by_ctgr_product_id bigint NOT NULL DEFAULT nextval('tr_current_sales_gross_profit_by_ctgr_product_seq'),
  11.     session_id character varying(50),
  12.     tenant_id bigint,
  13.     ou_id bigint,
  14.     partner_id bigint,
  15.     partner_code character varying(50),
  16.     partner_name character varying(100),
  17.     ctgr_product_id bigint,
  18.     ctgr_product_code character varying(50),
  19.     ctgr_product_name character varying(100),
  20.     curr_code character varying(5),
  21.     current_sales_amount numeric,
  22.     current_monthly_price_amount numeric,
  23.     current_gross_profit numeric,
  24.     product_id bigint DEFAULT -99,
  25.     qty numeric,   
  26.     CONSTRAINT tr_current_sales_gross_profit_by_ctgr_product_pkey PRIMARY KEY (current_sales_gross_profit_by_ctgr_product_id)
  27. )
  28. WITH (
  29.     OIDS=FALSE
  30. );
  31.  
  32. CREATE INDEX idx_tr_current_sales_gross_profit_by_ctgr_product_01
  33.    ON tr_current_sales_gross_profit_by_ctgr_product
  34.    USING btree
  35.    (session_id, tenant_id, ou_id, partner_id, ctgr_product_id, curr_code);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement