Files
database/migrations/000.012.sql
T
2016-07-07 16:09:21 +02:00

8 lines
344 B
SQL

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;