SELECT Publications.Id, Publications.Extrait, Publications.Description, Publications.Categorie_No, Publications.Titre, Publications.Titre2, Publications.Date,Publications.niveau4, Publications.Sequence_No, Publications.Photo_mini, Publications.Photo_texte, Publications.niveau, Publications.Repertoire_No, Publications.partenaireid, Publications.entree,Fiches.Web FROM Publications, Fiches WHERE Fiches.Repertoire_No=Publications.Repertoire_No AND Publications.Id IN (SELECT MAX(Id) FROM Publications WHERE #PreserveSingleQuotes(LieuQuery)#Langue LIKE '%fr%' AND (Secteur LIKE '%#attributes.Secteur#%' or Secteur LIKE '%420%' or Secteur LIKE '%580%' or Secteur LIKE '%230%' or Secteur LIKE '%280%' OR Classement LIKE '%Soci%' OR Classement LIKE '%Justice%' OR Classement LIKE '%Sant%' OR Classement LIKE '%Environnement%' OR Classement LIKE '%Femme%' OR metakeys LIKE '%Soci%' OR metakeys LIKE '%Justice%' OR metakeys LIKE '%Sant%' OR metakeys LIKE '%Environnement%' OR metakeys LIKE '%Femme%') AND (niveau='2' OR niveau='3') AND (niveau3='journal' OR niveau4='journal') AND (Actif='1' or Actif='3') AND (repertoire_no='1151936421' or DB_Source='1151936421' or DB_Source='2137988666') GROUP BY Repertoire_No) ORDER BY Publications.Entree desc, Publications.Tri desc, Publications.Id desc,Publications.Titre2;