select
  z.zonepk as id_table,
  z.date_create,
  extract(year from z.date_create) as annee,
  extract(month from z.date_create) as mois,
  extract(week from z.date_create) as semaine,
  z.latitude,
  z.longitude,
  u."name",
  u.email,
  dp.nom_courant,
  ds.longitude as longitude_etab,
  ds.latitude as latitude_etab
from zones z
inner join zones_changes zc on z.zonepk = zc.zonefk
inner join zones_protocoles zp on zp.zonechangefk  = zc.zonechangepk
left join users u on u.userpk = z.userfk
left join users_structures us on us.userfk = u.userpk
left join dico_structures ds on ds.structurepk = us.structurefk
inner join dico_protocoles dp on dp.protocolepk = zp.protocolefk
where
u.email not in('vne5@yopmail.com')
