CREATE OR REPLACE VIEW food600.s_mondieu_hotovost
 AS
 SELECT sum(sk__plt.cena_pl) AS trzba,
    sk__uza.uzaverka,
    food_dat.id_zkratka,
    food_dat.prevadzka
   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
  WHERE sk__plt.druh_pl = 'Hotove'::bpchar
  GROUP BY sk__uza.uzaverka, food_dat.id_zkratka, food_dat.prevadzka;
