CREATE OR REPLACE VIEW food600.sdokladymaxkk
 AS
 SELECT max(doklady.c_dokl) AS max_c_dokl,
    doklady.c_stredisk,
    doklady.c_data
   FROM food600.doklady
  WHERE doklady.operace = 'KK'::bpchar
  GROUP BY doklady.c_data, doklady.c_stredisk;
