-- View: "Vu_fds_nb_persons_natur_animation"

-- DROP VIEW "Vu_fds_nb_persons_natur_animation";

CREATE OR REPLACE VIEW "Vu_fds_nb_persons_natur_animation" AS 
 SELECT fds_t_nature_animation.nature_animation, sum(fds_evenement.adherents) AS nb_adherent, sum(fds_evenement.enfants) AS nb_enfants, sum(fds_evenement.non_adherents) AS nb_non_adherents
   FROM fds_evenement, fds_t_nature_animation
  WHERE fds_evenement.ref_nature_anim = fds_t_nature_animation.ref_nature_anim AND fds_evenement.date ~~ '2008%'::text
  GROUP BY fds_evenement.ref_nature_anim, fds_t_nature_animation.nature_animation;

ALTER TABLE "Vu_fds_nb_persons_natur_animation" OWNER TO postgres;

