Commit all views
This commit is contained in:
@@ -58,7 +58,8 @@ CREATE OR REPLACE VIEW public.vw_bi_itsa_physical_open_costs AS
|
||||
((opq."OpenQuantitySigned" * pur."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||
1 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
'Price'::text AS "Line Group"
|
||||
FROM ((vw_utility_dim_physical_purchase_contract ctr
|
||||
JOIN vw_utility_purchase_physical_contract pur ON ((ctr."intPurchaseLineId" = pur."intPurchaseLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||
@@ -73,7 +74,8 @@ UNION ALL
|
||||
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
||||
3 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
'MTM'::text AS "Line Group"
|
||||
FROM ((vw_utility_physical_mtm_definition mtm
|
||||
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((mtm."intContractLineId" = ctr."intPurchaseLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||
@@ -92,7 +94,8 @@ UNION ALL
|
||||
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||
2 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
fees."strProductGroup" AS "Line Group"
|
||||
FROM ((vw_utility_contract_fees fees
|
||||
JOIN vw_utility_dim_physical_purchase_contract ctr ON ((fees."intContractLineId" = ctr."intPurchaseLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intPurchaseLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Purchase'::text))))
|
||||
@@ -107,7 +110,8 @@ UNION ALL
|
||||
((opq."OpenQuantitySigned" * sale."dblUnitPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||
1 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
'Price'::text AS "Line Group"
|
||||
FROM ((vw_utility_dim_physical_sale_contract ctr
|
||||
JOIN vw_utility_sale_physical_contract sale ON ((ctr."intSaleLineId" = sale."intSaleLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||
@@ -122,7 +126,8 @@ UNION ALL
|
||||
(opq."OpenQuantitySigned" * opq."AvgMtmPrice") AS "Open Cost Amount",
|
||||
3 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
'MTM'::text AS "Line Group"
|
||||
FROM ((vw_utility_physical_mtm_definition mtm
|
||||
JOIN vw_utility_dim_physical_sale_contract ctr ON ((mtm."intContractLineId" = ctr."intSaleLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||
@@ -141,7 +146,8 @@ UNION ALL
|
||||
END)::numeric * opq."OpenQuantity") * fees."dblPrice") * ('-1'::integer)::numeric) AS "Open Cost Amount",
|
||||
2 AS "intPriceGroupId",
|
||||
ctr."dtmEstimatedBLDate" AS "Estimated BL Date",
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed"
|
||||
opq."TheoriticalQuantitySigned" AS "Contract Quantity Signed",
|
||||
fees."strProductGroup" AS "Line Group"
|
||||
FROM ((vw_utility_contract_fees fees
|
||||
JOIN vw_utility_dim_physical_sale_contract ctr ON ((fees."intContractLineId" = ctr."intSaleLineId")))
|
||||
JOIN contract_open_quantity opq ON (((ctr."intSaleLineId" = opq."TradeLineId") AND (opq."TradeType" = 'Sale'::text))))
|
||||
|
||||
Reference in New Issue
Block a user