From 2deda628b2fff61b274290d15d7335ff69422c58 Mon Sep 17 00:00:00 2001 From: Martin Date: Thu, 7 Jul 2016 16:09:21 +0200 Subject: [PATCH] add material_price view --- migrations/000.012.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 migrations/000.012.sql diff --git a/migrations/000.012.sql b/migrations/000.012.sql new file mode 100644 index 0000000..e18922c --- /dev/null +++ b/migrations/000.012.sql @@ -0,0 +1,7 @@ +CREATE OR REPLACE VIEW v_materialprice AS + SELECT "product-printprices".groupid, + "product-printprices".materialid, + "product-printprices".price + FROM "product-printprices" + WHERE "product-printprices".groupid = ANY (ARRAY[1, 2]) + GROUP BY "product-printprices".groupid, "product-printprices".materialid, "product-printprices".price;