WHERE conditions have to be boolean expressions, a query returns records. A boolean expression can be made if you specify records should be IN a lit of records, but you typically need an ID (primary key field) to identify what is IN the set of records or not, eg
DELETE FROM LoggingData WHERE LoggingData.ID IN (SELECT TOP 2 ID FROM LoggingData ORDER BY DateAndTime)
As the order is given by dateandtime it would be sufficient to do it this way, I think:
DELETE FROM LoggingData WHERE LoggingData.DateAndTime IN (SELECT TOP 2 DateAndTime FROM LoggingData ORDER BY DateAndTime)
Bye, Olaf.