SELECT STORELOC, ARTICLE, PRICE, MAX (EVENTTIME) FROM (select PH.STORELOC, PH.ARTICLE, PH.PRICE, PH.EVENTTIME from SUPERMAG.SMPRICEHISTORY PH WHERE PH.PRICETYPE >1 AND PH.EVENTTIME <= TO_DATE('11.08.13','DD.MM.YY') ORDER BY PH.EVENTTIME DESC) GROUP BY STORELOC,ARTICLE,PRICE ORDER BY STORELOC,ARTICLE