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