SELECT 
  OBJ.OBJ_OBJNR AS 'Objektsnr', 
  PKU.PKU_HNAMN AS 'Hyresgäst', 
  OBJ.OBJ_GYTA AS 'Yta kvm', 
  AVR.AVR_NORMALHYRAMAN AS 'Årshyra', 
  AVR.AVR_FOMDAT AS 'Avtal startdatum', 
  AVR.AVR_TOMDAT AS 'Avtal t o m', 
  AVR.AVR_KONTRAKTSLUT AS 'Kontraktslut', 
  AVR.AVR_AVRFRL AS 'Förlängningstid', 
  AVR.AVR_UPSTID AS 'Uppsägningstid' 
FROM 
  AVR 
  INNER JOIN OBJ ON AVR.AVR_OBJNR = OBJ.OBJ_OBJNR 
  INNER JOIN OBT ON OBJ.OBJ_OBOTYP = OBT.OBT_OBOTYP 
  AND OBJ.OBJ_OBJTYP = OBT.OBT_OBJTYP 
  INNER JOIN OBO ON OBJ.OBJ_OBOTYP = OBO.OBO_OBOTYP 
  INNER JOIN BG ON OBJ.OBJ_BYGNR = BG.BG_BYGNR 
  AND OBJ.OBJ_FASTNR = BG.BG_FASTNR 
  INNER JOIN FT ON BG.BG_FASTNR = FT.FT_FASTNR 
  LEFT OUTER JOIN PKU ON AVR.AVR_KUNDNRINFLYTT = PKU.PKU_KUNDNR 
  LEFT OUTER JOIN PKU PKU_A ON AVR.AVR_KUNDNRHG2INFLYTT = PKU_A.PKU_KUNDNR 
WHERE 
  (
    AVR.AVR_OBJNR > '' 
    AND (AVR.AVR_OBJNR) IS NOT NULL
  ) 
  AND AVR.AVR_KORR = 'N' 
  AND FT.FT_BESK LIKE 'Niten 11' 
  AND OBJ.OBJ_OBOTYP LIKE 'L%' 
  AND PKU.PKU_HNAMN != 'HG AVIDENTIFIERAD' 
  AND AVR.AVR_TOMDAT = 'TV' 
ORDER BY 
  Objektsnr ASC