Advertisement
aadddrr

tr_sales_gross_profit_by_ctgr_product_for_output

Aug 25th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE SEQUENCE tr_sales_gross_profit_by_ctgr_product_for_output_seq
  2.  INCREMENT 1
  3.  MINVALUE 1
  4.  MAXVALUE 9223372036854775807
  5.  START 10
  6.  CACHE 1;
  7.  
  8. CREATE TABLE tr_sales_gross_profit_by_ctgr_product_for_output
  9. (
  10.     sales_gross_profit_by_ctgr_product_for_output_id bigint NOT NULL DEFAULT nextval('tr_sales_gross_profit_by_ctgr_product_for_output_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_gross_profit numeric,
  23.     rekap_sales_amount numeric,
  24.     rekap_gross_profit numeric,
  25.     CONSTRAINT tr_sales_gross_profit_by_ctgr_product_for_output_pkey PRIMARY KEY (sales_gross_profit_by_ctgr_product_for_output_id)
  26. )
  27. WITH (
  28.     OIDS=FALSE
  29. );
  30.  
  31. CREATE INDEX idx_tr_sales_gross_profit_by_ctgr_product_for_output_01
  32.    ON tr_sales_gross_profit_by_ctgr_product_for_output
  33.    USING btree
  34.    (session_id, tenant_id, ou_id, partner_id, ctgr_product_id, curr_code);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement