Dev till Upsert/Delete Query