CREATE OR REPLACE VIEW food600.ssk__pltsumy
 AS
 SELECT ssk__plt.c_uzaverka,
    ssk__plt.ucet,
    ssk__plt.cena_pl,
    ssk__plt.druh_pl,
    aaa.prachy_sum
   FROM food600.ssk__plt
     JOIN ( SELECT ssk__plt_1.c_uzaverka,
            ssk__plt_1.ucet,
            sum(ssk__plt_1.cena_pl) AS prachy_sum
           FROM food600.ssk__plt ssk__plt_1
          GROUP BY ssk__plt_1.c_uzaverka, ssk__plt_1.ucet) aaa ON ssk__plt.c_uzaverka = aaa.c_uzaverka AND ssk__plt.ucet = aaa.ucet
  ORDER BY ssk__plt.c_uzaverka, ssk__plt.ucet;

