In SQLite my query:
DELETE FROM notification_invoice t1 WHERE notificationDate >= 1536883200000 and providerId in ("1234","5678")
AND EXISTS (
SELECT 1 FROM notification_invoice t2 WHERE
providerId in ("1234","5678")
and t2.notificationDate = t1.notificationDate
and t1.ownerKey = t2.ownerKey
AND t1._id < t2._id
)
But I get error:
Error: [SQLITE_ERROR] SQL error or missing database (near "t1": syntax error)
SQLState: null
ErrorCode: 1
DELETE FROM notification_invoice t1. Any error? Note, you will delete all data if it works, never try this on a production database!