CREATE OR REPLACE VIEW food600.splatbyuctovnakopiuastorno
 AS
 SELECT sk__plt.idriadok AS id,
    sk__plt.ucet,
    sk__plt.c_uzaverka,
    sk__plt.druh_pl,
    sk__plt.cena_pl,
    sk__plt.mena,
    sk__plt.poradi,
    btrim(druhy_pl.j0::text) AS nazov,
    sk__fin.text_sleva
   FROM food600.sk__plt
     LEFT JOIN food600.druhy_pl ON druhy_pl.nazev = sk__plt.druh_pl
     LEFT JOIN food600.sk__fin ON sk__fin.c_uzaverka = sk__plt.c_uzaverka AND sk__fin.ucet = sk__plt.ucet
  WHERE sk__plt.kompez = 0
  ORDER BY sk__plt.poradi;

