Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
SELECT * FROM Table_1 ORDER BY Id, DateUse DESC
SELECT * FROM Table_1 t1 LEFT JOIN Table_1 t2 ON t2.id = t1.id AND t2.DateUse > t1.DateUse WHERE t2.id IS NULL;
SELECT Table_Senture.* FROM Table_Senture INNER JOIN ( SELECT ID, MAX(DateUse) AS MaxDate FROM Table_Senture GROUP BY ID ) AS MR ON Table_Senture.ID = MR.ID AND DateUse = MaxDate