Помогите пожалуйста, у запроса:
select au.id as id, au.name_model, au.gos_numer, th.teh,
os.sago, sk.skzi, rem.data_remonta1, st.id as tyagach, st2.id as pricep
from name_auto as au
left join svyazka_table as st on st.id_auto = au.id
left join svyazka_table as st2 on st2.id_pricep = au.id
left join (SELECT DATE_FORMAT(teh, '%d.%m.%Y') as teh, teh.id, id_auto from teh where udalen is null and teh > now() - INTERVAL 1 day Order by teh.id desc) th on th.id_auto = au.id
left join (SELECT DATE_FORMAT(sago, '%d.%m.%Y') as sago, os.id_auto from os_sk as os where udalen is null and os.sago > now() - INTERVAL 1 day) os on os.id_auto = au.id
left join (SELECT DATE_FORMAT(skzi, '%d.%m.%Y') as skzi, id_auto from skzi where udalen is null and skzi > now() - INTERVAL 1 day) sk on sk.id_auto = au.id
left join (SELECT DATE_FORMAT(remont.data_remonta1, '%d.%m.%Y') as data_remonta1, remont.id, remont.id_auto from remont ORDER BY remont.id DESC ) rem on rem.id_auto = au.id
where au.udal is null group by au.gos_numer ORDER BY au.id desc
в этой строке DESC не работает
left join (SELECT DATE_FORMAT(remont.data_remonta1, '%d.%m.%Y') as data_remonta1, remont.id, remont.id_auto from remont
ORDER BY remont.id DESC ) rem on rem.id_auto = au.id