Delete from YourTable VersionA
where VersionA.Time NOT IN
( select MAX( VersionB.Time ) Time
from YourTable VersionB
where VersionA.UserID = VersionB.UserID
and VersionA.VisitorID = VersionB.VisitorID )
Sintaks mungkin perlu disesuaikan, tetapi HARUS melakukan triknya. Selain itu, Anda mungkin ingin melakukan pra-kueri Subselect ke tabelnya sendiri PERTAMA, lalu jalankan DELETE FROM terhadap kumpulan hasil tersebut.