hi, thanks
I tried do it something like u (with all the conditions)
but it still doent work :(
SELECT td2.* , tasks.name_task
FROM (SELECT td1.machinenum, td1.ID_task, Min(td1.duedate_task) AS MinOfduedate_task
FROM tasks_diary AS td1
WHERE (((td1.dodate_task) Is Null) AND...