CREATE OR REPLACE VIEW food600.szoznamuctov
 AS
 SELECT sk__plt.ucet,
    sum(sk__plt.cena_pl) AS cena_pl,
    sk__plt.c_uzaverka,
    sk__uza.uzaverka,
    sk__uza.id_kas
   FROM food600.sk__plt
     LEFT JOIN food600.sk__uza ON sk__plt.c_uzaverka = sk__uza.idriadok
  GROUP BY sk__plt.ucet, sk__uza.uzaverka, sk__uza.id_kas, sk__plt.c_uzaverka
  ORDER BY sk__uza.id_kas, sk__uza.uzaverka, sk__plt.ucet;
