Advertisement
aadddrr

tr_rekap_sales_gross_profit_by_ctgr_product

Aug 25th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CREATE SEQUENCE tr_rekap_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_rekap_sales_gross_profit_by_ctgr_product
  9. (
  10.     rekap_sales_gross_profit_by_ctgr_product_id bigint NOT NULL DEFAULT nextval('tr_rekap_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.     rekap_sales_amount numeric,
  22.     rekap_monthly_price_amount numeric,
  23.     rekap_gross_profit numeric,
  24.     CONSTRAINT tr_rekap_sales_gross_profit_by_ctgr_product_pkey PRIMARY KEY (rekap_sales_gross_profit_by_ctgr_product_id)
  25. )
  26. WITH (
  27.     OIDS=FALSE
  28. );
  29.  
  30. CREATE INDEX idx_tr_rekap_sales_gross_profit_by_ctgr_product_01
  31.   ON tr_rekap_sales_gross_profit_by_ctgr_product
  32.   USING btree
  33.   (session_id, tenant_id, ou_id, partner_id, ctgr_product_id, curr_code);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement