CREATE OR REPLACE VIEW food600.s_mondieu_trzby
 AS
 SELECT sum(sk__plt.cena_pl) AS trzba,
    sk__plt.druh_pl,
    sk__uza.uzaverka,
    sk__uza.idriadok AS c_uzaverka,
    food_dat.id_zkratka,
    food_dat.prevadzka,
    ssksez_uniq.uct_den,
    druhy_pl.j0 AS platba
   FROM food600.sk__uza
     JOIN food600.sk__plt ON sk__uza.idriadok = sk__plt.c_uzaverka
     JOIN food600.food_dat ON sk__uza.id_kas = food_dat.id
     JOIN food600.ssksez_uniq ON sk__uza.idriadok = ssksez_uniq.c_uzaverka
     JOIN food600.druhy_pl ON sk__plt.druh_pl = druhy_pl.nazev
  GROUP BY sk__uza.uzaverka, sk__uza.idriadok, food_dat.id_zkratka, food_dat.prevadzka, ssksez_uniq.uct_den, sk__plt.druh_pl, druhy_pl.j0;
