-- View: vu_fds_partenaires_par_event_nbparticipants

-- DROP VIEW vu_fds_partenaires_par_event_nbparticipants;

CREATE OR REPLACE VIEW vu_fds_partenaires_par_event_nbparticipants AS 
 SELECT fds_organisme.organisme, fds_evenement.num_evenement, fds_evenement.date, fds_evenement.salaries, fds_evenement.benevoles, fds_evenement.non_adherents, fds_evenement.adherents, fds_evenement.enfants
   FROM ( SELECT fds_evt_intervenant.num_evenement, fds_intervenants.ref_intervenant, fds_intervenants.organisme
           FROM fds_evt_intervenant, fds_intervenants
          WHERE fds_evt_intervenant.ref_intervenant = fds_intervenants.ref_intervenant) fds_organisme
   JOIN fds_evenement ON fds_evenement.num_evenement = fds_organisme.num_evenement
  ORDER BY fds_organisme.organisme;

ALTER TABLE vu_fds_partenaires_par_event_nbparticipants OWNER TO postgres;

