MariaDB order by before Group by
Use something like

SELECT result.text, result.date, sample.ID
FROM       ( SELECT sample, MAX(date) date 
             FROM result 
             GROUP BY sample) maxtime
INNER JOIN result  ON result.sample=maxtime.sample
                  AND result.date=maxtime.date
LEFT JOIN  test ON test.ID = result.test
LEFT JOIN  sample ON sample.ID = result.sample
LEFT JOIN  batch ON batch.ID = sample.batch
WHERE batch.ID = 12759 
  AND test.ID  = 2144