CREATE OR REPLACE VIEW food600.spol_sum_dph_a
 AS
 SELECT sk_pol_a.uzaverka,
    sk_pol_a.u_cis,
    sk_pol_a.dan,
    sum(sk_pol_a.prachy) AS prachy,
    sum(sk_pol_a.dan) AS dan_pol,
    sk_pol_a.c_data
   FROM food600.sk_pol_a
  WHERE sk_pol_a.k_odpoctu <> ''::bpchar AND sk_pol_a.kompez = 0
  GROUP BY sk_pol_a.uzaverka, sk_pol_a.u_cis, sk_pol_a.dan, sk_pol_a.c_data;
