I've a table from SQL Server and I've managed to tidy up the data. How to make unselected time or delete the past time data. so just need early time. So I use this query:
SELECT table1.id, table1.name,MIN(time)
FROM table1
GROUP BY id, name,time
and I'm failing when I try query like this:
DELETE FROM table1
WHERE table1.date EXCEPT MIN(time)
this is my table:
Id_student name date
1 azhar 06:19:20
1 azhar 06:30:30
1 azhar 06:39:30
1 azhar 06:40:30
1 azhar 06:49:30
and this is expected finished table:
Id_student name date
1 azhar 06:19:20