0
To bring the highest time_end of each date use:
SELECT Ordem, Hora, MAX(hora_fim), status FROM sua_tabela
GROUP BY Hora
ORDER BY Hora;
select above will only work in Mysql if SQL mode ONLY_FULL_GROUP_BY
is disabled.
0
1
To bring the highest time_end of each date use:
SELECT Ordem, Hora, MAX(hora_fim), status FROM sua_tabela
GROUP BY Hora
ORDER BY Hora;
select above will only work in Mysql if SQL mode ONLY_FULL_GROUP_BY
is disabled.
0
SELECT * FROM Tabela
WHERE ordem = numero da orem
ORDER BY Hora DESC, horafim DESC
LIMIT 1;
Browser other questions tagged mysql sql sql-server
You are not signed in. Login or sign up in order to post.
You can use ORDER BY in the Time and End Times: https://www.w3schools.com/sql/sql_orderby.asp
– Daniel Mendes