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