SELECT DISTINCT
observations.observationpk AS Numero_observation,
observations.date AS Date_observation,
--observations.date_create as Date_creation,
users.nom AS Nom_enseignant,
users.prenom AS Prenom_enseignant,
dp.nom_courant as Protocole,
--users.email as email,
groupes.anneescol AS Annee_scol,
groupes.name AS Nom_classe,
groupes.niveau AS Niveau,
observateurs.name AS Nom_groupe,
dico_structures.name AS Nom_etablissement,
dico_structures.zipcode AS Code_postal_etablissement,
dico_structures.city AS Ville_etablissement,
dico_academies.name as Academie,
zones.name AS nom_de_la_zone,
zones.zonepk,
   observations_abondances.nom_espece AS Espece,
observations_abondances.photo_taxon as Photo_taxon,
replace(replace(observations.notes,chr(10),' '),chr(13),' ') AS Notes
FROM observations
LEFT JOIN observateurs ON observations.observateurfk = observateurs.observateurpk
LEFT JOIN groupes ON groupes.groupepk = observateurs.groupefk
LEFT JOIN users ON users.userpk=groupes.userfk 
LEFT JOIN observations_abondances on observations_abondances.observationfk = observations.observationpk
left join zones_changes on observations.zonechangefk = zones_changes.zonechangepk
left join zones on zones.zonepk = zones_changes.zonefk
left join zones_description_sauvages on zones_description_sauvages.zonechangefk = zones_changes.zonechangepk
left join dico_structures on dico_structures.structurepk = groupes.structurefk 
left join dico_academies on dico_academies.academiepk = dico_structures.academiefk 
left join dico_protocoles dp on dp.protocolepk = observations.protocolefk 
WHERE 
users.email not in ('vne5@yopmail.com')
