CREATE OR REPLACE VIEW food600.c_uz
 AS
 SELECT DISTINCT sez.id_kas,
    sez.uzaverka,
    sez.uz_cislo::numeric(4,0) AS uz_cislo,
    fin.c_data::bigint AS finc_data,
    sez.c_data::bigint AS sezc_data
   FROM food600.sk__fin fin
     LEFT JOIN food600.sk__sez sez ON fin.c_uzaverka = sez.c_uzaverka
  ORDER BY sez.id_kas, sez.uzaverka;
