CREATE OR REPLACE VIEW food600.ssuma_dokladov_buf
 AS
 SELECT round(sum(obra_buf.cena * obra_buf.mnozstvi)::numeric, 4) AS total,
    obra_buf.c_stredisk,
    obra_buf.c_dokl,
    obra_buf.c_data
   FROM food600.obra_buf
  GROUP BY obra_buf.c_data, obra_buf.c_stredisk, obra_buf.c_dokl;
